@arcgis/core 5.1.0-next.11 → 5.1.0-next.13
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/WebScene.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/008887a8014b61f837ae.js +1 -0
- package/assets/esri/core/workers/chunks/04f82b740325e3388d23.js +1 -0
- package/assets/esri/core/workers/chunks/09cf8aed89a1ea1f8b28.js +1 -0
- package/assets/esri/core/workers/chunks/{ff2412c5be1ad4edb458.js → 0b59e5be22139387bd84.js} +1 -1
- package/assets/esri/core/workers/chunks/0bf742d48f434c4c575f.js +1 -0
- package/assets/esri/core/workers/chunks/0c8a676599821b9871c2.js +1 -0
- package/assets/esri/core/workers/chunks/11882cbb28710e5f9fc5.js +1 -0
- package/assets/esri/core/workers/chunks/{f0e7207fd2c899b9fe9f.js → 12fd2e26e949d90abfbd.js} +1 -1
- package/assets/esri/core/workers/chunks/{8c5e834c2d243fc369fe.js → 18b0776aef1536867ab8.js} +1 -1
- package/assets/esri/core/workers/chunks/{72ab3ed37ac4da355710.js → 1aa2187597f7c4adb67f.js} +1 -1
- package/assets/esri/core/workers/chunks/2216264b22a605a0f1ce.js +1 -0
- package/assets/esri/core/workers/chunks/22d12c309af9c19a1a48.js +1 -0
- package/assets/esri/core/workers/chunks/{aefc089928ada18bc4d4.js → 2762149a922275136171.js} +2 -2
- package/assets/esri/core/workers/chunks/27aa21da934ecaca381a.js +1 -0
- package/assets/esri/core/workers/chunks/{a5d3dcb490686430c81d.js → 27c8dea6154eb8c36fed.js} +1 -1
- package/assets/esri/core/workers/chunks/27d60fd727e9a68973f6.js +1 -0
- package/assets/esri/core/workers/chunks/{8fbfdd154413a2140180.js → 2a3e82a230b7ee4dfd55.js} +1 -1
- package/assets/esri/core/workers/chunks/{5aab1db039b2b61c6c6b.js → 2bb7bb7901bd343201fc.js} +1 -1
- package/assets/esri/core/workers/chunks/2d1a772abd730b61854f.js +1 -0
- package/assets/esri/core/workers/chunks/2d67ab4927a968d5c8d4.js +1 -0
- package/assets/esri/core/workers/chunks/{ee2ae61fc747b5f9827b.js → 2e7d4a437717606bc39c.js} +1 -1
- package/assets/esri/core/workers/chunks/{02f03297491eef26f113.js → 34207774bc371e95ba3c.js} +1 -1
- package/assets/esri/core/workers/chunks/360b3499e2a671c309ce.js +1 -0
- package/assets/esri/core/workers/chunks/3b0cfe3db8d90e02d6c6.js +1 -0
- package/assets/esri/core/workers/chunks/3d78e9b3c97c0ce21d16.js +1 -0
- package/assets/esri/core/workers/chunks/4550b7620932cd6de20e.js +1 -0
- package/assets/esri/core/workers/chunks/{f3022255054e8d09c38b.js → 455fbddd814e4681f0c0.js} +1 -1
- package/assets/esri/core/workers/chunks/{3db4938b3f89b9b8234e.js → 4742a8c19b86a5f859f0.js} +1 -1
- package/assets/esri/core/workers/chunks/58cf3d35771b87bd74e5.js +1 -0
- package/assets/esri/core/workers/chunks/{d84af069f1057044c879.js → 5c12a9b0db317620dce2.js} +1 -1
- package/assets/esri/core/workers/chunks/65ad8838911a6d71816b.js +1 -0
- package/assets/esri/core/workers/chunks/{7a85e08cb968586f8d74.js → 72acfb74fd9ab9bae923.js} +2 -2
- package/assets/esri/core/workers/chunks/79ee97609f72e4cf989c.js +1 -0
- package/assets/esri/core/workers/chunks/{fba30f2e1d6b364aae79.js → 7b1964255722e756eba3.js} +1 -1
- package/assets/esri/core/workers/chunks/7e6309bfed6692e8d2d7.js +2 -0
- package/assets/esri/core/workers/chunks/804c31973f7d116523cb.js +1 -0
- package/assets/esri/core/workers/chunks/{dc65843654dc25bd8f97.js → 8177e95596b71bf020aa.js} +1 -1
- package/assets/esri/core/workers/chunks/{afffb40cce91e135f092.js → 8374658d17f69bde6b08.js} +1 -1
- package/assets/esri/core/workers/chunks/879e8439a513cb333b61.js +1 -0
- package/assets/esri/core/workers/chunks/{ca767f0e3aa559b13699.js → 90aeef17af12cfbecb36.js} +1 -1
- package/assets/esri/core/workers/chunks/{4bd98d025bcd713eddca.js → 91858b02da40ff251ab2.js} +2 -2
- package/assets/esri/core/workers/chunks/{3114cbf7298239e1269d.js → 956237a2baa30760c256.js} +1 -1
- package/assets/esri/core/workers/chunks/a027da22acdaa6d6baa3.js +1 -0
- package/assets/esri/core/workers/chunks/{c064025d0dc69bb44f0d.js → a115984b794a7f90b2c0.js} +1 -1
- package/assets/esri/core/workers/chunks/a3e8b7185d63a0f85931.js +1 -0
- package/assets/esri/core/workers/chunks/{6be2dc8331ecf944efdc.js → a5af20f3d484d2d3bafe.js} +1 -1
- package/assets/esri/core/workers/chunks/b0b24fb60a21b995b348.js +1 -0
- package/assets/esri/core/workers/chunks/b6e155b42a4a423139e7.js +1 -0
- package/assets/esri/core/workers/chunks/{fb57a07b76580dcdde46.js → bc9997d15ec0a86793c6.js} +1 -1
- package/assets/esri/core/workers/chunks/{4a571a1e897c8ad359c4.js → bf2bfc0d78be8c185d58.js} +1 -1
- package/assets/esri/core/workers/chunks/bf9b2aa2e67ca746ec7c.js +1 -0
- package/assets/esri/core/workers/chunks/c9babe86c00ae69e63ee.js +2 -0
- package/assets/esri/core/workers/chunks/{da40c63408affee86ac4.js → d0d1378e714ff0e43e26.js} +1 -1
- package/assets/esri/core/workers/chunks/{940185f10c2b16612b66.js → d3416e6da0c1cbb53b3a.js} +1 -1
- package/assets/esri/core/workers/chunks/d9c1e1ec5c56f09fb82f.js +1 -0
- package/assets/esri/core/workers/chunks/d9dc3962535616a06e2f.js +1 -0
- package/assets/esri/core/workers/chunks/{4ee618a256b06221ea8f.js → da5deed75e1a170a49b3.js} +8 -8
- package/assets/esri/core/workers/chunks/{bb75ec3727b7ecabca6f.js → e4eb14952b7660feecc7.js} +1 -1
- package/assets/esri/core/workers/chunks/eaf5d55060ffc55aac39.js +1 -0
- package/assets/esri/core/workers/chunks/{9bcf8241c6b4aa42b1c5.js → ed78e19b1e400c0db309.js} +1 -1
- package/assets/esri/core/workers/chunks/f0b8de5b3cfbe9223df6.js +1 -0
- package/assets/esri/core/workers/chunks/fcf6a47f44c917490deb.js +1 -0
- package/assets/esri/core/workers/chunks/fd5a5b05a1551cdb8c87.js +1 -0
- package/assets/esri/themes/base/widgets/_FeatureTable.scss +1 -0
- package/assets/esri/themes/base/widgets/_Grid.scss +8 -1
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/config.js +1 -1
- package/core/Logger.js +1 -1
- package/core/Version.js +1 -1
- package/core/deprecate.js +1 -1
- package/core/has.js +1 -1
- package/core/iteratorUtils.js +1 -1
- package/core/sql/WhereClause.js +1 -1
- package/core/sql/WhereGrammar.js +1 -1
- package/core/sql/sqlVisitor.js +2 -0
- package/core/sql/writeUtils.js +2 -0
- package/core/sql.d.ts +2 -3
- package/core/sql.js +1 -1
- package/kernel.js +1 -1
- package/layers/ImageryLayer.d.ts +1 -1
- package/layers/MapImageLayer.d.ts +1 -1
- package/layers/TileLayer.d.ts +1 -1
- package/layers/WebTileLayer.d.ts +1 -1
- package/layers/graphics/data/QueryEngineCapabilities.js +1 -1
- package/layers/graphics/sources/FeatureLayerSource.js +1 -1
- package/layers/graphics/sources/OGCFeatureSource.js +1 -1
- package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
- package/layers/graphics/sources/support/QueryTask.js +1 -1
- package/layers/mixins/ArcGISImageService.js +1 -1
- package/layers/mixins/FeatureLayerBase.js +1 -1
- package/layers/orientedImagery/transformations/imageToWorld.js +1 -1
- package/layers/orientedImagery/transformations/utils.js +1 -1
- package/layers/orientedImagery/transformations/worldToImage.js +1 -1
- package/layers/raster/datasets/ImageServerRaster.js +1 -1
- package/layers/support/Sublayer.js +1 -1
- package/layers/support/arcgisLayerUrl.js +1 -1
- package/layers/support/capabilities.js +1 -1
- package/layers/support/relativeTimeQueryUtils.js +2 -0
- package/layers/support/serviceCapabilitiesUtils.js +1 -1
- package/networks/support/jsonTypes.d.ts +2 -2
- package/package.json +2 -2
- package/renderers/support/rasterRendererHelper.js +1 -1
- package/rest/print.js +1 -1
- package/support/basemapUtils.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/support/Symbol3DEmissive.d.ts +9 -9
- package/symbols/support/Symbol3DMaterial.d.ts +8 -8
- package/views/2d/engine/webgl/OverlayMultipoint.js +1 -1
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/layers/features/layerAdapters/CatalogFootprintLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/FeatureLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/InMemoryLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/KnowledgeGraphSublayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/OGCFeatureLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/OrientedImageryLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/SubtypeGroupLayerAdapter.js +1 -1
- package/views/2d/layers/features/schema/SourceSchema.js +1 -1
- package/views/2d/layers/features/sources/FeatureSource.js +1 -1
- package/views/2d/layers/features/sources/strategies/chunks/SourceChunkStore.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReader.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReaderPBF.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReaderPBFHeader.js +1 -1
- package/views/3d/analysis/ShadowCast/ShadowCastTooltip.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillController.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillVisualization.js +1 -1
- package/views/3d/environment/Fog.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/layers/VectorTileLayerView3D.js +1 -1
- package/views/3d/layers/support/featureTileQuery3D.js +1 -1
- package/views/3d/support/pointsOfInterest/CameraOnSurface.js +1 -1
- package/views/3d/webgl/ManagedFBOResource.js +1 -1
- package/views/3d/webgl-engine/core/FBOCache.js +1 -1
- package/views/3d/webgl-engine/effects/RenderNodes.js +1 -1
- package/views/3d/webgl-engine/effects/blit/Blit.js +1 -1
- package/views/3d/webgl-engine/effects/smaa/SMAA.js +1 -1
- package/views/3d/webgl-engine/lib/CutFillDepth.js +1 -1
- package/views/3d/webgl-engine/lib/MainFramebuffer.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/VaoWriter.js +1 -1
- package/views/3d/webgl-engine/parts/ScreenshotManager.js +1 -1
- package/views/3d/webgl-engine/parts/renderUtils.js +1 -1
- package/views/Attribution.js +1 -1
- package/views/DOMContainer.js +1 -1
- package/views/SelectionManager.d.ts +242 -0
- package/views/View.d.ts +1 -1
- package/views/draw/DrawTool.js +1 -1
- package/views/draw/plugins/BezierSegmentPlugin.js +1 -1
- package/views/draw/plugins/CircularArcSegmentPlugin.js +2 -0
- package/views/draw/support/EditSession.js +1 -1
- package/views/draw/support/PluginContext.js +1 -1
- package/views/draw/support/managers/TooltipManager.js +1 -1
- package/views/selection/types.d.ts +140 -0
- package/views/support/selectionUtils.js +1 -1
- package/views/ui/DefaultUI.d.ts +5 -12
- package/views/ui/DefaultUI.js +1 -1
- package/views/ui/types.d.ts +1 -1
- package/webscene/SunLighting.d.ts +20 -2
- package/webscene/VirtualLighting.d.ts +20 -2
- package/webscene/support/schemaValidator.js +1 -1
- package/webscene/support/versionUtils.js +1 -1
- package/widgets/Attribution/AttributionViewModel.d.ts +1 -1
- package/widgets/Attribution.d.ts +1 -1
- package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
- package/widgets/Editor/EditorViewModel.d.ts +48 -0
- package/widgets/Editor/EditorViewModel.js +1 -1
- package/widgets/Editor/SplitFeatureWorkflow.js +1 -1
- package/widgets/Editor/UpdateFeatureWorkflow.js +1 -1
- package/widgets/Editor/UpdateFeaturesWorkflow.js +1 -1
- package/widgets/Editor/support/SketchController.js +1 -1
- package/widgets/Editor.d.ts +35 -0
- package/widgets/Editor.js +1 -1
- package/widgets/FeatureTable/FeatureTableViewModel.d.ts +1 -1
- package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
- package/widgets/FeatureTable.d.ts +9 -3
- package/widgets/FeatureTable.js +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/adapters/sketch/DataCaptureAdapter.js +1 -1
- package/widgets/OrientedImageryViewer/adapters/view/MapViewAdapter.js +1 -1
- package/widgets/OrientedImageryViewer/adapters/view/SceneViewAdapter.js +1 -1
- package/widgets/OrientedImageryViewer/services/TransformationService.js +1 -1
- package/widgets/OrientedImageryViewer/support/dataCaptureUtils.js +1 -1
- package/widgets/OrientedImageryViewer/support/geometryUtils.js +1 -1
- package/widgets/OrientedImageryViewer/support/urlUtils.js +1 -1
- package/widgets/OrientedImageryViewer/utils.js +1 -1
- package/widgets/OrientedImageryViewer.js +1 -1
- package/widgets/PanoramicViewer/PanoramicViewerViewModel.js +1 -1
- package/widgets/PanoramicViewer/support/PanoramicMedia.js +1 -1
- package/widgets/Sketch/SketchViewModel.d.ts +14 -15
- package/widgets/Sketch/SketchViewModel.js +1 -1
- package/widgets/Sketch/support/OperationHandle.js +1 -1
- package/widgets/Sketch/support/PluginManager.js +1 -1
- package/widgets/Sketch/support/sketchUtils.js +1 -1
- package/widgets/Sketch.d.ts +37 -0
- package/widgets/Sketch.js +1 -1
- package/assets/esri/core/workers/chunks/012992dc3910466ed207.js +0 -1
- package/assets/esri/core/workers/chunks/0485ae33a8b327974751.js +0 -1
- package/assets/esri/core/workers/chunks/0994c12d01fe6f74350e.js +0 -1
- package/assets/esri/core/workers/chunks/13b104cc7925d4423aad.js +0 -1
- package/assets/esri/core/workers/chunks/147d0f7a2e471442c95c.js +0 -2
- package/assets/esri/core/workers/chunks/1a11ac1a34614132fabc.js +0 -1
- package/assets/esri/core/workers/chunks/1f613c599eff3b16c1d2.js +0 -1
- package/assets/esri/core/workers/chunks/2431a5480f0d22f00e00.js +0 -1
- package/assets/esri/core/workers/chunks/319226db47849acbe321.js +0 -1
- package/assets/esri/core/workers/chunks/360dd5cd63d132b5c7d5.js +0 -2
- package/assets/esri/core/workers/chunks/3e4c5cc24bdc1c807125.js +0 -1
- package/assets/esri/core/workers/chunks/504e6868445419b7680e.js +0 -1
- package/assets/esri/core/workers/chunks/545d801c4ba6f49df726.js +0 -1
- package/assets/esri/core/workers/chunks/71879de16a936a079362.js +0 -1
- package/assets/esri/core/workers/chunks/733d4ddb937c51ef3aed.js +0 -1
- package/assets/esri/core/workers/chunks/7352b4129f4875a053b0.js +0 -1
- package/assets/esri/core/workers/chunks/768ee8d940b5eb353ec3.js +0 -1
- package/assets/esri/core/workers/chunks/8556d06f522914e71bb8.js +0 -1
- package/assets/esri/core/workers/chunks/863873ffbed0cbbdfb9b.js +0 -1
- package/assets/esri/core/workers/chunks/88fe7d75dc3b619b8543.js +0 -1
- package/assets/esri/core/workers/chunks/8ac7a552189143ab4f91.js +0 -1
- package/assets/esri/core/workers/chunks/8ba1c7919e898ef4557f.js +0 -1
- package/assets/esri/core/workers/chunks/944b6d230a93add78c0d.js +0 -1
- package/assets/esri/core/workers/chunks/a37a003da59bdaf7ec0e.js +0 -1
- package/assets/esri/core/workers/chunks/ad688eee6a9f2be6df4a.js +0 -1
- package/assets/esri/core/workers/chunks/c0ae85f9c2dbe8611499.js +0 -1
- package/assets/esri/core/workers/chunks/c0cb0c22ee7fd91855cb.js +0 -1
- package/assets/esri/core/workers/chunks/c88101cb8301f095d037.js +0 -1
- package/assets/esri/core/workers/chunks/cb1b16f8bf7c135e14f7.js +0 -1
- package/assets/esri/core/workers/chunks/cc245eb1c5aaaac5916e.js +0 -1
- package/assets/esri/core/workers/chunks/e03bf0ca545dce221ea0.js +0 -1
- package/assets/esri/core/workers/chunks/e880d7738155a4de4b0e.js +0 -1
- package/assets/esri/core/workers/chunks/fb4bcf366ba1b51668f6.js +0 -1
- package/assets/esri/core/workers/chunks/fb58f3ea98bf5e8cf8dd.js +0 -1
- package/views/3d/webgl/utils.js +0 -2
- /package/assets/esri/core/workers/chunks/{aefc089928ada18bc4d4.js.LICENSE.txt → 2762149a922275136171.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{7a85e08cb968586f8d74.js.LICENSE.txt → 72acfb74fd9ab9bae923.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{360dd5cd63d132b5c7d5.js.LICENSE.txt → 7e6309bfed6692e8d2d7.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{4bd98d025bcd713eddca.js.LICENSE.txt → 91858b02da40ff251ab2.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{147d0f7a2e471442c95c.js.LICENSE.txt → c9babe86c00ae69e63ee.js.LICENSE.txt} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import t from"../../../core/Accessor.js";import
|
|
2
|
+
import{__decorate as e}from"tslib";import t from"../../../core/Accessor.js";import r from"../../../core/Error.js";import{makeHandle as o}from"../../../core/handleUtils.js";import{createScalar as a,createLength as i,toUnit as s}from"../../../core/quantity.js";import{generateUUID as n}from"../../../core/uuid.js";import{property as l}from"../../../core/accessorSupport/decorators/property.js";import{subclass as d}from"../../../core/accessorSupport/decorators/subclass.js";import{isWebMercator as p,isGeographic as u}from"../../../geometry/support/spatialReferenceUtils.js";import{createViewAlignedCoordinateSystem as c}from"./surfaceCoordinateSystems.js";import{knownFieldDisplayOrders as m}from"./types.js";import{createGeographicCoordinate as g}from"../../interactive/tooltip/fields/parsingAndFormattingUtils.js";import{elevationFromPoint as h}from"../../support/euclideanLengthMeasurementUtils.js";const f={x:m.Coordinates+10,y:m.Coordinates+11,elevation:m.Coordinates+12};let w=class extends t{constructor(e){super(e)}normalizeCtorArgs(e){const{drawTool:t,plugin:r,...o}=e;return{_drawTool:t,_plugin:r,...o}}get positionOfLastUserInput(){return this._drawTool.positionOfLastUserInput}getSession(e){return this._drawTool.editSessionManager.getSession(e)}createInteractiveHandle(e,t){const o=this._drawTool.interactiveHandleManager,i=this._drawTool.tooltipManager,s=this._plugin,l=this.session,d=this._drawTool.coordinateHelper;if(!o||!i)throw new r("draw-tool:interactive-handle-missing-dependencies","Attempted to set up an interactive handle without required dependencies.");const c=e.name??n(),m=e.defaultCaptureMode??"capture-always",h=o.registerHandle(s,{...e,name:c,editSession:l,defaultCaptureMode:m,captureMode:m});if(this._drawTool.addPromise(o.setupManipulatorForHandle(h,this._drawTool.lastScreenPosition,this._drawTool.movementCommandContext)),!t?.disableDefaultXYFields){const e=d.spatialReference;p(e)||u(e)?(i.createMeasuredField(s,{id:Symbol(`tooltip-long-${c}`),preset:"longitude",getMeasurementInput:()=>h.outputMapPosition,measure:async e=>g(e?.longitude),fieldProperties:{displayOrder:f.x},fieldFilters:{appliesToHandlesWithName:c}}),i.createMeasuredField(s,{id:Symbol(`tooltip-lat-${c}`),preset:"latitude",getMeasurementInput:()=>h.outputMapPosition,measure:async e=>g(e?.latitude),fieldProperties:{displayOrder:f.y},fieldFilters:{appliesToHandlesWithName:c}})):(i.createMeasuredField(s,{id:Symbol(`tooltip-x-${c}`),preset:"x",getMeasurementInput:()=>h.outputMapPosition,measure:async e=>e?a(e.x):null,fieldProperties:{displayOrder:f.x},fieldFilters:{appliesToHandlesWithName:c}}),i.createMeasuredField(s,{id:Symbol(`tooltip-y-${c}`),preset:"y",getMeasurementInput:()=>h.outputMapPosition,measure:async e=>e?a(e.y):null,fieldProperties:{displayOrder:f.y},fieldFilters:{appliesToHandlesWithName:c}})),this._drawTool.hasZ&&"primary"===h.role&&i.createMeasuredField(s,{id:Symbol(`tooltip-z-${c}`),preset:"elevation",getMeasurementInput:()=>h.outputMapPosition,measure:async(e,t)=>this.measureElevation(e,t.inputUnitInfos.verticalLength.unit),fieldProperties:{displayOrder:f.elevation},fieldFilters:{appliesToHandlesWithName:c}})}return h}removeInteractiveHandle(e){const t=e;this._drawTool.interactiveHandleManager?.unregisterHandle(this._plugin,t)}createConstraint(e,t){this._drawTool.interactiveHandleManager?.registerCustomConstraint(this._plugin,e,t)}removeConstraint(e){this._drawTool.interactiveHandleManager?.unregisterCustomConstraint(this._plugin,e)}createCustomField(e){if(!this._drawTool.tooltipManager)throw new r("draw-tool:tooltip-manager-missing","Attempted to create a field without access to a tooltip manager.");return this._drawTool.tooltipManager.createCustomField(this._plugin,e)}createMeasuredField(e){if(!this._drawTool.tooltipManager)throw new r("draw-tool:tooltip-manager-missing","Attempted to create a field without access to a tooltip manager.");return this._drawTool.tooltipManager.createMeasuredField(this._plugin,e)}requestComplete(){this._drawTool.complete(this._plugin)}requestCancel(e){this._drawTool.lifecycleManager.cancel(this._plugin)}requestBeginDownstreamPlugin(e,t){this._drawTool.lifecycleManager.begin([e],this._plugin,t?.cancelExisting)}async measureLength(e,t,r,o){const{_drawTool:a,_plugin:i}=this;if("tooltip"!==r||a.tooltipManager?.effectiveEnabled)return await a.measurementManager.measureLength(i,t,e,o)}async measureArea(e,t,r,o){const{_drawTool:a,_plugin:i}=this;if("tooltip"!==r||a.tooltipManager?.effectiveEnabled)return await a.measurementManager.measureArea(i,t,e,o)}async measureDistance(e,t,r,o){const{_drawTool:a,_plugin:i}=this;if("tooltip"!==r||a.tooltipManager?.effectiveEnabled)return await a.measurementManager.measureDistance(i,t,e,o)}measureElevation(e,t){const r=this._drawTool;let o=h(e);if(!o){const e=r.surfaceManager?.metersPerVerticalUnit;e&&(o=i(r.defaultZ*e,"meters"))}return t&&o&&o.unit!==t?s(o,t):o}getGlobalState(){return this._drawTool.globalStateManager.getGlobalState()}setGlobalState(e,t){this._drawTool.globalStateManager.setGlobalState(this._plugin,e,t)}addOrUpdateGraphic(e,t){const{_plugin:r,_drawTool:a}=this,i=a.renderer;i?.addOrUpdateGraphic(e,t),r.hasHandles(e)||r.addHandles(o(()=>i?.removeGraphic(e)),e)}addOrUpdateVisual(e,t){const r=this._plugin,a=this._drawTool.renderer;a?.addOrUpdateVisual(e,t),r.hasHandles(e)||r.addHandles(o(()=>a?.removeVisual(e)),e)}removeGraphic(e){this._plugin.removeHandles(e)}removeVisual(e){this._plugin.removeHandles(e)}getViewInformation(){return this._drawTool.view}getViewAlignedSurfaceCoordinateSystem(e){const{view:t,coordinateHelper:r}=this._drawTool;return t&&r?c(t,r.pointToVector(e)):null}};e([l()],w.prototype,"_plugin",void 0),e([l()],w.prototype,"_drawTool",void 0),e([l({nonNullable:!0})],w.prototype,"session",void 0),e([l()],w.prototype,"positionOfLastUserInput",null),w=e([d("esri.views.draw.support.PluginContext")],w);export{w as PluginContext};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as t}from"tslib";import e from"../../../../core/Accessor.js";import{createTask as o}from"../../../../core/asyncUtils.js";import i from"../../../../core/Error.js";import{getOrCreateMapValue as n}from"../../../../core/MapUtils.js";import{destroyMaybe as r}from"../../../../core/maybe.js";import s from"../../../../core/ReactiveMap.js";import{watch as
|
|
2
|
+
import{__decorate as t}from"tslib";import e from"../../../../core/Accessor.js";import{createTask as o}from"../../../../core/asyncUtils.js";import i from"../../../../core/Error.js";import{getOrCreateMapValue as n}from"../../../../core/MapUtils.js";import{destroyMaybe as r}from"../../../../core/maybe.js";import s from"../../../../core/ReactiveMap.js";import{watch as l,syncAndInitial as a,initial as p}from"../../../../core/reactiveUtils.js";import{property as d}from"../../../../core/accessorSupport/decorators.js";import{subclass as c}from"../../../../core/accessorSupport/decorators/subclass.js";import{UpdatingHandles as u}from"../../../../core/support/UpdatingHandles.js";import{isLoaded as m,load as f}from"../../../../geometry/coordinateFormatter.js";import{absoluteHeightElevationInfo as h}from"../../../../support/elevationInfoUtils.js";import{ManagedTooltipField as g}from"../ManagedTooltipField.js";import{getConstraintContext as v}from"../../../interactive/sketch/constraintUtils.js";import{makeTooltip as y}from"../../../interactive/tooltip/tooltipCommonUtils.js";import{makeScalarField as _,makeOrientationField as F,makeAreaField as H,makeLengthField as T,makeRadiusField as I,makeTotalLengthField as w,makeSizeField as k,makeScaleField as x,makeYField as j,makeXField as A,makeLongitudeField as M,makeLatitudeField as b,makeElevationField as E,makeDistanceField as C,makeDirectionField as O}from"../../../interactive/tooltip/fields/fields.js";import{TooltipField as L}from"../../../interactive/tooltip/fields/TooltipField.js";import{DynamicTooltipInfo as P}from"../../../interactive/tooltip/infos/DynamicTooltipInfo.js";let R=class extends e{constructor(t){super(t),this._pluginTooltipFieldRegistry=new s,this._updatingHandles=new u,this._coordinateFormatterLoadTask=null,this.constraintsEnabled=!0,this.keepTooltipAliveEvenWhenTooltipsAreNotEnabled=!1}initialize(){this.addHandles([l(()=>[this.effectiveEnabled,this.context?.view,this.context?.sketchOptions],([t,e,o])=>{const{context:i}=this;t&&e&&o?(this._tooltipInfo??=new P({sketchOptions:o,getAllFields:()=>this.allFields,getActiveHandle:()=>this.effectiveActiveHandle,viewType:e.type}),this._tooltip||this._setupTooltip(i)):(this._tooltip=r(this._tooltip),this._tooltipInfo=r(this._tooltipInfo),this.inputModeHandle=null)},a)])}destroy(){this._tooltip=r(this._tooltip),this._tooltipInfo=r(this._tooltipInfo)}get context(){return this.getDependencies?.()}get focusedHandle(){return this.context?.getActiveHandle?.()}get effectiveActiveHandle(){return this._tooltip?.isInInputMode?this.inputModeHandle:this.focusedHandle}get updating(){return this._updatingHandles.updating}get tooltip(){return this._tooltip}get tooltipInfo(){return this._tooltipInfo}get elevationConstraint(){return this.getConstraints(this.focusedHandle)?.elevation}get allFields(){return Array.from(this._pluginTooltipFieldRegistry.values()).flatMap(t=>Array.from(t.values()))}get effectiveEnabled(){return this.context?.sketchOptions.tooltips.effectiveEnabled||this.keepTooltipAliveEvenWhenTooltipsAreNotEnabled}getConstraints(t){const{tooltipInfo:e,context:o}=this,{view:i,editGeometryOperations:n,elevationInfo:r,sketchOptions:s}=o??{},l=this.getLastScreenPosition?.();if(!(l&&i&&e&&n&&s))return null;const{coordinateHelper:a,spatialReference:p}=n.data,d=i.toMap(l);if(!d)return null;const c=v(d,i,p,r??h,a.hasZ(),s.values.effectiveDirectionMode),u=e.getConstraintFieldsForHandle(t),m={context:c};for(const f of u)switch(f.name){case"direction":case"distance":case"elevation":m[f.name]=f.committed;break;case"x":m[f.name]=D(f.committed),m.longitude=U(f.committed);break;case"y":m[f.name]=D(f.committed),m.latitude=U(f.committed)}return m}unlockOnVertexPlacement(){this.tooltipInfo?.allFields.forEach(t=>{t.unlockOnVertexPlacement&&(t.committed=null)})}unregisterPluginFields(t){const e=this._pluginTooltipFieldRegistry.get(t);e?.forEach(t=>t.destroy()),e?.clear(),this._pluginTooltipFieldRegistry.delete(t)}createMeasuredField(t,{id:e,preset:o,getMeasurementInput:i,measure:n,fieldProperties:r,fieldFilters:s}){const a=this._getOrCreateField(t,e,o,r,s);return a.registerMeasurement(i,n,()=>this.tooltipInfo?.renderContext),a.addHandles(l(()=>this.tooltipInfo?.isEffectiveVisibleField(a.field),t=>a.enabled=!!t,p)),a}createCustomField(t,{id:e,preset:o,fieldProperties:i,fieldFilters:n}){return this._getOrCreateField(t,e,o,i,n)}_setupTooltip(t){const e=this._tooltip=y(()=>({view:t.view,options:t.sketchOptions.tooltips,info:this.tooltipInfo}));e.addHandles([l(()=>this.focusedHandle,t=>{!t||e.isInInputMode&&null!=this.inputModeHandle||(this.inputModeHandle=t)},a),l(()=>this.focusedHandle?.screenPosition,t=>{t?(e.position=t,e.hidden=!1):e.hidden=!0},a),e.on("commit",()=>{this.context?.notifyTooltipsChanged()})]),this._coordinateFormatterLoadTask||m()||(this._coordinateFormatterLoadTask=o(()=>f()),this.addHandles(this._coordinateFormatterLoadTask),this._updatingHandles.addPromise(this._coordinateFormatterLoadTask.promise))}_getOrCreateField(t,e,o,i,r){const l=n(this._pluginTooltipFieldRegistry,t,()=>new s);if(l.has(e))return l.get(e);const a=new g({field:G(o,i),displayGroup:i?.displayGroup,...r});return l.set(e,a),a}};function U(t){return null!=t&&"unit"in t&&"rotationType"in t?t:null}function D(t){return null==t||"rotationType"in t?null:t}function G(t,e){const o=e?{...e}:{};switch(delete o.displayGroup,t){case"area":return H({...o,name:"area"});case"direction":return O({...o,name:"direction"});case"distance":return C({...o,name:"distance"});case"elevation":{const t=E({...o,name:"elevation"});return t.showAsZ=!0,t}case"latitude":return b({...o,name:"y"});case"longitude":return M({...o,name:"x"});case"x":return A({...o,name:"x"});case"y":return j({...o,name:"y"});case"orientation":return F({...o,name:"orientation"});case"scale":return x({...o,name:"scale"});case"size":return k({...o,name:"size"});case"totalLength":return w({...o,name:"totalLength"});case"radius":return I({...o,name:"radius"});case"generic-length":return T({...o,name:null});case"generic-area":return H({...o,name:null});case"generic-angle":return F({...o,name:null});case"generic-scalar":return _({...o,name:null});default:if(!o)throw new i("draw-tool:tooltips:invalid-field-config","Attempted to create a tooltip without a preset definition and without tooltip configuration.");return new L(o)}}t([d()],R.prototype,"_updatingHandles",void 0),t([d()],R.prototype,"_tooltip",void 0),t([d()],R.prototype,"_tooltipInfo",void 0),t([d()],R.prototype,"_coordinateFormatterLoadTask",void 0),t([d()],R.prototype,"getDependencies",void 0),t([d()],R.prototype,"getLastScreenPosition",void 0),t([d()],R.prototype,"context",null),t([d()],R.prototype,"inputModeHandle",void 0),t([d()],R.prototype,"focusedHandle",null),t([d()],R.prototype,"effectiveActiveHandle",null),t([d()],R.prototype,"updating",null),t([d()],R.prototype,"tooltip",null),t([d()],R.prototype,"tooltipInfo",null),t([d()],R.prototype,"constraintsEnabled",void 0),t([d()],R.prototype,"elevationConstraint",null),t([d()],R.prototype,"allFields",null),t([d()],R.prototype,"keepTooltipAliveEvenWhenTooltipsAreNotEnabled",void 0),t([d()],R.prototype,"effectiveEnabled",null),R=t([c("esri.views.draw.support.managers.TooltipManager")],R);export{R as TooltipManager};
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Types and interfaces for feature selection in layers and views.
|
|
3
|
+
*
|
|
4
|
+
* @since 5.0
|
|
5
|
+
*/
|
|
6
|
+
import type Graphic from "../../Graphic.js";
|
|
7
|
+
import type Accessor from "../../core/Accessor.js";
|
|
8
|
+
import type GraphicsLayer from "../../layers/GraphicsLayer.js";
|
|
9
|
+
import type Field from "../../layers/support/Field.js";
|
|
10
|
+
import type FieldsIndex from "../../layers/support/FieldsIndex.js";
|
|
11
|
+
import type FeatureSet from "../../rest/support/FeatureSet.js";
|
|
12
|
+
import type Query from "../../rest/support/Query.js";
|
|
13
|
+
import type { LoadableMixin } from "../../core/Loadable.js";
|
|
14
|
+
import type { FeatureTitleOptions } from "../../layers/types.js";
|
|
15
|
+
import type { RendererUnion } from "../../renderers/types.js";
|
|
16
|
+
import type { RequestOptions } from "../../request/types.js";
|
|
17
|
+
import type { ObjectId } from "../types.js";
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* An identifier used to represent a selected feature in a layer. This can either be a [Graphic](https://developers.arcgis.com/javascript/latest/references/core/Graphic/) (for layers with graphics) or an object ID (for layers with object IDs).
|
|
21
|
+
*
|
|
22
|
+
* @since 5.0
|
|
23
|
+
*/
|
|
24
|
+
export type SelectionIdentifier = Graphic | ObjectId;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* A simple object representing the selected features in a layer.
|
|
28
|
+
*
|
|
29
|
+
* @since 5.0
|
|
30
|
+
*/
|
|
31
|
+
export interface LayerSelection {
|
|
32
|
+
/** The layer associated with the selection. */
|
|
33
|
+
layer: SelectableLayer;
|
|
34
|
+
/** The selected features in the layer. The selection identifiers can either be [Graphic](https://developers.arcgis.com/javascript/latest/references/core/Graphic/)s or object IDs depending on the capabilities of the layer. */
|
|
35
|
+
selection: SelectionIdentifier[];
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* An object storing the changes in selection for a given layer.
|
|
40
|
+
*
|
|
41
|
+
* @since 5.0
|
|
42
|
+
*/
|
|
43
|
+
export interface LayerSelectionChange extends LayerSelection {
|
|
44
|
+
/** The features that were added to the selection for the layer. */
|
|
45
|
+
added?: SelectionIdentifier[];
|
|
46
|
+
/** The features that were removed from the selection for the layer. */
|
|
47
|
+
removed?: SelectionIdentifier[];
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/** An object representing the selected features in a layer, including the layer and the feature set containing the selected features. */
|
|
51
|
+
export interface LayerFeatureSet {
|
|
52
|
+
/** The layer for which the feature set is stored. */
|
|
53
|
+
layer: SelectableLayerWithObjectIds;
|
|
54
|
+
/** The feature set containing the selected features. */
|
|
55
|
+
data: FeatureSet;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/** The types of layers that can be selected. */
|
|
59
|
+
export type SelectableLayerType = "csv" | "feature" | "geojson" | "parquet" | "graphics" | "knowledge-graph" | "knowledge-graph-sublayer" | "map-image" | "ogc-feature" | "stream" | "wfs" | "sublayer" | "subtype-sublayer" | "subtype-group";
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* The underlying base type for selectable layers which contains common properties and methods for both layers with graphics and layers with object IDs.
|
|
63
|
+
*
|
|
64
|
+
* @since 5.0
|
|
65
|
+
*/
|
|
66
|
+
export interface SelectableLayerBase extends Accessor, LoadableMixin {
|
|
67
|
+
/** The unique identifier of the layer. */
|
|
68
|
+
id: string;
|
|
69
|
+
/** The type of the layer. */
|
|
70
|
+
type: SelectableLayerType;
|
|
71
|
+
/** **Optional:** The name of the field used to display features in the layer. */
|
|
72
|
+
displayField?: string | null;
|
|
73
|
+
/** **Optional:** The fields used to create feature titles. It can be a single field name or an array of field names. */
|
|
74
|
+
featureTitleFields?: string[];
|
|
75
|
+
/** **Optional:** The name of the global ID field in the layer. */
|
|
76
|
+
globalIdField?: string | null;
|
|
77
|
+
/** **Optional:** Indicates whether the layer is a table. */
|
|
78
|
+
isTable?: boolean | null;
|
|
79
|
+
/** **Optional:** The numeric ID of the layer in a service. */
|
|
80
|
+
layerId?: number | null;
|
|
81
|
+
/** **Optional:** The renderer assigned to the layer. */
|
|
82
|
+
renderer?: RendererUnion | null;
|
|
83
|
+
/** **Optional:** The name of the subtype field in the layer. */
|
|
84
|
+
subtypeField?: string | null;
|
|
85
|
+
/** **Optional:** The title of the layer. */
|
|
86
|
+
title?: string | null;
|
|
87
|
+
/** **Optional:** Indicates whether the layer is visible. */
|
|
88
|
+
visible?: boolean | null;
|
|
89
|
+
/**
|
|
90
|
+
* **Optional:** Gets the title for a specific feature represented by a graphic.
|
|
91
|
+
*
|
|
92
|
+
* @param graphic - The graphic for which to get the title.
|
|
93
|
+
* @param options - The options for getting the feature title.
|
|
94
|
+
* @returns A promise that resolves to the feature title.
|
|
95
|
+
*/
|
|
96
|
+
getFeatureTitle?(graphic: Graphic, options?: FeatureTitleOptions): Promise<string>;
|
|
97
|
+
/**
|
|
98
|
+
* Gets the titles for multiple features represented by an array of graphics.
|
|
99
|
+
*
|
|
100
|
+
* @param graphics - An array of graphics for which to get the titles.
|
|
101
|
+
* @param options - The options for getting the feature titles.
|
|
102
|
+
* @returns A promise that resolves to a map of object IDs to feature titles.
|
|
103
|
+
*/
|
|
104
|
+
getFeatureTitles?(graphics: Graphic[], options?: FeatureTitleOptions): Promise<Map<ObjectId, string>>;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* This applies only to layer types that support object IDs.
|
|
109
|
+
*
|
|
110
|
+
* @since 5.0
|
|
111
|
+
*/
|
|
112
|
+
export interface SelectableLayerWithObjectIds extends SelectableLayerBase {
|
|
113
|
+
/** An array of fields in the layer. */
|
|
114
|
+
fields: Field[];
|
|
115
|
+
/** A fields index for a specific field in the layer. This helps to quickly look up field information by field name. */
|
|
116
|
+
fieldsIndex: FieldsIndex<Field>;
|
|
117
|
+
/** The name of the Object ID field in the layer. */
|
|
118
|
+
objectIdField: string;
|
|
119
|
+
/**
|
|
120
|
+
* Creates a new query object for the layer.
|
|
121
|
+
*
|
|
122
|
+
* @returns A new query object for the layer.
|
|
123
|
+
*/
|
|
124
|
+
createQuery(): Query;
|
|
125
|
+
/**
|
|
126
|
+
* Queries features from the layer based on the provided query parameters.
|
|
127
|
+
*
|
|
128
|
+
* @param query - The query parameters.
|
|
129
|
+
* @param requestOptions - Additional options for the request.
|
|
130
|
+
* @returns A promise that resolves to the feature set containing the queried features.
|
|
131
|
+
*/
|
|
132
|
+
queryFeatures(query?: Query, requestOptions?: RequestOptions): Promise<FeatureSet>;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* A selectable layer which can either be layers containing object IDs or layers with graphics.
|
|
137
|
+
*
|
|
138
|
+
* @since 5.0
|
|
139
|
+
*/
|
|
140
|
+
export type SelectableLayer = SelectableLayerWithObjectIds | GraphicsLayer;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{isGraphic as n}from"../../support/graphicInstanceUtils.js";function e(n){return!(null==n||"object"!=typeof n||!("id"in n)||!("type"in n))}function r(n){return!!(e(n)&&"on"in n&&n.on)}function t(n){return!!(e(n)&&"graphics"in n&&n.graphics)}function i(n){return!!(e(n)&&"fields"in n&&"fieldsIndex"in n&&"objectIdField"in n&&"createQuery"in n&&n.createQuery&&"queryFeatures"in n&&n.queryFeatures)}function u(n){return i(n)||t(n)}function c(n){return!!(null!=n&&"object"==typeof n&&"layer"in n&&n.layer&&e(n.layer)&&"view"in n)}function o(n){return!(!c(n)||!("queryGraphics"in n))}function a(n){return!!(c(n)&&"highlight"in n&&n.highlight)}function f(n){return!!(c(n)&&"createQuery"in n&&n.createQuery&&"queryFeatures"in n&&n.queryFeatures)}function l(n){return f(n)||o(n)}function y(n){return
|
|
2
|
+
import{isGraphic as n}from"../../support/graphicInstanceUtils.js";function e(n){return!(null==n||"object"!=typeof n||!("id"in n)||!("type"in n))}function r(n){return!!(e(n)&&"on"in n&&n.on)}function t(n){return!!(e(n)&&"graphics"in n&&n.graphics)}function i(n){return!!(e(n)&&"fields"in n&&"fieldsIndex"in n&&"objectIdField"in n&&"createQuery"in n&&n.createQuery&&"queryFeatures"in n&&n.queryFeatures)}function u(n){return i(n)||t(n)}function c(n){return!!(null!=n&&"object"==typeof n&&"layer"in n&&n.layer&&e(n.layer)&&"view"in n)}function o(n){return!(!c(n)||!("queryGraphics"in n))}function a(n){return!!(c(n)&&"highlight"in n&&n.highlight)}function f(n){return!!(c(n)&&"createQuery"in n&&n.createQuery&&"queryFeatures"in n&&n.queryFeatures)}function l(n){return f(n)||o(n)}function y(n){return!(null==n||"object"!=typeof n||!("isTable"in n)||!n.isTable)}function s(e){return!!e.length&&n(e[0])}export{s as isGraphicsSelectionIdentifier,u as isISelectableLayer,e as isISelectableLayerBase,r as isISelectableLayerBaseWithEditing,l as isISelectableLayerView,c as isISelectableLayerViewBase,o as isISelectableLayerViewWithGraphics,a as isISelectableLayerViewWithHighlights,f as isISelectableLayerViewWithObjectIds,t as isISelectableLayerWithGraphics,i as isISelectableLayerWithObjectIds,y as isTableLayer};
|
package/views/ui/DefaultUI.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export interface DefaultUIProperties extends UIProperties, Partial<Pick<DefaultU
|
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* The DefaultUI class exposes the default
|
|
9
|
-
* [
|
|
9
|
+
* [widgets](https://developers.arcgis.com/javascript/latest/references/core/widgets/Widget/) and [components](https://developers.arcgis.com/javascript/latest/references/core/views/ui/DefaultUI/#components) available in either a
|
|
10
10
|
* [MapView](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/) or a [SceneView](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/). This class
|
|
11
11
|
* also provides a simple API for [adding](https://developers.arcgis.com/javascript/latest/references/core/views/ui/DefaultUI/#add), [moving](https://developers.arcgis.com/javascript/latest/references/core/views/ui/DefaultUI/#move) and [removing](https://developers.arcgis.com/javascript/latest/references/core/views/ui/DefaultUI/#remove)
|
|
12
12
|
* [widgets](https://developers.arcgis.com/javascript/latest/references/core/widgets/Widget/) and other HTML components from the view's UI.
|
|
@@ -63,22 +63,15 @@ export default class DefaultUI extends UI {
|
|
|
63
63
|
* [SceneView](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/) is created. The default widgets differ between MapView
|
|
64
64
|
* and SceneView.
|
|
65
65
|
*
|
|
66
|
-
* The following are the default
|
|
66
|
+
* The following are the default widgets in each view:
|
|
67
67
|
*
|
|
68
|
-
* **MapView:** `["
|
|
68
|
+
* **MapView:** `["zoom"]`
|
|
69
69
|
*
|
|
70
|
-
* **SceneView:** `["
|
|
70
|
+
* **SceneView:** `["navigation-toggle", "compass", "zoom"]`
|
|
71
71
|
*
|
|
72
72
|
* > [!WARNING]
|
|
73
73
|
* >
|
|
74
|
-
* >
|
|
75
|
-
* > For detailed guidelines on working with attribution, please visit the official [attribution in your app](https://developers.arcgis.com/terms/attribution/) documentation.
|
|
76
|
-
* > For information on terms of use, see the [Terms of Use FAQ](https://developers.arcgis.com/terms/faq/).
|
|
77
|
-
*
|
|
78
|
-
* @example
|
|
79
|
-
* // Removes all default UI components, except Attribution.
|
|
80
|
-
* // Passing an empty array will remove all components.
|
|
81
|
-
* view.ui.components = [ "attribution" ];
|
|
74
|
+
* > As of version 5.0, attribution is a part of the view itself. To control the visibility of the attribution, use the [View.attributionVisible](https://developers.arcgis.com/javascript/latest/references/core/views/View/#attributionVisible) property.
|
|
82
75
|
*/
|
|
83
76
|
accessor components: ComponentName[];
|
|
84
77
|
}
|
package/views/ui/DefaultUI.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as t}from"tslib";import"../../core/has.js";import"../../core/Logger.js";import{watch as i,initial as e}from"../../core/reactiveUtils.js";import{property as o,subclass as s}from"../../core/accessorSupport/decorators.js";import
|
|
2
|
+
import{__decorate as t}from"tslib";import"../../core/has.js";import"../../core/Logger.js";import{watch as i,initial as e}from"../../core/reactiveUtils.js";import{property as o,subclass as s}from"../../core/accessorSupport/decorators.js";import n from"./Component.js";import r from"./UI.js";import a from"../../widgets/Compass.js";import d from"../../widgets/NavigationToggle.js";import p from"../../widgets/Zoom.js";function c(t){return void 0!==t?.view}let m=class extends r{constructor(t){super(t),this._defaultPositionLookup={compass:"top-left","navigation-toggle":"top-left",zoom:"top-left"},this.components=[],this._updateViewAwareWidgets=t=>{this.components.forEach(i=>{const e=this._find(i),o=e?.widget;c(o)&&(o.view=t)})},this._componentsWatcher=(t,i)=>{this._removeComponents(i),this._addComponents(t)},this._adjustPadding=({ready:t,attributionVisible:i})=>{if(t&&!i&&!this._isOverridden("padding")){const{top:t}=this.padding;this.padding=t}}}initialize(){this.addHandles([i(()=>this.components,this._componentsWatcher,e),i(()=>this.view,this._updateViewAwareWidgets,e),i(()=>({ready:this.view?.ready,attributionVisible:this.view?.attributionVisible}),this._adjustPadding,e)])}_add(t,i,e,o,s){let n=t;if("string"==typeof t&&this._defaultPositionLookup[t]){if(this._find(t))return;n=this._createComponent(t)}super._add(n,i,e,o,s)}_removeComponents(t){t.forEach(t=>{const i=this._find(t);i&&(this.remove(i),i.destroy())})}_addComponents(t){this.constructed&&t.forEach(t=>this.add(this._createComponent(t),this._defaultPositionLookup[t]))}_createComponent(t){const i=this._createWidget(t);return new n({id:t,node:i})}_createWidget(t){const i=this.view;switch(t){case"compass":return new a({view:i});case"navigation-toggle":return new d({view:i,isDefaultUI:!0});case"zoom":return new p({view:i})}}};t([o()],m.prototype,"components",void 0),m=t([s("esri.views.ui.DefaultUI")],m);const h=m;export{h as default};
|
package/views/ui/types.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type Widget from "../../widgets/Widget.js";
|
|
2
2
|
|
|
3
3
|
/** @since 5.0 */
|
|
4
|
-
export type ComponentName = "
|
|
4
|
+
export type ComponentName = "compass" | "navigation-toggle" | "zoom";
|
|
5
5
|
|
|
6
6
|
/** @since 5.0 */
|
|
7
7
|
export interface Options {
|
|
@@ -9,7 +9,16 @@ export interface SunLightingProperties extends Partial<Pick<SunLighting, "direct
|
|
|
9
9
|
* This might lead to different lighting for users in different time zones.
|
|
10
10
|
*/
|
|
11
11
|
date?: (Date | number | string);
|
|
12
|
-
/**
|
|
12
|
+
/**
|
|
13
|
+
* Adds a glow effect to the scene intended for stylistic visualizations. When set, this property creates a halo around
|
|
14
|
+
* light emitters, making them appear brighter and more prominent. Accepts a [Glow](https://developers.arcgis.com/javascript/latest/references/core/webscene/Glow/) instance or `null` to
|
|
15
|
+
* disable the effect.
|
|
16
|
+
*
|
|
17
|
+
* Example:
|
|
18
|
+
* ```js
|
|
19
|
+
* scene.environment.lighting.glow = new Glow({ intensity: 1 });
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
13
22
|
glow?: GlowProperties | null;
|
|
14
23
|
}
|
|
15
24
|
|
|
@@ -46,7 +55,16 @@ export default class SunLighting extends JSONSupport {
|
|
|
46
55
|
* This value does not have an impact on the actual lighting of the scene.
|
|
47
56
|
*/
|
|
48
57
|
accessor displayUTCOffset: number | null | undefined;
|
|
49
|
-
/**
|
|
58
|
+
/**
|
|
59
|
+
* Adds a glow effect to the scene intended for stylistic visualizations. When set, this property creates a halo around
|
|
60
|
+
* light emitters, making them appear brighter and more prominent. Accepts a [Glow](https://developers.arcgis.com/javascript/latest/references/core/webscene/Glow/) instance or `null` to
|
|
61
|
+
* disable the effect.
|
|
62
|
+
*
|
|
63
|
+
* Example:
|
|
64
|
+
* ```js
|
|
65
|
+
* scene.environment.lighting.glow = new Glow({ intensity: 1 });
|
|
66
|
+
* ```
|
|
67
|
+
*/
|
|
50
68
|
get glow(): Glow | null | undefined;
|
|
51
69
|
set glow(value: GlowProperties | null | undefined);
|
|
52
70
|
/** Indicates that the light source is simulated position of the sun. */
|
|
@@ -3,7 +3,16 @@ import type { JSONSupport } from "../core/JSONSupport.js";
|
|
|
3
3
|
import type { GlowProperties } from "./Glow.js";
|
|
4
4
|
|
|
5
5
|
export interface VirtualLightingProperties extends Partial<Pick<VirtualLighting, "directShadowsEnabled">> {
|
|
6
|
-
/**
|
|
6
|
+
/**
|
|
7
|
+
* Adds a glow effect to the scene intended for stylistic visualizations. When set, this property creates a halo around
|
|
8
|
+
* light emitters, making them appear brighter and more prominent. Accepts a [Glow](https://developers.arcgis.com/javascript/latest/references/core/webscene/Glow/) instance or `null` to
|
|
9
|
+
* disable the effect.
|
|
10
|
+
*
|
|
11
|
+
* Example:
|
|
12
|
+
* ```js
|
|
13
|
+
* scene.environment.lighting.glow = new Glow({ intensity: 1 });
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
7
16
|
glow?: GlowProperties | null;
|
|
8
17
|
}
|
|
9
18
|
|
|
@@ -29,7 +38,16 @@ export default class VirtualLighting extends JSONSupport {
|
|
|
29
38
|
* @default false
|
|
30
39
|
*/
|
|
31
40
|
accessor directShadowsEnabled: boolean;
|
|
32
|
-
/**
|
|
41
|
+
/**
|
|
42
|
+
* Adds a glow effect to the scene intended for stylistic visualizations. When set, this property creates a halo around
|
|
43
|
+
* light emitters, making them appear brighter and more prominent. Accepts a [Glow](https://developers.arcgis.com/javascript/latest/references/core/webscene/Glow/) instance or `null` to
|
|
44
|
+
* disable the effect.
|
|
45
|
+
*
|
|
46
|
+
* Example:
|
|
47
|
+
* ```js
|
|
48
|
+
* scene.environment.lighting.glow = new Glow({ intensity: 1 });
|
|
49
|
+
* ```
|
|
50
|
+
*/
|
|
33
51
|
get glow(): Glow | null | undefined;
|
|
34
52
|
set glow(value: GlowProperties | null | undefined);
|
|
35
53
|
/**
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{A as
|
|
2
|
+
import e from"../../WebScene.js";import n from"../../core/Error.js";import r from"../../core/Version.js";import{A as o}from"../../chunks/ajv.bundle.js";import{json as t}from"../../portal/schemas/webScene.js";import{convertAjvErrors as s}from"../../support/validationUtilsAjv.js";let i=null;function c(e,n){d(n);const r=h();return r.validate(j(n),e)?[]:s(r.errors??[])}async function a(n){let o=r.parse(n.version||"","webscene");const t=r.parse(e.version,"webscene");if(o.major===t.major&&o.minor===t.minor)return c(n);o.lessThan(1,38)&&(o=new r(1,38,"webscene"));const i=h(),a=m(o);if(null==i.getSchema(a)){const e=await fetch(l(o));if(e.ok){const n=await e.json();i.addSchema(n,a)}}return i.validate(a,n)?[]:s(i.errors??[])}async function f(e){const n=await a(e);if(n.length)throw new p(n)}function m(e){return`webscene-schema-v${e.major}.${e.minor}.json`}function l(e){return`https://js.arcgis.com/webscene-spec/${m(e)}`}function u(e){const n=e?t.definitions[j(e)]:void 0;if(!n)throw new Error(`invalid schema name to validate against '${e}'`);const r={};for(const o in n)r[o]=n[o];return r.definitions=t.definitions,r}function d(e){const n=j(e),r=h();if(!r.getSchema(n)){const o=u(e);r.addSchema(o,n)}}function h(){return i||(i=new o({allErrors:!0,extendRefs:!0}),i.addSchema(t,j()),i)}function w(){i=null}function j(e){return e?`${e}_schema.json`:"webScene_schema.json"}class p extends n{constructor(e){super("webscene:validation-failed",`WebScene validation failed with ${e.length} ${1===e.length?"error":"errors"}.`,{errors:e})}}export{p as WebSceneValidationError,f as assertValidWebScene,w as clearValidator,l as getVersionedWebSceneSchemaCDNUrl,c as validate,a as validateWebScene};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
function n(
|
|
2
|
+
import r from"../../core/Version.js";function n(r){return!!r?.greaterEqual(1,8)}function e(r){return!!r?.lessThan(1,8)}function o(n){const e=8,o=[],t=n.major;for(let u=e;u<=n.minor;u++)o.push(new r(t,u,"webscene"));return o}export{o as generateWebSceneVersions,e as supportsVisibleElevationLayersInSlides,n as versionSupportsGround};
|
|
@@ -18,7 +18,7 @@ export type AttributionViewModelState = "disabled" | "ready" | "loading";
|
|
|
18
18
|
* >
|
|
19
19
|
* > Esri requires that when you use an ArcGIS Online basemap in your app, the map must include Esri attribution and you must be licensed to use the content.
|
|
20
20
|
* > For detailed guidelines on working with attribution, please visit the official [attribution in your app](https://developers.arcgis.com/terms/attribution/) documentation.
|
|
21
|
-
* > For information
|
|
21
|
+
* > For information, see the [Terms of Use documentation](https://developers.arcgis.com/documentation/terms-of-use/).
|
|
22
22
|
*
|
|
23
23
|
* @since 4.0
|
|
24
24
|
* @see [Attribution](https://developers.arcgis.com/javascript/latest/references/core/widgets/Attribution/)
|
package/widgets/Attribution.d.ts
CHANGED
|
@@ -57,7 +57,7 @@ export interface AttributionProperties extends WidgetProperties, Partial<Pick<At
|
|
|
57
57
|
* >
|
|
58
58
|
* > Esri requires that when you use an ArcGIS Online basemap in your app, the map must include Esri attribution and you must be licensed to use the content.
|
|
59
59
|
* > For detailed guidelines on working with attribution, please visit the official [attribution in your app](https://developers.arcgis.com/terms/attribution/) documentation.
|
|
60
|
-
* > For information
|
|
60
|
+
* > For information, see the [Terms of Use documentation](https://developers.arcgis.com/documentation/terms-of-use/).
|
|
61
61
|
*
|
|
62
62
|
* @deprecated since version 5.0. As of 5.0, attribution is handled automatically by the [Map](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-map/) and [Scene](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-scene/) components, with properties for extracting attribution items, hiding the attribution, as well as setting dark and light mode for the attribution. For information on widget deprecation, read about [Esri's move to web components](https://developers.arcgis.com/javascript/latest/components-transition-plan/).
|
|
63
63
|
* @since 4.0
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import t from"../../Graphic.js";import a from"../../core/Error.js";import{makeHandle as i,handlesGroup as r,abortHandle as s}from"../../core/handleUtils.js";import"../../core/has.js";import n from"../../core/Logger.js";import{removeMaybe as o,destroyMaybe as l}from"../../core/maybe.js";import{isPromiseLike as d,debounce as c}from"../../core/promiseUtils.js";import{watch as u,when as h,initial as p,whenOnce as m,syncAndInitial as f}from"../../core/reactiveUtils.js";import{generateBracedUUID as w}from"../../core/uuid.js";import{property as g,subclass as y}from"../../core/accessorSupport/decorators.js";import{isSharedTemplateOrMetadata as v,isSharedTemplate as _,getCreationAttributes as F,isStandardFeatureTemplate as b}from"../../editing/templateUtils.js";import{getFullTemplate as M}from"../../editing/sharedTemplates/templateLoader.js";import I from"../../layers/GraphicsLayer.js";import{isTable as V}from"../../layers/support/layerUtils.js";import{isNumber as k}from"../../support/guards.js";import{getDisplayedSymbol as S}from"../../symbols/support/symbolUtils.js";import{getDrawHelpMessage as A}from"../../views/draw/support/helpMessageUtils.js";import T from"../../views/draw/support/HighlightHelper.js";import C from"../../views/interactive/sketch/SketchOptions.js";import P from"../../views/interactive/snapping/FeatureSnappingLayerSource.js";import{temporaryHighlightName as E}from"../../views/support/HighlightDefaults.js";import H from"./CreateFeaturesWorkflowData.js";import{isModelUpload as L,handleModelUpload as U}from"./modelUploadUtils.js";import j from"./Workflow.js";import{createToolFromGeometryType as x,findEditorItemForLayer as O,getServiceEditsFromWorkflowData as z,getServiceInfoForLayer as W,orderEditsByRelationshipDependencies as D,getServiceLayersById as R,startCreatingNewFeature as G,findLayerInfo as N,updateGraphicSymbolWhenRequired as K,isTerminalUpdateEventType as Z,getVisualVariableAttributes as q,startUpdatingFeatureGeometry as B,createWorkflowSteps as J,avoidFeatureTemplateSelectionWithOnlyOneItem as Q,setUpSketchCreateWatchers as X,setRelationshipFields as Y,prepareAttachmentsForCreateFeaturesWorkflow as $,showProgressCursor as ee,setVisualVariablesAndElevationInfoForUpdate as te,visualVariableInteractiveUpdate as ae}from"./workflowUtils.js";import ie from"../FeatureForm/FeatureFormViewModel.js";import re from"../Sketch/SketchViewModel.js";var se;const ne=Symbol(),oe=Symbol(),le=Symbol(),de=Symbol(),ce={point:["point"],multipoint:["multipoint"],polygon:["polygon","freehandPolygon","rectangle","circle"],polyline:["polyline","freehandPolyline"],mesh:[],multipatch:[]};let ue=se=class extends j{constructor(e){super(e),this.type="create-features",this.createFeatureState="create-new",this.data=void 0,this.isNested=!1,this._getDrawMeshHelpMessage=void 0,this._webStyleCache=new Map,this._featureFormHandle=null,this._visualVariableAttributes={rotation:null,size:null},this._formViewModel=new ie,this._sketchLayer=null,this._sketchViewModel=null,this._attachmentFileInfos=new Map,this._isActive=!0}initialize(){this.isNested&&(this._isActive=!1),this._initializeSketchViewModel()}destroy(){this._sketchViewModel.destroy()}get allowSave(){return!this.updating}get formViewModel(){return this._formViewModel}get hasInvalidFormTemplate(){return!!this.data.editorItem?.hasInvalidFormTemplate}get hasPendingEdits(){if(this.pendingFeatures.some(e=>!!this.data.getEditsForPendingFeature(e)?.modified))return!0;const{creationInfo:e,upload:t}=this.data,{activeComponent:a,createGraphic:i}=this._sketchViewModel,r=i?.geometry?.type;return!("polyline"!==r&&"polygon"!==r&&"multipoint"!==r||"draw-2d"!==a?.type&&"draw-3d"!==a?.type)&&a.drawOperation.committedVertices.length>0||(!(!t||"pending"!==t.state&&"success"!==t.state)||!!e?.geometryToPlace)}get hasPreviousStep(){return this._stepIndex>0||"update-pending"===this.createFeatureState&&!!this.data.selectedPendingFeature&&!this.parent&&!L(this.data.creationInfo)}get helpMessage(){const{creationInfo:e,viewModel:t}=this.data;if("creating-features"!==this.stepId||!e)return;const{_sketchViewModel:a}=this,i=e.layer.geometryType,r=a.createGraphic;if("mesh"===i){this._getDrawMeshHelpMessage||import("../../views/draw/support/helpMessageUtils3d.js").then(e=>{this._getDrawMeshHelpMessage=e.getDrawMeshHelpMessage});const{view:e}=t;return"3d"===e?.type?this._getDrawMeshHelpMessage?.(r,e):void 0}const{activeCreateToolDrawMode:s,activeTool:n}=a;return A("rectangle"===n||"circle"===n?n:i,r?.geometry,s)}get layer(){return this.data.creationInfo?.layer}get numPendingFeatures(){return this.pendingFeatures.length}get numPendingFeaturesExcludingHidden(){return this.pendingFeatures.filter(e=>this.data.isDisplayable(e)).length}get parent(){return this.data.parent}get pendingFeatures(){return this.data.pendingFeatures}get keyboardCancellationEnabled(){return 0===this.numPendingFeatures}get reliesOnOwnerAdminPrivileges(){return this.data.editorItem?.capabilities.create.reliesOnOwnerAdminPrivileges??!1}get saveActionLabel(){return"create"}get shouldShowAttachments(){return(this.data.selectedPendingFeature&&this.data.editorItem?.capabilities.create.attachments.enabled)??!1}get shouldAllowAttachmentEditing(){return this.shouldShowAttachments}get sketchViewModel(){return this._sketchViewModel}get test(){}get availableCreateTools(){const e=this.data.creationInfo?.layer.geometryType,t=this.data.viewModel.view;if(!e)return[];if(this.data.creationInfo?.maxFeatures&&this.data.creationInfo.maxFeatures<=this.numPendingFeatures)return[];if(v(this.data.fullTemplate)){const{tool:t}=x(e,this.data.fullTemplate);return[t]}return"2d"!==t?.type&&"multipoint"===e?[]:[...ce[e]]}get _attachmentsActive(){const e=this.data.viewModel.attachmentsViewModel.mode,t=this.stepId;return this.shouldShowAttachments&&("add"===e||"edit"===e||"adding-attachment"===t||"editing-attachment"===t)}async enter(){this._isActive=!0,"awaiting-feature-creation-info"!==this.stepId&&await this._updatingHandles.addPromise(this._setUpCreatingFeaturesStep())}exit(){this._isActive=!1,this.removeHandles([le])}async updatePendingFeature(e){if(e!==this.data.selectedPendingFeature)return this._sketchViewModel.cancel(),this._startUpdating({feature:e})}async start(){return await super.start(),V(this.data.creationInfo?.layer)?null:{enter:async()=>{},exit:async()=>{},viewModel:this._sketchViewModel}}async save(){const{formViewModel:e}=this;if(e.pendingSubtypeChoice)return;e.submit(),this._stashValidationState();const t=this.data.selectedPendingFeature,a=this._hasValidationErrors(t)?t:this.data.pendingFeatures.find(e=>this._hasValidationErrors(e));return a?(await this._startUpdating({feature:a}),void e?.submit()):super.save()}back(e){return"update-pending"!==this.createFeatureState||!this.data.selectedPendingFeature||L(this.data.creationInfo)||this._attachmentsActive||this.parent?super.back(e):this._clearSelectedFeature()}previous(e){return"update-pending"!==this.createFeatureState||!this.data.selectedPendingFeature||L(this.data.creationInfo)||this._attachmentsActive?super.previous(e):this._clearSelectedFeature()}cancelFeature(e){this.data.isSharedTemplateWorkflow?n.getLogger(this).warn("Cannot cancel individual features created by shared templates."):(this.data.removePendingFeature(e),this.sketchViewModel.removeGraphic(e))}static create(e){const{addAttachmentsCallback:t,applyEdits:a,applyEditsFeatureService:i,isNested:r,creationInfo:s,parent:n,snappingManager:o,startAt:l,viewModel:d}=e,c=e.sketchOptions??new C,u=s?.layer,h=u?O(d.editorItems,u):void 0,p=new se({data:new H({creationInfo:s,editorItem:h,parent:n,sketchOptions:c,snappingManager:o,viewModel:d}),isNested:r,onCommit:async e=>{const{creationInfo:r}=e;if(!r)return;p._sketchViewModel.cancel();const s=e.pendingFeatures.toArray(),{layer:n}=r,o=n.capabilities?.editing.supportsGlobalId&&"globalIdField"in n,l=p._attachmentFileInfos,{fullTemplate:c}=e,u=z(p.data),h=_(c)&&u;if(o){if(fe(s),h){let t=ge(u,l);const a=await(W(n,d.view)?.load());a&&(t=D({edits:t,serviceInfo:a,view:d.view,findOriginalFeature:t=>e.getEditsForPendingFeature(t)?.initialFeature??t})),await i(c.featureService,t,{globalIdUsed:!0,honorSequenceOfEdits:!0,gdbVersion:c.layer.gdbVersion??void 0})}else{const e=we(s,l);await a(n,e,{globalIdUsed:!0})}return}const m=h?await i(c.featureService,u,{gdbVersion:c.layer.gdbVersion??void 0}):[await a(n,{addFeatures:s})];m&&l.size>0&&await Promise.all(m.map(e=>{if(e?.addFeatureResults)return t(n,me(s,e.addFeatureResults,n,l))}))}});return p._set("steps",this._createWorkflowSteps(p,l)),p}_fadeExistingFeatures(e){if("effect"in e){const t=e.effect;return e.effect="saturate(0.6) opacity(0.8)",i(()=>e.effect=t)}const t=e.opacity;return e.opacity=.7,i(()=>e.opacity=t)}async _initializeFullTemplateAndExecutorInfo(e){const{creationInfo:t}=e,{view:a}=e.viewModel;if(!t||!a)return null;const i=await M(a,t.template);if(e.fullTemplate=i,i&&_(i)){const{createTemplateExecutor:r}=await import("../../editing/sharedTemplates/executor/createTemplateExecutor.js"),s={completionResults:[],executor:await r(i),serviceLayersById:R(t.layer,a)};e.templateExecutorInfo=s}return i}async _startCreating(){this.removeHandles(oe);const{data:e}=this;if(!e.creationInfo)return;const t=this.data.creationInfo?.maxFeatures;if(t&&this.numPendingFeatures>=t)return this.sketchViewModel.cancel(),void(this.numPendingFeatures&&await this._startUpdating({feature:this.pendingFeatures.at(-1)}));this.createFeatureState="create-new",await G(this._sketchViewModel,this._sketchLayer,e,this._webStyleCache)}async _clearSelectedFeature(){const e=this._formViewModel.pendingSubtypeChoice;e&&(e.resolve("undo"),await e.promise),this._stashValidationState(),this.sketchViewModel.cancel(),this.data.selectedPendingFeature=null,this._featureFormHandle=o(this._featureFormHandle),this._formViewModel.feature=null;const t=this.data.viewModel.attachmentsViewModel;"add"!==t.mode&&"edit"!==t.mode||await(this.data.viewModel.activeWorkflow?.previous())}_stashValidationState(){const e=this._formViewModel.feature,t=e&&this.data.getEditsForPendingFeature(e);t&&(t.submittable=this._formViewModel.submittable)}async _selectFeatureForUpdate({feature:e,initialFeature:t=e}){this._stashValidationState();const{data:a,pendingFeatures:i,_webStyleCache:s}=this;i.includes(e)||a.addPendingFeature(e,t),a.selectedPendingFeature=e;const{_formViewModel:n,_sketchViewModel:l}=this,{creationInfo:d,viewModel:c}=a,{attachmentsViewModel:h,layerInfos:p,view:m}=c;if(!m||!d)return;o(this._featureFormHandle);const f=e.sourceLayer,w=N(p,f),g=w?.formTemplate,y=m.spatialReference;n.set({editType:"INSERT",feature:e,formTemplate:g,spatialReference:y,map:m.map}),"add"!==h.mode&&"edit"!==h.mode||await(c.activeWorkflow?.previous()),h.graphic=e,h.fileInfos.removeAll(),h.mode="view";(this._attachmentFileInfos.get(e)||[]).forEach(({file:e,form:t})=>h.addFile(e,t)),await K(e,s,"2d"===m.type?m.scale:null);const v=a.getEditsForPendingFeature(e);this._featureFormHandle=r([n.on("value-change",async({fieldName:t,value:a})=>{if(v?.updateAttributes(n.getValues()),k(a)){const e=this._visualVariableAttributes;e.size&&!e.size.isUpdatingInteractively&&t===e.size.field&&e.size.setInitialValue(a),e.rotation&&!e.rotation.isUpdatingInteractively&&t===e.rotation.field&&e.rotation.setInitialValue(a)}await K(e,s,"2d"===m.type?m.scale:null)}),l.on(["update","undo","redo"],e=>{("undo"===e.type||"redo"===e.type||"update"===e.type&&null!=e.toolEventInfo&&Z(e.toolEventInfo.type))&&n.notifyFeatureGeometryChanged()}),u(()=>n.feature?.sourceLayer,t=>e.sourceLayer=t),u(()=>[n.feature,n.submittable],()=>this._stashValidationState())]),this.createFeatureState="update-pending"}async _startUpdating({feature:e,initialFeature:t=e}){await this._selectFeatureForUpdate({feature:e,initialFeature:t});const{_sketchLayer:a,_sketchViewModel:i,data:r}=this,{creationInfo:s,viewModel:n}=r,{view:o}=n;if(!o||!s)return;const l=e.sourceLayer??s.layer;return V(l)?void 0:(this._visualVariableAttributes=q(e),B({graphic:e,sketchLayer:a,sketchViewModel:i,sourceLayer:l,visualVariables:this._visualVariableAttributes,webStyleCache:this._webStyleCache}))}static _createWorkflowSteps(e,t="awaiting-feature-creation-info"){const{data:a}=e,i=J(["awaiting-feature-creation-info","creating-features","adding-attachment","editing-attachment"],t,{"awaiting-feature-creation-info":()=>({id:"awaiting-feature-creation-info",async setUp(){const{creationInfo:t,viewModel:i}=a,{view:r}=i;r&&(L(t)?e.addHandles(await U({view:r,data:a,next:()=>e.next(),cancel:()=>i.cancelWorkflow({warnIfNoWorkflow:!1})}),this.id):(a.parent&&t&&e.addHandles(i.restrictFeatureTemplatesViewModelToLayer(t.layer),this.id),e.addHandles(i.featureTemplatesViewModel.on("select",({item:t})=>{t&&(a.creationInfo={...a.creationInfo,layer:t.layer,template:t.template},e.next())}),this.id)))},async tearDown(){e.removeHandles(this.id)}}),"creating-features":()=>({id:"creating-features",async setUp(){e._isActive&&await e._setUpCreatingFeaturesStep()},async tearDown(t){const{viewModel:i}=a;t.canceled&&(e.removeHandles([le,ne,oe,de]),i.attachmentsViewModel.fileInfos.removeAll(),e._attachmentFileInfos.clear())}}),"adding-attachment":()=>({id:"adding-attachment",parent:"creating-features",async setUp(){},async tearDown(){const{attachmentsViewModel:t}=a.viewModel,{graphic:i,fileInfos:r}=t;e._attachmentFileInfos.set(i,r.toArray()),t.mode="view"}}),"editing-attachment":()=>({id:"editing-attachment",parent:"creating-features",async setUp(){},async tearDown(){const{attachmentsViewModel:t}=a.viewModel,{graphic:i,fileInfos:r}=t;e._attachmentFileInfos.set(i,r.toArray()),t.mode="view"}})});return Q(a,i)}static _configureSketchViewModel(e){const{data:t,_sketchLayer:a,_sketchViewModel:s,_webStyleCache:n}=e,{creationInfo:o,viewModel:l}=t,{view:d}=l,p=[];if(!d)return i();if("2d"===d.type){o&&p.push(e._fadeExistingFeatures(o.layer));const t=c((e,t)=>Promise.all(e.map(e=>K(e,n,t))));p.push(u(()=>d.scale,e=>t(a.graphics,e)))}const m=F(t.fullTemplate,o?.attributeOverrides),f=u(()=>s.createGraphic,a=>{a&&!e.hasHandles(oe)&&e._updatingHandles.consumePromise(X({creationAttributes:m,data:t,sketchViewModel:s,view:d,webStyleCache:n}).then(t=>e.addHandles(t,oe)))}),w=async t=>{if("cancel"!==t.state&&"complete"!==t.state||e.removeHandles(oe),"cancel"===t.state&&null!==d.activeTool&&d.activeTool!==e.sketchViewModel.activeComponent&&(await e._waitForActiveToolCleared(),await e._startCreating()),"complete"===t.state&&t.graphic){const a=await e._processEdits(t.graphic,{scale:"2d"===d.type?d.scale:null,useSourceLayer:!0,webStyleCache:e._webStyleCache});a&&(await e._waitForActiveToolCleared(),await e._startUpdating({feature:a}))}},g=async i=>{const{attachmentsViewModel:r}=l,{_formViewModel:n}=e;if(i.graphics.length>1)return void await e._clearSelectedFeature();const c=i.graphics[0];if("complete"===i.state){const{submittable:t}=n;if(e.numPendingFeatures!==o?.maxFeatures&&t||n.submit(),await e._clearSelectedFeature(),"add"!==r.mode&&"edit"!==r.mode||await(l.activeWorkflow?.previous()),!i.aborted&&d.activeTool===e.sketchViewModel.activeComponent&&(await e.sketchViewModel.wait(),"ready"===e.sketchViewModel.state&&"mesh"!==e.data.creationInfo?.layer.geometryType))return e._startCreating()}else{if("start"===i.state)return c.sourceLayer??=t.creationInfo?.layer,await te({graphic:c,sketchLayer:a,sketchViewModel:s,visualVariables:e._visualVariableAttributes,webStyleCache:e._webStyleCache,sourceLayer:c.sourceLayer}),e._selectFeatureForUpdate({feature:c});if("active"===i.state){await e.updatePendingFeature(c);const t=e._visualVariableAttributes;ae(d,c,i,t)&&await K(c,e._webStyleCache,"2d"===d.type?d.scale:null);const a=c.attributes,{rotation:r,size:s}=t;if(null!=r){const{field:e}=r;n.setValue(e,a[e])}if(null!=s){const{field:e}=s;n.setValue(e,a[e])}}}},y=async a=>{if(a.graphics.forEach(e=>{t.removePendingFeature(e)}),!L(t.creationInfo))return e._startCreating()},v=async()=>{if(L(t.creationInfo))try{await e.data.viewModel.back()}catch{}return e._startCreating()};p.push(f,s.on("create",t=>e._updatingHandles.addPromise(w(t))),s.on("update",t=>e._updatingHandles.addPromise(g(t))),s.on("delete",t=>e._updatingHandles.addPromise(y(t))),h(()=>!e.numPendingFeatures,()=>e._updatingHandles.addPromise(v())),i(()=>{s.cancel()}),he(s,a,t),...pe(t));const _=r(p);return s.addHandles(_),_}_initializeSketchViewModel(){const{data:e}=this,{view:t}=e.viewModel,a=new I({elevationInfo:e.creationInfo?.layer.elevationInfo,internal:!0,listMode:"hide",title:"createFeaturesWorkflow-internal"}),r=new re({layer:a,creationMode:"single",sketchOptions:e.sketchOptions,snappingManager:e.snappingManager,updateOnGraphicClick:!1,defaultUpdateOptions:{multipleSelectionEnabled:!1},view:t});this._sketchLayer=a,this._sketchViewModel=r,t?.map.add(a),this.addHandles([i(()=>{t?.destroyed||t?.map.remove(a),a.destroy()}),u(()=>this.numPendingFeatures>0,e=>this._sketchViewModel.updateOnGraphicClick=e,p)])}_hasValidationErrors(e){return!!e&&(!this.data.isSubmittable(e)||!!this._formViewModel.validateContingencyConstraints(e.attributes,{includeIncompleteViolations:!0})?.length)}async _processEdits(e,t){const{data:a,_formViewModel:i,_sketchLayer:r}=this,{layerInfos:s,view:n}=a.viewModel;i.editType="INSERT",i.map=n?.map,i.spatialReference=n?.spatialReference;const{templateExecutorInfo:o}=a;if(!o){const t=e.clone();return t.geometry=null,await this._addAndInitializeEdits(e,t),e}r.remove(e);const{executor:l}=o,c=l(e.geometry,"completion"),u=d(c)?await c:c;o.completionResults.push(u),Y(u.relationships),i.editType="INSERT",i.map=n?.map,i.spatialReference=n?.spatialReference,u.primary&&a.creationInfo?.attributeOverrides&&(u.primary.graphic.attributes={...u.primary.graphic.attributes,...a.creationInfo.attributeOverrides});for(const d of u.edits){let e=null;if(d.addFeatures)for(const a of d.addFeatures){const i=a.clone();i.geometry=null,null!=a.geometry&&(a.symbol=await S(a,t),r.add(a)),a.sourceLayer!==e?.layer&&(e=N(s,a.sourceLayer));const n=!!u.associationGraphics?.has(a);await this._addAndInitializeEdits(a,i,e,n)}}i.feature=null,await m(()=>!i.updating);return u.edits.reduce((e,t)=>e+(t.addFeatures?.length??0),0)>1?null:u.primary?.graphic}async _addAndInitializeEdits(e,t,a,i=!1){const{data:r,_formViewModel:s}=this,{layerInfos:n}=r.viewModel,o=r.addPendingFeature(e,t,{isAssociation:i});a??=N(n,e.sourceLayer),s.feature=e,s.formTemplate=a?.formTemplate,await m(()=>!s.updating),o.updateAttributes(s.getValues()),o.submittable=s.submittable}async _setUpCreatingFeaturesStep(){if(this.hasHandles(le))return;const{data:e,sketchViewModel:s}=this,{creationInfo:n,viewModel:l}=e,{attachmentsViewModel:d,view:c}=l;if(!c||!n?.layer)throw new a("missing-parameters","CreateFeaturesWorkflow requires a view and creationInfo.");const{initialFeature:h,layer:m}=n,f=[],w=[];this._featureFormHandle=o(this._featureFormHandle),this._visualVariableAttributes={rotation:null,size:null},e.editorItem=O(l.editorItems,n.layer),n.template&&(null==e.fullTemplate&&await this._initializeFullTemplateAndExecutorInfo(e),w.push(i(()=>{e.templateExecutorInfo&&(e.templateExecutorInfo.completionResults=[])}))),s.allowDeleteKey=!e.isSharedTemplateWorkflow,$(d),f.push(u(()=>d.mode,e=>{switch(e){case"add":this.go("adding-attachment");break;case"edit":this.go("editing-attachment")}}));const g=ee(c);f.push(g);const y=V(n.layer),{template:_}=n,M=!_||b(_)||v(_)&&"feature"===_.type,I=y&&M;try{if(I){const a=h??new t({attributes:F(e.fullTemplate,n.attributeOverrides),sourceLayer:m}),i=await this._processEdits(a);i&&await this._startUpdating({feature:i})}else f.push(se._configureSketchViewModel(this)),h?(L(n)&&n.geometryToPlace&&(h.attributes=F(e.fullTemplate,n.attributeOverrides)),s.addGraphic(h),await this._startUpdating({feature:h})):await this._startCreating()}finally{g.remove()}const k=i(()=>{for(const t of e.pendingFeatures)s.removeGraphic(t),e.removePendingFeature(t)}),S=u(()=>c?.timeZone,e=>{this._formViewModel.timeZone=e,this.data.timeZone=e},p),A=i(()=>{L(n)&&l.cancelWorkflow({warnIfNoWorkflow:!1})});this._featureFormHandle&&f.push(this._featureFormHandle),this.addHandles(f,this._handleKeys.beforeCommit),this.addHandles(w,this._handleKeys.afterCommit),this.addHandles([i(()=>d.fileInfos.removeAll()),r(f),r(w),A,k,S],le)}async _waitForActiveToolCleared(){const e=this.data.viewModel.view;if(null==e?.activeTool)return;const t=new AbortController;this.addHandles(s(t),de),await m(()=>null==e?.activeTool,t.signal),t.abort()}};function he(e,t,a){let s=null;const n=()=>e.snappingOptions.featureSources,o=()=>(s=new P({layer:t}),n().add(s),s),d=()=>{null!=s&&(n().remove(s),s=l(s))};return r([u(()=>{const e=a.creationInfo?.layer,t=n().find(t=>t.layer===e);return{hasFeatureLayerSource:!!t,enabled:t?.enabled??!1}},({hasFeatureLayerSource:e,enabled:t})=>{if(!e)return d();s??=o(),s.enabled=t},f),i(d)])}function pe(e){const t=e.viewModel.view;if(!t)return[];const a=[];if("3d"===t.type){const r=new T({view:t});a.push(u(()=>e.selectedPendingFeature,(e,t)=>{r.remove(e),r.add(t)}),i(()=>r.destroy()))}const r=new T({view:t,highlightName:E});return a.push(u(()=>e.temporaryHighlightFeature,e=>{r.removeAll(),r.add(e)}),i(()=>r.destroy())),a}function me(e,t,a,i){const r=[];return t.forEach((t,s)=>{if(!t.error){const n=e[s],o=i.get(n)||[];n.attributes[a.objectIdField]=t.objectId,o.forEach(({form:e})=>r.push({feature:n,attachment:e}))}}),r}function fe(e){for(const t of e){const{sourceLayer:e}=t;e&&"globalIdField"in e&&null!=e.globalIdField&&(t.attributes[e.globalIdField]??=w())}}function we(e,t){const a=[];if(!t||0===t.size)return{addFeatures:e};for(const[i,r]of t)for(const{file:e}of r)a.push({feature:i,attachment:{globalId:w(),data:e}});return a.length?{addFeatures:e,addAttachments:a}:{addFeatures:e}}function ge(e,t){return e.map(e=>{const{addFeatures:a}=e;if(!a||0===a.length)return e;const i=[];for(const r of a){const e=t.get(r);if(e)for(const{file:t}of e)i.push({feature:r,attachment:{globalId:w(),data:t}})}return i.length?{...e,addAttachments:i}:e})}e([g()],ue.prototype,"allowSave",null),e([g()],ue.prototype,"createFeatureState",void 0),e([g()],ue.prototype,"data",void 0),e([g({constructOnly:!0})],ue.prototype,"isNested",void 0),e([g()],ue.prototype,"formViewModel",null),e([g()],ue.prototype,"hasInvalidFormTemplate",null),e([g()],ue.prototype,"hasPendingEdits",null),e([g()],ue.prototype,"hasPreviousStep",null),e([g()],ue.prototype,"_getDrawMeshHelpMessage",void 0),e([g()],ue.prototype,"helpMessage",null),e([g()],ue.prototype,"layer",null),e([g()],ue.prototype,"parent",null),e([g()],ue.prototype,"keyboardCancellationEnabled",null),e([g()],ue.prototype,"reliesOnOwnerAdminPrivileges",null),e([g()],ue.prototype,"saveActionLabel",null),e([g()],ue.prototype,"shouldShowAttachments",null),e([g()],ue.prototype,"shouldAllowAttachmentEditing",null),e([g()],ue.prototype,"sketchViewModel",null),e([g()],ue.prototype,"availableCreateTools",null),e([g()],ue.prototype,"_attachmentsActive",null),ue=se=e([y("esri.widgets.Editor.CreateFeaturesWorkflow")],ue);const ye=ue;export{ye as default};
|
|
2
|
+
import{__decorate as e}from"tslib";import t from"../../Graphic.js";import a from"../../core/Error.js";import{makeHandle as i,handlesGroup as r,abortHandle as s}from"../../core/handleUtils.js";import"../../core/has.js";import o from"../../core/Logger.js";import{removeMaybe as n,destroyMaybe as l}from"../../core/maybe.js";import{isPromiseLike as d,debounce as c}from"../../core/promiseUtils.js";import{watch as u,when as h,initial as p,whenOnce as m,syncAndInitial as f}from"../../core/reactiveUtils.js";import{generateBracedUUID as w}from"../../core/uuid.js";import{property as g,subclass as y}from"../../core/accessorSupport/decorators.js";import{isSharedTemplateOrMetadata as v,isSharedTemplate as _,getCreationAttributes as F,isStandardFeatureTemplate as b}from"../../editing/templateUtils.js";import{getFullTemplate as M}from"../../editing/sharedTemplates/templateLoader.js";import I from"../../layers/GraphicsLayer.js";import{isTable as V}from"../../layers/support/layerUtils.js";import{isNumber as k}from"../../support/guards.js";import{getDisplayedSymbol as S}from"../../symbols/support/symbolUtils.js";import{getDrawHelpMessage as A}from"../../views/draw/support/helpMessageUtils.js";import T from"../../views/draw/support/HighlightHelper.js";import C from"../../views/interactive/sketch/SketchOptions.js";import P from"../../views/interactive/snapping/FeatureSnappingLayerSource.js";import{temporaryHighlightName as E}from"../../views/support/HighlightDefaults.js";import H from"./CreateFeaturesWorkflowData.js";import{isModelUpload as L,handleModelUpload as U}from"./modelUploadUtils.js";import j from"./Workflow.js";import{createToolFromGeometryType as x,findEditorItemForLayer as O,getServiceEditsFromWorkflowData as z,getServiceInfoForLayer as W,orderEditsByRelationshipDependencies as D,getServiceLayersById as R,startCreatingNewFeature as G,findLayerInfo as N,updateGraphicSymbolWhenRequired as K,isTerminalUpdateEventType as Z,getVisualVariableAttributes as q,startUpdatingFeatureGeometry as B,createWorkflowSteps as J,avoidFeatureTemplateSelectionWithOnlyOneItem as Q,setUpSketchCreateWatchers as X,setRelationshipFields as Y,prepareAttachmentsForCreateFeaturesWorkflow as $,showProgressCursor as ee,setVisualVariablesAndElevationInfoForUpdate as te,visualVariableInteractiveUpdate as ae}from"./workflowUtils.js";import ie from"../FeatureForm/FeatureFormViewModel.js";import re from"../Sketch/SketchViewModel.js";var se;const oe=Symbol(),ne=Symbol(),le=Symbol(),de=Symbol(),ce={point:["point"],multipoint:["multipoint"],polygon:["polygon","freehandPolygon","rectangle","circle"],polyline:["polyline","freehandPolyline"],mesh:[],multipatch:[]};let ue=se=class extends j{constructor(e){super(e),this.type="create-features",this.createFeatureState="create-new",this.data=void 0,this.isNested=!1,this._getDrawMeshHelpMessage=void 0,this._webStyleCache=new Map,this._featureFormHandle=null,this._visualVariableAttributes={rotation:null,size:null},this._formViewModel=new ie,this._sketchLayer=null,this._sketchViewModel=null,this._attachmentFileInfos=new Map,this._isActive=!0}initialize(){this.isNested&&(this._isActive=!1),this._initializeSketchViewModel()}destroy(){this._sketchViewModel.destroy()}get allowSave(){return!this.updating}get formViewModel(){return this._formViewModel}get hasInvalidFormTemplate(){return!!this.data.editorItem?.hasInvalidFormTemplate}get hasPendingEdits(){if(this.pendingFeatures.some(e=>!!this.data.getEditsForPendingFeature(e)?.modified))return!0;const{creationInfo:e,upload:t}=this.data,{activeComponent:a,createGraphic:i}=this._sketchViewModel,r=i?.geometry?.type;return!("polyline"!==r&&"polygon"!==r&&"multipoint"!==r||"draw-2d"!==a?.type&&"draw-3d"!==a?.type)&&a.drawOperation.committedVertices.length>0||(!(!t||"pending"!==t.state&&"success"!==t.state)||!!e?.geometryToPlace)}get hasPreviousStep(){return this._stepIndex>0||"update-pending"===this.createFeatureState&&!!this.data.selectedPendingFeature&&!this.parent&&!L(this.data.creationInfo)}get helpMessage(){const{creationInfo:e,viewModel:t}=this.data;if("creating-features"!==this.stepId||!e)return;const{_sketchViewModel:a}=this,i=e.layer.geometryType,r=a.createGraphic;if("mesh"===i){this._getDrawMeshHelpMessage||import("../../views/draw/support/helpMessageUtils3d.js").then(e=>{this._getDrawMeshHelpMessage=e.getDrawMeshHelpMessage});const{view:e}=t;return"3d"===e?.type?this._getDrawMeshHelpMessage?.(r,e):void 0}const{activeCreateToolDrawMode:s,activeTool:o}=a;return A("rectangle"===o||"circle"===o?o:i,r?.geometry,s)}get layer(){return this.data.creationInfo?.layer}get numPendingFeatures(){return this.pendingFeatures.length}get numPendingFeaturesExcludingHidden(){return this.pendingFeatures.filter(e=>this.data.isDisplayable(e)).length}get parent(){return this.data.parent}get pendingFeatures(){return this.data.pendingFeatures}get keyboardCancellationEnabled(){return 0===this.numPendingFeatures}get reliesOnOwnerAdminPrivileges(){return this.data.editorItem?.capabilities.create.reliesOnOwnerAdminPrivileges??!1}get saveActionLabel(){return"create"}get shouldShowAttachments(){return(this.data.selectedPendingFeature&&this.data.editorItem?.capabilities.create.attachments.enabled)??!1}get shouldAllowAttachmentEditing(){return this.shouldShowAttachments}get sketchViewModel(){return this._sketchViewModel}get test(){}get availableCreateTools(){const e=this.data.creationInfo?.layer.geometryType,t=this.data.viewModel.view;if(!e)return[];if(this.data.creationInfo?.maxFeatures&&this.data.creationInfo.maxFeatures<=this.numPendingFeatures)return[];if(v(this.data.fullTemplate)){const{tool:t}=x(e,this.data.fullTemplate);return[t]}return"2d"!==t?.type&&"multipoint"===e?[]:[...ce[e]]}get _attachmentsActive(){const e=this.data.viewModel.attachmentsViewModel.mode,t=this.stepId;return this.shouldShowAttachments&&("add"===e||"edit"===e||"adding-attachment"===t||"editing-attachment"===t)}async enter(){this._isActive=!0,"awaiting-feature-creation-info"!==this.stepId&&await this._updatingHandles.addPromise(this._setUpCreatingFeaturesStep())}exit(){this._isActive=!1,this.removeHandles([le])}async updatePendingFeature(e){if(e!==this.data.selectedPendingFeature)return this._sketchViewModel.cancel(),this._startUpdating({feature:e})}async start(){return await super.start(),V(this.data.creationInfo?.layer)?null:{enter:async()=>{},exit:async()=>{},viewModel:this._sketchViewModel}}async save(){const{formViewModel:e}=this;if(e.pendingSubtypeChoice)return;e.submit(),this._stashValidationState();const t=this.data.selectedPendingFeature,a=this._hasValidationErrors(t)?t:this.data.pendingFeatures.find(e=>this._hasValidationErrors(e));return a?(await this._startUpdating({feature:a}),void e?.submit()):super.save()}back(e){return"update-pending"!==this.createFeatureState||!this.data.selectedPendingFeature||L(this.data.creationInfo)||this._attachmentsActive||this.parent?super.back(e):this._clearSelectedFeature()}previous(e){return"update-pending"!==this.createFeatureState||!this.data.selectedPendingFeature||L(this.data.creationInfo)||this._attachmentsActive?super.previous(e):this._clearSelectedFeature()}cancelFeature(e){this.data.isSharedTemplateWorkflow?o.getLogger(this).warn("Cannot cancel individual features created by shared templates."):(this.data.removePendingFeature(e),this.sketchViewModel.removeGraphic(e))}static create(e){const{addAttachmentsCallback:t,applyEdits:a,applyEditsFeatureService:i,isNested:r,creationInfo:s,parent:o,snappingManager:n,startAt:l,viewModel:d}=e,c=e.sketchOptions??new C,u=s?.layer,h=u?O(d.editorItems,u):void 0,p=new se({data:new H({creationInfo:s,editorItem:h,parent:o,sketchOptions:c,snappingManager:n,viewModel:d}),isNested:r,onCommit:async e=>{const{creationInfo:r}=e;if(!r)return;p._sketchViewModel.cancel();const s=e.pendingFeatures.toArray(),{layer:o}=r,n=o.capabilities?.editing.supportsGlobalId&&"globalIdField"in o,l=p._attachmentFileInfos,{fullTemplate:c}=e,u=z(p.data),h=_(c)&&u;if(n){if(fe(s),h){let t=ge(u,l);const a=await(W(o,d.view)?.load());a&&(t=D({edits:t,serviceInfo:a,view:d.view,findOriginalFeature:t=>e.getEditsForPendingFeature(t)?.initialFeature??t})),await i(c.featureService,t,{globalIdUsed:!0,honorSequenceOfEdits:!0,gdbVersion:c.layer.gdbVersion??void 0})}else{const e=we(s,l);await a(o,e,{globalIdUsed:!0})}return}const m=h?await i(c.featureService,u,{gdbVersion:c.layer.gdbVersion??void 0}):[await a(o,{addFeatures:s})];m&&l.size>0&&await Promise.all(m.map(e=>{if(e?.addFeatureResults)return t(o,me(s,e.addFeatureResults,o,l))}))}});return p._set("steps",this._createWorkflowSteps(p,l)),p}_fadeExistingFeatures(e){if("effect"in e){const t=e.effect;return e.effect="saturate(0.6) opacity(0.8)",i(()=>e.effect=t)}const t=e.opacity;return e.opacity=.7,i(()=>e.opacity=t)}async _initializeFullTemplateAndExecutorInfo(e){const{creationInfo:t}=e,{view:a}=e.viewModel;if(!t||!a)return null;const i=await M(a,t.template);if(e.fullTemplate=i,i&&_(i)){const{createTemplateExecutor:r}=await import("../../editing/sharedTemplates/executor/createTemplateExecutor.js"),s={completionResults:[],executor:await r(i),serviceLayersById:R(t.layer,a)};e.templateExecutorInfo=s}return i}async _startCreating(){this.removeHandles(ne);const{data:e}=this;if(!e.creationInfo)return;const t=this.data.creationInfo?.maxFeatures;if(t&&this.numPendingFeatures>=t)return this.sketchViewModel.cancel(),void(this.numPendingFeatures&&await this._startUpdating({feature:this.pendingFeatures.at(-1)}));this.createFeatureState="create-new",await G(this._sketchViewModel,this._sketchLayer,e,this._webStyleCache)}async _clearSelectedFeature(){const e=this._formViewModel.pendingSubtypeChoice;e&&(e.resolve("undo"),await e.promise),this._stashValidationState(),this.sketchViewModel.cancel(),this.data.selectedPendingFeature=null,this._featureFormHandle=n(this._featureFormHandle),this._formViewModel.feature=null;const t=this.data.viewModel.attachmentsViewModel;"add"!==t.mode&&"edit"!==t.mode||await(this.data.viewModel.activeWorkflow?.previous())}_stashValidationState(){const e=this._formViewModel.feature,t=e&&this.data.getEditsForPendingFeature(e);t&&(t.submittable=this._formViewModel.submittable)}async _selectFeatureForUpdate({feature:e,initialFeature:t=e}){this._stashValidationState();const{data:a,pendingFeatures:i,_webStyleCache:s}=this;i.includes(e)||a.addPendingFeature(e,t),a.selectedPendingFeature=e;const{_formViewModel:o,_sketchViewModel:l}=this,{creationInfo:d,viewModel:c}=a,{attachmentsViewModel:h,layerInfos:p,view:m}=c;if(!m||!d)return;n(this._featureFormHandle);const f=e.sourceLayer,w=N(p,f),g=w?.formTemplate,y=m.spatialReference;o.set({editType:"INSERT",feature:e,formTemplate:g,spatialReference:y,map:m.map}),"add"!==h.mode&&"edit"!==h.mode||await(c.activeWorkflow?.previous()),h.graphic=e,h.fileInfos.removeAll(),h.mode="view";(this._attachmentFileInfos.get(e)||[]).forEach(({file:e,form:t})=>h.addFile(e,t)),await K(e,s,"2d"===m.type?m.scale:null);const v=a.getEditsForPendingFeature(e);this._featureFormHandle=r([o.on("value-change",async({fieldName:t,value:a})=>{if(v?.updateAttributes(o.getValues()),k(a)){const e=this._visualVariableAttributes;e.size&&!e.size.isUpdatingInteractively&&t===e.size.field&&e.size.setInitialValue(a),e.rotation&&!e.rotation.isUpdatingInteractively&&t===e.rotation.field&&e.rotation.setInitialValue(a)}await K(e,s,"2d"===m.type?m.scale:null)}),l.on(["update","undo","redo"],e=>{("undo"===e.type||"redo"===e.type||"update"===e.type&&null!=e.toolEventInfo&&Z(e.toolEventInfo.type))&&o.notifyFeatureGeometryChanged()}),u(()=>o.feature?.sourceLayer,t=>e.sourceLayer=t),u(()=>[o.feature,o.submittable],()=>this._stashValidationState())]),this.createFeatureState="update-pending"}async _startUpdating({feature:e,initialFeature:t=e}){await this._selectFeatureForUpdate({feature:e,initialFeature:t});const{_sketchLayer:a,_sketchViewModel:i,data:r}=this,{creationInfo:s,viewModel:o}=r,{view:n}=o;if(!n||!s)return;const l=e.sourceLayer??s.layer;return V(l)?void 0:(this._visualVariableAttributes=q(e),B({graphic:e,sketchLayer:a,sketchViewModel:i,sourceLayer:l,visualVariables:this._visualVariableAttributes,webStyleCache:this._webStyleCache}))}static _createWorkflowSteps(e,t="awaiting-feature-creation-info"){const{data:a}=e,i=J(["awaiting-feature-creation-info","creating-features","adding-attachment","editing-attachment"],t,{"awaiting-feature-creation-info":()=>({id:"awaiting-feature-creation-info",async setUp(){const{creationInfo:t,viewModel:i}=a,{view:r}=i;r&&(L(t)?e.addHandles(await U({view:r,data:a,next:()=>e.next(),cancel:()=>i.cancelWorkflow({warnIfNoWorkflow:!1})}),this.id):(a.parent&&t&&e.addHandles(i.restrictFeatureTemplatesViewModelToLayer(t.layer),this.id),e.addHandles(i.featureTemplatesViewModel.on("select",({item:t})=>{t&&(a.creationInfo={...a.creationInfo,layer:t.layer,template:t.template},e.next())}),this.id)))},async tearDown(){e.removeHandles(this.id)}}),"creating-features":()=>({id:"creating-features",async setUp(){e._isActive&&await e._setUpCreatingFeaturesStep()},async tearDown(t){const{viewModel:i}=a;t.canceled&&(e.removeHandles([le,oe,ne,de]),i.attachmentsViewModel.fileInfos.removeAll(),e._attachmentFileInfos.clear())}}),"adding-attachment":()=>({id:"adding-attachment",parent:"creating-features",async setUp(){},async tearDown(){const{attachmentsViewModel:t}=a.viewModel,{graphic:i,fileInfos:r}=t;e._attachmentFileInfos.set(i,r.toArray()),t.mode="view"}}),"editing-attachment":()=>({id:"editing-attachment",parent:"creating-features",async setUp(){},async tearDown(){const{attachmentsViewModel:t}=a.viewModel,{graphic:i,fileInfos:r}=t;e._attachmentFileInfos.set(i,r.toArray()),t.mode="view"}})});return Q(a,i)}static _configureSketchViewModel(e){const{data:t,_sketchLayer:a,_sketchViewModel:s,_webStyleCache:o}=e,{creationInfo:n,viewModel:l}=t,{view:d}=l,p=[];if(!d)return i();if("2d"===d.type){n&&p.push(e._fadeExistingFeatures(n.layer));const t=c((e,t)=>Promise.all(e.map(e=>K(e,o,t))));p.push(u(()=>d.scale,e=>t(a.graphics,e)))}const m=F(t.fullTemplate,n?.attributeOverrides),f=u(()=>s.createGraphic,a=>{a&&!e.hasHandles(ne)&&e._updatingHandles.consumePromise(X({creationAttributes:m,data:t,sketchViewModel:s,view:d,webStyleCache:o}).then(t=>e.addHandles(t,ne)))}),w=async t=>{if("cancel"!==t.state&&"complete"!==t.state||e.removeHandles(ne),"cancel"===t.state&&null!==d.activeTool&&d.activeTool!==e.sketchViewModel.activeComponent&&(await e._waitForActiveToolCleared(),await e._startCreating()),"complete"===t.state&&t.graphic){const a=await e._processEdits(t.graphic,{scale:"2d"===d.type?d.scale:null,useSourceLayer:!0,webStyleCache:e._webStyleCache});a&&(await e._waitForActiveToolCleared(),await e._startUpdating({feature:a}))}},g=async i=>{const{attachmentsViewModel:r}=l,{_formViewModel:o}=e;if(i.graphics.length>1)return void await e._clearSelectedFeature();const c=i.graphics[0];if("complete"===i.state){const{submittable:t}=o;if(e.numPendingFeatures!==n?.maxFeatures&&t||o.submit(),await e._clearSelectedFeature(),"add"!==r.mode&&"edit"!==r.mode||await(l.activeWorkflow?.previous()),!i.aborted&&d.activeTool===e.sketchViewModel.activeComponent&&(await e.sketchViewModel.wait(),"ready"===e.sketchViewModel.state&&"mesh"!==e.data.creationInfo?.layer.geometryType))return e._startCreating()}else{if("start"===i.state)return c.sourceLayer??=t.creationInfo?.layer,await te({graphic:c,sketchLayer:a,sketchViewModel:s,visualVariables:e._visualVariableAttributes,webStyleCache:e._webStyleCache,sourceLayer:c.sourceLayer}),e._selectFeatureForUpdate({feature:c});if("active"===i.state){await e.updatePendingFeature(c);const t=e._visualVariableAttributes;ae(d,c,i,t)&&await K(c,e._webStyleCache,"2d"===d.type?d.scale:null);const a=c.attributes,{rotation:r,size:s}=t;if(null!=r){const{field:e}=r;o.setValue(e,a[e])}if(null!=s){const{field:e}=s;o.setValue(e,a[e])}}}},y=async a=>{if(a.graphics.forEach(e=>{t.removePendingFeature(e)}),!L(t.creationInfo))return e._startCreating()},v=async()=>{if(L(t.creationInfo))try{await e.data.viewModel.back()}catch{}return e._startCreating()};p.push(f,s.on("create",t=>e._updatingHandles.addPromise(w(t))),s.on("update",t=>e._updatingHandles.addPromise(g(t))),s.on("delete",t=>e._updatingHandles.addPromise(y(t))),h(()=>!e.numPendingFeatures,()=>e._updatingHandles.addPromise(v())),i(()=>{s.cancel()}),he(s,a,t),...pe(t));const _=r(p);return s.addHandles(_),_}_initializeSketchViewModel(){const{data:e}=this,{view:t}=e.viewModel,a=new I({elevationInfo:e.creationInfo?.layer.elevationInfo,internal:!0,listMode:"hide",title:"createFeaturesWorkflow-internal"}),r=new re({layer:a,creationMode:"single",sketchOptions:e.sketchOptions,snappingManager:e.snappingManager,useLegacyCreateTools:e.viewModel.useLegacyCreateTools,updateOnGraphicClick:!1,defaultUpdateOptions:{multipleSelectionEnabled:!1},view:t});this._sketchLayer=a,this._sketchViewModel=r,t?.map.add(a),this.addHandles([i(()=>{t?.destroyed||t?.map.remove(a),a.destroy()}),u(()=>this.numPendingFeatures>0,e=>this._sketchViewModel.updateOnGraphicClick=e,p)])}_hasValidationErrors(e){return!!e&&(!this.data.isSubmittable(e)||!!this._formViewModel.validateContingencyConstraints(e.attributes,{includeIncompleteViolations:!0})?.length)}async _processEdits(e,t){const{data:a,_formViewModel:i,_sketchLayer:r}=this,{layerInfos:s,view:o}=a.viewModel;i.editType="INSERT",i.map=o?.map,i.spatialReference=o?.spatialReference;const{templateExecutorInfo:n}=a;if(!n){const t=e.clone();return t.geometry=null,await this._addAndInitializeEdits(e,t),e}r.remove(e);const{executor:l}=n,c=l(e.geometry,"completion"),u=d(c)?await c:c;n.completionResults.push(u),Y(u.relationships),i.editType="INSERT",i.map=o?.map,i.spatialReference=o?.spatialReference,u.primary&&a.creationInfo?.attributeOverrides&&(u.primary.graphic.attributes={...u.primary.graphic.attributes,...a.creationInfo.attributeOverrides});for(const d of u.edits){let e=null;if(d.addFeatures)for(const a of d.addFeatures){const i=a.clone();i.geometry=null,null!=a.geometry&&(a.symbol=await S(a,t),r.add(a)),a.sourceLayer!==e?.layer&&(e=N(s,a.sourceLayer));const o=!!u.associationGraphics?.has(a);await this._addAndInitializeEdits(a,i,e,o)}}i.feature=null,await m(()=>!i.updating);return u.edits.reduce((e,t)=>e+(t.addFeatures?.length??0),0)>1?null:u.primary?.graphic}async _addAndInitializeEdits(e,t,a,i=!1){const{data:r,_formViewModel:s}=this,{layerInfos:o}=r.viewModel,n=r.addPendingFeature(e,t,{isAssociation:i});a??=N(o,e.sourceLayer),s.feature=e,s.formTemplate=a?.formTemplate,await m(()=>!s.updating),n.updateAttributes(s.getValues()),n.submittable=s.submittable}async _setUpCreatingFeaturesStep(){if(this.hasHandles(le))return;const{data:e,sketchViewModel:s}=this,{creationInfo:o,viewModel:l}=e,{attachmentsViewModel:d,view:c}=l;if(!c||!o?.layer)throw new a("missing-parameters","CreateFeaturesWorkflow requires a view and creationInfo.");const{initialFeature:h,layer:m}=o,f=[],w=[];this._featureFormHandle=n(this._featureFormHandle),this._visualVariableAttributes={rotation:null,size:null},e.editorItem=O(l.editorItems,o.layer),o.template&&(null==e.fullTemplate&&await this._initializeFullTemplateAndExecutorInfo(e),w.push(i(()=>{e.templateExecutorInfo&&(e.templateExecutorInfo.completionResults=[])}))),s.allowDeleteKey=!e.isSharedTemplateWorkflow,$(d),f.push(u(()=>d.mode,e=>{switch(e){case"add":this.go("adding-attachment");break;case"edit":this.go("editing-attachment")}}));const g=ee(c);f.push(g);const y=V(o.layer),{template:_}=o,M=!_||b(_)||v(_)&&"feature"===_.type,I=y&&M;try{if(I){const a=h??new t({attributes:F(e.fullTemplate,o.attributeOverrides),sourceLayer:m}),i=await this._processEdits(a);i&&await this._startUpdating({feature:i})}else f.push(se._configureSketchViewModel(this)),h?(L(o)&&o.geometryToPlace&&(h.attributes=F(e.fullTemplate,o.attributeOverrides)),s.addGraphic(h),await this._startUpdating({feature:h})):await this._startCreating()}finally{g.remove()}const k=i(()=>{for(const t of e.pendingFeatures)s.removeGraphic(t),e.removePendingFeature(t)}),S=u(()=>c?.timeZone,e=>{this._formViewModel.timeZone=e,this.data.timeZone=e},p),A=i(()=>{L(o)&&l.cancelWorkflow({warnIfNoWorkflow:!1})});this._featureFormHandle&&f.push(this._featureFormHandle),this.addHandles(f,this._handleKeys.beforeCommit),this.addHandles(w,this._handleKeys.afterCommit),this.addHandles([i(()=>d.fileInfos.removeAll()),r(f),r(w),A,k,S],le)}async _waitForActiveToolCleared(){const e=this.data.viewModel.view;if(null==e?.activeTool)return;const t=new AbortController;this.addHandles(s(t),de),await m(()=>null==e?.activeTool,t.signal),t.abort()}};function he(e,t,a){let s=null;const o=()=>e.snappingOptions.featureSources,n=()=>(s=new P({layer:t}),o().add(s),s),d=()=>{null!=s&&(o().remove(s),s=l(s))};return r([u(()=>{const e=a.creationInfo?.layer,t=o().find(t=>t.layer===e);return{hasFeatureLayerSource:!!t,enabled:t?.enabled??!1}},({hasFeatureLayerSource:e,enabled:t})=>{if(!e)return d();s??=n(),s.enabled=t},f),i(d)])}function pe(e){const t=e.viewModel.view;if(!t)return[];const a=[];if("3d"===t.type){const r=new T({view:t});a.push(u(()=>e.selectedPendingFeature,(e,t)=>{r.remove(e),r.add(t)}),i(()=>r.destroy()))}const r=new T({view:t,highlightName:E});return a.push(u(()=>e.temporaryHighlightFeature,e=>{r.removeAll(),r.add(e)}),i(()=>r.destroy())),a}function me(e,t,a,i){const r=[];return t.forEach((t,s)=>{if(!t.error){const o=e[s],n=i.get(o)||[];o.attributes[a.objectIdField]=t.objectId,n.forEach(({form:e})=>r.push({feature:o,attachment:e}))}}),r}function fe(e){for(const t of e){const{sourceLayer:e}=t;e&&"globalIdField"in e&&null!=e.globalIdField&&(t.attributes[e.globalIdField]??=w())}}function we(e,t){const a=[];if(!t||0===t.size)return{addFeatures:e};for(const[i,r]of t)for(const{file:e}of r)a.push({feature:i,attachment:{globalId:w(),data:e}});return a.length?{addFeatures:e,addAttachments:a}:{addFeatures:e}}function ge(e,t){return e.map(e=>{const{addFeatures:a}=e;if(!a||0===a.length)return e;const i=[];for(const r of a){const e=t.get(r);if(e)for(const{file:t}of e)i.push({feature:r,attachment:{globalId:w(),data:t}})}return i.length?{...e,addAttachments:i}:e})}e([g()],ue.prototype,"allowSave",null),e([g()],ue.prototype,"createFeatureState",void 0),e([g()],ue.prototype,"data",void 0),e([g({constructOnly:!0})],ue.prototype,"isNested",void 0),e([g()],ue.prototype,"formViewModel",null),e([g()],ue.prototype,"hasInvalidFormTemplate",null),e([g()],ue.prototype,"hasPendingEdits",null),e([g()],ue.prototype,"hasPreviousStep",null),e([g()],ue.prototype,"_getDrawMeshHelpMessage",void 0),e([g()],ue.prototype,"helpMessage",null),e([g()],ue.prototype,"layer",null),e([g()],ue.prototype,"parent",null),e([g()],ue.prototype,"keyboardCancellationEnabled",null),e([g()],ue.prototype,"reliesOnOwnerAdminPrivileges",null),e([g()],ue.prototype,"saveActionLabel",null),e([g()],ue.prototype,"shouldShowAttachments",null),e([g()],ue.prototype,"shouldAllowAttachmentEditing",null),e([g()],ue.prototype,"sketchViewModel",null),e([g()],ue.prototype,"availableCreateTools",null),e([g()],ue.prototype,"_attachmentsActive",null),ue=se=e([y("esri.widgets.Editor.CreateFeaturesWorkflow")],ue);const ye=ue;export{ye as default};
|
|
@@ -56,6 +56,25 @@ export interface EditorViewModelProperties extends Partial<Pick<EditorViewModel,
|
|
|
56
56
|
* @since 4.24
|
|
57
57
|
*/
|
|
58
58
|
tooltipOptions?: SketchTooltipOptionsProperties;
|
|
59
|
+
/**
|
|
60
|
+
* Starting at version 5.0, Editor is transitioning to a next generation geometry
|
|
61
|
+
* creation experience. This new experience provides advanced curve creation tools
|
|
62
|
+
* and allows multiple tools to be used in combination to define a single geometry.
|
|
63
|
+
*
|
|
64
|
+
* As of 5.0, this experience is only available in 2D (e.g., [MapView](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/), [`arcgis-map`](https://developers.arcgis.com/javascript/latest/references/map-components/arcgis-map)).
|
|
65
|
+
*
|
|
66
|
+
* This property is available to allow 2D applications to temporarily
|
|
67
|
+
* opt out of this experience.
|
|
68
|
+
*
|
|
69
|
+
* > [!CAUTION]
|
|
70
|
+
* >
|
|
71
|
+
* > This option will be removed in an upcoming release.
|
|
72
|
+
*
|
|
73
|
+
* @deprecated
|
|
74
|
+
* @default true
|
|
75
|
+
* @since 5.0
|
|
76
|
+
*/
|
|
77
|
+
useLegacyCreateTools?: boolean;
|
|
59
78
|
/**
|
|
60
79
|
* Options to configure how values are displayed and input when creating or updating graphics.
|
|
61
80
|
*
|
|
@@ -188,6 +207,16 @@ export default class EditorViewModel extends EventedAccessor {
|
|
|
188
207
|
* @since 4.33
|
|
189
208
|
*/
|
|
190
209
|
get formViewModel(): BatchAttributeFormViewModel | FeatureFormViewModel | null | undefined;
|
|
210
|
+
/**
|
|
211
|
+
* Use this property to determine if the next generation geometry creation
|
|
212
|
+
* has been disabled. This can happen when
|
|
213
|
+
* [useLegacyCreateTools](https://developers.arcgis.com/javascript/latest/references/core/widgets/Editor/EditorViewModel/#useLegacyCreateTools) is true,
|
|
214
|
+
* or Editor is used with a non-2D (`arcgis-map`) view.
|
|
215
|
+
*
|
|
216
|
+
* @deprecated
|
|
217
|
+
* @since 5.0
|
|
218
|
+
*/
|
|
219
|
+
get isUsingLegacyCreateTools(): boolean;
|
|
191
220
|
/**
|
|
192
221
|
* Options to configure the labels shown next to each segment of the geometry being created or updated.
|
|
193
222
|
*
|
|
@@ -277,6 +306,25 @@ export default class EditorViewModel extends EventedAccessor {
|
|
|
277
306
|
*/
|
|
278
307
|
get tooltipOptions(): SketchTooltipOptions;
|
|
279
308
|
set tooltipOptions(value: SketchTooltipOptionsProperties);
|
|
309
|
+
/**
|
|
310
|
+
* Starting at version 5.0, Editor is transitioning to a next generation geometry
|
|
311
|
+
* creation experience. This new experience provides advanced curve creation tools
|
|
312
|
+
* and allows multiple tools to be used in combination to define a single geometry.
|
|
313
|
+
*
|
|
314
|
+
* As of 5.0, this experience is only available in 2D (e.g., [MapView](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/), [`arcgis-map`](https://developers.arcgis.com/javascript/latest/references/map-components/arcgis-map)).
|
|
315
|
+
*
|
|
316
|
+
* This property is available to allow 2D applications to temporarily
|
|
317
|
+
* opt out of this experience.
|
|
318
|
+
*
|
|
319
|
+
* > [!CAUTION]
|
|
320
|
+
* >
|
|
321
|
+
* > This option will be removed in an upcoming release.
|
|
322
|
+
*
|
|
323
|
+
* @deprecated
|
|
324
|
+
* @default true
|
|
325
|
+
* @since 5.0
|
|
326
|
+
*/
|
|
327
|
+
get useLegacyCreateTools(): boolean;
|
|
280
328
|
/**
|
|
281
329
|
* Options to configure how values are displayed and input when creating or updating graphics.
|
|
282
330
|
*
|