@oneblink/apps-react 8.12.0-beta.9 → 8.12.1-beta.1

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.
@@ -496,8 +496,10 @@ function FormElementArcGISWebMap({ element, id, value, onChange, takeScreenShotR
496
496
  // The below caters for web maps that load in with pre-existing layers,
497
497
  // which is usually the case when a web map id is provided.
498
498
  // We will store these pre-existing layers and ensure they're passed
499
- // to any redraw logic.
500
- defaultLayersRef.current = map.allLayers
499
+ // to any redraw logic. We take layers from map.layers (as opposed to map.allLayers)
500
+ // as this omits system generated layers like the basemap, which aren't removed when
501
+ // we redraw regardless.
502
+ defaultLayersRef.current = map.layers
501
503
  .toArray()
502
504
  .filter((l) => l.id !== measurementLayerId && l.id !== drawingLayerId);
503
505
  takeScreenShotRef.current = async (viewToScreenShot) => {
@@ -1 +1 @@
1
- {"version":3,"file":"ArcGISWebMap.js","sourceRoot":"","sources":["../../src/components/ArcGISWebMap.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,OAAO,MAAM,4BAA4B,CAAA;AAChD,OAAO,MAAM,MAAM,qBAAqB,CAAA;AACxC,OAAO,IAAI,MAAM,2BAA2B,CAAA;AAC5C,OAAO,MAAM,MAAM,6BAA6B,CAAA;AAChD,OAAO,IAAI,MAAM,2BAA2B,CAAA;AAC5C,OAAO,SAAS,MAAM,gCAAgC,CAAA;AACtD,OAAO,MAAM,MAAM,6BAA6B,CAAA;AAChD,OAAO,cAAc,MAAM,qCAAqC,CAAA;AAChE,OAAO,MAAM,MAAM,6BAA6B,CAAA;AAChD,OAAO,aAAa,MAAM,mCAAmC,CAAA;AAC7D,OAAO,OAAO,MAAM,sBAAsB,CAAA;AAC1C,OAAO,KAAK,MAAM,4BAA4B,CAAA;AAC9C,OAAO,EACL,KAAK,EAEL,gBAAgB,EAChB,QAAQ,GACT,MAAM,uBAAuB,CAAA;AAC9B,OAAO,U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K,oBAAoB,CAC7C,0CAAE,uBAAuB,KAAI,EAAE,EAElC,OAAO,EAAE,GAAG,EAAE,CAAC,uBAAuB,CAAC,SAAS,CAAC,EACjD,4BAA4B,EAAE,CAAC,GAAG,EAAE,EAAE;gBACpC,4BAA4B,CAAC,GAAG,CAAC,CAAA;YACnC,CAAC,EACD,cAAc,EAAE,oBAAoB,EACpC,UAAU,EAAE,aAAa,CAAC,OAAO,GACjC,CACH,CACG,CACL,CACJ,CAAA;AACH,CAAC;AAED,eAAe,KAAK,CAAC,IAAI,CAAC,uBAAuB,CAAC,CAAA","sourcesContent":["import * as React from 'react'\nimport { ArcGISTypes, FormTypes } from '@oneblink/types'\nimport MapView from '@arcgis/core/views/MapView'\nimport WebMap from '@arcgis/core/WebMap'\nimport Home from '@arcgis/core/widgets/Home'\nimport Search from '@arcgis/core/widgets/Search'\nimport Zoom from '@arcgis/core/widgets/Zoom'\nimport LayerList from '@arcgis/core/widgets/LayerList'\nimport Expand from '@arcgis/core/widgets/Expand'\nimport BaseMapGallery from '@arcgis/core/widgets/BasemapGallery'\nimport Sketch from '@arcgis/core/widgets/Sketch'\nimport GraphicsLayer from '@arcgis/core/layers/GraphicsLayer'\nimport Graphic from '@arcgis/core/Graphic'\nimport Popup from '@arcgis/core/widgets/Popup'\nimport {\n Point,\n Polygon,\n SpatialReference,\n Polyline,\n} from '@arcgis/core/geometry'\nimport TextSymbol from '@arcgis/core/symbols/TextSymbol'\nimport * as geometryEngine from '@arcgis/core/geometry/geometryEngine'\nimport { Box, Divider, IconButton } from '@mui/material'\nimport throttle from 'lodash.throttle'\nimport { localisationService } from '@oneblink/apps'\nimport { v4 as uuid } from 'uuid'\n\nimport OnLoading from '../components/renderer/OnLoading'\nimport MaterialIcon from './MaterialIcon'\n\nimport useIsPageVisible from '../hooks/useIsPageVisible'\nimport { ArcGISWebMapElementValue } from '@oneblink/types/typescript/arcgis'\nimport { FormElementValueChangeHandler } from '../types/form'\nimport '../styles/arcgis-external.css'\nimport Layer from '@arcgis/core/layers/Layer'\n\ntype Props = {\n element: FormTypes.ArcGISWebMapElement\n id: string\n value: ArcGISWebMapElementValue | undefined\n onChange: FormElementValueChangeHandler<ArcGISWebMapElementValue>\n automatedSnapshotFileName: string\n 'aria-describedby'?: string\n takeScreenShotRef: React.MutableRefObject<\n | ((view?: ArcGISTypes.ArcGISWebMapElementValue['view']) => Promise<{\n dataUrl: string\n }>)\n | undefined\n >\n}\n\ntype SketchCreateTool = Parameters<Sketch['create']>[0]\n\nfunction DrawingOptionsList({\n options,\n sketchTool,\n onClose,\n sketchToolType,\n setSelectedGraphicAttributes,\n}: {\n options: { id: string; label: string; value: string; description?: string }[]\n onClose: () => void\n sketchTool: Sketch\n sketchToolType: SketchCreateTool\n setSelectedGraphicAttributes: (opt: {\n label: string\n value: string\n description?: string\n }) => void\n}) {\n return (\n <div className=\"esri-widget\">\n <Box\n sx={{\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n }}\n >\n <b style={{ padding: '0.5rem' }}>Select an option</b>\n <IconButton\n onClick={(e) => {\n e.stopPropagation()\n onClose()\n }}\n size=\"small\"\n data-cypress=\"copy-to-clip-board-button\"\n >\n <MaterialIcon fontSize=\"small\">close</MaterialIcon>\n </IconButton>\n </Box>\n <Divider sx={{ backgroundColor: 'unset', margin: '0px 8px' }} />\n <Box sx={{ maxHeight: '200px', overflowY: 'auto' }}>\n {options?.map(({ id, value, label, description }) => (\n <div\n key={id}\n className=\"ob-list__item is-clickable\"\n style={{ alignItems: 'center' }}\n onClick={() => {\n onClose()\n sketchTool?.create(sketchToolType)\n setSelectedGraphicAttributes({ value, label, description })\n }}\n >\n {label}\n </div>\n ))}\n </Box>\n </div>\n )\n}\n\nfunction FormElementArcGISWebMap({\n element,\n id,\n value,\n onChange,\n takeScreenShotRef,\n automatedSnapshotFileName,\n ...props\n}: Props) {\n const ref = React.useRef<HTMLDivElement | null>(null)\n const layerPanelRef = React.useRef<Expand>()\n const mapGalleryPanelRef = React.useRef<Expand>()\n const sketchToolRef = React.useRef<Sketch>()\n const drawingLayerRef = React.useRef<GraphicsLayer>()\n const selectedGraphicForUpdate = React.useRef<string>()\n const mapViewRef = React.useRef<MapView>()\n const measurementLayerRef = React.useRef<GraphicsLayer>()\n const defaultLayersRef = React.useRef<Layer[]>()\n\n const [loadError, setLoadError] = React.useState<Error>()\n const [isLoading, setIsLoading] = React.useState<boolean>(false)\n const isPageVisible = useIsPageVisible()\n const [selectedGraphicAttributes, setSelectedGraphicAttributes] =\n React.useState<{\n value: string\n label: string\n description?: string\n }>()\n // only used when an allowed drawing tool also has a list of graphic attribute options to display to the user\n const [activeSketchToolMenu, setActiveSketchToolMenu] =\n React.useState<SketchCreateTool>()\n\n const updateDrawingInputSubmissionValue = React.useCallback(() => {\n const updatedGraphics = drawingLayerRef.current?.graphics\n .toArray()\n .map((graphic) => graphic.toJSON())\n\n onChange(element, {\n value: (existingValue) => ({\n ...(existingValue || {}),\n drawingLayer: updatedGraphics,\n userInput: updatedGraphics,\n // Remove automated snapshot images when drawing again\n snapshotImages: existingValue?.snapshotImages?.filter(\n (snapshotImage) =>\n snapshotImage.fileName !== automatedSnapshotFileName,\n ),\n }),\n })\n }, [automatedSnapshotFileName, element, onChange])\n\n const updateMapViewSubmissionValue = React.useCallback(() => {\n const zoom = mapViewRef.current?.zoom\n const latitude = mapViewRef.current?.center.latitude\n const longitude = mapViewRef.current?.center.longitude\n if (zoom && latitude && longitude) {\n onChange(element, {\n value: (existingValue) => ({\n ...(existingValue || {}),\n view: {\n zoom,\n latitude,\n longitude,\n },\n }),\n })\n }\n }, [element, onChange])\n\n const getGeometryPoints = (\n geom: __esri.Geometry,\n spatialRef: SpatialReference,\n ) => {\n if (geom.type === 'polygon') {\n const polygon = geom as Polygon\n return polygon.rings[0].map(\n (ring) =>\n new Point({\n x: ring[0],\n y: ring[1],\n spatialReference: spatialRef,\n }),\n )\n } else if (geom.type === 'polyline') {\n const polyline = geom as Polyline\n return polyline.paths[0].map(\n (path) =>\n new Point({\n x: path[0],\n y: path[1],\n spatialReference: spatialRef,\n }),\n )\n }\n }\n\n const addMeasurementLabels = React.useCallback(\n (graphics: __esri.Graphic[]) => {\n if (!element.measurementDimensionsEnabled) return\n const spatialRef = new SpatialReference({ wkid: 3857 })\n const measurementLayer = measurementLayerRef.current\n const mapView = mapViewRef.current\n if (!measurementLayer || !mapView) return\n measurementLayer.removeAll()\n\n for (const graphic of graphics) {\n const geom = graphic.geometry\n if (!geom || (geom.type !== 'polygon' && geom.type !== 'polyline'))\n continue\n\n const points = getGeometryPoints(geom, spatialRef)\n if (!points) continue\n\n const { distanceUnit, distanceUnitShortName } =\n localisationService.getDistanceUnits()\n if (distanceUnit !== 'meters' && distanceUnit !== 'feet') {\n console.warn(\n 'Unsupported distance unit provided in tenant configuration: ',\n distanceUnit,\n )\n return\n }\n const graphics: Graphic[] = []\n\n for (let i = 1; i < points.length; i++) {\n const x1 = points[i].x\n const x2 = points[i - 1].x\n const y1 = points[i].y\n const y2 = points[i - 1].y\n\n const midpoint = new Point({\n x: (x1 + x2) / 2,\n y: (y1 + y2) / 2,\n spatialReference: spatialRef,\n })\n\n // Angle of the measurement label - this will be rotated to be parallel with the polygon or polyline edge\n const dx = x2 - x1\n const dy = y2 - y1\n const radians = Math.atan2(dy, dx)\n let angle = radians * (-180 / Math.PI)\n if (angle > 90 || angle < -90) {\n angle += 180\n }\n\n // offset of the measurement label against the edge of the polygon/polyline it's measuring\n const pixelOffset = 10\n const normalAngle = radians + Math.PI / 2\n const offsetScreenX = pixelOffset * Math.cos(normalAngle)\n const offsetScreenY = pixelOffset * Math.sin(normalAngle)\n\n const screenPoint = mapView.toScreen(midpoint)\n screenPoint.x += offsetScreenX\n screenPoint.y -= offsetScreenY\n const offsetMapPoint = mapView.toMap(screenPoint)\n\n const polyline = new Polyline({\n paths: [\n [\n [points[i].longitude, points[i].latitude],\n [points[i - 1].longitude, points[i - 1].latitude],\n ],\n ],\n spatialReference: { wkid: 4326 },\n })\n const distance = geometryEngine.geodesicLength(polyline, distanceUnit)\n graphics.push(\n new Graphic({\n geometry: offsetMapPoint,\n symbol: new TextSymbol({\n text: distance.toFixed(0) + distanceUnitShortName,\n color: 'black',\n haloColor: 'white',\n haloSize: 1,\n angle,\n }),\n }),\n )\n }\n\n measurementLayer.addMany(graphics)\n mapViewRef.current?.map.reorder(\n measurementLayer,\n mapViewRef.current?.map.layers.length,\n )\n }\n },\n [element],\n )\n\n const clearMeasurementLabels = React.useCallback(() => {\n if (measurementLayerRef.current) {\n measurementLayerRef.current.removeAll()\n }\n }, [])\n\n React.useEffect(() => {\n if (element.readOnly) return\n // event listeners for drawing tool creates/updates/deletes\n // these need to be removed and recreated when the submission value changes\n // to ensure they always have access to the latest submission value\n const createListener = sketchToolRef.current?.on(\n 'create',\n throttle((sketchEvent: __esri.SketchCreateEvent) => {\n if (sketchEvent.state === 'active') {\n addMeasurementLabels([sketchEvent.graphic])\n }\n if (sketchEvent.state === 'complete') {\n if (selectedGraphicAttributes) {\n sketchEvent.graphic.attributes = {\n name: selectedGraphicAttributes.value,\n label: selectedGraphicAttributes.label,\n description: selectedGraphicAttributes.description,\n }\n setSelectedGraphicAttributes(undefined)\n }\n updateDrawingInputSubmissionValue()\n clearMeasurementLabels()\n }\n if (sketchEvent.state === 'cancel') {\n setSelectedGraphicAttributes(undefined)\n clearMeasurementLabels()\n }\n }, 100),\n )\n\n const updateListener = sketchToolRef.current?.on(\n 'update',\n throttle((sketchEvent: __esri.SketchUpdateEvent) => {\n if (sketchEvent.state === 'active') {\n addMeasurementLabels(sketchEvent.graphics)\n }\n if (sketchEvent.state === 'complete') {\n // only update the submission value if the graphic's geometry was actually changed\n if (\n JSON.stringify(sketchEvent.graphics[0].geometry.toJSON()) !==\n selectedGraphicForUpdate.current\n ) {\n updateDrawingInputSubmissionValue()\n }\n selectedGraphicForUpdate.current = undefined\n clearMeasurementLabels()\n }\n if (sketchEvent.state === 'start') {\n selectedGraphicForUpdate.current = JSON.stringify(\n sketchEvent.graphics[0].geometry.clone().toJSON(),\n )\n addMeasurementLabels(sketchEvent.graphics)\n }\n }, 100),\n )\n\n const deleteListener = sketchToolRef.current?.on('delete', () => {\n mapViewRef.current?.closePopup()\n updateDrawingInputSubmissionValue()\n clearMeasurementLabels()\n })\n\n const mapViewChangeListener = mapViewRef.current?.watch(\n 'stationary',\n () => {\n const mapView = mapViewRef.current\n if (mapView && mapView.stationary) {\n const hasViewChanged =\n mapView.zoom !== value?.view?.zoom ||\n mapView.center.longitude !== value?.view?.longitude ||\n mapView.center.latitude !== value?.view?.latitude\n if (hasViewChanged) {\n updateMapViewSubmissionValue()\n }\n }\n },\n )\n\n const sketchToolListener = sketchToolRef.current?.viewModel.watch(\n 'activeTool',\n () => {\n if (selectedGraphicAttributes) {\n return\n }\n const activeTool = sketchToolRef.current?.activeTool\n const hasGraphicAttributeOptions = !!element.allowedDrawingTools?.find(\n (tool) => tool.type === activeTool,\n )?.graphicAttributeOptions?.length\n\n if (activeTool) {\n if (\n hasGraphicAttributeOptions &&\n (activeTool === 'point' ||\n activeTool === 'polygon' ||\n activeTool === 'circle' ||\n activeTool === 'rectangle' ||\n activeTool === 'polyline')\n ) {\n // the sketch.create() fn only allows active tools of the above 5 types\n // hence we must check above to keep the types happy further down the line\n sketchToolRef.current?.cancel()\n setActiveSketchToolMenu(activeTool)\n } else {\n setActiveSketchToolMenu(undefined)\n }\n }\n },\n )\n\n mapViewRef.current?.on('click', (event) => {\n mapViewRef.current?.hitTest(event).then((response) => {\n // the \"hit test\" will typically yield the graphic we want to display the popup for,\n // and an ArcGIS built-in graphic which highlights the selected graphic.\n // By filtering for the graphic with the \"label\" attribute, we're able to reliably\n // get the graphic we want to display the popup for.\n const result = response.results\n .filter((r) => r.type === 'graphic')\n .find((r) => !!r.graphic.attributes?.label)\n\n if (result) {\n mapViewRef.current?.openPopup({\n title: result.graphic.attributes.label,\n content: result.graphic.attributes.description,\n })\n }\n })\n })\n\n return () => {\n createListener?.remove()\n updateListener?.remove()\n deleteListener?.remove()\n mapViewChangeListener?.remove()\n sketchToolListener?.remove()\n }\n }, [\n isLoading,\n value,\n updateDrawingInputSubmissionValue,\n updateMapViewSubmissionValue,\n element,\n selectedGraphicAttributes,\n addMeasurementLabels,\n clearMeasurementLabels,\n ])\n\n const stringifedLayersRef = React.useRef<string>('')\n\n const onSubmissionValueChange = React.useCallback(() => {\n const view = mapViewRef.current\n const map = mapViewRef.current?.map\n if (!view || !map) return\n\n // if the layers have changed or if the map has no layers, remove all layers and repaint\n const currentStringifedLayers = JSON.stringify(value?.layers)\n if (\n stringifedLayersRef.current !== currentStringifedLayers ||\n !map.layers.length\n ) {\n stringifedLayersRef.current = currentStringifedLayers\n // remove all layers and repaint\n map.layers.removeAll()\n if (defaultLayersRef.current) {\n // redraw default layers first\n defaultLayersRef.current.forEach((layer) => {\n map.add(layer)\n })\n }\n\n if (value?.layers) {\n for (const layer of value.layers) {\n const newLayer = new GraphicsLayer({\n title: layer.title as string,\n id: layer.id,\n })\n newLayer.addMany(layer.graphics.map((g) => Graphic.fromJSON(g)))\n newLayer.visible =\n typeof layer.visible === 'boolean' ? layer.visible : true\n map.layers.add(newLayer)\n }\n }\n }\n\n // add the web map's drawing and measurement layers back\n const drawingLayer = drawingLayerRef.current\n if (value?.drawingLayer && drawingLayer) {\n drawingLayer.removeAll()\n drawingLayer.addMany(value.drawingLayer.map((g) => Graphic.fromJSON(g)))\n map.layers.add(drawingLayer)\n map.layers.reorder(drawingLayer, map.layers.length - 1)\n }\n if (measurementLayerRef.current) {\n map.layers.add(measurementLayerRef.current)\n map.layers.reorder(measurementLayerRef.current, map.layers.length - 1)\n }\n if (value?.view) {\n view.zoom = value.view.zoom\n view.center = new Point({\n latitude: value.view.latitude,\n longitude: value.view.longitude,\n })\n }\n }, [value])\n\n React.useEffect(() => {\n if (!isLoading && mapViewRef.current) {\n onSubmissionValueChange()\n }\n // only run the above when the submission value changes or the map finishes loading\n }, [onSubmissionValueChange, isLoading])\n\n const drawingOptionsContainerId = `OneBlinkDrawingOptionsSelector-${element.id}`\n\n React.useEffect(() => {\n const loadMap = async () => {\n try {\n const map = new WebMap({\n portalItem: {\n id: element.webMapId,\n },\n basemap: element.basemapId || 'streets',\n })\n await map.load()\n\n const view = new MapView({\n map,\n container: ref.current || undefined,\n popup: new Popup({\n dockEnabled: true,\n dockOptions: {\n buttonEnabled: false,\n breakpoint: false,\n position: 'bottom-left',\n },\n }),\n })\n\n // remove default widgets\n const components = view.ui.getComponents()\n for (const component of components) {\n view.ui.remove(component)\n }\n\n if (element.addressSearchWidgetEnabled) {\n view.ui.add(\n new Search({\n view,\n }),\n 'top-left',\n )\n }\n\n if (element.homeWidgetEnabled) {\n view.ui.add(\n new Home({\n view,\n }),\n 'top-left',\n )\n }\n\n view.ui.add(\n new Zoom({\n view,\n }),\n 'bottom-right',\n )\n\n const layerList = new LayerList({\n view,\n })\n\n layerPanelRef.current = new Expand({\n expandIcon: 'layers',\n view,\n content: layerList,\n expanded: element.showLayerPanel,\n mode: 'floating',\n visible: false,\n })\n\n view.ui.add(layerPanelRef.current, 'top-right')\n\n const baseMapGallery = new BaseMapGallery({ view })\n\n mapGalleryPanelRef.current = new Expand({\n expandIcon: 'basemap',\n view,\n content: baseMapGallery,\n mode: 'floating',\n visible: false,\n })\n\n view.ui.add(mapGalleryPanelRef.current, 'top-left')\n\n let drawingLayerId: string | undefined\n let measurementLayerId: string | undefined\n if (!element.readOnly && element.allowedDrawingTools?.length) {\n drawingLayerId = uuid()\n const drawingLayer = new GraphicsLayer({\n id: drawingLayerId,\n title: 'Drawing',\n })\n drawingLayerRef.current = drawingLayer\n map.layers.add(drawingLayer)\n\n // Add measurement layer above drawing layer\n if (element.measurementDimensionsEnabled) {\n measurementLayerId = uuid()\n const measurementLayer = new GraphicsLayer({\n id: measurementLayerId,\n title: 'Measurements',\n listMode: 'hide',\n })\n measurementLayerRef.current = measurementLayer\n map.layers.add(measurementLayer)\n }\n\n const sketch = new Sketch({\n view,\n layer: drawingLayer,\n creationMode: 'single',\n layout: 'vertical',\n availableCreateTools: [\n 'point',\n 'polyline',\n 'polygon',\n 'rectangle',\n 'circle',\n ].filter((createTool) =>\n element.allowedDrawingTools?.find(\n (tool) => tool.type === createTool,\n ),\n ),\n // hiding the below by default\n visibleElements: {\n duplicateButton: false,\n settingsMenu: false,\n undoRedoMenu: false,\n selectionTools: {\n 'lasso-selection': false,\n 'rectangle-selection': false,\n },\n },\n })\n sketchToolRef.current = sketch\n view.ui.add(sketch, 'bottom-right')\n view.ui.add(drawingOptionsContainerId, 'bottom-right')\n }\n\n // once the view has loaded\n view.when(() => {\n mapViewRef.current = view\n\n // when updating the map on submission value change,\n // we completely wipe all layers and redraw from scratch.\n // The below caters for web maps that load in with pre-existing layers,\n // which is usually the case when a web map id is provided.\n // We will store these pre-existing layers and ensure they're passed\n // to any redraw logic.\n defaultLayersRef.current = map.allLayers\n .toArray()\n .filter(\n (l) => l.id !== measurementLayerId && l.id !== drawingLayerId,\n )\n\n takeScreenShotRef.current = async (\n viewToScreenShot?: ArcGISTypes.ArcGISWebMapElementValue['view'],\n ) => {\n if (viewToScreenShot) {\n await view.goTo(\n {\n center: [\n viewToScreenShot.longitude,\n viewToScreenShot.latitude,\n ],\n zoom: viewToScreenShot.zoom,\n },\n {\n animate: true,\n },\n )\n console.log('waiting for view to render visible')\n await new Promise((resolve) => {\n if (!view.updating) {\n resolve(undefined)\n } else {\n const handle = view.watch('updating', (updating) => {\n if (!updating) {\n handle.remove()\n resolve(undefined)\n }\n })\n }\n })\n }\n const screenshot = await view.takeScreenshot()\n return {\n dataUrl: screenshot.dataUrl,\n }\n }\n setIsLoading(false)\n })\n } catch (e) {\n console.warn('Error while trying to load arcgis web map ', e)\n setLoadError(e as Error)\n setIsLoading(false)\n }\n }\n\n if (!mapViewRef.current && !isLoading) {\n setIsLoading(true)\n loadMap()\n }\n }, [drawingOptionsContainerId, element, isLoading, takeScreenShotRef, value])\n\n React.useEffect(() => {\n if (!isLoading) {\n if (isPageVisible) {\n if (layerPanelRef.current) {\n layerPanelRef.current.visible = true\n }\n if (mapGalleryPanelRef.current) {\n mapGalleryPanelRef.current.visible = true\n }\n } else {\n if (layerPanelRef.current) {\n layerPanelRef.current.visible = false\n }\n if (mapGalleryPanelRef.current) {\n mapGalleryPanelRef.current.visible = false\n }\n }\n }\n }, [isPageVisible, isLoading])\n\n if (loadError) {\n return (\n <figure className=\"ob-figure\">\n <div className=\"figure-content has-text-centered\">\n <MaterialIcon className=\"icon-large has-margin-bottom-6 has-text-warning\">\n error\n </MaterialIcon>\n <h4 className=\"title is-4\">We were unable to display your web map</h4>\n <p>{loadError.message}</p>\n </div>\n </figure>\n )\n }\n\n return (\n <>\n {isLoading && (\n <div className=\"figure-content-absolute-center\">\n <OnLoading small />\n </div>\n )}\n <div\n className=\"arcgis-web-map\"\n ref={ref}\n id={id}\n aria-describedby={props['aria-describedby']}\n />\n <div id={drawingOptionsContainerId}>\n {!!activeSketchToolMenu && sketchToolRef.current && (\n <DrawingOptionsList\n options={\n element.allowedDrawingTools?.find(\n (tool) => tool.type === activeSketchToolMenu,\n )?.graphicAttributeOptions || []\n }\n onClose={() => setActiveSketchToolMenu(undefined)}\n setSelectedGraphicAttributes={(opt) => {\n setSelectedGraphicAttributes(opt)\n }}\n sketchToolType={activeSketchToolMenu}\n sketchTool={sketchToolRef.current}\n />\n )}\n </div>\n </>\n )\n}\n\nexport default React.memo(FormElementArcGISWebMap)\n"]}
1
+ {"version":3,"file":"ArcGISWebMap.js","sourceRoot":"","sources":["../../src/components/ArcGISWebMap.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,OAAO,MAAM,4BAA4B,CAAA;AAChD,OAAO,MAAM,MAAM,qBAAqB,CAAA;AACxC,OAAO,IAAI,MAAM,2BAA2B,CAAA;AAC5C,OAAO,MAAM,MAAM,6BAA6B,CAAA;AAChD,OAAO,IAAI,MAAM,2BAA2B,CAAA;AAC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SAAS,IAAC,KAAK,SAAG,CACf,CACP;QACD,6BACE,SAAS,EAAC,gBAAgB,EAC1B,GAAG,EAAE,GAAG,EACR,EAAE,EAAE,EAAE,sBACY,KAAK,CAAC,kBAAkB,CAAC,GAC3C;QACF,6BAAK,EAAE,EAAE,yBAAyB,IAC/B,CAAC,CAAC,oBAAoB,IAAI,aAAa,CAAC,OAAO,IAAI,CAClD,oBAAC,kBAAkB,IACjB,OAAO,EACL,CAAA,MAAA,MAAA,OAAO,CAAC,mBAAmB,0CAAE,IAAI,CAC/B,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,oBAAoB,CAC7C,0CAAE,uBAAuB,KAAI,EAAE,EAElC,OAAO,EAAE,GAAG,EAAE,CAAC,uBAAuB,CAAC,SAAS,CAAC,EACjD,4BAA4B,EAAE,CAAC,GAAG,EAAE,EAAE;gBACpC,4BAA4B,CAAC,GAAG,CAAC,CAAA;YACnC,CAAC,EACD,cAAc,EAAE,oBAAoB,EACpC,UAAU,EAAE,aAAa,CAAC,OAAO,GACjC,CACH,CACG,CACL,CACJ,CAAA;AACH,CAAC;AAED,eAAe,KAAK,CAAC,IAAI,CAAC,uBAAuB,CAAC,CAAA","sourcesContent":["import * as React from 'react'\nimport { ArcGISTypes, FormTypes } from '@oneblink/types'\nimport MapView from '@arcgis/core/views/MapView'\nimport WebMap from '@arcgis/core/WebMap'\nimport Home from '@arcgis/core/widgets/Home'\nimport Search from '@arcgis/core/widgets/Search'\nimport Zoom from '@arcgis/core/widgets/Zoom'\nimport LayerList from '@arcgis/core/widgets/LayerList'\nimport Expand from '@arcgis/core/widgets/Expand'\nimport BaseMapGallery from '@arcgis/core/widgets/BasemapGallery'\nimport Sketch from '@arcgis/core/widgets/Sketch'\nimport GraphicsLayer from '@arcgis/core/layers/GraphicsLayer'\nimport Graphic from '@arcgis/core/Graphic'\nimport Popup from '@arcgis/core/widgets/Popup'\nimport {\n Point,\n Polygon,\n SpatialReference,\n Polyline,\n} from '@arcgis/core/geometry'\nimport TextSymbol from '@arcgis/core/symbols/TextSymbol'\nimport * as geometryEngine from '@arcgis/core/geometry/geometryEngine'\nimport { Box, Divider, IconButton } from '@mui/material'\nimport throttle from 'lodash.throttle'\nimport { localisationService } from '@oneblink/apps'\nimport { v4 as uuid } from 'uuid'\n\nimport OnLoading from '../components/renderer/OnLoading'\nimport MaterialIcon from './MaterialIcon'\n\nimport useIsPageVisible from '../hooks/useIsPageVisible'\nimport { ArcGISWebMapElementValue } from '@oneblink/types/typescript/arcgis'\nimport { FormElementValueChangeHandler } from '../types/form'\nimport '../styles/arcgis-external.css'\nimport Layer from '@arcgis/core/layers/Layer'\n\ntype Props = {\n element: FormTypes.ArcGISWebMapElement\n id: string\n value: ArcGISWebMapElementValue | undefined\n onChange: FormElementValueChangeHandler<ArcGISWebMapElementValue>\n automatedSnapshotFileName: string\n 'aria-describedby'?: string\n takeScreenShotRef: React.MutableRefObject<\n | ((view?: ArcGISTypes.ArcGISWebMapElementValue['view']) => Promise<{\n dataUrl: string\n }>)\n | undefined\n >\n}\n\ntype SketchCreateTool = Parameters<Sketch['create']>[0]\n\nfunction DrawingOptionsList({\n options,\n sketchTool,\n onClose,\n sketchToolType,\n setSelectedGraphicAttributes,\n}: {\n options: { id: string; label: string; value: string; description?: string }[]\n onClose: () => void\n sketchTool: Sketch\n sketchToolType: SketchCreateTool\n setSelectedGraphicAttributes: (opt: {\n label: string\n value: string\n description?: string\n }) => void\n}) {\n return (\n <div className=\"esri-widget\">\n <Box\n sx={{\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n }}\n >\n <b style={{ padding: '0.5rem' }}>Select an option</b>\n <IconButton\n onClick={(e) => {\n e.stopPropagation()\n onClose()\n }}\n size=\"small\"\n data-cypress=\"copy-to-clip-board-button\"\n >\n <MaterialIcon fontSize=\"small\">close</MaterialIcon>\n </IconButton>\n </Box>\n <Divider sx={{ backgroundColor: 'unset', margin: '0px 8px' }} />\n <Box sx={{ maxHeight: '200px', overflowY: 'auto' }}>\n {options?.map(({ id, value, label, description }) => (\n <div\n key={id}\n className=\"ob-list__item is-clickable\"\n style={{ alignItems: 'center' }}\n onClick={() => {\n onClose()\n sketchTool?.create(sketchToolType)\n setSelectedGraphicAttributes({ value, label, description })\n }}\n >\n {label}\n </div>\n ))}\n </Box>\n </div>\n )\n}\n\nfunction FormElementArcGISWebMap({\n element,\n id,\n value,\n onChange,\n takeScreenShotRef,\n automatedSnapshotFileName,\n ...props\n}: Props) {\n const ref = React.useRef<HTMLDivElement | null>(null)\n const layerPanelRef = React.useRef<Expand>()\n const mapGalleryPanelRef = React.useRef<Expand>()\n const sketchToolRef = React.useRef<Sketch>()\n const drawingLayerRef = React.useRef<GraphicsLayer>()\n const selectedGraphicForUpdate = React.useRef<string>()\n const mapViewRef = React.useRef<MapView>()\n const measurementLayerRef = React.useRef<GraphicsLayer>()\n const defaultLayersRef = React.useRef<Layer[]>()\n\n const [loadError, setLoadError] = React.useState<Error>()\n const [isLoading, setIsLoading] = React.useState<boolean>(false)\n const isPageVisible = useIsPageVisible()\n const [selectedGraphicAttributes, setSelectedGraphicAttributes] =\n React.useState<{\n value: string\n label: string\n description?: string\n }>()\n // only used when an allowed drawing tool also has a list of graphic attribute options to display to the user\n const [activeSketchToolMenu, setActiveSketchToolMenu] =\n React.useState<SketchCreateTool>()\n\n const updateDrawingInputSubmissionValue = React.useCallback(() => {\n const updatedGraphics = drawingLayerRef.current?.graphics\n .toArray()\n .map((graphic) => graphic.toJSON())\n\n onChange(element, {\n value: (existingValue) => ({\n ...(existingValue || {}),\n drawingLayer: updatedGraphics,\n userInput: updatedGraphics,\n // Remove automated snapshot images when drawing again\n snapshotImages: existingValue?.snapshotImages?.filter(\n (snapshotImage) =>\n snapshotImage.fileName !== automatedSnapshotFileName,\n ),\n }),\n })\n }, [automatedSnapshotFileName, element, onChange])\n\n const updateMapViewSubmissionValue = React.useCallback(() => {\n const zoom = mapViewRef.current?.zoom\n const latitude = mapViewRef.current?.center.latitude\n const longitude = mapViewRef.current?.center.longitude\n if (zoom && latitude && longitude) {\n onChange(element, {\n value: (existingValue) => ({\n ...(existingValue || {}),\n view: {\n zoom,\n latitude,\n longitude,\n },\n }),\n })\n }\n }, [element, onChange])\n\n const getGeometryPoints = (\n geom: __esri.Geometry,\n spatialRef: SpatialReference,\n ) => {\n if (geom.type === 'polygon') {\n const polygon = geom as Polygon\n return polygon.rings[0].map(\n (ring) =>\n new Point({\n x: ring[0],\n y: ring[1],\n spatialReference: spatialRef,\n }),\n )\n } else if (geom.type === 'polyline') {\n const polyline = geom as Polyline\n return polyline.paths[0].map(\n (path) =>\n new Point({\n x: path[0],\n y: path[1],\n spatialReference: spatialRef,\n }),\n )\n }\n }\n\n const addMeasurementLabels = React.useCallback(\n (graphics: __esri.Graphic[]) => {\n if (!element.measurementDimensionsEnabled) return\n const spatialRef = new SpatialReference({ wkid: 3857 })\n const measurementLayer = measurementLayerRef.current\n const mapView = mapViewRef.current\n if (!measurementLayer || !mapView) return\n measurementLayer.removeAll()\n\n for (const graphic of graphics) {\n const geom = graphic.geometry\n if (!geom || (geom.type !== 'polygon' && geom.type !== 'polyline'))\n continue\n\n const points = getGeometryPoints(geom, spatialRef)\n if (!points) continue\n\n const { distanceUnit, distanceUnitShortName } =\n localisationService.getDistanceUnits()\n if (distanceUnit !== 'meters' && distanceUnit !== 'feet') {\n console.warn(\n 'Unsupported distance unit provided in tenant configuration: ',\n distanceUnit,\n )\n return\n }\n const graphics: Graphic[] = []\n\n for (let i = 1; i < points.length; i++) {\n const x1 = points[i].x\n const x2 = points[i - 1].x\n const y1 = points[i].y\n const y2 = points[i - 1].y\n\n const midpoint = new Point({\n x: (x1 + x2) / 2,\n y: (y1 + y2) / 2,\n spatialReference: spatialRef,\n })\n\n // Angle of the measurement label - this will be rotated to be parallel with the polygon or polyline edge\n const dx = x2 - x1\n const dy = y2 - y1\n const radians = Math.atan2(dy, dx)\n let angle = radians * (-180 / Math.PI)\n if (angle > 90 || angle < -90) {\n angle += 180\n }\n\n // offset of the measurement label against the edge of the polygon/polyline it's measuring\n const pixelOffset = 10\n const normalAngle = radians + Math.PI / 2\n const offsetScreenX = pixelOffset * Math.cos(normalAngle)\n const offsetScreenY = pixelOffset * Math.sin(normalAngle)\n\n const screenPoint = mapView.toScreen(midpoint)\n screenPoint.x += offsetScreenX\n screenPoint.y -= offsetScreenY\n const offsetMapPoint = mapView.toMap(screenPoint)\n\n const polyline = new Polyline({\n paths: [\n [\n [points[i].longitude, points[i].latitude],\n [points[i - 1].longitude, points[i - 1].latitude],\n ],\n ],\n spatialReference: { wkid: 4326 },\n })\n const distance = geometryEngine.geodesicLength(polyline, distanceUnit)\n graphics.push(\n new Graphic({\n geometry: offsetMapPoint,\n symbol: new TextSymbol({\n text: distance.toFixed(0) + distanceUnitShortName,\n color: 'black',\n haloColor: 'white',\n haloSize: 1,\n angle,\n }),\n }),\n )\n }\n\n measurementLayer.addMany(graphics)\n mapViewRef.current?.map.reorder(\n measurementLayer,\n mapViewRef.current?.map.layers.length,\n )\n }\n },\n [element],\n )\n\n const clearMeasurementLabels = React.useCallback(() => {\n if (measurementLayerRef.current) {\n measurementLayerRef.current.removeAll()\n }\n }, [])\n\n React.useEffect(() => {\n if (element.readOnly) return\n // event listeners for drawing tool creates/updates/deletes\n // these need to be removed and recreated when the submission value changes\n // to ensure they always have access to the latest submission value\n const createListener = sketchToolRef.current?.on(\n 'create',\n throttle((sketchEvent: __esri.SketchCreateEvent) => {\n if (sketchEvent.state === 'active') {\n addMeasurementLabels([sketchEvent.graphic])\n }\n if (sketchEvent.state === 'complete') {\n if (selectedGraphicAttributes) {\n sketchEvent.graphic.attributes = {\n name: selectedGraphicAttributes.value,\n label: selectedGraphicAttributes.label,\n description: selectedGraphicAttributes.description,\n }\n setSelectedGraphicAttributes(undefined)\n }\n updateDrawingInputSubmissionValue()\n clearMeasurementLabels()\n }\n if (sketchEvent.state === 'cancel') {\n setSelectedGraphicAttributes(undefined)\n clearMeasurementLabels()\n }\n }, 100),\n )\n\n const updateListener = sketchToolRef.current?.on(\n 'update',\n throttle((sketchEvent: __esri.SketchUpdateEvent) => {\n if (sketchEvent.state === 'active') {\n addMeasurementLabels(sketchEvent.graphics)\n }\n if (sketchEvent.state === 'complete') {\n // only update the submission value if the graphic's geometry was actually changed\n if (\n JSON.stringify(sketchEvent.graphics[0].geometry.toJSON()) !==\n selectedGraphicForUpdate.current\n ) {\n updateDrawingInputSubmissionValue()\n }\n selectedGraphicForUpdate.current = undefined\n clearMeasurementLabels()\n }\n if (sketchEvent.state === 'start') {\n selectedGraphicForUpdate.current = JSON.stringify(\n sketchEvent.graphics[0].geometry.clone().toJSON(),\n )\n addMeasurementLabels(sketchEvent.graphics)\n }\n }, 100),\n )\n\n const deleteListener = sketchToolRef.current?.on('delete', () => {\n mapViewRef.current?.closePopup()\n updateDrawingInputSubmissionValue()\n clearMeasurementLabels()\n })\n\n const mapViewChangeListener = mapViewRef.current?.watch(\n 'stationary',\n () => {\n const mapView = mapViewRef.current\n if (mapView && mapView.stationary) {\n const hasViewChanged =\n mapView.zoom !== value?.view?.zoom ||\n mapView.center.longitude !== value?.view?.longitude ||\n mapView.center.latitude !== value?.view?.latitude\n if (hasViewChanged) {\n updateMapViewSubmissionValue()\n }\n }\n },\n )\n\n const sketchToolListener = sketchToolRef.current?.viewModel.watch(\n 'activeTool',\n () => {\n if (selectedGraphicAttributes) {\n return\n }\n const activeTool = sketchToolRef.current?.activeTool\n const hasGraphicAttributeOptions = !!element.allowedDrawingTools?.find(\n (tool) => tool.type === activeTool,\n )?.graphicAttributeOptions?.length\n\n if (activeTool) {\n if (\n hasGraphicAttributeOptions &&\n (activeTool === 'point' ||\n activeTool === 'polygon' ||\n activeTool === 'circle' ||\n activeTool === 'rectangle' ||\n activeTool === 'polyline')\n ) {\n // the sketch.create() fn only allows active tools of the above 5 types\n // hence we must check above to keep the types happy further down the line\n sketchToolRef.current?.cancel()\n setActiveSketchToolMenu(activeTool)\n } else {\n setActiveSketchToolMenu(undefined)\n }\n }\n },\n )\n\n mapViewRef.current?.on('click', (event) => {\n mapViewRef.current?.hitTest(event).then((response) => {\n // the \"hit test\" will typically yield the graphic we want to display the popup for,\n // and an ArcGIS built-in graphic which highlights the selected graphic.\n // By filtering for the graphic with the \"label\" attribute, we're able to reliably\n // get the graphic we want to display the popup for.\n const result = response.results\n .filter((r) => r.type === 'graphic')\n .find((r) => !!r.graphic.attributes?.label)\n\n if (result) {\n mapViewRef.current?.openPopup({\n title: result.graphic.attributes.label,\n content: result.graphic.attributes.description,\n })\n }\n })\n })\n\n return () => {\n createListener?.remove()\n updateListener?.remove()\n deleteListener?.remove()\n mapViewChangeListener?.remove()\n sketchToolListener?.remove()\n }\n }, [\n isLoading,\n value,\n updateDrawingInputSubmissionValue,\n updateMapViewSubmissionValue,\n element,\n selectedGraphicAttributes,\n addMeasurementLabels,\n clearMeasurementLabels,\n ])\n\n const stringifedLayersRef = React.useRef<string>('')\n\n const onSubmissionValueChange = React.useCallback(() => {\n const view = mapViewRef.current\n const map = mapViewRef.current?.map\n if (!view || !map) return\n\n // if the layers have changed or if the map has no layers, remove all layers and repaint\n const currentStringifedLayers = JSON.stringify(value?.layers)\n if (\n stringifedLayersRef.current !== currentStringifedLayers ||\n !map.layers.length\n ) {\n stringifedLayersRef.current = currentStringifedLayers\n // remove all layers and repaint\n map.layers.removeAll()\n if (defaultLayersRef.current) {\n // redraw default layers first\n defaultLayersRef.current.forEach((layer) => {\n map.add(layer)\n })\n }\n\n if (value?.layers) {\n for (const layer of value.layers) {\n const newLayer = new GraphicsLayer({\n title: layer.title as string,\n id: layer.id,\n })\n newLayer.addMany(layer.graphics.map((g) => Graphic.fromJSON(g)))\n newLayer.visible =\n typeof layer.visible === 'boolean' ? layer.visible : true\n map.layers.add(newLayer)\n }\n }\n }\n\n // add the web map's drawing and measurement layers back\n const drawingLayer = drawingLayerRef.current\n if (value?.drawingLayer && drawingLayer) {\n drawingLayer.removeAll()\n drawingLayer.addMany(value.drawingLayer.map((g) => Graphic.fromJSON(g)))\n map.layers.add(drawingLayer)\n map.layers.reorder(drawingLayer, map.layers.length - 1)\n }\n if (measurementLayerRef.current) {\n map.layers.add(measurementLayerRef.current)\n map.layers.reorder(measurementLayerRef.current, map.layers.length - 1)\n }\n if (value?.view) {\n view.zoom = value.view.zoom\n view.center = new Point({\n latitude: value.view.latitude,\n longitude: value.view.longitude,\n })\n }\n }, [value])\n\n React.useEffect(() => {\n if (!isLoading && mapViewRef.current) {\n onSubmissionValueChange()\n }\n // only run the above when the submission value changes or the map finishes loading\n }, [onSubmissionValueChange, isLoading])\n\n const drawingOptionsContainerId = `OneBlinkDrawingOptionsSelector-${element.id}`\n\n React.useEffect(() => {\n const loadMap = async () => {\n try {\n const map = new WebMap({\n portalItem: {\n id: element.webMapId,\n },\n basemap: element.basemapId || 'streets',\n })\n await map.load()\n\n const view = new MapView({\n map,\n container: ref.current || undefined,\n popup: new Popup({\n dockEnabled: true,\n dockOptions: {\n buttonEnabled: false,\n breakpoint: false,\n position: 'bottom-left',\n },\n }),\n })\n\n // remove default widgets\n const components = view.ui.getComponents()\n for (const component of components) {\n view.ui.remove(component)\n }\n\n if (element.addressSearchWidgetEnabled) {\n view.ui.add(\n new Search({\n view,\n }),\n 'top-left',\n )\n }\n\n if (element.homeWidgetEnabled) {\n view.ui.add(\n new Home({\n view,\n }),\n 'top-left',\n )\n }\n\n view.ui.add(\n new Zoom({\n view,\n }),\n 'bottom-right',\n )\n\n const layerList = new LayerList({\n view,\n })\n\n layerPanelRef.current = new Expand({\n expandIcon: 'layers',\n view,\n content: layerList,\n expanded: element.showLayerPanel,\n mode: 'floating',\n visible: false,\n })\n\n view.ui.add(layerPanelRef.current, 'top-right')\n\n const baseMapGallery = new BaseMapGallery({ view })\n\n mapGalleryPanelRef.current = new Expand({\n expandIcon: 'basemap',\n view,\n content: baseMapGallery,\n mode: 'floating',\n visible: false,\n })\n\n view.ui.add(mapGalleryPanelRef.current, 'top-left')\n\n let drawingLayerId: string | undefined\n let measurementLayerId: string | undefined\n if (!element.readOnly && element.allowedDrawingTools?.length) {\n drawingLayerId = uuid()\n const drawingLayer = new GraphicsLayer({\n id: drawingLayerId,\n title: 'Drawing',\n })\n drawingLayerRef.current = drawingLayer\n map.layers.add(drawingLayer)\n\n // Add measurement layer above drawing layer\n if (element.measurementDimensionsEnabled) {\n measurementLayerId = uuid()\n const measurementLayer = new GraphicsLayer({\n id: measurementLayerId,\n title: 'Measurements',\n listMode: 'hide',\n })\n measurementLayerRef.current = measurementLayer\n map.layers.add(measurementLayer)\n }\n\n const sketch = new Sketch({\n view,\n layer: drawingLayer,\n creationMode: 'single',\n layout: 'vertical',\n availableCreateTools: [\n 'point',\n 'polyline',\n 'polygon',\n 'rectangle',\n 'circle',\n ].filter((createTool) =>\n element.allowedDrawingTools?.find(\n (tool) => tool.type === createTool,\n ),\n ),\n // hiding the below by default\n visibleElements: {\n duplicateButton: false,\n settingsMenu: false,\n undoRedoMenu: false,\n selectionTools: {\n 'lasso-selection': false,\n 'rectangle-selection': false,\n },\n },\n })\n sketchToolRef.current = sketch\n view.ui.add(sketch, 'bottom-right')\n view.ui.add(drawingOptionsContainerId, 'bottom-right')\n }\n\n // once the view has loaded\n view.when(() => {\n mapViewRef.current = view\n\n // when updating the map on submission value change,\n // we completely wipe all layers and redraw from scratch.\n // The below caters for web maps that load in with pre-existing layers,\n // which is usually the case when a web map id is provided.\n // We will store these pre-existing layers and ensure they're passed\n // to any redraw logic. We take layers from map.layers (as opposed to map.allLayers)\n // as this omits system generated layers like the basemap, which aren't removed when\n // we redraw regardless.\n defaultLayersRef.current = map.layers\n .toArray()\n .filter(\n (l) => l.id !== measurementLayerId && l.id !== drawingLayerId,\n )\n\n takeScreenShotRef.current = async (\n viewToScreenShot?: ArcGISTypes.ArcGISWebMapElementValue['view'],\n ) => {\n if (viewToScreenShot) {\n await view.goTo(\n {\n center: [\n viewToScreenShot.longitude,\n viewToScreenShot.latitude,\n ],\n zoom: viewToScreenShot.zoom,\n },\n {\n animate: true,\n },\n )\n console.log('waiting for view to render visible')\n await new Promise((resolve) => {\n if (!view.updating) {\n resolve(undefined)\n } else {\n const handle = view.watch('updating', (updating) => {\n if (!updating) {\n handle.remove()\n resolve(undefined)\n }\n })\n }\n })\n }\n const screenshot = await view.takeScreenshot()\n return {\n dataUrl: screenshot.dataUrl,\n }\n }\n setIsLoading(false)\n })\n } catch (e) {\n console.warn('Error while trying to load arcgis web map ', e)\n setLoadError(e as Error)\n setIsLoading(false)\n }\n }\n\n if (!mapViewRef.current && !isLoading) {\n setIsLoading(true)\n loadMap()\n }\n }, [drawingOptionsContainerId, element, isLoading, takeScreenShotRef, value])\n\n React.useEffect(() => {\n if (!isLoading) {\n if (isPageVisible) {\n if (layerPanelRef.current) {\n layerPanelRef.current.visible = true\n }\n if (mapGalleryPanelRef.current) {\n mapGalleryPanelRef.current.visible = true\n }\n } else {\n if (layerPanelRef.current) {\n layerPanelRef.current.visible = false\n }\n if (mapGalleryPanelRef.current) {\n mapGalleryPanelRef.current.visible = false\n }\n }\n }\n }, [isPageVisible, isLoading])\n\n if (loadError) {\n return (\n <figure className=\"ob-figure\">\n <div className=\"figure-content has-text-centered\">\n <MaterialIcon className=\"icon-large has-margin-bottom-6 has-text-warning\">\n error\n </MaterialIcon>\n <h4 className=\"title is-4\">We were unable to display your web map</h4>\n <p>{loadError.message}</p>\n </div>\n </figure>\n )\n }\n\n return (\n <>\n {isLoading && (\n <div className=\"figure-content-absolute-center\">\n <OnLoading small />\n </div>\n )}\n <div\n className=\"arcgis-web-map\"\n ref={ref}\n id={id}\n aria-describedby={props['aria-describedby']}\n />\n <div id={drawingOptionsContainerId}>\n {!!activeSketchToolMenu && sketchToolRef.current && (\n <DrawingOptionsList\n options={\n element.allowedDrawingTools?.find(\n (tool) => tool.type === activeSketchToolMenu,\n )?.graphicAttributeOptions || []\n }\n onClose={() => setActiveSketchToolMenu(undefined)}\n setSelectedGraphicAttributes={(opt) => {\n setSelectedGraphicAttributes(opt)\n }}\n sketchToolType={activeSketchToolMenu}\n sketchTool={sketchToolRef.current}\n />\n )}\n </div>\n </>\n )\n}\n\nexport default React.memo(FormElementArcGISWebMap)\n"]}
@@ -109,6 +109,17 @@
109
109
  }
110
110
 
111
111
  .ob-cropper__container {
112
+ //
113
+ // Third Party
114
+ //
115
+ --rc-drag-handle-size: 12px;
116
+ --rc-drag-handle-mobile-size: 24px;
117
+ --rc-drag-handle-bg-colour: rgba(0, 0, 0, 0.2);
118
+ --rc-drag-bar-size: 6px; // The invisible grip size of the crop selection edges
119
+ --rc-border-color: rgba(255, 255, 255, 0.7);
120
+ --rc-focus-color: #0088ff;
121
+ @import 'react-image-crop/src/ReactCrop.scss';
122
+
112
123
  width: 100%;
113
124
  height: 100%;
114
125
  display: flex;
package/dist/styles.css CHANGED
@@ -8204,11 +8204,255 @@ button on-loading {
8204
8204
  }
8205
8205
 
8206
8206
  .ob-cropper__container {
8207
+ --rc-drag-handle-size: 12px;
8208
+ --rc-drag-handle-mobile-size: 24px;
8209
+ --rc-drag-handle-bg-colour: rgba(0, 0, 0, 0.2);
8210
+ --rc-drag-bar-size: 6px;
8211
+ --rc-border-color: rgba(255, 255, 255, 0.7);
8212
+ --rc-focus-color: #0088ff;
8207
8213
  width: 100%;
8208
8214
  height: 100%;
8209
8215
  display: flex;
8210
8216
  flex-direction: column;
8211
8217
  }
8218
+ @keyframes marching-ants {
8219
+ 0% {
8220
+ background-position: 0 0, 0 100%, 0 0, 100% 0;
8221
+ }
8222
+ 100% {
8223
+ background-position: 20px 0, -20px 100%, 0 -20px, 100% 20px;
8224
+ }
8225
+ }
8226
+ .ob-cropper__container :root {
8227
+ --rc-drag-handle-size: 12px;
8228
+ --rc-drag-handle-mobile-size: 24px;
8229
+ --rc-drag-handle-bg-colour: rgba(0, 0, 0, 0.2);
8230
+ --rc-drag-bar-size: 6px;
8231
+ --rc-border-color: rgba(255, 255, 255, 0.7);
8232
+ --rc-focus-color: #0088ff;
8233
+ }
8234
+ .ob-cropper__container .ReactCrop {
8235
+ position: relative;
8236
+ display: inline-block;
8237
+ cursor: crosshair;
8238
+ max-width: 100%;
8239
+ }
8240
+ .ob-cropper__container .ReactCrop *, .ob-cropper__container .ReactCrop *::before, .ob-cropper__container .ReactCrop *::after {
8241
+ box-sizing: border-box;
8242
+ }
8243
+ .ob-cropper__container .ReactCrop--disabled, .ob-cropper__container .ReactCrop--locked {
8244
+ cursor: inherit;
8245
+ }
8246
+ .ob-cropper__container .ReactCrop__child-wrapper {
8247
+ overflow: hidden;
8248
+ max-height: inherit;
8249
+ }
8250
+ .ob-cropper__container .ReactCrop__child-wrapper > img, .ob-cropper__container .ReactCrop__child-wrapper > video {
8251
+ display: block;
8252
+ max-width: 100%;
8253
+ max-height: inherit;
8254
+ }
8255
+ .ob-cropper__container .ReactCrop:not(.ob-cropper__container .ReactCrop--disabled) .ob-cropper__container .ReactCrop__child-wrapper > img, .ob-cropper__container .ReactCrop:not(.ob-cropper__container .ReactCrop--disabled) .ob-cropper__container .ReactCrop__child-wrapper > video {
8256
+ touch-action: none;
8257
+ }
8258
+ .ob-cropper__container .ReactCrop:not(.ob-cropper__container .ReactCrop--disabled) .ob-cropper__container .ReactCrop__crop-selection {
8259
+ touch-action: none;
8260
+ }
8261
+ .ob-cropper__container .ReactCrop__crop-mask {
8262
+ position: absolute;
8263
+ top: 0;
8264
+ right: 0;
8265
+ bottom: 0;
8266
+ left: 0;
8267
+ pointer-events: none;
8268
+ width: calc(100% + 0.5px);
8269
+ height: calc(100% + 0.5px);
8270
+ }
8271
+ .ob-cropper__container .ReactCrop__crop-selection {
8272
+ position: absolute;
8273
+ top: 0;
8274
+ left: 0;
8275
+ transform: translate3d(0, 0, 0);
8276
+ cursor: move;
8277
+ }
8278
+ .ReactCrop--disabled .ob-cropper__container .ReactCrop__crop-selection {
8279
+ cursor: inherit;
8280
+ }
8281
+ .ReactCrop--circular-crop .ob-cropper__container .ReactCrop__crop-selection {
8282
+ border-radius: 50%;
8283
+ }
8284
+ .ReactCrop--circular-crop .ob-cropper__container .ReactCrop__crop-selection::after {
8285
+ pointer-events: none;
8286
+ content: "";
8287
+ position: absolute;
8288
+ top: -1px;
8289
+ right: -1px;
8290
+ bottom: -1px;
8291
+ left: -1px;
8292
+ border: 1px solid var(--rc-border-color);
8293
+ opacity: 0.3;
8294
+ }
8295
+ .ReactCrop--no-animate .ob-cropper__container .ReactCrop__crop-selection {
8296
+ outline: 1px dashed white;
8297
+ }
8298
+ .ob-cropper__container .ReactCrop__crop-selection:not(.ReactCrop--no-animate .ob-cropper__container .ReactCrop__crop-selection) {
8299
+ animation: marching-ants 1s;
8300
+ background-image: linear-gradient(to right, #fff 50%, #444 50%), linear-gradient(to right, #fff 50%, #444 50%), linear-gradient(to bottom, #fff 50%, #444 50%), linear-gradient(to bottom, #fff 50%, #444 50%);
8301
+ background-size: 10px 1px, 10px 1px, 1px 10px, 1px 10px;
8302
+ background-position: 0 0, 0 100%, 0 0, 100% 0;
8303
+ background-repeat: repeat-x, repeat-x, repeat-y, repeat-y;
8304
+ color: #fff;
8305
+ animation-play-state: running;
8306
+ animation-timing-function: linear;
8307
+ animation-iteration-count: infinite;
8308
+ }
8309
+ .ob-cropper__container .ReactCrop__crop-selection:focus {
8310
+ outline: 2px solid var(--rc-focus-color);
8311
+ outline-offset: -1px;
8312
+ }
8313
+ .ob-cropper__container .ReactCrop--invisible-crop .ob-cropper__container .ReactCrop__crop-mask, .ob-cropper__container .ReactCrop--invisible-crop .ob-cropper__container .ReactCrop__crop-selection {
8314
+ display: none;
8315
+ }
8316
+ .ob-cropper__container .ReactCrop__rule-of-thirds-vt::before, .ob-cropper__container .ReactCrop__rule-of-thirds-vt::after, .ob-cropper__container .ReactCrop__rule-of-thirds-hz::before, .ob-cropper__container .ReactCrop__rule-of-thirds-hz::after {
8317
+ content: "";
8318
+ display: block;
8319
+ position: absolute;
8320
+ background-color: rgba(255, 255, 255, 0.4);
8321
+ }
8322
+ .ob-cropper__container .ReactCrop__rule-of-thirds-vt::before, .ob-cropper__container .ReactCrop__rule-of-thirds-vt::after {
8323
+ width: 1px;
8324
+ height: 100%;
8325
+ }
8326
+ .ob-cropper__container .ReactCrop__rule-of-thirds-vt::before {
8327
+ left: 33.3333%;
8328
+ left: 33.3333333333%;
8329
+ }
8330
+ .ob-cropper__container .ReactCrop__rule-of-thirds-vt::after {
8331
+ left: 66.6666%;
8332
+ left: 66.6666666667%;
8333
+ }
8334
+ .ob-cropper__container .ReactCrop__rule-of-thirds-hz::before, .ob-cropper__container .ReactCrop__rule-of-thirds-hz::after {
8335
+ width: 100%;
8336
+ height: 1px;
8337
+ }
8338
+ .ob-cropper__container .ReactCrop__rule-of-thirds-hz::before {
8339
+ top: 33.3333%;
8340
+ top: 33.3333333333%;
8341
+ }
8342
+ .ob-cropper__container .ReactCrop__rule-of-thirds-hz::after {
8343
+ top: 66.6666%;
8344
+ top: 66.6666666667%;
8345
+ }
8346
+ .ob-cropper__container .ReactCrop__drag-handle {
8347
+ position: absolute;
8348
+ width: var(--rc-drag-handle-size);
8349
+ height: var(--rc-drag-handle-size);
8350
+ background-color: var(--rc-drag-handle-bg-colour);
8351
+ border: 1px solid var(--rc-border-color);
8352
+ }
8353
+ .ob-cropper__container .ReactCrop__drag-handle:focus {
8354
+ background: var(--rc-focus-color);
8355
+ }
8356
+ .ob-cropper__container .ReactCrop .ord-nw {
8357
+ top: 0;
8358
+ left: 0;
8359
+ transform: translate(-50%, -50%);
8360
+ cursor: nw-resize;
8361
+ }
8362
+ .ob-cropper__container .ReactCrop .ord-n {
8363
+ top: 0;
8364
+ left: 50%;
8365
+ transform: translate(-50%, -50%);
8366
+ cursor: n-resize;
8367
+ }
8368
+ .ob-cropper__container .ReactCrop .ord-ne {
8369
+ top: 0;
8370
+ right: 0;
8371
+ transform: translate(50%, -50%);
8372
+ cursor: ne-resize;
8373
+ }
8374
+ .ob-cropper__container .ReactCrop .ord-e {
8375
+ top: 50%;
8376
+ right: 0;
8377
+ transform: translate(50%, -50%);
8378
+ cursor: e-resize;
8379
+ }
8380
+ .ob-cropper__container .ReactCrop .ord-se {
8381
+ bottom: 0;
8382
+ right: 0;
8383
+ transform: translate(50%, 50%);
8384
+ cursor: se-resize;
8385
+ }
8386
+ .ob-cropper__container .ReactCrop .ord-s {
8387
+ bottom: 0;
8388
+ left: 50%;
8389
+ transform: translate(-50%, 50%);
8390
+ cursor: s-resize;
8391
+ }
8392
+ .ob-cropper__container .ReactCrop .ord-sw {
8393
+ bottom: 0;
8394
+ left: 0;
8395
+ transform: translate(-50%, 50%);
8396
+ cursor: sw-resize;
8397
+ }
8398
+ .ob-cropper__container .ReactCrop .ord-w {
8399
+ top: 50%;
8400
+ left: 0;
8401
+ transform: translate(-50%, -50%);
8402
+ cursor: w-resize;
8403
+ }
8404
+ .ob-cropper__container .ReactCrop__disabled .ob-cropper__container .ReactCrop__drag-handle {
8405
+ cursor: inherit;
8406
+ }
8407
+ .ob-cropper__container .ReactCrop__drag-bar {
8408
+ position: absolute;
8409
+ }
8410
+ .ob-cropper__container .ReactCrop__drag-bar.ord-n {
8411
+ top: 0;
8412
+ left: 0;
8413
+ width: 100%;
8414
+ height: var(--rc-drag-bar-size);
8415
+ transform: translateY(-50%);
8416
+ }
8417
+ .ob-cropper__container .ReactCrop__drag-bar.ord-e {
8418
+ right: 0;
8419
+ top: 0;
8420
+ width: var(--rc-drag-bar-size);
8421
+ height: 100%;
8422
+ transform: translateX(50%);
8423
+ }
8424
+ .ob-cropper__container .ReactCrop__drag-bar.ord-s {
8425
+ bottom: 0;
8426
+ left: 0;
8427
+ width: 100%;
8428
+ height: var(--rc-drag-bar-size);
8429
+ transform: translateY(50%);
8430
+ }
8431
+ .ob-cropper__container .ReactCrop__drag-bar.ord-w {
8432
+ top: 0;
8433
+ left: 0;
8434
+ width: var(--rc-drag-bar-size);
8435
+ height: 100%;
8436
+ transform: translateX(-50%);
8437
+ }
8438
+ .ob-cropper__container .ReactCrop--new-crop .ob-cropper__container .ReactCrop__drag-bar, .ob-cropper__container .ReactCrop--new-crop .ob-cropper__container .ReactCrop__drag-handle, .ob-cropper__container .ReactCrop--fixed-aspect .ob-cropper__container .ReactCrop__drag-bar {
8439
+ display: none;
8440
+ }
8441
+ .ob-cropper__container .ReactCrop--fixed-aspect .ob-cropper__container .ReactCrop__drag-handle.ord-n, .ob-cropper__container .ReactCrop--fixed-aspect .ob-cropper__container .ReactCrop__drag-handle.ord-e, .ob-cropper__container .ReactCrop--fixed-aspect .ob-cropper__container .ReactCrop__drag-handle.ord-s, .ob-cropper__container .ReactCrop--fixed-aspect .ob-cropper__container .ReactCrop__drag-handle.ord-w {
8442
+ display: none;
8443
+ }
8444
+ @media (pointer: coarse) {
8445
+ .ob-cropper__container .ReactCrop .ord-n,
8446
+ .ob-cropper__container .ReactCrop .ord-e,
8447
+ .ob-cropper__container .ReactCrop .ord-s,
8448
+ .ob-cropper__container .ReactCrop .ord-w {
8449
+ display: none;
8450
+ }
8451
+ .ob-cropper__container .ReactCrop__drag-handle {
8452
+ width: var(--rc-drag-handle-mobile-size);
8453
+ height: var(--rc-drag-handle-mobile-size);
8454
+ }
8455
+ }
8212
8456
  .ob-cropper__container .ob-cropper__cropper-full-height {
8213
8457
  height: 100%;
8214
8458
  }
@@ -10206,243 +10450,3 @@ textarea:disabled {
10206
10450
  .ob-downloadable-files__error-pdf {
10207
10451
  padding-bottom: 1.5rem;
10208
10452
  }
10209
-
10210
- @keyframes marching-ants {
10211
- 0% {
10212
- background-position: 0 0, 0 100%, 0 0, 100% 0;
10213
- }
10214
- 100% {
10215
- background-position: 20px 0, -20px 100%, 0 -20px, 100% 20px;
10216
- }
10217
- }
10218
- :root {
10219
- --rc-drag-handle-size: 12px;
10220
- --rc-drag-handle-mobile-size: 24px;
10221
- --rc-drag-handle-bg-colour: rgba(0, 0, 0, 0.2);
10222
- --rc-drag-bar-size: 6px;
10223
- --rc-border-color: rgba(255, 255, 255, 0.7);
10224
- --rc-focus-color: #0088ff;
10225
- }
10226
-
10227
- .ReactCrop {
10228
- position: relative;
10229
- display: inline-block;
10230
- cursor: crosshair;
10231
- max-width: 100%;
10232
- }
10233
- .ReactCrop *, .ReactCrop *::before, .ReactCrop *::after {
10234
- box-sizing: border-box;
10235
- }
10236
- .ReactCrop--disabled, .ReactCrop--locked {
10237
- cursor: inherit;
10238
- }
10239
- .ReactCrop__child-wrapper {
10240
- overflow: hidden;
10241
- max-height: inherit;
10242
- }
10243
- .ReactCrop__child-wrapper > img, .ReactCrop__child-wrapper > video {
10244
- display: block;
10245
- max-width: 100%;
10246
- max-height: inherit;
10247
- }
10248
- .ReactCrop:not(.ReactCrop--disabled) .ReactCrop__child-wrapper > img, .ReactCrop:not(.ReactCrop--disabled) .ReactCrop__child-wrapper > video {
10249
- touch-action: none;
10250
- }
10251
- .ReactCrop:not(.ReactCrop--disabled) .ReactCrop__crop-selection {
10252
- touch-action: none;
10253
- }
10254
- .ReactCrop__crop-mask {
10255
- position: absolute;
10256
- top: 0;
10257
- right: 0;
10258
- bottom: 0;
10259
- left: 0;
10260
- pointer-events: none;
10261
- width: calc(100% + 0.5px);
10262
- height: calc(100% + 0.5px);
10263
- }
10264
- .ReactCrop__crop-selection {
10265
- position: absolute;
10266
- top: 0;
10267
- left: 0;
10268
- transform: translate3d(0, 0, 0);
10269
- cursor: move;
10270
- }
10271
- .ReactCrop--disabled .ReactCrop__crop-selection {
10272
- cursor: inherit;
10273
- }
10274
- .ReactCrop--circular-crop .ReactCrop__crop-selection {
10275
- border-radius: 50%;
10276
- }
10277
- .ReactCrop--circular-crop .ReactCrop__crop-selection::after {
10278
- pointer-events: none;
10279
- content: "";
10280
- position: absolute;
10281
- top: -1px;
10282
- right: -1px;
10283
- bottom: -1px;
10284
- left: -1px;
10285
- border: 1px solid var(--rc-border-color);
10286
- opacity: 0.3;
10287
- }
10288
- .ReactCrop--no-animate .ReactCrop__crop-selection {
10289
- outline: 1px dashed white;
10290
- }
10291
- .ReactCrop__crop-selection:not(.ReactCrop--no-animate .ReactCrop__crop-selection) {
10292
- animation: marching-ants 1s;
10293
- background-image: linear-gradient(to right, #fff 50%, #444 50%), linear-gradient(to right, #fff 50%, #444 50%), linear-gradient(to bottom, #fff 50%, #444 50%), linear-gradient(to bottom, #fff 50%, #444 50%);
10294
- background-size: 10px 1px, 10px 1px, 1px 10px, 1px 10px;
10295
- background-position: 0 0, 0 100%, 0 0, 100% 0;
10296
- background-repeat: repeat-x, repeat-x, repeat-y, repeat-y;
10297
- color: #fff;
10298
- animation-play-state: running;
10299
- animation-timing-function: linear;
10300
- animation-iteration-count: infinite;
10301
- }
10302
- .ReactCrop__crop-selection:focus {
10303
- outline: 2px solid var(--rc-focus-color);
10304
- outline-offset: -1px;
10305
- }
10306
- .ReactCrop--invisible-crop .ReactCrop__crop-mask, .ReactCrop--invisible-crop .ReactCrop__crop-selection {
10307
- display: none;
10308
- }
10309
- .ReactCrop__rule-of-thirds-vt::before, .ReactCrop__rule-of-thirds-vt::after, .ReactCrop__rule-of-thirds-hz::before, .ReactCrop__rule-of-thirds-hz::after {
10310
- content: "";
10311
- display: block;
10312
- position: absolute;
10313
- background-color: rgba(255, 255, 255, 0.4);
10314
- }
10315
- .ReactCrop__rule-of-thirds-vt::before, .ReactCrop__rule-of-thirds-vt::after {
10316
- width: 1px;
10317
- height: 100%;
10318
- }
10319
- .ReactCrop__rule-of-thirds-vt::before {
10320
- left: 33.3333%;
10321
- left: 33.3333333333%;
10322
- }
10323
- .ReactCrop__rule-of-thirds-vt::after {
10324
- left: 66.6666%;
10325
- left: 66.6666666667%;
10326
- }
10327
- .ReactCrop__rule-of-thirds-hz::before, .ReactCrop__rule-of-thirds-hz::after {
10328
- width: 100%;
10329
- height: 1px;
10330
- }
10331
- .ReactCrop__rule-of-thirds-hz::before {
10332
- top: 33.3333%;
10333
- top: 33.3333333333%;
10334
- }
10335
- .ReactCrop__rule-of-thirds-hz::after {
10336
- top: 66.6666%;
10337
- top: 66.6666666667%;
10338
- }
10339
- .ReactCrop__drag-handle {
10340
- position: absolute;
10341
- width: var(--rc-drag-handle-size);
10342
- height: var(--rc-drag-handle-size);
10343
- background-color: var(--rc-drag-handle-bg-colour);
10344
- border: 1px solid var(--rc-border-color);
10345
- }
10346
- .ReactCrop__drag-handle:focus {
10347
- background: var(--rc-focus-color);
10348
- }
10349
- .ReactCrop .ord-nw {
10350
- top: 0;
10351
- left: 0;
10352
- transform: translate(-50%, -50%);
10353
- cursor: nw-resize;
10354
- }
10355
- .ReactCrop .ord-n {
10356
- top: 0;
10357
- left: 50%;
10358
- transform: translate(-50%, -50%);
10359
- cursor: n-resize;
10360
- }
10361
- .ReactCrop .ord-ne {
10362
- top: 0;
10363
- right: 0;
10364
- transform: translate(50%, -50%);
10365
- cursor: ne-resize;
10366
- }
10367
- .ReactCrop .ord-e {
10368
- top: 50%;
10369
- right: 0;
10370
- transform: translate(50%, -50%);
10371
- cursor: e-resize;
10372
- }
10373
- .ReactCrop .ord-se {
10374
- bottom: 0;
10375
- right: 0;
10376
- transform: translate(50%, 50%);
10377
- cursor: se-resize;
10378
- }
10379
- .ReactCrop .ord-s {
10380
- bottom: 0;
10381
- left: 50%;
10382
- transform: translate(-50%, 50%);
10383
- cursor: s-resize;
10384
- }
10385
- .ReactCrop .ord-sw {
10386
- bottom: 0;
10387
- left: 0;
10388
- transform: translate(-50%, 50%);
10389
- cursor: sw-resize;
10390
- }
10391
- .ReactCrop .ord-w {
10392
- top: 50%;
10393
- left: 0;
10394
- transform: translate(-50%, -50%);
10395
- cursor: w-resize;
10396
- }
10397
- .ReactCrop__disabled .ReactCrop__drag-handle {
10398
- cursor: inherit;
10399
- }
10400
- .ReactCrop__drag-bar {
10401
- position: absolute;
10402
- }
10403
- .ReactCrop__drag-bar.ord-n {
10404
- top: 0;
10405
- left: 0;
10406
- width: 100%;
10407
- height: var(--rc-drag-bar-size);
10408
- transform: translateY(-50%);
10409
- }
10410
- .ReactCrop__drag-bar.ord-e {
10411
- right: 0;
10412
- top: 0;
10413
- width: var(--rc-drag-bar-size);
10414
- height: 100%;
10415
- transform: translateX(50%);
10416
- }
10417
- .ReactCrop__drag-bar.ord-s {
10418
- bottom: 0;
10419
- left: 0;
10420
- width: 100%;
10421
- height: var(--rc-drag-bar-size);
10422
- transform: translateY(50%);
10423
- }
10424
- .ReactCrop__drag-bar.ord-w {
10425
- top: 0;
10426
- left: 0;
10427
- width: var(--rc-drag-bar-size);
10428
- height: 100%;
10429
- transform: translateX(-50%);
10430
- }
10431
- .ReactCrop--new-crop .ReactCrop__drag-bar, .ReactCrop--new-crop .ReactCrop__drag-handle, .ReactCrop--fixed-aspect .ReactCrop__drag-bar {
10432
- display: none;
10433
- }
10434
- .ReactCrop--fixed-aspect .ReactCrop__drag-handle.ord-n, .ReactCrop--fixed-aspect .ReactCrop__drag-handle.ord-e, .ReactCrop--fixed-aspect .ReactCrop__drag-handle.ord-s, .ReactCrop--fixed-aspect .ReactCrop__drag-handle.ord-w {
10435
- display: none;
10436
- }
10437
- @media (pointer: coarse) {
10438
- .ReactCrop .ord-n,
10439
- .ReactCrop .ord-e,
10440
- .ReactCrop .ord-s,
10441
- .ReactCrop .ord-w {
10442
- display: none;
10443
- }
10444
- .ReactCrop__drag-handle {
10445
- width: var(--rc-drag-handle-mobile-size);
10446
- height: var(--rc-drag-handle-mobile-size);
10447
- }
10448
- }
package/dist/styles.scss CHANGED
@@ -148,7 +148,3 @@ $section-padding-mobile: $section-padding-mobile-y $section-padding-mobile-x;
148
148
  @import './styles/nsw-point-address.scss';
149
149
  @import './styles/nsw-point-cadastral-parcel.scss';
150
150
  @import './styles/downloadable-files.scss';
151
- //
152
- // Third Party
153
- //
154
- @import 'react-image-crop/src/ReactCrop.scss';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@oneblink/apps-react",
3
3
  "description": "Helper functions for OneBlink apps in ReactJS.",
4
- "version": "8.12.0-beta.9",
4
+ "version": "8.12.1-beta.1",
5
5
  "author": "OneBlink <developers@oneblink.io> (https://oneblink.io)",
6
6
  "bugs": {
7
7
  "url": "https://github.com/oneblink/apps-react/issues"