@arcgis/core 5.1.0-next.20 → 5.1.0-next.22
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/analysis/VolumeMeasurement/VolumeMeasurementCutFillOptions.d.ts +1 -0
- package/analysis/VolumeMeasurement/VolumeMeasurementDisplayUnits.d.ts +1 -0
- package/analysis/VolumeMeasurement/VolumeMeasurementInputUnits.d.ts +1 -0
- package/analysis/VolumeMeasurementAnalysis.d.ts +3 -2
- package/applications/Components/OrientedImageryViewer/galleryUtils.d.ts +45 -15
- package/applications/Components/QuantityFormatter.d.ts +11 -11
- package/applications/Components/SelectionOperation.d.ts +11 -11
- package/applications/Components/SketchTooltipControls.d.ts +9 -9
- package/applications/Components/actionUtils.d.ts +2 -1
- package/applications/Components/analysisUtils.d.ts +27 -26
- package/applications/Components/applySetUtils.d.ts +40 -40
- package/applications/Components/arcadeEditorUtils.d.ts +3 -3
- package/applications/Components/arcadeFeatureUtils.d.ts +12 -12
- package/applications/Components/baUtils.d.ts +8 -8
- package/applications/Components/basemapUtils.d.ts +2 -2
- package/applications/Components/clipboard.d.ts +14 -14
- package/applications/Components/drawUtils.d.ts +3 -3
- package/applications/Components/editUtils.d.ts +14 -14
- package/applications/Components/featureUtils.d.ts +10 -10
- package/applications/Components/fieldFormatUtils.d.ts +2 -2
- package/applications/Components/fontUtils.d.ts +2 -2
- package/applications/Components/formatUtils.d.ts +2 -2
- package/applications/Components/getDefaultUnits.d.ts +2 -2
- package/applications/Components/gfxUtils.d.ts +5 -1
- package/applications/Components/imageryUtils.d.ts +35 -35
- package/applications/Components/layerOriginUtils.d.ts +5 -5
- package/applications/Components/layersEffectsJsonUtils.d.ts +2 -2
- package/applications/Components/previewSymbol2D.d.ts +2 -2
- package/applications/Components/rasterFunctionEditorUtils.d.ts +40 -40
- package/applications/Components/reactiveUtils.d.ts +14 -13
- package/applications/Components/sanitizerUtils.d.ts +2 -2
- package/applications/Components/stringUtils.d.ts +5 -5
- package/applications/Components/styleUtils.d.ts +2 -2
- package/applications/Components/svgUtils.d.ts +4 -4
- package/applications/Components/symbolUtils.d.ts +47 -11
- package/applications/Components/templateUtils.d.ts +73 -17
- package/applications/Components/templateUtils.js +1 -1
- package/applications/Components/testUtils.d.ts +3 -3
- package/applications/Components/unitUtils.d.ts +1 -1
- package/applications/Components/viewUtils.d.ts +2 -2
- package/applications/Components/webStyleSymbolUtils.d.ts +2 -2
- package/applications/Excalibur/imageryLayerUtils.d.ts +3 -3
- package/applications/Excalibur/videoViewUtils.d.ts +8 -8
- package/applications/Excalibur/widgetUtils.d.ts +2 -2
- package/applications/ExperienceBuilder/sketchUtils.d.ts +7 -7
- package/applications/KnowledgeStudio/dataModelVisualization.d.ts +20 -8
- package/applications/KnowledgeStudio/generalSdkInternalAccess.d.ts +21 -21
- package/applications/KnowledgeStudio/generalSharedKgUtils.d.ts +35 -35
- package/applications/KnowledgeStudio/layerInternalAccessUtils.d.ts +9 -9
- package/applications/KnowledgeStudio/reshape.d.ts +40 -40
- package/applications/KnowledgeStudio/resourceSerializationUtils.d.ts +11 -11
- package/applications/MapViewer/layerUtils.d.ts +2 -2
- package/applications/MapViewer/mediaUtils.d.ts +13 -13
- package/applications/MapViewer/templateUtils.d.ts +20 -20
- package/applications/PortalApp/layerUtils.d.ts +2 -2
- package/applications/SceneViewer/colorUtils.d.ts +2 -2
- package/applications/SceneViewer/devEnvironmentUtils.d.ts +4 -3
- package/applications/SceneViewer/layerUtils.d.ts +3 -3
- package/applications/SceneViewer/sceneViewerUtils.d.ts +34 -34
- package/applications/SceneViewer/symbolUtils.d.ts +2 -2
- package/applications/Urban/LineImagePattern3D.d.ts +3 -2
- package/applications/Urban/imagePatternUtils.d.ts +4 -4
- package/applications/Urban/meshUtils.d.ts +2 -2
- package/applications/WebEditor/sketchUtils.d.ts +8 -8
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/03d11c7056fea763cbac.js +1 -0
- package/assets/esri/core/workers/chunks/05e5b9082c0a396df7e5.js +1 -0
- package/assets/esri/core/workers/chunks/08445fcba84ed7c23b3f.js +1 -0
- package/assets/esri/core/workers/chunks/0c706cdff6eac940eaab.js +1 -0
- package/assets/esri/core/workers/chunks/10a8612e7b2c74a8ce9a.js +1 -0
- package/assets/esri/core/workers/chunks/{df321c37b61099f6e4c2.js → 11058e660139c427c3e7.js} +1 -1
- package/assets/esri/core/workers/chunks/{2ddb8bb00b3af83ebd7c.js → 14792047c5519dd89828.js} +1 -1
- package/assets/esri/core/workers/chunks/1a1e57267306c07e5bdb.js +1 -0
- package/assets/esri/core/workers/chunks/1bb5aa1e3693e0c68b18.js +1 -0
- package/assets/esri/core/workers/chunks/1cd091fa567fc4026356.js +1 -0
- package/assets/esri/core/workers/chunks/1dcd057695f8db79eca2.js +1 -0
- package/assets/esri/core/workers/chunks/{3ed7f19f77a11fa4d047.js → 2063b49607a03f7718ee.js} +1 -1
- package/assets/esri/core/workers/chunks/{74a6d840813ac29b0bda.js → 209acb3ad16c99bb506c.js} +1 -1
- package/assets/esri/core/workers/chunks/21decfc1e477fb769204.js +1 -0
- package/assets/esri/core/workers/chunks/21e04705cad9fef1b01b.js +1 -0
- package/assets/esri/core/workers/chunks/23cb0611abe1031c513c.js +1 -0
- package/assets/esri/core/workers/chunks/285f3b07de852bfc1604.js +1 -0
- package/assets/esri/core/workers/chunks/2c61a53962093a331225.js +1 -0
- package/assets/esri/core/workers/chunks/2ecfd6edab796194bf88.js +1 -0
- package/assets/esri/core/workers/chunks/2f23af31b1190754ce13.js +1 -0
- package/assets/esri/core/workers/chunks/31eb59eae4c89b76e302.js +1 -0
- package/assets/esri/core/workers/chunks/3e61e7805dc6ff284831.js +1 -0
- package/assets/esri/core/workers/chunks/4150774059d67a8def74.js +1 -0
- package/assets/esri/core/workers/chunks/416c57df61fbd193078b.js +1 -0
- package/assets/esri/core/workers/chunks/46d28a0c20263012faff.js +1 -0
- package/assets/esri/core/workers/chunks/{43c8b1473695574c663e.js → 4754610760f3f634adf9.js} +2 -2
- package/assets/esri/core/workers/chunks/{f5cebeaad3e7d87d7997.js → 4fc6dd1423075e145b29.js} +1 -1
- package/assets/esri/core/workers/chunks/{3861644c06cfebe8f40c.js → 527547fa10d52cb3a7b1.js} +2 -2
- package/assets/esri/core/workers/chunks/5480d4cc342a2669a8ab.js +1 -0
- package/assets/esri/core/workers/chunks/{e8495c655a0a4f534636.js → 551fee27bf3abf0c41fd.js} +1 -1
- package/assets/esri/core/workers/chunks/568d32ceee1409809e5a.js +1 -0
- package/assets/esri/core/workers/chunks/576995021660e8b34705.js +1 -0
- package/assets/esri/core/workers/chunks/57e375d8a8db9fa57193.js +1 -0
- package/assets/esri/core/workers/chunks/5cbc12545f42a32fb960.js +1 -0
- package/assets/esri/core/workers/chunks/61ebbae0773fccc1f2bf.js +1 -0
- package/assets/esri/core/workers/chunks/63c297b6b7438f49e7ee.js +1 -0
- package/assets/esri/core/workers/chunks/6b56c8ba978ec6edd6b8.js +1 -0
- package/assets/esri/core/workers/chunks/{53f8c1d56ef3b24d2226.js → 6c853fd89f0e9f102c6e.js} +1 -1
- package/assets/esri/core/workers/chunks/{946698d9cefffdb63082.js → 6e32e7b2ea2ea1a1fc04.js} +1 -1
- package/assets/esri/core/workers/chunks/6f12854c5846edfe3239.js +1 -0
- package/assets/esri/core/workers/chunks/{b586f1021a27c5e1551a.js → 7189e03cc24f5c10865a.js} +2 -2
- package/assets/esri/core/workers/chunks/7b59ddad3c73f5f44b4d.js +1 -0
- package/assets/esri/core/workers/chunks/7c417d2bf432e4055b3d.js +30 -0
- package/assets/esri/core/workers/chunks/8021cb732f8136d87048.js +1 -0
- package/assets/esri/core/workers/chunks/84124c1a41a96192f81c.js +1 -0
- package/assets/esri/core/workers/chunks/845bbd82ddacbb62ad28.js +1 -0
- package/assets/esri/core/workers/chunks/868c8a152cb1452b9a94.js +1 -0
- package/assets/esri/core/workers/chunks/879ce85c50b0348056b2.js +1 -0
- package/assets/esri/core/workers/chunks/87a7d405a0b9a541d7f2.js +1 -0
- package/assets/esri/core/workers/chunks/9522430d34d29c1ffb1a.js +1 -0
- package/assets/esri/core/workers/chunks/9647f3983f955da21093.js +1 -0
- package/assets/esri/core/workers/chunks/9694b4b85168a38ca24b.js +1 -0
- package/assets/esri/core/workers/chunks/{83d913dab3c2b0d6a7cc.js → 9736299a4ac0e21f08a7.js} +1 -1
- package/assets/esri/core/workers/chunks/{e7bee85f28d7ec03825a.js → 973e3743cb7fdaa27f80.js} +1 -1
- package/assets/esri/core/workers/chunks/9b2d0d36ee6c04c347df.js +1 -0
- package/assets/esri/core/workers/chunks/{2662750d5761ed2d0eb7.js → 9e7eea56e96f012f9ff4.js} +1 -1
- package/assets/esri/core/workers/chunks/{3f812b0a28afb47aaaf0.js → a35d1be700ebd3109397.js} +2 -2
- package/assets/esri/core/workers/chunks/a4919dd9963f853a0077.js +1 -0
- package/assets/esri/core/workers/chunks/a4a4ce33de6432ba4dc3.js +1 -0
- package/assets/esri/core/workers/chunks/{aece665144aed2065ffc.js → a78ac951c00f090d9024.js} +1 -1
- package/assets/esri/core/workers/chunks/a7dbd38bc216713044fc.js +1 -0
- package/assets/esri/core/workers/chunks/{0debabe324c873066885.js → aa3bdfd00f666c6cc521.js} +1 -1
- package/assets/esri/core/workers/chunks/{db5bbc240a1b8cd5af52.js → abc2471cfa9430ca5645.js} +1 -1
- package/assets/esri/core/workers/chunks/b2a67fe89f6505498bc3.js +1 -0
- package/assets/esri/core/workers/chunks/{b8b2f160518e3a225d99.js → b364ec104dd59faa41b6.js} +1 -1
- package/assets/esri/core/workers/chunks/b4254fcb2051c873f2ba.js +1 -0
- package/assets/esri/core/workers/chunks/{a53fa34681efff8fc024.js → b859d98fa1c39f8e4099.js} +1 -1
- package/assets/esri/core/workers/chunks/c09bc36347e8eb9fff00.js +1 -0
- package/assets/esri/core/workers/chunks/c2cda93905f0a49a6931.js +1 -0
- package/assets/esri/core/workers/chunks/c3e4f8664988e50bda55.js +1 -0
- package/assets/esri/core/workers/chunks/{3d0aa5f2db79c022243e.js → c794f7be868e53ca4a8c.js} +1 -1
- package/assets/esri/core/workers/chunks/cada79c174027f7a0df8.js +1 -0
- package/assets/esri/core/workers/chunks/cf100c80b75ba74b479c.js +1 -0
- package/assets/esri/core/workers/chunks/d10c65cde3565d399275.js +1 -0
- package/assets/esri/core/workers/chunks/d44217de4c73475f9c66.js +1 -0
- package/assets/esri/core/workers/chunks/d587b7842091affdaac3.js +1 -0
- package/assets/esri/core/workers/chunks/d70678598f4080adfb39.js +1 -0
- package/assets/esri/core/workers/chunks/dad9c25f1b7cacf7b052.js +1 -0
- package/assets/esri/core/workers/chunks/{0facd2c143a04cc7c4ff.js → deee88e3f1641c6ef5db.js} +1 -1
- package/assets/esri/core/workers/chunks/e063cce778944fe97dd3.js +1 -0
- package/assets/esri/core/workers/chunks/e37e7ae2de974cef9a90.js +1 -0
- package/assets/esri/core/workers/chunks/e44ed205f74df34adb8b.js +1 -0
- package/assets/esri/core/workers/chunks/e6220c1fa887e21ffbbd.js +1 -0
- package/assets/esri/core/workers/chunks/{13d1cb50232ae761425b.js → eaeb95be8d4032513247.js} +2 -2
- package/assets/esri/core/workers/chunks/{93515f52d9b5fa12bd04.js → eb4934d3a3b82316c7c6.js} +1 -1
- package/assets/esri/core/workers/chunks/{23c856265dd24ce54fdb.js → f1c1f7583fa13dff9b5c.js} +1 -1
- package/assets/esri/core/workers/chunks/f27bbb4e26297d3c68de.js +1 -0
- package/assets/esri/core/workers/chunks/f4480636a910eaa4c531.js +1 -0
- package/assets/esri/core/workers/chunks/{5b991b0d4ca257291cb0.js → f5c5a9e771074f780fc8.js} +1 -1
- package/assets/esri/core/workers/chunks/f82a95c46f0d579d5bf5.js +1 -0
- package/assets/esri/core/workers/chunks/fb3a42cdd0d3105ec551.js +1 -0
- package/chunks/Clouds.glsl.js +1 -1
- package/config.js +1 -1
- package/core/MultiOriginJSONSupport.d.ts +1 -1
- package/core/ReadOnlyMultiOriginJSONSupport.d.ts +5 -4
- package/geometry/FlatGeometry.js +1 -1
- package/geometry/support/curves/curveUtils.js +1 -1
- package/geometry/support/curves/densifyCurvedGeometry.js +1 -1
- package/graphic/graphicOriginUtils.js +1 -1
- package/kernel.js +1 -1
- package/layers/FeatureLayer.d.ts +7 -9
- package/layers/IntegratedMesh3DTilesLayer.js +1 -1
- package/layers/Lyr3DWasmPerSceneView.js +1 -1
- package/layers/WMTSLayer.js +1 -1
- package/layers/graphics/data/QueryEngineResult.js +1 -1
- package/layers/graphics/editingSupport.js +1 -1
- package/layers/raster/datasets/MRFRaster.js +1 -1
- package/layers/support/SceneModification.js +1 -1
- package/layers/support/Sublayer.d.ts +3 -0
- package/package.json +2 -2
- package/renderers/VectorFieldRenderer.js +1 -1
- package/renderers/support/DictionaryControlString.js +1 -1
- package/renderers/support/DictionaryLoader.js +1 -1
- package/rest/featureService/FeatureService.js +1 -1
- package/smartMapping/support/utils.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/cim/CIMSymbolHelper.js +1 -1
- package/symbols/cim/GeometryWalker.js +1 -1
- package/symbols/cim/SDFHelper.js +1 -1
- package/symbols/cim/animationUtils.js +1 -1
- package/symbols/cim/cimAnalyzer.js +1 -1
- package/symbols/cim/effects/EffectDashes.js +1 -1
- package/symbols/cim/effects/EffectDonut.js +1 -1
- package/symbols/cim/effects/EffectOffset.js +1 -1
- package/symbols/cim/effects/EffectWave.js +1 -1
- package/symbols/cim/placements/PlacementAlongLineSameSize.js +1 -1
- package/symbols/cim/placements/PlacementAtExtremities.js +1 -1
- package/symbols/cim/placements/PlacementAtRatioPositions.js +1 -1
- package/symbols/cim/placements/PlacementOnLine.js +1 -1
- package/symbols/cim/rasterizingUtils.js +1 -1
- package/symbols/cim/types.d.ts +220 -117
- package/views/2d/layers/features/schema/processor/symbols/utils.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementError.d.ts +1 -0
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementResult.d.ts +1 -0
- package/views/3d/analysis/VolumeMeasurementAnalysisView3D.d.ts +1 -0
- package/views/3d/environment/CloudsRenderer.js +1 -1
- package/views/3d/environment/Fog.js +1 -1
- package/views/3d/environment/FogTechnique.js +1 -1
- package/views/3d/environment/NoiseTextureAtlas.js +1 -1
- package/views/3d/environment/NoiseTextureAtlasTechnique.js +1 -1
- package/views/3d/layers/Lyr3DWorker.js +1 -1
- package/views/3d/layers/SceneLayerWorkerHandle.js +1 -1
- package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DWaterSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/polygonUtils.js +1 -1
- package/views/3d/layers/support/patternUtils.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatTextureAtlas.js +1 -1
- package/views/3d/webgl-engine/core/FBOCache.js +1 -1
- package/views/3d/webgl-engine/core/FBOCacheFormats.js +1 -1
- package/views/3d/webgl-engine/effects/focusArea/FocusAreaColorTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/focusArea/FocusAreaMaskNode.js +1 -1
- package/views/3d/webgl-engine/effects/geometry/RenderOccludedRenderNode.js +1 -1
- package/views/3d/webgl-engine/lib/CutFillDepth.js +1 -1
- package/views/3d/webgl-engine/lib/GPUPointOcclusionQuery.js +1 -1
- package/views/3d/webgl-engine/lib/Geometry.js +1 -1
- package/views/3d/webgl-engine/lib/MainFramebuffer.js +1 -1
- package/views/3d/webgl-engine/lib/Material.js +1 -1
- package/views/3d/webgl-engine/lib/RayIntersections.js +1 -1
- package/views/3d/webgl-engine/lib/RenderGeometry.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/RenderingContext.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
- package/views/3d/webgl-engine/lib/ViewshedShadowMap.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
- package/views/3d/webgl-engine/lib/geometryDataUtils.js +1 -1
- package/views/3d/webgl-engine/materials/ColorMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/PatternMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/IndexBufferCache.js +2 -0
- package/views/3d/webgl-engine/materials/renderers/IndexLayout.js +2 -0
- package/views/3d/webgl-engine/materials/renderers/Instance.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/MergedBuffer.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/PerBufferData.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/VaoRenderer.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/VaoWriter.js +1 -1
- package/views/SelectionManager.d.ts +9 -9
- package/views/SelectionManager.js +1 -1
- package/views/View.d.ts +13 -2
- package/views/draw/support/Reshape.js +1 -1
- package/views/draw/support/reshapeUtils.js +1 -1
- package/views/draw/support/types.d.ts +8 -1
- package/views/interactive/support/utils.js +1 -1
- package/views/layers/FeatureLikeLayerView.d.ts +24 -24
- package/views/webgl/BufferObject.js +1 -1
- package/widgets/Attribution/AttributionViewModel.d.ts +3 -1
- package/widgets/Attribution/AttributionViewModel.js +1 -1
- package/widgets/Attribution.d.ts +1 -1
- package/widgets/Attribution.js +1 -1
- package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
- package/widgets/Editor/EditorViewModel.d.ts +2 -22
- package/widgets/Editor/EditorViewModel.js +1 -1
- package/widgets/Editor/SplitFeatureWorkflow.js +1 -1
- package/widgets/Editor/UpdateWorkflow.js +1 -1
- package/widgets/Editor/Workflow.js +1 -1
- package/widgets/Editor/support/SketchController.js +1 -1
- package/widgets/Editor/workflowUtils.js +1 -1
- package/widgets/Editor.d.ts +10 -15
- package/widgets/Editor.js +1 -1
- package/widgets/FeatureTable/FeatureTableViewModel.d.ts +0 -15
- package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
- package/widgets/FeatureTable/support/types.d.ts +0 -1
- package/widgets/FeatureTable.d.ts +1 -19
- package/widgets/FeatureTable.js +1 -1
- package/widgets/FeatureTemplates.d.ts +1 -1
- package/widgets/FeatureTemplates.js +1 -1
- package/widgets/HistogramRangeSlider.d.ts +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/adapters/sketch/MeasurementAdapter.js +1 -1
- package/widgets/OrientedImageryViewer/adapters/view/MapViewAdapter.js +1 -1
- package/widgets/PanoramicVideoViewer.js +1 -1
- package/widgets/PanoramicViewer/PanoramicVideoViewerViewModel.js +1 -1
- package/widgets/PanoramicViewer/support/PanoramicMedia.js +1 -1
- package/widgets/PanoramicViewer/support/PanoramicTileNode.js +1 -1
- package/widgets/PanoramicViewer/support/PanoramicTilePyramid.js +1 -1
- package/widgets/PanoramicViewer/utils.js +1 -1
- package/widgets/Sketch/SketchViewModel.d.ts +4 -22
- package/widgets/Sketch/SketchViewModel.js +1 -1
- package/widgets/Sketch/support/PluginManager.js +1 -1
- package/widgets/Sketch/support/sketchUtils.js +1 -1
- package/widgets/Sketch.d.ts +10 -17
- package/widgets/Sketch.js +1 -1
- package/assets/esri/core/workers/chunks/026c00ee272c64e53daf.js +0 -1
- package/assets/esri/core/workers/chunks/0883c4e63424d6746ada.js +0 -1
- package/assets/esri/core/workers/chunks/0987cb20148f65222b44.js +0 -1
- package/assets/esri/core/workers/chunks/0a1f88cf16bcbb53b371.js +0 -1
- package/assets/esri/core/workers/chunks/0bb3beedae1b73beb1fc.js +0 -1
- package/assets/esri/core/workers/chunks/0ca405ca26676137a4be.js +0 -1
- package/assets/esri/core/workers/chunks/0ce968c89c35535da63e.js +0 -1
- package/assets/esri/core/workers/chunks/0d56e3b3265a4470aaa6.js +0 -1
- package/assets/esri/core/workers/chunks/144c719d5ba9e3a30961.js +0 -1
- package/assets/esri/core/workers/chunks/1503ca177e2466ec0e87.js +0 -1
- package/assets/esri/core/workers/chunks/1597d7b380d510ff5252.js +0 -1
- package/assets/esri/core/workers/chunks/1880c3b293cdfa804625.js +0 -1
- package/assets/esri/core/workers/chunks/1bea32b02d35ddb9b118.js +0 -1
- package/assets/esri/core/workers/chunks/1d78ec98eef7fef08f86.js +0 -1
- package/assets/esri/core/workers/chunks/1e6271524602e159dbad.js +0 -1
- package/assets/esri/core/workers/chunks/1f96d597ba736e088168.js +0 -1
- package/assets/esri/core/workers/chunks/26e41b08efe77d247409.js +0 -1
- package/assets/esri/core/workers/chunks/297b58f29c496923e1f3.js +0 -1
- package/assets/esri/core/workers/chunks/2a2a9fa62969644ea200.js +0 -1
- package/assets/esri/core/workers/chunks/2b296378d21e4e3c11d4.js +0 -1
- package/assets/esri/core/workers/chunks/2cbcf34cf896a438999b.js +0 -1
- package/assets/esri/core/workers/chunks/394b645d51e7bf799382.js +0 -1
- package/assets/esri/core/workers/chunks/50ab9a3f8bbb268fae59.js +0 -1
- package/assets/esri/core/workers/chunks/5a8b3e5977c233d5c9d0.js +0 -1
- package/assets/esri/core/workers/chunks/5b2dd164dd84fd1ca4f7.js +0 -1
- package/assets/esri/core/workers/chunks/62c228ca16fdc7a2c695.js +0 -1
- package/assets/esri/core/workers/chunks/639202a461b17840a13f.js +0 -1
- package/assets/esri/core/workers/chunks/693d269637135047a0c4.js +0 -1
- package/assets/esri/core/workers/chunks/6a14ec2d2de6778a4e7a.js +0 -1
- package/assets/esri/core/workers/chunks/6d3467997b5d01630b08.js +0 -1
- package/assets/esri/core/workers/chunks/6dfcb0c804e63e87e311.js +0 -1
- package/assets/esri/core/workers/chunks/778ab9e4c3928b0d7d74.js +0 -1
- package/assets/esri/core/workers/chunks/8012fdc49a7a10982f78.js +0 -1
- package/assets/esri/core/workers/chunks/85e0fd618625a639387f.js +0 -1
- package/assets/esri/core/workers/chunks/86465d4bb185d7460087.js +0 -1
- package/assets/esri/core/workers/chunks/87e7378b242debbfd575.js +0 -1
- package/assets/esri/core/workers/chunks/90b19e60c056f32623e7.js +0 -1
- package/assets/esri/core/workers/chunks/9461f7225c42cf15a114.js +0 -1
- package/assets/esri/core/workers/chunks/978649cb6df99ee728be.js +0 -1
- package/assets/esri/core/workers/chunks/9f5f4da954228d876219.js +0 -1
- package/assets/esri/core/workers/chunks/a2323c957c8b2fe225b4.js +0 -1
- package/assets/esri/core/workers/chunks/a36a33f43610c3cd985b.js +0 -1
- package/assets/esri/core/workers/chunks/a381932eef77f4d80292.js +0 -1
- package/assets/esri/core/workers/chunks/b089947c9a492c96ca27.js +0 -1
- package/assets/esri/core/workers/chunks/b6e4c35b76379088035c.js +0 -1
- package/assets/esri/core/workers/chunks/bbf2afa05314e267893f.js +0 -1
- package/assets/esri/core/workers/chunks/bd2f577cae61facdde4a.js +0 -1
- package/assets/esri/core/workers/chunks/bf2bfc0d78be8c185d58.js +0 -1
- package/assets/esri/core/workers/chunks/c4a78ab84186c7be599a.js +0 -1
- package/assets/esri/core/workers/chunks/c6e0ada6f2ad74fddfec.js +0 -1
- package/assets/esri/core/workers/chunks/c9d600dc6b6b5aafff1c.js +0 -1
- package/assets/esri/core/workers/chunks/ca33847a997ccfe8ddc2.js +0 -1
- package/assets/esri/core/workers/chunks/cca19c9564be2d02a277.js +0 -1
- package/assets/esri/core/workers/chunks/ccc2f2b3db008d8a495f.js +0 -1
- package/assets/esri/core/workers/chunks/d9f900975ac915a0f24f.js +0 -1
- package/assets/esri/core/workers/chunks/dcc8363faa22e6211351.js +0 -1
- package/assets/esri/core/workers/chunks/dd5d66f067e2386e0514.js +0 -1
- package/assets/esri/core/workers/chunks/e081d6f21a2c01ccaf61.js +0 -1
- package/assets/esri/core/workers/chunks/eb4ffb72c9360062141c.js +0 -1
- package/assets/esri/core/workers/chunks/ebae903845643d60b44a.js +0 -1
- package/assets/esri/core/workers/chunks/ebb0372e8da0f75c09dd.js +0 -1
- package/assets/esri/core/workers/chunks/f349f64f683620bdf9b5.js +0 -30
- package/assets/esri/core/workers/chunks/f6fb87092bdf6bbf0769.js +0 -1
- package/assets/esri/core/workers/chunks/f76c2b09e6ba9d107898.js +0 -1
- package/assets/esri/core/workers/chunks/fcf962f3dec6b5440983.js +0 -1
- /package/assets/esri/core/workers/chunks/{43c8b1473695574c663e.js.LICENSE.txt → 4754610760f3f634adf9.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{3861644c06cfebe8f40c.js.LICENSE.txt → 527547fa10d52cb3a7b1.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{b586f1021a27c5e1551a.js.LICENSE.txt → 7189e03cc24f5c10865a.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{3f812b0a28afb47aaaf0.js.LICENSE.txt → a35d1be700ebd3109397.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{13d1cb50232ae761425b.js.LICENSE.txt → eaeb95be8d4032513247.js.LICENSE.txt} +0 -0
package/widgets/Editor.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{substitute as t}from"../intl.js";import{deprecateWidget as i,deprecatedFunction as s}from"../core/deprecate.js";import o from"../core/Logger.js";import{destroyMaybe as r,abortMaybe as a,mappedFind as n}from"../core/maybe.js";import{createResolver as l}from"../core/promiseUtils.js";import{watch as c,initial as d,on as h,when as m}from"../core/reactiveUtils.js";import{property as p,subclass as u}from"../core/accessorSupport/decorators.js";import{UpdatingHandles as g}from"../core/support/UpdatingHandles.js";import w from"../views/interactive/sketch/SketchLabelOptions.js";import v from"../views/interactive/sketch/SketchTooltipOptions.js";import _ from"../views/interactive/sketch/SketchValueOptions.js";import f from"../views/interactive/snapping/SnappingOptions.js";import y from"./Attachments.js";import b from"./BatchAttributeForm.js";import k from"./FeatureForm.js";import M from"./FeatureTemplates.js";import F from"./Spinner.js";import A from"./Widget.js";import T from"./BatchAttributeForm/VisibleElements.js";import{css as S}from"./Editor/css.js";import C from"./Editor/EditorViewModel.js";import{isModelUpload as L}from"./Editor/modelUploadUtils.js";import E from"./Editor/VisibleElements.js";import{findEditorItemForLayer as W,isFeatureFormViewModel as I,isUpdateWorkflow as P,isUpdateFeaturesWorkflow as U,isUpdateFeatureWorkflow as j,isBatchAttributeFormViewModel as V}from"./Editor/workflowUtils.js";import{loadCreateFeaturesPanelContentComponents as D,CreateFeaturesPanelContent as x}from"./Editor/components/CreateFeaturesPanelContent.js";import{loadFeatureListComponents as B,FeatureList as O}from"./Editor/components/FeatureList.js";import{loadFooterActionsComponents as N,FooterActions as H}from"./Editor/components/FooterActions.js";import{loadNoticesComponents as G,Notice as z}from"./Editor/components/Notices.js";import{loadPanelContentComponents as R,PanelContent as q,PanelContentSection as K,PanelContentMessage as Z}from"./Editor/components/PanelContent.js";import{PanelToolbar as $,loadPanelToolbarComponents as J}from"./Editor/components/PanelToolbar.js";import{loadPromptComponents as Q,Prompt as X}from"./Editor/components/Prompt.js";import{loadUpdateFeaturePanelContentComponents as Y,UpdateFeaturePanelContent as ee}from"./Editor/components/UpdateFeaturePanelContent.js";import{loadUploadDetailsComponents as te,UploadDetails as ie}from"./Editor/components/UploadDetails.js";import se from"./Sketch/CreateToolVisibilityMap.js";import oe from"./Sketch/SelectionToolVisibilityMap.js";import re from"./Sketch/VisibleElements.js";import{loadCalciteComponents as ae}from"./support/componentsUtils.js";import{globalCss as ne}from"./support/globalCss.js";import{incrementHeadingLevel as le,Heading as ce}from"./support/Heading.js";import{renderItem as de}from"./support/ItemList.js";import{connectDelayedLoading as he}from"./support/loaderUtils.js";import me from"./support/SelectionList.js";import pe from"./support/SelectionToolbar.js";import{messageBundle as ue,vmEvent as ge,tsx as we}from"./support/widget.js";import{isLayerItem as ve}from"./support/SelectionList/selectionListUtils.js";import _e from"./support/SelectionList/VisibleElements.js";import fe from"./support/SelectionToolbar/VisibleElements.js";const ye=Symbol("sketch-setup-handles");let be=class extends A{constructor(e,s){super(e,s),this._batchAttributeForm=new b({suppressDeprecationWarning:!0,visibleElements:new T({loadingIndicator:!1})}),this._featureForm=new k({suppressDeprecationWarning:!0}),this._sketchToolbar=null,this._attachments=new y({visibleElements:{addSubmitButton:!1,cancelAddButton:!1,cancelUpdateButton:!1,deleteButton:!1,errorMessage:!1,progressBar:!1,updateButton:!1},suppressDeprecationWarning:!0}),this._associationItemList=null,this._associationSettings=null,this._featureTemplates=new M({suppressDeprecationWarning:!0,enableListScroll:!1,renderItemContentEnd:e=>e.supportsUpload?we("calcite-icon",{class:S.templateItemContentEnd,icon:"upload-to",key:"upload-icon"}):null,renderItemLabel:e=>e.label,renderCustomGroupContent:e=>this._renderCustomTemplateGroupContent(e)}),this._filterText="",this._prompt=null,this._spinner=new F,this._loading=!1,this._selectionList=new me({displayMode:"layer",itemActionConfigs:this._selectionListItemActionConfigs,itemUnavailableFunction:({item:e})=>!W(this.editorItems,e.layer)?.editable,onListItemSelect:({item:e})=>this._onSelectionListItemSelect(e),visibleElements:new _e({header:!1})}),this._selectionToolbar=new pe({visibleElements:new fe({chip:!1})}),this._updatingHandles=new g,this.headingLevel=4,this.messages=null,this.messagesCommon=null,this.messagesTemplates=null,this.messagesFeature=null,this.supportingWidgetDefaults=null,this.viewModel=null,this.visibleElements=new E,this._renderAttachments=()=>this._attachments.render(),this._renderFeatureForm=()=>this._featureForm.render(),this._renderBatchAttributeForm=()=>this._batchAttributeForm.render(),this._renderFeatureTemplates=()=>this._featureTemplates.render(),this._renderSelectionList=()=>this._selectionList.render(),this._renderSelectionToolbar=()=>this._selectionToolbar.render(),this._renderSketch=()=>this._sketchToolbar?we("div",{class:S.sketchContainer,key:"editor-sketch-container"},this._sketchToolbar?.render()):void 0,this._renderSelectIcon=()=>we("calcite-icon",{icon:"cursor",slot:"content-start"}),this.EditorPanel=({heading:e,key:t,selected:i},...s)=>{const{visibleElements:o}=this;return we("calcite-flow-item",{closable:!1,heading:e,headingLevel:this.headingLevel,key:t,loading:this._loading,selected:i,onCalciteFlowItemBack:this._onBack},o.settingsMenu?we($,{editorViewModel:this.viewModel,messagesCommon:this.messagesCommon,visibleElements:o}):null,...s)},this._showDiscardEditsPrompt=()=>{const{messages:e,activeWorkflow:t}=this,i={title:e.cancelEditTitle,message:e.cancelEditWarningMessage,yesLabel:e.discardEdits,noLabel:e.continueEditing};return"create-features"===t?.type&&L(t.data.creationInfo)?this._showPromptAndWait("success"===t.data.upload?.state?e.modelUploads.cancelPlacementPrompt:e.modelUploads.cancelUploadPrompt):"update"===t?.type&&I(t.formViewModel)&&t.formViewModel.activeAssociation?this._showPromptAndWait({...i,message:e.cancelAssociationEditWarning}):this._showPromptAndWait(i)},this._showGenericCancelPrompt=()=>{const{messages:e,messagesCommon:t}=this;return this._showPromptAndWait({title:e.cancelRequestTitle,message:e.cancelRequestWarningMessage,yesLabel:t.form.yes,noLabel:t.form.no})},this._showPrompt=e=>{this._prompt?.cancel?.(),this._prompt=e},this._clearPrompt=()=>{this._prompt=null},this._onSave=()=>{this.viewModel.saveWorkflow()},this._onMerge=()=>{const{activeWorkflow:e}=this.viewModel;if(P(e)){const t=e.activeWorkflow;U(t)&&e.startMergingFeatures(t.viewGraphics,{initialFeatures:t.data.initialFeatures})}},this._onSplit=()=>{const{activeWorkflow:e}=this.viewModel;if(P(e)){const t=e.activeWorkflow;if(j(t)){const i=t.viewGraphic;i&&e.startSplittingFeature(i,{initialFeature:t.data.edits.initialFeature??i})}}},this._onDelete=()=>{const e=this.viewModel.activeFeatureCount,i=e>1?this.messages.multiFeature:this.messages.singleFeature;this._showPrompt({title:i.deleteWarningTitle,message:i.deleteWarningMessage,context:"danger",actions:{primary:{label:t(i.delete,{count:e}),action:()=>{this.deleteFeatures(),this._clearPrompt()}},secondary:{label:i.keep,action:this._clearPrompt}}})},this._onDeleteAssociation=()=>{const{messages:e,messagesCommon:t}=this;this._showPrompt({title:e.deleteAssociationTitle,message:e.deleteAssociationMessage,context:"danger",actions:{primary:{label:t.delete,action:()=>{this.deleteAssociationFromWorkflow(),this._clearPrompt()}},secondary:{label:e.keepAssociation,action:this._clearPrompt}}})},this._onToggleUpdateWorkflow=()=>this.viewModel.toggleUpdateWorkflow(),this._onBack=e=>(e?.stopPropagation(),this.viewModel.back()),this._onAttachmentAdd=()=>{const{activeWorkflow:e}=this.viewModel;e&&("create-features"===e.type||"update"===e.type&&"create-features"===e.activeWorkflow?.type?(this._attachments.addFile(),e.back()):this._attachments.addAttachment().then(()=>e.back()))},this._onAttachmentUpdate=()=>{const{activeWorkflow:e}=this.viewModel;e&&("create-features"===e.type?(this._attachments.updateFile(),e.back()):this._attachments.updateAttachment().then(()=>e.back()))},this._onAttachmentDelete=()=>{const{messages:e,messagesCommon:t}=this;this._showPrompt({title:e.deleteAttachmentWarningTitle,message:e.deleteAttachmentWarningMessage,context:"danger",actions:{primary:{label:t.delete,action:this._onAttachmentDeleteConfirm},secondary:{label:e.keepAttachment,action:this._clearPrompt}}})},this._onAttachmentDeleteConfirm=async()=>{const e=this._attachments,{activeWorkflow:t}=this.viewModel;t&&("create-features"===t.type?e.deleteFile():(await e.deleteAttachment(e.viewModel.activeAttachmentInfo),this._clearPrompt()),await t.back(),this._clearPrompt())},this._onAttachmentsError=e=>{this._showPrompt({title:this.messages.errorWarningTitle,message:e.message,context:"warning",actions:{primary:{label:this.messagesCommon.form.ok,action:this._clearPrompt}}})},this.viewModel=e?.viewModel||new C({useLegacyCreateTools:e?.useLegacyCreateTools??"2d"!==e?.view?.type}),this.announceDeprecation=()=>{i(o.getLogger(this),"Editor","arcgis-editor",{version:"5.0"})}}initialize(){this._featureForm.showPrompt=this._showPrompt,this._featureForm.clearPrompt=this._clearPrompt,this.addHandles([c(()=>le(this.headingLevel),e=>{this._featureForm.headingLevel=e,this._featureTemplates.headingLevel=e},d),h(()=>this.viewModel.activeWorkflow,"cancel-request",({controller:e})=>{(this.viewModel.hasPendingEdits?this._showDiscardEditsPrompt():this._showGenericCancelPrompt()).then(t=>t?e.allow():e.deny())}),m(()=>this.viewModel.formViewModel,e=>{V(e)?this._batchAttributeForm.viewModel=e:this._featureForm.viewModel=e},d),m(()=>this.viewModel.utilityNetworkAssociationAddAssociationViewModel,e=>{this._associationItemList?this._associationItemList.viewModel=e:this._updatingHandles.consumePromise(this._initializeAssociationItemList(e))},d),m(()=>this.viewModel.utilityNetworkAssociationAddAssociationViewModel?.association,()=>{this._setUpAssociationSettings()}),c(()=>[this.viewModel,this.viewModel?.attachmentsViewModel,this.viewModel?.featureTemplatesViewModel,this.viewModel?.spinnerViewModel,this.viewModel?.selectionListViewModel,this.viewModel?.selectionToolbarViewModel],([e,t,i,s,o,r])=>{this._attachments.viewModel=t,this._featureTemplates.viewModel=i,this._spinner.viewModel=s,this._selectionList.viewModel=o,this._selectionToolbar.viewModel=r,e.showDiscardEditsPrompt=this._showDiscardEditsPrompt},d),c(()=>this.view,(e,t)=>{const i=`editor-${this.id}-spinner`;t?.ui.remove(this._spinner,i),e?.ui.add(this._spinner,{key:i,position:"manual"}),this._associationItemList&&(this._associationItemList.view=e)},d),c(()=>[this.supportingWidgetDefaults,this.viewModel.sketchViewModel],([e])=>{e&&(e.attachments&&this._attachments.set(e.attachments),e.featureForm&&this._featureForm.set(e.featureForm),e.featureTemplates&&this._featureTemplates.set(e.featureTemplates),e.selectionToolbar&&this._selectionToolbar.set(e.selectionToolbar),e.sketch&&this.viewModel.sketchViewModel?.set(e.sketch))},d),m(()=>this._attachments?.error,e=>this._onAttachmentsError(e)),m(()=>this._selectionListItemActionConfigs,()=>{this._selectionList.itemActionConfigs=this._selectionListItemActionConfigs}),m(()=>this.viewModel?.failures,e=>{const{messages:i}=this,[{error:s,retry:o,cancel:r}]=e;this._showPrompt({title:i.errorWarningTitle,message:t(i.errorWarningMessageTemplate,{errorMessage:s.message}),context:"warning",actions:{primary:{label:i.retry,action:()=>{o(),this._clearPrompt()}},secondary:{label:i.ignore,action:()=>{r(),this._clearPrompt()}}}})}),c(()=>this.viewModel?.state,e=>{switch(e){case"awaiting-feature-to-update":case"ready":case"disabled":this._filterText="",this._featureTemplates.filterText=""}}),c(()=>this.viewModel.featureFormDisabled,e=>this._featureForm.disabled=e),c(()=>this.visibleElements.sketch,()=>this._setupSketch(),d),c(()=>this.visibleElements.zoomToButton,e=>this._selectionList.visibleElements.zoomToButton=e,d),he({getLoading:()=>{const{viewModel:e}=this;return e.syncing||e.updating||this._attachments.submitting||this._updatingHandles.updating},setEffectiveLoading:e=>{this._loading=e}})])}destroy(){this._associationItemList?.destroy(),this._associationSettings?.destroy(),this._selectionList.destroy(),this._selectionToolbar.destroy(),this._attachments.destroy(),this._batchAttributeForm.destroy(),this._featureForm.destroy(),this._featureTemplates.destroy(),this._spinner.destroy(),this._sketchToolbar=r(this._sketchToolbar),this._sketchImportAbortController=a(this._sketchImportAbortController)}loadDependencies(){return Promise.all([ae({flow:()=>import("@esri/calcite-components/dist/components/calcite-flow"),"flow-item":()=>import("@esri/calcite-components/dist/components/calcite-flow-item"),icon:()=>import("@esri/calcite-components/dist/components/calcite-icon"),list:()=>import("@esri/calcite-components/dist/components/calcite-list")}),D(),B(),N(),G(),R(),J(),Q(),Y(),te()])}get _hasInvalidBatchSelection(){return this._hasSelectionWithUneditableFeatures||this._hasSelectionFromMultipleLayers||this._selectionCountExceedsMaximum||0===this._selectionList.visibleFeatureCount}get _hasSelectionFromMultipleLayers(){return this._selectionList.visibleLayerCount>1}get _hasSelectionWithUneditableFeatures(){const e=this.editorItems;return this._selectionList.visibleFeatureItems.some(t=>!W(e,t.layer))}get _deleteButtonCommonInfo(){return{appearance:"outline",kind:"danger"}}get _selectionCountExceedsMaximum(){const e=this._batchAttributeForm.maximumFeatureCount,{activeLayerItem:t,effectiveCount:i,filterText:s,visibleFeatureCount:o}=this._selectionList;return null!=s&&""!==s?o>e:t?t.total>e:i>e}get _selectionListItemActionConfigs(){const{messages:e,visibleElements:t}=this,i=t?.mergeButton??!0;return[{label:e?.batchEditing?.editThisFeature,icon:"edit-attributes",type:"feature",hidden:({item:e})=>!W(this.editorItems,e.layer)?.editable,callback:({item:e})=>this._onSelectionListMenuItemSelect(e,"update")},{label:e?.batchEditing.editTheseFeatures,icon:"edit-attributes",type:"layer",hidden:({item:e})=>!W(this.editorItems,e.layer)?.editable,callback:({item:e})=>this._onSelectionListMenuItemSelect(e,"update")},{label:e?.batchEditing.mergeTheseFeatures,icon:"merge",type:"layer",hidden:!i||(({item:e})=>{if(!ve(e))return!0;const t=W(this.editorItems,e.layer);return!t||(!t.editable||!t.supportsMergeFeaturesWorkflow||e.visibleTotal<2)}),callback:({item:e})=>this._onSelectionListMenuItemSelect(e,"merge")}]}get _visibleSelectionCount(){const{activeLayerItem:e,effectiveCount:t,filterText:i,visibleFeatureCount:s}=this._selectionList;return null!=i&&""!==i?s:e?e.total:t}get activeWorkflow(){return this.viewModel.activeWorkflow}get editorItems(){return this.viewModel.editorItems}get effectiveSelectionManager(){return this.viewModel.effectiveSelectionManager}get hideTemplatesForInactiveLayers(){return this.viewModel.hideTemplatesForInactiveLayers}set hideTemplatesForInactiveLayers(e){this.viewModel.hideTemplatesForInactiveLayers=e}get icon(){return"pencil"}set icon(e){this._overrideIfSome("icon",e)}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get labelOptions(){return this.viewModel.labelOptions}set labelOptions(e){this.viewModel.labelOptions=e}get layerInfos(){return this.viewModel.layerInfos}set layerInfos(e){this.viewModel.layerInfos=e}get selectionManager(){return this.viewModel.selectionManager}set selectionManager(e){this.viewModel.selectionManager=e}get snappingOptions(){return this.viewModel.snappingOptions}set snappingOptions(e){this.viewModel.snappingOptions=e}get syncWithViewSelectionManager(){return this.syncViewSelection}set syncWithViewSelectionManager(e){this.syncViewSelection=e}get syncViewSelection(){return this.viewModel.syncViewSelection}set syncViewSelection(e){this.viewModel.syncViewSelection=e}get tooltipOptions(){return this.viewModel.tooltipOptions}set tooltipOptions(e){this.viewModel.tooltipOptions=e}get valueOptions(){return this.viewModel.valueOptions}set valueOptions(e){this.viewModel.valueOptions=e}get useLegacyCreateTools(){return this.viewModel.useLegacyCreateTools}set useLegacyCreateTools(e){this._set("useLegacyCreateTools",e)}get isUsingLegacyCreateTools(){return this.viewModel.isUsingLegacyCreateTools}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}activateSelectionTool(e){return this.viewModel.activateSelectionTool(e)}cancelSelectionTool(){this.viewModel.cancelSelectionTool()}startCreateFeaturesWorkflowAtFeatureTypeSelection(){return this.viewModel.startCreateFeaturesWorkflowAtFeatureTypeSelection()}startCreateFeaturesWorkflowAtFeatureCreation(e){return this.viewModel.startCreateFeaturesWorkflowAtFeatureCreation(e)}startCreateFeaturesWorkflowAtFeatureEdit(e){return this.viewModel.startCreateFeaturesWorkflowAtFeatureEdit(e)}startMergeFeaturesWorkflow(e,t={}){return this.viewModel.startMergeFeaturesWorkflow(e,t)}startSplitFeatureWorkflow(e,t={}){return this.viewModel.startSplitFeatureWorkflow(e,t)}async startUpdateFeaturesWorkflow(e){return this.viewModel.startUpdateFeaturesWorkflow(e)}startUpdateWorkflowAtFeatureSelection(){return this.viewModel.startUpdateWorkflowAtFeatureSelection()}startUpdateWorkflowAtMultipleFeatureSelection(e){return this.viewModel.startUpdateWorkflowAtMultipleFeatureSelection(e)}startUpdateWorkflowAtFeatureEdit(e){return this.viewModel.startUpdateWorkflowAtFeatureEdit(e)}startUpdateWorkflowWithActiveSelection(){return this.viewModel.startUpdateWorkflowWithActiveSelection()}deleteFeatureFromWorkflow(){return s(o.getLogger(this),"Editor.deleteFeatureFromWorkflow is deprecated. Use Editor.deleteFeatures instead.",{version:"4.33",replacement:"Editor.deleteFeatures",warnOnce:!0}),this.deleteFeatures()}async deleteFeatures(){await this.viewModel.deleteFeatures()}deleteAssociationFromWorkflow(){return this.viewModel.deleteAssociationFromWorkflow()}cancelWorkflow(e){return this.viewModel.cancelWorkflow(e)}render(){const{visibleElements:e,viewModel:t}=this,i=this.classes(S.base,ne.widget,ne.panel);if(!t)return we("div",{class:i,key:"empty"});const{pageStack:s}=t,o=s.length-1,r=s.map((e,t)=>this._renderPage(e,t===o));return we("div",{class:i,key:"base"},e.flow?we("calcite-flow",{inert:!!this._prompt,key:"flow"},r):r,this._prompt?we(X,{...this._prompt,headingLevel:this.headingLevel}):void 0)}_renderPage(e,t){const i={selected:t};switch(e){case"disabled":break;case"ready":return this._renderReady(i);case"viewing-selection-list":return this._renderSelectionListPage(i);case"awaiting-feature-creation-info":return this._renderAwaitingFeatureCreationInfo(i);case"creating-features-upload-details":return this._renderUploadDetails(i);case"creating-features":return this._renderCreatingFeatures(i);case"editing-existing-feature":case"editing-features":case"editing-attributes":case"choosing-key-feature":return this._renderUpdateFeature(i);case"awaiting-update-feature-candidate":return this._renderFeatureList(i);case"adding-attachment":return this._renderAttachmentAdding(i);case"editing-attachment":return this._renderAttachmentEditing(i);case"viewing-associated-layers":case"viewing-associated-features":return this._renderViewAssociatedLayers(i);case"add-association-select-layer":case"add-association-select-feature":return this._renderSelectFeature(i);case"add-association-create-association":return this._renderAddAssociation(i);case"drawing-splitter-geometry":return this._renderDrawingSplitGeometry(i);case"reviewing-features":return this._renderReviewingSplitFeatures(i)}return we("div",{key:"empty-page"})}_renderAwaitingFeatureCreationInfo(e){const{EditorPanel:t,messages:i}=this;return we(t,{heading:i.selectTemplate,key:"templates-panel",...e},we(q,{key:"feature-templates"},we(K,null,this._renderFeatureTemplates())))}_renderUploadDetails(e){const{EditorPanel:t,activeWorkflow:i,messages:s}=this;if("create-features"!==i?.type)return null;const o=i.data.upload;return o?we(t,{heading:s.createFeatures,key:"upload-details-panel",...e},we(ie,{helpMessage:this._helpMessage,messages:s,upload:o})):null}_renderCreatingFeatures(e){const{EditorPanel:t,activeWorkflow:i,messages:s,messagesCommon:o,headingLevel:r,viewModel:a}=this;if(!i)return null;const n="create-features"===i.type&&i.numPendingFeatures>0||"update"===i.type&&"create-features"===i?.activeWorkflow?.type&&i.activeWorkflow?.numPendingFeatures>0;return we(t,{heading:s.createFeatures,key:"create-features-panel",...e},n?we(ee,{editorViewModel:a,headingLevel:r,messages:s,messagesCommon:o,renderAttachments:this._renderAttachments,renderBatchAttributeForm:this._renderBatchAttributeForm,renderFeatureForm:this._renderFeatureForm,renderSketchToolbar:this._renderSketch,visibleElements:this.visibleElements,onDelete:this._onDelete,onDeleteAssociation:this._onDeleteAssociation,onSave:this._onSave}):we(x,{helpMessage:this._helpMessage,renderSketchToolbar:this._renderSketch}))}_renderUpdateFeature(e){const{EditorPanel:t,messages:i,messagesCommon:s,headingLevel:o,viewModel:r}=this,a=r.activeFeatureCount>1?i.multiFeature.editPanelTitle:i.singleFeature.editPanelTitle;return we(t,{heading:a,key:"update-feature-panel",...e},we(ee,{editorViewModel:r,headingLevel:o,messages:i,messagesCommon:s,renderAttachments:this._renderAttachments,renderBatchAttributeForm:this._renderBatchAttributeForm,renderFeatureForm:this._renderFeatureForm,visibleElements:this.visibleElements,onDelete:this._onDelete,onDeleteAssociation:this._onDeleteAssociation,onMerge:this._onMerge,onSave:this._onSave,onSplit:this._onSplit}))}_renderDrawingSplitGeometry(e){const{EditorPanel:t}=this;return we(t,{heading:this.messages.splitFeature,key:"draw-split-geometry-panel",...e},we(x,{helpMessage:this._helpMessage,noticeMessage:this._noticeMessage,renderSketchToolbar:this._renderSketch}))}_renderReviewingSplitFeatures(e){const{EditorPanel:t,messages:i,messagesCommon:s,headingLevel:o,viewModel:r}=this;return we(t,{heading:i.splitFeature,key:"review-split-features-panel",...e},we(ee,{editorViewModel:r,headingLevel:o,messages:i,messagesCommon:s,renderAttachments:this._renderAttachments,renderBatchAttributeForm:this._renderBatchAttributeForm,renderFeatureForm:this._renderFeatureForm,visibleElements:this.visibleElements,onSave:this._onSave}))}_getAssociationTypeTitle(e){const{messages:t}=this;if(!e)return t.singleFeature.editPanelTitle;if(e.title)return e.title;const{messagesFeature:i}=this;switch(e.type){case"attachment":return i.associationsAttachments;case"connectivity":return i.associationsConnectivity;case"structure":return i.associationsStructure;case"content":return i.associationsContents;case"container":return i.associationsContainer}}_getAddAssociationTypeTitle(e){const{messages:t}=this;if(!e)return t.singleFeature.editPanelTitle;const i=t.associations;switch(e.type){case"attachment":return i.addAttachment;case"connectivity":return i.addConnectivity;case"structure":return i.addStructure;case"content":return i.addContent;case"container":return i.addContainer}}async _initializeAssociationItemList(e){const t=(await import("./FeatureForm/FeatureFormUtilityNetworkAssociations/UtilityNetworkAssociationItemList.js")).default;this._associationItemList=new t({view:this.view,viewModel:e})}async _initializeAssociationSettings(){const e=new(0,(await import("./FeatureForm/FeatureFormUtilityNetworkAssociations/UtilityNetworkAssociationSettings.js")).default);return this._associationSettings=e,e}_renderViewAssociatedLayers(e){const{EditorPanel:t,messages:i,messagesCommon:s,headingLevel:o,viewModel:r}=this,a=r.featureFormViewModel?.activeAssociationInput?.activeAssociationType,n=this._getAssociationTypeTitle(a);return we(t,{heading:n,key:"viewing-associated-layers-panel",...e},we(ee,{editorViewModel:r,headingLevel:o,messages:i,messagesCommon:s,renderAttachments:this._renderAttachments,renderBatchAttributeForm:this._renderBatchAttributeForm,renderFeatureForm:this._renderFeatureForm,renderSketchToolbar:this._renderSketch,visibleElements:this.visibleElements,onDelete:this._onDelete,onDeleteAssociation:this._onDeleteAssociation,onSave:this._onSave}))}_renderSelectFeature(e){const{_associationItemList:t,EditorPanel:i,viewModel:s,messagesCommon:o}=this,r=s.utilityNetworkAssociationAddAssociationViewModel,a=this._getAddAssociationTypeTitle(r?.associationType),n="ready"!==r?.state||this.viewModel.featureFormDisabled;return t?we(i,{heading:a,key:"add-association-select-feature",...e},we(q,{key:"select-feature"},we(K,null,t.render())),we(H,{buttons:[t.filterOptionsVisible?{appearance:"solid",label:o.apply,disabled:n,onClick:()=>t.applyFilterOptions(),type:"button"}:void 0,{appearance:"outline",label:o.cancel,disabled:n,onClick:()=>{"update"===s.activeWorkflow?.type&&(r?.reset(),s.activeWorkflow.cancelActiveWorkflow())},type:"button"}]})):we(i,{heading:a,key:"add-association-select-feature",...e})}async _setUpAssociationSettings(){const{viewModel:e}=this,t=this._associationSettings??await this._updatingHandles.addPromise(this._initializeAssociationSettings()),i=e.utilityNetworkAssociationAddAssociationViewModel,s="update"===e.activeWorkflow?.type?e.activeWorkflow:null,o=s?s.activeWorkflow:null,r="add-association"===o?.type?o.sourceFeatureItem:null,a=i?.selectedFeature,n=i?.association,l=i?.utilityNetwork;r&&a&&n&&l&&(t.sourceFeature=r,t.targetFeature=a,t.association=n,t.utilityNetwork=l)}_renderAddAssociation(e){const{_associationSettings:t,EditorPanel:i,viewModel:s,messagesCommon:o}=this;if(!t)return null;const r=s.utilityNetworkAssociationAddAssociationViewModel,a=this._getAddAssociationTypeTitle(r?.associationType),n="ready"!==r?.state;return we(i,{heading:a,key:"add-association",...e},we(q,{key:"add-association-content"},we(K,null,t.render())),we(H,{buttons:[{label:o.add,disabled:n||!r.canAddAssociation,onClick:()=>this._onSave(),type:"button"},{appearance:"outline",label:o.cancel,disabled:n,onClick:()=>{"update"===s.activeWorkflow?.type&&s.activeWorkflow.cancelActiveWorkflow()},type:"button"}]}))}_renderCustomTemplateGroupContent(e){const{messages:t,viewModel:i}=this,s=n(e.group.items,e=>i.itemHasInvalidFormTemplate(e)?t.formFieldCreateError:void 0);return s?we(z,{kind:"warning",message:s}):null}_renderAttachmentAdding(e){const{EditorPanel:t,_attachments:i,messages:s,messagesCommon:o}=this;return we(t,{heading:s.addAttachment,key:"attachment-adding-panel",...e},we(q,{key:"attachments"},this._renderAttachments()),we(H,{buttons:[{label:i.submitting?o.cancel:o.add,disabled:i.submitting||!i.selectedFile,onClick:this._onAttachmentAdd,type:"button"}]}))}_renderSelectionListPage(e){const{_hasSelectionFromMultipleLayers:i,_hasInvalidBatchSelection:s,_selectionCountExceedsMaximum:o,_selectionList:r,_visibleSelectionCount:a,messages:n,EditorPanel:l}=this,{batchUpdateActions:c}=this.visibleElements,{maxVisibleFeatureCountPerLayer:d}=r;return we(l,{heading:n.widgetLabel,key:"selection-list-panel",...e},this.visibleElements.selectionToolbar&&"3d"!==this.view?.type?we("div",{class:S.selectionToolbarContainer},this._renderSelectionToolbar()):void 0,we(q,{key:"selection-list"},we(K,null,this._renderSelectionList())),we(H,{buttons:[c?{label:t(n.batchEditing.editCount,{count:a}),disabled:s,onClick:()=>this.startUpdateWorkflowWithActiveSelection(),type:"button"}:void 0],notice:c&&i?{text:n.batchEditing.selectOneLayer,icon:"information"}:c&&o?{text:t(this.messages.multiFeature.formFailedToLoadTooManyFeatures,{num:d}),icon:"information"}:void 0}))}_renderAttachmentEditing(e){const{EditorPanel:t,_attachments:i,activeWorkflow:s,messages:o,messagesCommon:r}=this;return s?we(t,{heading:o.editAttachment,key:"attachment-editing-panel",...e},we(q,{key:"attachments"},this._renderAttachments()),s.shouldAllowAttachmentEditing?we(H,{buttons:[{label:r.update,disabled:i.submitting||!i.selectedFile,onClick:this._onAttachmentUpdate,type:"button"},{...this._deleteButtonCommonInfo,onClick:this._onAttachmentDelete,disabled:i.submitting,label:r.delete,type:"button"}]}):void 0):null}_renderReady(e){const{EditorPanel:t,messages:i,visibleElements:s}=this,o=this._helpMessage;return we(t,{heading:i.widgetLabel,key:"landing-panel",...e},we(q,{key:"landing-content"},this.editorItems.length?[s.editFeaturesSection?we(K,{key:"edit-actions"},this._renderUpdateActions()):null,s.createFeaturesSection&&this.viewModel.canCreateVisible?we(K,{key:"create-actions"},this._renderCreateActions()):null]:we(Z,{key:"no-content"},i.noEditableLayers)),o?we("div",{class:S.helpMessage,key:"footer-actions",slot:"footer"},o):void 0)}get _helpMessage(){return this.getHelpMessageString(this.activeWorkflow?.helpMessage)}get _noticeMessage(){return this.getHelpMessageString(this.activeWorkflow?.noticeMessage)}_renderUpdateActions(){const{messages:e,messagesCommon:t,viewModel:i}=this,s={id:"select",label:t.select};return we("div",{class:S.updateActions,key:"update-actions"},we(ce,{level:le(this.headingLevel)},e.editFeatures),this.visibleElements.selectionToolbar&&"3d"!==this.view?.type?we("div",{class:S.selectionToolbarContainer},this._renderSelectionToolbar()):we("calcite-list",{class:S.updateActionsList,label:e.editFeaturesList,selectionAppearance:"border",selectionMode:"single"},de({disabled:!i.canUpdateVisible,grouped:!1,item:s,selectedItem:"awaiting-feature-to-update"===i.activeWorkflow?.stepId?s:void 0,renderIcon:this._renderSelectIcon,onItemSelect:this._onToggleUpdateWorkflow})))}_renderCreateActions(){return we("div",{key:"create-actions"},we(ce,{level:le(this.headingLevel)},this.messages.createFeatures),we("div",{class:S.featureTemplatesContainer,key:"templates"},this._renderFeatureTemplates()))}_renderFeatureList(e){const{EditorPanel:i,viewModel:s}=this,{activeWorkflow:o}=s;if("update"!==o?.type)return null;const r=o.data.candidates,a=t(this.messages.multipleFeaturesTemplate,{total:r.length});return we(i,{heading:a,key:"feature-list",...e},we(O,{editorItems:this.editorItems,editorMessages:this.messages,filterText:this._filterText,id:this.id,messagesTemplates:this.messagesTemplates,workflow:o,onFilterTextChange:e=>this._filterText=e,onSelectFeature:(e,t)=>s.selectFeature(e,t),onZoomTo:e=>s.zoomTo(e)}))}_showPromptAndWait({title:e,message:t,yesLabel:i,noLabel:s}){const o=l(),{view:r}=this,a=r?.focused;return this._showPrompt({title:e,message:t,context:"danger",actions:{primary:{label:i,action:()=>o.resolve(!0)},secondary:{label:s,action:()=>o.resolve(!1)}}}),o.promise.finally(()=>{this._clearPrompt(),a&&r?.focus()})}async _onSelectionListItemSelect(e){await this.viewModel.onSelectionListItemSelect(e)}async _onSelectionListMenuItemSelect(e,t){await this.viewModel.onSelectionListMenuItemSelect(e,t)}async _setupSketch(){if(!!!this.visibleElements.sketch)return this._sketchImportAbortController=a(this._sketchImportAbortController),this._sketchToolbar=r(this._sketchToolbar),void this.removeHandles(ye);if(this._sketchImportAbortController)return;const e=new AbortController;this._sketchImportAbortController=e;const t=await import("./Sketch.js");if(!e.signal.aborted)try{this._sketchToolbar=new t.default({toolbarKind:"docked",contextualToolLocation:"inline-end",scale:"s",suppressDeprecationWarning:!0,visibleElements:new re({deleteButton:!1,settingsMenu:!1,directionModePicker:!1,selectionCountLabel:!1,duplicateButton:!1,createTools:new se({freehandPolygon:!0,freehandPolyline:!0}),selectionTools:new oe({"lasso-selection":!1,"rectangle-selection":!1})})}),this.addHandles([c(()=>{const e=this.viewModel.activeLeafWorkflow;return e&&"availableCreateTools"in e?e.availableCreateTools:null},e=>{this._sketchToolbar&&(this._sketchToolbar.availableCreateTools=e)},d),c(()=>this.visibleElements.undoRedoButtons,e=>{this._sketchToolbar&&(this._sketchToolbar.visibleElements.undoRedoMenu=e)},d),m(()=>this.viewModel?.sketchViewModel,e=>{this._sketchToolbar&&(this._sketchToolbar.viewModel=e)},d),m(()=>this.viewModel.sketchViewModel?.pluginManager,e=>{e.sketch=this._sketchToolbar},d)],ye)}finally{this._sketchImportAbortController=null}}getHelpMessageString(e){const{messages:t,view:i}=this;return e?t["3d"===i?.type?"helpMessages3d":"helpMessages2d"]?.[e]:void 0}get test(){return{sketch:this._sketchToolbar,showPrompt:this._showPromptAndWait.bind(this)}}};e([p()],be.prototype,"_batchAttributeForm",void 0),e([p()],be.prototype,"_featureForm",void 0),e([p()],be.prototype,"_sketchToolbar",void 0),e([p()],be.prototype,"_attachments",void 0),e([p()],be.prototype,"_associationItemList",void 0),e([p()],be.prototype,"_associationSettings",void 0),e([p()],be.prototype,"_featureTemplates",void 0),e([p()],be.prototype,"_filterText",void 0),e([p()],be.prototype,"_hasInvalidBatchSelection",null),e([p()],be.prototype,"_hasSelectionFromMultipleLayers",null),e([p()],be.prototype,"_hasSelectionWithUneditableFeatures",null),e([p()],be.prototype,"_prompt",void 0),e([p()],be.prototype,"_spinner",void 0),e([p()],be.prototype,"_deleteButtonCommonInfo",null),e([p()],be.prototype,"_loading",void 0),e([p()],be.prototype,"_selectionCountExceedsMaximum",null),e([p()],be.prototype,"_selectionList",void 0),e([p()],be.prototype,"_selectionListItemActionConfigs",null),e([p()],be.prototype,"_selectionToolbar",void 0),e([p()],be.prototype,"_visibleSelectionCount",null),e([p({readOnly:!0})],be.prototype,"activeWorkflow",null),e([p()],be.prototype,"editorItems",null),e([p()],be.prototype,"effectiveSelectionManager",null),e([p()],be.prototype,"headingLevel",void 0),e([p()],be.prototype,"hideTemplatesForInactiveLayers",null),e([p()],be.prototype,"icon",null),e([p()],be.prototype,"label",null),e([p({type:w})],be.prototype,"labelOptions",null),e([p()],be.prototype,"layerInfos",null),e([p(),ue("esri/widgets/Editor/t9n/Editor")],be.prototype,"messages",void 0),e([p(),ue("esri/t9n/common")],be.prototype,"messagesCommon",void 0),e([p(),ue("esri/widgets/FeatureTemplates/t9n/FeatureTemplates")],be.prototype,"messagesTemplates",void 0),e([p(),ue("esri/widgets/Feature/t9n/Feature")],be.prototype,"messagesFeature",void 0),e([p()],be.prototype,"selectionManager",null),e([p({type:f})],be.prototype,"snappingOptions",null),e([p()],be.prototype,"syncWithViewSelectionManager",null),e([p()],be.prototype,"syncViewSelection",null),e([p({type:v})],be.prototype,"tooltipOptions",null),e([p()],be.prototype,"supportingWidgetDefaults",void 0),e([p({type:_,nonNullable:!0})],be.prototype,"valueOptions",null),e([p({constructOnly:!0,value:!1})],be.prototype,"useLegacyCreateTools",null),e([p()],be.prototype,"isUsingLegacyCreateTools",null),e([p()],be.prototype,"view",null),e([p({type:C}),ge(["sketch-create","sketch-delete","sketch-update","workflow-cancel","workflow-commit"])],be.prototype,"viewModel",void 0),e([p({type:E,nonNullable:!0})],be.prototype,"visibleElements",void 0),e([p()],be.prototype,"_helpMessage",null),e([p()],be.prototype,"_noticeMessage",null),be=e([u("esri.widgets.Editor")],be);const ke=be;export{ke as default};
|
|
2
|
+
import{__decorate as e}from"tslib";import{substitute as t}from"../intl.js";import{deprecateWidget as i,deprecatedFunction as s}from"../core/deprecate.js";import o from"../core/Logger.js";import{destroyMaybe as r,abortMaybe as a,mappedFind as n}from"../core/maybe.js";import{createResolver as l}from"../core/promiseUtils.js";import{watch as c,initial as d,on as h,when as m}from"../core/reactiveUtils.js";import{property as p,subclass as u}from"../core/accessorSupport/decorators.js";import{UpdatingHandles as g}from"../core/support/UpdatingHandles.js";import w from"../views/interactive/sketch/SketchLabelOptions.js";import v from"../views/interactive/sketch/SketchTooltipOptions.js";import _ from"../views/interactive/sketch/SketchValueOptions.js";import f from"../views/interactive/snapping/SnappingOptions.js";import y from"./Attachments.js";import b from"./BatchAttributeForm.js";import k from"./FeatureForm.js";import M from"./FeatureTemplates.js";import F from"./Spinner.js";import A from"./Widget.js";import T from"./BatchAttributeForm/VisibleElements.js";import{css as S}from"./Editor/css.js";import C from"./Editor/EditorViewModel.js";import{isModelUpload as L}from"./Editor/modelUploadUtils.js";import E from"./Editor/VisibleElements.js";import{findEditorItemForLayer as W,isFeatureFormViewModel as I,isUpdateWorkflow as P,isUpdateFeaturesWorkflow as U,isUpdateFeatureWorkflow as j,isBatchAttributeFormViewModel as V}from"./Editor/workflowUtils.js";import{loadCreateFeaturesPanelContentComponents as D,CreateFeaturesPanelContent as x}from"./Editor/components/CreateFeaturesPanelContent.js";import{loadFeatureListComponents as B,FeatureList as O}from"./Editor/components/FeatureList.js";import{loadFooterActionsComponents as N,FooterActions as H}from"./Editor/components/FooterActions.js";import{loadNoticesComponents as G,Notice as z}from"./Editor/components/Notices.js";import{loadPanelContentComponents as R,PanelContent as q,PanelContentSection as K,PanelContentMessage as Z}from"./Editor/components/PanelContent.js";import{PanelToolbar as $,loadPanelToolbarComponents as J}from"./Editor/components/PanelToolbar.js";import{loadPromptComponents as Q,Prompt as X}from"./Editor/components/Prompt.js";import{loadUpdateFeaturePanelContentComponents as Y,UpdateFeaturePanelContent as ee}from"./Editor/components/UpdateFeaturePanelContent.js";import{loadUploadDetailsComponents as te,UploadDetails as ie}from"./Editor/components/UploadDetails.js";import se from"./Sketch/CreateToolVisibilityMap.js";import oe from"./Sketch/SelectionToolVisibilityMap.js";import re from"./Sketch/VisibleElements.js";import{loadCalciteComponents as ae}from"./support/componentsUtils.js";import{globalCss as ne}from"./support/globalCss.js";import{incrementHeadingLevel as le,Heading as ce}from"./support/Heading.js";import{renderItem as de}from"./support/ItemList.js";import{connectDelayedLoading as he}from"./support/loaderUtils.js";import me from"./support/SelectionList.js";import pe from"./support/SelectionToolbar.js";import{messageBundle as ue,vmEvent as ge,tsx as we}from"./support/widget.js";import{isLayerItem as ve}from"./support/SelectionList/selectionListUtils.js";import _e from"./support/SelectionList/VisibleElements.js";import fe from"./support/SelectionToolbar/VisibleElements.js";const ye=Symbol("sketch-setup-handles");let be=class extends A{constructor(e,s){super(e,s),this._batchAttributeForm=new b({suppressDeprecationWarning:!0,visibleElements:new T({loadingIndicator:!1})}),this._featureForm=new k({suppressDeprecationWarning:!0}),this._sketchToolbar=null,this._attachments=new y({visibleElements:{addSubmitButton:!1,cancelAddButton:!1,cancelUpdateButton:!1,deleteButton:!1,errorMessage:!1,progressBar:!1,updateButton:!1},suppressDeprecationWarning:!0}),this._associationItemList=null,this._associationSettings=null,this._featureTemplates=new M({suppressDeprecationWarning:!0,enableListScroll:!1,renderItemContentEnd:e=>e.supportsUpload?we("calcite-icon",{class:S.templateItemContentEnd,icon:"upload-to",key:"upload-icon"}):null,renderItemLabel:e=>e.label,renderCustomGroupContent:e=>this._renderCustomTemplateGroupContent(e)}),this._filterText="",this._prompt=null,this._spinner=new F,this._loading=!1,this._selectionList=new me({displayMode:"layer",itemActionConfigs:this._selectionListItemActionConfigs,itemUnavailableFunction:({item:e})=>!W(this.editorItems,e.layer)?.editable,onListItemSelect:({item:e})=>this._onSelectionListItemSelect(e),visibleElements:new _e({header:!1})}),this._selectionToolbar=new pe({visibleElements:new fe({chip:!1})}),this._updatingHandles=new g,this.headingLevel=4,this.messages=null,this.messagesCommon=null,this.messagesTemplates=null,this.messagesFeature=null,this.supportingWidgetDefaults=null,this.viewModel=null,this.visibleElements=new E,this._renderAttachments=()=>this._attachments.render(),this._renderFeatureForm=()=>this._featureForm.render(),this._renderBatchAttributeForm=()=>this._batchAttributeForm.render(),this._renderFeatureTemplates=()=>this._featureTemplates.render(),this._renderSelectionList=()=>this._selectionList.render(),this._renderSelectionToolbar=()=>this._selectionToolbar.render(),this._renderSketch=()=>this._sketchToolbar?we("div",{class:S.sketchContainer,key:"editor-sketch-container"},this._sketchToolbar?.render()):void 0,this._renderSelectIcon=()=>we("calcite-icon",{icon:"cursor",slot:"content-start"}),this.EditorPanel=({heading:e,key:t,selected:i},...s)=>{const{visibleElements:o}=this;return we("calcite-flow-item",{closable:!1,heading:e,headingLevel:this.headingLevel,key:t,loading:this._loading,selected:i,onCalciteFlowItemBack:this._onBack},o.settingsMenu?we($,{editorViewModel:this.viewModel,messagesCommon:this.messagesCommon,visibleElements:o}):null,...s)},this._showConfirmationPrompt=e=>this._showPromptAndWait(this.messages[e]),this._showDiscardEditsPrompt=()=>{const{messages:e,activeWorkflow:t}=this,i={title:e.cancelEditTitle,message:e.cancelEditWarningMessage,yesLabel:e.discardEdits,noLabel:e.continueEditing};return"create-features"===t?.type&&L(t.data.creationInfo)?this._showPromptAndWait("success"===t.data.upload?.state?e.modelUploads.cancelPlacementPrompt:e.modelUploads.cancelUploadPrompt):"update"===t?.type&&I(t.formViewModel)&&t.formViewModel.activeAssociation?this._showPromptAndWait({...i,message:e.cancelAssociationEditWarning}):this._showPromptAndWait(i)},this._showGenericCancelPrompt=()=>{const{messages:e,messagesCommon:t}=this;return this._showPromptAndWait({title:e.cancelRequestTitle,message:e.cancelRequestWarningMessage,yesLabel:t.form.yes,noLabel:t.form.no})},this._showPrompt=e=>{this._prompt?.cancel?.(),this._prompt=e},this._clearPrompt=()=>{this._prompt=null},this._onSave=()=>{this.viewModel.saveWorkflow()},this._onMerge=()=>{const{activeWorkflow:e}=this.viewModel;if(P(e)){const t=e.activeWorkflow;U(t)&&e.startMergingFeatures(t.viewGraphics,{initialFeatures:t.data.initialFeatures})}},this._onSplit=()=>{const{activeWorkflow:e}=this.viewModel;if(P(e)){const t=e.activeWorkflow;if(j(t)){const i=t.viewGraphic;i&&e.startSplittingFeature(i,{initialFeature:t.data.edits.initialFeature??i})}}},this._onDelete=()=>{const e=this.viewModel.activeFeatureCount,i=e>1?this.messages.multiFeature:this.messages.singleFeature;this._showPrompt({title:i.deleteWarningTitle,message:i.deleteWarningMessage,context:"danger",actions:{primary:{label:t(i.delete,{count:e}),action:()=>{this.deleteFeatures(),this._clearPrompt()}},secondary:{label:i.keep,action:this._clearPrompt}}})},this._onDeleteAssociation=()=>{const{messages:e,messagesCommon:t}=this;this._showPrompt({title:e.deleteAssociationTitle,message:e.deleteAssociationMessage,context:"danger",actions:{primary:{label:t.delete,action:()=>{this.deleteAssociationFromWorkflow(),this._clearPrompt()}},secondary:{label:e.keepAssociation,action:this._clearPrompt}}})},this._onToggleUpdateWorkflow=()=>this.viewModel.toggleUpdateWorkflow(),this._onBack=e=>(e?.stopPropagation(),this.viewModel.back()),this._onAttachmentAdd=()=>{const{activeWorkflow:e}=this.viewModel;e&&("create-features"===e.type||"update"===e.type&&"create-features"===e.activeWorkflow?.type?(this._attachments.addFile(),e.back()):this._attachments.addAttachment().then(()=>e.back()))},this._onAttachmentUpdate=()=>{const{activeWorkflow:e}=this.viewModel;e&&("create-features"===e.type?(this._attachments.updateFile(),e.back()):this._attachments.updateAttachment().then(()=>e.back()))},this._onAttachmentDelete=()=>{const{messages:e,messagesCommon:t}=this;this._showPrompt({title:e.deleteAttachmentWarningTitle,message:e.deleteAttachmentWarningMessage,context:"danger",actions:{primary:{label:t.delete,action:this._onAttachmentDeleteConfirm},secondary:{label:e.keepAttachment,action:this._clearPrompt}}})},this._onAttachmentDeleteConfirm=async()=>{const e=this._attachments,{activeWorkflow:t}=this.viewModel;t&&("create-features"===t.type?e.deleteFile():(await e.deleteAttachment(e.viewModel.activeAttachmentInfo),this._clearPrompt()),await t.back(),this._clearPrompt())},this._onAttachmentsError=e=>{this._showPrompt({title:this.messages.errorWarningTitle,message:e.message,context:"warning",actions:{primary:{label:this.messagesCommon.form.ok,action:this._clearPrompt}}})},this.viewModel=e?.viewModel||new C({useLegacyCreateTools:e?.useLegacyCreateTools??"2d"!==e?.view?.type}),this.announceDeprecation=()=>{i(o.getLogger(this),"Editor","arcgis-editor",{version:"5.0"})}}initialize(){this._featureForm.showPrompt=this._showPrompt,this._featureForm.clearPrompt=this._clearPrompt,this.addHandles([c(()=>le(this.headingLevel),e=>{this._featureForm.headingLevel=e,this._featureTemplates.headingLevel=e},d),h(()=>this.viewModel.activeWorkflow,"cancel-request",({controller:e})=>{(this.viewModel.hasPendingEdits?this._showDiscardEditsPrompt():this._showGenericCancelPrompt()).then(t=>t?e.allow():e.deny())}),m(()=>this.viewModel.formViewModel,e=>{V(e)?this._batchAttributeForm.viewModel=e:this._featureForm.viewModel=e},d),m(()=>this.viewModel.utilityNetworkAssociationAddAssociationViewModel,e=>{this._associationItemList?this._associationItemList.viewModel=e:this._updatingHandles.consumePromise(this._initializeAssociationItemList(e))},d),m(()=>this.viewModel.utilityNetworkAssociationAddAssociationViewModel?.association,()=>{this._setUpAssociationSettings()}),c(()=>[this.viewModel,this.viewModel?.attachmentsViewModel,this.viewModel?.featureTemplatesViewModel,this.viewModel?.spinnerViewModel,this.viewModel?.selectionListViewModel,this.viewModel?.selectionToolbarViewModel],([e,t,i,s,o,r])=>{this._attachments.viewModel=t,this._featureTemplates.viewModel=i,this._spinner.viewModel=s,this._selectionList.viewModel=o,this._selectionToolbar.viewModel=r,e.showDiscardEditsPrompt=this._showDiscardEditsPrompt,e.showConfirmationPrompt=this._showConfirmationPrompt},d),c(()=>this.view,(e,t)=>{const i=`editor-${this.id}-spinner`;t?.ui.remove(this._spinner,i),e?.ui.add(this._spinner,{key:i,position:"manual"}),this._associationItemList&&(this._associationItemList.view=e)},d),c(()=>[this.supportingWidgetDefaults,this.viewModel.sketchViewModel],([e])=>{e&&(e.attachments&&this._attachments.set(e.attachments),e.featureForm&&this._featureForm.set(e.featureForm),e.featureTemplates&&this._featureTemplates.set(e.featureTemplates),e.selectionToolbar&&this._selectionToolbar.set(e.selectionToolbar),e.sketch&&this.viewModel.sketchViewModel?.set(e.sketch))},d),m(()=>this._attachments?.error,e=>this._onAttachmentsError(e)),m(()=>this._selectionListItemActionConfigs,()=>{this._selectionList.itemActionConfigs=this._selectionListItemActionConfigs}),m(()=>this.viewModel?.failures,e=>{const{messages:i}=this,[{error:s,retry:o,cancel:r}]=e;this._showPrompt({title:i.errorWarningTitle,message:t(i.errorWarningMessageTemplate,{errorMessage:s.message}),context:"warning",actions:{primary:{label:i.retry,action:()=>{o(),this._clearPrompt()}},secondary:{label:i.ignore,action:()=>{r(),this._clearPrompt()}}}})}),c(()=>this.viewModel?.state,e=>{switch(e){case"awaiting-feature-to-update":case"ready":case"disabled":this._filterText="",this._featureTemplates.filterText=""}}),c(()=>this.viewModel.featureFormDisabled,e=>this._featureForm.disabled=e),c(()=>this.visibleElements.sketch,()=>this._setupSketch(),d),c(()=>this.visibleElements.zoomToButton,e=>this._selectionList.visibleElements.zoomToButton=e,d),he({getLoading:()=>{const{viewModel:e}=this;return e.syncing||e.updating||this._attachments.submitting||this._updatingHandles.updating},setEffectiveLoading:e=>{this._loading=e}})])}destroy(){this._associationItemList?.destroy(),this._associationSettings?.destroy(),this._selectionList.destroy(),this._selectionToolbar.destroy(),this._attachments.destroy(),this._batchAttributeForm.destroy(),this._featureForm.destroy(),this._featureTemplates.destroy(),this._spinner.destroy(),this._sketchToolbar=r(this._sketchToolbar),this._sketchImportAbortController=a(this._sketchImportAbortController)}loadDependencies(){return Promise.all([ae({flow:()=>import("@esri/calcite-components/dist/components/calcite-flow"),"flow-item":()=>import("@esri/calcite-components/dist/components/calcite-flow-item"),icon:()=>import("@esri/calcite-components/dist/components/calcite-icon"),list:()=>import("@esri/calcite-components/dist/components/calcite-list")}),D(),B(),N(),G(),R(),J(),Q(),Y(),te()])}get _hasInvalidBatchSelection(){return this._hasSelectionWithUneditableFeatures||this._hasSelectionFromMultipleLayers||this._selectionCountExceedsMaximum||0===this._selectionList.visibleFeatureCount}get _hasSelectionFromMultipleLayers(){return this._selectionList.visibleLayerCount>1}get _hasSelectionWithUneditableFeatures(){const e=this.editorItems;return this._selectionList.visibleFeatureItems.some(t=>!W(e,t.layer))}get _deleteButtonCommonInfo(){return{appearance:"outline",kind:"danger"}}get _selectionCountExceedsMaximum(){const e=this._batchAttributeForm.maximumFeatureCount,{activeLayerItem:t,effectiveCount:i,filterText:s,visibleFeatureCount:o}=this._selectionList;return null!=s&&""!==s?o>e:t?t.total>e:i>e}get _selectionListItemActionConfigs(){const{messages:e,visibleElements:t}=this,i=t?.mergeButton??!0;return[{label:e?.batchEditing?.editThisFeature,icon:"edit-attributes",type:"feature",hidden:({item:e})=>!W(this.editorItems,e.layer)?.editable,callback:({item:e})=>this._onSelectionListMenuItemSelect(e,"update")},{label:e?.batchEditing.editTheseFeatures,icon:"edit-attributes",type:"layer",hidden:({item:e})=>!W(this.editorItems,e.layer)?.editable,callback:({item:e})=>this._onSelectionListMenuItemSelect(e,"update")},{label:e?.batchEditing.mergeTheseFeatures,icon:"merge",type:"layer",hidden:!i||(({item:e})=>{if(!ve(e))return!0;const t=W(this.editorItems,e.layer);return!t||(!t.editable||!t.supportsMergeFeaturesWorkflow||e.visibleTotal<2)}),callback:({item:e})=>this._onSelectionListMenuItemSelect(e,"merge")}]}get _visibleSelectionCount(){const{activeLayerItem:e,effectiveCount:t,filterText:i,visibleFeatureCount:s}=this._selectionList;return null!=i&&""!==i?s:e?e.total:t}get activeWorkflow(){return this.viewModel.activeWorkflow}get editorItems(){return this.viewModel.editorItems}get effectiveSelectionManager(){return this.viewModel.effectiveSelectionManager}get hideTemplatesForInactiveLayers(){return this.viewModel.hideTemplatesForInactiveLayers}set hideTemplatesForInactiveLayers(e){this.viewModel.hideTemplatesForInactiveLayers=e}get icon(){return"pencil"}set icon(e){this._overrideIfSome("icon",e)}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get labelOptions(){return this.viewModel.labelOptions}set labelOptions(e){this.viewModel.labelOptions=e}get layerInfos(){return this.viewModel.layerInfos}set layerInfos(e){this.viewModel.layerInfos=e}get selectionManager(){return this.viewModel.selectionManager}set selectionManager(e){this.viewModel.selectionManager=e}get snappingOptions(){return this.viewModel.snappingOptions}set snappingOptions(e){this.viewModel.snappingOptions=e}get syncWithViewSelectionManager(){return this.syncViewSelection}set syncWithViewSelectionManager(e){this.syncViewSelection=e}get syncViewSelection(){return this.viewModel.syncViewSelection}set syncViewSelection(e){this.viewModel.syncViewSelection=e}get tooltipOptions(){return this.viewModel.tooltipOptions}set tooltipOptions(e){this.viewModel.tooltipOptions=e}get valueOptions(){return this.viewModel.valueOptions}set valueOptions(e){this.viewModel.valueOptions=e}get useLegacyCreateTools(){return this.viewModel.useLegacyCreateTools}set useLegacyCreateTools(e){this.viewModel.useLegacyCreateTools=e}get isUsingLegacyCreateTools(){return this.viewModel.isUsingLegacyCreateTools}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}activateSelectionTool(e){return this.viewModel.activateSelectionTool(e)}cancelSelectionTool(){this.viewModel.cancelSelectionTool()}startCreateFeaturesWorkflowAtFeatureTypeSelection(){return this.viewModel.startCreateFeaturesWorkflowAtFeatureTypeSelection()}startCreateFeaturesWorkflowAtFeatureCreation(e){return this.viewModel.startCreateFeaturesWorkflowAtFeatureCreation(e)}startCreateFeaturesWorkflowAtFeatureEdit(e){return this.viewModel.startCreateFeaturesWorkflowAtFeatureEdit(e)}startMergeFeaturesWorkflow(e,t={}){return this.viewModel.startMergeFeaturesWorkflow(e,t)}startSplitFeatureWorkflow(e,t={}){return this.viewModel.startSplitFeatureWorkflow(e,t)}async startUpdateFeaturesWorkflow(e){return this.viewModel.startUpdateFeaturesWorkflow(e)}startUpdateWorkflowAtFeatureSelection(){return this.viewModel.startUpdateWorkflowAtFeatureSelection()}startUpdateWorkflowAtMultipleFeatureSelection(e){return this.viewModel.startUpdateWorkflowAtMultipleFeatureSelection(e)}startUpdateWorkflowAtFeatureEdit(e){return this.viewModel.startUpdateWorkflowAtFeatureEdit(e)}startUpdateWorkflowWithActiveSelection(){return this.viewModel.startUpdateWorkflowWithActiveSelection()}deleteFeatureFromWorkflow(){return s(o.getLogger(this),"Editor.deleteFeatureFromWorkflow is deprecated. Use Editor.deleteFeatures instead.",{version:"4.33",replacement:"Editor.deleteFeatures",warnOnce:!0}),this.deleteFeatures()}async deleteFeatures(){await this.viewModel.deleteFeatures()}deleteAssociationFromWorkflow(){return this.viewModel.deleteAssociationFromWorkflow()}cancelWorkflow(e){return this.viewModel.cancelWorkflow(e)}render(){const{visibleElements:e,viewModel:t}=this,i=this.classes(S.base,ne.widget,ne.panel);if(!t)return we("div",{class:i,key:"empty"});const{pageStack:s}=t,o=s.length-1,r=s.map((e,t)=>this._renderPage(e,t===o));return we("div",{class:i,key:"base"},e.flow?we("calcite-flow",{inert:!!this._prompt,key:"flow"},r):r,this._prompt?we(X,{...this._prompt,headingLevel:this.headingLevel}):void 0)}_renderPage(e,t){const i={selected:t};switch(e){case"disabled":break;case"ready":return this._renderReady(i);case"viewing-selection-list":return this._renderSelectionListPage(i);case"awaiting-feature-creation-info":return this._renderAwaitingFeatureCreationInfo(i);case"creating-features-upload-details":return this._renderUploadDetails(i);case"creating-features":return this._renderCreatingFeatures(i);case"editing-existing-feature":case"editing-features":case"editing-attributes":case"choosing-key-feature":return this._renderUpdateFeature(i);case"awaiting-update-feature-candidate":return this._renderFeatureList(i);case"adding-attachment":return this._renderAttachmentAdding(i);case"editing-attachment":return this._renderAttachmentEditing(i);case"viewing-associated-layers":case"viewing-associated-features":return this._renderViewAssociatedLayers(i);case"add-association-select-layer":case"add-association-select-feature":return this._renderSelectFeature(i);case"add-association-create-association":return this._renderAddAssociation(i);case"drawing-splitter-geometry":return this._renderDrawingSplitGeometry(i);case"reviewing-features":return this._renderReviewingSplitFeatures(i)}return we("div",{key:"empty-page"})}_renderAwaitingFeatureCreationInfo(e){const{EditorPanel:t,messages:i}=this;return we(t,{heading:i.selectTemplate,key:"templates-panel",...e},we(q,{key:"feature-templates"},we(K,null,this._renderFeatureTemplates())))}_renderUploadDetails(e){const{EditorPanel:t,activeWorkflow:i,messages:s}=this;if("create-features"!==i?.type)return null;const o=i.data.upload;return o?we(t,{heading:s.createFeatures,key:"upload-details-panel",...e},we(ie,{helpMessage:this._helpMessage,messages:s,upload:o})):null}_renderCreatingFeatures(e){const{EditorPanel:t,activeWorkflow:i,messages:s,messagesCommon:o,headingLevel:r,viewModel:a}=this;if(!i)return null;const n="create-features"===i.type&&i.numPendingFeatures>0||"update"===i.type&&"create-features"===i?.activeWorkflow?.type&&i.activeWorkflow?.numPendingFeatures>0;return we(t,{heading:s.createFeatures,key:"create-features-panel",...e},n?we(ee,{editorViewModel:a,headingLevel:r,messages:s,messagesCommon:o,renderAttachments:this._renderAttachments,renderBatchAttributeForm:this._renderBatchAttributeForm,renderFeatureForm:this._renderFeatureForm,renderSketchToolbar:this._renderSketch,visibleElements:this.visibleElements,onDelete:this._onDelete,onDeleteAssociation:this._onDeleteAssociation,onSave:this._onSave}):we(x,{helpMessage:this._helpMessage,noticeMessage:this._noticeMessage,renderSketchToolbar:this._renderSketch}))}_renderUpdateFeature(e){const{EditorPanel:t,messages:i,messagesCommon:s,headingLevel:o,viewModel:r}=this,a=r.activeFeatureCount>1?i.multiFeature.editPanelTitle:i.singleFeature.editPanelTitle;return we(t,{heading:a,key:"update-feature-panel",...e},we(ee,{editorViewModel:r,headingLevel:o,messages:i,messagesCommon:s,renderAttachments:this._renderAttachments,renderBatchAttributeForm:this._renderBatchAttributeForm,renderFeatureForm:this._renderFeatureForm,visibleElements:this.visibleElements,onDelete:this._onDelete,onDeleteAssociation:this._onDeleteAssociation,onMerge:this._onMerge,onSave:this._onSave,onSplit:this._onSplit}))}_renderDrawingSplitGeometry(e){const{EditorPanel:t}=this;return we(t,{heading:this.messages.splitFeature,key:"draw-split-geometry-panel",...e},we(x,{helpMessage:this._helpMessage,noticeMessage:this._noticeMessage,renderSketchToolbar:this._renderSketch}))}_renderReviewingSplitFeatures(e){const{EditorPanel:t,messages:i,messagesCommon:s,headingLevel:o,viewModel:r}=this;return we(t,{heading:i.splitFeature,key:"review-split-features-panel",...e},we(ee,{editorViewModel:r,headingLevel:o,messages:i,messagesCommon:s,renderAttachments:this._renderAttachments,renderBatchAttributeForm:this._renderBatchAttributeForm,renderFeatureForm:this._renderFeatureForm,visibleElements:this.visibleElements,onSave:this._onSave}))}_getAssociationTypeTitle(e){const{messages:t}=this;if(!e)return t.singleFeature.editPanelTitle;if(e.title)return e.title;const{messagesFeature:i}=this;switch(e.type){case"attachment":return i.associationsAttachments;case"connectivity":return i.associationsConnectivity;case"structure":return i.associationsStructure;case"content":return i.associationsContents;case"container":return i.associationsContainer}}_getAddAssociationTypeTitle(e){const{messages:t}=this;if(!e)return t.singleFeature.editPanelTitle;const i=t.associations;switch(e.type){case"attachment":return i.addAttachment;case"connectivity":return i.addConnectivity;case"structure":return i.addStructure;case"content":return i.addContent;case"container":return i.addContainer}}async _initializeAssociationItemList(e){const t=(await import("./FeatureForm/FeatureFormUtilityNetworkAssociations/UtilityNetworkAssociationItemList.js")).default;this._associationItemList=new t({view:this.view,viewModel:e})}async _initializeAssociationSettings(){const e=new(0,(await import("./FeatureForm/FeatureFormUtilityNetworkAssociations/UtilityNetworkAssociationSettings.js")).default);return this._associationSettings=e,e}_renderViewAssociatedLayers(e){const{EditorPanel:t,messages:i,messagesCommon:s,headingLevel:o,viewModel:r}=this,a=r.featureFormViewModel?.activeAssociationInput?.activeAssociationType,n=this._getAssociationTypeTitle(a);return we(t,{heading:n,key:"viewing-associated-layers-panel",...e},we(ee,{editorViewModel:r,headingLevel:o,messages:i,messagesCommon:s,renderAttachments:this._renderAttachments,renderBatchAttributeForm:this._renderBatchAttributeForm,renderFeatureForm:this._renderFeatureForm,renderSketchToolbar:this._renderSketch,visibleElements:this.visibleElements,onDelete:this._onDelete,onDeleteAssociation:this._onDeleteAssociation,onSave:this._onSave}))}_renderSelectFeature(e){const{_associationItemList:t,EditorPanel:i,viewModel:s,messagesCommon:o}=this,r=s.utilityNetworkAssociationAddAssociationViewModel,a=this._getAddAssociationTypeTitle(r?.associationType),n="ready"!==r?.state||this.viewModel.featureFormDisabled;return t?we(i,{heading:a,key:"add-association-select-feature",...e},we(q,{key:"select-feature"},we(K,null,t.render())),we(H,{buttons:[t.filterOptionsVisible?{appearance:"solid",label:o.apply,disabled:n,onClick:()=>t.applyFilterOptions(),type:"button"}:void 0,{appearance:"outline",label:o.cancel,disabled:n,onClick:()=>{"update"===s.activeWorkflow?.type&&(r?.reset(),s.activeWorkflow.cancelActiveWorkflow())},type:"button"}]})):we(i,{heading:a,key:"add-association-select-feature",...e})}async _setUpAssociationSettings(){const{viewModel:e}=this,t=this._associationSettings??await this._updatingHandles.addPromise(this._initializeAssociationSettings()),i=e.utilityNetworkAssociationAddAssociationViewModel,s="update"===e.activeWorkflow?.type?e.activeWorkflow:null,o=s?s.activeWorkflow:null,r="add-association"===o?.type?o.sourceFeatureItem:null,a=i?.selectedFeature,n=i?.association,l=i?.utilityNetwork;r&&a&&n&&l&&(t.sourceFeature=r,t.targetFeature=a,t.association=n,t.utilityNetwork=l)}_renderAddAssociation(e){const{_associationSettings:t,EditorPanel:i,viewModel:s,messagesCommon:o}=this;if(!t)return null;const r=s.utilityNetworkAssociationAddAssociationViewModel,a=this._getAddAssociationTypeTitle(r?.associationType),n="ready"!==r?.state;return we(i,{heading:a,key:"add-association",...e},we(q,{key:"add-association-content"},we(K,null,t.render())),we(H,{buttons:[{label:o.add,disabled:n||!r.canAddAssociation,onClick:()=>this._onSave(),type:"button"},{appearance:"outline",label:o.cancel,disabled:n,onClick:()=>{"update"===s.activeWorkflow?.type&&s.activeWorkflow.cancelActiveWorkflow()},type:"button"}]}))}_renderCustomTemplateGroupContent(e){const{messages:t,viewModel:i}=this,s=n(e.group.items,e=>i.itemHasInvalidFormTemplate(e)?t.formFieldCreateError:void 0);return s?we(z,{kind:"warning",message:s}):null}_renderAttachmentAdding(e){const{EditorPanel:t,_attachments:i,messages:s,messagesCommon:o}=this;return we(t,{heading:s.addAttachment,key:"attachment-adding-panel",...e},we(q,{key:"attachments"},this._renderAttachments()),we(H,{buttons:[{label:i.submitting?o.cancel:o.add,disabled:i.submitting||!i.selectedFile,onClick:this._onAttachmentAdd,type:"button"}]}))}_renderSelectionListPage(e){const{_hasSelectionFromMultipleLayers:i,_hasInvalidBatchSelection:s,_selectionCountExceedsMaximum:o,_selectionList:r,_visibleSelectionCount:a,messages:n,EditorPanel:l}=this,{batchUpdateActions:c}=this.visibleElements,{maxVisibleFeatureCountPerLayer:d}=r;return we(l,{heading:n.widgetLabel,key:"selection-list-panel",...e},this.visibleElements.selectionToolbar&&"3d"!==this.view?.type?we("div",{class:S.selectionToolbarContainer},this._renderSelectionToolbar()):void 0,we(q,{key:"selection-list"},we(K,null,this._renderSelectionList())),we(H,{buttons:[c?{label:t(n.batchEditing.editCount,{count:a}),disabled:s,onClick:()=>this.startUpdateWorkflowWithActiveSelection(),type:"button"}:void 0],notice:c&&i?{text:n.batchEditing.selectOneLayer,icon:"information"}:c&&o?{text:t(this.messages.multiFeature.formFailedToLoadTooManyFeatures,{num:d}),icon:"information"}:void 0}))}_renderAttachmentEditing(e){const{EditorPanel:t,_attachments:i,activeWorkflow:s,messages:o,messagesCommon:r}=this;return s?we(t,{heading:o.editAttachment,key:"attachment-editing-panel",...e},we(q,{key:"attachments"},this._renderAttachments()),s.shouldAllowAttachmentEditing?we(H,{buttons:[{label:r.update,disabled:i.submitting||!i.selectedFile,onClick:this._onAttachmentUpdate,type:"button"},{...this._deleteButtonCommonInfo,onClick:this._onAttachmentDelete,disabled:i.submitting,label:r.delete,type:"button"}]}):void 0):null}_renderReady(e){const{EditorPanel:t,messages:i,visibleElements:s}=this,o=this._helpMessage;return we(t,{heading:i.widgetLabel,key:"landing-panel",...e},we(q,{key:"landing-content"},this.editorItems.length?[s.editFeaturesSection?we(K,{key:"edit-actions"},this._renderUpdateActions()):null,s.createFeaturesSection&&this.viewModel.canCreateVisible?we(K,{key:"create-actions"},this._renderCreateActions()):null]:we(Z,{key:"no-content"},i.noEditableLayers)),o?we("div",{class:S.helpMessage,key:"footer-actions",slot:"footer"},o):void 0)}get _helpMessage(){return this.getHelpMessageString(this.activeWorkflow?.helpMessage)}get _noticeMessage(){return this.getHelpMessageString(this.activeWorkflow?.noticeMessage)}_renderUpdateActions(){const{messages:e,messagesCommon:t,viewModel:i}=this,s={id:"select",label:t.select};return we("div",{class:S.updateActions,key:"update-actions"},we(ce,{level:le(this.headingLevel)},e.editFeatures),this.visibleElements.selectionToolbar&&"3d"!==this.view?.type?we("div",{class:S.selectionToolbarContainer},this._renderSelectionToolbar()):we("calcite-list",{class:S.updateActionsList,label:e.editFeaturesList,selectionAppearance:"border",selectionMode:"single"},de({disabled:!i.canUpdateVisible,grouped:!1,item:s,selectedItem:"awaiting-feature-to-update"===i.activeWorkflow?.stepId?s:void 0,renderIcon:this._renderSelectIcon,onItemSelect:this._onToggleUpdateWorkflow})))}_renderCreateActions(){return we("div",{key:"create-actions"},we(ce,{level:le(this.headingLevel)},this.messages.createFeatures),we("div",{class:S.featureTemplatesContainer,key:"templates"},this._renderFeatureTemplates()))}_renderFeatureList(e){const{EditorPanel:i,viewModel:s}=this,{activeWorkflow:o}=s;if("update"!==o?.type)return null;const r=o.data.candidates,a=t(this.messages.multipleFeaturesTemplate,{total:r.length});return we(i,{heading:a,key:"feature-list",...e},we(O,{editorItems:this.editorItems,editorMessages:this.messages,filterText:this._filterText,id:this.id,messagesTemplates:this.messagesTemplates,workflow:o,onFilterTextChange:e=>this._filterText=e,onSelectFeature:(e,t)=>s.selectFeature(e,t),onZoomTo:e=>s.zoomTo(e)}))}_showPromptAndWait({title:e,message:t,yesLabel:i,noLabel:s}){const o=l(),{view:r}=this,a=r?.focused;return this._showPrompt({title:e,message:t,context:"danger",actions:{primary:{label:i,action:()=>o.resolve(!0)},secondary:{label:s,action:()=>o.resolve(!1)}}}),o.promise.finally(()=>{this._clearPrompt(),a&&r?.focus()})}async _onSelectionListItemSelect(e){await this.viewModel.onSelectionListItemSelect(e)}async _onSelectionListMenuItemSelect(e,t){await this.viewModel.onSelectionListMenuItemSelect(e,t)}async _setupSketch(){if(!!!this.visibleElements.sketch)return this._sketchImportAbortController=a(this._sketchImportAbortController),this._sketchToolbar=r(this._sketchToolbar),void this.removeHandles(ye);if(this._sketchImportAbortController)return;const e=new AbortController;this._sketchImportAbortController=e;const t=await import("./Sketch.js");if(!e.signal.aborted)try{this._sketchToolbar=new t.default({toolbarKind:"docked",contextualToolLocation:"inline-end",scale:"s",suppressDeprecationWarning:!0,visibleElements:new re({deleteButton:!1,settingsMenu:!1,directionModePicker:!1,selectionCountLabel:!1,duplicateButton:!1,createTools:new se({freehandPolygon:!0,freehandPolyline:!0}),selectionTools:new oe({"lasso-selection":!1,"rectangle-selection":!1})})}),this.addHandles([c(()=>{const e=this.viewModel.activeLeafWorkflow;return e&&"availableCreateTools"in e?e.availableCreateTools:null},e=>{this._sketchToolbar&&(this._sketchToolbar.availableCreateTools=e)},d),c(()=>this.visibleElements.undoRedoButtons,e=>{this._sketchToolbar&&(this._sketchToolbar.visibleElements.undoRedoMenu=e)},d),m(()=>this.viewModel?.sketchViewModel,e=>{this._sketchToolbar&&(this._sketchToolbar.viewModel=e)},d),m(()=>this.viewModel.sketchViewModel?.pluginManager,e=>{e.sketch=this._sketchToolbar},d)],ye)}finally{this._sketchImportAbortController=null}}getHelpMessageString(e){const{messages:t,view:i}=this;if("curveToolDensifyWarning"===e)return t.curveToolDensifyWarning;return e?t["3d"===i?.type?"helpMessages3d":"helpMessages2d"]?.[e]:void 0}get test(){return{sketch:this._sketchToolbar,showPrompt:this._showPromptAndWait.bind(this)}}};e([p()],be.prototype,"_batchAttributeForm",void 0),e([p()],be.prototype,"_featureForm",void 0),e([p()],be.prototype,"_sketchToolbar",void 0),e([p()],be.prototype,"_attachments",void 0),e([p()],be.prototype,"_associationItemList",void 0),e([p()],be.prototype,"_associationSettings",void 0),e([p()],be.prototype,"_featureTemplates",void 0),e([p()],be.prototype,"_filterText",void 0),e([p()],be.prototype,"_hasInvalidBatchSelection",null),e([p()],be.prototype,"_hasSelectionFromMultipleLayers",null),e([p()],be.prototype,"_hasSelectionWithUneditableFeatures",null),e([p()],be.prototype,"_prompt",void 0),e([p()],be.prototype,"_spinner",void 0),e([p()],be.prototype,"_deleteButtonCommonInfo",null),e([p()],be.prototype,"_loading",void 0),e([p()],be.prototype,"_selectionCountExceedsMaximum",null),e([p()],be.prototype,"_selectionList",void 0),e([p()],be.prototype,"_selectionListItemActionConfigs",null),e([p()],be.prototype,"_selectionToolbar",void 0),e([p()],be.prototype,"_visibleSelectionCount",null),e([p({readOnly:!0})],be.prototype,"activeWorkflow",null),e([p()],be.prototype,"editorItems",null),e([p()],be.prototype,"effectiveSelectionManager",null),e([p()],be.prototype,"headingLevel",void 0),e([p()],be.prototype,"hideTemplatesForInactiveLayers",null),e([p()],be.prototype,"icon",null),e([p()],be.prototype,"label",null),e([p({type:w})],be.prototype,"labelOptions",null),e([p()],be.prototype,"layerInfos",null),e([p(),ue("esri/widgets/Editor/t9n/Editor")],be.prototype,"messages",void 0),e([p(),ue("esri/t9n/common")],be.prototype,"messagesCommon",void 0),e([p(),ue("esri/widgets/FeatureTemplates/t9n/FeatureTemplates")],be.prototype,"messagesTemplates",void 0),e([p(),ue("esri/widgets/Feature/t9n/Feature")],be.prototype,"messagesFeature",void 0),e([p()],be.prototype,"selectionManager",null),e([p({type:f})],be.prototype,"snappingOptions",null),e([p()],be.prototype,"syncWithViewSelectionManager",null),e([p()],be.prototype,"syncViewSelection",null),e([p({type:v})],be.prototype,"tooltipOptions",null),e([p()],be.prototype,"supportingWidgetDefaults",void 0),e([p({type:_,nonNullable:!0})],be.prototype,"valueOptions",null),e([p({value:!1})],be.prototype,"useLegacyCreateTools",null),e([p()],be.prototype,"isUsingLegacyCreateTools",null),e([p()],be.prototype,"view",null),e([p({type:C}),ge(["sketch-create","sketch-delete","sketch-update","workflow-cancel","workflow-commit"])],be.prototype,"viewModel",void 0),e([p({type:E,nonNullable:!0})],be.prototype,"visibleElements",void 0),e([p()],be.prototype,"_helpMessage",null),e([p()],be.prototype,"_noticeMessage",null),be=e([u("esri.widgets.Editor")],be);const ke=be;export{ke as default};
|
|
@@ -1062,14 +1062,6 @@ export default class FeatureTableViewModel extends GridViewModel {
|
|
|
1062
1062
|
* );
|
|
1063
1063
|
*/
|
|
1064
1064
|
addPendingEdits(edits: FeatureStoreEdits[]): void;
|
|
1065
|
-
/**
|
|
1066
|
-
* Clears the current [filterBySelection()](https://developers.arcgis.com/javascript/latest/references/core/widgets/FeatureTable/FeatureTableViewModel/#filterBySelection) so that the table displays all of the table rows.
|
|
1067
|
-
*
|
|
1068
|
-
* @deprecated since version 4.30. Use [filterBySelectionEnabled](https://developers.arcgis.com/javascript/latest/references/core/widgets/FeatureTable/FeatureTableViewModel/#filterBySelectionEnabled) or [objectIds](https://developers.arcgis.com/javascript/latest/references/core/widgets/FeatureTable/FeatureTableViewModel/#objectIds) instead.
|
|
1069
|
-
* @since 4.23
|
|
1070
|
-
* @see [filterBySelection()](https://developers.arcgis.com/javascript/latest/references/core/widgets/FeatureTable/FeatureTableViewModel/#filterBySelection)
|
|
1071
|
-
*/
|
|
1072
|
-
clearSelectionFilter(): void;
|
|
1073
1065
|
/**
|
|
1074
1066
|
* Deletes all the selected rows from the table.
|
|
1075
1067
|
*
|
|
@@ -1111,13 +1103,6 @@ export default class FeatureTableViewModel extends GridViewModel {
|
|
|
1111
1103
|
* @since 4.31
|
|
1112
1104
|
*/
|
|
1113
1105
|
exportSelectionToCSV(includeGeometry?: boolean): Promise<void>;
|
|
1114
|
-
/**
|
|
1115
|
-
* Filters the table using the current row selection and displays only those selected table rows.
|
|
1116
|
-
*
|
|
1117
|
-
* @deprecated since version 4.30. Use [filterBySelectionEnabled](https://developers.arcgis.com/javascript/latest/references/core/widgets/FeatureTable/FeatureTableViewModel/#filterBySelectionEnabled) or [objectIds](https://developers.arcgis.com/javascript/latest/references/core/widgets/FeatureTable/FeatureTableViewModel/#objectIds) instead.
|
|
1118
|
-
* @since 4.23
|
|
1119
|
-
*/
|
|
1120
|
-
filterBySelection(): void;
|
|
1121
1106
|
/**
|
|
1122
1107
|
* Returns information about the feature with the provided object ID.
|
|
1123
1108
|
*
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{onLocaleChange as t,substitute as i,fetchMessageBundle as s}from"../../intl.js";import{isSome as n}from"../../core/arrayUtils.js";import l from"../../core/Collection.js";import{referenceSetter as r}from"../../core/collectionUtils.js";import{deprecatedFunction as o}from"../../core/deprecate.js";import a from"../../core/Error.js";import d from"../../core/Logger.js";import{abortMaybe as h}from"../../core/maybe.js";import{debounce as m,ignoreAbortErrors as c,after as p,throwIfAborted as u,createResolver as g}from"../../core/promiseUtils.js";import{watch as b,initial as f,on as y,syncAndInitial as T}from"../../core/reactiveUtils.js";import{throttle as w}from"../../core/throttle.js";import{property as C,subclass as I}from"../../core/accessorSupport/decorators.js";import{getEffectiveFieldAlias as _}from"../../editing/fieldUtils.js";import{geometryTypes as v}from"../../geometry/support/typeUtils.js";import{getLowerCaseDefaultHiddenFields as E}from"../../layers/support/fieldUtils.js";import{getSubtypesFromLayer as S,isSubtypeGroupLayer as A}from"../../layers/support/layerUtils.js";import{createFieldInfos as F}from"../../support/popupUtils.js";import j from"../../tables/AttributeTableTemplate.js";import x from"../../tables/support/FieldOrder.js";import R from"../../time/TimeExtent.js";import U from"../../views/SelectionManager.js";import{temporaryHighlightName as O}from"../../views/support/HighlightDefaults.js";import{highlightsSupported as P}from"../../views/support/layerViewUtils.js";import{isISelectableLayerWithObjectIds as V}from"../../views/support/selectionUtils.js";import z from"./ActionColumn.js";import W from"./AttachmentsColumn.js";import H from"./FieldColumn.js";import B from"./RelationshipColumn.js";import M from"./Grid/Column.js";import L from"./Grid/Grid.js";import G from"./Grid/GridViewModel.js";import k from"./Grid/GroupColumn.js";import N from"./support/AttachmentsColumnTemplate.js";import D from"./support/AttachmentsViewOptions.js";import{isAttachmentsColumn as $,isFieldColumn as Z,isRelationshipColumn as q}from"./support/columnUtils.js";import{downloadAttachmentInfo as Q,exportToCSV as K}from"./support/exportUtils.js";import J from"./support/FeatureStore.js";import X from"./support/FieldColumnTemplate.js";import Y from"./support/RelationshipColumnTemplate.js";import ee from"./support/TableTemplate.js";import{isIFeatureTableSupportedLayerWithFieldConfigurations as te,isIFeatureTableSupportedLayerWithRelationships as ie,findRelatedLayerInSources as se,findRelationship as ne,uniqueColumnNames as le,hasColumnForField as re,findField as oe,isIFeatureTableSupportedLayerWithAttachments as ae,getRelationshipIdsToShow as de}from"./support/tableUtils.js";import{createAttributeTableElements as he}from"./support/templateUtils.js";import{goTo as me}from"../support/goToUtils.js";import{messageBundle as ce}from"../support/widget.js";const pe="80px";let ue=class extends G{constructor(e){super(e),this._currentTemporaryHighlight=null,this._defaultSelectionManager=new U,this._refreshDebounced=m(()=>this._refresh()),this._syncTemplateThrottled=w(()=>this._syncAttributeTableTemplate()),this._temporaryHighlightAbortController=null,this.attachmentsViewOptions=new D,this.attributeTableTemplate=null,this.autoRefreshEnabled=!0,this.columns=new l,this.dataProvider=async(e,t)=>{const{layer:i,store:s}=this;if(!t)return;if(!i||!s)return void(t&&t([]));await i.load();const{objectIds:n}=this;if(this.filterBySelectionEnabled&&!this.highlightIds.length||1===n.length&&-1===n.items[0])return void t([]);"loaded"!==s.state&&"loading"!==s.state&&await s.load();const l=this.paginationEnabled?this.pageIndex:e.page,r=await s.fetchItems({...e,page:l});t&&t(r)},this.grid=null,this.highlightEnabled=!0,this.layers=null,this.maxSize=null,this.menuConfig=null,this.messages=null,this.messagesCommon=null,this.messagesUnits=null,this.messagesURIUtils=null,this.prompt=null,this.relatedTables=new l,this.relationshipColumnConfigs=null,this.selectionManager=null,this.showRelatedTableCallback=null,this.store=null,this.syncTemplateOnChangesEnabled=!0,this.syncViewSelection=!1,this.tableController=null,this.tableParent=null,this.tableTemplate=null,this.tableTemplateOverride=null,this._onLayerRefresh=this._onLayerRefresh.bind(this),this._onShowPromptCallback=this._onShowPromptCallback.bind(this),this._set("store",new J),this._set("grid",new L({viewModel:this}))}initialize(){const e=async()=>{this.messages=await s("esri/widgets/FeatureTable/t9n/FeatureTable"),this.messagesCommon=await s("esri/t9n/common"),this.messagesUnits=await s("esri/core/t9n/Units"),this.messagesURIUtils=await s("esri/widgets/support/t9n/uriUtils")};e(),this.addHandles([t(()=>{e(),this._generateColumns()}),b(()=>[this.messages,this.messagesCommon,this.messagesURIUtils],()=>{const e=this.messages;this.grid&&(this.grid.messages=e),this.allColumns.forEach(t=>{t.messages=e,t.messagesCommon=this.messagesCommon,t.messagesURIUtils=this.messagesURIUtils}),this.refreshCellContent()},f),b(()=>this.attachmentsEnabled,()=>this.layer?.loaded&&this._generateColumns()),b(()=>this.layer,async(e,t)=>{const i=this.grid;i&&(i.clearSort(),e&&t&&await this.reset()),this.goToPage(0),this._drainColumns(),this.store.layer=e,e&&(e.loaded?this._onLayerLoad():e.load().catch(()=>{})),t&&null!=this.attachmentsViewOptions.objectId&&(this.attachmentsViewOptions.objectId=null)}),b(()=>this.layer?.loaded,e=>e&&this._onLayerLoad()),b(()=>this.store.state,e=>{"loaded"===e&&(this.scrollToTop(),this.refreshCellContent())}),b(()=>this._effectiveTableTemplate,()=>{this.scrollLeft(),this.layer?.loaded&&this._generateColumns()}),b(()=>this.editingEnabled,()=>this.refreshCellContent()),b(()=>this.timeZone??this.view?.timeZone,()=>this.refreshCellContent()),b(()=>this.store.effectiveWhere,()=>"loaded"===this.store.state&&this.reset()),b(()=>this.layer?.timeExtent,(e,t)=>(e||t)&&!this.timeExtent&&"loaded"===this.store.state&&this.reset()),y(()=>this.layer,"refresh",e=>this._onLayerRefresh(e)),y(()=>this.grid,["cell-click","cell-dblclick","cell-pointerover","cell-pointerout","cell-keydown","column-reorder"],({index:e,item:t,native:i,path:s,type:n})=>{const l=t?.feature,r=l?.getObjectId(),o="cell-keydown"===n&&i&&i instanceof KeyboardEvent&&"Enter"===i.key;this.emit(n,{feature:l,index:e,native:i,type:n,fieldName:s??void 0,objectId:r}),(o||"cell-click"===n)&&this._onCellInteraction(r)}),b(()=>this.actionColumnConfig,e=>{const{actionColumn:t,columns:i}=this;t?e?t.set(e):i.remove(t):e&&i.length&&i.add(this._generateActionColumn(),!1!==e.frozenToEnd?void 0:this._getIndexOfFirstFrozenToEndColumn())}),b(()=>this.relatedRecordsEnabled,()=>this.layer?.loaded&&this._generateColumns()),y(()=>this.objectIds,"change",()=>this._onObjectIdsChange(),{onListenerAdd:()=>this._onObjectIdsChange()}),b(()=>[this.paginationEnabled,this.pageIndex],()=>this.refreshPageCache()),b(()=>this.activeSortOrders,e=>{this.store.sortOrders=e,this._syncTemplateThrottled()}),b(()=>this.allVisibleColumns,()=>this._syncTemplateThrottled()),b(()=>this.pageCount,()=>{this.pageIndex>=this.pageCount&&this.goToPage(0)}),b(()=>this.state,e=>{"disabled"===e&&this.relatedTables.length&&this.drainRelatedTables()}),y(()=>this.tableParent?.highlightIds,"change",({added:e})=>{const{relationshipConfig:t}=this,i=e[0];if(null==i||!t)return;const{relatedLayer:s,relationshipId:n}=t;this.relationshipConfig={objectId:i,relatedLayer:s,relationshipId:n}}),y(()=>this.tableParent,"cell-click",async e=>{const{objectId:t}=e;this.tableController&&this.hasPendingEdits?await this.tableController.discardPendingEdits(void 0,!0).then(e=>e&&this._syncTableParentSelection(t)):this._syncTableParentSelection(t)}),b(()=>this.attachmentsViewOptions.objectId,(e,t)=>{null!=e?null==t&&this.showAttachmentsView({objectId:e}):this.hideAttachmentsView()}),b(()=>[this.layerFieldConfigurations,this.pendingEditsCount],()=>this.refreshCellContent()),y(()=>this.highlightIds,"change",e=>this._onHighlightIdsChange(e),{onListenerAdd:()=>this._syncSelection(),onListenerRemove:()=>this._defaultSelectionManager.clear()}),b(()=>this.grid?.temporaryHighlightId,e=>{this._temporaryHighlightAbortController?.abort(),this._temporaryHighlightAbortController=new AbortController,c(this._syncTemporaryHighlight(e,this._temporaryHighlightAbortController.signal))}),b(()=>this.effectiveSelectionManager,()=>this._syncSelection(),T),y(()=>this.effectiveSelectionManager,"selection-change",()=>this._syncSelection(),T),b(()=>[this.layer,this.view],()=>this._syncSelectionSources(),T),b(()=>this.highlightEnabled,e=>this._defaultSelectionManager.highlightEnabled=e,f)])}destroy(){this._drainColumns(),this._currentTemporaryHighlight?.handle.remove(),this._temporaryHighlightAbortController=h(this._temporaryHighlightAbortController),this._defaultSelectionManager.destroy(),this.grid?.destroy(),this.columns.destroyed||this.columns.destroy(),this.layer=null,this.view=null}get _defaultHiddenFields(){return E(this.layer)}get _effectiveTableTemplate(){return this.tableTemplateOverride||this.tableTemplate}get _effectiveAttributeTableTemplate(){return this.attributeTableTemplate||this.layer?.attributeTableTemplate}get _highlightableLayerView(){const e=this.layerView;return P(e)?e:null}get _subtypes(){return S(this.layer)}get actionColumn(){return super.actionColumn}get activeFilters(){const{filterGeometry:e,objectIds:t,filterBySelectionEnabled:i,highlightIds:s}=this,n=new l;return e&&n.push({type:"geometry",geometry:e}),i?n.push({type:"selection",objectIds:s.toArray()}):t.length&&n.push({type:"objectId",objectIds:t.toArray()}),n}get activeSortOrders(){return this.grid?.sortOrders?this.grid.sortOrders.map(({path:e,direction:t})=>({fieldName:e,direction:t})).filter(e=>e.fieldName&&e.direction):[]}get allColumns(){return super.allColumns}get allRelatedTablesVisible(){return!!(this.relatedRecordsEnabled&&this.relatedTables.length&&this.showAllRelatedTables)}get allVisibleColumns(){return super.allVisibleColumns}get attachmentsColumns(){return this.allColumns.filter(e=>$(e))}get attachmentsEnabled(){return this.store.attachmentsEnabled}set attachmentsEnabled(e){this.store.attachmentsEnabled=e}get autoSaveEnabled(){return this.store.autoSaveEnabled}set autoSaveEnabled(e){this.store.autoSaveEnabled=e}get canAddRelatedFeature(){return this.store.canAddRelatedFeature}get clearPrompt(){return()=>this.prompt=null}set clearPrompt(e){this._overrideIfSome("clearPrompt",e)}get definitionExpression(){return this.store.where}set definitionExpression(e){this.store.where=e}get editingEnabled(){return super.editingEnabled}set editingEnabled(e){super.editingEnabled=e}get effectiveSelectionManager(){const{layer:e,view:t}=this;return e&&this.syncViewSelection&&V(e)&&t?.selectionManager?.sources.includes(e)?t.selectionManager:this.selectionManager??this._defaultSelectionManager}get effectiveSize(){return super.effectiveSize}get fieldColumns(){return this.allColumns.filter(e=>Z(e))}get filterGeometry(){return this.store.filterGeometry}set filterGeometry(e){this.store.filterGeometry=e}get filterBySelectionEnabled(){return!!this._get("filterBySelectionEnabled")}set filterBySelectionEnabled(e){const{objectIds:t}=this,i=t.length;e?(i&&(t.removeAll(),this._logWarning("Selection filter has been applied with an objectID filter. Object ID filter has been removed.")),this.filterGeometry&&this._logWarning("Selection filter has been applied with a geometry filter. Results may appear inconsistent"),this._syncObjectIdsWithStore(this.highlightIds.toArray())):i||this._syncObjectIdsWithStore(null),this._set("filterBySelectionEnabled",e)}get groupColumns(){return super.groupColumns}get hasContingentValues(){return this.relatedTableHasContingentValues||this.store.hasContingentValues}get hasInvalidPendingEdits(){return this.relatedTableHasInvalidPendingEdits||this.store.hasInvalidPendingEdits}get hasPendingEdits(){return this.relatedTableHasPendingEdits||this.store.hasPendingEdits}get hiddenFields(){return this._get("hiddenFields")??new l}set hiddenFields(e){this._set("hiddenFields",r(e,this._get("hiddenFields"),l))}get highlightIds(){return super.highlightIds}set highlightIds(e){super.highlightIds=e}get initialSize(){return this.store.initialSize}set initialSize(e){this.store.initialSize=e}get isEditing(){return super.isEditing}get isQuerying(){return super.isQuerying}get isSyncing(){return super.isSyncing}get isQueryingOrSyncing(){return this.isQuerying||this.isSyncing||this.relatedTables.some(e=>!!e.isQueryingOrSyncing)}get isSyncingAttachments(){return this.store.isSyncingAttachmentEdits||this.relatedTables.some(e=>!!e.isSyncingAttachments)}get layer(){return this._get("layer")}set layer(e){this.drainRelatedTables(),this._set("layer",e)}get layerFieldConfigurations(){const e=this.layer;return te(e)?e.fieldConfigurations:void 0}get layerView(){return this.store.layerView}get objectIds(){return super.objectIds}set objectIds(e){super.objectIds=e}get outFields(){return this.store.outFields}set outFields(e){this.store.outFields=e}get pageCount(){return super.pageCount}get pageIndex(){return super.pageIndex}set pageIndex(e){super.pageIndex=e}get pageSize(){return super.pageSize}set pageSize(e){super.pageSize=e}get pendingEditsCount(){return this.store.pendingEditsCount}get relatedRecordsEnabled(){return this.store.relatedRecordsEnabled}set relatedRecordsEnabled(e){this.store.relatedRecordsEnabled=e}get relatedTable(){return this.relatedTables.at(-1)}get relatedTableHasContingentValues(){return!!this.relatedTable?.hasContingentValues}get relatedTableHasInvalidPendingEdits(){return!!this.relatedTable?.hasInvalidPendingEdits}get relatedTableHasPendingEdits(){return!!this.relatedTable?.hasPendingEdits}get relationship(){return this.store.relationship}get relationshipColumns(){return this.allColumns.filter(e=>q(e))}get relationshipConfig(){return this.store.relationshipConfig}set relationshipConfig(e){this.highlightIds.removeAll(),this.objectIds.removeAll(),this.filterBySelectionEnabled=!1,this.store.relationshipConfig=e}get relationshipInfos(){const{layer:e,layers:t,relationships:i,tableController:s}=this,n=this.store.relationshipInfos;if(n.length||!ie(e)||!i?.length)return n;const l=[],r=s?.layers||t||[];return i.forEach(t=>{const i=se(e,r,t);i&&(i.load(),l.push({layer:e,relatedLayer:i,relationshipId:t.id}))}),l}get relationships(){return this.store.relationships}get returnGeometryEnabled(){return this.store.returnGeometry}set returnGeometryEnabled(e){this.store.returnGeometry=e}get returnMEnabled(){return this.store.returnM}set returnMEnabled(e){this.store.returnM=e}get returnZEnabled(){return this.store.returnZ}set returnZEnabled(e){this.store.returnZ=e}get rowHighlightIds(){return super.rowHighlightIds}set rowHighlightIds(e){super.rowHighlightIds=e}get selectionSource(){return"table"}set selectionSource(e){this.syncViewSelection="view"===e,this._overrideIfSome("selectionSource",e)}get showAllRelatedTables(){return this._get("showAllRelatedTables")}set showAllRelatedTables(e){const{relatedTable:t}=this;this._set("showAllRelatedTables",e),t&&(e?this._showAllRelatedTables(t):this._hideAllRelatedTables(t))}get showPrompt(){return e=>{this.prompt?.cancel?.(),this.prompt=e}}set showPrompt(e){this._overrideIfSome("showPrompt",e)}get size(){return super.size}get state(){return super.state}get supportsAttachments(){return this.store.supportsAttachments}get supportsAddAttachments(){const{store:{supportsAddAttachments:e,supportsEditing:t}}=this;return this.editingEnabled&&t&&e}get supportsDeleteAttachments(){return this.supportsUpdateAttachments}get supportsResizeAttachments(){return this.store.supportsResizeAttachments}get supportsUpdateAttachments(){const{store:{supportsUpdateAttachments:e,supportsEditing:t}}=this;return this.editingEnabled&&t&&e}get timeExtent(){return this.store.timeExtent}set timeExtent(e){this.store.timeExtent=e}get timeZone(){return this.store.timeZone}set timeZone(e){this.store.timeZone=e}get view(){return this.store.view}set view(e){this.store.view=e,this.fieldColumns.forEach(t=>t.view=e),this.refreshCellContent()}get visibleColumns(){return super.visibleColumns}async addAttachment(e,t){const{attachmentsViewOptions:i,store:s}=this,n=i.objectId===e;await s.addAttachment(e,t).catch(e=>{n&&e&&"object"==typeof e&&"error"in e&&e.error instanceof a&&(this._logWarning(`Unable to add attachment. ${e.error.name} ${e.error.message}`),i.error=e.error)}),n&&!i.error&&(i.onEditComplete(),i.attachmentInfos=await s.getAttachmentsByObjectId(e,!0)),this.refreshCellContent()}addPendingEdits(e){this.store.addPendingEdits(e)}collapseRelatedTable(e,t){const{relatedLayer:i,objectId:s,relationshipId:n}=t,{objectIdField:r}=i,o=ne(i,n),a=i.displayField||o?.keyField||r;e.set({highlightIds:new l([s]),multipleSelectionEnabled:!1,tableTemplateOverride:this._getTableTemplateForRelatedTableView(e,a,n)});const d=e.hiddenFields;d.includes(le.action)||d.add(le.action),d.includes(le.attachments)||d.add(le.attachments),e.scrollLeft()}async deleteAttachments(e,t){const{attachmentsViewOptions:i,store:s}=this,n=i.objectId===e;await s.deleteAttachments(e,t).catch(e=>{n&&e&&"object"==typeof e&&"error"in e&&e.error instanceof a&&(this._logWarning(`Unable to delete attachment(s). ${e.error.name} ${e.error.message}`),i.error=e.error)}),n&&!i.error&&(i.onEditComplete(),i.attachmentInfos=await s.getAttachmentsByObjectId(e,!0)),this.refreshCellContent()}async deleteSelection(){const e=this.highlightIds.toArray();if(!e?.length)return;const{deleteFeatureResults:t}=await this.store.deleteRowsByObjectId(e),i=t.filter(e=>!e.error).map(e=>e.objectId);i.length&&(this.highlightIds.removeMany(i),await this.refresh())}async discardPendingEdits(e){return this.relatedTable&&this.relatedTableHasPendingEdits?this.relatedTable.discardPendingEdits(e):(this.store.discardPendingEdits(e),!0)}async downloadAttachmentById(e,t){const i=(await this.store.getAttachmentsByObjectId(e,!0)).find(e=>e.id===t);await Q(i)}drainRelatedTables(){this.relatedTables.drain(e=>e.destroy()),this.set({multipleSelectionEnabled:!0,relationshipColumnConfigs:null,showAllRelatedTables:!1,tableTemplateOverride:null}),this.hiddenFields.removeMany([le.action,le.attachments])}drainRelatedTablesAboveIndex(e){const{relatedTables:t}=this,i=t.slice(e+1);t.removeMany(i).forEach(e=>e.destroy());const s=t.at(-1);s&&(s.attachmentsViewOptions.objectId=null,this.allRelatedTablesVisible?this._showAllRelatedTables(s):this._hideAllRelatedTables(s))}async exportSelectionToCSV(e){const{highlightIds:t,layer:i,outFields:s}=this;i&&t.length?await K({layer:i,objectIds:t.toArray(),outFields:s,includeGeometry:e}):this._logWarning("Export failed.")}filterBySelection(){this.filterBySelectionEnabled?this._logWarning("Property 'filterBySelectionEnabled' is already 'true'. This method has no effect."):(o(d.getLogger(this),"`FeatureTable.filterBySelection` is deprecated in favor of 'filterBySelectionEnabled' and 'objectIds'",{replacement:"FeatureTable.filterBySelectionEnabled or FeatureTable.objectIds",version:"4.30",warnOnce:!0}),this.objectIds.addMany(this.highlightIds.toArray()))}getFeatureStoreItemByObjectId(e){return this.store.getItemByObjectId(e)}async getFeatureTitle(e,t){return this.store.getFeatureTitle(e,t)}getFeatureTitleSync(e){const t=this.layer;if(!t)return`${e}`;const i=`${t.objectIdField}: ${e}`;return null==e?i:this.store.featureTitleMap.get(e)??i}getObjectIdIndex(e){return this.store.getItemIndexByObjectId(e)}getValue(e,t){const i=this.getFeatureStoreItemByObjectId(e);return i?.feature?.attributes[t]}getVirtualPageIndex(){return this.grid?.getVirtualPageIndex()??0}goToPage(e){if(null==e||!Number.isInteger(e))return void this._logWarning("Invalid 'page' parameter provided to 'goToPage()'. Current page will remain the same.");const{pageCount:t}=this;(e>=t||-1===e)&&(e=t-1),e<-1&&(e=0),e!==this.pageIndex&&(this.pageIndex=e),this.paginationEnabled||this.scrollToIndex(e*this.pageSize)}hideAttachmentsView(){this.attachmentsViewOptions.objectId=null,this.set({relationshipColumnConfigs:null,multipleSelectionEnabled:!0,tableTemplateOverride:null}),this.hiddenFields.remove(le.action)}nextPage(){const e=this.paginationEnabled?this.pageIndex:this.getVirtualPageIndex();this.goToPage(e+1)}previousPage(){const e=this.paginationEnabled?this.pageIndex:this.getVirtualPageIndex();this.goToPage(e-1)}async refresh(){await Promise.all([...this.relatedTables.map(e=>e.refresh()),c(this._refreshDebounced())])}refreshCellContent(){this.grid?.requestContentUpdate()}refreshPageCache(){this.grid?.refreshPageCache()}async reset(){this.goToPage(0),await(this.grid?.reset())}async savePendingEdits(){!this.relatedTableHasPendingEdits||this.relatedTableHasInvalidPendingEdits?this.hasPendingEdits&&!this.relatedTable&&(await this.store.savePendingEdits(),await this.refresh()):await(this.relatedTable?.savePendingEdits())}scrollLeft(){this.grid?.scrollLeft(0)}scrollToBottom(){this.grid?.scrollToBottom()}scrollToIndex(e){this.grid?.scrollToIndex(e)}scrollToRow(e){const t=this.store.getItemIndexByObjectId(e);t>-1?this.grid?.scrollToIndex(t):this._logWarning("Row not found. Associated data may not be loaded yet.")}scrollToTop(){this.grid?.scrollToTop()}async saveAttachmentsViewForm(){const{attachmentId:e,form:t,objectId:i}=this.attachmentsViewOptions;null!=i&&t&&(null!=e?await this.updateAttachment(i,e,t):await this.addAttachment(i,t))}async showAttachmentsView({objectId:e}){const{attachmentsViewOptions:t,hiddenFields:i,layer:s}=this;if(!this.attachmentsEnabled||!s)return void this._logWarning("The 'attachmentsEnabled' property is currently false.");await s.load();const n=this._getDefaultLayerDisplayField(s),r=await this.store.getAttachmentsByObjectId(e,!0),o=this.store.getItemIndexByObjectId(e);t.set({attachmentInfos:r,mode:r.length?"list":"file",objectId:e}),this.set({highlightIds:new l([e]),multipleSelectionEnabled:!1,relationshipColumnConfigs:[],tableTemplateOverride:this._getTableTemplateForAttachmentsView(n)}),i.includes(le.action)||i.add(le.action),null!=o&&this.scrollToIndex(o)}syncAttributeTableTemplate(){this._syncAttributeTableTemplate(!0)}clearSelectionFilter(){o(d.getLogger(this),"`FeatureTable.clearSelectionFilter` is deprecated in favor of 'filterBySelectionEnabled' and 'objectIds'",{replacement:"FeatureTable.filterBySelectionEnabled or FeatureTable.objectIds",version:"4.30",warnOnce:!0}),this.objectIds.removeAll()}async updateAttachment(e,t,i){const{attachmentsViewOptions:s,store:n}=this,l=s.objectId===e;await n.updateAttachment(e,t,i).catch(e=>{l&&e&&"object"==typeof e&&"error"in e&&e.error instanceof a&&(this._logWarning(`Unable to update attachment. ${e.error.name} ${e.error.message}`),s.error=e.error)}),l&&!s.error&&(s.onEditComplete(),s.attachmentInfos=await n.getAttachmentsByObjectId(e,!0)),this.refreshCellContent()}async zoomToSelection(){const{layer:e,view:t}=this,i=this.highlightIds.toArray();if(!e||!t||!i.length)return;const s=e.createQuery();s.objectIds=i,s.returnGeometry=!0;const n=await e.queryFeatures(s);try{await me(t,n.features)}catch(l){"AbortError"!==l.name&&console.error(l)}}_syncAttributeTableTemplate(e=!1){const{_effectiveAttributeTableTemplate:t,layer:i,tableTemplateOverride:s,syncTemplateOnChangesEnabled:n}=this;if(!i||!t||!n&&!e||s||this.tableParent||this.relatedTable||null!==this.attachmentsViewOptions.objectId)return;const{activeSortOrders:l,allColumns:r,columns:o}=this,a=[],d=he(o.toArray());l.forEach(({fieldName:e,direction:t})=>{e&&t&&a.push(new x({field:e,order:t}))}),r.forEach(({fieldName:e,direction:t})=>{t&&!a.some(t=>t.field===e)&&a.push(new x({field:e,order:t}))}),t.elements=d,t.orderByFields=a}async _refresh(){await this.store.refresh();const e=this.highlightIds.toArray();if(e.length){(await this.store.verifyFeaturesByObjectId(e)).forEach((t,i)=>{t||this.highlightIds.remove(e[i])})}this.refreshPageCache();const t=this.attachmentsViewOptions;null!=t?.objectId&&(t.attachmentInfos=await this.store.getAttachmentsByObjectId(t.objectId,!0))}async _onLayerLoad(){const{layer:e,pageSize:t}=this;if(!e)return;e.parent&&A(e.parent)&&await e.parent.loadAll();const i=e.capabilities.query?.maxRecordCount,s=i&&i<t,n=s?i:t;s&&(this._logWarning("The value for 'pageSize' has been adjusted due to the provided layer's max record count."),this.pageSize=n),this.grid?.set("pageSize",n),this.store.load(),this._generateColumns()}_onLayerRefresh(e){this.autoRefreshEnabled&&e.dataChanged&&this.refresh()}_generateColumns(){this._drainColumns();const{_effectiveTableTemplate:e,_effectiveAttributeTableTemplate:t,layer:i}=this,s=e?.columnTemplates;if(!i)return;const n=this._generateColumnsFromColumnTemplates(i,s)??this._generateColumnsFromAttributeTableTemplate(i,t)??this._generateDefaultFieldColumns(i);n.length&&(this.attachmentsEnabled&&!n.some(e=>$(e))&&n.push(this._generateDefaultAttachmentsColumn(i)),this.relatedRecordsEnabled&&this.relationshipInfos.length&&!n.some(e=>q(e))&&n.push(...this._generateDefaultRelationshipColumns()),this.actionColumnConfig&&n.push(this._generateActionColumn()),n.sort((e,t)=>e.frozen&&t.frozen||e.frozenToEnd&&t.frozenToEnd?0:e.frozen||t.frozenToEnd?-1:0),this.columns.addMany(n))}_generateColumnsFromAttributeTableTemplate(e,t){if(!t)return null;const{elements:i,orderByFields:s}=t,l=F(e),r=[];r.push(...this._generateColumnsFromAttributeTableElements(e,i,s));const o=l.map(t=>{if(!t.fieldName||re(t.fieldName,r))return null;const{fieldName:i}=t,n=oe(e,i);return n?this._generateDefaultFieldColumn(e,n,{hidden:!0,orderByFields:s}):(this._logTemplateWarning("A valid 'field' could not be found for the provided template."),null)}).filter(n);return r.push(...o),this.attachmentsEnabled&&ae(e)&&!r.some(e=>$(e))&&r.push(this._generateDefaultAttachmentsColumn(e,{hidden:!0})),this.relatedRecordsEnabled&&ie(e)&&e.relationships?.forEach(({id:e},t)=>{const i=this.relationshipInfos.find(t=>t.relationshipId===e);i&&!r.some(t=>q(t)&&t.relationshipId===e)&&r.push(this._generateDefaultRelationshipColumn({hidden:!0,info:i,index:t}))}),r.length?r:null}_generateColumnsFromAttributeTableElements(e,t,i){return t?.map((t,s)=>{switch(t.type){case"field":return this._createFieldColumnFromElement({layer:e,element:t,orderByFields:i});case"group":return this._createGroupColumnFromElement({layer:e,element:t,orderByFields:i});case"attachment":return this._createAttachmentColumnFromElement({layer:e,element:t,index:s});case"relationship":return this._createRelationshipColumnFromElement({element:t,index:s})}}).filter(e=>!!e)??[]}_createFieldColumnFromElement(e){const{layer:t,element:i,orderByFields:s}=e,{fieldName:n}=i;if(null==n)return this._logTemplateWarning("A valid 'fieldName' must be provided."),null;const l=oe(t,n);if(!l)return this._logTemplateWarning("A valid 'field' could not be found for the provided template."),null;const{description:r,label:o}=i,a=s?.findIndex(({field:e})=>e&&e===n)??-1,d=a>-1?s?.at(a)?.order:void 0,h=a>-1?a:void 0,{grid:m,messages:c,messagesCommon:p,messagesURIUtils:u,store:g,view:b}=this;return new H({description:r,direction:d,field:l,fieldName:n,grid:m,initialSortPriority:h,label:o,layer:t,messages:c,messagesCommon:p,messagesURIUtils:u,store:g,view:b,onShowPromptCallback:this._onShowPromptCallback})}_createGroupColumnFromElement(e){const{layer:t,element:i,orderByFields:s}=e,{description:n,label:l}=i;if(!l)return this._logTemplateWarning("Group columns require a label."),null;if(!i.elements.length)return this._logTemplateWarning("Group columns require child columns."),null;const{grid:r,messages:o,messagesCommon:a,messagesURIUtils:d,store:h}=this;return new k({columns:this._generateColumnsFromAttributeTableElements(t,i.elements,s),description:n,grid:r,label:l,messages:o,messagesCommon:a,messagesURIUtils:d,store:h})}_createAttachmentColumnFromElement(e){if(!this.attachmentsEnabled)return void this._logTemplateWarning("The 'attachmentsEnabled' property is currently false.");const{layer:t,element:i,index:s}=e,{description:n,label:l}=i,{grid:r,messages:o,messagesCommon:a,messagesURIUtils:d,store:h}=this;return new W({description:n,fieldName:`${le.attachments}-${s}`,grid:r,label:l,layer:t,messages:o,messagesCommon:a,messagesURIUtils:d,store:h,onShowAttachments:e=>this._onShowAttachments(e)})}_createRelationshipColumnFromElement(e){if(!this.relatedRecordsEnabled)return void this._logTemplateWarning("Relationship columns require related records to be enabled on the table.");const{element:t,index:i}=e,{description:s,label:n,relationshipId:l}=t,r=this.relationshipInfos.find(e=>e.relationshipId===l);if(!r)return this._logTemplateWarning("Unable to find valid related layer target based on the provided relationship id."),null;const{grid:o,messages:a,messagesCommon:d,messagesURIUtils:h,store:m}=this;return new B({description:s,fieldName:`${le.relationship}-${l}-${i}`,grid:o,label:n,messages:a,messagesCommon:d,messagesURIUtils:h,relationshipId:l,store:m,layer:r.relatedLayer,relatedLayer:r.layer,showRelatedTableCallback:e=>this._onShowRelatedTable(e)})}_generateColumnsFromColumnTemplates(e,t){const{grid:i,messages:s,messagesCommon:n,messagesURIUtils:l,store:r,view:o}=this;if(!t?.length)return null;const a=[];return t.forEach((t,d)=>{const{autoWidth:h,description:m,direction:c,flexGrow:p,fieldName:u,formatFunction:g,frozen:b,frozenToEnd:f,icon:y,iconText:T,initialSortPriority:w,invalid:C,label:I,labelTooltipText:_,menuConfig:v,resizable:E,sortable:S,textAlign:A,textWrap:F,timeZone:j,type:x,width:R}=t;if(!x)return void this._logTemplateWarning("Property 'type' is missing from the provided template.");if(b&&f)return void this._logTemplateWarning("Properties 'frozen' and 'frozenToEnd' cannot both be true for the same column.");const U=!1===t.visible;if("group"===x){if(!t.columnTemplates?.length)return void this._logTemplateWarning("Group columns must contain column templates.");if(!t.label)return void this._logTemplateWarning("Group columns require a label.");const r=this._generateColumnsFromColumnTemplates(e,t.columnTemplates),o=U||this._isFieldHidden(t.label);a.push(new k({autoWidth:h,columns:r,description:m,flexGrow:p,frozen:b,frozenToEnd:f,grid:i,hidden:o,icon:y,iconText:T,invalid:C,label:I,labelTooltipText:_,menuConfig:v,messages:s,messagesCommon:n,messagesURIUtils:l,resizable:E,textAlign:A,textWrap:F,timeZone:j,width:R}))}else if("attachment"===x){if(!this.attachmentsEnabled)return void this._logTemplateWarning("Attachment columns require attachments to be enabled on the table.");a.push(this._generateAttachmentsColumnFromTemplate(e,t,d))}else if("relationship"===x){if(!this.relatedRecordsEnabled)return void this._logTemplateWarning("Relationship columns require related records to be enabled on the table.");const{relationshipId:e}=t;if(null==e)return void this._logTemplateWarning("Property 'relationshipId' is missing from the provided template.");const i=this.relationshipInfos.find(t=>t.relationshipId===e);if(!i)return void this._logTemplateWarning("Unable to find valid related layer target based on the provided relationship id.");a.push(this._generateRelationshipColumnFromTemplate(i,t,d))}else if(!u)return void this._logTemplateWarning("Value for 'fieldName' property was missing from the provided template.");const O=U||this._isFieldHidden(u);if("column"===x)a.push(new M({autoWidth:h,description:m,direction:c,fieldName:u,flexGrow:p,formatFunction:g,frozen:b,frozenToEnd:f,grid:i,hidden:O,icon:y,iconText:T,initialSortPriority:w,invalid:C,label:I,labelTooltipText:_,menuConfig:v,messages:s,messagesCommon:n,messagesURIUtils:l,resizable:E,sortable:S,store:r,textAlign:A,textWrap:F,timeZone:j,width:R}));else if("field"===x){const d=oe(e,t.fieldName);if(!d)return void this._logTemplateWarning("A valid 'field' could not be found for the provided template.");const{editable:u,required:x}=t;a.push(new H({autoWidth:h,description:m,direction:c,editable:u,field:d,fieldName:d.name,flexGrow:p,formatFunction:g,frozen:b,frozenToEnd:f,grid:i,hidden:O,icon:y,iconText:T,initialSortPriority:w,invalid:C,label:I,labelTooltipText:_,layer:e,messages:s,messagesCommon:n,messagesURIUtils:l,menuConfig:v,required:x,resizable:E,sortable:S,store:r,template:t,textAlign:A,textWrap:F,timeZone:j,width:R,view:o,onShowPromptCallback:this._onShowPromptCallback}))}}),a.length?a:null}_generateDefaultFieldColumns(e){return e.fields?.map(t=>this._generateDefaultFieldColumn(e,t)).filter(n)??[]}_generateDefaultFieldColumn(e,t,i){const{grid:s,messages:n,messagesCommon:l,messagesURIUtils:r,store:o,view:a}=this;if(!t.visible||"geometry"===t.type)return null;const d=i?.orderByFields,h=t.name,m=d?.findIndex(({field:e})=>e&&e===h)??-1,c=m>-1?d?.at(m)?.order:void 0,p=m>-1?m:void 0;return new H({direction:c,field:t,fieldName:h,grid:s,hidden:i?.hidden||this._isFieldHidden(h),initialSortPriority:p,layer:e,messages:n,messagesCommon:l,messagesURIUtils:r,store:o,view:a,onShowPromptCallback:this._onShowPromptCallback})}_generateAttachmentsColumnFromTemplate(e,t,i){const{grid:s,messages:n,messagesCommon:l,messagesURIUtils:r,store:o}=this,{attachmentsViewEnabled:a,autoWidth:d,description:h,flexGrow:m,fieldName:c,formatFunction:p,frozen:u,frozenToEnd:g,icon:b,iconText:f,invalid:y,label:T,labelTooltipText:w,menuConfig:C,resizable:I,textAlign:_,textWrap:v,thumbnailAppearance:E,thumbnailCount:S,thumbnailIconScale:A,thumbnailsEnabled:F,timeZone:j,width:x}=t;return new W({attachmentsViewEnabled:a,autoWidth:d,description:h,fieldName:`${le.attachments}-${i}`,flexGrow:m,formatFunction:p,frozen:u,frozenToEnd:g,grid:s,hidden:!1===t.visible||this._isFieldHidden(T)||this._isFieldHidden(c),icon:b,iconText:f,invalid:y,label:T,labelTooltipText:w,layer:e,menuConfig:C,messages:n,messagesCommon:l,messagesURIUtils:r,resizable:I,store:o,textAlign:_,textWrap:v,thumbnailAppearance:E,thumbnailCount:S,thumbnailIconScale:A,thumbnailsEnabled:F,timeZone:j,width:x,onShowAttachments:e=>this._onShowAttachments(e)})}_generateDefaultAttachmentsColumn(e,t){const{grid:i,messages:s,messagesCommon:n,messagesURIUtils:l,store:r}=this,o=le.attachments;return new W({fieldName:o,grid:i,hidden:t?.hidden||this._isFieldHidden(o),layer:e,messages:s,messagesCommon:n,messagesURIUtils:l,store:r,onShowAttachments:e=>this._onShowAttachments(e)})}_generateRelationshipColumnFromTemplate(e,t,i){const{grid:s,messages:n,messagesCommon:l,messagesURIUtils:r,store:o}=this,{autoWidth:a,collapsed:d,description:h,flexGrow:m,fieldName:c,formatFunction:p,frozen:u,frozenToEnd:g,icon:b,iconText:f,invalid:y,label:T,labelTooltipText:w,menuConfig:C,relationshipId:I,resizable:_,textAlign:v,textWrap:E,timeZone:S,width:A}=t;return new B({autoWidth:a,collapsed:d,description:h,fieldName:`${le.relationship}-${I}-${i}`,flexGrow:m,formatFunction:p,frozen:u,frozenToEnd:g,grid:s,hidden:!1===t.visible||this._isFieldHidden(T)||this._isFieldHidden(c),icon:b,iconText:f,invalid:y,label:T,labelTooltipText:w,menuConfig:C,messages:n,messagesCommon:l,messagesURIUtils:r,relationshipId:I,resizable:_,store:o,textAlign:v,textWrap:E,timeZone:S,width:A,layer:e.relatedLayer,relatedLayer:e.layer,showRelatedTableCallback:e=>this._onShowRelatedTable(e)})}_generateDefaultRelationshipColumns(){const{relationshipInfos:e,relationshipColumnConfigs:t}=this,i=[];return e?.length?(t?t.forEach((t,s)=>{const{relationshipId:n}=t,l=e.find(e=>e.relationshipId===n);l&&i.push(this._generateDefaultRelationshipColumn({config:t,index:s,info:l}))}):e.forEach((e,t)=>i.push(this._generateDefaultRelationshipColumn({index:t,info:e}))),i):i}_generateDefaultRelationshipColumn(e){const{config:t,hidden:i,index:s,info:n}=e,{grid:l,messages:r,messagesCommon:o,messagesURIUtils:a,store:d}=this,{relationshipId:h}=n;return new B({...t,fieldName:`${le.relationship}-${h}-${s}`,grid:l,hidden:i,messages:r,messagesCommon:o,messagesURIUtils:a,layer:n.relatedLayer,relatedLayer:n.layer,relationshipId:h,store:d,showRelatedTableCallback:e=>this._onShowRelatedTable(e)})}_generateActionColumn(){return new z({hidden:this._isFieldHidden(le.action),store:this.store,...this.actionColumnConfig})}_isFieldHidden(e){const t=e?.toLowerCase();return(this.hiddenFields??this._defaultHiddenFields).some(e=>e.toLowerCase()===t)}async _syncTemporaryHighlight(e,t){if(!this.highlightEnabled)return this._currentTemporaryHighlight?.handle.remove(),void(this._currentTemporaryHighlight=null);if(await p(25),u(t),!this._currentTemporaryHighlight&&!e)return;const{id:i}=this._currentTemporaryHighlight??{};if(i===e)return;this._currentTemporaryHighlight?.handle?.remove(),this._currentTemporaryHighlight=null;const{_highlightableLayerView:s,layer:n,highlightEnabled:l}=this;e&&s&&n&&l&&(this._currentTemporaryHighlight={id:e,handle:s.highlight(e,{name:O})})}_syncSelection(){const{layer:e}=this;V(e)&&(this.highlightIds.items=this.effectiveSelectionManager.getSelection(e)??[])}_syncSelectionSources(){const{layer:e,view:t}=this;this._defaultSelectionManager.view=t,e&&V(e)?this._defaultSelectionManager.sources.items=[e]:this._defaultSelectionManager.sources.removeAll()}_addToSelection(e){const t=this.layer;V(t)&&this.effectiveSelectionManager.add(t,e)}_removeFromSelection(e){const t=this.layer;V(t)&&this.effectiveSelectionManager.remove(t,e)}async _onHighlightIdsChange(e){const{added:t,removed:i}=e,{attachmentsViewOptions:s}=this;if(this._removeFromSelection(i),this._addToSelection(t),this.filterBySelectionEnabled&&this._syncObjectIdsWithStore(this.highlightIds.toArray()),null!=s.objectId){const e=this.highlightIds.at(0);if(null!=e){const t=await this.store.getAttachmentsByObjectId(e,!0);s.set({attachmentInfos:t,objectId:e,mode:t.length?"list":"file"}),this.getFeatureTitle(e)}}}_syncTableParentSelection(e){const{tableParent:t}=this;t&&null!=e&&t.highlightIds.add(e)}_onShowRelatedTable(e){const{highlightIds:t}=this,{objectId:i}=e;t.removeAll(),t.add(i),this.showRelatedTableCallback?this.showRelatedTableCallback(e):this.emit("show-related-table",e)}_onObjectIdsChange(){const e=this.objectIds.toArray();e.length&&this.filterBySelectionEnabled&&(this.filterBySelectionEnabled=!1,this._logWarning("Object ID filter was applied while a selection filter was applied. Selection filter has been removed.")),this._syncObjectIdsWithStore(e)}_syncObjectIdsWithStore(e){this.store.objectIds=e,this.refreshPageCache()}_drainColumns(){this.columns.drain(e=>!e.destroyed&&e.destroy())}_showAllRelatedTables(e){const t=e.layer;if(!t)return;const i=this._getDefaultLayerDisplayField(t);e.set({relationshipColumnConfigs:[],tableTemplateOverride:this._getTableTemplateForShowAllTablesView(e,i)});const s=e.hiddenFields;s.includes(le.action)||s.add(le.action),s.includes(le.attachments)||s.add(le.attachments)}_hideAllRelatedTables(e){const{layer:t,relationship:i}=e;if(t&&null!=i?.id)if(null!=e.attachmentsViewOptions.objectId){const i=this._getDefaultLayerDisplayField(t);e.set({multipleSelectionEnabled:!1,relationshipColumnConfigs:[],showAllRelatedTables:!1,tableTemplateOverride:this._getTableTemplateForAttachmentsView(i)})}else e.set({multipleSelectionEnabled:!0,relationshipColumnConfigs:de(t,i.id),showAllRelatedTables:!1,tableTemplateOverride:null}),e.hiddenFields.removeMany([le.action,le.attachments])}_getTableTemplateForRelatedTableView(e,t,i){return new ee({columnTemplates:[new X({fieldName:t,editable:!1,menuConfig:{selectionMode:"single",icon:"chevron-down",items:this._extractFieldColumnInfosFromTableTemplate(e.viewModel).map(([s,n])=>({selected:s===t,label:n||s,clickFunction:()=>{e.tableTemplateOverride=this._getTableTemplateForRelatedTableView(e,s,i)}}))},resizable:!1}),new Y({autoWidth:!1,collapsed:!0,flexGrow:0,label:"",resizable:!1,relationshipId:i,width:pe})]})}_getTableTemplateForShowAllTablesView(e,t){const i=[new X({fieldName:t,editable:!1,menuConfig:{selectionMode:"single",icon:"chevron-down",items:this._extractFieldColumnInfosFromTableTemplate(e.viewModel).map(([i,s])=>({selected:i===t,label:s||i,clickFunction:()=>{e.tableTemplateOverride=this._getTableTemplateForShowAllTablesView(e,i)}}))},resizable:!1})];return null!=e.attachmentsViewOptions.objectId&&i.push(new N({attachmentsViewEnabled:!1,autoWidth:!1,flexGrow:0,label:"",resizable:!1,thumbnailsEnabled:!1,width:pe})),new ee({columnTemplates:i})}async _onShowPromptCallback(e){const{column:t,objectId:i,oldValue:s,value:n}=e,{_subtypes:l,layer:r}=this;if(!r||!l.length)return void t.cancel();const o=l.find(e=>e.code===n);if(!o)return void t.cancel();const a=g(),d=this._createSubtypeEditPrompt(s,o,a),h=!!r.parent&&this.autoSaveEnabled;try{this.showPrompt(d);const e=await a.promise,s=[{fieldName:t.fieldName,value:n}];switch(e){case"update-fields":for(const[e,t]of Object.entries(o.defaultValues))null!=t&&s.push({fieldName:e,value:t});await t.updateItems({objectId:i,updates:s}),h&&this.refresh();break;case"keep-existing":await t.updateItems({objectId:i,updates:s}),h&&this.refresh();break;case"undo":t.cancel()}}finally{this.clearPrompt()}}_createSubtypeEditPrompt(e,t,s){const{_subtypes:n,messages:l,messagesCommon:r}=this,o=n.find(t=>t.code===e)?.name??`${e}`;let a="update-fields";const d=[{label:l.subtypes.useDefaultValuesOption,value:"update-fields"},{label:l.subtypes.keepCurrentValuesOption,value:"keep-existing"}];return{context:"info",title:l.subtypes.changeWarningTitle,message:i(l.subtypes.changeWarning,{originalType:o,newType:t.name}),radios:d,defaultRadioSelection:"update-fields",onRadioSelection:e=>{a=e},actions:{primary:{label:r.apply,action:()=>s.resolve(a),type:"positive"},secondary:{label:r.cancel,type:"neutral",action:()=>s.resolve("undo")}},cancel:()=>s.reject()}}_onShowAttachments({objectId:e}){this.hasPendingEdits||(this.attachmentsViewOptions.objectId=e)}_getTableTemplateForAttachmentsView(e){return new ee({columnTemplates:[new X({fieldName:e,editable:!1,menuConfig:{selectionMode:"single",icon:"chevron-down",items:this._extractFieldColumnInfosFromTableTemplate(this).map(([t,i])=>({selected:t===e,label:i||t,clickFunction:()=>{this.tableTemplateOverride=this._getTableTemplateForAttachmentsView(t)}}))},resizable:!1}),new N({attachmentsViewEnabled:!1,autoWidth:!1,flexGrow:0,label:"",resizable:!1,thumbnailsEnabled:!1,width:pe})]})}_extractFieldColumnInfosFromTableTemplate(e){const t=e??this,{layer:i,tableTemplate:s}=t;return s?s.columnTemplates.filter(({type:e})=>"field"===e||"column"===e).map(({fieldName:e,label:t})=>{if(null!=t&&""!==t)return[e,t];const s=i?.fieldsIndex.get(e);return[e,s&&_(s,i)]}):i?.fields.map(e=>[e.name,_(e,i)])??[]}_getDefaultLayerDisplayField(e){const{displayField:t,objectIdField:i}=e;return t&&""!==t.trim()?t:i||(e.fields.length?e.fields[0].name:"")}_getIndexOfFirstFrozenToEndColumn(){const e=this.columns.findIndex(e=>e.frozenToEnd);return e>-1?e:void 0}_logWarning(e,t){t?d.getLogger(this).warnOnce(e):d.getLogger(this).warn(e)}_logTemplateWarning(e){this._logWarning(`${e} Skipped generating a column using the provided template.`,!0)}_onCellInteraction(e){null!=e&&null!=this.attachmentsViewOptions.objectId&&this.highlightIds.add(e)}};e([C()],ue.prototype,"_defaultHiddenFields",null),e([C()],ue.prototype,"_defaultSelectionManager",void 0),e([C()],ue.prototype,"_effectiveTableTemplate",null),e([C()],ue.prototype,"_effectiveAttributeTableTemplate",null),e([C()],ue.prototype,"_highlightableLayerView",null),e([C()],ue.prototype,"_subtypes",null),e([C()],ue.prototype,"activeFilters",null),e([C({readOnly:!0})],ue.prototype,"activeSortOrders",null),e([C()],ue.prototype,"allRelatedTablesVisible",null),e([C()],ue.prototype,"attachmentsColumns",null),e([C()],ue.prototype,"attachmentsEnabled",null),e([C()],ue.prototype,"attachmentsViewOptions",void 0),e([C({type:j})],ue.prototype,"attributeTableTemplate",void 0),e([C()],ue.prototype,"autoRefreshEnabled",void 0),e([C()],ue.prototype,"autoSaveEnabled",null),e([C()],ue.prototype,"canAddRelatedFeature",null),e([C()],ue.prototype,"clearPrompt",null),e([C({readOnly:!0})],ue.prototype,"columns",void 0),e([C()],ue.prototype,"dataProvider",void 0),e([C()],ue.prototype,"definitionExpression",null),e([C()],ue.prototype,"effectiveSelectionManager",null),e([C()],ue.prototype,"fieldColumns",null),e([C({types:v})],ue.prototype,"filterGeometry",null),e([C()],ue.prototype,"filterBySelectionEnabled",null),e([C({readOnly:!0})],ue.prototype,"grid",void 0),e([C()],ue.prototype,"hasContingentValues",null),e([C()],ue.prototype,"hasInvalidPendingEdits",null),e([C()],ue.prototype,"hasPendingEdits",null),e([C()],ue.prototype,"hiddenFields",null),e([C()],ue.prototype,"highlightEnabled",void 0),e([C()],ue.prototype,"initialSize",null),e([C()],ue.prototype,"isQueryingOrSyncing",null),e([C()],ue.prototype,"isSyncingAttachments",null),e([C()],ue.prototype,"layer",null),e([C()],ue.prototype,"layers",void 0),e([C()],ue.prototype,"layerFieldConfigurations",null),e([C()],ue.prototype,"layerView",null),e([C()],ue.prototype,"menuConfig",void 0),e([C()],ue.prototype,"messages",void 0),e([C(),ce("esri/t9n/common")],ue.prototype,"messagesCommon",void 0),e([C(),ce("esri/core/t9n/Units")],ue.prototype,"messagesUnits",void 0),e([C(),ce("esri/widgets/support/t9n/uriUtils")],ue.prototype,"messagesURIUtils",void 0),e([C()],ue.prototype,"outFields",null),e([C()],ue.prototype,"pendingEditsCount",null),e([C()],ue.prototype,"prompt",void 0),e([C()],ue.prototype,"relatedRecordsEnabled",null),e([C()],ue.prototype,"relatedTable",null),e([C()],ue.prototype,"relatedTableHasContingentValues",null),e([C()],ue.prototype,"relatedTables",void 0),e([C()],ue.prototype,"relationship",null),e([C()],ue.prototype,"relationshipColumnConfigs",void 0),e([C()],ue.prototype,"relationshipColumns",null),e([C()],ue.prototype,"relationshipConfig",null),e([C()],ue.prototype,"relationshipInfos",null),e([C()],ue.prototype,"relationships",null),e([C()],ue.prototype,"returnGeometryEnabled",null),e([C()],ue.prototype,"returnMEnabled",null),e([C()],ue.prototype,"returnZEnabled",null),e([C()],ue.prototype,"selectionManager",void 0),e([C()],ue.prototype,"selectionSource",null),e([C()],ue.prototype,"showAllRelatedTables",null),e([C()],ue.prototype,"showPrompt",null),e([C()],ue.prototype,"showRelatedTableCallback",void 0),e([C({readOnly:!0,type:J})],ue.prototype,"store",void 0),e([C()],ue.prototype,"supportsAttachments",null),e([C()],ue.prototype,"supportsAddAttachments",null),e([C()],ue.prototype,"supportsDeleteAttachments",null),e([C()],ue.prototype,"supportsResizeAttachments",null),e([C()],ue.prototype,"supportsUpdateAttachments",null),e([C()],ue.prototype,"syncTemplateOnChangesEnabled",void 0),e([C()],ue.prototype,"syncViewSelection",void 0),e([C()],ue.prototype,"tableController",void 0),e([C()],ue.prototype,"tableParent",void 0),e([C({type:ee})],ue.prototype,"tableTemplate",void 0),e([C()],ue.prototype,"tableTemplateOverride",void 0),e([C({type:R})],ue.prototype,"timeExtent",null),e([C()],ue.prototype,"timeZone",null),e([C()],ue.prototype,"view",null),ue=e([I("esri.widgets.FeatureTable.FeatureTableViewModel")],ue);const ge=ue;export{ge as default};
|
|
2
|
+
import{__decorate as e}from"tslib";import{onLocaleChange as t,substitute as i,fetchMessageBundle as s}from"../../intl.js";import{isSome as n}from"../../core/arrayUtils.js";import l from"../../core/Collection.js";import{referenceSetter as r}from"../../core/collectionUtils.js";import o from"../../core/Error.js";import a from"../../core/Logger.js";import{abortMaybe as d}from"../../core/maybe.js";import{debounce as h,ignoreAbortErrors as m,after as c,throwIfAborted as p,createResolver as u}from"../../core/promiseUtils.js";import{watch as g,initial as b,on as f,syncAndInitial as y}from"../../core/reactiveUtils.js";import{throttle as T}from"../../core/throttle.js";import{property as w,subclass as C}from"../../core/accessorSupport/decorators.js";import{getEffectiveFieldAlias as I}from"../../editing/fieldUtils.js";import{geometryTypes as _}from"../../geometry/support/typeUtils.js";import{getLowerCaseDefaultHiddenFields as v}from"../../layers/support/fieldUtils.js";import{getSubtypesFromLayer as E,isSubtypeGroupLayer as S}from"../../layers/support/layerUtils.js";import{createFieldInfos as A}from"../../support/popupUtils.js";import F from"../../tables/AttributeTableTemplate.js";import j from"../../tables/support/FieldOrder.js";import x from"../../time/TimeExtent.js";import R from"../../views/SelectionManager.js";import{temporaryHighlightName as U}from"../../views/support/HighlightDefaults.js";import{highlightsSupported as P}from"../../views/support/layerViewUtils.js";import{isISelectableLayerWithObjectIds as O}from"../../views/support/selectionUtils.js";import V from"./ActionColumn.js";import z from"./AttachmentsColumn.js";import W from"./FieldColumn.js";import H from"./RelationshipColumn.js";import M from"./Grid/Column.js";import L from"./Grid/Grid.js";import G from"./Grid/GridViewModel.js";import B from"./Grid/GroupColumn.js";import k from"./support/AttachmentsColumnTemplate.js";import N from"./support/AttachmentsViewOptions.js";import{isAttachmentsColumn as D,isFieldColumn as $,isRelationshipColumn as Z}from"./support/columnUtils.js";import{downloadAttachmentInfo as q,exportToCSV as Q}from"./support/exportUtils.js";import K from"./support/FeatureStore.js";import J from"./support/FieldColumnTemplate.js";import X from"./support/RelationshipColumnTemplate.js";import Y from"./support/TableTemplate.js";import{isIFeatureTableSupportedLayerWithFieldConfigurations as ee,isIFeatureTableSupportedLayerWithRelationships as te,findRelatedLayerInSources as ie,findRelationship as se,uniqueColumnNames as ne,hasColumnForField as le,findField as re,isIFeatureTableSupportedLayerWithAttachments as oe,getRelationshipIdsToShow as ae}from"./support/tableUtils.js";import{createAttributeTableElements as de}from"./support/templateUtils.js";import{goTo as he}from"../support/goToUtils.js";import{messageBundle as me}from"../support/widget.js";const ce="80px";let pe=class extends G{constructor(e){super(e),this._currentTemporaryHighlight=null,this._defaultSelectionManager=new R,this._refreshDebounced=h(()=>this._refresh()),this._syncTemplateThrottled=T(()=>this._syncAttributeTableTemplate()),this._temporaryHighlightAbortController=null,this.attachmentsViewOptions=new N,this.attributeTableTemplate=null,this.autoRefreshEnabled=!0,this.columns=new l,this.dataProvider=async(e,t)=>{const{layer:i,store:s}=this;if(!t)return;if(!i||!s)return void(t&&t([]));await i.load();const{objectIds:n}=this;if(this.filterBySelectionEnabled&&!this.highlightIds.length||1===n.length&&-1===n.items[0])return void t([]);"loaded"!==s.state&&"loading"!==s.state&&await s.load();const l=this.paginationEnabled?this.pageIndex:e.page,r=await s.fetchItems({...e,page:l});t&&t(r)},this.grid=null,this.highlightEnabled=!0,this.layers=null,this.maxSize=null,this.menuConfig=null,this.messages=null,this.messagesCommon=null,this.messagesUnits=null,this.messagesURIUtils=null,this.prompt=null,this.relatedTables=new l,this.relationshipColumnConfigs=null,this.selectionManager=null,this.showRelatedTableCallback=null,this.store=null,this.syncTemplateOnChangesEnabled=!0,this.syncViewSelection=!1,this.tableController=null,this.tableParent=null,this.tableTemplate=null,this.tableTemplateOverride=null,this._onLayerRefresh=this._onLayerRefresh.bind(this),this._onShowPromptCallback=this._onShowPromptCallback.bind(this),this._set("store",new K),this._set("grid",new L({viewModel:this}))}initialize(){const e=async()=>{this.messages=await s("esri/widgets/FeatureTable/t9n/FeatureTable"),this.messagesCommon=await s("esri/t9n/common"),this.messagesUnits=await s("esri/core/t9n/Units"),this.messagesURIUtils=await s("esri/widgets/support/t9n/uriUtils")};e(),this.addHandles([t(()=>{e(),this._generateColumns()}),g(()=>[this.messages,this.messagesCommon,this.messagesURIUtils],()=>{const e=this.messages;this.grid&&(this.grid.messages=e),this.allColumns.forEach(t=>{t.messages=e,t.messagesCommon=this.messagesCommon,t.messagesURIUtils=this.messagesURIUtils}),this.refreshCellContent()},b),g(()=>this.attachmentsEnabled,()=>this.layer?.loaded&&this._generateColumns()),g(()=>this.layer,async(e,t)=>{const i=this.grid;i&&(i.clearSort(),e&&t&&await this.reset()),this.goToPage(0),this._drainColumns(),this.store.layer=e,e&&(e.loaded?this._onLayerLoad():e.load().catch(()=>{})),t&&null!=this.attachmentsViewOptions.objectId&&(this.attachmentsViewOptions.objectId=null)}),g(()=>this.layer?.loaded,e=>e&&this._onLayerLoad()),g(()=>this.store.state,e=>{"loaded"===e&&(this.scrollToTop(),this.refreshCellContent())}),g(()=>this._effectiveTableTemplate,()=>{this.scrollLeft(),this.layer?.loaded&&this._generateColumns()}),g(()=>this.editingEnabled,()=>this.refreshCellContent()),g(()=>this.timeZone??this.view?.timeZone,()=>this.refreshCellContent()),g(()=>this.store.effectiveWhere,()=>"loaded"===this.store.state&&this.reset()),g(()=>this.layer?.timeExtent,(e,t)=>(e||t)&&!this.timeExtent&&"loaded"===this.store.state&&this.reset()),f(()=>this.layer,"refresh",e=>this._onLayerRefresh(e)),f(()=>this.grid,["cell-click","cell-dblclick","cell-pointerover","cell-pointerout","cell-keydown","column-reorder"],({index:e,item:t,native:i,path:s,type:n})=>{const l=t?.feature,r=l?.getObjectId(),o="cell-keydown"===n&&i&&i instanceof KeyboardEvent&&"Enter"===i.key;this.emit(n,{feature:l,index:e,native:i,type:n,fieldName:s??void 0,objectId:r}),(o||"cell-click"===n)&&this._onCellInteraction(r)}),g(()=>this.actionColumnConfig,e=>{const{actionColumn:t,columns:i}=this;t?e?t.set(e):i.remove(t):e&&i.length&&i.add(this._generateActionColumn(),!1!==e.frozenToEnd?void 0:this._getIndexOfFirstFrozenToEndColumn())}),g(()=>this.relatedRecordsEnabled,()=>this.layer?.loaded&&this._generateColumns()),f(()=>this.objectIds,"change",()=>this._onObjectIdsChange(),{onListenerAdd:()=>this._onObjectIdsChange()}),g(()=>[this.paginationEnabled,this.pageIndex],()=>this.refreshPageCache()),g(()=>this.activeSortOrders,e=>{this.store.sortOrders=e,this._syncTemplateThrottled()}),g(()=>this.allVisibleColumns,()=>this._syncTemplateThrottled()),g(()=>this.pageCount,()=>{this.pageIndex>=this.pageCount&&this.goToPage(0)}),g(()=>this.state,e=>{"disabled"===e&&this.relatedTables.length&&this.drainRelatedTables()}),f(()=>this.tableParent?.highlightIds,"change",({added:e})=>{const{relationshipConfig:t}=this,i=e[0];if(null==i||!t)return;const{relatedLayer:s,relationshipId:n}=t;this.relationshipConfig={objectId:i,relatedLayer:s,relationshipId:n}}),f(()=>this.tableParent,"cell-click",async e=>{const{objectId:t}=e;this.tableController&&this.hasPendingEdits?await this.tableController.discardPendingEdits(void 0,!0).then(e=>e&&this._syncTableParentSelection(t)):this._syncTableParentSelection(t)}),g(()=>this.attachmentsViewOptions.objectId,(e,t)=>{null!=e?null==t&&this.showAttachmentsView({objectId:e}):this.hideAttachmentsView()}),g(()=>[this.layerFieldConfigurations,this.pendingEditsCount],()=>this.refreshCellContent()),f(()=>this.highlightIds,"change",e=>this._onHighlightIdsChange(e),{onListenerAdd:()=>this._syncSelection(),onListenerRemove:()=>this._defaultSelectionManager.clear()}),g(()=>this.grid?.temporaryHighlightId,e=>{this._temporaryHighlightAbortController?.abort(),this._temporaryHighlightAbortController=new AbortController,m(this._syncTemporaryHighlight(e,this._temporaryHighlightAbortController.signal))}),g(()=>this.effectiveSelectionManager,()=>this._syncSelection(),y),f(()=>this.effectiveSelectionManager,"selection-change",()=>this._syncSelection(),y),g(()=>[this.layer,this.view],()=>this._syncSelectionSources(),y),g(()=>this.highlightEnabled,e=>this._defaultSelectionManager.highlightEnabled=e,b)])}destroy(){this._drainColumns(),this._currentTemporaryHighlight?.handle.remove(),this._temporaryHighlightAbortController=d(this._temporaryHighlightAbortController),this._defaultSelectionManager.destroy(),this.grid?.destroy(),this.columns.destroyed||this.columns.destroy(),this.layer=null,this.view=null}get _defaultHiddenFields(){return v(this.layer)}get _effectiveTableTemplate(){return this.tableTemplateOverride||this.tableTemplate}get _effectiveAttributeTableTemplate(){return this.attributeTableTemplate||this.layer?.attributeTableTemplate}get _highlightableLayerView(){const e=this.layerView;return P(e)?e:null}get _subtypes(){return E(this.layer)}get actionColumn(){return super.actionColumn}get activeFilters(){const{filterGeometry:e,objectIds:t,filterBySelectionEnabled:i,highlightIds:s}=this,n=new l;return e&&n.push({type:"geometry",geometry:e}),i?n.push({type:"selection",objectIds:s.toArray()}):t.length&&n.push({type:"objectId",objectIds:t.toArray()}),n}get activeSortOrders(){return this.grid?.sortOrders?this.grid.sortOrders.map(({path:e,direction:t})=>({fieldName:e,direction:t})).filter(e=>e.fieldName&&e.direction):[]}get allColumns(){return super.allColumns}get allRelatedTablesVisible(){return!!(this.relatedRecordsEnabled&&this.relatedTables.length&&this.showAllRelatedTables)}get allVisibleColumns(){return super.allVisibleColumns}get attachmentsColumns(){return this.allColumns.filter(e=>D(e))}get attachmentsEnabled(){return this.store.attachmentsEnabled}set attachmentsEnabled(e){this.store.attachmentsEnabled=e}get autoSaveEnabled(){return this.store.autoSaveEnabled}set autoSaveEnabled(e){this.store.autoSaveEnabled=e}get canAddRelatedFeature(){return this.store.canAddRelatedFeature}get clearPrompt(){return()=>this.prompt=null}set clearPrompt(e){this._overrideIfSome("clearPrompt",e)}get definitionExpression(){return this.store.where}set definitionExpression(e){this.store.where=e}get editingEnabled(){return super.editingEnabled}set editingEnabled(e){super.editingEnabled=e}get effectiveSelectionManager(){const{layer:e,view:t}=this;return e&&this.syncViewSelection&&O(e)&&t?.selectionManager?.sources.includes(e)?t.selectionManager:this.selectionManager??this._defaultSelectionManager}get effectiveSize(){return super.effectiveSize}get fieldColumns(){return this.allColumns.filter(e=>$(e))}get filterGeometry(){return this.store.filterGeometry}set filterGeometry(e){this.store.filterGeometry=e}get filterBySelectionEnabled(){return!!this._get("filterBySelectionEnabled")}set filterBySelectionEnabled(e){const{objectIds:t}=this,i=t.length;e?(i&&(t.removeAll(),this._logWarning("Selection filter has been applied with an objectID filter. Object ID filter has been removed.")),this.filterGeometry&&this._logWarning("Selection filter has been applied with a geometry filter. Results may appear inconsistent"),this._syncObjectIdsWithStore(this.highlightIds.toArray())):i||this._syncObjectIdsWithStore(null),this._set("filterBySelectionEnabled",e)}get groupColumns(){return super.groupColumns}get hasContingentValues(){return this.relatedTableHasContingentValues||this.store.hasContingentValues}get hasInvalidPendingEdits(){return this.relatedTableHasInvalidPendingEdits||this.store.hasInvalidPendingEdits}get hasPendingEdits(){return this.relatedTableHasPendingEdits||this.store.hasPendingEdits}get hiddenFields(){return this._get("hiddenFields")??new l}set hiddenFields(e){this._set("hiddenFields",r(e,this._get("hiddenFields"),l))}get highlightIds(){return super.highlightIds}set highlightIds(e){super.highlightIds=e}get initialSize(){return this.store.initialSize}set initialSize(e){this.store.initialSize=e}get isEditing(){return super.isEditing}get isQuerying(){return super.isQuerying}get isSyncing(){return super.isSyncing}get isQueryingOrSyncing(){return this.isQuerying||this.isSyncing||this.relatedTables.some(e=>!!e.isQueryingOrSyncing)}get isSyncingAttachments(){return this.store.isSyncingAttachmentEdits||this.relatedTables.some(e=>!!e.isSyncingAttachments)}get layer(){return this._get("layer")}set layer(e){this.drainRelatedTables(),this._set("layer",e)}get layerFieldConfigurations(){const e=this.layer;return ee(e)?e.fieldConfigurations:void 0}get layerView(){return this.store.layerView}get objectIds(){return super.objectIds}set objectIds(e){super.objectIds=e}get outFields(){return this.store.outFields}set outFields(e){this.store.outFields=e}get pageCount(){return super.pageCount}get pageIndex(){return super.pageIndex}set pageIndex(e){super.pageIndex=e}get pageSize(){return super.pageSize}set pageSize(e){super.pageSize=e}get pendingEditsCount(){return this.store.pendingEditsCount}get relatedRecordsEnabled(){return this.store.relatedRecordsEnabled}set relatedRecordsEnabled(e){this.store.relatedRecordsEnabled=e}get relatedTable(){return this.relatedTables.at(-1)}get relatedTableHasContingentValues(){return!!this.relatedTable?.hasContingentValues}get relatedTableHasInvalidPendingEdits(){return!!this.relatedTable?.hasInvalidPendingEdits}get relatedTableHasPendingEdits(){return!!this.relatedTable?.hasPendingEdits}get relationship(){return this.store.relationship}get relationshipColumns(){return this.allColumns.filter(e=>Z(e))}get relationshipConfig(){return this.store.relationshipConfig}set relationshipConfig(e){this.highlightIds.removeAll(),this.objectIds.removeAll(),this.filterBySelectionEnabled=!1,this.store.relationshipConfig=e}get relationshipInfos(){const{layer:e,layers:t,relationships:i,tableController:s}=this,n=this.store.relationshipInfos;if(n.length||!te(e)||!i?.length)return n;const l=[],r=s?.layers||t||[];return i.forEach(t=>{const i=ie(e,r,t);i&&(i.load(),l.push({layer:e,relatedLayer:i,relationshipId:t.id}))}),l}get relationships(){return this.store.relationships}get returnGeometryEnabled(){return this.store.returnGeometry}set returnGeometryEnabled(e){this.store.returnGeometry=e}get returnMEnabled(){return this.store.returnM}set returnMEnabled(e){this.store.returnM=e}get returnZEnabled(){return this.store.returnZ}set returnZEnabled(e){this.store.returnZ=e}get rowHighlightIds(){return super.rowHighlightIds}set rowHighlightIds(e){super.rowHighlightIds=e}get selectionSource(){return"table"}set selectionSource(e){this.syncViewSelection="view"===e,this._overrideIfSome("selectionSource",e)}get showAllRelatedTables(){return this._get("showAllRelatedTables")}set showAllRelatedTables(e){const{relatedTable:t}=this;this._set("showAllRelatedTables",e),t&&(e?this._showAllRelatedTables(t):this._hideAllRelatedTables(t))}get showPrompt(){return e=>{this.prompt?.cancel?.(),this.prompt=e}}set showPrompt(e){this._overrideIfSome("showPrompt",e)}get size(){return super.size}get state(){return super.state}get supportsAttachments(){return this.store.supportsAttachments}get supportsAddAttachments(){const{store:{supportsAddAttachments:e,supportsEditing:t}}=this;return this.editingEnabled&&t&&e}get supportsDeleteAttachments(){return this.supportsUpdateAttachments}get supportsResizeAttachments(){return this.store.supportsResizeAttachments}get supportsUpdateAttachments(){const{store:{supportsUpdateAttachments:e,supportsEditing:t}}=this;return this.editingEnabled&&t&&e}get timeExtent(){return this.store.timeExtent}set timeExtent(e){this.store.timeExtent=e}get timeZone(){return this.store.timeZone}set timeZone(e){this.store.timeZone=e}get view(){return this.store.view}set view(e){this.store.view=e,this.fieldColumns.forEach(t=>t.view=e),this.refreshCellContent()}get visibleColumns(){return super.visibleColumns}async addAttachment(e,t){const{attachmentsViewOptions:i,store:s}=this,n=i.objectId===e;await s.addAttachment(e,t).catch(e=>{n&&e&&"object"==typeof e&&"error"in e&&e.error instanceof o&&(this._logWarning(`Unable to add attachment. ${e.error.name} ${e.error.message}`),i.error=e.error)}),n&&!i.error&&(i.onEditComplete(),i.attachmentInfos=await s.getAttachmentsByObjectId(e,!0)),this.refreshCellContent()}addPendingEdits(e){this.store.addPendingEdits(e)}collapseRelatedTable(e,t){const{relatedLayer:i,objectId:s,relationshipId:n}=t,{objectIdField:r}=i,o=se(i,n),a=i.displayField||o?.keyField||r;e.set({highlightIds:new l([s]),multipleSelectionEnabled:!1,tableTemplateOverride:this._getTableTemplateForRelatedTableView(e,a,n)});const d=e.hiddenFields;d.includes(ne.action)||d.add(ne.action),d.includes(ne.attachments)||d.add(ne.attachments),e.scrollLeft()}async deleteAttachments(e,t){const{attachmentsViewOptions:i,store:s}=this,n=i.objectId===e;await s.deleteAttachments(e,t).catch(e=>{n&&e&&"object"==typeof e&&"error"in e&&e.error instanceof o&&(this._logWarning(`Unable to delete attachment(s). ${e.error.name} ${e.error.message}`),i.error=e.error)}),n&&!i.error&&(i.onEditComplete(),i.attachmentInfos=await s.getAttachmentsByObjectId(e,!0)),this.refreshCellContent()}async deleteSelection(){const e=this.highlightIds.toArray();if(!e?.length)return;const{deleteFeatureResults:t}=await this.store.deleteRowsByObjectId(e),i=t.filter(e=>!e.error).map(e=>e.objectId);i.length&&(this.highlightIds.removeMany(i),await this.refresh())}async discardPendingEdits(e){return this.relatedTable&&this.relatedTableHasPendingEdits?this.relatedTable.discardPendingEdits(e):(this.store.discardPendingEdits(e),!0)}async downloadAttachmentById(e,t){const i=(await this.store.getAttachmentsByObjectId(e,!0)).find(e=>e.id===t);await q(i)}drainRelatedTables(){this.relatedTables.drain(e=>e.destroy()),this.set({multipleSelectionEnabled:!0,relationshipColumnConfigs:null,showAllRelatedTables:!1,tableTemplateOverride:null}),this.hiddenFields.removeMany([ne.action,ne.attachments])}drainRelatedTablesAboveIndex(e){const{relatedTables:t}=this,i=t.slice(e+1);t.removeMany(i).forEach(e=>e.destroy());const s=t.at(-1);s&&(s.attachmentsViewOptions.objectId=null,this.allRelatedTablesVisible?this._showAllRelatedTables(s):this._hideAllRelatedTables(s))}async exportSelectionToCSV(e){const{highlightIds:t,layer:i,outFields:s}=this;i&&t.length?await Q({layer:i,objectIds:t.toArray(),outFields:s,includeGeometry:e}):this._logWarning("Export failed.")}getFeatureStoreItemByObjectId(e){return this.store.getItemByObjectId(e)}async getFeatureTitle(e,t){return this.store.getFeatureTitle(e,t)}getFeatureTitleSync(e){const t=this.layer;if(!t)return`${e}`;const i=`${t.objectIdField}: ${e}`;return null==e?i:this.store.featureTitleMap.get(e)??i}getObjectIdIndex(e){return this.store.getItemIndexByObjectId(e)}getValue(e,t){const i=this.getFeatureStoreItemByObjectId(e);return i?.feature?.attributes[t]}getVirtualPageIndex(){return this.grid?.getVirtualPageIndex()??0}goToPage(e){if(null==e||!Number.isInteger(e))return void this._logWarning("Invalid 'page' parameter provided to 'goToPage()'. Current page will remain the same.");const{pageCount:t}=this;(e>=t||-1===e)&&(e=t-1),e<-1&&(e=0),e!==this.pageIndex&&(this.pageIndex=e),this.paginationEnabled||this.scrollToIndex(e*this.pageSize)}hideAttachmentsView(){this.attachmentsViewOptions.objectId=null,this.set({relationshipColumnConfigs:null,multipleSelectionEnabled:!0,tableTemplateOverride:null}),this.hiddenFields.remove(ne.action)}nextPage(){const e=this.paginationEnabled?this.pageIndex:this.getVirtualPageIndex();this.goToPage(e+1)}previousPage(){const e=this.paginationEnabled?this.pageIndex:this.getVirtualPageIndex();this.goToPage(e-1)}async refresh(){await Promise.all([...this.relatedTables.map(e=>e.refresh()),m(this._refreshDebounced())])}refreshCellContent(){this.grid?.requestContentUpdate()}refreshPageCache(){this.grid?.refreshPageCache()}async reset(){this.goToPage(0),await(this.grid?.reset())}async savePendingEdits(){!this.relatedTableHasPendingEdits||this.relatedTableHasInvalidPendingEdits?this.hasPendingEdits&&!this.relatedTable&&(await this.store.savePendingEdits(),await this.refresh()):await(this.relatedTable?.savePendingEdits())}scrollLeft(){this.grid?.scrollLeft(0)}scrollToBottom(){this.grid?.scrollToBottom()}scrollToIndex(e){this.grid?.scrollToIndex(e)}scrollToRow(e){const t=this.store.getItemIndexByObjectId(e);t>-1?this.grid?.scrollToIndex(t):this._logWarning("Row not found. Associated data may not be loaded yet.")}scrollToTop(){this.grid?.scrollToTop()}async saveAttachmentsViewForm(){const{attachmentId:e,form:t,objectId:i}=this.attachmentsViewOptions;null!=i&&t&&(null!=e?await this.updateAttachment(i,e,t):await this.addAttachment(i,t))}async showAttachmentsView({objectId:e}){const{attachmentsViewOptions:t,hiddenFields:i,layer:s}=this;if(!this.attachmentsEnabled||!s)return void this._logWarning("The 'attachmentsEnabled' property is currently false.");await s.load();const n=this._getDefaultLayerDisplayField(s),r=await this.store.getAttachmentsByObjectId(e,!0),o=this.store.getItemIndexByObjectId(e);t.set({attachmentInfos:r,mode:r.length?"list":"file",objectId:e}),this.set({highlightIds:new l([e]),multipleSelectionEnabled:!1,relationshipColumnConfigs:[],tableTemplateOverride:this._getTableTemplateForAttachmentsView(n)}),i.includes(ne.action)||i.add(ne.action),null!=o&&this.scrollToIndex(o)}syncAttributeTableTemplate(){this._syncAttributeTableTemplate(!0)}async updateAttachment(e,t,i){const{attachmentsViewOptions:s,store:n}=this,l=s.objectId===e;await n.updateAttachment(e,t,i).catch(e=>{l&&e&&"object"==typeof e&&"error"in e&&e.error instanceof o&&(this._logWarning(`Unable to update attachment. ${e.error.name} ${e.error.message}`),s.error=e.error)}),l&&!s.error&&(s.onEditComplete(),s.attachmentInfos=await n.getAttachmentsByObjectId(e,!0)),this.refreshCellContent()}async zoomToSelection(){const{layer:e,view:t}=this,i=this.highlightIds.toArray();if(!e||!t||!i.length)return;const s=e.createQuery();s.objectIds=i,s.returnGeometry=!0;const n=await e.queryFeatures(s);try{await he(t,n.features)}catch(l){"AbortError"!==l.name&&console.error(l)}}_syncAttributeTableTemplate(e=!1){const{_effectiveAttributeTableTemplate:t,layer:i,tableTemplateOverride:s,syncTemplateOnChangesEnabled:n}=this;if(!i||!t||!n&&!e||s||this.tableParent||this.relatedTable||null!==this.attachmentsViewOptions.objectId)return;const{activeSortOrders:l,allColumns:r,columns:o}=this,a=[],d=de(o.toArray());l.forEach(({fieldName:e,direction:t})=>{e&&t&&a.push(new j({field:e,order:t}))}),r.forEach(({fieldName:e,direction:t})=>{t&&!a.some(t=>t.field===e)&&a.push(new j({field:e,order:t}))}),t.elements=d,t.orderByFields=a}async _refresh(){await this.store.refresh();const e=this.highlightIds.toArray();if(e.length){(await this.store.verifyFeaturesByObjectId(e)).forEach((t,i)=>{t||this.highlightIds.remove(e[i])})}this.refreshPageCache();const t=this.attachmentsViewOptions;null!=t?.objectId&&(t.attachmentInfos=await this.store.getAttachmentsByObjectId(t.objectId,!0))}async _onLayerLoad(){const{layer:e,pageSize:t}=this;if(!e)return;e.parent&&S(e.parent)&&await e.parent.loadAll();const i=e.capabilities.query?.maxRecordCount,s=i&&i<t,n=s?i:t;s&&(this._logWarning("The value for 'pageSize' has been adjusted due to the provided layer's max record count."),this.pageSize=n),this.grid?.set("pageSize",n),this.store.load(),this._generateColumns()}_onLayerRefresh(e){this.autoRefreshEnabled&&e.dataChanged&&this.refresh()}_generateColumns(){this._drainColumns();const{_effectiveTableTemplate:e,_effectiveAttributeTableTemplate:t,layer:i}=this,s=e?.columnTemplates;if(!i)return;const n=this._generateColumnsFromColumnTemplates(i,s)??this._generateColumnsFromAttributeTableTemplate(i,t)??this._generateDefaultFieldColumns(i);n.length&&(this.attachmentsEnabled&&!n.some(e=>D(e))&&n.push(this._generateDefaultAttachmentsColumn(i)),this.relatedRecordsEnabled&&this.relationshipInfos.length&&!n.some(e=>Z(e))&&n.push(...this._generateDefaultRelationshipColumns()),this.actionColumnConfig&&n.push(this._generateActionColumn()),n.sort((e,t)=>e.frozen&&t.frozen||e.frozenToEnd&&t.frozenToEnd?0:e.frozen||t.frozenToEnd?-1:0),this.columns.addMany(n))}_generateColumnsFromAttributeTableTemplate(e,t){if(!t)return null;const{elements:i,orderByFields:s}=t,l=A(e),r=[];r.push(...this._generateColumnsFromAttributeTableElements(e,i,s));const o=l.map(t=>{if(!t.fieldName||le(t.fieldName,r))return null;const{fieldName:i}=t,n=re(e,i);return n?this._generateDefaultFieldColumn(e,n,{hidden:!0,orderByFields:s}):(this._logTemplateWarning("A valid 'field' could not be found for the provided template."),null)}).filter(n);return r.push(...o),this.attachmentsEnabled&&oe(e)&&!r.some(e=>D(e))&&r.push(this._generateDefaultAttachmentsColumn(e,{hidden:!0})),this.relatedRecordsEnabled&&te(e)&&e.relationships?.forEach(({id:e},t)=>{const i=this.relationshipInfos.find(t=>t.relationshipId===e);i&&!r.some(t=>Z(t)&&t.relationshipId===e)&&r.push(this._generateDefaultRelationshipColumn({hidden:!0,info:i,index:t}))}),r.length?r:null}_generateColumnsFromAttributeTableElements(e,t,i){return t?.map((t,s)=>{switch(t.type){case"field":return this._createFieldColumnFromElement({layer:e,element:t,orderByFields:i});case"group":return this._createGroupColumnFromElement({layer:e,element:t,orderByFields:i});case"attachment":return this._createAttachmentColumnFromElement({layer:e,element:t,index:s});case"relationship":return this._createRelationshipColumnFromElement({element:t,index:s})}}).filter(e=>!!e)??[]}_createFieldColumnFromElement(e){const{layer:t,element:i,orderByFields:s}=e,{fieldName:n}=i;if(null==n)return this._logTemplateWarning("A valid 'fieldName' must be provided."),null;const l=re(t,n);if(!l)return this._logTemplateWarning("A valid 'field' could not be found for the provided template."),null;const{description:r,label:o}=i,a=s?.findIndex(({field:e})=>e&&e===n)??-1,d=a>-1?s?.at(a)?.order:void 0,h=a>-1?a:void 0,{grid:m,messages:c,messagesCommon:p,messagesURIUtils:u,store:g,view:b}=this;return new W({description:r,direction:d,field:l,fieldName:n,grid:m,initialSortPriority:h,label:o,layer:t,messages:c,messagesCommon:p,messagesURIUtils:u,store:g,view:b,onShowPromptCallback:this._onShowPromptCallback})}_createGroupColumnFromElement(e){const{layer:t,element:i,orderByFields:s}=e,{description:n,label:l}=i;if(!l)return this._logTemplateWarning("Group columns require a label."),null;if(!i.elements.length)return this._logTemplateWarning("Group columns require child columns."),null;const{grid:r,messages:o,messagesCommon:a,messagesURIUtils:d,store:h}=this;return new B({columns:this._generateColumnsFromAttributeTableElements(t,i.elements,s),description:n,grid:r,label:l,messages:o,messagesCommon:a,messagesURIUtils:d,store:h})}_createAttachmentColumnFromElement(e){if(!this.attachmentsEnabled)return void this._logTemplateWarning("The 'attachmentsEnabled' property is currently false.");const{layer:t,element:i,index:s}=e,{description:n,label:l}=i,{grid:r,messages:o,messagesCommon:a,messagesURIUtils:d,store:h}=this;return new z({description:n,fieldName:`${ne.attachments}-${s}`,grid:r,label:l,layer:t,messages:o,messagesCommon:a,messagesURIUtils:d,store:h,onShowAttachments:e=>this._onShowAttachments(e)})}_createRelationshipColumnFromElement(e){if(!this.relatedRecordsEnabled)return void this._logTemplateWarning("Relationship columns require related records to be enabled on the table.");const{element:t,index:i}=e,{description:s,label:n,relationshipId:l}=t,r=this.relationshipInfos.find(e=>e.relationshipId===l);if(!r)return this._logTemplateWarning("Unable to find valid related layer target based on the provided relationship id."),null;const{grid:o,messages:a,messagesCommon:d,messagesURIUtils:h,store:m}=this;return new H({description:s,fieldName:`${ne.relationship}-${l}-${i}`,grid:o,label:n,messages:a,messagesCommon:d,messagesURIUtils:h,relationshipId:l,store:m,layer:r.relatedLayer,relatedLayer:r.layer,showRelatedTableCallback:e=>this._onShowRelatedTable(e)})}_generateColumnsFromColumnTemplates(e,t){const{grid:i,messages:s,messagesCommon:n,messagesURIUtils:l,store:r,view:o}=this;if(!t?.length)return null;const a=[];return t.forEach((t,d)=>{const{autoWidth:h,description:m,direction:c,flexGrow:p,fieldName:u,formatFunction:g,frozen:b,frozenToEnd:f,icon:y,iconText:T,initialSortPriority:w,invalid:C,label:I,labelTooltipText:_,menuConfig:v,resizable:E,sortable:S,textAlign:A,textWrap:F,timeZone:j,type:x,width:R}=t;if(!x)return void this._logTemplateWarning("Property 'type' is missing from the provided template.");if(b&&f)return void this._logTemplateWarning("Properties 'frozen' and 'frozenToEnd' cannot both be true for the same column.");const U=!1===t.visible;if("group"===x){if(!t.columnTemplates?.length)return void this._logTemplateWarning("Group columns must contain column templates.");if(!t.label)return void this._logTemplateWarning("Group columns require a label.");const r=this._generateColumnsFromColumnTemplates(e,t.columnTemplates),o=U||this._isFieldHidden(t.label);a.push(new B({autoWidth:h,columns:r,description:m,flexGrow:p,frozen:b,frozenToEnd:f,grid:i,hidden:o,icon:y,iconText:T,invalid:C,label:I,labelTooltipText:_,menuConfig:v,messages:s,messagesCommon:n,messagesURIUtils:l,resizable:E,textAlign:A,textWrap:F,timeZone:j,width:R}))}else if("attachment"===x){if(!this.attachmentsEnabled)return void this._logTemplateWarning("Attachment columns require attachments to be enabled on the table.");a.push(this._generateAttachmentsColumnFromTemplate(e,t,d))}else if("relationship"===x){if(!this.relatedRecordsEnabled)return void this._logTemplateWarning("Relationship columns require related records to be enabled on the table.");const{relationshipId:e}=t;if(null==e)return void this._logTemplateWarning("Property 'relationshipId' is missing from the provided template.");const i=this.relationshipInfos.find(t=>t.relationshipId===e);if(!i)return void this._logTemplateWarning("Unable to find valid related layer target based on the provided relationship id.");a.push(this._generateRelationshipColumnFromTemplate(i,t,d))}else if(!u)return void this._logTemplateWarning("Value for 'fieldName' property was missing from the provided template.");const P=U||this._isFieldHidden(u);if("column"===x)a.push(new M({autoWidth:h,description:m,direction:c,fieldName:u,flexGrow:p,formatFunction:g,frozen:b,frozenToEnd:f,grid:i,hidden:P,icon:y,iconText:T,initialSortPriority:w,invalid:C,label:I,labelTooltipText:_,menuConfig:v,messages:s,messagesCommon:n,messagesURIUtils:l,resizable:E,sortable:S,store:r,textAlign:A,textWrap:F,timeZone:j,width:R}));else if("field"===x){const d=re(e,t.fieldName);if(!d)return void this._logTemplateWarning("A valid 'field' could not be found for the provided template.");const{editable:u,required:x}=t;a.push(new W({autoWidth:h,description:m,direction:c,editable:u,field:d,fieldName:d.name,flexGrow:p,formatFunction:g,frozen:b,frozenToEnd:f,grid:i,hidden:P,icon:y,iconText:T,initialSortPriority:w,invalid:C,label:I,labelTooltipText:_,layer:e,messages:s,messagesCommon:n,messagesURIUtils:l,menuConfig:v,required:x,resizable:E,sortable:S,store:r,template:t,textAlign:A,textWrap:F,timeZone:j,width:R,view:o,onShowPromptCallback:this._onShowPromptCallback}))}}),a.length?a:null}_generateDefaultFieldColumns(e){return e.fields?.map(t=>this._generateDefaultFieldColumn(e,t)).filter(n)??[]}_generateDefaultFieldColumn(e,t,i){const{grid:s,messages:n,messagesCommon:l,messagesURIUtils:r,store:o,view:a}=this;if(!t.visible||"geometry"===t.type)return null;const d=i?.orderByFields,h=t.name,m=d?.findIndex(({field:e})=>e&&e===h)??-1,c=m>-1?d?.at(m)?.order:void 0,p=m>-1?m:void 0;return new W({direction:c,field:t,fieldName:h,grid:s,hidden:i?.hidden||this._isFieldHidden(h),initialSortPriority:p,layer:e,messages:n,messagesCommon:l,messagesURIUtils:r,store:o,view:a,onShowPromptCallback:this._onShowPromptCallback})}_generateAttachmentsColumnFromTemplate(e,t,i){const{grid:s,messages:n,messagesCommon:l,messagesURIUtils:r,store:o}=this,{attachmentsViewEnabled:a,autoWidth:d,description:h,flexGrow:m,fieldName:c,formatFunction:p,frozen:u,frozenToEnd:g,icon:b,iconText:f,invalid:y,label:T,labelTooltipText:w,menuConfig:C,resizable:I,textAlign:_,textWrap:v,thumbnailAppearance:E,thumbnailCount:S,thumbnailIconScale:A,thumbnailsEnabled:F,timeZone:j,width:x}=t;return new z({attachmentsViewEnabled:a,autoWidth:d,description:h,fieldName:`${ne.attachments}-${i}`,flexGrow:m,formatFunction:p,frozen:u,frozenToEnd:g,grid:s,hidden:!1===t.visible||this._isFieldHidden(T)||this._isFieldHidden(c),icon:b,iconText:f,invalid:y,label:T,labelTooltipText:w,layer:e,menuConfig:C,messages:n,messagesCommon:l,messagesURIUtils:r,resizable:I,store:o,textAlign:_,textWrap:v,thumbnailAppearance:E,thumbnailCount:S,thumbnailIconScale:A,thumbnailsEnabled:F,timeZone:j,width:x,onShowAttachments:e=>this._onShowAttachments(e)})}_generateDefaultAttachmentsColumn(e,t){const{grid:i,messages:s,messagesCommon:n,messagesURIUtils:l,store:r}=this,o=ne.attachments;return new z({fieldName:o,grid:i,hidden:t?.hidden||this._isFieldHidden(o),layer:e,messages:s,messagesCommon:n,messagesURIUtils:l,store:r,onShowAttachments:e=>this._onShowAttachments(e)})}_generateRelationshipColumnFromTemplate(e,t,i){const{grid:s,messages:n,messagesCommon:l,messagesURIUtils:r,store:o}=this,{autoWidth:a,collapsed:d,description:h,flexGrow:m,fieldName:c,formatFunction:p,frozen:u,frozenToEnd:g,icon:b,iconText:f,invalid:y,label:T,labelTooltipText:w,menuConfig:C,relationshipId:I,resizable:_,textAlign:v,textWrap:E,timeZone:S,width:A}=t;return new H({autoWidth:a,collapsed:d,description:h,fieldName:`${ne.relationship}-${I}-${i}`,flexGrow:m,formatFunction:p,frozen:u,frozenToEnd:g,grid:s,hidden:!1===t.visible||this._isFieldHidden(T)||this._isFieldHidden(c),icon:b,iconText:f,invalid:y,label:T,labelTooltipText:w,menuConfig:C,messages:n,messagesCommon:l,messagesURIUtils:r,relationshipId:I,resizable:_,store:o,textAlign:v,textWrap:E,timeZone:S,width:A,layer:e.relatedLayer,relatedLayer:e.layer,showRelatedTableCallback:e=>this._onShowRelatedTable(e)})}_generateDefaultRelationshipColumns(){const{relationshipInfos:e,relationshipColumnConfigs:t}=this,i=[];return e?.length?(t?t.forEach((t,s)=>{const{relationshipId:n}=t,l=e.find(e=>e.relationshipId===n);l&&i.push(this._generateDefaultRelationshipColumn({config:t,index:s,info:l}))}):e.forEach((e,t)=>i.push(this._generateDefaultRelationshipColumn({index:t,info:e}))),i):i}_generateDefaultRelationshipColumn(e){const{config:t,hidden:i,index:s,info:n}=e,{grid:l,messages:r,messagesCommon:o,messagesURIUtils:a,store:d}=this,{relationshipId:h}=n;return new H({...t,fieldName:`${ne.relationship}-${h}-${s}`,grid:l,hidden:i,messages:r,messagesCommon:o,messagesURIUtils:a,layer:n.relatedLayer,relatedLayer:n.layer,relationshipId:h,store:d,showRelatedTableCallback:e=>this._onShowRelatedTable(e)})}_generateActionColumn(){return new V({hidden:this._isFieldHidden(ne.action),store:this.store,...this.actionColumnConfig})}_isFieldHidden(e){const t=e?.toLowerCase();return(this.hiddenFields??this._defaultHiddenFields).some(e=>e.toLowerCase()===t)}async _syncTemporaryHighlight(e,t){if(!this.highlightEnabled)return this._currentTemporaryHighlight?.handle.remove(),void(this._currentTemporaryHighlight=null);if(await c(25),p(t),!this._currentTemporaryHighlight&&!e)return;const{id:i}=this._currentTemporaryHighlight??{};if(i===e)return;this._currentTemporaryHighlight?.handle?.remove(),this._currentTemporaryHighlight=null;const{_highlightableLayerView:s,layer:n,highlightEnabled:l}=this;e&&s&&n&&l&&(this._currentTemporaryHighlight={id:e,handle:s.highlight(e,{name:U})})}_syncSelection(){const{layer:e}=this;O(e)&&(this.highlightIds.items=this.effectiveSelectionManager.getSelection(e)??[])}_syncSelectionSources(){const{layer:e,view:t}=this;this._defaultSelectionManager.view=t,e&&O(e)?this._defaultSelectionManager.sources.items=[e]:this._defaultSelectionManager.sources.removeAll()}_addToSelection(e){const t=this.layer;O(t)&&this.effectiveSelectionManager.add(t,e)}_removeFromSelection(e){const t=this.layer;O(t)&&this.effectiveSelectionManager.remove(t,e)}async _onHighlightIdsChange(e){const{added:t,removed:i}=e,{attachmentsViewOptions:s}=this;if(this._removeFromSelection(i),this._addToSelection(t),this.filterBySelectionEnabled&&this._syncObjectIdsWithStore(this.highlightIds.toArray()),null!=s.objectId){const e=this.highlightIds.at(0);if(null!=e){const t=await this.store.getAttachmentsByObjectId(e,!0);s.set({attachmentInfos:t,objectId:e,mode:t.length?"list":"file"}),this.getFeatureTitle(e)}}}_syncTableParentSelection(e){const{tableParent:t}=this;t&&null!=e&&t.highlightIds.add(e)}_onShowRelatedTable(e){const{highlightIds:t}=this,{objectId:i}=e;t.removeAll(),t.add(i),this.showRelatedTableCallback?this.showRelatedTableCallback(e):this.emit("show-related-table",e)}_onObjectIdsChange(){const e=this.objectIds.toArray();e.length&&this.filterBySelectionEnabled&&(this.filterBySelectionEnabled=!1,this._logWarning("Object ID filter was applied while a selection filter was applied. Selection filter has been removed.")),this._syncObjectIdsWithStore(e)}_syncObjectIdsWithStore(e){this.store.objectIds=e,this.refreshPageCache()}_drainColumns(){this.columns.drain(e=>!e.destroyed&&e.destroy())}_showAllRelatedTables(e){const t=e.layer;if(!t)return;const i=this._getDefaultLayerDisplayField(t);e.set({relationshipColumnConfigs:[],tableTemplateOverride:this._getTableTemplateForShowAllTablesView(e,i)});const s=e.hiddenFields;s.includes(ne.action)||s.add(ne.action),s.includes(ne.attachments)||s.add(ne.attachments)}_hideAllRelatedTables(e){const{layer:t,relationship:i}=e;if(t&&null!=i?.id)if(null!=e.attachmentsViewOptions.objectId){const i=this._getDefaultLayerDisplayField(t);e.set({multipleSelectionEnabled:!1,relationshipColumnConfigs:[],showAllRelatedTables:!1,tableTemplateOverride:this._getTableTemplateForAttachmentsView(i)})}else e.set({multipleSelectionEnabled:!0,relationshipColumnConfigs:ae(t,i.id),showAllRelatedTables:!1,tableTemplateOverride:null}),e.hiddenFields.removeMany([ne.action,ne.attachments])}_getTableTemplateForRelatedTableView(e,t,i){return new Y({columnTemplates:[new J({fieldName:t,editable:!1,menuConfig:{selectionMode:"single",icon:"chevron-down",items:this._extractFieldColumnInfosFromTableTemplate(e.viewModel).map(([s,n])=>({selected:s===t,label:n||s,clickFunction:()=>{e.tableTemplateOverride=this._getTableTemplateForRelatedTableView(e,s,i)}}))},resizable:!1}),new X({autoWidth:!1,collapsed:!0,flexGrow:0,label:"",resizable:!1,relationshipId:i,width:ce})]})}_getTableTemplateForShowAllTablesView(e,t){const i=[new J({fieldName:t,editable:!1,menuConfig:{selectionMode:"single",icon:"chevron-down",items:this._extractFieldColumnInfosFromTableTemplate(e.viewModel).map(([i,s])=>({selected:i===t,label:s||i,clickFunction:()=>{e.tableTemplateOverride=this._getTableTemplateForShowAllTablesView(e,i)}}))},resizable:!1})];return null!=e.attachmentsViewOptions.objectId&&i.push(new k({attachmentsViewEnabled:!1,autoWidth:!1,flexGrow:0,label:"",resizable:!1,thumbnailsEnabled:!1,width:ce})),new Y({columnTemplates:i})}async _onShowPromptCallback(e){const{column:t,objectId:i,oldValue:s,value:n}=e,{_subtypes:l,layer:r}=this;if(!r||!l.length)return void t.cancel();const o=l.find(e=>e.code===n);if(!o)return void t.cancel();const a=u(),d=this._createSubtypeEditPrompt(s,o,a),h=!!r.parent&&this.autoSaveEnabled;try{this.showPrompt(d);const e=await a.promise,s=[{fieldName:t.fieldName,value:n}];switch(e){case"update-fields":for(const[e,t]of Object.entries(o.defaultValues))null!=t&&s.push({fieldName:e,value:t});await t.updateItems({objectId:i,updates:s}),h&&this.refresh();break;case"keep-existing":await t.updateItems({objectId:i,updates:s}),h&&this.refresh();break;case"undo":t.cancel()}}finally{this.clearPrompt()}}_createSubtypeEditPrompt(e,t,s){const{_subtypes:n,messages:l,messagesCommon:r}=this,o=n.find(t=>t.code===e)?.name??`${e}`;let a="update-fields";const d=[{label:l.subtypes.useDefaultValuesOption,value:"update-fields"},{label:l.subtypes.keepCurrentValuesOption,value:"keep-existing"}];return{context:"info",title:l.subtypes.changeWarningTitle,message:i(l.subtypes.changeWarning,{originalType:o,newType:t.name}),radios:d,defaultRadioSelection:"update-fields",onRadioSelection:e=>{a=e},actions:{primary:{label:r.apply,action:()=>s.resolve(a),type:"positive"},secondary:{label:r.cancel,type:"neutral",action:()=>s.resolve("undo")}},cancel:()=>s.reject()}}_onShowAttachments({objectId:e}){this.hasPendingEdits||(this.attachmentsViewOptions.objectId=e)}_getTableTemplateForAttachmentsView(e){return new Y({columnTemplates:[new J({fieldName:e,editable:!1,menuConfig:{selectionMode:"single",icon:"chevron-down",items:this._extractFieldColumnInfosFromTableTemplate(this).map(([t,i])=>({selected:t===e,label:i||t,clickFunction:()=>{this.tableTemplateOverride=this._getTableTemplateForAttachmentsView(t)}}))},resizable:!1}),new k({attachmentsViewEnabled:!1,autoWidth:!1,flexGrow:0,label:"",resizable:!1,thumbnailsEnabled:!1,width:ce})]})}_extractFieldColumnInfosFromTableTemplate(e){const t=e??this,{layer:i,tableTemplate:s}=t;return s?s.columnTemplates.filter(({type:e})=>"field"===e||"column"===e).map(({fieldName:e,label:t})=>{if(null!=t&&""!==t)return[e,t];const s=i?.fieldsIndex.get(e);return[e,s&&I(s,i)]}):i?.fields.map(e=>[e.name,I(e,i)])??[]}_getDefaultLayerDisplayField(e){const{displayField:t,objectIdField:i}=e;return t&&""!==t.trim()?t:i||(e.fields.length?e.fields[0].name:"")}_getIndexOfFirstFrozenToEndColumn(){const e=this.columns.findIndex(e=>e.frozenToEnd);return e>-1?e:void 0}_logWarning(e,t){t?a.getLogger(this).warnOnce(e):a.getLogger(this).warn(e)}_logTemplateWarning(e){this._logWarning(`${e} Skipped generating a column using the provided template.`,!0)}_onCellInteraction(e){null!=e&&null!=this.attachmentsViewOptions.objectId&&this.highlightIds.add(e)}};e([w()],pe.prototype,"_defaultHiddenFields",null),e([w()],pe.prototype,"_defaultSelectionManager",void 0),e([w()],pe.prototype,"_effectiveTableTemplate",null),e([w()],pe.prototype,"_effectiveAttributeTableTemplate",null),e([w()],pe.prototype,"_highlightableLayerView",null),e([w()],pe.prototype,"_subtypes",null),e([w()],pe.prototype,"activeFilters",null),e([w({readOnly:!0})],pe.prototype,"activeSortOrders",null),e([w()],pe.prototype,"allRelatedTablesVisible",null),e([w()],pe.prototype,"attachmentsColumns",null),e([w()],pe.prototype,"attachmentsEnabled",null),e([w()],pe.prototype,"attachmentsViewOptions",void 0),e([w({type:F})],pe.prototype,"attributeTableTemplate",void 0),e([w()],pe.prototype,"autoRefreshEnabled",void 0),e([w()],pe.prototype,"autoSaveEnabled",null),e([w()],pe.prototype,"canAddRelatedFeature",null),e([w()],pe.prototype,"clearPrompt",null),e([w({readOnly:!0})],pe.prototype,"columns",void 0),e([w()],pe.prototype,"dataProvider",void 0),e([w()],pe.prototype,"definitionExpression",null),e([w()],pe.prototype,"effectiveSelectionManager",null),e([w()],pe.prototype,"fieldColumns",null),e([w({types:_})],pe.prototype,"filterGeometry",null),e([w()],pe.prototype,"filterBySelectionEnabled",null),e([w({readOnly:!0})],pe.prototype,"grid",void 0),e([w()],pe.prototype,"hasContingentValues",null),e([w()],pe.prototype,"hasInvalidPendingEdits",null),e([w()],pe.prototype,"hasPendingEdits",null),e([w()],pe.prototype,"hiddenFields",null),e([w()],pe.prototype,"highlightEnabled",void 0),e([w()],pe.prototype,"initialSize",null),e([w()],pe.prototype,"isQueryingOrSyncing",null),e([w()],pe.prototype,"isSyncingAttachments",null),e([w()],pe.prototype,"layer",null),e([w()],pe.prototype,"layers",void 0),e([w()],pe.prototype,"layerFieldConfigurations",null),e([w()],pe.prototype,"layerView",null),e([w()],pe.prototype,"menuConfig",void 0),e([w()],pe.prototype,"messages",void 0),e([w(),me("esri/t9n/common")],pe.prototype,"messagesCommon",void 0),e([w(),me("esri/core/t9n/Units")],pe.prototype,"messagesUnits",void 0),e([w(),me("esri/widgets/support/t9n/uriUtils")],pe.prototype,"messagesURIUtils",void 0),e([w()],pe.prototype,"outFields",null),e([w()],pe.prototype,"pendingEditsCount",null),e([w()],pe.prototype,"prompt",void 0),e([w()],pe.prototype,"relatedRecordsEnabled",null),e([w()],pe.prototype,"relatedTable",null),e([w()],pe.prototype,"relatedTableHasContingentValues",null),e([w()],pe.prototype,"relatedTables",void 0),e([w()],pe.prototype,"relationship",null),e([w()],pe.prototype,"relationshipColumnConfigs",void 0),e([w()],pe.prototype,"relationshipColumns",null),e([w()],pe.prototype,"relationshipConfig",null),e([w()],pe.prototype,"relationshipInfos",null),e([w()],pe.prototype,"relationships",null),e([w()],pe.prototype,"returnGeometryEnabled",null),e([w()],pe.prototype,"returnMEnabled",null),e([w()],pe.prototype,"returnZEnabled",null),e([w()],pe.prototype,"selectionManager",void 0),e([w()],pe.prototype,"selectionSource",null),e([w()],pe.prototype,"showAllRelatedTables",null),e([w()],pe.prototype,"showPrompt",null),e([w()],pe.prototype,"showRelatedTableCallback",void 0),e([w({readOnly:!0,type:K})],pe.prototype,"store",void 0),e([w()],pe.prototype,"supportsAttachments",null),e([w()],pe.prototype,"supportsAddAttachments",null),e([w()],pe.prototype,"supportsDeleteAttachments",null),e([w()],pe.prototype,"supportsResizeAttachments",null),e([w()],pe.prototype,"supportsUpdateAttachments",null),e([w()],pe.prototype,"syncTemplateOnChangesEnabled",void 0),e([w()],pe.prototype,"syncViewSelection",void 0),e([w()],pe.prototype,"tableController",void 0),e([w()],pe.prototype,"tableParent",void 0),e([w({type:Y})],pe.prototype,"tableTemplate",void 0),e([w()],pe.prototype,"tableTemplateOverride",void 0),e([w({type:x})],pe.prototype,"timeExtent",null),e([w()],pe.prototype,"timeZone",null),e([w()],pe.prototype,"view",null),pe=e([C("esri.widgets.FeatureTable.FeatureTableViewModel")],pe);const ue=pe;export{ue as default};
|
|
@@ -165,7 +165,6 @@ export interface GeometryFilter extends TableFilter {
|
|
|
165
165
|
* Use this for selecting rows within the table based off of their object ID.
|
|
166
166
|
*
|
|
167
167
|
* @since 5.0
|
|
168
|
-
* @see [FeatureTableViewModel.filterBySelection()](https://developers.arcgis.com/javascript/latest/references/core/widgets/FeatureTable/FeatureTableViewModel/#filterBySelection)
|
|
169
168
|
* @see [FeatureTableViewModel.activeFilters](https://developers.arcgis.com/javascript/latest/references/core/widgets/FeatureTable/FeatureTableViewModel/#activeFilters)
|
|
170
169
|
*/
|
|
171
170
|
export interface SelectionFilter extends TableFilter {
|
|
@@ -1654,14 +1654,6 @@ export default class FeatureTable extends Widget<FeatureTableProperties> {
|
|
|
1654
1654
|
* );
|
|
1655
1655
|
*/
|
|
1656
1656
|
addPendingEdits(edits: FeatureStoreEdits[]): void;
|
|
1657
|
-
/**
|
|
1658
|
-
* Clears the current selection filter within the table.
|
|
1659
|
-
*
|
|
1660
|
-
* @deprecated since version 4.30. Use [filterBySelectionEnabled](https://developers.arcgis.com/javascript/latest/references/core/widgets/FeatureTable/#filterBySelectionEnabled) or [objectIds](https://developers.arcgis.com/javascript/latest/references/core/widgets/FeatureTable/#objectIds) instead.
|
|
1661
|
-
* @since 4.23
|
|
1662
|
-
* @see [FeatureTable.visibleElements.menuItems.selectedRecordsShowAllToggle](https://developers.arcgis.com/javascript/latest/references/core/widgets/FeatureTable/#visibleElements)
|
|
1663
|
-
*/
|
|
1664
|
-
clearSelectionFilter(): void;
|
|
1665
1657
|
/**
|
|
1666
1658
|
* Deletes all the selected rows from the table.
|
|
1667
1659
|
*
|
|
@@ -1713,16 +1705,6 @@ export default class FeatureTable extends Widget<FeatureTableProperties> {
|
|
|
1713
1705
|
* @since 4.31
|
|
1714
1706
|
*/
|
|
1715
1707
|
exportSelectionToCSV(includeGeometry?: boolean): Promise<void>;
|
|
1716
|
-
/**
|
|
1717
|
-
* Filters the table using the current row selection and displays only the selected table rows.
|
|
1718
|
-
*
|
|
1719
|
-
* @deprecated since version 4.30. Use [filterBySelectionEnabled](https://developers.arcgis.com/javascript/latest/references/core/widgets/FeatureTable/#filterBySelectionEnabled) or [objectIds](https://developers.arcgis.com/javascript/latest/references/core/widgets/FeatureTable/#objectIds) instead.
|
|
1720
|
-
* @since 4.16
|
|
1721
|
-
* @see [FeatureTable.visibleElements.menuItems.selectedRecordsShowSelectedToggle](https://developers.arcgis.com/javascript/latest/references/core/widgets/FeatureTable/#visibleElements)
|
|
1722
|
-
* @see [FeatureTable.visibleElements.menuItems.selectionColumn](https://developers.arcgis.com/javascript/latest/references/core/widgets/FeatureTable/#visibleElements)
|
|
1723
|
-
* @see [Sample - FeatureTable using a map](https://developers.arcgis.com/javascript/latest/sample-code/widgets-featuretable-map/)
|
|
1724
|
-
*/
|
|
1725
|
-
filterBySelection(): void;
|
|
1726
1708
|
/**
|
|
1727
1709
|
* Finds the specified column within the feature table.
|
|
1728
1710
|
*
|
|
@@ -1854,5 +1836,5 @@ export default class FeatureTable extends Widget<FeatureTableProperties> {
|
|
|
1854
1836
|
* @since 4.23
|
|
1855
1837
|
* @see [FeatureTable.visibleElements.menuItems.zoomToSelection](https://developers.arcgis.com/javascript/latest/references/core/widgets/FeatureTable/#visibleElements)
|
|
1856
1838
|
*/
|
|
1857
|
-
zoomToSelection(): void
|
|
1839
|
+
zoomToSelection(): Promise<void>;
|
|
1858
1840
|
}
|