@arcgis/core 4.28.0-next.20230921 → 4.28.0-next.20230923
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/Graphic.js +1 -1
- package/PopupTemplate.js +1 -1
- package/TimeExtent.js +1 -1
- package/arcade/ArcadeDate.js +1 -1
- package/arcade/Feature.js +1 -1
- package/arcade/featureSetUtils.js +1 -1
- package/arcade/featureset/actions/Adapted.js +1 -1
- package/arcade/featureset/actions/GroupBy.js +1 -1
- package/arcade/featureset/support/FeatureSet.js +1 -1
- package/arcade/featureset/support/FeatureSetIterator.js +1 -1
- package/arcade/featureset/support/StatsField.js +1 -1
- package/arcade/featureset/support/sqlUtils.js +1 -1
- package/arcade/functions/convertdirection.js +1 -1
- package/arcade/functions/date.js +1 -1
- package/arcade/functions/featuresetbase.js +1 -1
- package/arcade/functions/featuresetstats.js +1 -1
- package/arcade/treeAnalysis.js +1 -1
- package/arcade.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/02156fd04279f4d0fd3f.js +1 -0
- package/assets/esri/core/workers/chunks/07f6175b52366b2c28bd.js +1 -0
- package/assets/esri/core/workers/chunks/098073c3b2849f56dad8.js +1 -0
- package/assets/esri/core/workers/chunks/1186ba1947bd0c32f148.js +1 -0
- package/assets/esri/core/workers/chunks/186445b9fbedd261f684.js +1 -0
- package/assets/esri/core/workers/chunks/{580039dd491854ca325c.js → 21fc02f0d5716c4a7acd.js} +1 -1
- package/assets/esri/core/workers/chunks/{dff1c3c38dda2bd1a9d6.js → 246a954347fe9318190e.js} +1 -1
- package/assets/esri/core/workers/chunks/{c9dfb145f0c1d93e0fbd.js → 250bb6ae6f1992b5b4f9.js} +1 -1
- package/assets/esri/core/workers/chunks/{314c307e30f308a40a28.js → 25b09e9c0511c8e1cf8a.js} +1 -1
- package/assets/esri/core/workers/chunks/2a0b3b52ecd787a613bc.js +1 -0
- package/assets/esri/core/workers/chunks/2bc9b55e655968229ef4.js +1 -0
- package/assets/esri/core/workers/chunks/2f0924e7aa89e689da4a.js +1 -0
- package/assets/esri/core/workers/chunks/3f218d65ec451b2a1027.js +1 -0
- package/assets/esri/core/workers/chunks/425b5733bb88e6efe242.js +1 -0
- package/assets/esri/core/workers/chunks/45d6b942cdccca2ce44a.js +1 -0
- package/assets/esri/core/workers/chunks/4bf1a7e82a68ccee0ee1.js +1 -0
- package/assets/esri/core/workers/chunks/4c110c7f4f940ec58010.js +1 -0
- package/assets/esri/core/workers/chunks/{bde89b2684b6185992ef.js → 4ed77097e69fa3096ce4.js} +1 -1
- package/assets/esri/core/workers/chunks/4fe5bac782a742d5b1c0.js +1 -0
- package/assets/esri/core/workers/chunks/{1cbaba30f55f00f7498b.js → 51324d042f469f3b8914.js} +1 -1
- package/assets/esri/core/workers/chunks/{3f4e9b1663ec521bfe00.js → 542ce10e1872399790b4.js} +1 -1
- package/assets/esri/core/workers/chunks/54d2b7e2ac4ba883bee8.js +1 -0
- package/assets/esri/core/workers/chunks/54ecb6cae310818d1aa2.js +1 -0
- package/assets/esri/core/workers/chunks/57c932e289d89d97da4b.js +1 -0
- package/assets/esri/core/workers/chunks/{6403de6fc067cf8f7436.js → 592c1fb531f2be928e8a.js} +1 -1
- package/assets/esri/core/workers/chunks/59a807220d6f0dd18776.js +1 -0
- package/assets/esri/core/workers/chunks/59dff10d7ad2b1bf469e.js +1 -0
- package/assets/esri/core/workers/chunks/609a475ab395f2ce63e2.js +1 -0
- package/assets/esri/core/workers/chunks/612c485c5aad1548d708.js +1 -0
- package/assets/esri/core/workers/chunks/{2bb69d76a13564e8e455.js → 645ba2d5c10184632d23.js} +1 -1
- package/assets/esri/core/workers/chunks/{332689bf60d246485993.js → 65186e168dd112ac6221.js} +1 -1
- package/assets/esri/core/workers/chunks/6b9248fb2d6aadbce7bb.js +1 -0
- package/assets/esri/core/workers/chunks/709465832d306e02df52.js +1 -0
- package/assets/esri/core/workers/chunks/72c5bd6f7b8541b8d69e.js +1 -0
- package/assets/esri/core/workers/chunks/{bbc0dcd316c5598bc9ad.js → 74368a5213def6c200a2.js} +1 -1
- package/assets/esri/core/workers/chunks/{94188fe381239d48a975.js → 76483c9a8848f3106126.js} +1 -1
- package/assets/esri/core/workers/chunks/7aa58c96798447ce5907.js +1 -0
- package/assets/esri/core/workers/chunks/7d078b8b9997b5300c0a.js +1 -0
- package/assets/esri/core/workers/chunks/7fe641cf1467496e670a.js +1 -0
- package/assets/esri/core/workers/chunks/{df8f62beb36fb9d2ac81.js → 810c8d6ff19976fd1366.js} +1 -1
- package/assets/esri/core/workers/chunks/8458ed96f3e72814cef2.js +1 -0
- package/assets/esri/core/workers/chunks/{243a4eed107d363dfad8.js → 887652bbdb3b71d0a089.js} +1 -1
- package/assets/esri/core/workers/chunks/896bfda379cf620b63ec.js +1 -0
- package/assets/esri/core/workers/chunks/91c9f0d59eaed7a735ce.js +1 -0
- package/assets/esri/core/workers/chunks/{1f7e041140088f8ac489.js → 97073a60f0ea2a397165.js} +1 -1
- package/assets/esri/core/workers/chunks/97658ac749664a07c92d.js +1 -0
- package/assets/esri/core/workers/chunks/{1da74a306aa5b4eacaae.js → 9866bbaeaf885c2dcca9.js} +1 -1
- package/assets/esri/core/workers/chunks/a39ae87298ac674f129d.js +1 -0
- package/assets/esri/core/workers/chunks/a7b3048c19348540e004.js +1 -0
- package/assets/esri/core/workers/chunks/a8ca4b116909e47722f9.js +1 -0
- package/assets/esri/core/workers/chunks/{101f776316a85b708927.js → a99070ec4c06c435b744.js} +1 -1
- package/assets/esri/core/workers/chunks/ab145d13932d87dd7bf9.js +1 -0
- package/assets/esri/core/workers/chunks/{77c15b1c2729c780f75a.js → aeeeb386134b341d7ad2.js} +1 -1
- package/assets/esri/core/workers/chunks/{3ca759f72d3bb29e9ea9.js → af54b233f6d6ad70b4a3.js} +2 -2
- package/assets/esri/core/workers/chunks/b9146daae8457224fd08.js +1 -0
- package/assets/esri/core/workers/chunks/bcdd2e8841abcb4df6da.js +1 -0
- package/assets/esri/core/workers/chunks/be05cc0cdabd5e051045.js +1 -0
- package/assets/esri/core/workers/chunks/c5f5f37bef11c6fbdc40.js +1 -0
- package/assets/esri/core/workers/chunks/d414dba3179bcf75bc6b.js +1 -0
- package/assets/esri/core/workers/chunks/{b449d6bd5851187d419f.js → d6e5408f9fa6b4bcd118.js} +1 -1
- package/assets/esri/core/workers/chunks/d9fb500cbd0f04d219a3.js +1 -0
- package/assets/esri/core/workers/chunks/e0dd6789fb797e9b7206.js +1 -0
- package/assets/esri/core/workers/chunks/{6f271249e042086d5a16.js → e4e49deae8da74f629db.js} +1 -1
- package/assets/esri/core/workers/chunks/e5dcff7a4fa84ba09670.js +1 -0
- package/assets/esri/core/workers/chunks/{f508ccfde6425dabe9ac.js → ee0bf611d191103a7046.js} +1 -1
- package/assets/esri/core/workers/chunks/{ed1fbc1bc8d50453e2f5.js → f793cd41fcd022baeea2.js} +1 -1
- package/assets/esri/core/workers/chunks/fad6a7bb82a0a2df726f.js +1 -0
- package/assets/esri/themes/base/widgets/_FeatureForm.scss +2 -84
- package/assets/esri/themes/base/widgets/_OrientedImageryViewer.scss +2 -0
- 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/chunks/arcade.js +1 -1
- package/config.js +1 -1
- package/core/Accessor.js +1 -1
- package/core/accessorSupport/diffUtils.js +1 -1
- package/core/has.js +1 -1
- package/core/number.js +1 -1
- package/core/reactiveUtils.js +1 -1
- package/core/sql/DateOnly.js +1 -1
- package/core/sql/WhereClause.js +1 -1
- package/core/sql.js +1 -1
- package/core/timeUtils.js +1 -1
- package/identity/IdentityForm.js +1 -1
- package/identity/IdentityModal.js +1 -1
- package/interfaces.d.ts +48 -203
- package/layers/LinkChartLayer.js +1 -1
- package/layers/OrientedImageryLayer.js +1 -1
- package/layers/SceneLayer.js +1 -1
- package/layers/graphics/applyEditsUtils.js +5 -0
- package/layers/graphics/editingSupport.js +1 -1
- package/layers/graphics/sources/FeatureLayerSource.js +1 -1
- package/layers/knowledgeGraph/KnowledgeGraphLayerDataManager.js +1 -1
- package/layers/mixins/ArcGISImageService.js +1 -1
- package/layers/mixins/EditBusLayer.js +1 -1
- package/layers/orientedImagery/core/CameraOrientationLTP.js +1 -1
- package/layers/orientedImagery/core/ElevationSourceDefinitions.js +5 -0
- package/layers/orientedImagery/core/ExposurePoint.js +1 -1
- package/layers/orientedImagery/core/cameraOrientationFactory.js +1 -1
- package/layers/orientedImagery/core/utils.js +5 -0
- package/layers/orientedImagery/transformations/groundToImageUtils.js +1 -1
- package/layers/support/fieldProperties.js +1 -1
- package/layers/support/fieldUtils.js +1 -1
- package/layers/support/imageryRendererUtils.js +1 -1
- package/layers/support/kmlUtils.js +1 -1
- package/layers/support/rasterFunctions/BaseRasterFunction.js +1 -1
- package/layers/support/rasterFunctions/creators/createDataManagementFunctions.js +1 -1
- package/networks/Network.js +1 -1
- package/package.json +1 -1
- package/request.js +1 -1
- package/rest/featureService/FeatureService.js +1 -1
- package/rest/support/DirectionsFeatureSet.js +1 -1
- package/smartMapping/renderers/pieChart.js +1 -1
- package/smartMapping/renderers/relationship.js +1 -1
- package/smartMapping/renderers/support/utils.js +1 -1
- package/smartMapping/statistics/support/ageUtils.js +1 -1
- package/smartMapping/support/adapters/support/utils.js +1 -1
- package/smartMapping/support/utils.js +1 -1
- package/support/apiKeyUtils.js +1 -1
- package/support/arcadeUtils.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/cim/cimAnalyzer.js +1 -1
- package/symbols/support/svgUtils.js +1 -1
- package/time/TimeReference.js +1 -1
- package/time/timeReferenceUtils.js +1 -1
- package/versionManagement/VersionManagementService.js +1 -1
- package/versionManagement/support/EditMomentStack.js +5 -0
- package/versionManagement/support/versionManagementUtils.js +1 -1
- package/views/2d/engine/Container.js +1 -1
- package/views/2d/engine/DisplayObject.js +1 -1
- package/views/2d/engine/ManagedCanvas.js +5 -0
- package/views/2d/engine/Stage.js +1 -1
- package/views/2d/engine/webgl/GroupContainer.js +1 -1
- package/views/2d/engine/webgl/Painter.js +1 -1
- package/views/2d/engine/webgl/WGLContainer.js +1 -1
- package/views/2d/engine/webgl/WorldExtentClipRenderer.js +1 -1
- package/views/2d/engine/webgl/effects/FeatureEffect.js +1 -1
- package/views/2d/engine/webgl/effects/HighlightEffect.js +1 -1
- package/views/2d/engine/webgl/effects/HittestEffectVTL.js +1 -1
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/interactive/editingTools/TransformTool.js +1 -1
- package/views/2d/layers/GeoRSSLayerView2D.js +1 -1
- package/views/2d/layers/MediaLayerView2D.js +1 -1
- package/views/2d/layers/TileLayerView2D.js +1 -1
- package/views/2d/layers/WMTSLayerView2D.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReader.js +1 -1
- package/views/2d/layers/features/tileRenderers/support/WGLFeatureView.js +1 -1
- package/views/2d/layers/graphics/BaseGraphicContainer.js +1 -1
- package/views/2d/layers/graphics/GraphicContainer.js +1 -1
- package/views/2d/layers/graphics/GraphicsView2D.js +1 -1
- package/views/2d/layers/graphics/HighlightGraphicContainer.js +1 -1
- package/views/2d/layers/imagery/VectorFieldView2D.js +1 -1
- package/views/2d/layers/support/DisplayGL.js +1 -1
- package/views/2d/webglDeps.js +1 -1
- package/views/3d/glTF/loader.js +1 -1
- package/views/3d/interactive/editingTools/manipulations/MoveManipulation.js +1 -1
- package/views/3d/interactive/editingTools/transformGraphic/isSupportedGraphic.js +1 -1
- package/views/3d/interactive/visualElements/ExtendedLineVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/ParallelLineVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/PointVisualElement.js +1 -1
- package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
- package/views/3d/layers/SceneLayerView3D.js +1 -1
- package/views/3d/layers/graphics/ElevationAligners.js +1 -1
- package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
- package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DPathSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Labeler.js +1 -1
- package/views/3d/layers/graphics/graphicUtils.js +1 -1
- package/views/3d/layers/i3s/featureEditing.js +1 -1
- package/views/3d/layers/support/StageLayerElevationProvider.js +1 -1
- package/views/3d/state/ViewStateManager.js +1 -1
- package/views/3d/support/buffer/glUtil.js +1 -1
- package/views/3d/support/engineContent/line.js +1 -1
- package/views/3d/support/viewpointUtils.js +1 -1
- package/views/3d/webgl-engine/Stage.js +1 -1
- package/views/3d/webgl-engine/effects/RenderPluginInput.js +1 -1
- package/views/3d/webgl-engine/effects/blit/Blit.js +5 -0
- package/views/3d/webgl-engine/effects/highlight/Highlight.js +1 -1
- package/views/3d/webgl-engine/effects/highlight/ShadowHighlight.js +1 -1
- package/views/3d/webgl-engine/effects/smaa/SMAA.js +1 -1
- package/views/3d/webgl-engine/effects/ssao/SSAO.js +1 -1
- package/views/3d/webgl-engine/lib/Geometry.js +1 -1
- package/views/3d/webgl-engine/lib/ModelDirtySet.js +1 -1
- package/views/3d/webgl-engine/lib/Object3D.js +1 -1
- package/views/3d/webgl-engine/lib/RenderSlot.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/TextRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/TextTextureAtlas.js +1 -1
- package/views/3d/webgl-engine/lib/TextTextureFactory.js +1 -1
- package/views/3d/webgl-engine/lib/VertexAttribute.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/bufferLayouts.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/edgeProcessing.js +1 -1
- package/views/View.js +1 -1
- package/views/interactive/tooltip/TooltipContentWithHelpMessage.js +1 -1
- package/views/interactive/tooltip/TooltipEditableField.js +1 -1
- package/views/interactive/tooltip/constraintUtils.js +1 -1
- package/views/interactive/tooltip/content/Fields.js +1 -1
- package/views/interactive/tooltip/content/TooltipContentDrawCircle.js +1 -1
- package/views/interactive/tooltip/content/TooltipContentDrawMesh.js +1 -1
- package/views/interactive/tooltip/content/TooltipContentDrawPoint.js +1 -1
- package/views/interactive/tooltip/content/TooltipContentDrawPolygon.js +1 -1
- package/views/interactive/tooltip/content/TooltipContentDrawPolyline.js +1 -1
- package/views/interactive/tooltip/content/TooltipContentDrawRectangle.js +1 -1
- package/views/interactive/tooltip/content/TooltipContentExtentRotate.js +1 -1
- package/views/interactive/tooltip/content/TooltipContentExtentScale.js +1 -1
- package/views/interactive/tooltip/content/TooltipContentReshapeEdgeOffset.js +1 -1
- package/views/interactive/tooltip/content/TooltipContentTransformAbsolute.js +1 -1
- package/views/interactive/tooltip/content/TooltipContentTransformRotate.js +1 -1
- package/views/interactive/tooltip/content/TooltipContentTransformScale.js +1 -1
- package/views/interactive/tooltip/content/TooltipContentTranslateGraphic.js +1 -1
- package/views/interactive/tooltip/content/TooltipContentTranslateGraphicXY.js +1 -1
- package/views/interactive/tooltip/content/TooltipContentTranslateGraphicZ.js +1 -1
- package/views/interactive/tooltip/content/TooltipContentTranslateVertex.js +1 -1
- package/views/interactive/tooltip/content/TooltipContentTranslateVertexXY.js +1 -1
- package/views/interactive/tooltip/content/TooltipContentTranslateVertexZ.js +1 -1
- package/views/support/angularMeasurementUtils.js +1 -1
- package/views/ui/UI.js +1 -1
- package/views/webgl/ShaderTranspiler.js +1 -1
- package/views/webgl/Texture.js +1 -1
- package/views/webgl/contextUtils.js +1 -1
- package/webmap/InitialViewProperties.js +1 -1
- package/widgets/AreaMeasurement2D.js +1 -1
- package/widgets/AreaMeasurement3D.js +1 -1
- package/widgets/Attachments/AttachmentsViewModel.js +1 -1
- package/widgets/Attachments.js +1 -1
- package/widgets/Attribution.js +1 -1
- package/widgets/BasemapGallery.js +1 -1
- package/widgets/BasemapLayerList.js +1 -1
- package/widgets/BasemapToggle.js +1 -1
- package/widgets/Bookmarks.js +1 -1
- package/widgets/BuildingExplorer/BuildingDisciplinesTree/BuildingDisciplinesNode.js +1 -1
- package/widgets/BuildingExplorer/BuildingDisciplinesTree/BuildingDisciplinesTree.js +1 -1
- package/widgets/BuildingExplorer/BuildingLevelPicker/BuildingLevelPicker.js +1 -1
- package/widgets/BuildingExplorer/BuildingLevelPicker/Label.js +1 -1
- package/widgets/BuildingExplorer/BuildingLevelPicker/LevelItem.js +1 -1
- package/widgets/BuildingExplorer/BuildingPhasePicker/BuildingPhasePicker.js +1 -1
- package/widgets/BuildingExplorer.js +1 -1
- package/widgets/Compass.js +1 -1
- package/widgets/CoordinateConversion.js +1 -1
- package/widgets/Daylight/support/SliderWithDropdown.js +1 -1
- package/widgets/Daylight.js +1 -1
- package/widgets/DirectLineMeasurement3D.js +1 -1
- package/widgets/DirectionalPad.js +1 -1
- package/widgets/Directions/components/SaveLayer.js +1 -1
- package/widgets/Directions.js +1 -1
- package/widgets/DistanceMeasurement2D.js +1 -1
- package/widgets/Editor/components/FooterActions.js +1 -1
- package/widgets/Editor/components/Notices.js +1 -1
- package/widgets/Editor/components/PanelContent.js +1 -1
- package/widgets/Editor/components/PanelToolbar.js +1 -1
- package/widgets/Editor/components/Prompt.js +1 -1
- package/widgets/Editor/components/Settings.js +1 -1
- package/widgets/Editor/components/UpdateFeaturePanelContent.js +1 -1
- package/widgets/Editor/components/UploadDetails.js +1 -1
- package/widgets/Editor.js +1 -1
- package/widgets/ElevationProfile/components/LegendItem.js +1 -1
- package/widgets/ElevationProfile/components/SettingsButton.js +1 -1
- package/widgets/ElevationProfile/components/Statistics.js +1 -1
- package/widgets/ElevationProfile.js +1 -1
- package/widgets/Expand.js +1 -1
- package/widgets/Feature/FeatureContent.js +1 -1
- package/widgets/Feature/FeatureExpression.js +1 -1
- package/widgets/Feature/FeatureFields.js +1 -1
- package/widgets/Feature/FeatureMedia.js +1 -1
- package/widgets/Feature/FeatureRelationship.js +1 -1
- package/widgets/Feature/FeatureViewModel.js +1 -1
- package/widgets/Feature/support/FeatureContentMixin.js +1 -1
- package/widgets/Feature/support/FeatureElementInfo.js +1 -1
- package/widgets/Feature.js +1 -1
- package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
- package/widgets/FeatureForm/GroupInput.js +1 -1
- package/widgets/FeatureForm/css.js +1 -1
- package/widgets/FeatureForm.js +1 -1
- package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
- package/widgets/FeatureTable/Grid/Grid.js +1 -1
- package/widgets/FeatureTable/Grid/support/ButtonMenu.js +1 -1
- package/widgets/FeatureTable.js +1 -1
- package/widgets/FeatureTemplates/ItemList.js +1 -1
- package/widgets/FeatureTemplates.js +1 -1
- package/widgets/Features/FeaturesRelatedRecords.js +1 -1
- package/widgets/Features.js +1 -1
- package/widgets/FloorFilter/FloorFilterViewModel.js +1 -1
- package/widgets/FloorFilter.js +1 -1
- package/widgets/Fullscreen.js +1 -1
- package/widgets/Histogram.js +1 -1
- package/widgets/HistogramRangeSlider.js +1 -1
- package/widgets/Home.js +1 -1
- package/widgets/LayerList/ListItemPanel.js +1 -1
- package/widgets/LayerList.js +1 -1
- package/widgets/Legend/LegendViewModel.js +1 -1
- package/widgets/Legend/styles/Card.js +1 -1
- package/widgets/Legend/styles/Classic.js +1 -1
- package/widgets/Legend/styles/support/relationshipUtils.js +1 -1
- package/widgets/Legend/styles/support/univariateUtils.js +1 -1
- package/widgets/LineOfSight.js +1 -1
- package/widgets/Locate.js +1 -1
- package/widgets/NavigationToggle.js +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer.js +1 -1
- package/widgets/Popup.js +1 -1
- package/widgets/Print.js +1 -1
- package/widgets/ScaleRangeSlider/scalePreviewUtils.js +1 -1
- package/widgets/ScaleRangeSlider.js +1 -1
- package/widgets/Search/SearchResultRenderer.js +1 -1
- package/widgets/Search.js +1 -1
- package/widgets/ShadowCast/components/DiscreteConfigurator.js +1 -1
- package/widgets/ShadowCast/components/DurationConfigurator.js +1 -1
- package/widgets/ShadowCast/components/ShadowTooltipContent.js +1 -1
- package/widgets/ShadowCast/components/ThresholdConfigurator.js +1 -1
- package/widgets/ShadowCast.js +1 -1
- package/widgets/Sketch.js +1 -1
- package/widgets/Slice.js +1 -1
- package/widgets/Slider.js +1 -1
- package/widgets/Swipe.js +1 -1
- package/widgets/TableList.js +1 -1
- package/widgets/TimeSlider.js +1 -1
- package/widgets/Track.js +1 -1
- package/widgets/UtilityNetworkAssociations/UtilityNetworkAssociationsLineSymbolPicker.js +1 -1
- package/widgets/UtilityNetworkAssociations.js +1 -1
- package/widgets/UtilityNetworkTrace.js +1 -1
- package/widgets/UtilityNetworkValidateTopology.js +1 -1
- package/widgets/ValuePicker.js +1 -1
- package/widgets/VideoPlayer/components/PlayerControlsGroup.js +1 -1
- package/widgets/VideoPlayer/components/SettingsButton.js +1 -1
- package/widgets/VideoPlayer.js +1 -1
- package/widgets/Weather/LabeledSlider.js +1 -1
- package/widgets/Weather.js +1 -1
- package/widgets/Zoom/IconButton.js +1 -1
- package/widgets/smartMapping/BinaryColorSizeSlider.js +1 -1
- package/widgets/smartMapping/ClassedColorSlider.js +1 -1
- package/widgets/smartMapping/ClassedSizeSlider.js +1 -1
- package/widgets/smartMapping/ColorSizeSlider.js +1 -1
- package/widgets/smartMapping/ColorSlider.js +1 -1
- package/widgets/smartMapping/HeatmapSlider.js +1 -1
- package/widgets/smartMapping/OpacitySlider.js +1 -1
- package/widgets/smartMapping/SizeSlider.js +1 -1
- package/widgets/smartMapping/SmartMappingSliderBase.js +1 -1
- package/widgets/support/ColorPicker.js +1 -1
- package/widgets/support/DatePicker.js +1 -1
- package/widgets/support/Heading.js +1 -1
- package/widgets/support/LabeledSwitch.js +1 -1
- package/widgets/support/MeasurementWidgetContent.js +1 -1
- package/widgets/support/Popover.js +1 -1
- package/widgets/support/SelectionToolbar.js +1 -1
- package/widgets/support/SketchTooltipControls.js +1 -1
- package/widgets/support/SnappingControls.js +1 -1
- package/widgets/support/TimePicker.js +1 -1
- package/widgets/support/TimezonePicker.js +1 -1
- package/widgets/support/UnitSelect.js +1 -1
- package/widgets/support/dateUtils.js +1 -1
- package/assets/esri/core/workers/chunks/072b4e041b8630c513a0.js +0 -1
- package/assets/esri/core/workers/chunks/092920c25cac89c038ee.js +0 -1
- package/assets/esri/core/workers/chunks/114269dda1d296893908.js +0 -1
- package/assets/esri/core/workers/chunks/126df6237fc80608344e.js +0 -1
- package/assets/esri/core/workers/chunks/1b3655f5bf5d90fa8730.js +0 -1
- package/assets/esri/core/workers/chunks/1c83f47d446f2bca1721.js +0 -1
- package/assets/esri/core/workers/chunks/1cf7bb514e7eefc3e9c6.js +0 -1
- package/assets/esri/core/workers/chunks/21a9c8aa2a9e9990df41.js +0 -1
- package/assets/esri/core/workers/chunks/24629402c647ef6b5f6b.js +0 -1
- package/assets/esri/core/workers/chunks/2a1c1be9c202462cf54d.js +0 -1
- package/assets/esri/core/workers/chunks/2cb36f9686693234991a.js +0 -1
- package/assets/esri/core/workers/chunks/2d0d03cbea83c868edba.js +0 -1
- package/assets/esri/core/workers/chunks/2e130cb2f1038055c07b.js +0 -1
- package/assets/esri/core/workers/chunks/3619e04cbb6691549014.js +0 -1
- package/assets/esri/core/workers/chunks/3dbfb4f370a874393822.js +0 -1
- package/assets/esri/core/workers/chunks/406db5c90271a3a203d4.js +0 -1
- package/assets/esri/core/workers/chunks/4369a6c1e0a82ab4db6a.js +0 -1
- package/assets/esri/core/workers/chunks/4f4a424d1747d04501df.js +0 -1
- package/assets/esri/core/workers/chunks/59c00d6fba0fd1c03d01.js +0 -1
- package/assets/esri/core/workers/chunks/5a5720caa64a46daadf9.js +0 -1
- package/assets/esri/core/workers/chunks/5edb99b58549cd66b394.js +0 -1
- package/assets/esri/core/workers/chunks/6203ddf6caad3d356327.js +0 -1
- package/assets/esri/core/workers/chunks/650a317b6dc245a7060f.js +0 -1
- package/assets/esri/core/workers/chunks/7a358b1fd0c0cce59e9b.js +0 -1
- package/assets/esri/core/workers/chunks/83d1a1b3d371c991cc4c.js +0 -1
- package/assets/esri/core/workers/chunks/846b7a81b870c8b238a1.js +0 -1
- package/assets/esri/core/workers/chunks/8ab832468300cc4feb5a.js +0 -1
- package/assets/esri/core/workers/chunks/bc1dc6383e60e7e61d50.js +0 -1
- package/assets/esri/core/workers/chunks/bc6323bdc98013da6fe5.js +0 -1
- package/assets/esri/core/workers/chunks/c4bb67150ccd01ea6014.js +0 -1
- package/assets/esri/core/workers/chunks/c60cf62f374e71e562fc.js +0 -1
- package/assets/esri/core/workers/chunks/c6ea5aac232d1eca04dd.js +0 -1
- package/assets/esri/core/workers/chunks/c8438c2d9ac48afe4033.js +0 -1
- package/assets/esri/core/workers/chunks/c8f239c25fe864f0e47a.js +0 -1
- package/assets/esri/core/workers/chunks/cad260881653567bc8f9.js +0 -1
- package/assets/esri/core/workers/chunks/d824f4b405a72cd2fa74.js +0 -1
- package/assets/esri/core/workers/chunks/dd7508d4016715371e0c.js +0 -1
- package/assets/esri/core/workers/chunks/e55f7fc7eff0074ce0fc.js +0 -1
- package/assets/esri/core/workers/chunks/eef27d305023034084a4.js +0 -1
- package/assets/esri/core/workers/chunks/f38c54ada9e7012a2960.js +0 -1
- package/assets/esri/core/workers/chunks/f5e0ff5292b9fd18fc92.js +0 -1
- package/assets/esri/core/workers/chunks/f5eb8b5021620be7538e.js +0 -1
- package/core/watchUtils.d.ts +0 -4
- package/core/watchUtils.js +0 -5
package/interfaces.d.ts
CHANGED
|
@@ -1655,9 +1655,11 @@ declare namespace __esri {
|
|
|
1655
1655
|
/**
|
|
1656
1656
|
* The intended size of the output hexadecimal number.
|
|
1657
1657
|
*
|
|
1658
|
+
* @default 6
|
|
1659
|
+
*
|
|
1658
1660
|
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html#toHex)
|
|
1659
1661
|
*/
|
|
1660
|
-
digits?:
|
|
1662
|
+
digits?: number;
|
|
1661
1663
|
}
|
|
1662
1664
|
|
|
1663
1665
|
/**
|
|
@@ -1748,6 +1750,14 @@ declare namespace __esri {
|
|
|
1748
1750
|
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#routeServiceUrl)
|
|
1749
1751
|
*/
|
|
1750
1752
|
routeServiceUrl: string;
|
|
1753
|
+
/**
|
|
1754
|
+
* Indicates whether layers should apply privileges of the authenticated user to their capabilities.
|
|
1755
|
+
*
|
|
1756
|
+
* @default true
|
|
1757
|
+
*
|
|
1758
|
+
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#userPrivilegesApplied)
|
|
1759
|
+
*/
|
|
1760
|
+
userPrivilegesApplied: boolean;
|
|
1751
1761
|
/**
|
|
1752
1762
|
* An object with properties that control various aspects of [the workers framework](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-workers.html).
|
|
1753
1763
|
*
|
|
@@ -3290,199 +3300,6 @@ declare namespace __esri {
|
|
|
3290
3300
|
urlPrefix: string;
|
|
3291
3301
|
}
|
|
3292
3302
|
|
|
3293
|
-
/**
|
|
3294
|
-
* Various utilities and convenience functions for watching [Accessor](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Accessor.html) properties.
|
|
3295
|
-
*
|
|
3296
|
-
* @deprecated since version 4.24. Use {@link module:esri/core/reactiveUtils} instead.
|
|
3297
|
-
*
|
|
3298
|
-
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-watchUtils.html)
|
|
3299
|
-
*/
|
|
3300
|
-
interface watchUtils {
|
|
3301
|
-
/**
|
|
3302
|
-
* Watches a property for changes and calls the callback with the initial value of the property.
|
|
3303
|
-
*
|
|
3304
|
-
* @deprecated since 4.24. Use {@link module:esri/core/reactiveUtils#watch reactiveUtils.watch()} instead.
|
|
3305
|
-
*
|
|
3306
|
-
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-watchUtils.html#init)
|
|
3307
|
-
*/
|
|
3308
|
-
init(obj: Accessor, propertyName: string | string[], callback: WatchCallback): WatchHandle;
|
|
3309
|
-
/**
|
|
3310
|
-
* Watches a property for changes and automatically attaches and detaches an event handler for a given event to the property value as needed.
|
|
3311
|
-
*
|
|
3312
|
-
* @deprecated since 4.24. Use {@link module:esri/core/reactiveUtils#on reactiveUtils.on()} instead.
|
|
3313
|
-
*
|
|
3314
|
-
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-watchUtils.html#on)
|
|
3315
|
-
*/
|
|
3316
|
-
on(obj: Accessor, propertyName: string | string[], eventName: string, eventHandler: Function, attachedHandler?: EventAttachedCallback, detachedHandler?: EventAttachedCallback): WatchHandle;
|
|
3317
|
-
/**
|
|
3318
|
-
* Watches a property for changes once.
|
|
3319
|
-
*
|
|
3320
|
-
* @deprecated since 4.24. Use {@link module:esri/core/reactiveUtils#once reactiveUtils.once()} instead.
|
|
3321
|
-
*
|
|
3322
|
-
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-watchUtils.html#once)
|
|
3323
|
-
*/
|
|
3324
|
-
once(obj: Accessor, propertyName: string | string[], callback?: WatchCallback): PromisedWatchHandle;
|
|
3325
|
-
/**
|
|
3326
|
-
* Watches a property for changes.
|
|
3327
|
-
*
|
|
3328
|
-
* @deprecated Since 4.24.
|
|
3329
|
-
*
|
|
3330
|
-
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-watchUtils.html#pausable)
|
|
3331
|
-
*/
|
|
3332
|
-
pausable(obj: Accessor, propertyName: string | string[], callback?: WatchCallback): PausableWatchHandle;
|
|
3333
|
-
/**
|
|
3334
|
-
* Watches a property for changes.
|
|
3335
|
-
*
|
|
3336
|
-
* @deprecated since 4.24. Use {@link module:esri/core/reactiveUtils#watch reactiveUtils.watch()} instead.
|
|
3337
|
-
*
|
|
3338
|
-
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-watchUtils.html#watch)
|
|
3339
|
-
*/
|
|
3340
|
-
watch(obj: Accessor, propertyName: string | string[], callback: WatchCallback): WatchHandle;
|
|
3341
|
-
/**
|
|
3342
|
-
* Watches a property for becoming truthy.
|
|
3343
|
-
*
|
|
3344
|
-
* @deprecated since 4.24. Use {@link module:esri/core/reactiveUtils#when reactiveUtils.when()} instead.
|
|
3345
|
-
*
|
|
3346
|
-
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-watchUtils.html#when)
|
|
3347
|
-
*/
|
|
3348
|
-
when(obj: Accessor, propertyName: string | string[], callback: WatchCallback): WatchHandle;
|
|
3349
|
-
/**
|
|
3350
|
-
* Watches a property for becoming `defined`.
|
|
3351
|
-
*
|
|
3352
|
-
* @deprecated since 4.24. Use {@link module:esri/core/reactiveUtils#when reactiveUtils.when()} instead.
|
|
3353
|
-
*
|
|
3354
|
-
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-watchUtils.html#whenDefined)
|
|
3355
|
-
*/
|
|
3356
|
-
whenDefined(obj: Accessor, propertyName: string | string[], callback: WatchCallback): WatchHandle;
|
|
3357
|
-
/**
|
|
3358
|
-
* Watches a property for becoming `defined` once.
|
|
3359
|
-
*
|
|
3360
|
-
* @deprecated since 4.24. Use {@link module:esri/core/reactiveUtils#whenOnce reactiveUtils.whenOnce()} instead.
|
|
3361
|
-
*
|
|
3362
|
-
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-watchUtils.html#whenDefinedOnce)
|
|
3363
|
-
*/
|
|
3364
|
-
whenDefinedOnce(obj: Accessor, propertyName: string | string[], callback?: WatchCallback): PromisedWatchHandle;
|
|
3365
|
-
/**
|
|
3366
|
-
* Watches a property for becoming equal with a given `value`.
|
|
3367
|
-
*
|
|
3368
|
-
* @deprecated since 4.24. Use {@link module:esri/core/reactiveUtils#when reactiveUtils.when()} instead
|
|
3369
|
-
*
|
|
3370
|
-
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-watchUtils.html#whenEqual)
|
|
3371
|
-
*/
|
|
3372
|
-
whenEqual(obj: Accessor, propertyName: string, value: any, callback: WatchCallback): WatchHandle;
|
|
3373
|
-
/**
|
|
3374
|
-
* Watches a property for becoming equal with a given `value`.
|
|
3375
|
-
*
|
|
3376
|
-
* @deprecated since 4.24. Use {@link module:esri/core/reactiveUtils#whenOnce reactiveUtils.whenOnce()} instead.
|
|
3377
|
-
*
|
|
3378
|
-
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-watchUtils.html#whenEqualOnce)
|
|
3379
|
-
*/
|
|
3380
|
-
whenEqualOnce(obj: Accessor, propertyName: string, value: any, callback?: WatchCallback): PromisedWatchHandle;
|
|
3381
|
-
/**
|
|
3382
|
-
* Watches a property for becoming `false`.
|
|
3383
|
-
*
|
|
3384
|
-
* @deprecated since 4.24. Use {@link module:esri/core/reactiveUtils#when reactiveUtils.when()} instead.
|
|
3385
|
-
*
|
|
3386
|
-
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-watchUtils.html#whenFalse)
|
|
3387
|
-
*/
|
|
3388
|
-
whenFalse(obj: Accessor, propertyName: string | string[], callback: WatchCallback): WatchHandle;
|
|
3389
|
-
/**
|
|
3390
|
-
* Watches a property for becoming `false` once.
|
|
3391
|
-
*
|
|
3392
|
-
* @deprecated since 4.24. Use {@link module:esri/core/reactiveUtils#whenOnce reactiveUtils.whenOnce()} instead.
|
|
3393
|
-
*
|
|
3394
|
-
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-watchUtils.html#whenFalseOnce)
|
|
3395
|
-
*/
|
|
3396
|
-
whenFalseOnce(obj: Accessor, propertyName: string | string[], callback?: WatchCallback): PromisedWatchHandle;
|
|
3397
|
-
/**
|
|
3398
|
-
* Watches a property for becoming falsy.
|
|
3399
|
-
*
|
|
3400
|
-
* @deprecated since 4.24. Use {@link module:esri/core/reactiveUtils#when reactiveUtils.when()} instead.
|
|
3401
|
-
*
|
|
3402
|
-
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-watchUtils.html#whenNot)
|
|
3403
|
-
*/
|
|
3404
|
-
whenNot(obj: Accessor, propertyName: string | string[], callback: WatchCallback): WatchHandle;
|
|
3405
|
-
/**
|
|
3406
|
-
* Watches a property for becoming falsy once.
|
|
3407
|
-
*
|
|
3408
|
-
* @deprecated since 4.24. Use {@link module:esri/core/reactiveUtils#whenOnce reactiveUtils.whenOnce()} instead.
|
|
3409
|
-
*
|
|
3410
|
-
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-watchUtils.html#whenNotOnce)
|
|
3411
|
-
*/
|
|
3412
|
-
whenNotOnce(obj: Accessor, propertyName: string | string[], callback?: WatchCallback): PromisedWatchHandle;
|
|
3413
|
-
/**
|
|
3414
|
-
* Watches a property for becoming truthy once.
|
|
3415
|
-
*
|
|
3416
|
-
* @deprecated since 4.24. Use {@link module:esri/core/reactiveUtils#whenOnce reactiveUtils.whenOnce()} instead.
|
|
3417
|
-
*
|
|
3418
|
-
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-watchUtils.html#whenOnce)
|
|
3419
|
-
*/
|
|
3420
|
-
whenOnce(obj: Accessor, propertyName: string | string[], callback?: WatchCallback): PromisedWatchHandle;
|
|
3421
|
-
/**
|
|
3422
|
-
* Watches a property for becoming `true`.
|
|
3423
|
-
*
|
|
3424
|
-
* @deprecated since 4.24. Use {@link module:esri/core/reactiveUtils#when reactiveUtils.when()} instead.
|
|
3425
|
-
*
|
|
3426
|
-
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-watchUtils.html#whenTrue)
|
|
3427
|
-
*/
|
|
3428
|
-
whenTrue(obj: Accessor, propertyName: string | string[], callback: WatchCallback): WatchHandle;
|
|
3429
|
-
/**
|
|
3430
|
-
* Watches a property for becoming `true` once.
|
|
3431
|
-
*
|
|
3432
|
-
* @deprecated since 4.24. Use {@link module:esri/core/reactiveUtils#whenOnce reactiveUtils.whenOnce()} instead.
|
|
3433
|
-
*
|
|
3434
|
-
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-watchUtils.html#whenTrueOnce)
|
|
3435
|
-
*/
|
|
3436
|
-
whenTrueOnce(obj: Accessor, propertyName: string | string[], callback?: WatchCallback): PromisedWatchHandle;
|
|
3437
|
-
/**
|
|
3438
|
-
* Watches a property for becoming `undefined`.
|
|
3439
|
-
*
|
|
3440
|
-
* @deprecated since 4.24. Use {@link module:esri/core/reactiveUtils#when reactiveUtils.when()} instead.
|
|
3441
|
-
*
|
|
3442
|
-
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-watchUtils.html#whenUndefined)
|
|
3443
|
-
*/
|
|
3444
|
-
whenUndefined(obj: Accessor, propertyName: string | string[], callback: WatchCallback): WatchHandle;
|
|
3445
|
-
/**
|
|
3446
|
-
* Watches a property for becoming `undefined` once.
|
|
3447
|
-
*
|
|
3448
|
-
* @deprecated since 4.24. Use {@link module:esri/core/reactiveUtils#whenOnce reactiveUtils.whenOnce()} instead.
|
|
3449
|
-
*
|
|
3450
|
-
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-watchUtils.html#whenUndefinedOnce)
|
|
3451
|
-
*/
|
|
3452
|
-
whenUndefinedOnce(obj: Accessor, propertyName: string | string[], callback?: WatchCallback): PromisedWatchHandle;
|
|
3453
|
-
}
|
|
3454
|
-
|
|
3455
|
-
export const watchUtils: watchUtils;
|
|
3456
|
-
export type EventAttachedCallback = (target?: any, propName?: string, obj?: Accessor, eventName?: string) => void;
|
|
3457
|
-
|
|
3458
|
-
/**
|
|
3459
|
-
* Represents a watch created when an object invokes [watch()](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Accessor.html#watch).
|
|
3460
|
-
*
|
|
3461
|
-
* @deprecated since version 4.24.
|
|
3462
|
-
*
|
|
3463
|
-
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-watchUtils.html#PausableWatchHandle)
|
|
3464
|
-
*/
|
|
3465
|
-
export interface PausableWatchHandle {
|
|
3466
|
-
/**
|
|
3467
|
-
* Removes the watch handle.
|
|
3468
|
-
*
|
|
3469
|
-
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-watchUtils.html#PausableWatchHandle)
|
|
3470
|
-
*/
|
|
3471
|
-
remove(): void;
|
|
3472
|
-
/**
|
|
3473
|
-
* Pauses the handle preventing changes to invoke the associated callback.
|
|
3474
|
-
*
|
|
3475
|
-
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-watchUtils.html#PausableWatchHandle)
|
|
3476
|
-
*/
|
|
3477
|
-
pause(): void;
|
|
3478
|
-
/**
|
|
3479
|
-
* Resumes a paused the handle.
|
|
3480
|
-
*
|
|
3481
|
-
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-watchUtils.html#PausableWatchHandle)
|
|
3482
|
-
*/
|
|
3483
|
-
resume(): void;
|
|
3484
|
-
}
|
|
3485
|
-
|
|
3486
3303
|
export interface PromisedWatchHandle extends Promise<any> {
|
|
3487
3304
|
remove(): void;
|
|
3488
3305
|
}
|
|
@@ -51512,7 +51329,7 @@ declare namespace __esri {
|
|
|
51512
51329
|
*
|
|
51513
51330
|
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-ImageIdentifyParameters.html#geometry)
|
|
51514
51331
|
*/
|
|
51515
|
-
geometry: Point | Polygon;
|
|
51332
|
+
geometry: Point | Polygon | Extent;
|
|
51516
51333
|
/**
|
|
51517
51334
|
* Controls the maximum number of returned catalog items, set to 1 to return the top most raster only.
|
|
51518
51335
|
*
|
|
@@ -51608,7 +51425,9 @@ declare namespace __esri {
|
|
|
51608
51425
|
*
|
|
51609
51426
|
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-ImageIdentifyParameters.html#geometry)
|
|
51610
51427
|
*/
|
|
51611
|
-
geometry?: (PointProperties & { type: "point" })
|
|
51428
|
+
geometry?: | (PointProperties & { type: "point" })
|
|
51429
|
+
| (PolygonProperties & { type: "polygon" })
|
|
51430
|
+
| (ExtentProperties & { type: "extent" });
|
|
51612
51431
|
/**
|
|
51613
51432
|
* Controls the maximum number of returned catalog items, set to 1 to return the top most raster only.
|
|
51614
51433
|
*
|
|
@@ -58177,6 +57996,12 @@ declare namespace __esri {
|
|
|
58177
57996
|
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-smartMapping-labels-bins.html#getLabelSchemes)
|
|
58178
57997
|
*/
|
|
58179
57998
|
layer: FeatureLayer | CSVLayer | GeoJSONLayer | WFSLayer | OGCFeatureLayer | StreamLayer;
|
|
57999
|
+
/**
|
|
58000
|
+
* The name of the [AggregateField](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-AggregateField.html#name) to use in the primary label scheme.
|
|
58001
|
+
*
|
|
58002
|
+
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-smartMapping-labels-bins.html#getLabelSchemes)
|
|
58003
|
+
*/
|
|
58004
|
+
field?: string;
|
|
58180
58005
|
/**
|
|
58181
58006
|
* The renderer to set on `layer.featureReduction.renderer` when binning is enabled.
|
|
58182
58007
|
*
|
|
@@ -58255,17 +58080,23 @@ declare namespace __esri {
|
|
|
58255
58080
|
*/
|
|
58256
58081
|
layer: FeatureLayer | CSVLayer | GeoJSONLayer | WFSLayer | OGCFeatureLayer | StreamLayer;
|
|
58257
58082
|
/**
|
|
58258
|
-
* The
|
|
58083
|
+
* The view where the input layer will be rendered.
|
|
58084
|
+
*
|
|
58085
|
+
* [Read more...](global.html)
|
|
58086
|
+
*/
|
|
58087
|
+
view: MapView;
|
|
58088
|
+
/**
|
|
58089
|
+
* The name of the [AggregateField](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-AggregateField.html#name) to use in the primary label scheme.
|
|
58259
58090
|
*
|
|
58260
58091
|
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-smartMapping-labels-clusters.html#getLabelSchemes)
|
|
58261
58092
|
*/
|
|
58262
|
-
|
|
58093
|
+
field?: string;
|
|
58263
58094
|
/**
|
|
58264
|
-
* The
|
|
58095
|
+
* The renderer to set on the input layer when clustering is enabled.
|
|
58265
58096
|
*
|
|
58266
|
-
* [Read more...](
|
|
58097
|
+
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-smartMapping-labels-clusters.html#getLabelSchemes)
|
|
58267
58098
|
*/
|
|
58268
|
-
|
|
58099
|
+
renderer?: Renderer;
|
|
58269
58100
|
}
|
|
58270
58101
|
|
|
58271
58102
|
/**
|
|
@@ -92689,6 +92520,7 @@ declare namespace __esri {
|
|
|
92689
92520
|
}
|
|
92690
92521
|
|
|
92691
92522
|
export class GroupInput {
|
|
92523
|
+
initialState: "expanded" | "collapsed";
|
|
92692
92524
|
/**
|
|
92693
92525
|
* The field inputs contained within the group.
|
|
92694
92526
|
*
|
|
@@ -92701,6 +92533,12 @@ declare namespace __esri {
|
|
|
92701
92533
|
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm-GroupInput.html#label)
|
|
92702
92534
|
*/
|
|
92703
92535
|
readonly label: string;
|
|
92536
|
+
/**
|
|
92537
|
+
* Determines whether or not the group is open/expanded.
|
|
92538
|
+
*
|
|
92539
|
+
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm-GroupInput.html#open)
|
|
92540
|
+
*/
|
|
92541
|
+
open: string;
|
|
92704
92542
|
state: "expanded" | "collapsed";
|
|
92705
92543
|
readonly type: "group";
|
|
92706
92544
|
/**
|
|
@@ -92718,6 +92556,13 @@ declare namespace __esri {
|
|
|
92718
92556
|
}
|
|
92719
92557
|
|
|
92720
92558
|
interface GroupInputProperties extends InputBaseProperties {
|
|
92559
|
+
initialState?: "expanded" | "collapsed";
|
|
92560
|
+
/**
|
|
92561
|
+
* Determines whether or not the group is open/expanded.
|
|
92562
|
+
*
|
|
92563
|
+
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm-GroupInput.html#open)
|
|
92564
|
+
*/
|
|
92565
|
+
open?: string;
|
|
92721
92566
|
state?: "expanded" | "collapsed";
|
|
92722
92567
|
}
|
|
92723
92568
|
|
|
@@ -95508,7 +95353,7 @@ declare namespace __esri {
|
|
|
95508
95353
|
*
|
|
95509
95354
|
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTemplates.html#selectionMode)
|
|
95510
95355
|
*/
|
|
95511
|
-
selectionMode:
|
|
95356
|
+
selectionMode: "single" | "none";
|
|
95512
95357
|
/**
|
|
95513
95358
|
* The view model for this widget.
|
|
95514
95359
|
*
|
|
@@ -95596,7 +95441,7 @@ declare namespace __esri {
|
|
|
95596
95441
|
*
|
|
95597
95442
|
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTemplates.html#selectionMode)
|
|
95598
95443
|
*/
|
|
95599
|
-
selectionMode?:
|
|
95444
|
+
selectionMode?: "single" | "none";
|
|
95600
95445
|
/**
|
|
95601
95446
|
* The view model for this widget.
|
|
95602
95447
|
*
|
package/layers/LinkChartLayer.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.28/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../chunks/tslib.es6.js";import"../geometry.js";import t from"../core/Collection.js";import a from"../core/Error.js";import i from"../core/Logger.js";import{throwIfAborted as o}from"../core/promiseUtils.js";import{property as n}from"../core/accessorSupport/decorators/property.js";import"../core/accessorSupport/ensureType.js";import"../core/arrayUtils.js";import"../core/has.js";import{subclass as s}from"../core/accessorSupport/decorators/subclass.js";import{encodeGeohash as r}from"../geohash/geohashUtils.js";import h from"./Layer.js";import{convertFromGeometry as l}from"./graphics/featureConversionUtils.js";import c from"./graphics/OptimizedGeometry.js";import{KnowledgeGraphLayerDataManager as d,mockOidFieldName as p,mockOriginIdFieldName as u,mockDestinationIdFieldName as y,mockLayoutGeometryFieldName as m,geohashEncodingPrecision as f}from"./knowledgeGraph/KnowledgeGraphLayerDataManager.js";import g from"./knowledgeGraph/KnowledgeGraphSublayer.js";import{getRelationshipEndNodeIds as k}from"./knowledgeGraph/supportUtils.js";import{BlendLayer as C}from"./mixins/BlendLayer.js";import{ScaleRangeLayer as L}from"./mixins/ScaleRangeLayer.js";import{LCSimpleLayout as M,LCSmartTreeLayout as b,LCRadialTreeLayout as w,LCHierarchicalLayout as x,LCCommunityLayout as D,LCForceDirectedLayout as E,NodeFlag as T,load as G}from"../libs/linkchartlayout/LinkChartLayout.js";import{fetchKnowledgeGraph as N}from"../rest/knowledgeGraphService.js";import I from"../rest/knowledgeGraph/EntityType.js";import R from"../rest/knowledgeGraph/RelationshipType.js";import _ from"../geometry/Extent.js";import A from"../geometry/Point.js";import v from"../geometry/Polyline.js";const S=(e,t,a)=>(e.has(t)||e.set(t,a()),e.get(t));let j=class extends(C(L(h))){constructor(e){if(super(e),this.dataPreloadedInLocalCache=!1,this.defaultLinkChartConfig=null,this._currentLinkChartConfig={layoutMode:"RADIAL_TREE",xScaleFactor:1,yScaleFactor:1},this._graphTypeLookup=new Map,this.knowledgeGraph=null,this.layers=new t,this.linkChartDiagramLookup=new Map,this.linkChartExtent=new _({xmin:-1e-7,ymin:-1e-7,xmax:1e-7,ymax:1e-7}),this.linkChartGeohashLookup=new Map,this.memberEntityTypes=null,this.memberRelationshipTypes=null,this.sublayerIdsCache=new Map,this.tables=new t,this.type="link-chart",this._originalInclusionList=e.inclusionModeDefinition,e.dataPreloadedInLocalCache&&!e.inclusionModeDefinition)throw new a("knowledge-graph:linkchart-layer-constructor","If creating a link chart composite layer and configured that data is already loaded in the cache, you must specify an inclusion list so the Composite Layer knows what records belong to it")}normalizeCtorArgs(e){return{url:e.url,title:e.title,dataPreloadedInLocalCache:e.dataPreloadedInLocalCache,defaultLinkChartConfig:e.defaultLinkChartConfig}}_initializeLayerProperties(e){if(!this.title&&this.url){const e=this.url.split("/");this.title=e[e.length-2]}const t=new Set;let o=[],n=[];if(e.inclusionModeDefinition&&(!e.inclusionModeDefinition.namedTypeDefinitions||e.inclusionModeDefinition.namedTypeDefinitions.size<1))throw new a("knowledge-graph:composite-layer-constructor","If an explicit inclusion definition is defined, at least one namedTypeDefinition must also be defined");e.knowledgeGraph.dataModel.entityTypes?.forEach((e=>{e.name&&this._graphTypeLookup.set(e.name,e)})),e.knowledgeGraph.dataModel.relationshipTypes?.forEach((e=>{e.name&&this._graphTypeLookup.set(e.name,e)})),e.inclusionModeDefinition?.generateAllSublayers?(o=e.knowledgeGraph.dataModel.entityTypes??[],n=e.knowledgeGraph.dataModel.relationshipTypes??[]):e.inclusionModeDefinition?.namedTypeDefinitions&&e.inclusionModeDefinition?.namedTypeDefinitions.size>0?e.inclusionModeDefinition?.namedTypeDefinitions.forEach(((a,s)=>{if(!this._graphTypeLookup.get(s))return i.getLogger(this).warn(`A named type, ${s}, was in the inclusion list that wasn't in the data model and will be removed`),void e.inclusionModeDefinition?.namedTypeDefinitions.delete(s);this._graphTypeLookup.get(s)instanceof R||"strictOrigin"in this._graphTypeLookup.get(s)?t.has(s)||(t.add(s),n.push(this._graphTypeLookup.get(s))):this._graphTypeLookup.get(s)instanceof I||"properties"in this._graphTypeLookup.get(s)?t.has(s)||(t.add(s),o.push(this._graphTypeLookup.get(s))):(i.getLogger(this).warn(`A named type, ${s}, was in the inclusion list that wasn't properly modeled and will be removed`),e.inclusionModeDefinition?.namedTypeDefinitions.delete(s))})):(o=e.knowledgeGraph.dataModel.entityTypes??[],n=e.knowledgeGraph.dataModel.relationshipTypes??[]);const s=new d({knowledgeGraph:e.knowledgeGraph,inclusionModeDefinition:e.inclusionModeDefinition});this.knowledgeGraph=e.knowledgeGraph,this.memberEntityTypes=o,this.memberRelationshipTypes=n,this.dataManager=s}load(e){return this.addResolvingPromise(new Promise((t=>{N(this.url).then((a=>{if(this._initializeLayerProperties({knowledgeGraph:a,inclusionModeDefinition:this._originalInclusionList}),this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.size||(this.dataManager.inclusionModeDefinition={generateAllSublayers:!1,namedTypeDefinitions:new Map},this.dataManager.knowledgeGraph.dataModel.entityTypes?.forEach((e=>{e.name&&this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.set(e.name,{useAllData:!0})})),this.dataManager.knowledgeGraph.dataModel.relationshipTypes?.forEach((e=>{e.name&&this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.set(e.name,{useAllData:!0})}))),this.dataPreloadedInLocalCache)this.loadLayerAssumingLocalCache(),this.dataManager.inclusionModeDefinition&&(this.dataManager.inclusionModeDefinition.generateAllSublayers=!1),this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.forEach((e=>{e.useAllData=!1,e.members?.forEach((e=>{let t;t=e.linkChartLocation instanceof c?e.linkChartLocation:e.linkChartLocation?l(e.linkChartLocation):null,this.linkChartDiagramLookup.set(e.id,t),t&&2===t.coords.length&&0===t.lengths.length?this.linkChartGeohashLookup.set(e.id,r(t.coords[1],t.coords[0],f)):this.linkChartGeohashLookup.set(e.id,"")})),this.addResolvingPromise(this._initializeDiagram().then((async()=>{this.layers.forEach((async e=>{await e.refreshCachedQueryEngine()})),this.tables.forEach((async e=>{await e.refreshCachedQueryEngine()}))})))}));else{const t="GEOGRAPHIC"===this.defaultLinkChartConfig?.layoutMode;this.addResolvingPromise(this.dataManager.refreshCacheContent(void 0,!1,t,!0).then((async()=>{o(e);const t=[],a=[];this.loadLayerAssumingLocalCache(),this.dataManager.inclusionModeDefinition&&(this.dataManager.inclusionModeDefinition.generateAllSublayers=!1,this.dataManager.inclusionModeDefinition.namedTypeDefinitions.forEach((e=>{e.useAllData=!1}))),await this._initializeDiagram(),this.layers.forEach((e=>{a.push(e.refreshCachedQueryEngine()),t.push(new Promise((t=>{e.on("layerview-create",(()=>{t(null)}))})))})),this.tables.forEach((e=>{a.push(e.refreshCachedQueryEngine())})),await Promise.all(a)})))}t(null)}))}))),Promise.resolve(this)}async addRecords(e,t){let a=[];t?.cascadeAddRelationshipEndNodes&&this.dataManager.knowledgeGraph.dataModel&&(a=await k(e,this.dataManager.knowledgeGraph));const i=e.concat(a).filter((e=>!this.sublayerIdsCache.get(e.typeName)?.has(e.id)));await this._handleNewRecords(i)}async removeRecords(e,{cascadeRemoveRelationships:t=!0,recalculateLayout:a=!1}={cascadeRemoveRelationships:!0,recalculateLayout:!1}){let i=[];for(const n of e)!1===this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.get(n.typeName)?.useAllData&&this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.get(n.typeName)?.members?.has(n.id)&&i.push(n);if(t){const e=new Set,t=[];for(const a of i)if(this.dataManager.nodeConnectionsLookup.has(a.id))for(const t of this.dataManager.nodeConnectionsLookup.get(a.id))e.add(t);for(const a of e)this.dataManager.memberIdTypeLookup.has(a)&&t.push({id:a,typeName:this.dataManager.memberIdTypeLookup.get(a)});i=i.concat(t)}this.dataManager.removeFromLayer(i);for(const n of i)this.sublayerIdsCache.get(n.typeName)?.delete(n.id),this.linkChartDiagramLookup.delete(n.id);a&&await this.calculateLinkChartLayout(this._currentLinkChartConfig.layoutMode,{xScaleFactor:this._currentLinkChartConfig.xScaleFactor,yScaleFactor:this._currentLinkChartConfig.xScaleFactor});const o=[];return this.layers.forEach((e=>{o.push(e.refreshCachedQueryEngine())})),await Promise.all(o),this._refreshNamedTypes(),i}async expand(e){const t=await this.dataManager.getConnectedRecordIds(e),a=t.filter((e=>!this.sublayerIdsCache.get(e.typeName)?.has(e.id)));return await this._handleNewRecords(t),{records:a}}loadLayerAssumingLocalCache(){this.memberRelationshipTypes.forEach((e=>{const t=new g({objectType:e,parentCompositeLayer:this,graphType:"relationship",title:e.name});t.geometryType?this.layers.push(t):this.tables.push(t),this.dataManager.sublayerCaches.has(e.name)||this.dataManager.sublayerCaches.set(e.name,new Map)})),this.memberEntityTypes.forEach((e=>{const t=new g({objectType:e,parentCompositeLayer:this,graphType:"entity",title:e.name});t.geometryType?this.layers.push(t):this.tables.push(t),this.dataManager.sublayerCaches.has(e.name)||this.dataManager.sublayerCaches.set(e.name,new Map)})),this.dataManager.inclusionModeDefinition?.namedTypeDefinitions&&this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.forEach(((e,t)=>{const a=S(this.sublayerIdsCache,t,(()=>new Set));e.members?.forEach((e=>{if(a.add(e.id),e.linkChartLocation)if(e.linkChartLocation instanceof c)this.linkChartDiagramLookup.set(e.id,e.linkChartLocation),2===e.linkChartLocation.coords.length&&0===e.linkChartLocation.lengths.length?this.linkChartGeohashLookup.set(e.id,r(e.linkChartLocation.coords[1],e.linkChartLocation.coords[0],f)):this.linkChartGeohashLookup.set(e.id,"");else{const t=l(e.linkChartLocation);this.linkChartDiagramLookup.set(e.id,e.linkChartLocation?t:null),"x"in e.linkChartLocation&&"y"in e.linkChartLocation?this.linkChartGeohashLookup.set(e.id,r(e.linkChartLocation.x,e.linkChartLocation.y,f)):this.linkChartGeohashLookup.set(e.id,"")}}))}))}async calculateLinkChartLayout(e="RADIAL_TREE",t){const o=[],n=[];this.dataManager.sublayerCaches.forEach(((e,t)=>{this.dataManager.entityTypeNames.has(t)?e.forEach((e=>{o.push({typeName:t,feature:e})})):this.dataManager.relationshipTypeNames.has(t)&&e.forEach((e=>{n.push({typeName:t,feature:e})}))})),this.linkChartDiagramLookup=new Map;const s=new Map,h=new Map,c=new Map,d=new Map,g=new Uint8Array(o.length),k=new Float64Array(o.length),C=new Float64Array(o.length),L=new Uint32Array(n.length),N=new Uint32Array(n.length),I=[],R="FORCE_DIRECTED",S=t?.xScaleFactor??1,j=t?.yScaleFactor??1,P=new _({xmin:-1e-7,ymin:-1e-7,xmax:1e-7,ymax:1e-7});let F,z="FORCE_DIRECTED",O=0,U=0;switch(z="GEOGRAPHIC"===e?R:e,z){case"FORCE_DIRECTED":F=E.apply;break;case"COMMUNITY":F=D.apply;break;case"HIERARCHICAL":F=x.apply;break;case"RADIAL_TREE":F=w.apply;break;case"SMART_TREE":F=b.apply;break;default:F=M.apply}o.forEach((({typeName:a,feature:i})=>{if(t?.lockedNodeLocations?.has(i.attributes[p])){"GEOGRAPHIC"===e&&this.dataManager.geographicLookup.has(a)?g[O]=T.IsGeographic:g[O]=T.None;const o=t.lockedNodeLocations.get(i.attributes[p]);k[O]=o.x,C[O]=o.y}else if("GEOGRAPHIC"===e&&this.dataManager.geographicLookup.has(a)){g[O]=T.IsGeographic;let e=null;const t=i.attributes[this.dataManager.geographicLookup.get(a).name],o=this.dataManager.geographicLookup.get(a)?.geometryType;switch(o){case"esriGeometryPoint":k[O]=t?.x,C[O]=t?.y;break;case"esriGeometryPolygon":e=t?.centroid,null!=e?.x&&null!=e?.y?(k[O]=e.x,C[O]=e.y):g[O]=T.IsMovable;break;case"esriGeometryPolyline":case"esriGeometryMultipoint":e=t?.extent?.center,null!=e?.x&&null!=e?.y?(k[O]=e.x,C[O]=e.y):g[O]=T.IsMovable;break;default:g[O]=T.IsMovable}(null==k[O]||null==C[O]||Number.isNaN(k[O])||Number.isNaN(C[O]))&&(g[O]=T.IsMovable,k[O]=0,C[O]=0)}else g[O]=T.IsMovable,k[O]=0,C[O]=0;d.set(i.attributes[p],O),I[O]={feature:i,typeName:a},O++}));let Q=!1;n.forEach((e=>{const t=d.get(e.feature.attributes[u]),a=d.get(e.feature.attributes[y]);void 0!==t&&void 0!==a?(L[U]=t,N[U]=a,U++):(Q=!0,this.linkChartDiagramLookup.set(e.feature.attributes[u],null),this.linkChartGeohashLookup.set(e.feature.attributes[u],null))})),Q&&i.getLogger(this).warn("A relationship is a member of this layer that has either origin or destination entity nodes that are not members. The diagram geometry will be set to null"),await G();if(!F(g,k,C,L,N))throw new a("knowledge-graph:layout-failed","Attempting to arrange the records in the specified layout failed");for(let a=0;a<I.length;a++){if(g[a]===T.IsMovable&&(k[a]=k[a]*S,C[a]=C[a]*j),C[a]>84.9999&&(C[a]=84.9999),C[a]<-84.9999&&(C[a]=-84.9999),k[a]>179.9999&&(k[a]=179.9999),k[a]<-179.9999&&(k[a]=-179.9999),I[a].feature.attributes[m]=new A(k[a],C[a]),s.has(I[a].typeName)){const e=s.get(I[a].typeName);e?.set(I[a].feature.attributes[p],I[a].feature)}else{const e=new Map;e.set(I[a].feature.attributes[p],I[a].feature),s.set(I[a].typeName,e)}c.set(I[a].feature.attributes[p],I[a].feature);const e=l(I[a].feature.attributes[m]);this.linkChartDiagramLookup.set(I[a].feature.attributes[p],I[a].feature.attributes[m]?e:null),this.linkChartGeohashLookup.set(I[a].feature.attributes[p],r(I[a].feature.attributes[m].y,I[a].feature.attributes[m].x,f)),I[a].feature.attributes[m].x<P.xmin&&(P.xmin=I[a].feature.attributes[m].x),I[a].feature.attributes[m].x>P.xmax&&(P.xmax=I[a].feature.attributes[m].x),I[a].feature.attributes[m].y<P.ymin&&(P.ymin=I[a].feature.attributes[m].y),I[a].feature.attributes[m].y>P.ymax&&(P.ymax=I[a].feature.attributes[m].y)}return this.linkChartExtent.xmin=P.xmin,this.linkChartExtent.xmax=P.xmax,this.linkChartExtent.ymin=P.ymin,this.linkChartExtent.ymax=P.ymax,n.forEach((e=>{const t=I[d.get(e.feature.attributes[u])]?.feature.attributes[m],a=I[d.get(e.feature.attributes[y])]?.feature.attributes[m];if(!t||!a)return;const i=new v({paths:[[t.x,t.y],[a.x,a.y]]});if(e.feature.attributes[m]=i,h.has(e.typeName)){const t=h.get(e.typeName);t?.set(e.feature.attributes[p],e.feature)}else{const t=new Map;t.set(e.feature.attributes[p],e.feature),h.set(e.typeName,t)}c.set(e.feature.attributes[p],e.feature);const o=l(e.feature.attributes[m]);this.linkChartDiagramLookup.set(e.feature.attributes[p],e.feature.attributes[m]?o:null),this.linkChartGeohashLookup.set(e.feature.attributes[p],"")})),this._currentLinkChartConfig={layoutMode:e,xScaleFactor:S,yScaleFactor:j},{nodes:s,links:h,idMap:c}}async applyNewLinkChartLayout(e="RADIAL_TREE",t){const a=[];await this.calculateLinkChartLayout(e,t),this.layers.forEach((e=>{a.push(e.refreshCachedQueryEngine())})),await Promise.all(a),this._refreshNamedTypes()}getCurrentNodeLocations(){const e=new Map;return this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.forEach((t=>{t?.members?.forEach((t=>{const a=t.linkChartLocation;let i;const o=t.id;a&&(i="x"in a?{x:a.x,y:a.y}:{x:a.coords[0],y:a.coords[1]},e.set(o,new A({x:i.x,y:i.y})))}))})),e}async synchronizeInclusionListWithCache(){return new Promise((e=>{this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.forEach(((e,t)=>{if(e.useAllData=!1,e.members&&e.members.size>0){if(!this.dataManager.sublayerCaches.get(t))return;const a=Array.from(this.dataManager.sublayerCaches.get(t).keys());Array.from(e.members.keys()).filter((e=>!a.includes(e))).forEach((t=>{e.members?.delete(t)}))}})),e()}))}async refreshLinkChartCache(e){await this.dataManager.refreshCacheContent(e);const t=[];this.layers.forEach((e=>{t.push(e.refreshCachedQueryEngine())})),await Promise.all(t),this._refreshNamedTypes()}async _handleNewRecords(e){const t=[];this.dataManager.addToLayer(e);for(const a of e)this.sublayerIdsCache.has(a.typeName)||(this.sublayerIdsCache.set(a.typeName,new Set),t.push(a.typeName)),this.sublayerIdsCache.get(a.typeName).add(a.id);for(const a of t)if(this._graphTypeLookup.has(a)){const e=this._graphTypeLookup.get(a),t="endPoints"in e?"relationship":"entity",i=new g({objectType:e,parentCompositeLayer:this,graphType:t,title:a});"entity"===t?this.dataManager.entityTypeNames.add(a):this.dataManager.relationshipTypeNames.add(a),i.geometryType?this.layers.push(i):this.tables.push(i),this.dataManager.sublayerCaches.set(a,new Map)}await this.dataManager.refreshCacheContent(e.map((e=>e.id))),await this.applyNewLinkChartLayout(this._currentLinkChartConfig.layoutMode,{xScaleFactor:this._currentLinkChartConfig.xScaleFactor,yScaleFactor:this._currentLinkChartConfig.xScaleFactor})}async _initializeDiagram(){this.defaultLinkChartConfig?this.defaultLinkChartConfig.doNotRecalculateLayout?(this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.forEach((e=>{e?.members?.forEach((e=>{const t=e.linkChartLocation;let a;const i=e.id;if(!t)return;a="x"in t?{x:t.x,y:t.y}:{x:t.coords[0],y:t.coords[1]};const o=l(a);this.linkChartDiagramLookup.set(i,o),this.linkChartGeohashLookup.set(i,r(a.x,a.y,f)),this.linkChartExtent.xmin>a.x&&(this.linkChartExtent.xmin=a.x),this.linkChartExtent.xmax<a.x&&(this.linkChartExtent.xmax=a.x),this.linkChartExtent.ymin>a.y&&(this.linkChartExtent.ymin=a.y),this.linkChartExtent.ymax<a.y&&(this.linkChartExtent.ymax=a.y)}))})),this.memberRelationshipTypes.forEach((e=>{e.name&&this.dataManager.sublayerCaches.get(e.name)?.forEach((e=>{const t=this.linkChartDiagramLookup.get(e.attributes[u]),a=this.linkChartDiagramLookup.get(e.attributes[y]);if(t&&a){const i=l(new v({paths:[[t.coords[0],t.coords[1]],[a.coords[0],a.coords[1]]]}));this.linkChartDiagramLookup.set(e.attributes[p],i)}else this.linkChartDiagramLookup.set(e.attributes[p],null);this.linkChartGeohashLookup.set(e.attributes[p],"")}))}))):await this.calculateLinkChartLayout(this.defaultLinkChartConfig.layoutMode,{xScaleFactor:this.defaultLinkChartConfig.xScaleFactor,yScaleFactor:this.defaultLinkChartConfig.yScaleFactor,lockedNodeLocations:this.getCurrentNodeLocations()}):await this.calculateLinkChartLayout("RADIAL_TREE",{lockedNodeLocations:this.getCurrentNodeLocations()})}_refreshNamedTypes(){for(const e of this.layers)e.emit("refresh",{dataChanged:!0});for(const e of this.tables)e.emit("refresh",{dataChanged:!0})}};e([n()],j.prototype,"dataPreloadedInLocalCache",void 0),e([n()],j.prototype,"defaultLinkChartConfig",void 0),e([n()],j.prototype,"dataManager",void 0),e([n()],j.prototype,"knowledgeGraph",void 0),e([n()],j.prototype,"layers",void 0),e([n()],j.prototype,"linkChartDiagramLookup",void 0),e([n()],j.prototype,"linkChartExtent",void 0),e([n()],j.prototype,"linkChartGeohashLookup",void 0),e([n()],j.prototype,"memberEntityTypes",void 0),e([n()],j.prototype,"memberRelationshipTypes",void 0),e([n()],j.prototype,"sublayerIdsCache",void 0),e([n()],j.prototype,"tables",void 0),e([n({json:{read:!1}})],j.prototype,"type",void 0),j=e([s("esri.layers.LinkChartLayer")],j);const P=j;export{P as default};
|
|
5
|
+
import{_ as e}from"../chunks/tslib.es6.js";import"../geometry.js";import t from"../core/Collection.js";import a from"../core/Error.js";import i from"../core/Logger.js";import{throwIfAborted as o}from"../core/promiseUtils.js";import{property as n}from"../core/accessorSupport/decorators/property.js";import"../core/accessorSupport/ensureType.js";import"../core/arrayUtils.js";import"../core/has.js";import{subclass as s}from"../core/accessorSupport/decorators/subclass.js";import{encodeGeohash as r}from"../geohash/geohashUtils.js";import h from"./Layer.js";import{convertFromGeometry as l}from"./graphics/featureConversionUtils.js";import c from"./graphics/OptimizedGeometry.js";import{KnowledgeGraphLayerDataManager as d,mockOidFieldName as p,mockOriginIdFieldName as u,mockDestinationIdFieldName as y,mockLayoutGeometryFieldName as m,geohashEncodingPrecision as f}from"./knowledgeGraph/KnowledgeGraphLayerDataManager.js";import g from"./knowledgeGraph/KnowledgeGraphSublayer.js";import{getRelationshipEndNodeIds as k}from"./knowledgeGraph/supportUtils.js";import{BlendLayer as C}from"./mixins/BlendLayer.js";import{ScaleRangeLayer as L}from"./mixins/ScaleRangeLayer.js";import{LCSimpleLayout as M,LCSmartTreeLayout as b,LCRadialTreeLayout as w,LCHierarchicalLayout as x,LCCommunityLayout as D,LCForceDirectedLayout as E,NodeFlag as T,load as G}from"../libs/linkchartlayout/LinkChartLayout.js";import{fetchKnowledgeGraph as N}from"../rest/knowledgeGraphService.js";import I from"../rest/knowledgeGraph/EntityType.js";import R from"../rest/knowledgeGraph/RelationshipType.js";import _ from"../geometry/Extent.js";import A from"../geometry/Point.js";import v from"../geometry/Polyline.js";const S=(e,t,a)=>(e.has(t)||e.set(t,a()),e.get(t));let j=class extends(C(L(h))){constructor(e){if(super(e),this.dataPreloadedInLocalCache=!1,this.defaultLinkChartConfig=null,this._currentLinkChartConfig={layoutMode:"RADIAL_TREE",xScaleFactor:1,yScaleFactor:1},this._graphTypeLookup=new Map,this.knowledgeGraph=null,this.layers=new t,this.linkChartDiagramLookup=new Map,this.linkChartExtent=new _({xmin:-1e-7,ymin:-1e-7,xmax:1e-7,ymax:1e-7}),this.linkChartGeohashLookup=new Map,this.memberEntityTypes=null,this.memberRelationshipTypes=null,this.sublayerIdsCache=new Map,this.tables=new t,this.type="link-chart",this._originalInclusionList=e.inclusionModeDefinition,e.dataPreloadedInLocalCache&&!e.inclusionModeDefinition)throw new a("knowledge-graph:linkchart-layer-constructor","If creating a link chart composite layer and configured that data is already loaded in the cache, you must specify an inclusion list so the Composite Layer knows what records belong to it")}normalizeCtorArgs(e){return{url:e.url,title:e.title,dataPreloadedInLocalCache:e.dataPreloadedInLocalCache,defaultLinkChartConfig:e.defaultLinkChartConfig}}_initializeLayerProperties(e){if(!this.title&&this.url){const e=this.url.split("/");this.title=e[e.length-2]}const t=new Set;let o=[],n=[];if(e.inclusionModeDefinition&&(!e.inclusionModeDefinition.namedTypeDefinitions||e.inclusionModeDefinition.namedTypeDefinitions.size<1))throw new a("knowledge-graph:composite-layer-constructor","If an explicit inclusion definition is defined, at least one namedTypeDefinition must also be defined");e.knowledgeGraph.dataModel.entityTypes?.forEach((e=>{e.name&&this._graphTypeLookup.set(e.name,e)})),e.knowledgeGraph.dataModel.relationshipTypes?.forEach((e=>{e.name&&this._graphTypeLookup.set(e.name,e)})),e.inclusionModeDefinition?.generateAllSublayers?(o=e.knowledgeGraph.dataModel.entityTypes??[],n=e.knowledgeGraph.dataModel.relationshipTypes??[]):e.inclusionModeDefinition?.namedTypeDefinitions&&e.inclusionModeDefinition?.namedTypeDefinitions.size>0?e.inclusionModeDefinition?.namedTypeDefinitions.forEach(((a,s)=>{if(!this._graphTypeLookup.get(s))return i.getLogger(this).warn(`A named type, ${s}, was in the inclusion list that wasn't in the data model and will be removed`),void e.inclusionModeDefinition?.namedTypeDefinitions.delete(s);this._graphTypeLookup.get(s)instanceof R||"strictOrigin"in this._graphTypeLookup.get(s)?t.has(s)||(t.add(s),n.push(this._graphTypeLookup.get(s))):this._graphTypeLookup.get(s)instanceof I||"properties"in this._graphTypeLookup.get(s)?t.has(s)||(t.add(s),o.push(this._graphTypeLookup.get(s))):(i.getLogger(this).warn(`A named type, ${s}, was in the inclusion list that wasn't properly modeled and will be removed`),e.inclusionModeDefinition?.namedTypeDefinitions.delete(s))})):(o=e.knowledgeGraph.dataModel.entityTypes??[],n=e.knowledgeGraph.dataModel.relationshipTypes??[]);const s=new d({knowledgeGraph:e.knowledgeGraph,inclusionModeDefinition:e.inclusionModeDefinition});this.knowledgeGraph=e.knowledgeGraph,this.memberEntityTypes=o,this.memberRelationshipTypes=n,this.dataManager=s}load(e){return this.addResolvingPromise(new Promise((t=>{N(this.url).then((a=>{if(this._initializeLayerProperties({knowledgeGraph:a,inclusionModeDefinition:this._originalInclusionList}),this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.size||(this.dataManager.inclusionModeDefinition={generateAllSublayers:!1,namedTypeDefinitions:new Map},this.dataManager.knowledgeGraph.dataModel.entityTypes?.forEach((e=>{e.name&&this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.set(e.name,{useAllData:!0})})),this.dataManager.knowledgeGraph.dataModel.relationshipTypes?.forEach((e=>{e.name&&this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.set(e.name,{useAllData:!0})}))),this.dataPreloadedInLocalCache)this.loadLayerAssumingLocalCache(),this.dataManager.inclusionModeDefinition&&(this.dataManager.inclusionModeDefinition.generateAllSublayers=!1),this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.forEach((e=>{e.useAllData=!1,e.members?.forEach((e=>{let t;t=e.linkChartLocation instanceof c?e.linkChartLocation:e.linkChartLocation?l(e.linkChartLocation):null,this.linkChartDiagramLookup.set(e.id,t),t&&2===t.coords.length&&0===t.lengths.length?this.linkChartGeohashLookup.set(e.id,r(t.coords[1],t.coords[0],f)):this.linkChartGeohashLookup.set(e.id,"")})),this.addResolvingPromise(this._initializeDiagram().then((async()=>{this.layers.forEach((async e=>{await e.refreshCachedQueryEngine()})),this.tables.forEach((async e=>{await e.refreshCachedQueryEngine()}))})))}));else{const t="GEOGRAPHIC"===this.defaultLinkChartConfig?.layoutMode;this.addResolvingPromise(this.dataManager.refreshCacheContent(void 0,!1,t,!0).then((async()=>{o(e);const t=[],a=[];this.loadLayerAssumingLocalCache(),this.dataManager.inclusionModeDefinition&&(this.dataManager.inclusionModeDefinition.generateAllSublayers=!1,this.dataManager.inclusionModeDefinition.namedTypeDefinitions.forEach((e=>{e.useAllData=!1}))),await this._initializeDiagram(),this.layers.forEach((e=>{a.push(e.refreshCachedQueryEngine()),t.push(new Promise((t=>{e.on("layerview-create",(()=>{t(null)}))})))})),this.tables.forEach((e=>{a.push(e.refreshCachedQueryEngine())})),await Promise.all(a)})))}t(null)}))}))),Promise.resolve(this)}async addRecords(e,t){let a=[];t?.cascadeAddRelationshipEndNodes&&this.dataManager.knowledgeGraph.dataModel&&(a=await k(e,this.dataManager.knowledgeGraph));const i=e.concat(a).filter((e=>!this.sublayerIdsCache.get(e.typeName)?.has(e.id)));await this._handleNewRecords(i)}async removeRecords(e,{cascadeRemoveRelationships:t=!0,recalculateLayout:a=!1}={cascadeRemoveRelationships:!0,recalculateLayout:!1}){let i=[];for(const n of e)!1===this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.get(n.typeName)?.useAllData&&this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.get(n.typeName)?.members?.has(n.id)&&i.push(n);if(t){const e=new Set,t=[];for(const a of i)if(this.dataManager.nodeConnectionsLookup.has(a.id))for(const t of this.dataManager.nodeConnectionsLookup.get(a.id))e.add(t);for(const a of e)this.dataManager.memberIdTypeLookup.has(a)&&t.push({id:a,typeName:this.dataManager.memberIdTypeLookup.get(a)});i=i.concat(t)}this.dataManager.removeFromLayer(i);for(const n of i)this.sublayerIdsCache.get(n.typeName)?.delete(n.id),this.linkChartDiagramLookup.delete(n.id);a&&await this.calculateLinkChartLayout(this._currentLinkChartConfig.layoutMode,{xScaleFactor:this._currentLinkChartConfig.xScaleFactor,yScaleFactor:this._currentLinkChartConfig.xScaleFactor});const o=[];return this.layers.forEach((e=>{o.push(e.refreshCachedQueryEngine())})),await Promise.all(o),this._refreshNamedTypes(),i}async expand(e){const t=await this.dataManager.getConnectedRecordIds(e),a=t.filter((e=>!this.sublayerIdsCache.get(e.typeName)?.has(e.id)));return await this._handleNewRecords(t),{records:a}}loadLayerAssumingLocalCache(){this.memberRelationshipTypes.forEach((e=>{const t=new g({objectType:e,parentCompositeLayer:this,graphType:"relationship",title:e.name});t.geometryType?this.layers.push(t):this.tables.push(t),this.dataManager.sublayerCaches.has(e.name)||this.dataManager.sublayerCaches.set(e.name,new Map)})),this.memberEntityTypes.forEach((e=>{const t=new g({objectType:e,parentCompositeLayer:this,graphType:"entity",title:e.name});t.geometryType?this.layers.push(t):this.tables.push(t),this.dataManager.sublayerCaches.has(e.name)||this.dataManager.sublayerCaches.set(e.name,new Map)})),this.dataManager.inclusionModeDefinition?.namedTypeDefinitions&&this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.forEach(((e,t)=>{const a=S(this.sublayerIdsCache,t,(()=>new Set));e.members?.forEach((e=>{if(a.add(e.id),e.linkChartLocation)if(e.linkChartLocation instanceof c)this.linkChartDiagramLookup.set(e.id,e.linkChartLocation),2===e.linkChartLocation.coords.length&&0===e.linkChartLocation.lengths.length?this.linkChartGeohashLookup.set(e.id,r(e.linkChartLocation.coords[1],e.linkChartLocation.coords[0],f)):this.linkChartGeohashLookup.set(e.id,"");else{const t=l(e.linkChartLocation);this.linkChartDiagramLookup.set(e.id,e.linkChartLocation?t:null),"x"in e.linkChartLocation&&"y"in e.linkChartLocation?this.linkChartGeohashLookup.set(e.id,r(e.linkChartLocation.x,e.linkChartLocation.y,f)):this.linkChartGeohashLookup.set(e.id,"")}}))}))}async calculateLinkChartLayout(e="RADIAL_TREE",t){const o=[],n=[];this.dataManager.sublayerCaches.forEach(((e,t)=>{this.dataManager.entityTypeNames.has(t)?e.forEach((e=>{o.push({typeName:t,feature:e})})):this.dataManager.relationshipTypeNames.has(t)&&e.forEach((e=>{n.push({typeName:t,feature:e})}))})),this.linkChartDiagramLookup=new Map;const s=new Map,h=new Map,c=new Map,d=new Map,g=new Uint8Array(o.length),k=new Float64Array(o.length),C=new Float64Array(o.length),L=new Uint32Array(n.length),N=new Uint32Array(n.length),I=[],R="FORCE_DIRECTED",S=t?.xScaleFactor??1,j=t?.yScaleFactor??1,P=new _({xmin:-1e-7,ymin:-1e-7,xmax:1e-7,ymax:1e-7});let F,z="FORCE_DIRECTED",O=0,U=0;switch(z="GEOGRAPHIC"===e?R:e,z){case"FORCE_DIRECTED":F=E.apply;break;case"COMMUNITY":F=D.apply;break;case"HIERARCHICAL":F=x.apply;break;case"RADIAL_TREE":F=w.apply;break;case"SMART_TREE":F=b.apply;break;default:F=M.apply}o.forEach((({typeName:a,feature:i})=>{if(t?.lockedNodeLocations?.has(i.attributes[p])){"GEOGRAPHIC"===e&&this.dataManager.geographicLookup.has(a)?g[O]=T.IsGeographic:g[O]=T.None;const o=t.lockedNodeLocations.get(i.attributes[p]);k[O]=o.x,C[O]=o.y}else if("GEOGRAPHIC"===e&&this.dataManager.geographicLookup.has(a)){g[O]=T.IsGeographic;let e=null;const t=i.attributes[this.dataManager.geographicLookup.get(a).name],o=this.dataManager.geographicLookup.get(a)?.geometryType;switch(o){case"esriGeometryPoint":k[O]=t?.x,C[O]=t?.y;break;case"esriGeometryPolygon":e=t?.centroid,null!=e?.x&&null!=e?.y?(k[O]=e.x,C[O]=e.y):g[O]=T.IsMovable;break;case"esriGeometryPolyline":case"esriGeometryMultipoint":e=t?.extent?.center,null!=e?.x&&null!=e?.y?(k[O]=e.x,C[O]=e.y):g[O]=T.IsMovable;break;default:g[O]=T.IsMovable}(null==k[O]||null==C[O]||Number.isNaN(k[O])||Number.isNaN(C[O]))&&(g[O]=T.IsMovable,k[O]=0,C[O]=0)}else g[O]=T.IsMovable,k[O]=0,C[O]=0;d.set(i.attributes[p],O),I[O]={feature:i,typeName:a},O++}));let Q=!1;n.forEach((e=>{const t=d.get(e.feature.attributes[u]),a=d.get(e.feature.attributes[y]);void 0!==t&&void 0!==a?(L[U]=t,N[U]=a,U++):(Q=!0,this.linkChartDiagramLookup.set(e.feature.attributes[u],null),this.linkChartGeohashLookup.set(e.feature.attributes[u],null))})),Q&&i.getLogger(this).warn("A relationship is a member of this layer that has either origin or destination entity nodes that are not members. The diagram geometry will be set to null"),await G();if(!F(g,k,C,L,N))throw new a("knowledge-graph:layout-failed","Attempting to arrange the records in the specified layout failed");for(let a=0;a<I.length;a++){if(g[a]===T.IsMovable&&(k[a]=k[a]*S,C[a]=C[a]*j),C[a]>84.9999&&(C[a]=84.9999),C[a]<-84.9999&&(C[a]=-84.9999),k[a]>179.9999&&(k[a]=179.9999),k[a]<-179.9999&&(k[a]=-179.9999),I[a].feature.attributes[m]=new A(k[a],C[a]),s.has(I[a].typeName)){const e=s.get(I[a].typeName);e?.set(I[a].feature.attributes[p],I[a].feature)}else{const e=new Map;e.set(I[a].feature.attributes[p],I[a].feature),s.set(I[a].typeName,e)}c.set(I[a].feature.attributes[p],I[a].feature);const e=l(I[a].feature.attributes[m]);this.linkChartDiagramLookup.set(I[a].feature.attributes[p],I[a].feature.attributes[m]?e:null),this.linkChartGeohashLookup.set(I[a].feature.attributes[p],r(I[a].feature.attributes[m].y,I[a].feature.attributes[m].x,f)),I[a].feature.attributes[m].x<P.xmin&&(P.xmin=I[a].feature.attributes[m].x),I[a].feature.attributes[m].x>P.xmax&&(P.xmax=I[a].feature.attributes[m].x),I[a].feature.attributes[m].y<P.ymin&&(P.ymin=I[a].feature.attributes[m].y),I[a].feature.attributes[m].y>P.ymax&&(P.ymax=I[a].feature.attributes[m].y)}return this.linkChartExtent.xmin=P.xmin,this.linkChartExtent.xmax=P.xmax,this.linkChartExtent.ymin=P.ymin,this.linkChartExtent.ymax=P.ymax,n.forEach((e=>{const t=I[d.get(e.feature.attributes[u])]?.feature.attributes[m],a=I[d.get(e.feature.attributes[y])]?.feature.attributes[m];if(!t||!a)return;const i=new v({paths:[[t.x,t.y],[a.x,a.y]]});if(e.feature.attributes[m]=i,h.has(e.typeName)){const t=h.get(e.typeName);t?.set(e.feature.attributes[p],e.feature)}else{const t=new Map;t.set(e.feature.attributes[p],e.feature),h.set(e.typeName,t)}c.set(e.feature.attributes[p],e.feature);const o=l(e.feature.attributes[m]);this.linkChartDiagramLookup.set(e.feature.attributes[p],e.feature.attributes[m]?o:null),this.linkChartGeohashLookup.set(e.feature.attributes[p],"")})),this._currentLinkChartConfig={layoutMode:e,xScaleFactor:S,yScaleFactor:j},{nodes:s,links:h,idMap:c}}async applyNewLinkChartLayout(e="RADIAL_TREE",t){const a=[];await this.calculateLinkChartLayout(e,t),this.layers.forEach((e=>{a.push(e.refreshCachedQueryEngine())})),await Promise.all(a),this._refreshNamedTypes()}getCurrentNodeLocations(){const e=new Map;return this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.forEach((t=>{t?.members?.forEach((t=>{const a=t.linkChartLocation;let i;const o=t.id;a&&(i="x"in a?{x:a.x,y:a.y}:{x:a.coords[0],y:a.coords[1]},e.set(o,new A({x:i.x,y:i.y})))}))})),e}async synchronizeInclusionListWithCache(){return new Promise((e=>{this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.forEach(((e,t)=>{if(e.useAllData=!1,e.members&&e.members.size>0){if(!this.dataManager.sublayerCaches.get(t))return;const a=new Set(Array.from(this.dataManager.sublayerCaches.get(t).keys()));Array.from(e.members.keys()).filter((e=>!a.has(e))).forEach((t=>{e.members?.delete(t)}))}})),e()}))}async refreshLinkChartCache(e){await this.dataManager.refreshCacheContent(e);const t=[];this.layers.forEach((e=>{t.push(e.refreshCachedQueryEngine())})),await Promise.all(t),this._refreshNamedTypes()}async _handleNewRecords(e){const t=[];this.dataManager.addToLayer(e);for(const a of e)this.sublayerIdsCache.has(a.typeName)||(this.sublayerIdsCache.set(a.typeName,new Set),t.push(a.typeName)),this.sublayerIdsCache.get(a.typeName).add(a.id);for(const a of t)if(this._graphTypeLookup.has(a)){const e=this._graphTypeLookup.get(a),t="endPoints"in e?"relationship":"entity",i=new g({objectType:e,parentCompositeLayer:this,graphType:t,title:a});"entity"===t?this.dataManager.entityTypeNames.add(a):this.dataManager.relationshipTypeNames.add(a),i.geometryType?this.layers.push(i):this.tables.push(i),this.dataManager.sublayerCaches.set(a,new Map)}await this.dataManager.refreshCacheContent(e.map((e=>e.id))),await this.applyNewLinkChartLayout(this._currentLinkChartConfig.layoutMode,{xScaleFactor:this._currentLinkChartConfig.xScaleFactor,yScaleFactor:this._currentLinkChartConfig.xScaleFactor})}async _initializeDiagram(){this.defaultLinkChartConfig?this.defaultLinkChartConfig.doNotRecalculateLayout?(this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.forEach((e=>{e?.members?.forEach((e=>{const t=e.linkChartLocation;let a;const i=e.id;if(!t)return;a="x"in t?{x:t.x,y:t.y}:{x:t.coords[0],y:t.coords[1]};const o=l(a);this.linkChartDiagramLookup.set(i,o),this.linkChartGeohashLookup.set(i,r(a.x,a.y,f)),this.linkChartExtent.xmin>a.x&&(this.linkChartExtent.xmin=a.x),this.linkChartExtent.xmax<a.x&&(this.linkChartExtent.xmax=a.x),this.linkChartExtent.ymin>a.y&&(this.linkChartExtent.ymin=a.y),this.linkChartExtent.ymax<a.y&&(this.linkChartExtent.ymax=a.y)}))})),this.memberRelationshipTypes.forEach((e=>{e.name&&this.dataManager.sublayerCaches.get(e.name)?.forEach((e=>{const t=this.linkChartDiagramLookup.get(e.attributes[u]),a=this.linkChartDiagramLookup.get(e.attributes[y]);if(t&&a){const i=l(new v({paths:[[t.coords[0],t.coords[1]],[a.coords[0],a.coords[1]]]}));this.linkChartDiagramLookup.set(e.attributes[p],i)}else this.linkChartDiagramLookup.set(e.attributes[p],null);this.linkChartGeohashLookup.set(e.attributes[p],"")}))}))):await this.calculateLinkChartLayout(this.defaultLinkChartConfig.layoutMode,{xScaleFactor:this.defaultLinkChartConfig.xScaleFactor,yScaleFactor:this.defaultLinkChartConfig.yScaleFactor,lockedNodeLocations:this.getCurrentNodeLocations()}):await this.calculateLinkChartLayout("RADIAL_TREE",{lockedNodeLocations:this.getCurrentNodeLocations()})}_refreshNamedTypes(){for(const e of this.layers)e.emit("refresh",{dataChanged:!0});for(const e of this.tables)e.emit("refresh",{dataChanged:!0})}};e([n()],j.prototype,"dataPreloadedInLocalCache",void 0),e([n()],j.prototype,"defaultLinkChartConfig",void 0),e([n()],j.prototype,"dataManager",void 0),e([n()],j.prototype,"knowledgeGraph",void 0),e([n()],j.prototype,"layers",void 0),e([n()],j.prototype,"linkChartDiagramLookup",void 0),e([n()],j.prototype,"linkChartExtent",void 0),e([n()],j.prototype,"linkChartGeohashLookup",void 0),e([n()],j.prototype,"memberEntityTypes",void 0),e([n()],j.prototype,"memberRelationshipTypes",void 0),e([n()],j.prototype,"sublayerIdsCache",void 0),e([n()],j.prototype,"tables",void 0),e([n({json:{read:!1}})],j.prototype,"type",void 0),j=e([s("esri.layers.LinkChartLayer")],j);const P=j;export{P as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.28/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../chunks/tslib.es6.js";import
|
|
5
|
+
import{_ as e}from"../chunks/tslib.es6.js";import t from"../core/Error.js";import{JSONMap as r}from"../core/jsonMap.js";import{property as o}from"../core/accessorSupport/decorators/property.js";import{cast as i}from"../core/accessorSupport/decorators/cast.js";import{subclass as a}from"../core/accessorSupport/decorators/subclass.js";import p from"./FeatureLayer.js";import{orientedImageryTypeMap as n,timeIntervalUnitTypeMap as y,getEffectiveElevationSource as s}from"./orientedImagery/core/utils.js";function m(e,t,r){return{name:`orientedImageryProperties.${e}`,write:!t||{target:`orientedImageryProperties.${e}`,writer:t},origins:{service:{name:`orientedImageryInfo.orientedImageryProperties.${e}`,write:t,read:r}}}}let d=class extends p{constructor(){super(...arguments),this.elevationSource=null,this.geometryType="point",this.operationalLayerType="OrientedImageryLayer",this.orientedImageryType=null,this.type="oriented-imagery",this.timeIntervalUnit=null,this.verticalMeasurementUnit=null}get effectiveElevationSource(){const{elevationSource:e,demPathPrefix:t,demPathSuffix:r}=this;return s(e,t,r)}_verifySource(){if(super._verifySource(),"point"!==this.geometryType)throw new t("oriented-imagery-layer:invalid-geometry-type","OrientedImageryLayer only supports point geometry type")}};e([o({type:Number,json:m("cameraHeading")})],d.prototype,"cameraHeading",void 0),e([o({type:Number,json:m("cameraHeight")})],d.prototype,"cameraHeight",void 0),e([o({type:Number,json:m("cameraPitch")})],d.prototype,"cameraPitch",void 0),e([o({type:Number,json:m("cameraRoll")})],d.prototype,"cameraRoll",void 0),e([o({type:Number,json:m("coveragePercent")})],d.prototype,"coveragePercent",void 0),e([o({type:String,json:m("demPathPrefix")})],d.prototype,"demPathPrefix",void 0),e([o({type:String,json:m("demPathSuffix")})],d.prototype,"demPathSuffix",void 0),e([o({type:String,json:m("depthImagePathPrefix")})],d.prototype,"depthImagePathPrefix",void 0),e([o({type:String,json:m("depthImagePathSuffix")})],d.prototype,"depthImagePathSuffix",void 0),e([o({type:Object,json:m("elevationSource")})],d.prototype,"elevationSource",void 0),e([o()],d.prototype,"effectiveElevationSource",null),e([o({type:Number,json:m("farDistance")})],d.prototype,"farDistance",void 0),e([o({json:{write:!0}})],d.prototype,"geometryType",void 0),e([o({type:Number,json:m("horizontalFieldOfView")})],d.prototype,"horizontalFieldOfView",void 0),e([o({type:String,json:m("horizontalMeasurementUnit")})],d.prototype,"horizontalMeasurementUnit",void 0),e([o({type:String,json:m("imagePathPrefix")})],d.prototype,"imagePathPrefix",void 0),e([o({type:String,json:m("imagePathSuffix")})],d.prototype,"imagePathSuffix",void 0),e([o({type:Number,json:m("imageRotation")})],d.prototype,"imageRotation",void 0),e([o({type:Number,json:m("maximumDistance")})],d.prototype,"maximumDistance",void 0),e([o({type:Number,json:m("nearDistance")})],d.prototype,"nearDistance",void 0),e([o({type:["OrientedImageryLayer"]})],d.prototype,"operationalLayerType",void 0),e([o({json:m("orientationAccuracy",((e,t)=>{e&&(t.orientationAccuracy=e.join(","))}))}),i((e=>e?e.trim().split(",").map(Number):null))],d.prototype,"orientationAccuracy",void 0),e([o({json:{...m("orientedImageryType",n.write,n.read),type:n.apiValues}})],d.prototype,"orientedImageryType",void 0),e([o({json:{read:!1},value:"oriented-imagery",readOnly:!0})],d.prototype,"type",void 0),e([o({json:{...m("timeIntervalUnit",y.write,y.read),type:y.apiValues}})],d.prototype,"timeIntervalUnit",void 0),e([o({type:Number,json:m("verticalFieldOfView")})],d.prototype,"verticalFieldOfView",void 0),e([o({json:{...m("verticalMeasurementUnit"),type:new r({Feet:"feet",Meter:"meter"}).apiValues}})],d.prototype,"verticalMeasurementUnit",void 0),e([o({type:String,json:m("videoPathPrefix")})],d.prototype,"videoPathPrefix",void 0),e([o({type:String,json:m("videoPathSuffix")})],d.prototype,"videoPathSuffix",void 0),d=e([a("esri.layers.OrientedImageryLayer")],d);const c=d;export{c as default};
|
package/layers/SceneLayer.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.28/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../chunks/tslib.es6.js";import t from"../Graphic.js";import r from"../PopupTemplate.js";import"../renderers/ClassBreaksRenderer.js";import"../renderers/DictionaryRenderer.js";import"../renderers/DotDensityRenderer.js";import"../renderers/HeatmapRenderer.js";import"../renderers/PieChartRenderer.js";import"../renderers/Renderer.js";import"../renderers/SimpleRenderer.js";import"../renderers/UniqueValueRenderer.js";import"../renderers/support/jsonUtils.js";import{webSceneRendererTypes as i}from"../renderers/support/types.js";import s from"../request.js";import{ClonableMixin as o}from"../core/Clonable.js";import a from"../core/Collection.js";import n from"../core/Error.js";import l from"../core/Logger.js";import{MultiOriginJSONMixin as p}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as d,isAbortError as y}from"../core/promiseUtils.js";import{whenOnce as u}from"../core/reactiveUtils.js";import{join as c}from"../core/urlUtils.js";import{property as h}from"../core/accessorSupport/decorators/property.js";import"../core/accessorSupport/ensureType.js";import"../core/arrayUtils.js";import"../core/has.js";import{getProperties as f}from"../core/accessorSupport/utils.js";import{reader as m}from"../core/accessorSupport/decorators/reader.js";import{subclass as g}from"../core/accessorSupport/decorators/subclass.js";import{OriginId as v}from"../core/accessorSupport/PropertyOrigin.js";import b from"./Layer.js";import{APIKeyMixin as w}from"./mixins/APIKeyMixin.js";import{ArcGISService as I}from"./mixins/ArcGISService.js";import{EditBusLayer as L}from"./mixins/EditBusLayer.js";import{OperationalLayer as j}from"./mixins/OperationalLayer.js";import{PortalLayer as F}from"./mixins/PortalLayer.js";import{ScaleRangeLayer as S}from"./mixins/ScaleRangeLayer.js";import{SceneService as _,SaveOperationType as E}from"./mixins/SceneService.js";import{isHostedAgolService as O}from"./support/arcgisLayerUrl.js";import{findAssociatedFeatureService as A}from"./support/associatedFeatureServiceUtils.js";import{zeroCapabilities as P}from"./support/capabilities.js";import{elevationInfo as T,labelsVisible as D,legendEnabled as U,popupEnabled as x,screenSizePerspectiveEnabled as R}from"./support/commonProperties.js";import{computeEffectiveEditingEnabled as q}from"./support/featureLayerUtils.js";import{FeatureReduction as C}from"./support/FeatureReduction.js";import G from"./support/FeatureReductionSelection.js";import{defineFieldProperties as Q}from"./support/fieldProperties.js";import N from"./support/FieldsIndex.js";import{fixRendererFields as k,unpackFieldNames as V}from"./support/fieldUtils.js";import{I3SNodePageDefinition as K,I3SMaterialDefinition as H,I3STextureSetDefinition as M,I3SGeometryDefinition as $}from"./support/I3SLayerDefinitions.js";import z from"./support/LabelClass.js";import{reader as W}from"./support/labelingInfo.js";import B from"./support/LayerFloorInfo.js";import{layerLookupMap as Z}from"./support/lazyLayerLoader.js";import{RangeInfo as J}from"./support/RangeInfo.js";import X from"./support/SceneFilter.js";import{loadStyleRenderer as Y}from"../renderers/support/styleUtils.js";import ee from"../rest/support/Query.js";import{logInvalidElevationInfoWarning as te,elevationModeUnsupportedMessage as re,featureExpressionUnsupportedMessage as ie}from"../support/elevationInfoUtils.js";import{sceneLayerEditingEnabled as se}from"../support/featureFlags.js";import{createPopupTemplate as oe}from"../support/popupUtils.js";import{queryAttributesFromCachedAttributesId as ae}from"../views/3d/layers/i3s/I3SUtil.js";import{getRequiredFields as ne,getFetchPopupTemplate as le}from"../views/layers/support/popupUtils.js";import{transparencyToOpacity as pe}from"../webdoc/support/opacityUtils.js";const de=["3DObject","Point"],ye=Q();let ue=class extends(L(_(I(j(F(S(p(w(o(b)))))))))){constructor(...e){super(...e),this.featureReduction=null,this.rangeInfos=null,this.operationalLayerType="ArcGISSceneServiceLayer",this.type="scene",this.fields=null,this.floorInfo=null,this.outFields=null,this.nodePages=null,this.materialDefinitions=null,this.textureSetDefinitions=null,this.geometryDefinitions=null,this.serviceUpdateTimeStamp=null,this.excludeObjectIds=new a,this.definitionExpression=null,this.filter=null,this.path=null,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.priority=null,this.semantic=null,this.cachedDrawingInfo={color:!1},this.popupEnabled=!0,this.popupTemplate=null,this.objectIdField=null,this.globalIdField=null,this._fieldUsageInfo={},this.screenSizePerspectiveEnabled=!0,this.serviceItemId=void 0}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){this._set("renderer",null)}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){const r=this.getFeatureType(t?.feature)?.domains?.[e];return r&&"inherited"!==r.type?r:this.getField(e)?.domain??null}getFeatureType(e){return e&&this.associatedLayer?this.associatedLayer.getFeatureType(e):null}get types(){return this.associatedLayer?.types??[]}get typeIdField(){return this.associatedLayer?.typeIdField??null}get templates(){return this.associatedLayer?.templates??null}get formTemplate(){return this.associatedLayer?.formTemplate??null}get fieldsIndex(){return new N(this.fields)}readNodePages(e,t,r){return"Point"===t.layerType&&(e=t.pointNodePages),null==e||"object"!=typeof e?null:K.fromJSON(e,r)}set elevationInfo(e){this._set("elevationInfo",e),this.loaded&&this._validateElevationInfo()}get effectiveCapabilities(){return this._capabilitiesFromAssociatedFeatureLayer(this.associatedLayer?.effectiveCapabilities)}get effectiveEditingEnabled(){return null!=this.associatedLayer&&q(this.associatedLayer)}get geometryType(){return he[this.profile]||"mesh"}set renderer(e){k(e,this.fieldsIndex),this._set("renderer",e)}readCachedDrawingInfo(e){return null!=e&&"object"==typeof e||(e={}),null==e.color&&(e.color=!1),e}get capabilities(){return this._capabilitiesFromAssociatedFeatureLayer(this.associatedLayer?.capabilities)}_capabilitiesFromAssociatedFeatureLayer(e){e=null!=e?e:P;const{query:t,queryRelated:r,editing:{supportsGlobalId:i,supportsRollbackOnFailure:s,supportsUploadWithItemId:o,supportsGeometryUpdate:a,supportsReturnServiceEditsInSourceSpatialReference:n},data:{supportsZ:l,supportsM:p,isVersioned:d,supportsAttachment:y},operations:{supportsEditing:u,supportsAdd:c,supportsUpdate:h,supportsDelete:f,supportsQuery:m,supportsQueryAttachments:g,supportsAsyncConvert3D:v}}=e,b=e.operations.supportsChangeTracking,w=!!this.associatedLayer?.infoFor3D&&se();return{query:t,queryRelated:r,editing:{supportsGlobalId:i,supportsReturnServiceEditsInSourceSpatialReference:n,supportsRollbackOnFailure:s,supportsGeometryUpdate:w&&a,supportsUploadWithItemId:o},data:{supportsAttachment:y,supportsZ:l,supportsM:p,isVersioned:d},operations:{supportsQuery:m,supportsQueryAttachments:g,supportsEditing:u&&b,supportsAdd:w&&c&&b,supportsDelete:w&&f&&b,supportsUpdate:h&&b,supportsAsyncConvert3D:v}}}get editingEnabled(){return this._isOverridden("editingEnabled")?this._get("editingEnabled"):this.associatedLayer?.editingEnabled??!1}set editingEnabled(e){this._overrideIfSome("editingEnabled",e)}get infoFor3D(){return this.associatedLayer?.infoFor3D??null}get relationships(){return this.associatedLayer?.relationships}get defaultPopupTemplate(){return this.associatedLayer||this.attributeStorageInfo?this.createPopupTemplate():null}readObjectIdField(e,t){return!e&&t.fields&&t.fields.some((t=>("esriFieldTypeOID"===t.type&&(e=t.name),!!e))),e||void 0}readGlobalIdField(e,t){return!e&&t.fields&&t.fields.some((t=>("esriFieldTypeGlobalID"===t.type&&(e=t.name),!!e))),e||void 0}get displayField(){return this.associatedLayer?.displayField??null}readProfile(e,t){const r=t.store.profile;return null!=r&&ce[r]?ce[r]:(l.getLogger(this).error("Unknown or missing profile",{profile:r,layer:this}),"mesh-pyramids")}load(e){return this.addResolvingPromise(this._load(e)),Promise.resolve(this)}async _load(e){const t=null!=e?e.signal:null;await this.loadFromPortal({supportedTypes:["Scene Service"]},e).catch(d),await this._fetchService(t),await Promise.all([this._fetchIndexAndUpdateExtent(this.nodePages,t),this._setAssociatedFeatureLayer(t),this._loadFilterGeometries()]),await this._validateElevationInfo(),await this._applyAssociatedLayerOverrides(),await this._populateFieldUsageInfo(),await Y(this,{origin:"service"},t),await k(this.renderer,this.fieldsIndex),await this.finishLoadEditablePortalLayer(e)}async beforeSave(){null!=this.filter&&(this.filter=this.filter.clone(),await this.load())}async _loadFilterGeometries(){if(this.filter)try{await this.filter.loadGeometries(this.spatialReference)}catch(e){l.getLogger(this).error("#_loadFilterGeometries()",this,"Failed to load filter geometries. Geometry filter will not be applied for this layer.",{error:e}),this.filter=null}}createQuery(){const e=new ee;return"mesh"!==this.geometryType&&(e.returnGeometry=!0,e.returnZ=!0),e.where=this.definitionExpression||"1=1",e.sqlFormat="standard",e.outFields=["*"],e}queryExtent(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryExtent(e||this.createQuery(),t)))}queryFeatureCount(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryFeatureCount(e||this.createQuery(),t)))}queryFeatures(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryFeatures(e||this.createQuery(),t))).then((e=>{if(e?.features)for(const t of e.features)t.layer=this,t.sourceLayer=this;return e}))}async queryRelatedFeatures(e,t){if(await this.load(),!this.associatedLayer)throw new n("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});return this.associatedLayer.queryRelatedFeatures(e,t)}async queryRelatedFeaturesCount(e,t){if(await this.load(),!this.associatedLayer)throw new n("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});return this.associatedLayer.queryRelatedFeaturesCount(e,t)}async queryCachedAttributes(e,t){const r=V(this.fieldsIndex,await ne(this,le(this)));return ae(this.parsedUrl.path,this.attributeStorageInfo??[],e,t,r)}async queryCachedFeature(e,r){const i=await this.queryCachedAttributes(e,[r]);if(!i||0===i.length)throw new n("scenelayer:feature-not-in-cached-data","Feature not found in cached data");const s=new t;return s.attributes=i[0],s.layer=this,s.sourceLayer=this,s}queryObjectIds(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryObjectIds(e||this.createQuery(),t)))}queryAttachments(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryAttachments(e,t)))}getFieldUsageInfo(e){const t={supportsLabelingInfo:!1,supportsRenderer:!1,supportsPopupTemplate:!1,supportsLayerQuery:!1};return this.loaded?this._fieldUsageInfo[e]||t:(l.getLogger(this).error("#getFieldUsageInfo()","Unavailable until layer is loaded"),t)}createPopupTemplate(e){return oe(this,e)}_getAssociatedLayerForQuery(){const e=this.associatedLayer;return e?.loaded?Promise.resolve(e):this._loadAssociatedLayerForQuery()}async _loadAssociatedLayerForQuery(){if(await this.load(),!this.associatedLayer)throw new n("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});try{await this.associatedLayer.load()}catch(e){throw new n("scenelayer:query-not-available","SceneLayer associated feature layer could not be loaded",{layer:this,error:e})}return this.associatedLayer}hasCachedStatistics(e){return null!=this.statisticsInfo&&this.statisticsInfo.some((t=>t.name===e))}async queryCachedStatistics(e,t){if(await this.load(t),!this.statisticsInfo)throw new n("scenelayer:no-cached-statistics","Cached statistics are not available for this layer");const r=this.fieldsIndex.get(e);if(!r)throw new n("scenelayer:field-unexisting",`Field '${e}' does not exist on the layer`);for(const i of this.statisticsInfo)if(i.name===r.name){const e=c(this.parsedUrl.path,i.href);return s(e,{query:{f:"json",token:this.apiKey},responseType:"json",signal:t?t.signal:null}).then((e=>e.data))}throw new n("scenelayer:no-cached-statistics","Cached statistics for this attribute are not available")}async saveAs(e,t){return this._debouncedSaveOperations(E.SAVE_AS,{...t,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"scene"},e)}async save(){const e={getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"scene"};return this._debouncedSaveOperations(E.SAVE,e)}async applyEdits(e,t){const{applyEdits:r}=await import("./graphics/editingSupport.js");if(await this.load(),!this.associatedLayer)throw new n(`${this.type}-layer:not-editable`,"Service is not editable");return await this.associatedLayer.load(),r(this,this.associatedLayer.source,e,t)}async uploadAssets(e,t){if(await this.load(),null==this.associatedLayer)throw new n(`${this.type}-layer:not-editable`,"Service is not editable");return await this.associatedLayer.load(),this.associatedLayer.uploadAssets(e,t)}on(e,t){return super.on(e,t)}validateLayer(e){if(e.layerType&&!de.includes(e.layerType))throw new n("scenelayer:layer-type-not-supported","SceneLayer does not support this layer type",{layerType:e.layerType});if(isNaN(this.version.major)||isNaN(this.version.minor))throw new n("layer:service-version-not-supported","Service version is not supported.",{serviceVersion:this.version.versionString,supportedVersions:"1.x, 2.x"});if(this.version.major>2)throw new n("layer:service-version-too-new","Service version is too new.",{serviceVersion:this.version.versionString,supportedVersions:"1.x, 2.x"});function t(e,t){let r=!1,i=!1;if(null==e)r=!0,i=!0;else{const s=t&&t.isGeographic;switch(e){case"east-north-up":case"earth-centered":r=!0,i=s;break;case"vertex-reference-frame":r=!0,i=!s;break;default:r=!1}}if(!r)throw new n("scenelayer:unsupported-normal-reference-frame","Normal reference frame is invalid.");if(!i)throw new n("scenelayer:incompatible-normal-reference-frame","Normal reference frame is incompatible with layer spatial reference.")}t(this.normalReferenceFrame,this.spatialReference)}_getTypeKeywords(){const e=[];if("points"===this.profile)e.push("Point");else{if("mesh-pyramids"!==this.profile)throw new n("scenelayer:unknown-profile","SceneLayer:save() encountered an unknown SceneLayer profile: "+this.profile);e.push("3DObject")}return e}_populateFieldUsageInfo(){if(this._fieldUsageInfo={},this.fields)for(const e of this.fields){const t=!(!this.attributeStorageInfo||!this.attributeStorageInfo.some((t=>t.name===e.name))),r=!!this.associatedLayer?.fields?.some((t=>t&&e.name===t.name)),i={supportsLabelingInfo:t,supportsRenderer:t,supportsPopupTemplate:t||r,supportsLayerQuery:r};this._fieldUsageInfo[e.name]=i}}_applyAssociatedLayerOverrides(){this._applyAssociatedLayerFieldsOverrides(),this._applyAssociatedLayerPopupOverrides(),this._applyAssociatedLayerExtentOverride(),this._applyAssociatedLayerPrivileges()}_applyAssociatedLayerFieldsOverrides(){if(!this.associatedLayer?.fields)return;let e=null;for(const t of this.associatedLayer.fields){const r=this.getField(t.name);r?(!r.domain&&t.domain&&(r.domain=t.domain.clone()),r.editable=t.editable,r.nullable=t.nullable,r.length=t.length):(e||(e=this.fields?this.fields.slice():[]),e.push(t.clone()))}e&&this._set("fields",e)}_applyAssociatedLayerPopupOverrides(){if(!this.associatedLayer)return;const e=["popupTemplate","popupEnabled"],t=f(this);for(let r=0;r<e.length;r++){const i=e[r],s=this.originIdOf(i),o=this.associatedLayer.originIdOf(i);s<o&&(o===v.SERVICE||o===v.PORTAL_ITEM)&&t.setAtOrigin(i,this.associatedLayer[i],o)}}_applyAssociatedLayerExtentOverride(){const e=this.associatedLayer?.editingInfo?.lastEditDate,t=this.associatedLayer?.serverGens,r=this.associatedLayer?.getAtOrigin("fullExtent","service");if(!se()||null==this.associatedLayer?.infoFor3D||!r||!O(this.associatedLayer?.url)||!e||this.serviceUpdateTimeStamp?.lastUpdate===e.getTime()||!this.serviceUpdateTimeStamp&&t?.minServerGen===t?.serverGen)return;f(this).setAtOrigin("fullExtent",r.clone(),v.SERVICE)}_applyAssociatedLayerPrivileges(){const e=this.associatedLayer;e&&(this._set("userHasEditingPrivileges",e.userHasEditingPrivileges),this._set("userHasFullEditingPrivileges",e.userHasFullEditingPrivileges),this._set("userHasUpdateItemPrivileges",e.userHasUpdateItemPrivileges))}async _setAssociatedFeatureLayer(e){if(["mesh-pyramids","points"].includes(this.profile))try{const{serverUrl:t,layerId:r,portalItem:i}=await A(`${this.url}/layers/${this.layerId}`,{sceneLayerItem:this.portalItem,apiKey:this.apiKey,signal:e}),s=await Z.FeatureLayer();this.associatedLayer=new s({url:t,layerId:r,portalItem:i}),await this.associatedLayer.load()}catch(t){y(t)||this._logWarningOnPopupEnabled()}}async _logWarningOnPopupEnabled(){await u((()=>this.popupEnabled&&null!=this.popupTemplate));const e=`this SceneLayer: ${this.title}`;null==this.attributeStorageInfo?l.getLogger(this).warn(`Associated FeatureLayer could not be loaded and no binary attributes found. Popups will not work on ${e}`):l.getLogger(this).info(`Associated FeatureLayer could not be loaded. Falling back to binary attributes for Popups on ${e}`)}_validateElevationInfo(){const e=this.elevationInfo;"mesh-pyramids"===this.profile&&te(l.getLogger(this),re("Mesh scene layers","relative-to-scene",e)),te(l.getLogger(this),ie("Scene layers",e))}};e([h({types:{key:"type",base:C,typeMap:{selection:G}},json:{origins:{"web-scene":{name:"layerDefinition.featureReduction",write:!0},"portal-item":{name:"layerDefinition.featureReduction",write:!0}}}})],ue.prototype,"featureReduction",void 0),e([h({type:[J],json:{read:!1,origins:{"web-scene":{name:"layerDefinition.rangeInfos",write:!0},"portal-item":{name:"layerDefinition.rangeInfos",write:!0}}}})],ue.prototype,"rangeInfos",void 0),e([h({json:{read:!1}})],ue.prototype,"associatedLayer",void 0),e([h({type:["show","hide"]})],ue.prototype,"listMode",void 0),e([h({type:["ArcGISSceneServiceLayer"]})],ue.prototype,"operationalLayerType",void 0),e([h({json:{read:!1},readOnly:!0})],ue.prototype,"type",void 0),e([h({...ye.fields,readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],ue.prototype,"fields",void 0),e([h()],ue.prototype,"types",null),e([h()],ue.prototype,"typeIdField",null),e([h()],ue.prototype,"templates",null),e([h()],ue.prototype,"formTemplate",null),e([h({readOnly:!0})],ue.prototype,"fieldsIndex",null),e([h({type:B,json:{read:{source:"layerDefinition.floorInfo"},write:{target:"layerDefinition.floorInfo"}}})],ue.prototype,"floorInfo",void 0),e([h(ye.outFields)],ue.prototype,"outFields",void 0),e([h({type:K,readOnly:!0,json:{read:!1}})],ue.prototype,"nodePages",void 0),e([m("service","nodePages",["nodePages","pointNodePages"])],ue.prototype,"readNodePages",null),e([h({type:[H],readOnly:!0})],ue.prototype,"materialDefinitions",void 0),e([h({type:[M],readOnly:!0})],ue.prototype,"textureSetDefinitions",void 0),e([h({type:[$],readOnly:!0})],ue.prototype,"geometryDefinitions",void 0),e([h({readOnly:!0})],ue.prototype,"serviceUpdateTimeStamp",void 0),e([h({readOnly:!0})],ue.prototype,"attributeStorageInfo",void 0),e([h({readOnly:!0})],ue.prototype,"statisticsInfo",void 0),e([h({type:a.ofType(Number),nonNullable:!0,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.excludeObjectIds",write:{enabled:!0}}})],ue.prototype,"excludeObjectIds",void 0),e([h({type:String,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],ue.prototype,"definitionExpression",void 0),e([h({type:X,json:{name:"layerDefinition.polygonFilter",write:{enabled:!0,allowNull:!0},origins:{service:{read:!1,write:!1}}}})],ue.prototype,"filter",void 0),e([h({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],ue.prototype,"path",void 0),e([h(T)],ue.prototype,"elevationInfo",null),e([h({readOnly:!0,json:{read:!1}})],ue.prototype,"effectiveCapabilities",null),e([h({readOnly:!0})],ue.prototype,"effectiveEditingEnabled",null),e([h({type:String})],ue.prototype,"geometryType",null),e([h(D)],ue.prototype,"labelsVisible",void 0),e([h({type:[z],json:{origins:{service:{name:"drawingInfo.labelingInfo",read:{reader:W},write:!1}},name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:W},write:!0}})],ue.prototype,"labelingInfo",void 0),e([h(U)],ue.prototype,"legendEnabled",void 0),e([h({type:Number,json:{origins:{"web-document":{default:1,write:{enabled:!0,target:{opacity:{type:Number},"layerDefinition.drawingInfo.transparency":{type:Number}}},read:{source:["opacity","layerDefinition.drawingInfo.transparency"],reader(e,t){if("number"==typeof e&&e>=0&&e<=1)return e;const r=t.layerDefinition?.drawingInfo?.transparency;return void 0!==r?pe(r):void 0}}},"portal-item":{write:!0},service:{read:!1}}}})],ue.prototype,"opacity",void 0),e([h({type:["Low","High"],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],ue.prototype,"priority",void 0),e([h({type:["Labels"],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],ue.prototype,"semantic",void 0),e([h({types:i,json:{origins:{service:{read:{source:"drawingInfo.renderer"}}},name:"layerDefinition.drawingInfo.renderer",write:!0},value:null})],ue.prototype,"renderer",null),e([h({json:{read:!1}})],ue.prototype,"cachedDrawingInfo",void 0),e([m("service","cachedDrawingInfo")],ue.prototype,"readCachedDrawingInfo",null),e([h({readOnly:!0,json:{read:!1}})],ue.prototype,"capabilities",null),e([h({type:Boolean,json:{read:!1}})],ue.prototype,"editingEnabled",null),e([h({readOnly:!0,json:{write:!1,read:!1}})],ue.prototype,"infoFor3D",null),e([h({readOnly:!0,json:{write:!1,read:!1}})],ue.prototype,"relationships",null),e([h(x)],ue.prototype,"popupEnabled",void 0),e([h({type:r,json:{name:"popupInfo",write:!0}})],ue.prototype,"popupTemplate",void 0),e([h({readOnly:!0,json:{read:!1}})],ue.prototype,"defaultPopupTemplate",null),e([h({type:String,json:{read:!1}})],ue.prototype,"objectIdField",void 0),e([m("service","objectIdField",["objectIdField","fields"])],ue.prototype,"readObjectIdField",null),e([h({type:String,json:{read:!1}})],ue.prototype,"globalIdField",void 0),e([m("service","globalIdField",["globalIdField","fields"])],ue.prototype,"readGlobalIdField",null),e([h({readOnly:!0,type:String,json:{read:!1}})],ue.prototype,"displayField",null),e([h({type:String,json:{read:!1}})],ue.prototype,"profile",void 0),e([m("service","profile",["store.profile"])],ue.prototype,"readProfile",null),e([h({readOnly:!0,type:String,json:{origins:{service:{read:{source:"store.normalReferenceFrame"}}},read:!1}})],ue.prototype,"normalReferenceFrame",void 0),e([h(R)],ue.prototype,"screenSizePerspectiveEnabled",void 0),e([h({json:{read:!1,origins:{service:{read:!0}}}})],ue.prototype,"serviceItemId",void 0),ue=e([g("esri.layers.SceneLayer")],ue);const ce={"mesh-pyramids":"mesh-pyramids",meshpyramids:"mesh-pyramids","features-meshes":"mesh-pyramids",points:"points","features-points":"points",lines:"lines","features-lines":"lines",polygons:"polygons","features-polygons":"polygons"},he={"mesh-pyramids":"mesh",points:"point",lines:"polyline",polygons:"polygon"},fe=ue;export{fe as default};
|
|
5
|
+
import{_ as e}from"../chunks/tslib.es6.js";import t from"../Graphic.js";import r from"../PopupTemplate.js";import"../renderers/ClassBreaksRenderer.js";import"../renderers/DictionaryRenderer.js";import"../renderers/DotDensityRenderer.js";import"../renderers/HeatmapRenderer.js";import"../renderers/PieChartRenderer.js";import"../renderers/Renderer.js";import"../renderers/SimpleRenderer.js";import"../renderers/UniqueValueRenderer.js";import"../renderers/support/jsonUtils.js";import{webSceneRendererTypes as i}from"../renderers/support/types.js";import s from"../request.js";import{ClonableMixin as o}from"../core/Clonable.js";import a from"../core/Collection.js";import n from"../core/Error.js";import l from"../core/Logger.js";import{MultiOriginJSONMixin as p}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as d,isAbortError as y}from"../core/promiseUtils.js";import{whenOnce as u}from"../core/reactiveUtils.js";import{join as c}from"../core/urlUtils.js";import{property as h}from"../core/accessorSupport/decorators/property.js";import"../core/accessorSupport/ensureType.js";import"../core/arrayUtils.js";import"../core/has.js";import{getProperties as f}from"../core/accessorSupport/utils.js";import{reader as m}from"../core/accessorSupport/decorators/reader.js";import{subclass as g}from"../core/accessorSupport/decorators/subclass.js";import{OriginId as v}from"../core/accessorSupport/PropertyOrigin.js";import b from"./Layer.js";import{APIKeyMixin as w}from"./mixins/APIKeyMixin.js";import{ArcGISService as I}from"./mixins/ArcGISService.js";import{EditBusLayer as L}from"./mixins/EditBusLayer.js";import{OperationalLayer as j}from"./mixins/OperationalLayer.js";import{PortalLayer as F}from"./mixins/PortalLayer.js";import{ScaleRangeLayer as S}from"./mixins/ScaleRangeLayer.js";import{SceneService as _,SaveOperationType as E}from"./mixins/SceneService.js";import{isHostedAgolService as O}from"./support/arcgisLayerUrl.js";import{findAssociatedFeatureService as A}from"./support/associatedFeatureServiceUtils.js";import{zeroCapabilities as P}from"./support/capabilities.js";import{elevationInfo as T,labelsVisible as D,legendEnabled as U,popupEnabled as x,screenSizePerspectiveEnabled as R}from"./support/commonProperties.js";import{computeEffectiveEditingEnabled as q}from"./support/featureLayerUtils.js";import{FeatureReduction as C}from"./support/FeatureReduction.js";import G from"./support/FeatureReductionSelection.js";import{defineFieldProperties as Q}from"./support/fieldProperties.js";import N from"./support/FieldsIndex.js";import{fixRendererFields as k,unpackFieldNames as V}from"./support/fieldUtils.js";import{I3SNodePageDefinition as K,I3SMaterialDefinition as H,I3STextureSetDefinition as M,I3SGeometryDefinition as $}from"./support/I3SLayerDefinitions.js";import z from"./support/LabelClass.js";import{reader as W}from"./support/labelingInfo.js";import B from"./support/LayerFloorInfo.js";import{layerLookupMap as Z}from"./support/lazyLayerLoader.js";import{RangeInfo as J}from"./support/RangeInfo.js";import X from"./support/SceneFilter.js";import{loadStyleRenderer as Y}from"../renderers/support/styleUtils.js";import ee from"../rest/support/Query.js";import{logInvalidElevationInfoWarning as te,elevationModeUnsupportedMessage as re,featureExpressionUnsupportedMessage as ie}from"../support/elevationInfoUtils.js";import{sceneLayerEditingEnabled as se}from"../support/featureFlags.js";import{createPopupTemplate as oe}from"../support/popupUtils.js";import{queryAttributesFromCachedAttributesId as ae}from"../views/3d/layers/i3s/I3SUtil.js";import{getRequiredFields as ne,getFetchPopupTemplate as le}from"../views/layers/support/popupUtils.js";import{transparencyToOpacity as pe}from"../webdoc/support/opacityUtils.js";const de=new Set(["3DObject","Point"]),ye=Q();let ue=class extends(L(_(I(j(F(S(p(w(o(b)))))))))){constructor(...e){super(...e),this.featureReduction=null,this.rangeInfos=null,this.operationalLayerType="ArcGISSceneServiceLayer",this.type="scene",this.fields=null,this.floorInfo=null,this.outFields=null,this.nodePages=null,this.materialDefinitions=null,this.textureSetDefinitions=null,this.geometryDefinitions=null,this.serviceUpdateTimeStamp=null,this.excludeObjectIds=new a,this.definitionExpression=null,this.filter=null,this.path=null,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.priority=null,this.semantic=null,this.cachedDrawingInfo={color:!1},this.popupEnabled=!0,this.popupTemplate=null,this.objectIdField=null,this.globalIdField=null,this._fieldUsageInfo={},this.screenSizePerspectiveEnabled=!0,this.serviceItemId=void 0}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){this._set("renderer",null)}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){const r=this.getFeatureType(t?.feature)?.domains?.[e];return r&&"inherited"!==r.type?r:this.getField(e)?.domain??null}getFeatureType(e){return e&&this.associatedLayer?this.associatedLayer.getFeatureType(e):null}get types(){return this.associatedLayer?.types??[]}get typeIdField(){return this.associatedLayer?.typeIdField??null}get templates(){return this.associatedLayer?.templates??null}get formTemplate(){return this.associatedLayer?.formTemplate??null}get fieldsIndex(){return new N(this.fields)}readNodePages(e,t,r){return"Point"===t.layerType&&(e=t.pointNodePages),null==e||"object"!=typeof e?null:K.fromJSON(e,r)}set elevationInfo(e){this._set("elevationInfo",e),this.loaded&&this._validateElevationInfo()}get effectiveCapabilities(){return this._capabilitiesFromAssociatedFeatureLayer(this.associatedLayer?.effectiveCapabilities)}get effectiveEditingEnabled(){return null!=this.associatedLayer&&q(this.associatedLayer)}get geometryType(){return he[this.profile]||"mesh"}set renderer(e){k(e,this.fieldsIndex),this._set("renderer",e)}readCachedDrawingInfo(e){return null!=e&&"object"==typeof e||(e={}),null==e.color&&(e.color=!1),e}get capabilities(){return this._capabilitiesFromAssociatedFeatureLayer(this.associatedLayer?.capabilities)}_capabilitiesFromAssociatedFeatureLayer(e){e=null!=e?e:P;const{query:t,queryRelated:r,editing:{supportsGlobalId:i,supportsRollbackOnFailure:s,supportsUploadWithItemId:o,supportsGeometryUpdate:a,supportsReturnServiceEditsInSourceSpatialReference:n},data:{supportsZ:l,supportsM:p,isVersioned:d,supportsAttachment:y},operations:{supportsEditing:u,supportsAdd:c,supportsUpdate:h,supportsDelete:f,supportsQuery:m,supportsQueryAttachments:g,supportsAsyncConvert3D:v}}=e,b=e.operations.supportsChangeTracking,w=!!this.associatedLayer?.infoFor3D&&se();return{query:t,queryRelated:r,editing:{supportsGlobalId:i,supportsReturnServiceEditsInSourceSpatialReference:n,supportsRollbackOnFailure:s,supportsGeometryUpdate:w&&a,supportsUploadWithItemId:o},data:{supportsAttachment:y,supportsZ:l,supportsM:p,isVersioned:d},operations:{supportsQuery:m,supportsQueryAttachments:g,supportsEditing:u&&b,supportsAdd:w&&c&&b,supportsDelete:w&&f&&b,supportsUpdate:h&&b,supportsAsyncConvert3D:v}}}get editingEnabled(){return this._isOverridden("editingEnabled")?this._get("editingEnabled"):this.associatedLayer?.editingEnabled??!1}set editingEnabled(e){this._overrideIfSome("editingEnabled",e)}get infoFor3D(){return this.associatedLayer?.infoFor3D??null}get relationships(){return this.associatedLayer?.relationships}get defaultPopupTemplate(){return this.associatedLayer||this.attributeStorageInfo?this.createPopupTemplate():null}readObjectIdField(e,t){return!e&&t.fields&&t.fields.some((t=>("esriFieldTypeOID"===t.type&&(e=t.name),!!e))),e||void 0}readGlobalIdField(e,t){return!e&&t.fields&&t.fields.some((t=>("esriFieldTypeGlobalID"===t.type&&(e=t.name),!!e))),e||void 0}get displayField(){return this.associatedLayer?.displayField??null}readProfile(e,t){const r=t.store.profile;return null!=r&&ce[r]?ce[r]:(l.getLogger(this).error("Unknown or missing profile",{profile:r,layer:this}),"mesh-pyramids")}load(e){return this.addResolvingPromise(this._load(e)),Promise.resolve(this)}async _load(e){const t=null!=e?e.signal:null;await this.loadFromPortal({supportedTypes:["Scene Service"]},e).catch(d),await this._fetchService(t),await Promise.all([this._fetchIndexAndUpdateExtent(this.nodePages,t),this._setAssociatedFeatureLayer(t),this._loadFilterGeometries()]),await this._validateElevationInfo(),await this._applyAssociatedLayerOverrides(),await this._populateFieldUsageInfo(),await Y(this,{origin:"service"},t),await k(this.renderer,this.fieldsIndex),await this.finishLoadEditablePortalLayer(e)}async beforeSave(){null!=this.filter&&(this.filter=this.filter.clone(),await this.load())}async _loadFilterGeometries(){if(this.filter)try{await this.filter.loadGeometries(this.spatialReference)}catch(e){l.getLogger(this).error("#_loadFilterGeometries()",this,"Failed to load filter geometries. Geometry filter will not be applied for this layer.",{error:e}),this.filter=null}}createQuery(){const e=new ee;return"mesh"!==this.geometryType&&(e.returnGeometry=!0,e.returnZ=!0),e.where=this.definitionExpression||"1=1",e.sqlFormat="standard",e.outFields=["*"],e}queryExtent(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryExtent(e||this.createQuery(),t)))}queryFeatureCount(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryFeatureCount(e||this.createQuery(),t)))}queryFeatures(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryFeatures(e||this.createQuery(),t))).then((e=>{if(e?.features)for(const t of e.features)t.layer=this,t.sourceLayer=this;return e}))}async queryRelatedFeatures(e,t){if(await this.load(),!this.associatedLayer)throw new n("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});return this.associatedLayer.queryRelatedFeatures(e,t)}async queryRelatedFeaturesCount(e,t){if(await this.load(),!this.associatedLayer)throw new n("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});return this.associatedLayer.queryRelatedFeaturesCount(e,t)}async queryCachedAttributes(e,t){const r=V(this.fieldsIndex,await ne(this,le(this)));return ae(this.parsedUrl.path,this.attributeStorageInfo??[],e,t,r)}async queryCachedFeature(e,r){const i=await this.queryCachedAttributes(e,[r]);if(!i||0===i.length)throw new n("scenelayer:feature-not-in-cached-data","Feature not found in cached data");const s=new t;return s.attributes=i[0],s.layer=this,s.sourceLayer=this,s}queryObjectIds(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryObjectIds(e||this.createQuery(),t)))}queryAttachments(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryAttachments(e,t)))}getFieldUsageInfo(e){const t={supportsLabelingInfo:!1,supportsRenderer:!1,supportsPopupTemplate:!1,supportsLayerQuery:!1};return this.loaded?this._fieldUsageInfo[e]||t:(l.getLogger(this).error("#getFieldUsageInfo()","Unavailable until layer is loaded"),t)}createPopupTemplate(e){return oe(this,e)}_getAssociatedLayerForQuery(){const e=this.associatedLayer;return e?.loaded?Promise.resolve(e):this._loadAssociatedLayerForQuery()}async _loadAssociatedLayerForQuery(){if(await this.load(),!this.associatedLayer)throw new n("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});try{await this.associatedLayer.load()}catch(e){throw new n("scenelayer:query-not-available","SceneLayer associated feature layer could not be loaded",{layer:this,error:e})}return this.associatedLayer}hasCachedStatistics(e){return null!=this.statisticsInfo&&this.statisticsInfo.some((t=>t.name===e))}async queryCachedStatistics(e,t){if(await this.load(t),!this.statisticsInfo)throw new n("scenelayer:no-cached-statistics","Cached statistics are not available for this layer");const r=this.fieldsIndex.get(e);if(!r)throw new n("scenelayer:field-unexisting",`Field '${e}' does not exist on the layer`);for(const i of this.statisticsInfo)if(i.name===r.name){const e=c(this.parsedUrl.path,i.href);return s(e,{query:{f:"json",token:this.apiKey},responseType:"json",signal:t?t.signal:null}).then((e=>e.data))}throw new n("scenelayer:no-cached-statistics","Cached statistics for this attribute are not available")}async saveAs(e,t){return this._debouncedSaveOperations(E.SAVE_AS,{...t,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"scene"},e)}async save(){const e={getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"scene"};return this._debouncedSaveOperations(E.SAVE,e)}async applyEdits(e,t){const{applyEdits:r}=await import("./graphics/editingSupport.js");if(await this.load(),!this.associatedLayer)throw new n(`${this.type}-layer:not-editable`,"Service is not editable");return await this.associatedLayer.load(),r(this,this.associatedLayer.source,e,t)}async uploadAssets(e,t){if(await this.load(),null==this.associatedLayer)throw new n(`${this.type}-layer:not-editable`,"Service is not editable");return await this.associatedLayer.load(),this.associatedLayer.uploadAssets(e,t)}on(e,t){return super.on(e,t)}validateLayer(e){if(e.layerType&&!de.has(e.layerType))throw new n("scenelayer:layer-type-not-supported","SceneLayer does not support this layer type",{layerType:e.layerType});if(isNaN(this.version.major)||isNaN(this.version.minor))throw new n("layer:service-version-not-supported","Service version is not supported.",{serviceVersion:this.version.versionString,supportedVersions:"1.x, 2.x"});if(this.version.major>2)throw new n("layer:service-version-too-new","Service version is too new.",{serviceVersion:this.version.versionString,supportedVersions:"1.x, 2.x"});function t(e,t){let r=!1,i=!1;if(null==e)r=!0,i=!0;else{const s=t&&t.isGeographic;switch(e){case"east-north-up":case"earth-centered":r=!0,i=s;break;case"vertex-reference-frame":r=!0,i=!s;break;default:r=!1}}if(!r)throw new n("scenelayer:unsupported-normal-reference-frame","Normal reference frame is invalid.");if(!i)throw new n("scenelayer:incompatible-normal-reference-frame","Normal reference frame is incompatible with layer spatial reference.")}t(this.normalReferenceFrame,this.spatialReference)}_getTypeKeywords(){const e=[];if("points"===this.profile)e.push("Point");else{if("mesh-pyramids"!==this.profile)throw new n("scenelayer:unknown-profile","SceneLayer:save() encountered an unknown SceneLayer profile: "+this.profile);e.push("3DObject")}return e}_populateFieldUsageInfo(){if(this._fieldUsageInfo={},this.fields)for(const e of this.fields){const t=!(!this.attributeStorageInfo||!this.attributeStorageInfo.some((t=>t.name===e.name))),r=!!this.associatedLayer?.fields?.some((t=>t&&e.name===t.name)),i={supportsLabelingInfo:t,supportsRenderer:t,supportsPopupTemplate:t||r,supportsLayerQuery:r};this._fieldUsageInfo[e.name]=i}}_applyAssociatedLayerOverrides(){this._applyAssociatedLayerFieldsOverrides(),this._applyAssociatedLayerPopupOverrides(),this._applyAssociatedLayerExtentOverride(),this._applyAssociatedLayerPrivileges()}_applyAssociatedLayerFieldsOverrides(){if(!this.associatedLayer?.fields)return;let e=null;for(const t of this.associatedLayer.fields){const r=this.getField(t.name);r?(!r.domain&&t.domain&&(r.domain=t.domain.clone()),r.editable=t.editable,r.nullable=t.nullable,r.length=t.length):(e||(e=this.fields?this.fields.slice():[]),e.push(t.clone()))}e&&this._set("fields",e)}_applyAssociatedLayerPopupOverrides(){if(!this.associatedLayer)return;const e=["popupTemplate","popupEnabled"],t=f(this);for(let r=0;r<e.length;r++){const i=e[r],s=this.originIdOf(i),o=this.associatedLayer.originIdOf(i);s<o&&(o===v.SERVICE||o===v.PORTAL_ITEM)&&t.setAtOrigin(i,this.associatedLayer[i],o)}}_applyAssociatedLayerExtentOverride(){const e=this.associatedLayer?.editingInfo?.lastEditDate,t=this.associatedLayer?.serverGens,r=this.associatedLayer?.getAtOrigin("fullExtent","service");if(!se()||null==this.associatedLayer?.infoFor3D||!r||!O(this.associatedLayer?.url)||!e||this.serviceUpdateTimeStamp?.lastUpdate===e.getTime()||!this.serviceUpdateTimeStamp&&t?.minServerGen===t?.serverGen)return;f(this).setAtOrigin("fullExtent",r.clone(),v.SERVICE)}_applyAssociatedLayerPrivileges(){const e=this.associatedLayer;e&&(this._set("userHasEditingPrivileges",e.userHasEditingPrivileges),this._set("userHasFullEditingPrivileges",e.userHasFullEditingPrivileges),this._set("userHasUpdateItemPrivileges",e.userHasUpdateItemPrivileges))}async _setAssociatedFeatureLayer(e){if(["mesh-pyramids","points"].includes(this.profile))try{const{serverUrl:t,layerId:r,portalItem:i}=await A(`${this.url}/layers/${this.layerId}`,{sceneLayerItem:this.portalItem,apiKey:this.apiKey,signal:e}),s=await Z.FeatureLayer();this.associatedLayer=new s({url:t,layerId:r,portalItem:i}),await this.associatedLayer.load()}catch(t){y(t)||this._logWarningOnPopupEnabled()}}async _logWarningOnPopupEnabled(){await u((()=>this.popupEnabled&&null!=this.popupTemplate));const e=`this SceneLayer: ${this.title}`;null==this.attributeStorageInfo?l.getLogger(this).warn(`Associated FeatureLayer could not be loaded and no binary attributes found. Popups will not work on ${e}`):l.getLogger(this).info(`Associated FeatureLayer could not be loaded. Falling back to binary attributes for Popups on ${e}`)}_validateElevationInfo(){const e=this.elevationInfo;"mesh-pyramids"===this.profile&&te(l.getLogger(this),re("Mesh scene layers","relative-to-scene",e)),te(l.getLogger(this),ie("Scene layers",e))}};e([h({types:{key:"type",base:C,typeMap:{selection:G}},json:{origins:{"web-scene":{name:"layerDefinition.featureReduction",write:!0},"portal-item":{name:"layerDefinition.featureReduction",write:!0}}}})],ue.prototype,"featureReduction",void 0),e([h({type:[J],json:{read:!1,origins:{"web-scene":{name:"layerDefinition.rangeInfos",write:!0},"portal-item":{name:"layerDefinition.rangeInfos",write:!0}}}})],ue.prototype,"rangeInfos",void 0),e([h({json:{read:!1}})],ue.prototype,"associatedLayer",void 0),e([h({type:["show","hide"]})],ue.prototype,"listMode",void 0),e([h({type:["ArcGISSceneServiceLayer"]})],ue.prototype,"operationalLayerType",void 0),e([h({json:{read:!1},readOnly:!0})],ue.prototype,"type",void 0),e([h({...ye.fields,readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],ue.prototype,"fields",void 0),e([h()],ue.prototype,"types",null),e([h()],ue.prototype,"typeIdField",null),e([h()],ue.prototype,"templates",null),e([h()],ue.prototype,"formTemplate",null),e([h({readOnly:!0})],ue.prototype,"fieldsIndex",null),e([h({type:B,json:{read:{source:"layerDefinition.floorInfo"},write:{target:"layerDefinition.floorInfo"}}})],ue.prototype,"floorInfo",void 0),e([h(ye.outFields)],ue.prototype,"outFields",void 0),e([h({type:K,readOnly:!0,json:{read:!1}})],ue.prototype,"nodePages",void 0),e([m("service","nodePages",["nodePages","pointNodePages"])],ue.prototype,"readNodePages",null),e([h({type:[H],readOnly:!0})],ue.prototype,"materialDefinitions",void 0),e([h({type:[M],readOnly:!0})],ue.prototype,"textureSetDefinitions",void 0),e([h({type:[$],readOnly:!0})],ue.prototype,"geometryDefinitions",void 0),e([h({readOnly:!0})],ue.prototype,"serviceUpdateTimeStamp",void 0),e([h({readOnly:!0})],ue.prototype,"attributeStorageInfo",void 0),e([h({readOnly:!0})],ue.prototype,"statisticsInfo",void 0),e([h({type:a.ofType(Number),nonNullable:!0,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.excludeObjectIds",write:{enabled:!0}}})],ue.prototype,"excludeObjectIds",void 0),e([h({type:String,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],ue.prototype,"definitionExpression",void 0),e([h({type:X,json:{name:"layerDefinition.polygonFilter",write:{enabled:!0,allowNull:!0},origins:{service:{read:!1,write:!1}}}})],ue.prototype,"filter",void 0),e([h({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],ue.prototype,"path",void 0),e([h(T)],ue.prototype,"elevationInfo",null),e([h({readOnly:!0,json:{read:!1}})],ue.prototype,"effectiveCapabilities",null),e([h({readOnly:!0})],ue.prototype,"effectiveEditingEnabled",null),e([h({type:String})],ue.prototype,"geometryType",null),e([h(D)],ue.prototype,"labelsVisible",void 0),e([h({type:[z],json:{origins:{service:{name:"drawingInfo.labelingInfo",read:{reader:W},write:!1}},name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:W},write:!0}})],ue.prototype,"labelingInfo",void 0),e([h(U)],ue.prototype,"legendEnabled",void 0),e([h({type:Number,json:{origins:{"web-document":{default:1,write:{enabled:!0,target:{opacity:{type:Number},"layerDefinition.drawingInfo.transparency":{type:Number}}},read:{source:["opacity","layerDefinition.drawingInfo.transparency"],reader(e,t){if("number"==typeof e&&e>=0&&e<=1)return e;const r=t.layerDefinition?.drawingInfo?.transparency;return void 0!==r?pe(r):void 0}}},"portal-item":{write:!0},service:{read:!1}}}})],ue.prototype,"opacity",void 0),e([h({type:["Low","High"],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],ue.prototype,"priority",void 0),e([h({type:["Labels"],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],ue.prototype,"semantic",void 0),e([h({types:i,json:{origins:{service:{read:{source:"drawingInfo.renderer"}}},name:"layerDefinition.drawingInfo.renderer",write:!0},value:null})],ue.prototype,"renderer",null),e([h({json:{read:!1}})],ue.prototype,"cachedDrawingInfo",void 0),e([m("service","cachedDrawingInfo")],ue.prototype,"readCachedDrawingInfo",null),e([h({readOnly:!0,json:{read:!1}})],ue.prototype,"capabilities",null),e([h({type:Boolean,json:{read:!1}})],ue.prototype,"editingEnabled",null),e([h({readOnly:!0,json:{write:!1,read:!1}})],ue.prototype,"infoFor3D",null),e([h({readOnly:!0,json:{write:!1,read:!1}})],ue.prototype,"relationships",null),e([h(x)],ue.prototype,"popupEnabled",void 0),e([h({type:r,json:{name:"popupInfo",write:!0}})],ue.prototype,"popupTemplate",void 0),e([h({readOnly:!0,json:{read:!1}})],ue.prototype,"defaultPopupTemplate",null),e([h({type:String,json:{read:!1}})],ue.prototype,"objectIdField",void 0),e([m("service","objectIdField",["objectIdField","fields"])],ue.prototype,"readObjectIdField",null),e([h({type:String,json:{read:!1}})],ue.prototype,"globalIdField",void 0),e([m("service","globalIdField",["globalIdField","fields"])],ue.prototype,"readGlobalIdField",null),e([h({readOnly:!0,type:String,json:{read:!1}})],ue.prototype,"displayField",null),e([h({type:String,json:{read:!1}})],ue.prototype,"profile",void 0),e([m("service","profile",["store.profile"])],ue.prototype,"readProfile",null),e([h({readOnly:!0,type:String,json:{origins:{service:{read:{source:"store.normalReferenceFrame"}}},read:!1}})],ue.prototype,"normalReferenceFrame",void 0),e([h(R)],ue.prototype,"screenSizePerspectiveEnabled",void 0),e([h({json:{read:!1,origins:{service:{read:!0}}}})],ue.prototype,"serviceItemId",void 0),ue=e([g("esri.layers.SceneLayer")],ue);const ce={"mesh-pyramids":"mesh-pyramids",meshpyramids:"mesh-pyramids","features-meshes":"mesh-pyramids",points:"points","features-points":"points",lines:"lines","features-lines":"lines",polygons:"polygons","features-polygons":"polygons"},he={"mesh-pyramids":"mesh",points:"point",lines:"polyline",polygons:"polygon"},fe=ue;export{fe as default};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*
|
|
2
|
+
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
See https://js.arcgis.com/4.28/esri/copyright.txt for details.
|
|
4
|
+
*/
|
|
5
|
+
import t from"../../Graphic.js";import e from"../../core/Error.js";import a from"../../core/Logger.js";import{getMetersPerCartesianUnitForSR as s}from"../../core/unitUtils.js";import{parseData as r}from"../../core/urlUtils.js";import{initializeProjection as o,project as n}from"../../geometry/projection.js";import{fromJSON as l}from"../../geometry/support/jsonUtils.js";import{isFeatureIdentifierArrayWithGlobalId as i,isFeatureIdentifierArrayWithObjectId as u}from"./editingSupport.js";async function d(t,e,a){const{geometry:r}=e,l={...e.attributes};if(null!=a&&"mesh"===r?.type){const{transformFieldRoles:e}=a,{origin:i,spatialReference:u,transform:d}=r,c=t.spatialReference;await o(u,c);const p=n(i,c);if(l[e.originX]=p.x,l[e.originY]=p.y,l[e.originZ]=p.z??0,null!=d){const{translation:t,scale:a,rotation:o}=d,{vertexSpace:n}=r,i=n.isGeoreferenced?1:s(u)/s(c);l[e.translationX]=t[0]*i,l[e.translationY]=t[2]*i,l[e.translationZ]=-t[1]*i,l[e.scaleX]=a[0],l[e.scaleY]=a[2],l[e.scaleZ]=a[1],l[e.rotationX]=o[0],l[e.rotationY]=o[2],l[e.rotationZ]=-o[1],l[e.rotationDeg]=o[3]}return{attributes:l}}return null==r?{attributes:l}:"mesh"===r.type||"extent"===r.type?null:{geometry:r.toJSON(),attributes:l}}async function c(t,e){const a=await Promise.all((e.addAttachments??[]).map((e=>p(t,e)))),s=await Promise.all((e.updateAttachments??[]).map((e=>p(t,e)))),r=e.deleteAttachments??[];return a.length||s.length||r.length?{adds:a,updates:s,deletes:[...r]}:null}async function p(t,e){const{feature:a,attachment:s}=e,{globalId:o,name:n,contentType:l,data:i,uploadId:u}=s,d={globalId:o};if(a&&("attributes"in a?d.parentGlobalId=a.attributes&&a.attributes[t.globalIdField]:a.globalId&&(d.parentGlobalId=a.globalId)),u)d.uploadId=u;else if(i){const t=await r(i);t&&(d.contentType=t.mediaType,d.data=t.data),i instanceof File&&(d.name=i.name)}return n&&(d.name=n),l&&(d.contentType=l),d}function m(t,e,a){if(!e||0===e.length)return[];if(a&&i(e))return e.map((t=>t.globalId));if(u(e))return e.map((t=>t.objectId));const s=a?t.globalIdField:t.objectIdField;return s?e.map((t=>t.getAttribute(s))):[]}function f(t){const e=t?.assetMaps;if(e){for(const t of e.addResults)t.success||a.getLogger("esri.layers.graphics.sources.support.sourceUtils").error(`Failed to map asset to feature with globalId ${t.globalId}.`);for(const t of e.updateResults)t.success||a.getLogger("esri.layers.graphics.sources.support.sourceUtils").error(`Failed to map asset to feature with globalId ${t.globalId}.`)}const s=t?.attachments,r={addFeatureResults:t?.addResults?.map(g)??[],updateFeatureResults:t?.updateResults?.map(g)??[],deleteFeatureResults:t?.deleteResults?.map(g)??[],addAttachmentResults:s&&s.addResults?s.addResults.map(g):[],updateAttachmentResults:s&&s.updateResults?s.updateResults.map(g):[],deleteAttachmentResults:s&&s.deleteResults?s.deleteResults.map(g):[]};return t?.editMoment&&(r.editMoment=t.editMoment),r}function g(t){const a=!0===t.success?null:t.error||{code:void 0,description:void 0};return{objectId:t.objectId,globalId:t.globalId,error:a?new e("feature-layer-source:edit-failure",a.description,{code:a.code}):null}}function b(e,a){return new t({attributes:e.attributes,geometry:l({...e.geometry,spatialReference:a})})}function R(t,e){return{adds:t?.adds?.map((t=>b(t,e)))||[],updates:t?.updates?.map((t=>({original:b(t[0],e),current:b(t[1],e)})))||[],deletes:t?.deletes?.map((t=>b(t,e)))||[],spatialReference:e}}export{R as createEditedFeatures,g as createFeatureEditResult,c as getAttachmentEditsJSON,m as getFeatureIds,d as getFeatureJSON,f as unpackEditResultData};
|