@dynatrace/strato-geo 0.6.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +174 -0
- package/README.md +15 -0
- package/esm/index.js +16 -0
- package/esm/index.js.map +7 -0
- package/esm/map/MapView.js +16 -0
- package/esm/map/MapView.js.map +7 -0
- package/esm/map/components/BubbleLayer/BubbleCircleLayer.js +16 -0
- package/esm/map/components/BubbleLayer/BubbleCircleLayer.js.map +7 -0
- package/esm/map/components/BubbleLayer/BubbleLayer.js +16 -0
- package/esm/map/components/BubbleLayer/BubbleLayer.js.map +7 -0
- package/esm/map/components/BubbleLayer/BubbleLayerTooltip.js +16 -0
- package/esm/map/components/BubbleLayer/BubbleLayerTooltip.js.map +7 -0
- package/esm/map/components/BubbleLayer/BubbleOutlineLayer.js +16 -0
- package/esm/map/components/BubbleLayer/BubbleOutlineLayer.js.map +7 -0
- package/esm/map/components/BubbleLayer/contexts/size-interpolation.context.js +16 -0
- package/esm/map/components/BubbleLayer/contexts/size-interpolation.context.js.map +7 -0
- package/esm/map/components/BubbleLayer/functions/add-outline-size.js +16 -0
- package/esm/map/components/BubbleLayer/functions/add-outline-size.js.map +7 -0
- package/esm/map/components/BubbleLayer/functions/build-radius-scale.js +16 -0
- package/esm/map/components/BubbleLayer/functions/build-radius-scale.js.map +7 -0
- package/esm/map/components/BubbleLayer/functions/build-stick-to-distance-expressions.js +16 -0
- package/esm/map/components/BubbleLayer/functions/build-stick-to-distance-expressions.js.map +7 -0
- package/esm/map/components/BubbleLayer/functions/parse-bubble-data-to-geo-json.js +16 -0
- package/esm/map/components/BubbleLayer/functions/parse-bubble-data-to-geo-json.js.map +7 -0
- package/esm/map/components/BubbleLayer/hooks/use-size-interpolation.js +16 -0
- package/esm/map/components/BubbleLayer/hooks/use-size-interpolation.js.map +7 -0
- package/esm/map/components/ChoroplethLayer.js +16 -0
- package/esm/map/components/ChoroplethLayer.js.map +7 -0
- package/esm/map/components/ChoroplethLayerTooltip.js +16 -0
- package/esm/map/components/ChoroplethLayerTooltip.js.map +7 -0
- package/esm/map/components/ConnectionLayer/ConnectionLayer.js +16 -0
- package/esm/map/components/ConnectionLayer/ConnectionLayer.js.map +7 -0
- package/esm/map/components/ConnectionLayer/ConnectionLayerDirection.js +16 -0
- package/esm/map/components/ConnectionLayer/ConnectionLayerDirection.js.map +7 -0
- package/esm/map/components/ConnectionLayer/ConnectionLayerTooltip.js +16 -0
- package/esm/map/components/ConnectionLayer/ConnectionLayerTooltip.js.map +7 -0
- package/esm/map/components/ConnectionLayer/functions/get-arc-line-features.js +16 -0
- package/esm/map/components/ConnectionLayer/functions/get-arc-line-features.js.map +7 -0
- package/esm/map/components/ConnectionLayer/functions/get-arrows-angles.js +16 -0
- package/esm/map/components/ConnectionLayer/functions/get-arrows-angles.js.map +7 -0
- package/esm/map/components/ConnectionLayer/functions/get-straight-line-features.js +16 -0
- package/esm/map/components/ConnectionLayer/functions/get-straight-line-features.js.map +7 -0
- package/esm/map/components/ConnectionLayer/functions/parse-connection-data-to-geo-json.js +16 -0
- package/esm/map/components/ConnectionLayer/functions/parse-connection-data-to-geo-json.js.map +7 -0
- package/esm/map/components/ConnectionLayer/functions/parse-direction-data-to-geo-json.js +16 -0
- package/esm/map/components/ConnectionLayer/functions/parse-direction-data-to-geo-json.js.map +7 -0
- package/esm/map/components/DefaultTooltip.js +16 -0
- package/esm/map/components/DefaultTooltip.js.map +7 -0
- package/esm/map/components/DotLayer/BackgroundLayer.js +16 -0
- package/esm/map/components/DotLayer/BackgroundLayer.js.map +7 -0
- package/esm/map/components/DotLayer/DotLayer.js +16 -0
- package/esm/map/components/DotLayer/DotLayer.js.map +7 -0
- package/esm/map/components/DotLayer/DotLayerTooltip.js +16 -0
- package/esm/map/components/DotLayer/DotLayerTooltip.js.map +7 -0
- package/esm/map/components/DotLayer/functions/calculate-circle-translate.js +16 -0
- package/esm/map/components/DotLayer/functions/calculate-circle-translate.js.map +7 -0
- package/esm/map/components/DotLayer/functions/resolve-icon-background.js +16 -0
- package/esm/map/components/DotLayer/functions/resolve-icon-background.js.map +7 -0
- package/esm/map/components/MapContent.js +16 -0
- package/esm/map/components/MapContent.js.map +7 -0
- package/esm/map/components/legend/CategoricalLegendRenderer.js +16 -0
- package/esm/map/components/legend/CategoricalLegendRenderer.js.map +7 -0
- package/esm/map/components/legend/MapLegendRenderer.js +16 -0
- package/esm/map/components/legend/MapLegendRenderer.js.map +7 -0
- package/esm/map/components/legend/SequentialLegendRenderer.js +16 -0
- package/esm/map/components/legend/SequentialLegendRenderer.js.map +7 -0
- package/esm/map/components/legend/ThresholdLegendRenderer.js +16 -0
- package/esm/map/components/legend/ThresholdLegendRenderer.js.map +7 -0
- package/esm/map/components/legend/functions/resolve-color.js +16 -0
- package/esm/map/components/legend/functions/resolve-color.js.map +7 -0
- package/esm/map/components/toolbar/MapToolbar.js +16 -0
- package/esm/map/components/toolbar/MapToolbar.js.map +7 -0
- package/esm/map/components/toolbar/buttons/MapDownloadDataButton.js +16 -0
- package/esm/map/components/toolbar/buttons/MapDownloadDataButton.js.map +7 -0
- package/esm/map/components/toolbar/buttons/MapResetButton.js +16 -0
- package/esm/map/components/toolbar/buttons/MapResetButton.js.map +7 -0
- package/esm/map/components/toolbar/buttons/MapZoomInOutButtons.js +16 -0
- package/esm/map/components/toolbar/buttons/MapZoomInOutButtons.js.map +7 -0
- package/esm/map/components/toolbar/buttons/MapZoomToFitButton.js +16 -0
- package/esm/map/components/toolbar/buttons/MapZoomToFitButton.js.map +7 -0
- package/esm/map/components/toolbar/constants.js +16 -0
- package/esm/map/components/toolbar/constants.js.map +7 -0
- package/esm/map/constants.js +16 -0
- package/esm/map/constants.js.map +7 -0
- package/esm/map/contexts/a11y-toolbar-tab-index.context.js +16 -0
- package/esm/map/contexts/a11y-toolbar-tab-index.context.js.map +7 -0
- package/esm/map/contexts/color-scale.context.js +16 -0
- package/esm/map/contexts/color-scale.context.js.map +7 -0
- package/esm/map/contexts/layer-coloring-strategy.context.js +16 -0
- package/esm/map/contexts/layer-coloring-strategy.context.js.map +7 -0
- package/esm/map/contexts/layer-ids.context.js +16 -0
- package/esm/map/contexts/layer-ids.context.js.map +7 -0
- package/esm/map/contexts/map-configuration.context.js +16 -0
- package/esm/map/contexts/map-configuration.context.js.map +7 -0
- package/esm/map/contexts/map-country-code.context.js +16 -0
- package/esm/map/contexts/map-country-code.context.js.map +7 -0
- package/esm/map/contexts/map-data-bounding-box.context.js +16 -0
- package/esm/map/contexts/map-data-bounding-box.context.js.map +7 -0
- package/esm/map/contexts/map-initial-view.context.js +16 -0
- package/esm/map/contexts/map-initial-view.context.js.map +7 -0
- package/esm/map/contexts/map-raw-data.context.js +16 -0
- package/esm/map/contexts/map-raw-data.context.js.map +7 -0
- package/esm/map/functions/__test__/fixtures/business-locations.js +16 -0
- package/esm/map/functions/__test__/fixtures/business-locations.js.map +7 -0
- package/esm/map/functions/__test__/fixtures/connection-layer.js +16 -0
- package/esm/map/functions/__test__/fixtures/connection-layer.js.map +7 -0
- package/esm/map/functions/__test__/fixtures/countries-stats.js +16 -0
- package/esm/map/functions/__test__/fixtures/countries-stats.js.map +7 -0
- package/esm/map/functions/__test__/fixtures/csv-download-cases.js +16 -0
- package/esm/map/functions/__test__/fixtures/csv-download-cases.js.map +7 -0
- package/esm/map/functions/__test__/fixtures/events-locations.js +16 -0
- package/esm/map/functions/__test__/fixtures/events-locations.js.map +7 -0
- package/esm/map/functions/__test__/fixtures/facilities-locations.js +16 -0
- package/esm/map/functions/__test__/fixtures/facilities-locations.js.map +7 -0
- package/esm/map/functions/__test__/fixtures/flight-connections.js +16 -0
- package/esm/map/functions/__test__/fixtures/flight-connections.js.map +7 -0
- package/esm/map/functions/a11y-toolbar-controls.js +16 -0
- package/esm/map/functions/a11y-toolbar-controls.js.map +7 -0
- package/esm/map/functions/attach-image-from-shape.js +16 -0
- package/esm/map/functions/attach-image-from-shape.js.map +7 -0
- package/esm/map/functions/attach-image-from-string.js +16 -0
- package/esm/map/functions/attach-image-from-string.js.map +7 -0
- package/esm/map/functions/attach-image-from-text.js +16 -0
- package/esm/map/functions/attach-image-from-text.js.map +7 -0
- package/esm/map/functions/attach-image-to-map.js +16 -0
- package/esm/map/functions/attach-image-to-map.js.map +7 -0
- package/esm/map/functions/build-and-download-csv.js +16 -0
- package/esm/map/functions/build-and-download-csv.js.map +7 -0
- package/esm/map/functions/build-categorical-scale.js +16 -0
- package/esm/map/functions/build-categorical-scale.js.map +7 -0
- package/esm/map/functions/build-scale-from-legend-config.js +16 -0
- package/esm/map/functions/build-scale-from-legend-config.js.map +7 -0
- package/esm/map/functions/calculate-hovered-color.js +16 -0
- package/esm/map/functions/calculate-hovered-color.js.map +7 -0
- package/esm/map/functions/create-bitmap-config-options.js +16 -0
- package/esm/map/functions/create-bitmap-config-options.js.map +7 -0
- package/esm/map/functions/define-bearing.js +16 -0
- package/esm/map/functions/define-bearing.js.map +7 -0
- package/esm/map/functions/define-color.js +16 -0
- package/esm/map/functions/define-color.js.map +7 -0
- package/esm/map/functions/define-radius.js +16 -0
- package/esm/map/functions/define-radius.js.map +7 -0
- package/esm/map/functions/extract-layers-data.js +16 -0
- package/esm/map/functions/extract-layers-data.js.map +7 -0
- package/esm/map/functions/get-client-settings.js +16 -0
- package/esm/map/functions/get-client-settings.js.map +7 -0
- package/esm/map/functions/get-color-from-token.js +16 -0
- package/esm/map/functions/get-color-from-token.js.map +7 -0
- package/esm/map/functions/get-countries-geo-code.js +16 -0
- package/esm/map/functions/get-countries-geo-code.js.map +7 -0
- package/esm/map/functions/get-data-layers-bounding-box.js +16 -0
- package/esm/map/functions/get-data-layers-bounding-box.js.map +7 -0
- package/esm/map/functions/get-data-uri.js +16 -0
- package/esm/map/functions/get-data-uri.js.map +7 -0
- package/esm/map/functions/get-map-states-template.js +16 -0
- package/esm/map/functions/get-map-states-template.js.map +7 -0
- package/esm/map/functions/get-scaled-symbol-size.js +16 -0
- package/esm/map/functions/get-scaled-symbol-size.js.map +7 -0
- package/esm/map/functions/get-tenant-country-code.js +16 -0
- package/esm/map/functions/get-tenant-country-code.js.map +7 -0
- package/esm/map/functions/is-valid-shape.js +16 -0
- package/esm/map/functions/is-valid-shape.js.map +7 -0
- package/esm/map/functions/iterate-config-slots.js +16 -0
- package/esm/map/functions/iterate-config-slots.js.map +7 -0
- package/esm/map/functions/parse-dot-data-to-geo-json.js +16 -0
- package/esm/map/functions/parse-dot-data-to-geo-json.js.map +7 -0
- package/esm/map/functions/parse-region-data-to-geo-json.js +16 -0
- package/esm/map/functions/parse-region-data-to-geo-json.js.map +7 -0
- package/esm/map/functions/safe-reactdom-render.js +16 -0
- package/esm/map/functions/safe-reactdom-render.js.map +7 -0
- package/esm/map/functions/set-layers-id.js +16 -0
- package/esm/map/functions/set-layers-id.js.map +7 -0
- package/esm/map/functions/tabularize-layers-data.js +18 -0
- package/esm/map/functions/tabularize-layers-data.js.map +7 -0
- package/esm/map/functions/to-mapbox-initial-view-state.js +16 -0
- package/esm/map/functions/to-mapbox-initial-view-state.js.map +7 -0
- package/esm/map/functions/tooltip-type-guards.js +16 -0
- package/esm/map/functions/tooltip-type-guards.js.map +7 -0
- package/esm/map/hooks/use-a11y-toolbar-tab-index.js +16 -0
- package/esm/map/hooks/use-a11y-toolbar-tab-index.js.map +7 -0
- package/esm/map/hooks/use-active-interaction.js +16 -0
- package/esm/map/hooks/use-active-interaction.js.map +7 -0
- package/esm/map/hooks/use-attach-image-from-icon.js +16 -0
- package/esm/map/hooks/use-attach-image-from-icon.js.map +7 -0
- package/esm/map/hooks/use-attach-symbol-to-map.js +16 -0
- package/esm/map/hooks/use-attach-symbol-to-map.js.map +7 -0
- package/esm/map/hooks/use-color-scale.js +16 -0
- package/esm/map/hooks/use-color-scale.js.map +7 -0
- package/esm/map/hooks/use-connection-direction-interaction-highlighting.js +16 -0
- package/esm/map/hooks/use-connection-direction-interaction-highlighting.js.map +7 -0
- package/esm/map/hooks/use-connection-interaction-highlighting.js +16 -0
- package/esm/map/hooks/use-connection-interaction-highlighting.js.map +7 -0
- package/esm/map/hooks/use-data-bounding-box.js +16 -0
- package/esm/map/hooks/use-data-bounding-box.js.map +7 -0
- package/esm/map/hooks/use-hover-interaction.js +16 -0
- package/esm/map/hooks/use-hover-interaction.js.map +7 -0
- package/esm/map/hooks/use-initial-view-context.js +16 -0
- package/esm/map/hooks/use-initial-view-context.js.map +7 -0
- package/esm/map/hooks/use-initial-view-state.js +16 -0
- package/esm/map/hooks/use-initial-view-state.js.map +7 -0
- package/esm/map/hooks/use-layer-coloring-strategy.js +16 -0
- package/esm/map/hooks/use-layer-coloring-strategy.js.map +7 -0
- package/esm/map/hooks/use-legend-interaction-highlighting.js +16 -0
- package/esm/map/hooks/use-legend-interaction-highlighting.js.map +7 -0
- package/esm/map/hooks/use-legend-interaction-visibility.js +16 -0
- package/esm/map/hooks/use-legend-interaction-visibility.js.map +7 -0
- package/esm/map/hooks/use-load-symbol-into-map.js +16 -0
- package/esm/map/hooks/use-load-symbol-into-map.js.map +7 -0
- package/esm/map/hooks/use-map-config.js +16 -0
- package/esm/map/hooks/use-map-config.js.map +7 -0
- package/esm/map/hooks/use-map-country-code.js +16 -0
- package/esm/map/hooks/use-map-country-code.js.map +7 -0
- package/esm/map/hooks/use-map-raw-data.js +16 -0
- package/esm/map/hooks/use-map-raw-data.js.map +7 -0
- package/esm/map/hooks/use-map-settings.js +16 -0
- package/esm/map/hooks/use-map-settings.js.map +7 -0
- package/esm/map/hooks/use-map-source.js +16 -0
- package/esm/map/hooks/use-map-source.js.map +7 -0
- package/esm/map/hooks/use-overlay-events.js +16 -0
- package/esm/map/hooks/use-overlay-events.js.map +7 -0
- package/esm/map/hooks/use-resolve-color.js +16 -0
- package/esm/map/hooks/use-resolve-color.js.map +7 -0
- package/esm/map/hooks/use-safe-svg-parser.js +16 -0
- package/esm/map/hooks/use-safe-svg-parser.js.map +7 -0
- package/esm/map/hooks/use-tooltip-event-listeners.js +16 -0
- package/esm/map/hooks/use-tooltip-event-listeners.js.map +7 -0
- package/esm/map/hooks/use-tooltip-template.js +16 -0
- package/esm/map/hooks/use-tooltip-template.js.map +7 -0
- package/esm/map/hooks/useDefaultTooltipActions.js +16 -0
- package/esm/map/hooks/useDefaultTooltipActions.js.map +7 -0
- package/esm/map/map-styles/default-style.js +16 -0
- package/esm/map/map-styles/default-style.js.map +7 -0
- package/esm/map/providers/color-scale.provider.js +16 -0
- package/esm/map/providers/color-scale.provider.js.map +7 -0
- package/esm/map/providers/layer-color-strategy.provider.js +16 -0
- package/esm/map/providers/layer-color-strategy.provider.js.map +7 -0
- package/esm/map/providers/map-initial-view.provider.js +16 -0
- package/esm/map/providers/map-initial-view.provider.js.map +7 -0
- package/esm/map/shapes/circle.js +33 -0
- package/esm/map/shapes/circle.js.map +7 -0
- package/esm/map/shapes/cross.js +28 -0
- package/esm/map/shapes/cross.js.map +7 -0
- package/esm/map/shapes/diamond.js +21 -0
- package/esm/map/shapes/diamond.js.map +7 -0
- package/esm/map/shapes/heart.js +28 -0
- package/esm/map/shapes/heart.js.map +7 -0
- package/esm/map/shapes/pin.js +22 -0
- package/esm/map/shapes/pin.js.map +7 -0
- package/esm/map/shapes/shape-picker.js +16 -0
- package/esm/map/shapes/shape-picker.js.map +7 -0
- package/esm/map/shapes/square.js +19 -0
- package/esm/map/shapes/square.js.map +7 -0
- package/esm/map/shapes/star.js +33 -0
- package/esm/map/shapes/star.js.map +7 -0
- package/esm/map/shapes/triangle.js +28 -0
- package/esm/map/shapes/triangle.js.map +7 -0
- package/esm/map/slots/BubbleLayer.js +16 -0
- package/esm/map/slots/BubbleLayer.js.map +7 -0
- package/esm/map/slots/BubbleLayerTooltip.js +16 -0
- package/esm/map/slots/BubbleLayerTooltip.js.map +7 -0
- package/esm/map/slots/CategoricalLegend.js +16 -0
- package/esm/map/slots/CategoricalLegend.js.map +7 -0
- package/esm/map/slots/ChartInteractions.js +16 -0
- package/esm/map/slots/ChartInteractions.js.map +7 -0
- package/esm/map/slots/ChoroplethLayer.js +16 -0
- package/esm/map/slots/ChoroplethLayer.js.map +7 -0
- package/esm/map/slots/ChoroplethLayerTooltip.js +16 -0
- package/esm/map/slots/ChoroplethLayerTooltip.js.map +7 -0
- package/esm/map/slots/ConnectionLayer.js +16 -0
- package/esm/map/slots/ConnectionLayer.js.map +7 -0
- package/esm/map/slots/ConnectionLayerTooltip.js +16 -0
- package/esm/map/slots/ConnectionLayerTooltip.js.map +7 -0
- package/esm/map/slots/DotLayer.js +16 -0
- package/esm/map/slots/DotLayer.js.map +7 -0
- package/esm/map/slots/DotLayerTooltip.js +16 -0
- package/esm/map/slots/DotLayerTooltip.js.map +7 -0
- package/esm/map/slots/SequentialLegend.js +16 -0
- package/esm/map/slots/SequentialLegend.js.map +7 -0
- package/esm/map/slots/ThresholdLegend.js +16 -0
- package/esm/map/slots/ThresholdLegend.js.map +7 -0
- package/esm/map/slots/Tooltip.js +16 -0
- package/esm/map/slots/Tooltip.js.map +7 -0
- package/esm/map/slots/Zoom.js +16 -0
- package/esm/map/slots/Zoom.js.map +7 -0
- package/esm/map/slots/ZoomToFit.js +16 -0
- package/esm/map/slots/ZoomToFit.js.map +7 -0
- package/esm/map/slots/states/DisabledState.js +16 -0
- package/esm/map/slots/states/DisabledState.js.map +7 -0
- package/esm/map/slots/states/ErrorStateSlot.js +16 -0
- package/esm/map/slots/states/ErrorStateSlot.js.map +7 -0
- package/esm/map/sources/CN.js +16 -0
- package/esm/map/sources/CN.js.map +7 -0
- package/esm/map/sources/IL.js +16 -0
- package/esm/map/sources/IL.js.map +7 -0
- package/esm/map/sources/IN.js +16 -0
- package/esm/map/sources/IN.js.map +7 -0
- package/esm/map/sources/countries.js +16 -0
- package/esm/map/sources/countries.js.map +7 -0
- package/esm/map/store/map-store.context.js +16 -0
- package/esm/map/store/map-store.context.js.map +7 -0
- package/esm/map/store/map-store.provider.js +16 -0
- package/esm/map/store/map-store.provider.js.map +7 -0
- package/esm/map/store/selectors.js +16 -0
- package/esm/map/store/selectors.js.map +7 -0
- package/esm/map/store/store.js +16 -0
- package/esm/map/store/store.js.map +7 -0
- package/esm/map/styles/react-mapgl-styles.css +671 -0
- package/esm/map/types/bubble-layer.js +16 -0
- package/esm/map/types/bubble-layer.js.map +7 -0
- package/esm/map/types/choropleth-layer.js +16 -0
- package/esm/map/types/choropleth-layer.js.map +7 -0
- package/esm/map/types/coloring.js +16 -0
- package/esm/map/types/coloring.js.map +7 -0
- package/esm/map/types/configuration.js +16 -0
- package/esm/map/types/configuration.js.map +7 -0
- package/esm/map/types/connection-layer.js +16 -0
- package/esm/map/types/connection-layer.js.map +7 -0
- package/esm/map/types/dot-layer.js +16 -0
- package/esm/map/types/dot-layer.js.map +7 -0
- package/esm/map/types/legend.js +16 -0
- package/esm/map/types/legend.js.map +7 -0
- package/esm/map/types/location.js +16 -0
- package/esm/map/types/location.js.map +7 -0
- package/esm/map/types/map-view.js +16 -0
- package/esm/map/types/map-view.js.map +7 -0
- package/esm/map/types/shapes.js +16 -0
- package/esm/map/types/shapes.js.map +7 -0
- package/esm/map/types/state.js +16 -0
- package/esm/map/types/state.js.map +7 -0
- package/esm/map/types/toolbar.js +16 -0
- package/esm/map/types/toolbar.js.map +7 -0
- package/esm/map/types/tooltip.js +16 -0
- package/esm/map/types/tooltip.js.map +7 -0
- package/index.d.ts +37 -0
- package/index.js +15 -0
- package/map/MapView.d.ts +25 -0
- package/map/MapView.js +15 -0
- package/map/components/BubbleLayer/BubbleCircleLayer.d.ts +20 -0
- package/map/components/BubbleLayer/BubbleCircleLayer.js +15 -0
- package/map/components/BubbleLayer/BubbleLayer.d.ts +22 -0
- package/map/components/BubbleLayer/BubbleLayer.js +15 -0
- package/map/components/BubbleLayer/BubbleLayerTooltip.d.ts +26 -0
- package/map/components/BubbleLayer/BubbleLayerTooltip.js +15 -0
- package/map/components/BubbleLayer/BubbleOutlineLayer.d.ts +5 -0
- package/map/components/BubbleLayer/BubbleOutlineLayer.js +15 -0
- package/map/components/BubbleLayer/contexts/size-interpolation.context.d.ts +2 -0
- package/map/components/BubbleLayer/contexts/size-interpolation.context.js +15 -0
- package/map/components/BubbleLayer/functions/add-outline-size.d.ts +21 -0
- package/map/components/BubbleLayer/functions/add-outline-size.js +15 -0
- package/map/components/BubbleLayer/functions/build-radius-scale.d.ts +18 -0
- package/map/components/BubbleLayer/functions/build-radius-scale.js +15 -0
- package/map/components/BubbleLayer/functions/build-stick-to-distance-expressions.d.ts +28 -0
- package/map/components/BubbleLayer/functions/build-stick-to-distance-expressions.js +15 -0
- package/map/components/BubbleLayer/functions/parse-bubble-data-to-geo-json.d.ts +35 -0
- package/map/components/BubbleLayer/functions/parse-bubble-data-to-geo-json.js +15 -0
- package/map/components/BubbleLayer/hooks/use-size-interpolation.d.ts +1 -0
- package/map/components/BubbleLayer/hooks/use-size-interpolation.js +15 -0
- package/map/components/ChoroplethLayer.d.ts +21 -0
- package/map/components/ChoroplethLayer.js +15 -0
- package/map/components/ChoroplethLayerTooltip.d.ts +25 -0
- package/map/components/ChoroplethLayerTooltip.js +15 -0
- package/map/components/ConnectionLayer/ConnectionLayer.d.ts +22 -0
- package/map/components/ConnectionLayer/ConnectionLayer.js +15 -0
- package/map/components/ConnectionLayer/ConnectionLayerDirection.d.ts +26 -0
- package/map/components/ConnectionLayer/ConnectionLayerDirection.js +15 -0
- package/map/components/ConnectionLayer/ConnectionLayerTooltip.d.ts +26 -0
- package/map/components/ConnectionLayer/ConnectionLayerTooltip.js +15 -0
- package/map/components/ConnectionLayer/functions/get-arc-line-features.d.ts +18 -0
- package/map/components/ConnectionLayer/functions/get-arc-line-features.js +15 -0
- package/map/components/ConnectionLayer/functions/get-arrows-angles.d.ts +4 -0
- package/map/components/ConnectionLayer/functions/get-arrows-angles.js +15 -0
- package/map/components/ConnectionLayer/functions/get-straight-line-features.d.ts +18 -0
- package/map/components/ConnectionLayer/functions/get-straight-line-features.js +15 -0
- package/map/components/ConnectionLayer/functions/parse-connection-data-to-geo-json.d.ts +18 -0
- package/map/components/ConnectionLayer/functions/parse-connection-data-to-geo-json.js +15 -0
- package/map/components/ConnectionLayer/functions/parse-direction-data-to-geo-json.d.ts +7 -0
- package/map/components/ConnectionLayer/functions/parse-direction-data-to-geo-json.js +15 -0
- package/map/components/DefaultTooltip.d.ts +26 -0
- package/map/components/DefaultTooltip.js +15 -0
- package/map/components/DotLayer/BackgroundLayer.d.ts +25 -0
- package/map/components/DotLayer/BackgroundLayer.js +15 -0
- package/map/components/DotLayer/DotLayer.d.ts +25 -0
- package/map/components/DotLayer/DotLayer.js +15 -0
- package/map/components/DotLayer/DotLayerTooltip.d.ts +26 -0
- package/map/components/DotLayer/DotLayerTooltip.js +15 -0
- package/map/components/DotLayer/functions/calculate-circle-translate.d.ts +16 -0
- package/map/components/DotLayer/functions/calculate-circle-translate.js +15 -0
- package/map/components/DotLayer/functions/resolve-icon-background.d.ts +19 -0
- package/map/components/DotLayer/functions/resolve-icon-background.js +15 -0
- package/map/components/MapContent.d.ts +18 -0
- package/map/components/MapContent.js +15 -0
- package/map/components/legend/CategoricalLegendRenderer.d.ts +2 -0
- package/map/components/legend/CategoricalLegendRenderer.js +15 -0
- package/map/components/legend/MapLegendRenderer.d.ts +17 -0
- package/map/components/legend/MapLegendRenderer.js +15 -0
- package/map/components/legend/SequentialLegendRenderer.d.ts +17 -0
- package/map/components/legend/SequentialLegendRenderer.js +15 -0
- package/map/components/legend/ThresholdLegendRenderer.d.ts +17 -0
- package/map/components/legend/ThresholdLegendRenderer.js +15 -0
- package/map/components/legend/functions/resolve-color.d.ts +23 -0
- package/map/components/legend/functions/resolve-color.js +15 -0
- package/map/components/toolbar/MapToolbar.d.ts +20 -0
- package/map/components/toolbar/MapToolbar.js +15 -0
- package/map/components/toolbar/buttons/MapDownloadDataButton.d.ts +17 -0
- package/map/components/toolbar/buttons/MapDownloadDataButton.js +15 -0
- package/map/components/toolbar/buttons/MapResetButton.d.ts +17 -0
- package/map/components/toolbar/buttons/MapResetButton.js +15 -0
- package/map/components/toolbar/buttons/MapZoomInOutButtons.d.ts +17 -0
- package/map/components/toolbar/buttons/MapZoomInOutButtons.js +15 -0
- package/map/components/toolbar/buttons/MapZoomToFitButton.d.ts +20 -0
- package/map/components/toolbar/buttons/MapZoomToFitButton.js +15 -0
- package/map/components/toolbar/constants.d.ts +19 -0
- package/map/components/toolbar/constants.js +15 -0
- package/map/constants.d.ts +73 -0
- package/map/constants.js +15 -0
- package/map/contexts/a11y-toolbar-tab-index.context.d.ts +18 -0
- package/map/contexts/a11y-toolbar-tab-index.context.js +15 -0
- package/map/contexts/color-scale.context.d.ts +19 -0
- package/map/contexts/color-scale.context.js +15 -0
- package/map/contexts/layer-coloring-strategy.context.d.ts +2 -0
- package/map/contexts/layer-coloring-strategy.context.js +15 -0
- package/map/contexts/layer-ids.context.d.ts +17 -0
- package/map/contexts/layer-ids.context.js +15 -0
- package/map/contexts/map-configuration.context.d.ts +18 -0
- package/map/contexts/map-configuration.context.js +15 -0
- package/map/contexts/map-country-code.context.d.ts +17 -0
- package/map/contexts/map-country-code.context.js +15 -0
- package/map/contexts/map-data-bounding-box.context.d.ts +17 -0
- package/map/contexts/map-data-bounding-box.context.js +15 -0
- package/map/contexts/map-initial-view.context.d.ts +18 -0
- package/map/contexts/map-initial-view.context.js +15 -0
- package/map/contexts/map-raw-data.context.d.ts +17 -0
- package/map/contexts/map-raw-data.context.js +15 -0
- package/map/functions/__test__/fixtures/business-locations.d.ts +31 -0
- package/map/functions/__test__/fixtures/business-locations.js +15 -0
- package/map/functions/__test__/fixtures/connection-layer.d.ts +28 -0
- package/map/functions/__test__/fixtures/connection-layer.js +15 -0
- package/map/functions/__test__/fixtures/countries-stats.d.ts +31 -0
- package/map/functions/__test__/fixtures/countries-stats.js +15 -0
- package/map/functions/__test__/fixtures/csv-download-cases.d.ts +59 -0
- package/map/functions/__test__/fixtures/csv-download-cases.js +15 -0
- package/map/functions/__test__/fixtures/events-locations.d.ts +31 -0
- package/map/functions/__test__/fixtures/events-locations.js +15 -0
- package/map/functions/__test__/fixtures/facilities-locations.d.ts +40 -0
- package/map/functions/__test__/fixtures/facilities-locations.js +15 -0
- package/map/functions/__test__/fixtures/flight-connections.d.ts +26 -0
- package/map/functions/__test__/fixtures/flight-connections.js +15 -0
- package/map/functions/a11y-toolbar-controls.d.ts +22 -0
- package/map/functions/a11y-toolbar-controls.js +15 -0
- package/map/functions/attach-image-from-shape.d.ts +18 -0
- package/map/functions/attach-image-from-shape.js +15 -0
- package/map/functions/attach-image-from-string.d.ts +18 -0
- package/map/functions/attach-image-from-string.js +15 -0
- package/map/functions/attach-image-from-text.d.ts +17 -0
- package/map/functions/attach-image-from-text.js +15 -0
- package/map/functions/attach-image-to-map.d.ts +17 -0
- package/map/functions/attach-image-to-map.js +15 -0
- package/map/functions/build-and-download-csv.d.ts +6 -0
- package/map/functions/build-and-download-csv.js +15 -0
- package/map/functions/build-categorical-scale.d.ts +2 -0
- package/map/functions/build-categorical-scale.js +15 -0
- package/map/functions/build-scale-from-legend-config.d.ts +23 -0
- package/map/functions/build-scale-from-legend-config.js +15 -0
- package/map/functions/calculate-hovered-color.d.ts +1 -0
- package/map/functions/calculate-hovered-color.js +15 -0
- package/map/functions/create-bitmap-config-options.d.ts +16 -0
- package/map/functions/create-bitmap-config-options.js +15 -0
- package/map/functions/define-bearing.d.ts +17 -0
- package/map/functions/define-bearing.js +15 -0
- package/map/functions/define-color.d.ts +16 -0
- package/map/functions/define-color.js +15 -0
- package/map/functions/define-radius.d.ts +17 -0
- package/map/functions/define-radius.js +15 -0
- package/map/functions/extract-layers-data.d.ts +7 -0
- package/map/functions/extract-layers-data.js +15 -0
- package/map/functions/get-client-settings.d.ts +16 -0
- package/map/functions/get-client-settings.js +15 -0
- package/map/functions/get-color-from-token.d.ts +1 -0
- package/map/functions/get-color-from-token.js +15 -0
- package/map/functions/get-countries-geo-code.d.ts +16 -0
- package/map/functions/get-countries-geo-code.js +15 -0
- package/map/functions/get-data-layers-bounding-box.d.ts +17 -0
- package/map/functions/get-data-layers-bounding-box.js +15 -0
- package/map/functions/get-data-uri.d.ts +16 -0
- package/map/functions/get-data-uri.js +15 -0
- package/map/functions/get-map-states-template.d.ts +19 -0
- package/map/functions/get-map-states-template.js +15 -0
- package/map/functions/get-scaled-symbol-size.d.ts +17 -0
- package/map/functions/get-scaled-symbol-size.js +15 -0
- package/map/functions/get-tenant-country-code.d.ts +16 -0
- package/map/functions/get-tenant-country-code.js +15 -0
- package/map/functions/is-valid-shape.d.ts +18 -0
- package/map/functions/is-valid-shape.js +15 -0
- package/map/functions/iterate-config-slots.d.ts +23 -0
- package/map/functions/iterate-config-slots.js +15 -0
- package/map/functions/parse-dot-data-to-geo-json.d.ts +31 -0
- package/map/functions/parse-dot-data-to-geo-json.js +15 -0
- package/map/functions/parse-region-data-to-geo-json.d.ts +17 -0
- package/map/functions/parse-region-data-to-geo-json.js +15 -0
- package/map/functions/safe-reactdom-render.d.ts +22 -0
- package/map/functions/safe-reactdom-render.js +15 -0
- package/map/functions/set-layers-id.d.ts +25 -0
- package/map/functions/set-layers-id.js +15 -0
- package/map/functions/tabularize-layers-data.d.ts +27 -0
- package/map/functions/tabularize-layers-data.js +17 -0
- package/map/functions/to-mapbox-initial-view-state.d.ts +1 -0
- package/map/functions/to-mapbox-initial-view-state.js +15 -0
- package/map/functions/tooltip-type-guards.d.ts +32 -0
- package/map/functions/tooltip-type-guards.js +15 -0
- package/map/hooks/use-a11y-toolbar-tab-index.d.ts +22 -0
- package/map/hooks/use-a11y-toolbar-tab-index.js +15 -0
- package/map/hooks/use-active-interaction.d.ts +1 -0
- package/map/hooks/use-active-interaction.js +15 -0
- package/map/hooks/use-attach-image-from-icon.d.ts +18 -0
- package/map/hooks/use-attach-image-from-icon.js +15 -0
- package/map/hooks/use-attach-symbol-to-map.d.ts +18 -0
- package/map/hooks/use-attach-symbol-to-map.js +15 -0
- package/map/hooks/use-color-scale.d.ts +17 -0
- package/map/hooks/use-color-scale.js +15 -0
- package/map/hooks/use-connection-direction-interaction-highlighting.d.ts +1 -0
- package/map/hooks/use-connection-direction-interaction-highlighting.js +15 -0
- package/map/hooks/use-connection-interaction-highlighting.d.ts +1 -0
- package/map/hooks/use-connection-interaction-highlighting.js +15 -0
- package/map/hooks/use-data-bounding-box.d.ts +1 -0
- package/map/hooks/use-data-bounding-box.js +15 -0
- package/map/hooks/use-hover-interaction.d.ts +1 -0
- package/map/hooks/use-hover-interaction.js +15 -0
- package/map/hooks/use-initial-view-context.d.ts +1 -0
- package/map/hooks/use-initial-view-context.js +15 -0
- package/map/hooks/use-initial-view-state.d.ts +2 -0
- package/map/hooks/use-initial-view-state.js +15 -0
- package/map/hooks/use-layer-coloring-strategy.d.ts +1 -0
- package/map/hooks/use-layer-coloring-strategy.js +15 -0
- package/map/hooks/use-legend-interaction-highlighting.d.ts +5 -0
- package/map/hooks/use-legend-interaction-highlighting.js +15 -0
- package/map/hooks/use-legend-interaction-visibility.d.ts +5 -0
- package/map/hooks/use-legend-interaction-visibility.js +15 -0
- package/map/hooks/use-load-symbol-into-map.d.ts +21 -0
- package/map/hooks/use-load-symbol-into-map.js +15 -0
- package/map/hooks/use-map-config.d.ts +1 -0
- package/map/hooks/use-map-config.js +15 -0
- package/map/hooks/use-map-country-code.d.ts +1 -0
- package/map/hooks/use-map-country-code.js +15 -0
- package/map/hooks/use-map-raw-data.d.ts +1 -0
- package/map/hooks/use-map-raw-data.js +15 -0
- package/map/hooks/use-map-settings.d.ts +5 -0
- package/map/hooks/use-map-settings.js +15 -0
- package/map/hooks/use-map-source.d.ts +1 -0
- package/map/hooks/use-map-source.js +15 -0
- package/map/hooks/use-overlay-events.d.ts +24 -0
- package/map/hooks/use-overlay-events.js +15 -0
- package/map/hooks/use-resolve-color.d.ts +16 -0
- package/map/hooks/use-resolve-color.js +15 -0
- package/map/hooks/use-safe-svg-parser.d.ts +23 -0
- package/map/hooks/use-safe-svg-parser.js +15 -0
- package/map/hooks/use-tooltip-event-listeners.d.ts +16 -0
- package/map/hooks/use-tooltip-event-listeners.js +15 -0
- package/map/hooks/use-tooltip-template.d.ts +11 -0
- package/map/hooks/use-tooltip-template.js +15 -0
- package/map/hooks/useDefaultTooltipActions.d.ts +18 -0
- package/map/hooks/useDefaultTooltipActions.js +15 -0
- package/map/map-styles/default-style.d.ts +17 -0
- package/map/map-styles/default-style.js +15 -0
- package/map/providers/color-scale.provider.d.ts +15 -0
- package/map/providers/color-scale.provider.js +15 -0
- package/map/providers/layer-color-strategy.provider.d.ts +30 -0
- package/map/providers/layer-color-strategy.provider.js +15 -0
- package/map/providers/map-initial-view.provider.d.ts +28 -0
- package/map/providers/map-initial-view.provider.js +15 -0
- package/map/shapes/circle.d.ts +16 -0
- package/map/shapes/circle.js +32 -0
- package/map/shapes/cross.d.ts +16 -0
- package/map/shapes/cross.js +27 -0
- package/map/shapes/diamond.d.ts +16 -0
- package/map/shapes/diamond.js +20 -0
- package/map/shapes/heart.d.ts +16 -0
- package/map/shapes/heart.js +27 -0
- package/map/shapes/pin.d.ts +16 -0
- package/map/shapes/pin.js +21 -0
- package/map/shapes/shape-picker.d.ts +2 -0
- package/map/shapes/shape-picker.js +15 -0
- package/map/shapes/square.d.ts +16 -0
- package/map/shapes/square.js +18 -0
- package/map/shapes/star.d.ts +16 -0
- package/map/shapes/star.js +32 -0
- package/map/shapes/triangle.d.ts +16 -0
- package/map/shapes/triangle.js +27 -0
- package/map/slots/BubbleLayer.d.ts +31 -0
- package/map/slots/BubbleLayer.js +15 -0
- package/map/slots/BubbleLayerTooltip.d.ts +22 -0
- package/map/slots/BubbleLayerTooltip.js +15 -0
- package/map/slots/CategoricalLegend.d.ts +21 -0
- package/map/slots/CategoricalLegend.js +15 -0
- package/map/slots/ChartInteractions.d.ts +31 -0
- package/map/slots/ChartInteractions.js +15 -0
- package/map/slots/ChoroplethLayer.d.ts +31 -0
- package/map/slots/ChoroplethLayer.js +15 -0
- package/map/slots/ChoroplethLayerTooltip.d.ts +20 -0
- package/map/slots/ChoroplethLayerTooltip.js +15 -0
- package/map/slots/ConnectionLayer.d.ts +32 -0
- package/map/slots/ConnectionLayer.js +15 -0
- package/map/slots/ConnectionLayerTooltip.d.ts +21 -0
- package/map/slots/ConnectionLayerTooltip.js +15 -0
- package/map/slots/DotLayer.d.ts +33 -0
- package/map/slots/DotLayer.js +15 -0
- package/map/slots/DotLayerTooltip.d.ts +22 -0
- package/map/slots/DotLayerTooltip.js +15 -0
- package/map/slots/SequentialLegend.d.ts +21 -0
- package/map/slots/SequentialLegend.js +15 -0
- package/map/slots/ThresholdLegend.d.ts +21 -0
- package/map/slots/ThresholdLegend.js +15 -0
- package/map/slots/Tooltip.d.ts +29 -0
- package/map/slots/Tooltip.js +15 -0
- package/map/slots/Zoom.d.ts +22 -0
- package/map/slots/Zoom.js +15 -0
- package/map/slots/ZoomToFit.d.ts +22 -0
- package/map/slots/ZoomToFit.js +15 -0
- package/map/slots/states/DisabledState.d.ts +29 -0
- package/map/slots/states/DisabledState.js +15 -0
- package/map/slots/states/ErrorStateSlot.d.ts +20 -0
- package/map/slots/states/ErrorStateSlot.js +15 -0
- package/map/sources/CN.d.ts +16 -0
- package/map/sources/CN.js +15 -0
- package/map/sources/IL.d.ts +16 -0
- package/map/sources/IL.js +15 -0
- package/map/sources/IN.d.ts +16 -0
- package/map/sources/IN.js +15 -0
- package/map/sources/countries.d.ts +41 -0
- package/map/sources/countries.js +15 -0
- package/map/store/map-store.context.d.ts +20 -0
- package/map/store/map-store.context.js +15 -0
- package/map/store/map-store.provider.d.ts +17 -0
- package/map/store/map-store.provider.js +15 -0
- package/map/store/selectors.d.ts +30 -0
- package/map/store/selectors.js +15 -0
- package/map/store/store.d.ts +7 -0
- package/map/store/store.js +15 -0
- package/map/styles/react-mapgl-styles.css +671 -0
- package/map/types/bubble-layer.d.ts +85 -0
- package/map/types/bubble-layer.js +15 -0
- package/map/types/choropleth-layer.d.ts +40 -0
- package/map/types/choropleth-layer.js +15 -0
- package/map/types/coloring.d.ts +46 -0
- package/map/types/coloring.js +15 -0
- package/map/types/configuration.d.ts +25 -0
- package/map/types/configuration.js +15 -0
- package/map/types/connection-layer.d.ts +77 -0
- package/map/types/connection-layer.js +15 -0
- package/map/types/dot-layer.d.ts +62 -0
- package/map/types/dot-layer.js +15 -0
- package/map/types/legend.d.ts +85 -0
- package/map/types/legend.js +15 -0
- package/map/types/location.d.ts +22 -0
- package/map/types/location.js +15 -0
- package/map/types/map-view.d.ts +97 -0
- package/map/types/map-view.js +15 -0
- package/map/types/shapes.d.ts +18 -0
- package/map/types/shapes.js +15 -0
- package/map/types/state.d.ts +39 -0
- package/map/types/state.js +15 -0
- package/map/types/toolbar.d.ts +47 -0
- package/map/types/toolbar.js +15 -0
- package/map/types/tooltip.d.ts +77 -0
- package/map/types/tooltip.js +15 -0
- package/package.json +59 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
package/README.md
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Strato Geo
|
|
2
|
+
|
|
3
|
+
This package includes some of the React UI components of the Strato Design System.
|
|
4
|
+
|
|
5
|
+

|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
npm install @dynatrace/strato-geo
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Documentation
|
|
14
|
+
|
|
15
|
+
Check out the extensive documentation on the [Dynatrace Developer Documentation](https://developer.dynatrace.com/reference/design-system/)
|
package/esm/index.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2023 Dynatrace LLC
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/import{ChartInteractions as r}from"./map/slots/ChartInteractions.js";import{MapView as t}from"./map/MapView.js";import{ConnectionLayer as s}from"./map/slots/ConnectionLayer.js";import{DotLayer as n}from"./map/slots/DotLayer.js";import{BubbleLayer as i}from"./map/slots/BubbleLayer.js";import{ChoroplethLayer as L}from"./map/slots/ChoroplethLayer.js";import{Tooltip as d,TooltipAtoms as f}from"./map/slots/Tooltip.js";import{SequentialLegend as x}from"./map/slots/SequentialLegend.js";import{ThresholdLegend as c}from"./map/slots/ThresholdLegend.js";import{CategoricalLegend as T}from"./map/slots/CategoricalLegend.js";export{i as BubbleLayer,T as CategoricalLegend,r as ChartInteractions,L as ChoroplethLayer,s as ConnectionLayer,n as DotLayer,t as MapView,x as SequentialLegend,c as ThresholdLegend,d as Tooltip,f as TooltipAtoms};
|
|
16
|
+
//# sourceMappingURL=index.js.map
|
package/esm/index.js.map
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/index.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * @license\n * Copyright 2023 Dynatrace LLC\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport { ChartInteractions } from './map/slots/ChartInteractions.js';\nexport { MapView } from './map/MapView.js';\nexport { ConnectionLayer } from './map/slots/ConnectionLayer.js';\nexport { DotLayer } from './map/slots/DotLayer.js';\nexport { BubbleLayer } from './map/slots/BubbleLayer.js';\nexport { ChoroplethLayer } from './map/slots/ChoroplethLayer.js';\nexport { Tooltip, TooltipAtoms } from './map/slots/Tooltip.js';\n\nexport type {\n MapViewProps,\n MapViewBaseProps,\n MapViewUncontrolledProps,\n MapViewControlledProps,\n DisallowAll,\n ViewState,\n MapViewRef,\n} from './map/types/map-view.js';\n\nexport type {\n Connection,\n ConnectionLayerProps,\n CurvedLine,\n} from './map/types/connection-layer.js';\n\nexport type {\n DotLayerBaseProps,\n DotLayerProps,\n} from './map/types/dot-layer.js';\n\nexport type {\n BubbleLayerBaseProps,\n BubbleLayerProps,\n ScaleNoneProps,\n ScaleRadiusProps,\n} from './map/types/bubble-layer.js';\n\nexport type {\n ChoroplethLayerBaseProps,\n ChoroplethLayerProps,\n} from './map/types/choropleth-layer.js';\n\nexport type { Location } from './map/types/location.js';\nexport type { MapShape } from './map/types/shapes.js';\nexport type { ChartInteractionsProps } from './map/types/toolbar.js';\nexport type { ErrorStateSlotProps } from './map/slots/states/ErrorStateSlot.js';\n\nexport type {\n BaseLegendProps,\n CategoricalLegendProps,\n SequentialLegendProps,\n ThresholdLegendProps,\n} from './map/types/legend.js';\n\nexport type {\n LocationColorProps,\n LegendColorLayerProps,\n ChoroplethCustomColorProps,\n} from './map/types/coloring.js';\n\nexport { SequentialLegend } from './map/slots/SequentialLegend.js';\nexport { ThresholdLegend } from './map/slots/ThresholdLegend.js';\nexport { CategoricalLegend } from './map/slots/CategoricalLegend.js';\n\nexport type {\n BubbleLayerTooltipHandler,\n BubbleLayerTooltipHandlerProps,\n DotLayerTooltipHandler,\n DotLayerTooltipHandlerProps,\n ConnectionLayerTooltipHandler,\n ConnectionLayerTooltipHandlerProps,\n ChoroplethLayerTooltipHandlerProps,\n ChoroplethLayerTooltipHandler,\n ChartTooltip,\n} from './map/types/tooltip.js';\n"],
|
|
5
|
+
"mappings": "AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAgBA,OAAS,qBAAAA,MAAyB,mCAClC,OAAS,WAAAC,MAAe,mBACxB,OAAS,mBAAAC,MAAuB,iCAChC,OAAS,YAAAC,MAAgB,0BACzB,OAAS,eAAAC,MAAmB,6BAC5B,OAAS,mBAAAC,MAAuB,iCAChC,OAAS,WAAAC,EAAS,gBAAAC,MAAoB,yBAqDtC,OAAS,oBAAAC,MAAwB,kCACjC,OAAS,mBAAAC,MAAuB,iCAChC,OAAS,qBAAAC,MAAyB",
|
|
6
|
+
"names": ["ChartInteractions", "MapView", "ConnectionLayer", "DotLayer", "BubbleLayer", "ChoroplethLayer", "Tooltip", "TooltipAtoms", "SequentialLegend", "ThresholdLegend", "CategoricalLegend"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2023 Dynatrace LLC
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/import e,{forwardRef as x,useImperativeHandle as w,useRef as E}from"react";import{_ChartLayout as a,_coerceSizeValue as V}from"@dynatrace/strato-components-preview/charts";import{useMergeRefs as _}from"@dynatrace/strato-components-preview/core";import{MapLegendRenderer as B}from"./components/legend/MapLegendRenderer.js";import{MapContent as I}from"./components/MapContent.js";import{DEFAULT_LEGEND_SIZES as T,DEFAULT_MAP_HEIGHT as A,DEFAULT_MAP_LEGEND_RATIO as H}from"./constants.js";import{LayerIdsContext as N}from"./contexts/layer-ids.context.js";import{MapConfigurationContext as G}from"./contexts/map-configuration.context.js";import{MapCountryCodeContext as b}from"./contexts/map-country-code.context.js";import{MapDataBoundingBoxContext as z}from"./contexts/map-data-bounding-box.context.js";import{MapRawDataContext as F}from"./contexts/map-raw-data.context.js";import{buildAndDownloadCsv as U}from"./functions/build-and-download-csv.js";import{extractLayersData as O}from"./functions/extract-layers-data.js";import{getDataLayersBoundingBox as W}from"./functions/get-data-layers-bounding-box.js";import{getMapStatesTemplates as j}from"./functions/get-map-states-template.js";import{iterateConfigSlots as q}from"./functions/iterate-config-slots.js";import{setLayersId as Z}from"./functions/set-layers-id.js";import{useMapSettings as k}from"./hooks/use-map-settings.js";import{ColorScaleProvider as J}from"./providers/color-scale.provider.js";import{LayerColorStrategyProvider as K}from"./providers/layer-color-strategy.provider.js";import{DisabledState as Q}from"./slots/states/DisabledState.js";import{ErrorStateSlot as X}from"./slots/states/ErrorStateSlot.js";import{MapStoreProvider as Y}from"./store/map-store.provider.js";import"./styles/react-mapgl-styles.css";const l=x((i,n)=>{const{children:r,loading:f=!1,style:g,className:C,...u}=i,{layerIds:M,parsedChildren:s}=Z(r),d=O(s),v=W(r),m=E(null),h=_([n,m]);w(n,()=>({element:m.current,downloadData:()=>{U(d)}}));const o=q(r),y=!o.legend||o.legend.hidden,{errorState:L}=j(r),{isLoading:t,isMapEnabled:c,countryCode:P}=k(),S={orientation:o?.legend?.position,sizes:T,ratio:o?.legend?.type==="sequential"||o?.legend?.type==="threshold"?H:void 0},p=V(i.height)||A,D={width:"100%",...g};return e.createElement("div",{style:D,className:C,"data-testid":"mapview-container"},!t&&!c?e.createElement(Q,{height:p}):e.createElement(b.Provider,{value:P},e.createElement(G.Provider,{value:o},e.createElement(N.Provider,{value:M},e.createElement(F.Provider,{value:d},e.createElement(z.Provider,{value:v},e.createElement(Y,null,e.createElement(J,null,e.createElement(K,null,e.createElement(a,{chartHeight:p,legendConfig:S,errorState:L,showLoader:f||t},e.createElement(a.Graph,null,!t&&e.createElement(I,{ref:h,...u},s)),e.createElement(a.Legend,null,y?null:e.createElement(B,null))))))))))))});l.displayName="MapView";const we=Object.assign(l,{ErrorState:X});export{we as MapView};
|
|
16
|
+
//# sourceMappingURL=MapView.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/map/MapView.tsx"],
|
|
4
|
+
"sourcesContent": ["/**\n * @license\n * Copyright 2023 Dynatrace LLC\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, {\n forwardRef,\n PropsWithChildren,\n useImperativeHandle,\n useRef,\n} from 'react';\n\nimport {\n _ChartLayout as ChartLayout,\n _coerceSizeValue as coerceSizeValue,\n} from '@dynatrace/strato-components-preview/charts';\nimport { useMergeRefs } from '@dynatrace/strato-components-preview/core';\n\nimport { MapLegendRenderer } from './components/legend/MapLegendRenderer.js';\nimport { MapContent } from './components/MapContent.js';\nimport {\n DEFAULT_LEGEND_SIZES,\n DEFAULT_MAP_HEIGHT,\n DEFAULT_MAP_LEGEND_RATIO,\n} from './constants.js';\nimport { LayerIdsContext } from './contexts/layer-ids.context.js';\nimport { MapConfigurationContext } from './contexts/map-configuration.context.js';\nimport { MapCountryCodeContext } from './contexts/map-country-code.context.js';\nimport { MapDataBoundingBoxContext } from './contexts/map-data-bounding-box.context.js';\nimport { MapRawDataContext } from './contexts/map-raw-data.context.js';\nimport { buildAndDownloadCsv } from './functions/build-and-download-csv.js';\nimport { extractLayersData } from './functions/extract-layers-data.js';\nimport { getDataLayersBoundingBox } from './functions/get-data-layers-bounding-box.js';\nimport { getMapStatesTemplates } from './functions/get-map-states-template.js';\nimport { iterateConfigSlots } from './functions/iterate-config-slots.js';\nimport { setLayersId } from './functions/set-layers-id.js';\nimport { useMapSettings } from './hooks/use-map-settings.js';\nimport { ColorScaleProvider } from './providers/color-scale.provider.js';\nimport { LayerColorStrategyProvider } from './providers/layer-color-strategy.provider.js';\nimport { DisabledState } from './slots/states/DisabledState.js';\nimport { ErrorStateSlot } from './slots/states/ErrorStateSlot.js';\nimport { MapStoreProvider } from './store/map-store.provider.js';\n// eslint-disable-next-line no-restricted-imports\nimport './styles/react-mapgl-styles.css';\nimport { MapViewProps, MapViewRef } from './types/map-view.js';\n\n/**\n * MapView Component\n */\nconst _MapView = forwardRef<MapViewRef, PropsWithChildren<MapViewProps>>(\n (props, forwardedRef) => {\n const {\n children,\n loading = false,\n style: costumerStyle,\n className: customerClassNames,\n ...remaining\n } = props;\n const { layerIds, parsedChildren } = setLayersId(children);\n\n const layersData = extractLayersData(parsedChildren);\n const dataLayersBBox = getDataLayersBoundingBox(children);\n\n const containerRef = useRef<HTMLDivElement>(null);\n const rootRef = useMergeRefs<MapViewRef | HTMLDivElement>([\n forwardedRef,\n containerRef,\n ]);\n\n useImperativeHandle(forwardedRef, () => ({\n element: containerRef.current,\n downloadData: () => {\n buildAndDownloadCsv(layersData);\n },\n }));\n\n const config = iterateConfigSlots(children);\n\n const hideLegend = !config.legend || config.legend.hidden;\n\n const { errorState } = getMapStatesTemplates(children);\n\n const {\n isLoading: isLoadingSettings,\n isMapEnabled,\n countryCode,\n } = useMapSettings();\n\n const legendConfig = {\n orientation: config?.legend?.position,\n sizes: DEFAULT_LEGEND_SIZES,\n ratio:\n config?.legend?.type === 'sequential' ||\n config?.legend?.type === 'threshold'\n ? DEFAULT_MAP_LEGEND_RATIO\n : undefined,\n };\n\n const chartHeight = coerceSizeValue(props.height) || DEFAULT_MAP_HEIGHT;\n\n const containerStyles = { width: '100%', ...costumerStyle };\n\n return (\n <div\n style={containerStyles}\n className={customerClassNames}\n data-testid=\"mapview-container\"\n >\n {!isLoadingSettings && !isMapEnabled ? (\n <DisabledState height={chartHeight} />\n ) : (\n <MapCountryCodeContext.Provider value={countryCode}>\n <MapConfigurationContext.Provider value={config}>\n <LayerIdsContext.Provider value={layerIds}>\n <MapRawDataContext.Provider value={layersData}>\n <MapDataBoundingBoxContext.Provider value={dataLayersBBox}>\n <MapStoreProvider>\n <ColorScaleProvider>\n <LayerColorStrategyProvider>\n <ChartLayout\n chartHeight={chartHeight}\n legendConfig={legendConfig}\n errorState={errorState}\n showLoader={loading || isLoadingSettings}\n >\n <ChartLayout.Graph>\n {!isLoadingSettings && (\n <MapContent ref={rootRef} {...remaining}>\n {parsedChildren}\n </MapContent>\n )}\n </ChartLayout.Graph>\n <ChartLayout.Legend>\n {!hideLegend ? <MapLegendRenderer /> : null}\n </ChartLayout.Legend>\n </ChartLayout>\n </LayerColorStrategyProvider>\n </ColorScaleProvider>\n </MapStoreProvider>\n </MapDataBoundingBoxContext.Provider>\n </MapRawDataContext.Provider>\n </LayerIdsContext.Provider>\n </MapConfigurationContext.Provider>\n </MapCountryCodeContext.Provider>\n )}\n </div>\n );\n },\n);\n\n_MapView['displayName'] = 'MapView';\n\n/**\n * The `MapView` is a component that renders a map with various geospatial data layers.\n * @beta\n */\nexport const MapView = Object.assign(_MapView, {\n ErrorState: ErrorStateSlot,\n});\n"],
|
|
5
|
+
"mappings": "AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAgBA,OAAOA,GACL,cAAAC,EAEA,uBAAAC,EACA,UAAAC,MACK,QAEP,OACE,gBAAgBC,EAChB,oBAAoBC,MACf,8CACP,OAAS,gBAAAC,MAAoB,4CAE7B,OAAS,qBAAAC,MAAyB,2CAClC,OAAS,cAAAC,MAAkB,6BAC3B,OACE,wBAAAC,EACA,sBAAAC,EACA,4BAAAC,MACK,iBACP,OAAS,mBAAAC,MAAuB,kCAChC,OAAS,2BAAAC,MAA+B,0CACxC,OAAS,yBAAAC,MAA6B,yCACtC,OAAS,6BAAAC,MAAiC,8CAC1C,OAAS,qBAAAC,MAAyB,qCAClC,OAAS,uBAAAC,MAA2B,wCACpC,OAAS,qBAAAC,MAAyB,qCAClC,OAAS,4BAAAC,MAAgC,8CACzC,OAAS,yBAAAC,MAA6B,yCACtC,OAAS,sBAAAC,MAA0B,sCACnC,OAAS,eAAAC,MAAmB,+BAC5B,OAAS,kBAAAC,MAAsB,8BAC/B,OAAS,sBAAAC,MAA0B,sCACnC,OAAS,8BAAAC,MAAkC,+CAC3C,OAAS,iBAAAC,MAAqB,kCAC9B,OAAS,kBAAAC,MAAsB,mCAC/B,OAAS,oBAAAC,MAAwB,gCAEjC,MAAO,kCAMP,MAAMC,EAAW5B,EACf,CAAC6B,EAAOC,IAAiB,CACvB,KAAM,CACJ,SAAAC,EACA,QAAAC,EAAU,GACV,MAAOC,EACP,UAAWC,EACX,GAAGC,CACL,EAAIN,EACE,CAAE,SAAAO,EAAU,eAAAC,CAAe,EAAIhB,EAAYU,CAAQ,EAEnDO,EAAarB,EAAkBoB,CAAc,EAC7CE,EAAiBrB,EAAyBa,CAAQ,EAElDS,EAAetC,EAAuB,IAAI,EAC1CuC,EAAUpC,EAA0C,CACxDyB,EACAU,CACF,CAAC,EAEDvC,EAAoB6B,EAAc,KAAO,CACvC,QAASU,EAAa,QACtB,aAAc,IAAM,CAClBxB,EAAoBsB,CAAU,CAChC,CACF,EAAE,EAEF,MAAMI,EAAStB,EAAmBW,CAAQ,EAEpCY,EAAa,CAACD,EAAO,QAAUA,EAAO,OAAO,OAE7C,CAAE,WAAAE,CAAW,EAAIzB,EAAsBY,CAAQ,EAE/C,CACJ,UAAWc,EACX,aAAAC,EACA,YAAAC,CACF,EAAIzB,EAAe,EAEb0B,EAAe,CACnB,YAAaN,GAAQ,QAAQ,SAC7B,MAAOlC,EACP,MACEkC,GAAQ,QAAQ,OAAS,cACzBA,GAAQ,QAAQ,OAAS,YACrBhC,EACA,MACR,EAEMuC,EAAc7C,EAAgByB,EAAM,MAAM,GAAKpB,EAE/CyC,EAAkB,CAAE,MAAO,OAAQ,GAAGjB,CAAc,EAE1D,OACElC,EAAA,cAAC,OACC,MAAOmD,EACP,UAAWhB,EACX,cAAY,qBAEX,CAACW,GAAqB,CAACC,EACtB/C,EAAA,cAAC0B,EAAA,CAAc,OAAQwB,EAAa,EAEpClD,EAAA,cAACc,EAAsB,SAAtB,CAA+B,MAAOkC,GACrChD,EAAA,cAACa,EAAwB,SAAxB,CAAiC,MAAO8B,GACvC3C,EAAA,cAACY,EAAgB,SAAhB,CAAyB,MAAOyB,GAC/BrC,EAAA,cAACgB,EAAkB,SAAlB,CAA2B,MAAOuB,GACjCvC,EAAA,cAACe,EAA0B,SAA1B,CAAmC,MAAOyB,GACzCxC,EAAA,cAAC4B,EAAA,KACC5B,EAAA,cAACwB,EAAA,KACCxB,EAAA,cAACyB,EAAA,KACCzB,EAAA,cAACI,EAAA,CACC,YAAa8C,EACb,aAAcD,EACd,WAAYJ,EACZ,WAAYZ,GAAWa,GAEvB9C,EAAA,cAACI,EAAY,MAAZ,KACE,CAAC0C,GACA9C,EAAA,cAACQ,EAAA,CAAW,IAAKkC,EAAU,GAAGN,GAC3BE,CACH,CAEJ,EACAtC,EAAA,cAACI,EAAY,OAAZ,KACGwC,EAAqC,KAAxB5C,EAAA,cAACO,EAAA,IAAkB,CACpC,CACF,CACF,CACF,CACF,CACF,CACF,CACF,CACF,CACF,CAEJ,CAEJ,CACF,EAEAsB,EAAS,YAAiB,UAMnB,MAAMuB,GAAU,OAAO,OAAOvB,EAAU,CAC7C,WAAYF,CACd,CAAC",
|
|
6
|
+
"names": ["React", "forwardRef", "useImperativeHandle", "useRef", "ChartLayout", "coerceSizeValue", "useMergeRefs", "MapLegendRenderer", "MapContent", "DEFAULT_LEGEND_SIZES", "DEFAULT_MAP_HEIGHT", "DEFAULT_MAP_LEGEND_RATIO", "LayerIdsContext", "MapConfigurationContext", "MapCountryCodeContext", "MapDataBoundingBoxContext", "MapRawDataContext", "buildAndDownloadCsv", "extractLayersData", "getDataLayersBoundingBox", "getMapStatesTemplates", "iterateConfigSlots", "setLayersId", "useMapSettings", "ColorScaleProvider", "LayerColorStrategyProvider", "DisabledState", "ErrorStateSlot", "MapStoreProvider", "_MapView", "props", "forwardedRef", "children", "loading", "costumerStyle", "customerClassNames", "remaining", "layerIds", "parsedChildren", "layersData", "dataLayersBBox", "containerRef", "rootRef", "config", "hideLegend", "errorState", "isLoadingSettings", "isMapEnabled", "countryCode", "legendConfig", "chartHeight", "containerStyles", "MapView"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2023 Dynatrace LLC
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/import i from"react";import{Layer as c}from"react-map-gl/maplibre";import{buildCircleStickToDistanceExpression as s}from"./functions/build-stick-to-distance-expressions.js";import{useSizeInterpolation as a}from"./hooks/use-size-interpolation.js";import{BUBBLE_DEFAULT_OPACITY as l,BUBBLE_STROKE as n,DEFAULT_RADIUS_EXPRESSION as _,LEGEND_DIM_OPACITY as e,SHAPE_OPACITY as p}from"../../constants.js";const g=({id:o,source:r})=>{const t=a()==="fixed"?_:s();return i.createElement(c,{type:"circle",id:o,source:r,paint:{"circle-color":["case",["boolean",["feature-state","hover"],!1],["get","__hoveredColor"],["get","__color"]],"circle-radius":t,"circle-opacity":["case",["boolean",["feature-state","legendHover"],!0],l,e],"circle-stroke-width":n,"circle-stroke-color":["case",["boolean",["feature-state","hover"],!1],["get","__hoveredColor"],["get","__color"]],"circle-stroke-opacity":["case",["boolean",["feature-state","legendHover"],!0],p,e]}})};export{g as BubbleCircleLayer};
|
|
16
|
+
//# sourceMappingURL=BubbleCircleLayer.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../src/map/components/BubbleLayer/BubbleCircleLayer.tsx"],
|
|
4
|
+
"sourcesContent": ["/**\n * @license\n * Copyright 2023 Dynatrace LLC\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport React from 'react';\nimport { Layer } from 'react-map-gl/maplibre';\n\nimport { buildCircleStickToDistanceExpression } from './functions/build-stick-to-distance-expressions.js';\nimport { useSizeInterpolation } from './hooks/use-size-interpolation.js';\nimport {\n BUBBLE_DEFAULT_OPACITY,\n BUBBLE_STROKE,\n DEFAULT_RADIUS_EXPRESSION,\n LEGEND_DIM_OPACITY,\n SHAPE_OPACITY,\n} from '../../constants.js';\n\nexport const BubbleCircleLayer = ({\n id,\n source,\n}: {\n id: string;\n source: string;\n}) => {\n const sizeInterpolation = useSizeInterpolation();\n\n const radiusExpression =\n sizeInterpolation === 'fixed'\n ? DEFAULT_RADIUS_EXPRESSION\n : buildCircleStickToDistanceExpression();\n\n return (\n <Layer\n type=\"circle\"\n id={id}\n source={source}\n paint={{\n 'circle-color': [\n 'case',\n ['boolean', ['feature-state', 'hover'], false],\n ['get', '__hoveredColor'],\n ['get', '__color'],\n ],\n 'circle-radius': radiusExpression,\n 'circle-opacity': [\n 'case',\n ['boolean', ['feature-state', 'legendHover'], true],\n BUBBLE_DEFAULT_OPACITY,\n LEGEND_DIM_OPACITY,\n ],\n 'circle-stroke-width': BUBBLE_STROKE,\n 'circle-stroke-color': [\n 'case',\n ['boolean', ['feature-state', 'hover'], false],\n ['get', '__hoveredColor'],\n ['get', '__color'],\n ],\n 'circle-stroke-opacity': [\n 'case',\n ['boolean', ['feature-state', 'legendHover'], true],\n SHAPE_OPACITY,\n LEGEND_DIM_OPACITY,\n ],\n }}\n />\n );\n};\n"],
|
|
5
|
+
"mappings": "AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAeA,OAAOA,MAAW,QAClB,OAAS,SAAAC,MAAa,wBAEtB,OAAS,wCAAAC,MAA4C,qDACrD,OAAS,wBAAAC,MAA4B,oCACrC,OACE,0BAAAC,EACA,iBAAAC,EACA,6BAAAC,EACA,sBAAAC,EACA,iBAAAC,MACK,qBAEA,MAAMC,EAAoB,CAAC,CAChC,GAAAC,EACA,OAAAC,CACF,IAGM,CAGJ,MAAMC,EAFoBT,EAAqB,IAGvB,QAClBG,EACAJ,EAAqC,EAE3C,OACEF,EAAA,cAACC,EAAA,CACC,KAAK,SACL,GAAIS,EACJ,OAAQC,EACR,MAAO,CACL,eAAgB,CACd,OACA,CAAC,UAAW,CAAC,gBAAiB,OAAO,EAAG,EAAK,EAC7C,CAAC,MAAO,gBAAgB,EACxB,CAAC,MAAO,SAAS,CACnB,EACA,gBAAiBC,EACjB,iBAAkB,CAChB,OACA,CAAC,UAAW,CAAC,gBAAiB,aAAa,EAAG,EAAI,EAClDR,EACAG,CACF,EACA,sBAAuBF,EACvB,sBAAuB,CACrB,OACA,CAAC,UAAW,CAAC,gBAAiB,OAAO,EAAG,EAAK,EAC7C,CAAC,MAAO,gBAAgB,EACxB,CAAC,MAAO,SAAS,CACnB,EACA,wBAAyB,CACvB,OACA,CAAC,UAAW,CAAC,gBAAiB,aAAa,EAAG,EAAI,EAClDG,EACAD,CACF,CACF,EACF,CAEJ",
|
|
6
|
+
"names": ["React", "Layer", "buildCircleStickToDistanceExpression", "useSizeInterpolation", "BUBBLE_DEFAULT_OPACITY", "BUBBLE_STROKE", "DEFAULT_RADIUS_EXPRESSION", "LEGEND_DIM_OPACITY", "SHAPE_OPACITY", "BubbleCircleLayer", "id", "source", "radiusExpression"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2023 Dynatrace LLC
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/import o from"react";import{Source as L}from"react-map-gl/maplibre";import{BubbleCircleLayer as y}from"./BubbleCircleLayer.js";import{BubbleLayerTooltip as B}from"./BubbleLayerTooltip.js";import{BubbleOutlineLayer as T}from"./BubbleOutlineLayer.js";import{SizeInterpolationContext as I}from"./contexts/size-interpolation.context.js";import{buildRadiusScale as S}from"./functions/build-radius-scale.js";import{parseBubbleDataToGeoJSON as g}from"./functions/parse-bubble-data-to-geo-json.js";import{DEFAULT_BUBBLE_COLOR as C,DEFAULT_RADIUS as h}from"../../constants.js";import{isBubbleTooltipTemplate as P}from"../../functions/tooltip-type-guards.js";import{useLayerColoringStrategy as x}from"../../hooks/use-layer-coloring-strategy.js";import{useLegendInteractionHighlighting as v}from"../../hooks/use-legend-interaction-highlighting.js";import{useLegendInteractionVisibility as D}from"../../hooks/use-legend-interaction-visibility.js";import{useResolveColor as O}from"../../hooks/use-resolve-color.js";import{useTooltipTemplate as U}from"../../hooks/use-tooltip-template.js";import{BubbleLayerTooltip as z}from"../../slots/BubbleLayerTooltip.js";import{isScaleRadius as A}from"../../types/bubble-layer.js";const E=e=>{const{data:l,layerId:r,radius:m=h,children:s,sizeInterpolation:u="fixed"}=e,p=x(),b=O(C,e,p),t=`source-${r}`;v(e,t),D(e,r);let a=i=>i;if(A(e)){const{radiusRange:i=[10,100],radius:f,scale:c="linear"}=e;a=S(l,f,c,i)}const d=g(l,b,m,a),n=U(s,z);return o.createElement(o.Fragment,null,o.createElement(I.Provider,{value:u},o.createElement(L,{id:t,type:"geojson",data:d,generateId:!0},o.createElement(y,{id:r,source:t}),o.createElement(T,{beforeId:r,source:t}))),o.createElement(B,{layerId:r,tooltipTemplate:P(n)?n:void 0}))};E.displayName="BubbleLayer";export{E as BubbleLayer};
|
|
16
|
+
//# sourceMappingURL=BubbleLayer.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../src/map/components/BubbleLayer/BubbleLayer.tsx"],
|
|
4
|
+
"sourcesContent": ["/**\n * @license\n * Copyright 2023 Dynatrace LLC\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { PropsWithChildren } from 'react';\nimport { Source } from 'react-map-gl/maplibre';\n\nimport { BubbleCircleLayer } from './BubbleCircleLayer.js';\nimport { BubbleLayerTooltip } from './BubbleLayerTooltip.js';\nimport { BubbleOutlineLayer } from './BubbleOutlineLayer.js';\nimport { SizeInterpolationContext } from './contexts/size-interpolation.context.js';\nimport { buildRadiusScale } from './functions/build-radius-scale.js';\nimport { parseBubbleDataToGeoJSON } from './functions/parse-bubble-data-to-geo-json.js';\nimport { DEFAULT_BUBBLE_COLOR, DEFAULT_RADIUS } from '../../constants.js';\nimport { isBubbleTooltipTemplate } from '../../functions/tooltip-type-guards.js';\nimport { useLayerColoringStrategy } from '../../hooks/use-layer-coloring-strategy.js';\nimport { useLegendInteractionHighlighting } from '../../hooks/use-legend-interaction-highlighting.js';\nimport { useLegendInteractionVisibility } from '../../hooks/use-legend-interaction-visibility.js';\nimport { useResolveColor } from '../../hooks/use-resolve-color.js';\nimport { useTooltipTemplate } from '../../hooks/use-tooltip-template.js';\nimport { BubbleLayerTooltip as BubbleLayerTooltipSlot } from '../../slots/BubbleLayerTooltip.js';\nimport {\n InternalBubbleLayerProps,\n isScaleRadius,\n} from '../../types/bubble-layer.js';\nimport { Location } from '../../types/location.js';\n\nexport const BubbleLayer = <T extends Location>(\n props: PropsWithChildren<InternalBubbleLayerProps<T>>,\n) => {\n const {\n data,\n layerId,\n radius = DEFAULT_RADIUS,\n children,\n sizeInterpolation = 'fixed',\n } = props;\n\n const colorParser = useLayerColoringStrategy();\n const bubbleColor = useResolveColor(DEFAULT_BUBBLE_COLOR, props, colorParser);\n\n const sourceId = `source-${layerId}`;\n useLegendInteractionHighlighting(props, sourceId);\n useLegendInteractionVisibility(props, layerId);\n\n let radiusScale = (value: number) => value;\n\n if (isScaleRadius(props)) {\n const { radiusRange = [10, 100], radius, scale = 'linear' } = props;\n\n radiusScale = buildRadiusScale(data, radius, scale, radiusRange);\n }\n\n const dataGeoJson = parseBubbleDataToGeoJSON(\n data,\n bubbleColor,\n radius,\n radiusScale,\n );\n\n const tooltipTemplate = useTooltipTemplate(children, BubbleLayerTooltipSlot);\n\n return (\n <>\n <SizeInterpolationContext.Provider value={sizeInterpolation}>\n <Source id={sourceId} type=\"geojson\" data={dataGeoJson} generateId>\n <BubbleCircleLayer id={layerId} source={sourceId} />\n <BubbleOutlineLayer beforeId={layerId} source={sourceId} />\n </Source>\n </SizeInterpolationContext.Provider>\n\n <BubbleLayerTooltip\n layerId={layerId}\n tooltipTemplate={\n isBubbleTooltipTemplate(tooltipTemplate) ? tooltipTemplate : undefined\n }\n />\n </>\n );\n};\n\nBubbleLayer['displayName'] = 'BubbleLayer';\n"],
|
|
5
|
+
"mappings": "AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAgBA,OAAOA,MAAkC,QACzC,OAAS,UAAAC,MAAc,wBAEvB,OAAS,qBAAAC,MAAyB,yBAClC,OAAS,sBAAAC,MAA0B,0BACnC,OAAS,sBAAAC,MAA0B,0BACnC,OAAS,4BAAAC,MAAgC,2CACzC,OAAS,oBAAAC,MAAwB,oCACjC,OAAS,4BAAAC,MAAgC,+CACzC,OAAS,wBAAAC,EAAsB,kBAAAC,MAAsB,qBACrD,OAAS,2BAAAC,MAA+B,yCACxC,OAAS,4BAAAC,MAAgC,6CACzC,OAAS,oCAAAC,MAAwC,qDACjD,OAAS,kCAAAC,MAAsC,mDAC/C,OAAS,mBAAAC,MAAuB,mCAChC,OAAS,sBAAAC,MAA0B,sCACnC,OAAS,sBAAsBC,MAA8B,oCAC7D,OAEE,iBAAAC,MACK,8BAGA,MAAMC,EACXC,GACG,CACH,KAAM,CACJ,KAAAC,EACA,QAAAC,EACA,OAAAC,EAASb,EACT,SAAAc,EACA,kBAAAC,EAAoB,OACtB,EAAIL,EAEEM,EAAcd,EAAyB,EACvCe,EAAcZ,EAAgBN,EAAsBW,EAAOM,CAAW,EAEtEE,EAAW,UAAUN,CAAO,GAClCT,EAAiCO,EAAOQ,CAAQ,EAChDd,EAA+BM,EAAOE,CAAO,EAE7C,IAAIO,EAAeC,GAAkBA,EAErC,GAAIZ,EAAcE,CAAK,EAAG,CACxB,KAAM,CAAE,YAAAW,EAAc,CAAC,GAAI,GAAG,EAAG,OAAAR,EAAQ,MAAAS,EAAQ,QAAS,EAAIZ,EAE9DS,EAActB,EAAiBc,EAAME,EAAQS,EAAOD,CAAW,CACjE,CAEA,MAAME,EAAczB,EAClBa,EACAM,EACAJ,EACAM,CACF,EAEMK,EAAkBlB,EAAmBQ,EAAUP,CAAsB,EAE3E,OACEhB,EAAA,cAAAA,EAAA,cACEA,EAAA,cAACK,EAAyB,SAAzB,CAAkC,MAAOmB,GACxCxB,EAAA,cAACC,EAAA,CAAO,GAAI0B,EAAU,KAAK,UAAU,KAAMK,EAAa,WAAU,IAChEhC,EAAA,cAACE,EAAA,CAAkB,GAAImB,EAAS,OAAQM,EAAU,EAClD3B,EAAA,cAACI,EAAA,CAAmB,SAAUiB,EAAS,OAAQM,EAAU,CAC3D,CACF,EAEA3B,EAAA,cAACG,EAAA,CACC,QAASkB,EACT,gBACEX,EAAwBuB,CAAe,EAAIA,EAAkB,OAEjE,CACF,CAEJ,EAEAf,EAAY,YAAiB",
|
|
6
|
+
"names": ["React", "Source", "BubbleCircleLayer", "BubbleLayerTooltip", "BubbleOutlineLayer", "SizeInterpolationContext", "buildRadiusScale", "parseBubbleDataToGeoJSON", "DEFAULT_BUBBLE_COLOR", "DEFAULT_RADIUS", "isBubbleTooltipTemplate", "useLayerColoringStrategy", "useLegendInteractionHighlighting", "useLegendInteractionVisibility", "useResolveColor", "useTooltipTemplate", "BubbleLayerTooltipSlot", "isScaleRadius", "BubbleLayer", "props", "data", "layerId", "radius", "children", "sizeInterpolation", "colorParser", "bubbleColor", "sourceId", "radiusScale", "value", "radiusRange", "scale", "dataGeoJson", "tooltipTemplate"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2023 Dynatrace LLC
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/import L,{useRef as t}from"react";import{_ChartTooltip as y,_useChartActionsMenu as I}from"@dynatrace/strato-components-preview/charts";import{useMapTooltipPinnedState as M,useMapTooltipState as h}from"../../store/selectors.js";const B=a=>{const{layerId:s,tooltipTemplate:i}=a,{selectedItem:p,actionsMenuRef:c,updateSelectedItem:u,onLeave:T}=I(),d=t(null),{hoveredLayerId:m,data:e,position:n,visible:b,enabled:f}=h(),o=M(),r=t({}),l=t([]);return!i||!o&&(m!==s||!b||!f)||!n?null:(!o&&e?.[0]&&(r.current=e[0],l.current=e.slice(1)),L.createElement(y,{position:n,pinned:o,ref:d,onMouseLeave:T,actionSelectionValue:{selectedItemId:p,actionsMenuRef:c,updateSelectedItem:u}},i(r.current,l.current)))};B.displayName="BubbleLayerTooltip";export{B as BubbleLayerTooltip};
|
|
16
|
+
//# sourceMappingURL=BubbleLayerTooltip.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../src/map/components/BubbleLayer/BubbleLayerTooltip.tsx"],
|
|
4
|
+
"sourcesContent": ["/**\n * @license\n * Copyright 2023 Dynatrace LLC\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { useRef } from 'react';\n\nimport {\n _ChartTooltip as ChartTooltip,\n _useChartActionsMenu as useChartActionsMenu,\n} from '@dynatrace/strato-components-preview/charts';\n\nimport {\n useMapTooltipPinnedState,\n useMapTooltipState,\n} from '../../store/selectors.js';\nimport { Location } from '../../types/location.js';\nimport { BubbleLayerTooltipHandler } from '../../types/tooltip.js';\n\nexport interface BubbleLayerTooltipProps<T extends Location> {\n layerId: string;\n tooltipTemplate?: BubbleLayerTooltipHandler<T>;\n}\n\nexport const BubbleLayerTooltip = <T extends Location>(\n props: BubbleLayerTooltipProps<T>,\n) => {\n const { layerId, tooltipTemplate } = props;\n const {\n selectedItem: selectedItemId,\n actionsMenuRef,\n updateSelectedItem,\n onLeave,\n } = useChartActionsMenu();\n\n const tooltipRef = useRef<HTMLDivElement | null>(null);\n const { hoveredLayerId, data, position, visible, enabled } =\n useMapTooltipState<T>();\n const pinned = useMapTooltipPinnedState();\n\n const closestPoint = useRef<T>({} as T);\n const remainingPoints = useRef<T[]>([]);\n\n const forceHideTooltip =\n !pinned && (hoveredLayerId !== layerId || !visible || !enabled);\n\n if (!tooltipTemplate || forceHideTooltip || !position) {\n return null;\n }\n\n if (!pinned && data?.[0]) {\n closestPoint.current = data[0];\n remainingPoints.current = data.slice(1);\n }\n\n return (\n <ChartTooltip\n position={position}\n pinned={pinned}\n ref={tooltipRef}\n onMouseLeave={onLeave}\n actionSelectionValue={{\n selectedItemId,\n actionsMenuRef,\n updateSelectedItem,\n }}\n >\n {tooltipTemplate(closestPoint.current, remainingPoints.current)}\n </ChartTooltip>\n );\n};\n\nBubbleLayerTooltip['displayName'] = 'BubbleLayerTooltip';\n"],
|
|
5
|
+
"mappings": "AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAgBA,OAAOA,GAAS,UAAAC,MAAc,QAE9B,OACE,iBAAiBC,EACjB,wBAAwBC,MACnB,8CAEP,OACE,4BAAAC,EACA,sBAAAC,MACK,2BASA,MAAMC,EACXC,GACG,CACH,KAAM,CAAE,QAAAC,EAAS,gBAAAC,CAAgB,EAAIF,EAC/B,CACJ,aAAcG,EACd,eAAAC,EACA,mBAAAC,EACA,QAAAC,CACF,EAAIV,EAAoB,EAElBW,EAAab,EAA8B,IAAI,EAC/C,CAAE,eAAAc,EAAgB,KAAAC,EAAM,SAAAC,EAAU,QAAAC,EAAS,QAAAC,CAAQ,EACvDd,EAAsB,EAClBe,EAAShB,EAAyB,EAElCiB,EAAepB,EAAU,CAAC,CAAM,EAChCqB,EAAkBrB,EAAY,CAAC,CAAC,EAKtC,MAAI,CAACQ,GAFH,CAACW,IAAWL,IAAmBP,GAAW,CAACU,GAAW,CAACC,IAEb,CAACF,EACpC,MAGL,CAACG,GAAUJ,IAAO,CAAC,IACrBK,EAAa,QAAUL,EAAK,CAAC,EAC7BM,EAAgB,QAAUN,EAAK,MAAM,CAAC,GAItChB,EAAA,cAACE,EAAA,CACC,SAAUe,EACV,OAAQG,EACR,IAAKN,EACL,aAAcD,EACd,qBAAsB,CACpB,eAAAH,EACA,eAAAC,EACA,mBAAAC,CACF,GAECH,EAAgBY,EAAa,QAASC,EAAgB,OAAO,CAChE,EAEJ,EAEAhB,EAAmB,YAAiB",
|
|
6
|
+
"names": ["React", "useRef", "ChartTooltip", "useChartActionsMenu", "useMapTooltipPinnedState", "useMapTooltipState", "BubbleLayerTooltip", "props", "layerId", "tooltipTemplate", "selectedItemId", "actionsMenuRef", "updateSelectedItem", "onLeave", "tooltipRef", "hoveredLayerId", "data", "position", "visible", "enabled", "pinned", "closestPoint", "remainingPoints"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2023 Dynatrace LLC
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/import r from"react";import{Layer as t}from"react-map-gl/maplibre";import{_getCanvasColor as s}from"@dynatrace/strato-components-preview/charts";import{addOutlineSize as c}from"./functions/add-outline-size.js";import{buildOutlineStickToDistanceExpression as n}from"./functions/build-stick-to-distance-expressions.js";import{useSizeInterpolation as a}from"./hooks/use-size-interpolation.js";import{ACTIVE_COLOR as p,BUBBLE_OUTLINE_STROKE as l,DEFAULT_RADIUS_EXPRESSION as m}from"../../constants.js";const f=c(m),U=({beforeId:o,source:e})=>{const i=a()==="fixed"?f:n();return r.createElement(t,{type:"circle",beforeId:o,source:e,paint:{"circle-radius":i,"circle-opacity":0,"circle-stroke-width":l,"circle-stroke-color":s(p),"circle-stroke-opacity":["case",["boolean",["feature-state","active"],!1],1,0]}})};export{U as BubbleOutlineLayer};
|
|
16
|
+
//# sourceMappingURL=BubbleOutlineLayer.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../src/map/components/BubbleLayer/BubbleOutlineLayer.tsx"],
|
|
4
|
+
"sourcesContent": ["/**\n * @license\n * Copyright 2023 Dynatrace LLC\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { ExpressionSpecification } from '@maplibre/maplibre-gl-style-spec';\nimport React from 'react';\nimport { Layer } from 'react-map-gl/maplibre';\n\nimport { _getCanvasColor as getCanvasColor } from '@dynatrace/strato-components-preview/charts';\n\nimport { addOutlineSize } from './functions/add-outline-size.js';\nimport { buildOutlineStickToDistanceExpression } from './functions/build-stick-to-distance-expressions.js';\nimport { useSizeInterpolation } from './hooks/use-size-interpolation.js';\nimport {\n ACTIVE_COLOR,\n BUBBLE_OUTLINE_STROKE,\n DEFAULT_RADIUS_EXPRESSION,\n} from '../../constants.js';\n\nconst DEFAULT_OUTLINE_RADIUS_EXPRESSION: ExpressionSpecification =\n addOutlineSize(DEFAULT_RADIUS_EXPRESSION);\n\nexport const BubbleOutlineLayer = ({\n beforeId,\n source,\n}: {\n beforeId: string;\n source: string;\n}) => {\n const sizeInterpolation = useSizeInterpolation();\n\n const outlineRadiusExpression =\n sizeInterpolation === 'fixed'\n ? DEFAULT_OUTLINE_RADIUS_EXPRESSION\n : buildOutlineStickToDistanceExpression();\n\n return (\n <Layer\n type=\"circle\"\n beforeId={beforeId}\n source={source}\n paint={{\n 'circle-radius': outlineRadiusExpression,\n 'circle-opacity': 0,\n 'circle-stroke-width': BUBBLE_OUTLINE_STROKE,\n 'circle-stroke-color': getCanvasColor(ACTIVE_COLOR),\n 'circle-stroke-opacity': [\n 'case',\n ['boolean', ['feature-state', 'active'], false],\n 1,\n 0,\n ],\n }}\n />\n );\n};\n"],
|
|
5
|
+
"mappings": "AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAgBA,OAAOA,MAAW,QAClB,OAAS,SAAAC,MAAa,wBAEtB,OAAS,mBAAmBC,MAAsB,8CAElD,OAAS,kBAAAC,MAAsB,kCAC/B,OAAS,yCAAAC,MAA6C,qDACtD,OAAS,wBAAAC,MAA4B,oCACrC,OACE,gBAAAC,EACA,yBAAAC,EACA,6BAAAC,MACK,qBAEP,MAAMC,EACJN,EAAeK,CAAyB,EAE7BE,EAAqB,CAAC,CACjC,SAAAC,EACA,OAAAC,CACF,IAGM,CAGJ,MAAMC,EAFoBR,EAAqB,IAGvB,QAClBI,EACAL,EAAsC,EAE5C,OACEJ,EAAA,cAACC,EAAA,CACC,KAAK,SACL,SAAUU,EACV,OAAQC,EACR,MAAO,CACL,gBAAiBC,EACjB,iBAAkB,EAClB,sBAAuBN,EACvB,sBAAuBL,EAAeI,CAAY,EAClD,wBAAyB,CACvB,OACA,CAAC,UAAW,CAAC,gBAAiB,QAAQ,EAAG,EAAK,EAC9C,EACA,CACF,CACF,EACF,CAEJ",
|
|
6
|
+
"names": ["React", "Layer", "getCanvasColor", "addOutlineSize", "buildOutlineStickToDistanceExpression", "useSizeInterpolation", "ACTIVE_COLOR", "BUBBLE_OUTLINE_STROKE", "DEFAULT_RADIUS_EXPRESSION", "DEFAULT_OUTLINE_RADIUS_EXPRESSION", "BubbleOutlineLayer", "beforeId", "source", "outlineRadiusExpression"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2023 Dynatrace LLC
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/import{createContext as e}from"react";const t=e(void 0);export{t as SizeInterpolationContext};
|
|
16
|
+
//# sourceMappingURL=size-interpolation.context.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../src/map/components/BubbleLayer/contexts/size-interpolation.context.tsx"],
|
|
4
|
+
"sourcesContent": ["/**\n * @license\n * Copyright 2023 Dynatrace LLC\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { createContext } from 'react';\n\nexport const SizeInterpolationContext = createContext<\n 'fixed' | 'zoom' | undefined\n>(undefined);\n"],
|
|
5
|
+
"mappings": "AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAeA,OAAS,iBAAAA,MAAqB,QAEvB,MAAMC,EAA2BD,EAEtC,MAAS",
|
|
6
|
+
"names": ["createContext", "SizeInterpolationContext"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2023 Dynatrace LLC
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/import{BUBBLE_OUTLINE_STROKE as o}from"../../../constants.js";const r=i=>["+",i,o];export{r as addOutlineSize};
|
|
16
|
+
//# sourceMappingURL=add-outline-size.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../src/map/components/BubbleLayer/functions/add-outline-size.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * @license\n * Copyright 2023 Dynatrace LLC\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ExpressionSpecification } from '@maplibre/maplibre-gl-style-spec';\n\nimport { BUBBLE_OUTLINE_STROKE } from '../../../constants.js';\n\n/**\n * It modifies the radius size expression to take the bubble outline stroke size into account\n * @param expression - radius expression\n */\nexport const addOutlineSize = (\n expression: ExpressionSpecification,\n): ExpressionSpecification => ['+', expression, BUBBLE_OUTLINE_STROKE];\n"],
|
|
5
|
+
"mappings": "AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAkBA,OAAS,yBAAAA,MAA6B,wBAM/B,MAAMC,EACXC,GAC4B,CAAC,IAAKA,EAAYF,CAAqB",
|
|
6
|
+
"names": ["BUBBLE_OUTLINE_STROKE", "addOutlineSize", "expression"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2023 Dynatrace LLC
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/import{scaleLinear as o,scaleLog as u}from"d3-scale";const c=(i,m)=>{let n=[1/0,-1/0];for(let e=0;e<i.length;e++){const r=m(i[e]),[a,t]=n;n=[Math.min(a,r),Math.max(t,r)]}return n},f=(i,m,n,e)=>{const[r,a]=e,t=c(i,m);return n==="linear"?o(t,[r,a]):u(t,[r,a])};export{f as buildRadiusScale};
|
|
16
|
+
//# sourceMappingURL=build-radius-scale.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../src/map/components/BubbleLayer/functions/build-radius-scale.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * @license\n * Copyright 2023 Dynatrace LLC\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { scaleLinear, ScaleLinear, scaleLog, ScaleLogarithmic } from 'd3-scale';\n\nimport { Location } from '../../../types/location.js';\n\nconst calculateDomain = <T extends Location>(\n data: T[],\n radius: (item: T) => number,\n): [number, number] => {\n let domain: [number, number] = [Infinity, -Infinity];\n\n for (let i = 0; i < data.length; i++) {\n const radiusValue = radius(data[i]);\n\n const [currentMin, currentMax] = domain;\n\n domain = [\n Math.min(currentMin, radiusValue),\n Math.max(currentMax, radiusValue),\n ];\n }\n\n return domain;\n};\n\nexport const buildRadiusScale = <T extends Location>(\n data: T[],\n radius: (item: T) => number,\n scale: 'linear' | 'log',\n range: [number, number],\n): ScaleLinear<number, number> | ScaleLogarithmic<number, number> => {\n const [minRadius, maxRadius] = range;\n const domain = calculateDomain(data, radius);\n\n if (scale === 'linear') {\n return scaleLinear(domain, [minRadius, maxRadius]);\n }\n\n return scaleLog(domain, [minRadius, maxRadius]);\n};\n"],
|
|
5
|
+
"mappings": "AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAeA,OAAS,eAAAA,EAA0B,YAAAC,MAAkC,WAIrE,MAAMC,EAAkB,CACtBC,EACAC,IACqB,CACrB,IAAIC,EAA2B,CAAC,IAAU,IAAS,EAEnD,QAASC,EAAI,EAAGA,EAAIH,EAAK,OAAQG,IAAK,CACpC,MAAMC,EAAcH,EAAOD,EAAKG,CAAC,CAAC,EAE5B,CAACE,EAAYC,CAAU,EAAIJ,EAEjCA,EAAS,CACP,KAAK,IAAIG,EAAYD,CAAW,EAChC,KAAK,IAAIE,EAAYF,CAAW,CAClC,CACF,CAEA,OAAOF,CACT,EAEaK,EAAmB,CAC9BP,EACAC,EACAO,EACAC,IACmE,CACnE,KAAM,CAACC,EAAWC,CAAS,EAAIF,EACzBP,EAASH,EAAgBC,EAAMC,CAAM,EAE3C,OAAIO,IAAU,SACLX,EAAYK,EAAQ,CAACQ,EAAWC,CAAS,CAAC,EAG5Cb,EAASI,EAAQ,CAACQ,EAAWC,CAAS,CAAC,CAChD",
|
|
6
|
+
"names": ["scaleLinear", "scaleLog", "calculateDomain", "data", "radius", "domain", "i", "radiusValue", "currentMin", "currentMax", "buildRadiusScale", "scale", "range", "minRadius", "maxRadius"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2023 Dynatrace LLC
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/import{addOutlineSize as o}from"./add-outline-size.js";const i=22,t=0,c=.019,s=4,a=1e4,r=["cos",["*",["get","__lat"],["/",Math.PI,180]]],e=["/",["get","__radius"],s],n=["/",["/",["*",["get","__radius"],a],c],r],E=()=>["interpolate",["exponential",2],["zoom"],t,e,i,n],x=()=>["interpolate",["exponential",2],["zoom"],t,o(e),i,o(n)];export{E as buildCircleStickToDistanceExpression,x as buildOutlineStickToDistanceExpression};
|
|
16
|
+
//# sourceMappingURL=build-stick-to-distance-expressions.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../src/map/components/BubbleLayer/functions/build-stick-to-distance-expressions.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * @license\n * Copyright 2023 Dynatrace LLC\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ExpressionSpecification } from '@maplibre/maplibre-gl-style-spec';\n\nimport { addOutlineSize } from './add-outline-size.js';\n\n//#region FIXED PARAMETERS\nconst MAP_MAX_ZOOM_LEVEL = 22;\nconst MAP_MIN_ZOOM_LEVEL = 0;\nconst EQUATOR_METERS_BY_PIXEL_MAX_ZOOM_LEVEL_RATIO = 0.019;\n//#endregion\n\n//#region FINE-TUNING PARAMETERS\nconst shrinkFactor = 4;\nconst gainAtMaxZoomLevel = 10000;\n//#endregion\n\n/**\n * Expression to scale latitude in Mercator projection.\n */\nconst mercatorLatitudeScalingFactor: ExpressionSpecification = [\n 'cos',\n ['*', ['get', '__lat'], ['/', Math.PI, 180]],\n];\n\n/**\n * Expression to calculate the radius size at the minimum zoom level\n */\nconst minZoomLevelCalculation: ExpressionSpecification = [\n '/',\n ['get', '__radius'],\n shrinkFactor,\n];\n\n/**\n * Expression to calculate the radius size at the maximum zoom level\n */\nconst maxZoomLevelCalculation: ExpressionSpecification = [\n '/',\n [\n '/',\n ['*', ['get', '__radius'], gainAtMaxZoomLevel],\n EQUATOR_METERS_BY_PIXEL_MAX_ZOOM_LEVEL_RATIO,\n ],\n mercatorLatitudeScalingFactor,\n];\n\n/**\n * Builds the circle stick to distance expression.\n * It creates an exponential interpolation between the radius size at the minimum zoom level and the maximum zoom level\n * to generate the stick to distance effect.\n */\nexport const buildCircleStickToDistanceExpression =\n (): ExpressionSpecification => {\n return [\n 'interpolate',\n ['exponential', 2],\n ['zoom'],\n MAP_MIN_ZOOM_LEVEL,\n minZoomLevelCalculation,\n MAP_MAX_ZOOM_LEVEL,\n maxZoomLevelCalculation,\n ];\n };\n\n/**\n * Builds the outline stick to distance expression.\n * It creates an exponential interpolation between the outline radius size at the minimum zoom level and the maximum\n * zoom level to generate the stick to distance effect.\n */\nexport const buildOutlineStickToDistanceExpression =\n (): ExpressionSpecification => {\n return [\n 'interpolate',\n ['exponential', 2],\n ['zoom'],\n MAP_MIN_ZOOM_LEVEL,\n addOutlineSize(minZoomLevelCalculation),\n MAP_MAX_ZOOM_LEVEL,\n addOutlineSize(maxZoomLevelCalculation),\n ];\n };\n"],
|
|
5
|
+
"mappings": "AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAkBA,OAAS,kBAAAA,MAAsB,wBAG/B,MAAMC,EAAqB,GACrBC,EAAqB,EACrBC,EAA+C,KAI/CC,EAAe,EACfC,EAAqB,IAMrBC,EAAyD,CAC7D,MACA,CAAC,IAAK,CAAC,MAAO,OAAO,EAAG,CAAC,IAAK,KAAK,GAAI,GAAG,CAAC,CAC7C,EAKMC,EAAmD,CACvD,IACA,CAAC,MAAO,UAAU,EAClBH,CACF,EAKMI,EAAmD,CACvD,IACA,CACE,IACA,CAAC,IAAK,CAAC,MAAO,UAAU,EAAGH,CAAkB,EAC7CF,CACF,EACAG,CACF,EAOaG,EACX,IACS,CACL,cACA,CAAC,cAAe,CAAC,EACjB,CAAC,MAAM,EACPP,EACAK,EACAN,EACAO,CACF,EAQSE,EACX,IACS,CACL,cACA,CAAC,cAAe,CAAC,EACjB,CAAC,MAAM,EACPR,EACAF,EAAeO,CAAuB,EACtCN,EACAD,EAAeQ,CAAuB,CACxC",
|
|
6
|
+
"names": ["addOutlineSize", "MAP_MAX_ZOOM_LEVEL", "MAP_MIN_ZOOM_LEVEL", "EQUATOR_METERS_BY_PIXEL_MAX_ZOOM_LEVEL_RATIO", "shrinkFactor", "gainAtMaxZoomLevel", "mercatorLatitudeScalingFactor", "minZoomLevelCalculation", "maxZoomLevelCalculation", "buildCircleStickToDistanceExpression", "buildOutlineStickToDistanceExpression"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2023 Dynatrace LLC
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/import{_getCanvasColor as u}from"@dynatrace/strato-components-preview/charts";import{calculateHoveredColor as p}from"../../../functions/calculate-hovered-color.js";import{defineColor as d}from"../../../functions/define-color.js";import{defineRadius as b}from"../../../functions/define-radius.js";const h=(t,a,i,n)=>({type:"FeatureCollection",features:t.map(e=>{const{longitude:m,latitude:o,...l}=e,r=u(d(a,e)),s=p(r),c=n(b(i,e));return{type:"Feature",properties:{...l,__color:r,__hoveredColor:s,__radius:c,__lat:o},geometry:{type:"Point",coordinates:[m,o]}}})});export{h as parseBubbleDataToGeoJSON};
|
|
16
|
+
//# sourceMappingURL=parse-bubble-data-to-geo-json.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../src/map/components/BubbleLayer/functions/parse-bubble-data-to-geo-json.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * @license\n * Copyright 2023 Dynatrace LLC\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ScaleLinear, ScaleLogarithmic } from 'd3-scale';\n\nimport { _getCanvasColor as getCanvasColor } from '@dynatrace/strato-components-preview/charts';\n\nimport { calculateHoveredColor } from '../../../functions/calculate-hovered-color.js';\nimport { defineColor } from '../../../functions/define-color.js';\nimport { defineRadius } from '../../../functions/define-radius.js';\nimport { Location } from '../../../types/location.js';\n\ntype RadiusScale =\n | ScaleLinear<number, number>\n | ScaleLogarithmic<number, number>\n | ((value: number) => number);\n\nexport const parseBubbleDataToGeoJSON = <T extends Location>(\n data: T[],\n color: string | ((item: T) => string),\n radius: number | ((item: T) => number),\n scale: RadiusScale,\n) => {\n return {\n type: 'FeatureCollection',\n features: data.map((feature) => {\n const { longitude, latitude, ...properties } = feature;\n const canvasColor = getCanvasColor(defineColor(color, feature));\n const hoveredColor = calculateHoveredColor(canvasColor);\n const scaledRadius = scale(defineRadius(radius, feature));\n\n return {\n type: 'Feature',\n properties: {\n ...properties,\n __color: canvasColor,\n __hoveredColor: hoveredColor,\n __radius: scaledRadius,\n __lat: latitude,\n },\n geometry: { type: 'Point', coordinates: [longitude, latitude] },\n };\n }),\n };\n};\n"],
|
|
5
|
+
"mappings": "AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAkBA,OAAS,mBAAmBA,MAAsB,8CAElD,OAAS,yBAAAC,MAA6B,gDACtC,OAAS,eAAAC,MAAmB,qCAC5B,OAAS,gBAAAC,MAAoB,sCAQtB,MAAMC,EAA2B,CACtCC,EACAC,EACAC,EACAC,KAEO,CACL,KAAM,oBACN,SAAUH,EAAK,IAAKI,GAAY,CAC9B,KAAM,CAAE,UAAAC,EAAW,SAAAC,EAAU,GAAGC,CAAW,EAAIH,EACzCI,EAAcb,EAAeE,EAAYI,EAAOG,CAAO,CAAC,EACxDK,EAAeb,EAAsBY,CAAW,EAChDE,EAAeP,EAAML,EAAaI,EAAQE,CAAO,CAAC,EAExD,MAAO,CACL,KAAM,UACN,WAAY,CACV,GAAGG,EACH,QAASC,EACT,eAAgBC,EAChB,SAAUC,EACV,MAAOJ,CACT,EACA,SAAU,CAAE,KAAM,QAAS,YAAa,CAACD,EAAWC,CAAQ,CAAE,CAChE,CACF,CAAC,CACH",
|
|
6
|
+
"names": ["getCanvasColor", "calculateHoveredColor", "defineColor", "defineRadius", "parseBubbleDataToGeoJSON", "data", "color", "radius", "scale", "feature", "longitude", "latitude", "properties", "canvasColor", "hoveredColor", "scaledRadius"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2023 Dynatrace LLC
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/import{useContext as o}from"react";import{SizeInterpolationContext as t}from"../contexts/size-interpolation.context.js";const r=()=>o(t);export{r as useSizeInterpolation};
|
|
16
|
+
//# sourceMappingURL=use-size-interpolation.js.map
|