@arcgis/core 4.33.0-next.20250508 → 4.33.0-next.20250510
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/applications/SceneViewer/sceneViewerUtils.d.ts +2 -0
- package/applications/SceneViewer/sceneViewerUtils.js +1 -1
- package/arcade/featureset/support/RecentlyUsedCache.js +1 -1
- package/arcade/functions/aiServices.js +1 -1
- package/arcade.js +1 -1
- package/assets/components/assets/input-time-picker/t9n/messages.ar.json +1 -1
- package/assets/components/assets/input-time-picker/t9n/messages.bg.json +1 -1
- package/assets/components/assets/input-time-picker/t9n/messages.bs.json +1 -1
- package/assets/components/assets/input-time-picker/t9n/messages.ca.json +1 -1
- package/assets/components/assets/input-time-picker/t9n/messages.cs.json +1 -1
- package/assets/components/assets/input-time-picker/t9n/messages.da.json +1 -1
- package/assets/components/assets/input-time-picker/t9n/messages.de.json +1 -1
- package/assets/components/assets/input-time-picker/t9n/messages.el.json +1 -1
- package/assets/components/assets/input-time-picker/t9n/messages.en.json +1 -1
- package/assets/components/assets/input-time-picker/t9n/messages.es.json +1 -1
- package/assets/components/assets/input-time-picker/t9n/messages.et.json +1 -1
- package/assets/components/assets/input-time-picker/t9n/messages.fi.json +1 -1
- package/assets/components/assets/input-time-picker/t9n/messages.fr.json +1 -1
- package/assets/components/assets/input-time-picker/t9n/messages.he.json +1 -1
- package/assets/components/assets/input-time-picker/t9n/messages.hr.json +1 -1
- package/assets/components/assets/input-time-picker/t9n/messages.hu.json +1 -1
- package/assets/components/assets/input-time-picker/t9n/messages.id.json +1 -1
- package/assets/components/assets/input-time-picker/t9n/messages.it.json +1 -1
- package/assets/components/assets/input-time-picker/t9n/messages.ja.json +1 -1
- package/assets/components/assets/input-time-picker/t9n/messages.json +1 -1
- package/assets/components/assets/input-time-picker/t9n/messages.ko.json +1 -1
- package/assets/components/assets/input-time-picker/t9n/messages.lt.json +1 -1
- package/assets/components/assets/input-time-picker/t9n/messages.lv.json +1 -1
- package/assets/components/assets/input-time-picker/t9n/messages.nl.json +1 -1
- package/assets/components/assets/input-time-picker/t9n/messages.no.json +1 -1
- package/assets/components/assets/input-time-picker/t9n/messages.pl.json +1 -1
- package/assets/components/assets/input-time-picker/t9n/messages.pt-BR.json +1 -1
- package/assets/components/assets/input-time-picker/t9n/messages.pt-PT.json +1 -1
- package/assets/components/assets/input-time-picker/t9n/messages.ro.json +1 -1
- package/assets/components/assets/input-time-picker/t9n/messages.ru.json +1 -1
- package/assets/components/assets/input-time-picker/t9n/messages.sk.json +1 -1
- package/assets/components/assets/input-time-picker/t9n/messages.sl.json +1 -1
- package/assets/components/assets/input-time-picker/t9n/messages.sr.json +1 -1
- package/assets/components/assets/input-time-picker/t9n/messages.sv.json +1 -1
- package/assets/components/assets/input-time-picker/t9n/messages.th.json +1 -1
- package/assets/components/assets/input-time-picker/t9n/messages.tr.json +1 -1
- package/assets/components/assets/input-time-picker/t9n/messages.uk.json +1 -1
- package/assets/components/assets/input-time-picker/t9n/messages.vi.json +1 -1
- package/assets/components/assets/input-time-picker/t9n/messages.zh-CN.json +1 -1
- package/assets/components/assets/input-time-picker/t9n/messages.zh-HK.json +1 -1
- package/assets/components/assets/input-time-picker/t9n/messages.zh-TW.json +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/06eb4832b6c86744e52e.js +1 -0
- package/assets/esri/core/workers/chunks/0766ecb677d667e5fb83.js +2 -0
- package/assets/esri/core/workers/chunks/{543eb46b55cacd6e1dbc.js.LICENSE.txt → 0766ecb677d667e5fb83.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/{c607d618b64d3accecc4.js → 0aca29f7156b2b412f2e.js} +1 -1
- package/assets/esri/core/workers/chunks/170c346cf5a18adb25b0.js +1 -0
- package/assets/esri/core/workers/chunks/1c6542315390037053a6.js +1 -0
- package/assets/esri/core/workers/chunks/218a66d53f7cf4f285aa.js +2 -0
- package/assets/esri/core/workers/chunks/{d8dc922f7466300b668f.js.LICENSE.txt → 218a66d53f7cf4f285aa.js.LICENSE.txt} +2 -2
- package/assets/esri/core/workers/chunks/{037af6379f3e9278633b.js → 243dc74ec62891ba1ef7.js} +1 -1
- package/assets/esri/core/workers/chunks/253bcc3cc7bc4c2dc6ea.js +1 -0
- package/assets/esri/core/workers/chunks/{d874d24568b1acedebc4.js → 297d2c0a9d3f1e978318.js} +1 -1
- package/assets/esri/core/workers/chunks/{f74b5659b6496a5c4c0c.js → 2e0af748eba93f3ea6cb.js} +1 -1
- package/assets/esri/core/workers/chunks/3596540ef49e5330ceb2.js +2 -0
- package/assets/esri/core/workers/chunks/{7b4523ab392966624d97.js.LICENSE.txt → 3596540ef49e5330ceb2.js.LICENSE.txt} +1 -7
- package/assets/esri/core/workers/chunks/{a22c88b0a525e602dce0.js → 3d0e09ef78dc2fd6957a.js} +1 -1
- package/assets/esri/core/workers/chunks/4bd5cbf6e0be2fc7e84d.js +1 -0
- package/assets/esri/core/workers/chunks/4feb774f123da26e9f2a.js +1 -0
- package/assets/esri/core/workers/chunks/{ee1d104e2bcc5d808fa4.js → 5228fc7fcdf57f44781e.js} +1 -1
- package/assets/esri/core/workers/chunks/54f4a1131f99468db076.js +1 -0
- package/assets/esri/core/workers/chunks/{49c968e91c3c48aaa110.js → 5583d18032ed8bc17c74.js} +1 -1
- package/assets/esri/core/workers/chunks/5e7f35bf1aab93cb1c52.js +1 -0
- package/assets/esri/core/workers/chunks/{69f7fe6c58e4931597f6.js → 631205dc4d73d49ec9ed.js} +1 -1
- package/assets/esri/core/workers/chunks/6e12900a9f4c3c9941ec.js +1 -0
- package/assets/esri/core/workers/chunks/7e8f78b96d43c224c7b6.js +1 -0
- package/assets/esri/core/workers/chunks/{e46c05ef7272c7f1f70c.js → 83d6a1b3db7d364d156b.js} +1 -1
- package/assets/esri/core/workers/chunks/8a87c181b85d0b86b9bb.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/90ae15ce22a49bd84876.js +2 -0
- package/assets/esri/core/workers/chunks/{ac9c6779771ec855da79.js.LICENSE.txt → 90ae15ce22a49bd84876.js.LICENSE.txt} +3 -3
- package/assets/esri/core/workers/chunks/92cbe9af8a6c061bfb57.js +346 -0
- package/assets/esri/core/workers/chunks/{9aedd7874da7c63865d6.js → 93cc26e5636040fdc0b8.js} +1 -1
- package/assets/esri/core/workers/chunks/{77c7b7c4426c2b1a5b42.js → 9fc35ec8185beba96715.js} +1 -1
- package/assets/esri/core/workers/chunks/a1d697e2be1e892a666a.js +1 -0
- package/assets/esri/core/workers/chunks/{4f627eb62caee760215a.js → a1f27c4f4b5ef3e359f7.js} +1 -1
- package/assets/esri/core/workers/chunks/a31658f544ac6e1801d6.js +1 -0
- package/assets/esri/core/workers/chunks/{3a205f87f100832ef9f5.js → a5e746e10239a3bfe237.js} +1 -1
- package/assets/esri/core/workers/chunks/a6bcae413e62cd879b46.js +1 -0
- package/assets/esri/core/workers/chunks/{59d4c41172e921922cac.js → a8b42d8c0b76c234c09f.js} +100 -62
- package/assets/esri/core/workers/chunks/b4f38fe9cc948a39ad87.js +2 -0
- package/assets/esri/core/workers/chunks/{ce9de24cb96b56d20562.js.LICENSE.txt → b4f38fe9cc948a39ad87.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/{752ef63d910852b7be44.js → c16e0da7a19310c71e8b.js} +1 -1
- package/assets/esri/core/workers/chunks/d22f91bc16a7641bcbef.js +1 -0
- package/assets/esri/core/workers/chunks/d551f70560a2b1ef5696.js +1 -0
- package/assets/esri/core/workers/chunks/d7b640f7a181bd26c7c7.js +1 -0
- package/assets/esri/core/workers/chunks/{2bdbf678d4f013543dbb.js → d971571a957de70d5a8d.js} +1 -1
- package/assets/esri/core/workers/chunks/dc3a6beb3028009b3c23.js +1 -0
- package/assets/esri/core/workers/chunks/e0dc8794343c2a949ffb.js +2 -0
- package/assets/esri/core/workers/chunks/{670a66617249f2d15a62.js.LICENSE.txt → e0dc8794343c2a949ffb.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/e3c1aea34ece8336dae1.js +1 -0
- package/assets/esri/core/workers/chunks/e483d2f169e51a361742.js +1 -0
- package/assets/esri/core/workers/chunks/{a50cb1fc8c4c585c0e11.js → ec8e8048b3df2c92008d.js} +1 -1
- package/assets/esri/core/workers/chunks/f6a1fec33b0d81acce61.js +1 -0
- package/assets/esri/core/workers/chunks/f7ab3511f6627f467796.js +1 -0
- package/assets/esri/core/workers/chunks/{1eef9cf19634c038b59b.js → f98689562017583f73ee.js} +1 -1
- package/assets/esri/core/workers/chunks/fb2e28e6a87956267d1c.js +66 -0
- package/assets/esri/core/workers/chunks/fbcd94f60f92257a7303.js +2 -0
- package/assets/esri/core/workers/chunks/{c2594024d72133d3ed7b.js.LICENSE.txt → fbcd94f60f92257a7303.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/fda48126f67e80034404.js +1 -0
- package/assets/esri/themes/base/widgets/_FeatureTable.scss +1 -0
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_ar.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_bg.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_bs.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_ca.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_cs.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_da.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_de.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_el.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_es.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_et.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_fi.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_fr.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_he.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_hr.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_hu.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_id.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_it.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_ja.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_ko.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_lt.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_lv.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_nl.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_no.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_pl.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_pt-BR.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_pt-PT.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_ro.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_ru.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_sk.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_sl.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_sr.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_sv.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_th.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_tr.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_uk.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_vi.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_zh-CN.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_zh-HK.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_zh-TW.json +1 -1
- package/chunks/HUDMaterial.glsl.js +1 -1
- package/chunks/Laserlines.glsl.js +2 -2
- package/chunks/aiServices.js +1 -1
- package/chunks/boundedPlane.js +1 -1
- package/chunks/cameraUtilsSpherical.js +1 -1
- package/chunks/vec32.js +1 -1
- package/core/has.js +1 -1
- package/core/libs/gl-matrix-2/math/mat4.js +1 -1
- package/core/libs/gl-matrix-2/math/vec3.js +1 -1
- package/core/mapCollectionUtils.js +1 -1
- package/core/perspectiveUtils.js +1 -1
- package/core/sql/StandardizedFunctions.js +1 -1
- package/core/sql/WhereGrammar.js +1 -1
- package/geometry/support/axisAngleDegrees.js +1 -1
- package/geometry/support/curves/bezierCurveUtils.js +1 -1
- package/geometry/support/curves/circleUtils.js +1 -1
- package/geometry/support/curves/curveExtent.js +5 -0
- package/geometry/support/curves/curveLength.js +5 -0
- package/geometry/support/curves/densifyCurvedGeometry.js +1 -1
- package/geometry/support/curves/ellipticArc4Utils.js +1 -1
- package/geometry/support/curves/ellipticArc7Utils.js +1 -1
- package/geometry/support/curves/mathUtils.js +1 -1
- package/geometry/support/curves/splitCurveAtPoint.js +1 -1
- package/geometry/support/frustum.js +1 -1
- package/geometry/support/meshUtils/External.js +1 -1
- package/geometry/support/meshUtils/exporters/gltf/gltf.js +1 -1
- package/geometry/support/meshUtils/loadExternal.js +1 -1
- package/geometry/support/meshUtils/primitives.js +1 -1
- package/geometry/support/meshUtils/projection.js +1 -1
- package/geometry/support/meshUtils/rotate.js +1 -1
- package/geometry/support/meshUtils/scale.js +1 -1
- package/geometry/support/meshUtils/vertexSpaceConversion.js +1 -1
- package/geometry/support/meshVertexSpaceUtils.js +1 -1
- package/geometry/support/plane.js +1 -1
- package/interfaces.d.ts +401 -17
- package/layers/IntegratedMesh3DTilesLayer.js +1 -1
- package/layers/LinkChartLayer.js +1 -1
- package/layers/SceneLayer.js +1 -1
- package/layers/VideoLayer.js +1 -1
- package/layers/VoxelWasmPerSceneView.js +1 -1
- package/layers/graphics/sources/FeatureLayerSource.js +1 -1
- package/layers/graphics/sources/MemorySource.js +1 -1
- package/layers/graphics/sources/support/uploadAssets.js +1 -1
- package/layers/video/VideoCameraSensorModel.js +1 -1
- package/layers/video/VideoController.js +1 -1
- package/layers/voxel/VoxelVolume.js +1 -1
- package/layers/voxel/voxelPlaneUtils.js +1 -1
- package/package.json +1 -1
- package/rest/knowledgeGraph/wasmInterface/wasmToUpdateResponseFactories.js +1 -1
- package/rest/support/meshFeatureSet.js +1 -1
- package/smartMapping/renderers/size.js +1 -1
- package/smartMapping/renderers/support/spikeUtils.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/cim/cimAnalyzer.js +1 -1
- package/views/2d/engine/webgl/AFeatureTile.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/ComplexOutlineFillMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/OutlineFillMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/PatternOutlineFillMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/mesh/MeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/OutlineFillShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/constants.js +1 -1
- package/views/2d/layers/features/layerAdapters/FeatureLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/OrientedImageryLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/SubtypeGroupLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/featureServiceUtils.js +1 -1
- package/views/2d/layers/features/schema/processor/symbols/ComplexSymbolSchema.js +1 -1
- package/views/2d/layers/features/schema/processor/symbols/SymbolSchema.js +1 -1
- package/views/2d/layers/features/sources/FeatureSource.js +1 -1
- package/views/3d/analysis/AreaMeasurement/support/MeasurementData.js +1 -1
- package/views/3d/analysis/Dimension/DimensionTool.js +1 -1
- package/views/3d/analysis/Dimension/lengthDimensionConstraintUtils.js +1 -1
- package/views/3d/analysis/Dimension/lengthDimensionManipulatorUtils.js +1 -1
- package/views/3d/analysis/Dimension/lengthDimensionUtils.js +1 -1
- package/views/3d/analysis/DimensionAnalysisView3D.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightRayIntersector.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightTool.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedComputedData.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedTool.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedVisualization.js +1 -1
- package/views/3d/analysis/Viewshed/viewshedToolUtils.js +1 -1
- package/views/3d/analysis/ViewshedAnalysisView3D.js +1 -1
- package/views/3d/animation/pointToPoint/Camera.js +1 -1
- package/views/3d/camera/constraintUtils/distance.js +1 -1
- package/views/3d/camera/intersectionUtils.js +1 -1
- package/views/3d/interactive/Manipulator3D.js +1 -1
- package/views/3d/interactive/editingTools/dragEventPipeline3D.js +1 -1
- package/views/3d/interactive/editingTools/reshape/edgeOffsetUtils.js +1 -1
- package/views/3d/interactive/visualElements/DrapedVisualElementResources.js +1 -1
- package/views/3d/interactive/visualElements/ExtendedLineVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/ParallelLineVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/RightAngleQuadVisualElement.js +1 -1
- package/views/3d/layers/DynamicLayerView3D.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/layers/PointCloudWorker.js +1 -1
- package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
- package/views/3d/layers/SceneLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Deconflictor.js +1 -1
- package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DTextSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/GraphicsDeconflictor.js +1 -1
- package/views/3d/layers/graphics/LabelDeconflictor.js +1 -1
- package/views/3d/layers/graphics/Labeler.js +1 -1
- package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
- package/views/3d/layers/graphics/pipeline/Feature3DPipelineWorker.js +1 -1
- package/views/3d/layers/graphics/pipeline/rendering/DirectRenderer.js +1 -1
- package/views/3d/layers/i3s/I3SClientNodeLoader.js +1 -1
- package/views/3d/layers/i3s/I3SGeometryUtil.js +1 -1
- package/views/3d/layers/i3s/I3SIntersectionHandler.js +1 -1
- package/views/3d/layers/i3s/I3SMeshViewFilter.js +1 -1
- package/views/3d/layers/i3s/I3SQueryEngine.js +1 -1
- package/views/3d/layers/i3s/I3SQueryFeatureAdapter.js +1 -1
- package/views/3d/layers/i3s/I3SQueryResultGeometry.js +5 -0
- package/views/3d/layers/i3s/I3SViewportQueries.js +1 -1
- package/views/3d/layers/i3s/Intersector.js +1 -1
- package/views/3d/layers/i3s/LayerElevationProvider.js +1 -1
- package/views/3d/layers/i3s/PointCloudRenderer.js +1 -1
- package/views/3d/layers/support/FastSymbolUpdates.js +1 -1
- package/views/3d/layers/support/StageLayerElevationProvider.js +1 -1
- package/views/3d/layers/support/Tiles3DIntersectionHandler.js +1 -1
- package/views/3d/state/Frustum.js +1 -1
- package/views/3d/state/controllers/GamepadKeyboardController.js +1 -1
- package/views/3d/state/controllers/PinchAndPanControllerGlobal.js +1 -1
- package/views/3d/state/controllers/PinchAndPanControllerLocal.js +1 -1
- package/views/3d/state/controllers/PointToPointAnimationController.js +1 -1
- package/views/3d/state/controllers/ZoomControllerLocal.js +1 -1
- package/views/3d/state/controllers/ZoomStepControllerGlobal.js +1 -1
- package/views/3d/state/controllers/ZoomStepControllerLocal.js +1 -1
- package/views/3d/state/controllers/momentum/ZoomPlanarMomentumController.js +1 -1
- package/views/3d/state/helpers/SceneIntersectionHelper.js +1 -1
- package/views/3d/support/FrustumExtentIntersection.js +1 -1
- package/views/3d/support/hitTest.js +1 -1
- package/views/3d/support/orientedBoundingBox.js +1 -1
- package/views/3d/support/pointsOfInterest/CameraOnSurface.js +1 -1
- package/views/3d/support/pointsOfInterest/CenterOnSurface.js +1 -1
- package/views/3d/support/pointsOfInterest/PointsOfInterest.js +1 -1
- package/views/3d/support/viewpointUtils.js +1 -1
- package/views/3d/terrain/Intersector.js +1 -1
- package/views/3d/terrain/OverlayManager.js +1 -1
- package/views/3d/terrain/TerrainRenderer.js +1 -1
- package/views/3d/terrain/TerrainSurface.js +1 -1
- package/views/3d/webgl/ManagedDepthTexture.js +1 -1
- package/views/3d/webgl/ManagedFBOResource.js +1 -1
- package/views/3d/webgl/RenderCamera.js +1 -1
- package/views/3d/webgl-engine/collections/Component/DepthRange.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ElevationAgnosticBVH.js +1 -1
- package/views/3d/webgl-engine/collections/Component/IntersectionGeometry.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.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/bloom/BloomRenderNode.js +1 -1
- package/views/3d/webgl-engine/effects/focusArea/FocusAreaColorNode.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/effects/laserlines/LaserLineRenderer.js +1 -1
- package/views/3d/webgl-engine/effects/laserlines/LaserlinePathTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/lib/DefaultVertexAttributeLocations.js +1 -1
- package/views/3d/webgl-engine/lib/GPUPointOcclusionQuery.js +1 -1
- package/views/3d/webgl-engine/lib/HUDIntersectorResult.js +5 -0
- package/views/3d/webgl-engine/lib/Intersector.js +1 -1
- package/views/3d/webgl-engine/lib/IntersectorInterfaces.js +1 -1
- package/views/3d/webgl-engine/lib/IntersectorResult.js +5 -0
- package/views/3d/webgl-engine/lib/IntersectorTarget.js +1 -1
- package/views/3d/webgl-engine/lib/IntersectorType.js +5 -0
- 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/Normals.js +1 -1
- package/views/3d/webgl-engine/lib/Object3D.js +1 -1
- package/views/3d/webgl-engine/lib/ObjectIntersectorResult.js +5 -0
- package/views/3d/webgl-engine/lib/ObjectTarget.js +5 -0
- package/views/3d/webgl-engine/lib/PathGeometryData.js +1 -1
- package/views/3d/webgl-engine/lib/PathVertex.js +1 -1
- package/views/3d/webgl-engine/lib/RayIntersections.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
- package/views/3d/webgl-engine/lib/SortedRenderGeometryRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/ViewshedShadowMap.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/edgePreprocessing.js +1 -1
- package/views/3d/webgl-engine/lib/intersectorUtils.js +1 -1
- package/views/3d/webgl-engine/lib/intersectorUtilsConversions.js +1 -1
- package/views/3d/webgl-engine/lib/lodRendering/Intersector.js +1 -1
- package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/lodRendering/LodResources.js +1 -1
- package/views/3d/webgl-engine/lighting/SphericalHarmonics.js +1 -1
- package/views/3d/webgl-engine/materials/DefaultBufferWriter.js +1 -1
- package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/HeatmapDensityMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/LineCalloutMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/MeasurementArrowMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/NativeLineMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/ShadedColorMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/TriangleMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/pbrUtils.js +1 -1
- package/views/3d/webgl-engine/shaders/CompositingTechniqueConfiguration.js +1 -1
- package/views/FocusArea.js +1 -1
- package/views/FocusAreaOutline.js +5 -0
- package/views/FocusAreaOutlineItem.js +5 -0
- package/views/FocusAreas.js +1 -1
- package/views/FocusAreasUtils.js +5 -0
- package/views/FocusAreasView.js +5 -0
- package/views/SceneView.js +1 -1
- package/views/analysis/DimensionAnalysisView.js +1 -1
- package/views/draw/support/surfaceCoordinateSystems.js +1 -1
- package/views/interactive/ToolIntersector.js +1 -1
- package/views/interactive/editGeometry/operations/OffsetEdgeVertex.js +1 -1
- package/views/interactive/keybindings.js +1 -1
- package/views/interactive/sketch/constraints.js +1 -1
- package/views/interactive/snapping/candidates/ParallelLineSnappingCandidate.js +1 -1
- package/views/interactive/snapping/hints/IntersectionSnappingHint.js +1 -1
- package/views/interactive/snapping/hints/LineSnappingHint.js +1 -1
- package/views/interactive/snapping/hints/ParallelSnappingHint.js +1 -1
- package/views/interactive/snapping/hints/PointSnappingHint.js +1 -1
- package/views/interactive/snapping/hints/RightAngleSnappingHint.js +1 -1
- package/views/interactive/tooltip/tooltipCommonUtils.js +1 -1
- package/views/layers/DimensionLayerView.js +1 -1
- package/views/support/angularMeasurementUtils.js +1 -1
- package/views/support/geometry3dUtils.js +1 -1
- package/webdoc/IPSInfo.js +1 -1
- package/webdoc/ips/AppleIPSProperties.d.ts +4 -0
- package/webdoc/ips/AppleIPSProperties.js +5 -0
- package/webdoc/ips/Configuration.d.ts +4 -0
- package/webdoc/ips/Configuration.js +5 -0
- package/webdoc/ips/GNSSProperties.d.ts +4 -0
- package/webdoc/ips/GNSSProperties.js +5 -0
- package/webdoc/ips/PathSnappingProperties.d.ts +4 -0
- package/webdoc/ips/PathSnappingProperties.js +5 -0
- package/webdoc/ips/SmoothingProperties.d.ts +4 -0
- package/webdoc/ips/SmoothingProperties.js +5 -0
- package/widgets/BasemapLayerList.js +1 -1
- package/widgets/BatchAttributeForm.js +1 -1
- package/widgets/ElevationProfile/ElevationProfileLineView.js +1 -1
- package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/UtilityNetworkAssociationSettings.js +1 -1
- package/widgets/FeatureForm.js +1 -1
- package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
- package/widgets/FeatureTable.js +1 -1
- package/widgets/Legend/support/sizeRampUtils.js +1 -1
- package/widgets/UtilityNetworkTrace/UtilityNetworkTraceFeature.js +1 -1
- package/widgets/UtilityNetworkTrace.js +1 -1
- package/widgets/UtilityNetworkValidateTopology.js +1 -1
- package/widgets/VideoPlayer/components/MetadataSection.js +1 -1
- package/widgets/VideoPlayer/components/SettingsButton.js +1 -1
- package/widgets/support/FilterBuilder.js +1 -1
- package/widgets/support/Selector2D/SelectionOperation.js +1 -1
- package/widgets/support/SketchTooltipControls.js +1 -1
- package/widgets/support/SnappingControls.js +1 -1
- package/assets/esri/core/workers/chunks/094300acbd24085cb063.js +0 -1
- package/assets/esri/core/workers/chunks/0c338364cb55afdbd580.js +0 -1
- package/assets/esri/core/workers/chunks/2da01fe20200b6d74851.js +0 -1
- package/assets/esri/core/workers/chunks/35c996f6fbff165b03f4.js +0 -1
- package/assets/esri/core/workers/chunks/3a517393619af3639b83.js +0 -1
- package/assets/esri/core/workers/chunks/45d64b72b7e93e9c64d7.js +0 -1
- package/assets/esri/core/workers/chunks/46104db7f77952bb6c12.js +0 -1
- package/assets/esri/core/workers/chunks/47bbfc10c2a3b9e4bdd6.js +0 -1
- package/assets/esri/core/workers/chunks/49f0e53b3c9ba8451442.js +0 -1
- package/assets/esri/core/workers/chunks/543eb46b55cacd6e1dbc.js +0 -2
- package/assets/esri/core/workers/chunks/5e0118a030cf741f78c6.js +0 -319
- package/assets/esri/core/workers/chunks/670a66617249f2d15a62.js +0 -2
- package/assets/esri/core/workers/chunks/6b5274d46a155d65dff1.js +0 -39
- package/assets/esri/core/workers/chunks/74187c771ee7083d1db7.js +0 -1
- package/assets/esri/core/workers/chunks/7b4523ab392966624d97.js +0 -2
- package/assets/esri/core/workers/chunks/7c2ec96749972e0b8a13.js +0 -1
- package/assets/esri/core/workers/chunks/7ffc1db10b00754398e8.js +0 -1
- package/assets/esri/core/workers/chunks/81546c6141d564ed59c9.js +0 -1
- package/assets/esri/core/workers/chunks/852dd5af8e704613310a.js +0 -1
- package/assets/esri/core/workers/chunks/ac9c6779771ec855da79.js +0 -2
- package/assets/esri/core/workers/chunks/bbff052a991a2dc36960.js +0 -1
- package/assets/esri/core/workers/chunks/bcab8b9ce2f9d2ebaae7.js +0 -1
- package/assets/esri/core/workers/chunks/bf190d672dcbaedc1a41.js +0 -1
- package/assets/esri/core/workers/chunks/c255c9279815359fdce5.js +0 -1
- package/assets/esri/core/workers/chunks/c2594024d72133d3ed7b.js +0 -2
- package/assets/esri/core/workers/chunks/ce9de24cb96b56d20562.js +0 -2
- package/assets/esri/core/workers/chunks/d8dc922f7466300b668f.js +0 -2
- package/assets/esri/core/workers/chunks/d9948763423784b68c09.js +0 -1
- package/assets/esri/core/workers/chunks/dbf6011dd7933f02d41d.js +0 -66
- package/assets/esri/core/workers/chunks/e4e9dd635bdef18d0bd5.js +0 -1
- package/assets/esri/core/workers/chunks/e69f2e3c2d5e71fbb42f.js +0 -1
- package/assets/esri/core/workers/chunks/f61632c06c05b72e7017.js +0 -1
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../chunks/tslib.es6.js";import"../../intl.js";import{isSome as t}from"../../core/arrayUtils.js";import i from"../../core/Collection.js";import{referenceSetter as s}from"../../core/collectionUtils.js";import{deprecatedFunction as l}from"../../core/deprecate.js";import o from"../../core/Error.js";import n from"../../core/Handles.js";import r from"../../core/Logger.js";import{abortMaybe as a}from"../../core/maybe.js";import{debounce as h,ignoreAbortErrors as d,after as m,throwIfAborted as c,createResolver as p}from"../../core/promiseUtils.js";import{watch as g,on as u,initial as b}from"../../core/reactiveUtils.js";import{property as f}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import{subclass as y}from"../../core/accessorSupport/decorators/subclass.js";import{getLowerCaseDefaultHiddenFields as T}from"../../layers/support/fieldUtils.js";import{isSubtypeSublayer as w,getSubtypesFromLayer as _,isSubtypeGroupLayer as C}from"../../layers/support/layerUtils.js";import{createFieldInfos as I}from"../../support/popupUtils.js";import v from"../../tables/AttributeTableTemplate.js";import E from"../../tables/support/FieldOrder.js";import{defaultHighlightName as A,temporaryHighlightName as F}from"../../views/support/HighlightDefaults.js";import{highlightsSupported as j}from"../../views/support/layerViewUtils.js";import{isSelectableLayer as S}from"../../views/support/selectionUtils.js";import R from"./ActionColumn.js";import x from"./AttachmentsColumn.js";import U from"./FieldColumn.js";import O from"./RelationshipColumn.js";import V from"./Grid/Column.js";import W from"./Grid/Grid.js";import z from"./Grid/GridViewModel.js";import P from"./Grid/GroupColumn.js";import L from"./support/AttachmentsColumnTemplate.js";import H from"./support/AttachmentsViewOptions.js";import{isAttachmentsColumn as B,isRelationshipColumn as Z}from"./support/columnUtils.js";import{downloadAttachmentInfo as G,exportToCSV as k}from"./support/exportUtils.js";import N from"./support/FeatureStore.js";import D from"./support/FieldColumnTemplate.js";import M from"./support/RelationshipColumnTemplate.js";import $ from"./support/TableTemplate.js";import{isIFeatureTableSupportedLayerWithRelationships as q,findRelatedLayerInSources as Q,findRelationship as K,uniqueColumnNames as J,hasColumnForField as X,findField as Y,isIFeatureTableSupportedLayerWithAttachments as ee,getTableHighlightKey as te,getRelationshipIdsToShow as ie}from"./support/tableUtils.js";import{createAttributeTableElements as se}from"./support/templateUtils.js";import{goTo as le}from"../support/goToUtils.js";import"../support/widgetUtils.js";import{messageBundle as oe}from"../support/decorators/messageBundle.js";import{onLocaleChange as ne}from"../../intl/locale.js";import{substitute as re}from"../../intl/substitute.js";import{fetchMessageBundle as ae}from"../../intl/messages.js";const he="80px";let de=class extends z{constructor(e){super(e),this._debounceRefresh=h((()=>this._refresh())),this._temporaryHighlightAbortController=null,this._currentTemporaryHighlight=null,this._highlights=new n,this.attachmentsViewOptions=new H,this.attributeTableTemplate=null,this.autoRefreshEnabled=!0,this.columns=new i,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:l}=this;if(this.filterBySelectionEnabled&&!this.highlightIds.length||1===l.length&&-1===l.items[0])return void t([]);"loaded"!==s.state&&"loading"!==s.state&&await s.load();const o=this.paginationEnabled?this.pageIndex:e.page,n=await s.fetchItems({...e,page:o});t&&t(n)},this.grid=null,this.highlightEnabled=!0,this.layers=null,this.messages=null,this.messagesCommon=null,this.messagesUnits=null,this.messagesURIUtils=null,this.prompt=null,this.relatedTables=new i,this.relationshipColumnConfigs=null,this.selectionSource="table",this.showRelatedTableCallback=null,this.store=null,this.syncTemplateOnChangesEnabled=!0,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 N),this._set("grid",new W({viewModel:this}))}initialize(){const e=async()=>{this.messages=await ae("esri/widgets/FeatureTable/t9n/FeatureTable"),this.messagesCommon=await ae("esri/t9n/common"),this.messagesUnits=await ae("esri/core/t9n/Units"),this.messagesURIUtils=await ae("esri/widgets/support/t9n/uriUtils")};e(),this.addHandles([ne((()=>{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),u((()=>this.highlightIds),"change",(e=>this._onHighlightIdsChange(e)),{onListenerAdd:()=>this._syncSelection(),onListenerRemove:()=>this._highlights.removeAll()}),g((()=>this.grid?.temporaryHighlightId),(e=>{this._temporaryHighlightAbortController?.abort(),this._temporaryHighlightAbortController=new AbortController,d(this._syncTemporaryHighlight(e,this._temporaryHighlightAbortController.signal))})),g((()=>this.attachmentsEnabled),(()=>this.layer?.loaded&&this._generateColumns())),g((()=>this._viewSelection),(()=>{this._viewSelectionReady&&(this.highlightIds.items=this._viewSelection)})),g((()=>[this._tableHighlightsReady,this._viewSelectionReady]),(()=>this._syncSelection())),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((()=>{})))})),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),(e=>{this.editableColumns.forEach((t=>t.tableEditingEnabled=e)),this.refreshCellContent()})),g((()=>this.timeZone??this.view?.timeZone),(()=>this.refreshCellContent())),g((()=>this.layer?.definitionExpression),((e,t)=>(e||t)&&"loaded"===this.store.state&&this.reset())),g((()=>this.layer?.timeExtent),((e,t)=>(e||t)&&!this.timeExtent&&"loaded"===this.store.state&&this.reset())),u((()=>this.layer),"refresh",(e=>this._onLayerRefresh(e))),u((()=>this.grid),["cell-click","cell-dblclick","cell-pointerover","cell-pointerout","cell-keydown","column-reorder"],(({index:e,item:t,native:i,path:s,type:l})=>{const o=t?.feature,n=o?.getObjectId(),r="cell-keydown"===l&&i&&i instanceof KeyboardEvent&&"Enter"===i.key;this.emit(l,{feature:o,index:e,native:i,type:l,fieldName:s??void 0,objectId:n}),(r||"cell-click"===l)&&this._onCellInteraction(n)})),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())),u((()=>this.objectIds),"change",(()=>this._onObjectIdsChange()),{onListenerAdd:()=>this._onObjectIdsChange()}),g((()=>[this.paginationEnabled,this.pageIndex]),(()=>this.refreshPageCache())),g((()=>this.activeSortOrders),(e=>{this.store.sortOrders=e,this._syncAttributeTableTemplate()})),g((()=>this.allVisibleColumns),(()=>this._syncAttributeTableTemplate())),g((()=>this.pageCount),(()=>{this.pageIndex>=this.pageCount&&this.goToPage(0)})),g((()=>this.state),(e=>{"disabled"===e&&this.relatedTables.length&&this.drainRelatedTables()})),u((()=>this.tableParent?.highlightIds),"change",(({added:e})=>{const{relationshipConfig:t}=this,i=e[0];if(null==i||!t)return;const{relatedLayer:s,relationshipId:l}=t;this.relationshipConfig={objectId:i,relatedLayer:s,relationshipId:l}})),u((()=>this.tableParent),"cell-click",(e=>{const{tableParent:t}=this,{objectId:i}=e;t&&null!=i&&t.highlightIds.add(i)})),g((()=>this.attachmentsViewOptions.objectId),((e,t)=>{null!=e?null==t&&this.showAttachmentsView({objectId:e}):this.hideAttachmentsView()}))])}destroy(){this._drainColumns(),this._highlights.removeAll(),this._highlights.destroy(),this._currentTemporaryHighlight?.handle.remove(),this._temporaryHighlightAbortController=a(this._temporaryHighlightAbortController),this.grid?.destroy(),this.columns.destroyed||this.columns.destroy(),this.layer=null,this.view=null}get _defaultHiddenFields(){return T(this.layer)}get _effectiveTableTemplate(){return this.tableTemplateOverride||this.tableTemplate}get _effectiveAttributeTableTemplate(){return this.attributeTableTemplate||this.layer?.attributeTableTemplate}get _highlightableLayerView(){const e=this.layerView;return j(e)?e:null}get _selectionManager(){const{view:e}=this;return!e||e.destroyed?null:e.selectionManager?.sources?.length?e.selectionManager:null}get _selectableLayer(){const{layer:e}=this;if(S(e)||w(e)){const t=e;return this._selectionManager?.sources?.includes(t)?t:null}return null}get _subtypes(){return _(this.layer)}get _tableHighlightsReady(){return!("table"!==this.selectionSource||!this.highlightEnabled||!this._highlightableLayerView)}get _viewSelection(){const{_selectableLayer:e}=this;return e?this._selectionManager?.getSelection(e)??[]:[]}get _viewSelectionReady(){return!(!this.layer||"view"!==this.selectionSource||!this._selectionManager)}get activeFilters(){const{filterGeometry:e,objectIds:t,filterBySelectionEnabled:s,highlightIds:l}=this,o=new i;return e&&o.push({type:"geometry",geometry:e}),s?o.push({type:"selection",objectIds:l.toArray()}):t.length&&o.push({type:"objectId",objectIds:t.toArray()}),o}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 allRelatedTablesVisible(){return!!(this.relatedRecordsEnabled&&this.relatedTables.length&&this.showAllRelatedTables)}get attachmentsEnabled(){return this.store.attachmentsEnabled}set attachmentsEnabled(e){this.store.attachmentsEnabled=e}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 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 hiddenFields(){return this._get("hiddenFields")??new i}set hiddenFields(e){this._set("hiddenFields",s(e,this._get("hiddenFields"),i))}get initialSize(){return this.store.initialSize}set initialSize(e){this.store.initialSize=e}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._highlights.removeAll(),this.drainRelatedTables(),this._set("layer",e)}get layerView(){return this.store.layerView}get outFields(){return this.store.outFields}set outFields(e){this.store.outFields=e}get relatedRecordsEnabled(){return this.store.relatedRecordsEnabled}set relatedRecordsEnabled(e){this.store.relatedRecordsEnabled=e}get relatedTable(){return this.relatedTables.at(-1)}get relationship(){const e=this.relationshipConfig?.relationshipId;return null==e?null:this.relationships?.find((({id:t})=>t===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,l=this.store.relationshipInfos;if(l.length||!q(e)||!i?.length)return l;const o=[],n=s?.layers||t||[];return i.forEach((t=>{const i=Q(e,n,t);i&&(i.load(),o.push({layer:e,relatedLayer:i,relationshipId:t.id}))})),o}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 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 supportsAttachments(){return this.store.supportsAttachments}get supportsAddAttachments(){const{store:{supportsAddingAttachments:e,supportsEditing:t}}=this;return this.editingEnabled&&t&&e}get supportsDeleteAttachments(){const{store:{supportsDeletingAttachments:e,supportsEditing:t}}=this;return this.editingEnabled&&t&&e}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._get("timeZone")}set timeZone(e){this.allColumns.forEach((t=>t.tableTimeZone=e)),this._set("timeZone",e)}get view(){return this.store.view}set view(e){this.store.view=e,this.fieldColumns.forEach((t=>t.view=e)),this.refreshCellContent()}async addAttachment(e,t){const{attachmentsViewOptions:i,store:s}=this,l=i.objectId===e;await s.addAttachment(e,t).catch((e=>{l&&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)})),l&&!i.error&&(i.onEditComplete(),i.attachmentInfos=await s.getAttachmentsByObjectId(e,!0)),this.refreshCellContent()}async deleteAttachments(e,t){const{attachmentsViewOptions:i,store:s}=this,l=i.objectId===e;await s.deleteAttachments(e,t).catch((e=>{l&&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)})),l&&!i.error&&(i.onEditComplete(),i.attachmentInfos=await s.getAttachmentsByObjectId(e,!0)),this.refreshCellContent()}collapseRelatedTable(e,t){const{relatedLayer:s,objectId:l,relationshipId:o}=t,{objectIdField:n}=s,r=K(s,o),a=s.displayField||r?.keyField||n;e.set({highlightIds:new i([l]),multipleSelectionEnabled:!1,tableTemplateOverride:this._getTableTemplateForRelatedTableView(e,a,o)});const h=e.hiddenFields;h.includes(J.action)||h.add(J.action),h.includes(J.attachments)||h.add(J.attachments),e.scrollLeft()}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 downloadAttachmentById(e,t){const i=(await this.store.getAttachmentsByObjectId(e,!0)).find((e=>e.id===t));G(i)}drainRelatedTables(){this.relatedTables.drain((e=>e.destroy())),this.set({multipleSelectionEnabled:!0,relationshipColumnConfigs:null,showAllRelatedTables:!1,tableTemplateOverride:null}),this.hiddenFields.removeMany([J.action,J.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."):(l(r.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()))}getObjectIdIndex(e){return this.store.getItemIndexByObjectId(e)}getValue(e,t){const i=this.store.getItemByObjectId(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(J.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(){return this.relatedTables.forEach((async e=>await e.refresh())),d(this._debounceRefresh())}refreshCellContent(){this.grid?.requestContentUpdate()}refreshPageCache(){this.grid?.refreshPageCache()}async reset(){this.goToPage(0),await(this.grid?.reset())}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:s,layer:l}=this;if(!this.attachmentsEnabled||!l)return void this._logWarning("The 'attachmentsEnabled' property is currently false.");await l.load();const o=this._getDefaultLayerDisplayField(l),n=await this.store.getAttachmentsByObjectId(e,!0),r=this.store.getItemIndexByObjectId(e);t.set({attachmentInfos:n,mode:n.length?"list":"file",objectId:e}),this.set({highlightIds:new i([e]),multipleSelectionEnabled:!1,relationshipColumnConfigs:[],tableTemplateOverride:this._getTableTemplateForAttachmentsView(o)}),s.includes(J.action)||s.add(J.action),null!=r&&this.scrollToIndex(r)}syncAttributeTableTemplate(){this._syncAttributeTableTemplate(!0)}clearSelectionFilter(){l(r.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:l}=this,n=s.objectId===e;await l.updateAttachment(e,t,i).catch((e=>{n&&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)})),n&&!s.error&&(s.onEditComplete(),s.attachmentInfos=await l.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 l=await e.queryFeatures(s);try{await le(t,l.features)}catch(o){"AbortError"!==o.name&&console.error(o)}}_syncAttributeTableTemplate(e=!1){const{_effectiveAttributeTableTemplate:t,layer:i,tableTemplateOverride:s,syncTemplateOnChangesEnabled:l}=this;if(!i||!t||!l&&!e||s||this.tableParent||this.relatedTable||null!==this.attachmentsViewOptions.objectId)return;const{activeSortOrders:o,allColumns:n,columns:r}=this,a=[],h=se(r.toArray());o.forEach((({fieldName:e,direction:t})=>{e&&t&&a.push(new E({field:e,order:t}))})),n.forEach((({fieldName:e,direction:t})=>{t&&!a.some((t=>t.field===e))&&a.push(new E({field:e,order:t}))})),t.elements=h,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&&C(e.parent)&&await e.parent.loadAll();const i=e.capabilities.query?.maxRecordCount,s=i&&i<t,l=s?i:t;s&&(this._logWarning("The value for 'pageSize' has been adjusted due to the provided layer's max record count."),this.pageSize=l),this.grid?.set("pageSize",l),this.store.load(),this._generateColumns()}_onLayerRefresh(e){this.autoRefreshEnabled&&e.dataChanged&&this.refresh()}_generateColumns(){this._drainColumns();const{_effectiveTableTemplate:e,_effectiveAttributeTableTemplate:t}=this,i=e?.columnTemplates,s=this._generateColumnsFromColumnTemplates(i)??this._generateColumnsFromAttributeTableTemplate(t)??this._generateDefaultFieldColumns();s.length&&(this.attachmentsEnabled&&!s.some((e=>B(e)))&&s.push(this._generateDefaultAttachmentsColumn()),this.relatedRecordsEnabled&&this.relationshipInfos.length&&!s.some((e=>Z(e)))&&s.push(...this._generateDefaultRelationshipColumns()),this.actionColumnConfig&&s.push(this._generateActionColumn()),s.sort(((e,t)=>e.frozen&&t.frozen||e.frozenToEnd&&t.frozenToEnd?0:e.frozen||t.frozenToEnd?-1:0)),this.columns.addMany(s))}_generateColumnsFromAttributeTableTemplate(e){const{layer:i}=this;if(!e||!i)return null;const{elements:s,orderByFields:l}=e,o=I(i),n=[];n.push(...this._generateColumnsFromAttributeTableElements(s,l));const r=o.map((e=>{if(!e.fieldName||X(e.fieldName,n))return null;const{fieldName:t}=e,s=Y(i,t);return s?this._generateDefaultFieldColumn(s,{hidden:!0,orderByFields:l}):(this._logTemplateWarning("A valid 'field' could not be found for the provided template."),null)})).filter(t);return n.push(...r),this.attachmentsEnabled&&ee(i)&&!n.some((e=>B(e)))&&n.push(this._generateDefaultAttachmentsColumn({hidden:!0})),this.relatedRecordsEnabled&&q(i)&&i.relationships?.forEach((({id:e},t)=>{const i=this.relationshipInfos.find((t=>t.relationshipId===e));i&&!n.some((t=>Z(t)&&t.relationshipId===e))&&n.push(this._generateDefaultRelationshipColumn({hidden:!0,info:i,index:t}))})),n.length?n:null}_generateColumnsFromAttributeTableElements(e,t){const{layer:i}=this;return i?e?.map(((e,i)=>{switch(e.type){case"field":return this._createFieldColumnFromElement({element:e,orderByFields:t});case"group":return this._createGroupColumnFromElement({element:e,orderByFields:t});case"attachment":return this._createAttachmentColumnFromElement({element:e,index:i});case"relationship":return this._createRelationshipColumnFromElement({element:e,index:i})}})).filter((e=>!!e))??[]:[]}_createFieldColumnFromElement(e){const{layer:t}=this;if(!t)return null;const{element:i,orderByFields:s}=e,{fieldName:l}=i;if(null==l)return this._logTemplateWarning("A valid 'fieldName' must be provided."),null;const o=Y(t,l);if(!o)return this._logTemplateWarning("A valid 'field' could not be found for the provided template."),null;const{description:n,label:r}=i,a=s?.findIndex((({field:e})=>e&&e===l))??-1,h=a>-1?s?.at(a)?.order:void 0,d=a>-1?a:void 0,{editingEnabled:m,grid:c,messages:p,messagesCommon:g,messagesURIUtils:u,store:b,timeZone:f,view:y}=this;return new U({description:n,direction:h,field:o,fieldName:l,grid:c,initialSortPriority:d,label:r,layer:t,messages:p,messagesCommon:g,messagesURIUtils:u,store:b,tableEditingEnabled:m,tableTimeZone:f,view:y,onShowPromptCallback:this._onShowPromptCallback})}_createGroupColumnFromElement(e){const{element:t,orderByFields:i}=e,{description:s,label:l}=t;if(!l)return this._logTemplateWarning("Group columns require a label."),null;if(!t.elements.length)return this._logTemplateWarning("Group columns require child columns."),null;const{grid:o,messages:n,messagesCommon:r,messagesURIUtils:a,store:h,timeZone:d}=this;return new P({columns:this._generateColumnsFromAttributeTableElements(t.elements,i),description:s,grid:o,label:l,messages:n,messagesCommon:r,messagesURIUtils:a,store:h,tableTimeZone:d})}_createAttachmentColumnFromElement(e){if(!this.attachmentsEnabled)return void this._logTemplateWarning("The 'attachmentsEnabled' property is currently false.");const{element:t,index:i}=e,{description:s,label:l}=t,{grid:o,layer:n,messages:r,messagesCommon:a,messagesURIUtils:h,store:d,timeZone:m}=this;return new x({description:s,fieldName:`${J.attachments}-${i}`,grid:o,label:l,layer:n,messages:r,messagesCommon:a,messagesURIUtils:h,store:d,tableTimeZone:m,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:l,relationshipId:o}=t,n=this.relationshipInfos.find((e=>e.relationshipId===o));if(!n)return this._logTemplateWarning("Unable to find valid related layer target based on the provided relationship id."),null;const{grid:r,messages:a,messagesCommon:h,messagesURIUtils:d,store:m,timeZone:c}=this;return new O({description:s,fieldName:`${J.relationship}-${o}-${i}`,grid:r,label:l,messages:a,messagesCommon:h,messagesURIUtils:d,relationshipId:o,store:m,tableTimeZone:c,layer:n.relatedLayer,relatedLayer:n.layer,showRelatedTableCallback:e=>this._onShowRelatedTable(e)})}_generateColumnsFromColumnTemplates(e){const{editingEnabled:t,grid:i,layer:s,messages:l,messagesCommon:o,messagesURIUtils:n,store:r,timeZone:a,view:h}=this;if(!e?.length||!s)return null;const d=[];return e.forEach(((e,m)=>{const{autoWidth:c,description:p,direction:g,flexGrow:u,fieldName:b,formatFunction:f,frozen:y,frozenToEnd:T,icon:w,iconText:_,initialSortPriority:C,invalid:I,label:v,menuConfig:E,resizable:A,sortable:F,textAlign:j,textWrap:S,timeZone:R,type:x,width:O}=e;if(!x)return void this._logTemplateWarning("Property 'type' is missing from the provided template.");if(y&&T)return void this._logTemplateWarning("Properties 'frozen' and 'frozenToEnd' cannot both be true for the same column.");const W=!1===e.visible;if("group"===x){if(!e.columnTemplates?.length)return void this._logTemplateWarning("Group columns must contain column templates.");if(!e.label)return void this._logTemplateWarning("Group columns require a label.");const t=this._generateColumnsFromColumnTemplates(e.columnTemplates),s=W||this._isFieldHidden(e.label);d.push(new P({autoWidth:c,columns:t,description:p,flexGrow:u,frozen:y,frozenToEnd:T,grid:i,hidden:s,icon:w,iconText:_,invalid:I,label:v,menuConfig:E,messages:l,messagesCommon:o,messagesURIUtils:n,resizable:A,tableTimeZone:a,textAlign:j,textWrap:S,timeZone:R,width:O}))}else if("attachment"===x){if(!this.attachmentsEnabled)return void this._logTemplateWarning("Attachment columns require attachments to be enabled on the table.");d.push(this._generateAttachmentsColumnFromTemplate(e,m))}else if("relationship"===x){if(!this.relatedRecordsEnabled)return void this._logTemplateWarning("Relationship columns require related records to be enabled on the table.");const{relationshipId:t}=e;if(null==t)return void this._logTemplateWarning("Property 'relationshipId' is missing from the provided template.");const i=this.relationshipInfos.find((e=>e.relationshipId===t));if(!i)return void this._logTemplateWarning("Unable to find valid related layer target based on the provided relationship id.");d.push(this._generateRelationshipColumnFromTemplate(i,e,m))}else if(!b)return void this._logTemplateWarning("Value for 'fieldName' property was missing from the provided template.");const z=W||this._isFieldHidden(b);if("column"===x)d.push(new V({autoWidth:c,description:p,direction:g,fieldName:b,flexGrow:u,formatFunction:f,frozen:y,frozenToEnd:T,grid:i,hidden:z,icon:w,iconText:_,initialSortPriority:C,invalid:I,label:v,menuConfig:E,messages:l,messagesCommon:o,messagesURIUtils:n,resizable:A,sortable:F,tableTimeZone:a,textAlign:j,textWrap:S,timeZone:R,width:O}));else if("field"===x){const m=Y(s,e.fieldName);if(!m)return void this._logTemplateWarning("A valid 'field' could not be found for the provided template.");const{editable:b,required:x}=e;d.push(new U({autoWidth:c,description:p,direction:g,editable:b,field:m,fieldName:m.name,flexGrow:u,formatFunction:f,frozen:y,frozenToEnd:T,grid:i,hidden:z,icon:w,iconText:_,initialSortPriority:C,invalid:I,label:v,layer:s,messages:l,messagesCommon:o,messagesURIUtils:n,menuConfig:E,required:x,resizable:A,sortable:F,store:r,tableEditingEnabled:t,tableTimeZone:a,template:e,textAlign:j,textWrap:S,timeZone:R,width:O,view:h,onShowPromptCallback:this._onShowPromptCallback}))}})),d.length?d:null}_generateDefaultFieldColumns(){return this.layer?.fields?.map((e=>this._generateDefaultFieldColumn(e))).filter(t)??[]}_generateDefaultFieldColumn(e,t){const{editingEnabled:i,grid:s,layer:l,messages:o,messagesCommon:n,messagesURIUtils:r,store:a,timeZone:h,view:d}=this,m=t?.orderByFields;if(!e.visible||"geometry"===e.type)return null;const c=e.name,p=m?.findIndex((({field:e})=>e&&e===c))??-1,g=p>-1?m?.at(p)?.order:void 0,u=p>-1?p:void 0;return new U({direction:g,field:e,fieldName:c,grid:s,hidden:t?.hidden||this._isFieldHidden(c),initialSortPriority:u,layer:l,messages:o,messagesCommon:n,messagesURIUtils:r,store:a,tableEditingEnabled:i,tableTimeZone:h,view:d,onShowPromptCallback:this._onShowPromptCallback})}_generateAttachmentsColumnFromTemplate(e,t){const{grid:i,layer:s,messages:l,messagesCommon:o,messagesURIUtils:n,store:r,timeZone:a}=this,{attachmentsViewEnabled:h,autoWidth:d,description:m,flexGrow:c,fieldName:p,formatFunction:g,frozen:u,frozenToEnd:b,icon:f,iconText:y,invalid:T,label:w,menuConfig:_,resizable:C,textAlign:I,textWrap:v,thumbnailAppearance:E,thumbnailCount:A,thumbnailIconScale:F,thumbnailsEnabled:j,timeZone:S,width:R}=e;return new x({attachmentsViewEnabled:h,autoWidth:d,description:m,fieldName:`${J.attachments}-${t}`,flexGrow:c,formatFunction:g,frozen:u,frozenToEnd:b,grid:i,hidden:!1===e.visible||this._isFieldHidden(w)||this._isFieldHidden(p),icon:f,iconText:y,invalid:T,label:w,layer:s,menuConfig:_,messages:l,messagesCommon:o,messagesURIUtils:n,resizable:C,store:r,tableTimeZone:a,textAlign:I,textWrap:v,thumbnailAppearance:E,thumbnailCount:A,thumbnailIconScale:F,thumbnailsEnabled:j,timeZone:S,width:R,onShowAttachments:e=>this._onShowAttachments(e)})}_generateDefaultAttachmentsColumn(e){const{grid:t,layer:i,messages:s,messagesCommon:l,messagesURIUtils:o,store:n,timeZone:r}=this,a=J.attachments;return new x({fieldName:a,grid:t,hidden:e?.hidden||this._isFieldHidden(a),layer:i,messages:s,messagesCommon:l,messagesURIUtils:o,store:n,tableTimeZone:r,onShowAttachments:e=>this._onShowAttachments(e)})}_generateRelationshipColumnFromTemplate(e,t,i){const{grid:s,messages:l,messagesCommon:o,messagesURIUtils:n,store:r,timeZone:a}=this,{autoWidth:h,collapsed:d,description:m,flexGrow:c,fieldName:p,formatFunction:g,frozen:u,frozenToEnd:b,icon:f,iconText:y,invalid:T,label:w,menuConfig:_,relationshipId:C,resizable:I,textAlign:v,textWrap:E,timeZone:A,width:F}=t;return new O({autoWidth:h,collapsed:d,description:m,fieldName:`${J.relationship}-${C}-${i}`,flexGrow:c,formatFunction:g,frozen:u,frozenToEnd:b,grid:s,hidden:!1===t.visible||this._isFieldHidden(w)||this._isFieldHidden(p),icon:f,iconText:y,invalid:T,label:w,menuConfig:_,messages:l,messagesCommon:o,messagesURIUtils:n,relationshipId:C,resizable:I,store:r,tableTimeZone:a,textAlign:v,textWrap:E,timeZone:A,width:F,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:l}=t,o=e.find((e=>e.relationshipId===l));o&&i.push(this._generateDefaultRelationshipColumn({config:t,index:s,info:o}))})):e.forEach(((e,t)=>i.push(this._generateDefaultRelationshipColumn({index:t,info:e})))),i):i}_generateDefaultRelationshipColumn(e){const{config:t,hidden:i,index:s,info:l}=e,{grid:o,messages:n,messagesCommon:r,messagesURIUtils:a}=this,{relationshipId:h}=l;return new O({...t,fieldName:`${J.relationship}-${h}-${s}`,grid:o,hidden:i,messages:n,messagesCommon:r,messagesURIUtils:a,layer:l.relatedLayer,relatedLayer:l.layer,relationshipId:h,showRelatedTableCallback:e=>this._onShowRelatedTable(e)})}_generateActionColumn(){return new R({hidden:this._isFieldHidden(J.action),...this.actionColumnConfig})}_isFieldHidden(e){const t=e?.toLowerCase();return(this.hiddenFields??this._defaultHiddenFields).some((e=>e.toLowerCase()===t))}_addTableHighlight(e){if(!this.highlightEnabled)return;const{_highlightableLayerView:t,layer:i}=this;if(t&&i){const s=this.store.getItemByObjectId(e),l=s?.feature??e;this._highlights.add(t.highlight(l,{name:A}),te(i,e))}}_removeTableHighlight(e){const{layer:t}=this;t&&this._highlights.remove(te(t,e))}async _syncTemporaryHighlight(e,t){if(!this.highlightEnabled)return this._currentTemporaryHighlight?.handle.remove(),void(this._currentTemporaryHighlight=null);if(await m(25),c(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:l,highlightEnabled:o}=this;e&&s&&l&&o&&(this._currentTemporaryHighlight={id:e,handle:s.highlight(e,{name:F})})}_syncSelection(){this._highlights.removeAll(),this._tableHighlightsReady?this.highlightIds.forEach((e=>this._addTableHighlight(e))):this._viewSelectionReady&&(this.highlightIds.items=this._viewSelection)}_appendToViewSelection(e){const{_selectableLayer:t}=this;t&&this._selectionManager?.appendToSelection(t,e)}_removeFromViewSelection(e){const{_selectableLayer:t}=this;t&&this._selectionManager?.removeFromSelection(t,e)}async _onHighlightIdsChange(e){const{added:t,removed:i}=e,{attachmentsViewOptions:s}=this;if(this._tableHighlightsReady?(i.forEach((e=>this._removeTableHighlight(e))),t.forEach((e=>this._addTableHighlight(e)))):this._viewSelectionReady&&(this._removeFromViewSelection(i),this._appendToViewSelection(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"})}}}_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(J.action)||s.add(J.action),s.includes(J.attachments)||s.add(J.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:ie(t,i.id),showAllRelatedTables:!1,tableTemplateOverride:null}),e.hiddenFields.removeMany([J.action,J.attachments])}_getTableTemplateForRelatedTableView(e,t,i){return new $({columnTemplates:[new D({fieldName:t,editable:!1,menuConfig:{selectionMode:"single",icon:"chevron-down",items:this._extractFieldColumnInfosFromTableTemplate(e.viewModel).map((([s,l])=>({selected:s===t,label:l||s,clickFunction:()=>{e.tableTemplateOverride=this._getTableTemplateForRelatedTableView(e,s,i)}})))},resizable:!1}),new M({autoWidth:!1,collapsed:!0,flexGrow:0,label:"",resizable:!1,relationshipId:i,width:he})]})}_getTableTemplateForShowAllTablesView(e,t){const i=[new D({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 L({attachmentsViewEnabled:!1,autoWidth:!1,flexGrow:0,label:"",resizable:!1,thumbnailsEnabled:!1,width:he})),new $({columnTemplates:i})}async _onShowPromptCallback(e){const{column:t,objectId:i,oldValue:s,value:l}=e,{_subtypes:o,layer:n}=this;if(!n||!o.length)return void t.cancel();const r=o.find((e=>e.code===l));if(!r)return void t.cancel();const a=p(),h=this._createSubtypeEditPrompt(s,r,a),d=!!n.parent;try{this.showPrompt(h);const e=await a.promise,s=[{fieldName:t.fieldName,value:l}];switch(e){case"update-fields":for(const[e,t]of Object.entries(r.defaultValues))null!=t&&s.push({fieldName:e,value:t});await t.updateItems({objectId:i,updates:s}),d&&this.refresh();break;case"keep-existing":await t.updateItems({objectId:i,updates:s}),d&&this.refresh();break;case"undo":t.cancel()}}finally{this.clearPrompt()}}_createSubtypeEditPrompt(e,t,i){const{_subtypes:s,messages:l,messagesCommon:o}=this,n=s.find((t=>t.code===e))?.name??`${e}`;let r="update-fields";const a=[{label:l.subtypes.useDefaultValuesOption,value:"update-fields"},{label:l.subtypes.keepCurrentValuesOption,value:"keep-existing"}];return{context:"info",title:l.subtypes.changeWarningTitle,message:re(l.subtypes.changeWarning,{originalType:n,newType:t.name}),radios:a,defaultRadioSelection:"update-fields",onRadioSelection:e=>{r=e},actions:{primary:{label:o.apply,action:()=>i.resolve(r),type:"positive"},secondary:{label:o.cancel,type:"neutral",action:()=>i.resolve("undo")}},cancel:()=>i.reject()}}_onShowAttachments({objectId:e}){this.attachmentsViewOptions.objectId=e}_getTableTemplateForAttachmentsView(e){return new $({columnTemplates:[new D({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 L({attachmentsViewEnabled:!1,autoWidth:!1,flexGrow:0,label:"",resizable:!1,thumbnailsEnabled:!1,width:he})]})}_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})=>[e,t])):i?.fields.map((e=>[e.name,e.alias]))??[]}_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?r.getLogger(this).warnOnce(e):r.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([f()],de.prototype,"_defaultHiddenFields",null),e([f()],de.prototype,"_effectiveTableTemplate",null),e([f()],de.prototype,"_effectiveAttributeTableTemplate",null),e([f()],de.prototype,"_highlights",void 0),e([f()],de.prototype,"_highlightableLayerView",null),e([f()],de.prototype,"_selectionManager",null),e([f()],de.prototype,"_selectableLayer",null),e([f()],de.prototype,"_subtypes",null),e([f()],de.prototype,"_tableHighlightsReady",null),e([f()],de.prototype,"_viewSelection",null),e([f()],de.prototype,"_viewSelectionReady",null),e([f()],de.prototype,"activeFilters",null),e([f({readOnly:!0})],de.prototype,"activeSortOrders",null),e([f()],de.prototype,"allRelatedTablesVisible",null),e([f()],de.prototype,"attachmentsEnabled",null),e([f()],de.prototype,"attachmentsViewOptions",void 0),e([f({type:v})],de.prototype,"attributeTableTemplate",void 0),e([f()],de.prototype,"autoRefreshEnabled",void 0),e([f()],de.prototype,"clearPrompt",null),e([f({readOnly:!0})],de.prototype,"columns",void 0),e([f()],de.prototype,"dataProvider",void 0),e([f()],de.prototype,"definitionExpression",null),e([f()],de.prototype,"filterGeometry",null),e([f()],de.prototype,"filterBySelectionEnabled",null),e([f({readOnly:!0})],de.prototype,"grid",void 0),e([f()],de.prototype,"hiddenFields",null),e([f()],de.prototype,"highlightEnabled",void 0),e([f()],de.prototype,"initialSize",null),e([f()],de.prototype,"isQueryingOrSyncing",null),e([f()],de.prototype,"isSyncingAttachments",null),e([f()],de.prototype,"layer",null),e([f()],de.prototype,"layers",void 0),e([f()],de.prototype,"layerView",null),e([f()],de.prototype,"messages",void 0),e([f(),oe("esri/t9n/common")],de.prototype,"messagesCommon",void 0),e([f(),oe("esri/core/t9n/Units")],de.prototype,"messagesUnits",void 0),e([f(),oe("esri/widgets/support/t9n/uriUtils")],de.prototype,"messagesURIUtils",void 0),e([f()],de.prototype,"outFields",null),e([f()],de.prototype,"prompt",void 0),e([f()],de.prototype,"relatedRecordsEnabled",null),e([f()],de.prototype,"relatedTable",null),e([f()],de.prototype,"relatedTables",void 0),e([f()],de.prototype,"relationship",null),e([f()],de.prototype,"relationshipColumnConfigs",void 0),e([f()],de.prototype,"relationshipConfig",null),e([f()],de.prototype,"relationshipInfos",null),e([f()],de.prototype,"relationships",null),e([f()],de.prototype,"returnGeometryEnabled",null),e([f()],de.prototype,"returnMEnabled",null),e([f()],de.prototype,"returnZEnabled",null),e([f()],de.prototype,"selectionSource",void 0),e([f()],de.prototype,"showAllRelatedTables",null),e([f()],de.prototype,"showPrompt",null),e([f()],de.prototype,"showRelatedTableCallback",void 0),e([f({readOnly:!0,type:N})],de.prototype,"store",void 0),e([f()],de.prototype,"supportsAttachments",null),e([f()],de.prototype,"supportsAddAttachments",null),e([f()],de.prototype,"supportsDeleteAttachments",null),e([f()],de.prototype,"supportsResizeAttachments",null),e([f()],de.prototype,"supportsUpdateAttachments",null),e([f()],de.prototype,"syncTemplateOnChangesEnabled",void 0),e([f()],de.prototype,"tableController",void 0),e([f()],de.prototype,"tableParent",void 0),e([f({type:$})],de.prototype,"tableTemplate",void 0),e([f()],de.prototype,"tableTemplateOverride",void 0),e([f()],de.prototype,"timeExtent",null),e([f()],de.prototype,"timeZone",null),e([f()],de.prototype,"view",null),de=e([y("esri.widgets.FeatureTable.FeatureTableViewModel")],de);const me=de;export{me as default};
|
|
5
|
+
import{_ as e}from"../../chunks/tslib.es6.js";import"../../intl.js";import{isSome as t}from"../../core/arrayUtils.js";import i from"../../core/Collection.js";import{referenceSetter as s}from"../../core/collectionUtils.js";import{deprecatedFunction as l}from"../../core/deprecate.js";import o from"../../core/Error.js";import n from"../../core/Handles.js";import r from"../../core/Logger.js";import{abortMaybe as a}from"../../core/maybe.js";import{debounce as h,ignoreAbortErrors as d,after as m,throwIfAborted as c,createResolver as p}from"../../core/promiseUtils.js";import{watch as g,on as u,initial as b}from"../../core/reactiveUtils.js";import{property as f}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import{subclass as y}from"../../core/accessorSupport/decorators/subclass.js";import{getLowerCaseDefaultHiddenFields as T}from"../../layers/support/fieldUtils.js";import{isSubtypeSublayer as w,getSubtypesFromLayer as _,isSubtypeGroupLayer as C}from"../../layers/support/layerUtils.js";import{createFieldInfos as I}from"../../support/popupUtils.js";import v from"../../tables/AttributeTableTemplate.js";import E from"../../tables/support/FieldOrder.js";import{defaultHighlightName as A,temporaryHighlightName as F}from"../../views/support/HighlightDefaults.js";import{highlightsSupported as j}from"../../views/support/layerViewUtils.js";import{isSelectableLayer as S}from"../../views/support/selectionUtils.js";import R from"./ActionColumn.js";import x from"./AttachmentsColumn.js";import U from"./FieldColumn.js";import O from"./RelationshipColumn.js";import V from"./Grid/Column.js";import W from"./Grid/Grid.js";import z from"./Grid/GridViewModel.js";import P from"./Grid/GroupColumn.js";import L from"./support/AttachmentsColumnTemplate.js";import H from"./support/AttachmentsViewOptions.js";import{isAttachmentsColumn as B,isRelationshipColumn as Z}from"./support/columnUtils.js";import{downloadAttachmentInfo as G,exportToCSV as k}from"./support/exportUtils.js";import N from"./support/FeatureStore.js";import D from"./support/FieldColumnTemplate.js";import M from"./support/RelationshipColumnTemplate.js";import $ from"./support/TableTemplate.js";import{isIFeatureTableSupportedLayerWithRelationships as q,findRelatedLayerInSources as Q,findRelationship as K,uniqueColumnNames as J,hasColumnForField as X,findField as Y,isIFeatureTableSupportedLayerWithAttachments as ee,getTableHighlightKey as te,getRelationshipIdsToShow as ie}from"./support/tableUtils.js";import{createAttributeTableElements as se}from"./support/templateUtils.js";import{goTo as le}from"../support/goToUtils.js";import"../support/widgetUtils.js";import{messageBundle as oe}from"../support/decorators/messageBundle.js";import{onLocaleChange as ne}from"../../intl/locale.js";import{substitute as re}from"../../intl/substitute.js";import{fetchMessageBundle as ae}from"../../intl/messages.js";const he="80px";let de=class extends z{constructor(e){super(e),this._debounceRefresh=h((()=>this._refresh())),this._temporaryHighlightAbortController=null,this._currentTemporaryHighlight=null,this._highlights=new n,this.attachmentsViewOptions=new H,this.attributeTableTemplate=null,this.autoRefreshEnabled=!0,this.columns=new i,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:l}=this;if(this.filterBySelectionEnabled&&!this.highlightIds.length||1===l.length&&-1===l.items[0])return void t([]);"loaded"!==s.state&&"loading"!==s.state&&await s.load();const o=this.paginationEnabled?this.pageIndex:e.page,n=await s.fetchItems({...e,page:o});t&&t(n)},this.grid=null,this.highlightEnabled=!0,this.layers=null,this.messages=null,this.messagesCommon=null,this.messagesUnits=null,this.messagesURIUtils=null,this.prompt=null,this.relatedTables=new i,this.relationshipColumnConfigs=null,this.selectionSource="table",this.showRelatedTableCallback=null,this.store=null,this.syncTemplateOnChangesEnabled=!0,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 N),this._set("grid",new W({viewModel:this}))}initialize(){const e=async()=>{this.messages=await ae("esri/widgets/FeatureTable/t9n/FeatureTable"),this.messagesCommon=await ae("esri/t9n/common"),this.messagesUnits=await ae("esri/core/t9n/Units"),this.messagesURIUtils=await ae("esri/widgets/support/t9n/uriUtils")};e(),this.addHandles([ne((()=>{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),u((()=>this.highlightIds),"change",(e=>this._onHighlightIdsChange(e)),{onListenerAdd:()=>this._syncSelection(),onListenerRemove:()=>this._highlights.removeAll()}),g((()=>this.grid?.temporaryHighlightId),(e=>{this._temporaryHighlightAbortController?.abort(),this._temporaryHighlightAbortController=new AbortController,d(this._syncTemporaryHighlight(e,this._temporaryHighlightAbortController.signal))})),g((()=>this.attachmentsEnabled),(()=>this.layer?.loaded&&this._generateColumns())),g((()=>this._viewSelection),(()=>{this._viewSelectionReady&&(this.highlightIds.items=this._viewSelection)})),g((()=>[this._tableHighlightsReady,this._viewSelectionReady]),(()=>this._syncSelection())),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),(e=>{this.editableColumns.forEach((t=>t.tableEditingEnabled=e)),this.refreshCellContent()})),g((()=>this.timeZone??this.view?.timeZone),(()=>this.refreshCellContent())),g((()=>this.layer?.definitionExpression),((e,t)=>(e||t)&&"loaded"===this.store.state&&this.reset())),g((()=>this.layer?.timeExtent),((e,t)=>(e||t)&&!this.timeExtent&&"loaded"===this.store.state&&this.reset())),u((()=>this.layer),"refresh",(e=>this._onLayerRefresh(e))),u((()=>this.grid),["cell-click","cell-dblclick","cell-pointerover","cell-pointerout","cell-keydown","column-reorder"],(({index:e,item:t,native:i,path:s,type:l})=>{const o=t?.feature,n=o?.getObjectId(),r="cell-keydown"===l&&i&&i instanceof KeyboardEvent&&"Enter"===i.key;this.emit(l,{feature:o,index:e,native:i,type:l,fieldName:s??void 0,objectId:n}),(r||"cell-click"===l)&&this._onCellInteraction(n)})),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())),u((()=>this.objectIds),"change",(()=>this._onObjectIdsChange()),{onListenerAdd:()=>this._onObjectIdsChange()}),g((()=>[this.paginationEnabled,this.pageIndex]),(()=>this.refreshPageCache())),g((()=>this.activeSortOrders),(e=>{this.store.sortOrders=e,this._syncAttributeTableTemplate()})),g((()=>this.allVisibleColumns),(()=>this._syncAttributeTableTemplate())),g((()=>this.pageCount),(()=>{this.pageIndex>=this.pageCount&&this.goToPage(0)})),g((()=>this.state),(e=>{"disabled"===e&&this.relatedTables.length&&this.drainRelatedTables()})),u((()=>this.tableParent?.highlightIds),"change",(({added:e})=>{const{relationshipConfig:t}=this,i=e[0];if(null==i||!t)return;const{relatedLayer:s,relationshipId:l}=t;this.relationshipConfig={objectId:i,relatedLayer:s,relationshipId:l}})),u((()=>this.tableParent),"cell-click",(e=>{const{tableParent:t}=this,{objectId:i}=e;t&&null!=i&&t.highlightIds.add(i)})),g((()=>this.attachmentsViewOptions.objectId),((e,t)=>{null!=e?null==t&&this.showAttachmentsView({objectId:e}):this.hideAttachmentsView()}))])}destroy(){this._drainColumns(),this._highlights.removeAll(),this._highlights.destroy(),this._currentTemporaryHighlight?.handle.remove(),this._temporaryHighlightAbortController=a(this._temporaryHighlightAbortController),this.grid?.destroy(),this.columns.destroyed||this.columns.destroy(),this.layer=null,this.view=null}get _defaultHiddenFields(){return T(this.layer)}get _effectiveTableTemplate(){return this.tableTemplateOverride||this.tableTemplate}get _effectiveAttributeTableTemplate(){return this.attributeTableTemplate||this.layer?.attributeTableTemplate}get _highlightableLayerView(){const e=this.layerView;return j(e)?e:null}get _selectionManager(){const{view:e}=this;return!e||e.destroyed?null:e.selectionManager?.sources?.length?e.selectionManager:null}get _selectableLayer(){const{layer:e}=this;if(S(e)||w(e)){const t=e;return this._selectionManager?.sources?.includes(t)?t:null}return null}get _subtypes(){return _(this.layer)}get _tableHighlightsReady(){return!("table"!==this.selectionSource||!this.highlightEnabled||!this._highlightableLayerView)}get _viewSelection(){const{_selectableLayer:e}=this;return e?this._selectionManager?.getSelection(e)??[]:[]}get _viewSelectionReady(){return!(!this.layer||"view"!==this.selectionSource||!this._selectionManager)}get activeFilters(){const{filterGeometry:e,objectIds:t,filterBySelectionEnabled:s,highlightIds:l}=this,o=new i;return e&&o.push({type:"geometry",geometry:e}),s?o.push({type:"selection",objectIds:l.toArray()}):t.length&&o.push({type:"objectId",objectIds:t.toArray()}),o}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 allRelatedTablesVisible(){return!!(this.relatedRecordsEnabled&&this.relatedTables.length&&this.showAllRelatedTables)}get attachmentsEnabled(){return this.store.attachmentsEnabled}set attachmentsEnabled(e){this.store.attachmentsEnabled=e}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 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 hiddenFields(){return this._get("hiddenFields")??new i}set hiddenFields(e){this._set("hiddenFields",s(e,this._get("hiddenFields"),i))}get initialSize(){return this.store.initialSize}set initialSize(e){this.store.initialSize=e}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._highlights.removeAll(),this.drainRelatedTables(),this._set("layer",e)}get layerView(){return this.store.layerView}get outFields(){return this.store.outFields}set outFields(e){this.store.outFields=e}get relatedRecordsEnabled(){return this.store.relatedRecordsEnabled}set relatedRecordsEnabled(e){this.store.relatedRecordsEnabled=e}get relatedTable(){return this.relatedTables.at(-1)}get relationship(){const e=this.relationshipConfig?.relationshipId;return null==e?null:this.relationships?.find((({id:t})=>t===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,l=this.store.relationshipInfos;if(l.length||!q(e)||!i?.length)return l;const o=[],n=s?.layers||t||[];return i.forEach((t=>{const i=Q(e,n,t);i&&(i.load(),o.push({layer:e,relatedLayer:i,relationshipId:t.id}))})),o}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 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 supportsAttachments(){return this.store.supportsAttachments}get supportsAddAttachments(){const{store:{supportsAddingAttachments:e,supportsEditing:t}}=this;return this.editingEnabled&&t&&e}get supportsDeleteAttachments(){const{store:{supportsDeletingAttachments:e,supportsEditing:t}}=this;return this.editingEnabled&&t&&e}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._get("timeZone")}set timeZone(e){this.allColumns.forEach((t=>t.tableTimeZone=e)),this._set("timeZone",e)}get view(){return this.store.view}set view(e){this.store.view=e,this.fieldColumns.forEach((t=>t.view=e)),this.refreshCellContent()}async addAttachment(e,t){const{attachmentsViewOptions:i,store:s}=this,l=i.objectId===e;await s.addAttachment(e,t).catch((e=>{l&&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)})),l&&!i.error&&(i.onEditComplete(),i.attachmentInfos=await s.getAttachmentsByObjectId(e,!0)),this.refreshCellContent()}async deleteAttachments(e,t){const{attachmentsViewOptions:i,store:s}=this,l=i.objectId===e;await s.deleteAttachments(e,t).catch((e=>{l&&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)})),l&&!i.error&&(i.onEditComplete(),i.attachmentInfos=await s.getAttachmentsByObjectId(e,!0)),this.refreshCellContent()}collapseRelatedTable(e,t){const{relatedLayer:s,objectId:l,relationshipId:o}=t,{objectIdField:n}=s,r=K(s,o),a=s.displayField||r?.keyField||n;e.set({highlightIds:new i([l]),multipleSelectionEnabled:!1,tableTemplateOverride:this._getTableTemplateForRelatedTableView(e,a,o)});const h=e.hiddenFields;h.includes(J.action)||h.add(J.action),h.includes(J.attachments)||h.add(J.attachments),e.scrollLeft()}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 downloadAttachmentById(e,t){const i=(await this.store.getAttachmentsByObjectId(e,!0)).find((e=>e.id===t));G(i)}drainRelatedTables(){this.relatedTables.drain((e=>e.destroy())),this.set({multipleSelectionEnabled:!0,relationshipColumnConfigs:null,showAllRelatedTables:!1,tableTemplateOverride:null}),this.hiddenFields.removeMany([J.action,J.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."):(l(r.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()))}getObjectIdIndex(e){return this.store.getItemIndexByObjectId(e)}getValue(e,t){const i=this.store.getItemByObjectId(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(J.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(){return this.relatedTables.forEach((async e=>await e.refresh())),d(this._debounceRefresh())}refreshCellContent(){this.grid?.requestContentUpdate()}refreshPageCache(){this.grid?.refreshPageCache()}async reset(){this.goToPage(0),await(this.grid?.reset())}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:s,layer:l}=this;if(!this.attachmentsEnabled||!l)return void this._logWarning("The 'attachmentsEnabled' property is currently false.");await l.load();const o=this._getDefaultLayerDisplayField(l),n=await this.store.getAttachmentsByObjectId(e,!0),r=this.store.getItemIndexByObjectId(e);t.set({attachmentInfos:n,mode:n.length?"list":"file",objectId:e}),this.set({highlightIds:new i([e]),multipleSelectionEnabled:!1,relationshipColumnConfigs:[],tableTemplateOverride:this._getTableTemplateForAttachmentsView(o)}),s.includes(J.action)||s.add(J.action),null!=r&&this.scrollToIndex(r)}syncAttributeTableTemplate(){this._syncAttributeTableTemplate(!0)}clearSelectionFilter(){l(r.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:l}=this,n=s.objectId===e;await l.updateAttachment(e,t,i).catch((e=>{n&&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)})),n&&!s.error&&(s.onEditComplete(),s.attachmentInfos=await l.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 l=await e.queryFeatures(s);try{await le(t,l.features)}catch(o){"AbortError"!==o.name&&console.error(o)}}_syncAttributeTableTemplate(e=!1){const{_effectiveAttributeTableTemplate:t,layer:i,tableTemplateOverride:s,syncTemplateOnChangesEnabled:l}=this;if(!i||!t||!l&&!e||s||this.tableParent||this.relatedTable||null!==this.attachmentsViewOptions.objectId)return;const{activeSortOrders:o,allColumns:n,columns:r}=this,a=[],h=se(r.toArray());o.forEach((({fieldName:e,direction:t})=>{e&&t&&a.push(new E({field:e,order:t}))})),n.forEach((({fieldName:e,direction:t})=>{t&&!a.some((t=>t.field===e))&&a.push(new E({field:e,order:t}))})),t.elements=h,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&&C(e.parent)&&await e.parent.loadAll();const i=e.capabilities.query?.maxRecordCount,s=i&&i<t,l=s?i:t;s&&(this._logWarning("The value for 'pageSize' has been adjusted due to the provided layer's max record count."),this.pageSize=l),this.grid?.set("pageSize",l),this.store.load(),this._generateColumns()}_onLayerRefresh(e){this.autoRefreshEnabled&&e.dataChanged&&this.refresh()}_generateColumns(){this._drainColumns();const{_effectiveTableTemplate:e,_effectiveAttributeTableTemplate:t}=this,i=e?.columnTemplates,s=this._generateColumnsFromColumnTemplates(i)??this._generateColumnsFromAttributeTableTemplate(t)??this._generateDefaultFieldColumns();s.length&&(this.attachmentsEnabled&&!s.some((e=>B(e)))&&s.push(this._generateDefaultAttachmentsColumn()),this.relatedRecordsEnabled&&this.relationshipInfos.length&&!s.some((e=>Z(e)))&&s.push(...this._generateDefaultRelationshipColumns()),this.actionColumnConfig&&s.push(this._generateActionColumn()),s.sort(((e,t)=>e.frozen&&t.frozen||e.frozenToEnd&&t.frozenToEnd?0:e.frozen||t.frozenToEnd?-1:0)),this.columns.addMany(s))}_generateColumnsFromAttributeTableTemplate(e){const{layer:i}=this;if(!e||!i)return null;const{elements:s,orderByFields:l}=e,o=I(i),n=[];n.push(...this._generateColumnsFromAttributeTableElements(s,l));const r=o.map((e=>{if(!e.fieldName||X(e.fieldName,n))return null;const{fieldName:t}=e,s=Y(i,t);return s?this._generateDefaultFieldColumn(s,{hidden:!0,orderByFields:l}):(this._logTemplateWarning("A valid 'field' could not be found for the provided template."),null)})).filter(t);return n.push(...r),this.attachmentsEnabled&&ee(i)&&!n.some((e=>B(e)))&&n.push(this._generateDefaultAttachmentsColumn({hidden:!0})),this.relatedRecordsEnabled&&q(i)&&i.relationships?.forEach((({id:e},t)=>{const i=this.relationshipInfos.find((t=>t.relationshipId===e));i&&!n.some((t=>Z(t)&&t.relationshipId===e))&&n.push(this._generateDefaultRelationshipColumn({hidden:!0,info:i,index:t}))})),n.length?n:null}_generateColumnsFromAttributeTableElements(e,t){const{layer:i}=this;return i?e?.map(((e,i)=>{switch(e.type){case"field":return this._createFieldColumnFromElement({element:e,orderByFields:t});case"group":return this._createGroupColumnFromElement({element:e,orderByFields:t});case"attachment":return this._createAttachmentColumnFromElement({element:e,index:i});case"relationship":return this._createRelationshipColumnFromElement({element:e,index:i})}})).filter((e=>!!e))??[]:[]}_createFieldColumnFromElement(e){const{layer:t}=this;if(!t)return null;const{element:i,orderByFields:s}=e,{fieldName:l}=i;if(null==l)return this._logTemplateWarning("A valid 'fieldName' must be provided."),null;const o=Y(t,l);if(!o)return this._logTemplateWarning("A valid 'field' could not be found for the provided template."),null;const{description:n,label:r}=i,a=s?.findIndex((({field:e})=>e&&e===l))??-1,h=a>-1?s?.at(a)?.order:void 0,d=a>-1?a:void 0,{editingEnabled:m,grid:c,messages:p,messagesCommon:g,messagesURIUtils:u,store:b,timeZone:f,view:y}=this;return new U({description:n,direction:h,field:o,fieldName:l,grid:c,initialSortPriority:d,label:r,layer:t,messages:p,messagesCommon:g,messagesURIUtils:u,store:b,tableEditingEnabled:m,tableTimeZone:f,view:y,onShowPromptCallback:this._onShowPromptCallback})}_createGroupColumnFromElement(e){const{element:t,orderByFields:i}=e,{description:s,label:l}=t;if(!l)return this._logTemplateWarning("Group columns require a label."),null;if(!t.elements.length)return this._logTemplateWarning("Group columns require child columns."),null;const{grid:o,messages:n,messagesCommon:r,messagesURIUtils:a,store:h,timeZone:d}=this;return new P({columns:this._generateColumnsFromAttributeTableElements(t.elements,i),description:s,grid:o,label:l,messages:n,messagesCommon:r,messagesURIUtils:a,store:h,tableTimeZone:d})}_createAttachmentColumnFromElement(e){if(!this.attachmentsEnabled)return void this._logTemplateWarning("The 'attachmentsEnabled' property is currently false.");const{element:t,index:i}=e,{description:s,label:l}=t,{grid:o,layer:n,messages:r,messagesCommon:a,messagesURIUtils:h,store:d,timeZone:m}=this;return new x({description:s,fieldName:`${J.attachments}-${i}`,grid:o,label:l,layer:n,messages:r,messagesCommon:a,messagesURIUtils:h,store:d,tableTimeZone:m,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:l,relationshipId:o}=t,n=this.relationshipInfos.find((e=>e.relationshipId===o));if(!n)return this._logTemplateWarning("Unable to find valid related layer target based on the provided relationship id."),null;const{grid:r,messages:a,messagesCommon:h,messagesURIUtils:d,store:m,timeZone:c}=this;return new O({description:s,fieldName:`${J.relationship}-${o}-${i}`,grid:r,label:l,messages:a,messagesCommon:h,messagesURIUtils:d,relationshipId:o,store:m,tableTimeZone:c,layer:n.relatedLayer,relatedLayer:n.layer,showRelatedTableCallback:e=>this._onShowRelatedTable(e)})}_generateColumnsFromColumnTemplates(e){const{editingEnabled:t,grid:i,layer:s,messages:l,messagesCommon:o,messagesURIUtils:n,store:r,timeZone:a,view:h}=this;if(!e?.length||!s)return null;const d=[];return e.forEach(((e,m)=>{const{autoWidth:c,description:p,direction:g,flexGrow:u,fieldName:b,formatFunction:f,frozen:y,frozenToEnd:T,icon:w,iconText:_,initialSortPriority:C,invalid:I,label:v,menuConfig:E,resizable:A,sortable:F,textAlign:j,textWrap:S,timeZone:R,type:x,width:O}=e;if(!x)return void this._logTemplateWarning("Property 'type' is missing from the provided template.");if(y&&T)return void this._logTemplateWarning("Properties 'frozen' and 'frozenToEnd' cannot both be true for the same column.");const W=!1===e.visible;if("group"===x){if(!e.columnTemplates?.length)return void this._logTemplateWarning("Group columns must contain column templates.");if(!e.label)return void this._logTemplateWarning("Group columns require a label.");const t=this._generateColumnsFromColumnTemplates(e.columnTemplates),s=W||this._isFieldHidden(e.label);d.push(new P({autoWidth:c,columns:t,description:p,flexGrow:u,frozen:y,frozenToEnd:T,grid:i,hidden:s,icon:w,iconText:_,invalid:I,label:v,menuConfig:E,messages:l,messagesCommon:o,messagesURIUtils:n,resizable:A,tableTimeZone:a,textAlign:j,textWrap:S,timeZone:R,width:O}))}else if("attachment"===x){if(!this.attachmentsEnabled)return void this._logTemplateWarning("Attachment columns require attachments to be enabled on the table.");d.push(this._generateAttachmentsColumnFromTemplate(e,m))}else if("relationship"===x){if(!this.relatedRecordsEnabled)return void this._logTemplateWarning("Relationship columns require related records to be enabled on the table.");const{relationshipId:t}=e;if(null==t)return void this._logTemplateWarning("Property 'relationshipId' is missing from the provided template.");const i=this.relationshipInfos.find((e=>e.relationshipId===t));if(!i)return void this._logTemplateWarning("Unable to find valid related layer target based on the provided relationship id.");d.push(this._generateRelationshipColumnFromTemplate(i,e,m))}else if(!b)return void this._logTemplateWarning("Value for 'fieldName' property was missing from the provided template.");const z=W||this._isFieldHidden(b);if("column"===x)d.push(new V({autoWidth:c,description:p,direction:g,fieldName:b,flexGrow:u,formatFunction:f,frozen:y,frozenToEnd:T,grid:i,hidden:z,icon:w,iconText:_,initialSortPriority:C,invalid:I,label:v,menuConfig:E,messages:l,messagesCommon:o,messagesURIUtils:n,resizable:A,sortable:F,tableTimeZone:a,textAlign:j,textWrap:S,timeZone:R,width:O}));else if("field"===x){const m=Y(s,e.fieldName);if(!m)return void this._logTemplateWarning("A valid 'field' could not be found for the provided template.");const{editable:b,required:x}=e;d.push(new U({autoWidth:c,description:p,direction:g,editable:b,field:m,fieldName:m.name,flexGrow:u,formatFunction:f,frozen:y,frozenToEnd:T,grid:i,hidden:z,icon:w,iconText:_,initialSortPriority:C,invalid:I,label:v,layer:s,messages:l,messagesCommon:o,messagesURIUtils:n,menuConfig:E,required:x,resizable:A,sortable:F,store:r,tableEditingEnabled:t,tableTimeZone:a,template:e,textAlign:j,textWrap:S,timeZone:R,width:O,view:h,onShowPromptCallback:this._onShowPromptCallback}))}})),d.length?d:null}_generateDefaultFieldColumns(){return this.layer?.fields?.map((e=>this._generateDefaultFieldColumn(e))).filter(t)??[]}_generateDefaultFieldColumn(e,t){const{editingEnabled:i,grid:s,layer:l,messages:o,messagesCommon:n,messagesURIUtils:r,store:a,timeZone:h,view:d}=this,m=t?.orderByFields;if(!e.visible||"geometry"===e.type)return null;const c=e.name,p=m?.findIndex((({field:e})=>e&&e===c))??-1,g=p>-1?m?.at(p)?.order:void 0,u=p>-1?p:void 0;return new U({direction:g,field:e,fieldName:c,grid:s,hidden:t?.hidden||this._isFieldHidden(c),initialSortPriority:u,layer:l,messages:o,messagesCommon:n,messagesURIUtils:r,store:a,tableEditingEnabled:i,tableTimeZone:h,view:d,onShowPromptCallback:this._onShowPromptCallback})}_generateAttachmentsColumnFromTemplate(e,t){const{grid:i,layer:s,messages:l,messagesCommon:o,messagesURIUtils:n,store:r,timeZone:a}=this,{attachmentsViewEnabled:h,autoWidth:d,description:m,flexGrow:c,fieldName:p,formatFunction:g,frozen:u,frozenToEnd:b,icon:f,iconText:y,invalid:T,label:w,menuConfig:_,resizable:C,textAlign:I,textWrap:v,thumbnailAppearance:E,thumbnailCount:A,thumbnailIconScale:F,thumbnailsEnabled:j,timeZone:S,width:R}=e;return new x({attachmentsViewEnabled:h,autoWidth:d,description:m,fieldName:`${J.attachments}-${t}`,flexGrow:c,formatFunction:g,frozen:u,frozenToEnd:b,grid:i,hidden:!1===e.visible||this._isFieldHidden(w)||this._isFieldHidden(p),icon:f,iconText:y,invalid:T,label:w,layer:s,menuConfig:_,messages:l,messagesCommon:o,messagesURIUtils:n,resizable:C,store:r,tableTimeZone:a,textAlign:I,textWrap:v,thumbnailAppearance:E,thumbnailCount:A,thumbnailIconScale:F,thumbnailsEnabled:j,timeZone:S,width:R,onShowAttachments:e=>this._onShowAttachments(e)})}_generateDefaultAttachmentsColumn(e){const{grid:t,layer:i,messages:s,messagesCommon:l,messagesURIUtils:o,store:n,timeZone:r}=this,a=J.attachments;return new x({fieldName:a,grid:t,hidden:e?.hidden||this._isFieldHidden(a),layer:i,messages:s,messagesCommon:l,messagesURIUtils:o,store:n,tableTimeZone:r,onShowAttachments:e=>this._onShowAttachments(e)})}_generateRelationshipColumnFromTemplate(e,t,i){const{grid:s,messages:l,messagesCommon:o,messagesURIUtils:n,store:r,timeZone:a}=this,{autoWidth:h,collapsed:d,description:m,flexGrow:c,fieldName:p,formatFunction:g,frozen:u,frozenToEnd:b,icon:f,iconText:y,invalid:T,label:w,menuConfig:_,relationshipId:C,resizable:I,textAlign:v,textWrap:E,timeZone:A,width:F}=t;return new O({autoWidth:h,collapsed:d,description:m,fieldName:`${J.relationship}-${C}-${i}`,flexGrow:c,formatFunction:g,frozen:u,frozenToEnd:b,grid:s,hidden:!1===t.visible||this._isFieldHidden(w)||this._isFieldHidden(p),icon:f,iconText:y,invalid:T,label:w,menuConfig:_,messages:l,messagesCommon:o,messagesURIUtils:n,relationshipId:C,resizable:I,store:r,tableTimeZone:a,textAlign:v,textWrap:E,timeZone:A,width:F,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:l}=t,o=e.find((e=>e.relationshipId===l));o&&i.push(this._generateDefaultRelationshipColumn({config:t,index:s,info:o}))})):e.forEach(((e,t)=>i.push(this._generateDefaultRelationshipColumn({index:t,info:e})))),i):i}_generateDefaultRelationshipColumn(e){const{config:t,hidden:i,index:s,info:l}=e,{grid:o,messages:n,messagesCommon:r,messagesURIUtils:a}=this,{relationshipId:h}=l;return new O({...t,fieldName:`${J.relationship}-${h}-${s}`,grid:o,hidden:i,messages:n,messagesCommon:r,messagesURIUtils:a,layer:l.relatedLayer,relatedLayer:l.layer,relationshipId:h,showRelatedTableCallback:e=>this._onShowRelatedTable(e)})}_generateActionColumn(){return new R({hidden:this._isFieldHidden(J.action),...this.actionColumnConfig})}_isFieldHidden(e){const t=e?.toLowerCase();return(this.hiddenFields??this._defaultHiddenFields).some((e=>e.toLowerCase()===t))}_addTableHighlight(e){if(!this.highlightEnabled)return;const{_highlightableLayerView:t,layer:i}=this;if(t&&i){const s=this.store.getItemByObjectId(e),l=s?.feature??e;this._highlights.add(t.highlight(l,{name:A}),te(i,e))}}_removeTableHighlight(e){const{layer:t}=this;t&&this._highlights.remove(te(t,e))}async _syncTemporaryHighlight(e,t){if(!this.highlightEnabled)return this._currentTemporaryHighlight?.handle.remove(),void(this._currentTemporaryHighlight=null);if(await m(25),c(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:l,highlightEnabled:o}=this;e&&s&&l&&o&&(this._currentTemporaryHighlight={id:e,handle:s.highlight(e,{name:F})})}_syncSelection(){this._highlights.removeAll(),this._tableHighlightsReady?this.highlightIds.forEach((e=>this._addTableHighlight(e))):this._viewSelectionReady&&(this.highlightIds.items=this._viewSelection)}_appendToViewSelection(e){const{_selectableLayer:t}=this;t&&this._selectionManager?.appendToSelection(t,e)}_removeFromViewSelection(e){const{_selectableLayer:t}=this;t&&this._selectionManager?.removeFromSelection(t,e)}async _onHighlightIdsChange(e){const{added:t,removed:i}=e,{attachmentsViewOptions:s}=this;if(this._tableHighlightsReady?(i.forEach((e=>this._removeTableHighlight(e))),t.forEach((e=>this._addTableHighlight(e)))):this._viewSelectionReady&&(this._removeFromViewSelection(i),this._appendToViewSelection(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"})}}}_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(J.action)||s.add(J.action),s.includes(J.attachments)||s.add(J.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:ie(t,i.id),showAllRelatedTables:!1,tableTemplateOverride:null}),e.hiddenFields.removeMany([J.action,J.attachments])}_getTableTemplateForRelatedTableView(e,t,i){return new $({columnTemplates:[new D({fieldName:t,editable:!1,menuConfig:{selectionMode:"single",icon:"chevron-down",items:this._extractFieldColumnInfosFromTableTemplate(e.viewModel).map((([s,l])=>({selected:s===t,label:l||s,clickFunction:()=>{e.tableTemplateOverride=this._getTableTemplateForRelatedTableView(e,s,i)}})))},resizable:!1}),new M({autoWidth:!1,collapsed:!0,flexGrow:0,label:"",resizable:!1,relationshipId:i,width:he})]})}_getTableTemplateForShowAllTablesView(e,t){const i=[new D({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 L({attachmentsViewEnabled:!1,autoWidth:!1,flexGrow:0,label:"",resizable:!1,thumbnailsEnabled:!1,width:he})),new $({columnTemplates:i})}async _onShowPromptCallback(e){const{column:t,objectId:i,oldValue:s,value:l}=e,{_subtypes:o,layer:n}=this;if(!n||!o.length)return void t.cancel();const r=o.find((e=>e.code===l));if(!r)return void t.cancel();const a=p(),h=this._createSubtypeEditPrompt(s,r,a),d=!!n.parent;try{this.showPrompt(h);const e=await a.promise,s=[{fieldName:t.fieldName,value:l}];switch(e){case"update-fields":for(const[e,t]of Object.entries(r.defaultValues))null!=t&&s.push({fieldName:e,value:t});await t.updateItems({objectId:i,updates:s}),d&&this.refresh();break;case"keep-existing":await t.updateItems({objectId:i,updates:s}),d&&this.refresh();break;case"undo":t.cancel()}}finally{this.clearPrompt()}}_createSubtypeEditPrompt(e,t,i){const{_subtypes:s,messages:l,messagesCommon:o}=this,n=s.find((t=>t.code===e))?.name??`${e}`;let r="update-fields";const a=[{label:l.subtypes.useDefaultValuesOption,value:"update-fields"},{label:l.subtypes.keepCurrentValuesOption,value:"keep-existing"}];return{context:"info",title:l.subtypes.changeWarningTitle,message:re(l.subtypes.changeWarning,{originalType:n,newType:t.name}),radios:a,defaultRadioSelection:"update-fields",onRadioSelection:e=>{r=e},actions:{primary:{label:o.apply,action:()=>i.resolve(r),type:"positive"},secondary:{label:o.cancel,type:"neutral",action:()=>i.resolve("undo")}},cancel:()=>i.reject()}}_onShowAttachments({objectId:e}){this.attachmentsViewOptions.objectId=e}_getTableTemplateForAttachmentsView(e){return new $({columnTemplates:[new D({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 L({attachmentsViewEnabled:!1,autoWidth:!1,flexGrow:0,label:"",resizable:!1,thumbnailsEnabled:!1,width:he})]})}_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})=>[e,t])):i?.fields.map((e=>[e.name,e.alias]))??[]}_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?r.getLogger(this).warnOnce(e):r.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([f()],de.prototype,"_defaultHiddenFields",null),e([f()],de.prototype,"_effectiveTableTemplate",null),e([f()],de.prototype,"_effectiveAttributeTableTemplate",null),e([f()],de.prototype,"_highlights",void 0),e([f()],de.prototype,"_highlightableLayerView",null),e([f()],de.prototype,"_selectionManager",null),e([f()],de.prototype,"_selectableLayer",null),e([f()],de.prototype,"_subtypes",null),e([f()],de.prototype,"_tableHighlightsReady",null),e([f()],de.prototype,"_viewSelection",null),e([f()],de.prototype,"_viewSelectionReady",null),e([f()],de.prototype,"activeFilters",null),e([f({readOnly:!0})],de.prototype,"activeSortOrders",null),e([f()],de.prototype,"allRelatedTablesVisible",null),e([f()],de.prototype,"attachmentsEnabled",null),e([f()],de.prototype,"attachmentsViewOptions",void 0),e([f({type:v})],de.prototype,"attributeTableTemplate",void 0),e([f()],de.prototype,"autoRefreshEnabled",void 0),e([f()],de.prototype,"clearPrompt",null),e([f({readOnly:!0})],de.prototype,"columns",void 0),e([f()],de.prototype,"dataProvider",void 0),e([f()],de.prototype,"definitionExpression",null),e([f()],de.prototype,"filterGeometry",null),e([f()],de.prototype,"filterBySelectionEnabled",null),e([f({readOnly:!0})],de.prototype,"grid",void 0),e([f()],de.prototype,"hiddenFields",null),e([f()],de.prototype,"highlightEnabled",void 0),e([f()],de.prototype,"initialSize",null),e([f()],de.prototype,"isQueryingOrSyncing",null),e([f()],de.prototype,"isSyncingAttachments",null),e([f()],de.prototype,"layer",null),e([f()],de.prototype,"layers",void 0),e([f()],de.prototype,"layerView",null),e([f()],de.prototype,"messages",void 0),e([f(),oe("esri/t9n/common")],de.prototype,"messagesCommon",void 0),e([f(),oe("esri/core/t9n/Units")],de.prototype,"messagesUnits",void 0),e([f(),oe("esri/widgets/support/t9n/uriUtils")],de.prototype,"messagesURIUtils",void 0),e([f()],de.prototype,"outFields",null),e([f()],de.prototype,"prompt",void 0),e([f()],de.prototype,"relatedRecordsEnabled",null),e([f()],de.prototype,"relatedTable",null),e([f()],de.prototype,"relatedTables",void 0),e([f()],de.prototype,"relationship",null),e([f()],de.prototype,"relationshipColumnConfigs",void 0),e([f()],de.prototype,"relationshipConfig",null),e([f()],de.prototype,"relationshipInfos",null),e([f()],de.prototype,"relationships",null),e([f()],de.prototype,"returnGeometryEnabled",null),e([f()],de.prototype,"returnMEnabled",null),e([f()],de.prototype,"returnZEnabled",null),e([f()],de.prototype,"selectionSource",void 0),e([f()],de.prototype,"showAllRelatedTables",null),e([f()],de.prototype,"showPrompt",null),e([f()],de.prototype,"showRelatedTableCallback",void 0),e([f({readOnly:!0,type:N})],de.prototype,"store",void 0),e([f()],de.prototype,"supportsAttachments",null),e([f()],de.prototype,"supportsAddAttachments",null),e([f()],de.prototype,"supportsDeleteAttachments",null),e([f()],de.prototype,"supportsResizeAttachments",null),e([f()],de.prototype,"supportsUpdateAttachments",null),e([f()],de.prototype,"syncTemplateOnChangesEnabled",void 0),e([f()],de.prototype,"tableController",void 0),e([f()],de.prototype,"tableParent",void 0),e([f({type:$})],de.prototype,"tableTemplate",void 0),e([f()],de.prototype,"tableTemplateOverride",void 0),e([f()],de.prototype,"timeExtent",null),e([f()],de.prototype,"timeZone",null),e([f()],de.prototype,"view",null),de=e([y("esri.widgets.FeatureTable.FeatureTableViewModel")],de);const me=de;export{me as default};
|
package/widgets/FeatureTable.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../chunks/tslib.es6.js";import"../intl.js";import{isSome as t}from"../core/arrayUtils.js";import{watch as i,on as l,sync as o,initial as n}from"../core/reactiveUtils.js";import{formatFileSize as s}from"../core/unitFormatUtils.js";import{property as a}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/Logger.js";import{subclass as r}from"../core/accessorSupport/decorators/subclass.js";import{isLayerFromCatalog as c}from"../layers/catalog/catalogUtils.js";import{isKnowledgeGraphLayer as d,isMapImageLayer as h,isSubtypeGroupLayer as p}from"../layers/support/layerUtils.js";import m from"../tables/AttributeTableTemplate.js";import u from"./Widget.js";import{isSupportedImage as g,getCalciteIconForAttachment as b}from"./Attachments/support/attachmentUtils.js";import{loadPromptComponents as w,Prompt as v}from"./Editor/components/Prompt.js";import y from"./FeatureTable/ColumnMenuVisibleElements.js";import f from"./FeatureTable/FeatureTableViewModel.js";import _ from"./FeatureTable/VisibleElements.js";import{isGroupColumn as M}from"./FeatureTable/support/columnUtils.js";import{loadFieldColumnComponents as C,isIFeatureTableSupportedLayer as A,isIFeatureTableSupportedLayerWithAttachments as S,getRelationshipIdsToShow as T}from"./FeatureTable/support/tableUtils.js";import{loadCalciteComponents as E}from"./support/componentsUtils.js";import{globalCss as I}from"./support/globalCss.js";import{getIconForLayer as V}from"./support/iconUtils.js";import{renderingSanitizer as R,storeNode as x,discardNode as k}from"./support/widgetUtils.js";import{messageBundle as D}from"./support/decorators/messageBundle.js";import{vmEvent as P}from"./support/decorators/vmEvent.js";import{tsx as O}from"./support/jsxFactory.js";import{substitute as F}from"../intl/substitute.js";var j;const L="esri-feature-table",z=`${L}__attachments-view`,$={base:L,content:`${L}__content`,menuPopover:`${L}__menu-popover`,layerDropdownMenu:`${L}__layer-switcher-menu`,tableContainer:`${L}__table-container`,tableContainerWithAttachments:`${L}__table-container--attachments`,tableNavigation:`${L}__table-navigation`,attachmentsView:z,attachmentsViewContent:`${z}__content`,attachmentsViewDropArea:`${z}__drop-area`,attachmentsViewIcon:`${z}__icon`,attachmentsViewInformation:`${z}__information`,attachmentsViewList:`${z}__list`,attachmentsViewListFileSize:`${z}__list__filesize`,attachmentsViewListItemDelete:`${z}__list-item--delete`,attachmentsViewListThumbnail:`${z}__list__thumbnail`,expanded:`${L}__expanded`,collapsed:`${L}__collapsed`},U={chevronRight:"chevron-right",clearSelection:"clear-selection",downloadTo:"download-to",exclamationMarkTriangle:"exclamation-mark-triangle",exportToCSV:"file-csv",folderOpen:"folder-open",delete:"trash",launch:"launch",layers:"layers",moveUp:"move-up",plus:"plus",refresh:"refresh",replaceImage:"replace-image",save:"save",showAll:"selection-x",showColumn:"show-column",showSelected:"selection-filter",upload:"upload",zoomToSelection:"zoom-to-object"};let B=j=class extends u{constructor(e,t){super(e,t),this._attachmentsInput=null,this._columnVisibilityActions=new Map,this.attachmentsList=null,this.description=null,this.disabled=!1,this.menuConfig=null,this.title=null,this.viewModel=new f,this.visibleElements=new _,this._showDeletePrompt=this._showDeletePrompt.bind(this),this._onDeleteSelectionClick=this._onDeleteSelectionClick.bind(this)}initialize(){this.addHandles([i((()=>[this.isQueryingOrSyncing,this.editingEnabled]),(()=>this.scheduleRender())),i((()=>[this._effectiveVisibleElements,this._effectiveVisibleElements.columnDescriptions,this._effectiveVisibleElements.columnMenus,this._effectiveVisibleElements.columnMenuItems,this.columns.length]),(()=>{this.columns.forEach((e=>e.visibleElements=this._effectiveVisibleElements)),this.refreshCellContent()}),o),i((()=>this._effectiveVisibleElements.selectionColumn),(e=>{this.grid&&(this.grid.selectionColumnEnabled=e)}),n),l((()=>this.viewModel),"show-related-table",(e=>this._onShowRelatedTable(e))),i((()=>this.editingEnabled),(()=>{const{attachmentsViewOptions:e}=this;this.clearPrompt(),e&&(e.form?.reset(),e.candidates=null)}))])}loadDependencies(){return Promise.all([E({action:()=>import("@esri/calcite-components/dist/components/calcite-action"),alert:()=>import("@esri/calcite-components/dist/components/calcite-alert"),button:()=>import("@esri/calcite-components/dist/components/calcite-button"),chip:()=>import("@esri/calcite-components/dist/components/calcite-chip"),dropdown:()=>import("@esri/calcite-components/dist/components/calcite-dropdown"),"dropdown-group":()=>import("@esri/calcite-components/dist/components/calcite-dropdown-group"),"dropdown-item":()=>import("@esri/calcite-components/dist/components/calcite-dropdown-item"),icon:()=>import("@esri/calcite-components/dist/components/calcite-icon"),label:()=>import("@esri/calcite-components/dist/components/calcite-label"),list:()=>import("@esri/calcite-components/dist/components/calcite-list"),"list-item":()=>import("@esri/calcite-components/dist/components/calcite-list-item"),pagination:()=>import("@esri/calcite-components/dist/components/calcite-pagination"),panel:()=>import("@esri/calcite-components/dist/components/calcite-panel"),popover:()=>import("@esri/calcite-components/dist/components/calcite-popover"),progress:()=>import("@esri/calcite-components/dist/components/calcite-progress"),switch:()=>import("@esri/calcite-components/dist/components/calcite-switch"),tooltip:()=>import("@esri/calcite-components/dist/components/calcite-tooltip")}),w(),C()])}destroy(){this.drainRelatedTables(),this.clearPrompt()}get _effectiveDescription(){const{description:e}=this;return null!=e?R.sanitize("function"==typeof e?e():e):void 0}get _effectiveLayers(){const{layer:e,layers:t}=this,i=t?.length?t.filter(A):[],l=i.length?i:[...this._viewLayers];return e&&!l.includes(e)&&l.push(e),l}get _effectiveTitle(){const{layer:e,messages:t,state:i,highlightIds:l,title:o,size:n}=this;if(o)return R.sanitize("function"==typeof o?o():o);if(!e)return t.noLayer;switch(i){case"disabled":return t.errorLayer;case"ready":case"loading":return t.loading;case"error":return t.errorData}return F(t.header,{title:R.sanitize(e.title),count:n,selected:l.length})}get _effectiveVisibleElements(){return this.visibleElementsOverride??this.visibleElements}get _filteredTables(){const e=this.relatedTables.toArray(),t=1===e.length;return this.allRelatedTablesVisible?e:t?[e[0]]:this._shouldShowAttachmentsView?e.slice(-1):e.slice(-2)}get _hasAttachmentsViewError(){return null!=this.attachmentsViewOptions.error}get _hasCustomMenuItems(){return!!this.menuConfig?.items?.length}get _hasDefaultMenuItems(){return!!(this._showClearSelectionAction||this._showDeleteSelectionAction||this._showExportSelectionToCSVAction||this._showRefreshDataAction||this._showZoomToSelectionAction||this._showSelectedRecordsShowSelectedAction||this._showSelectedRecordsShowAllAction||this._showColumnsVisibilityAction)}get _shouldShowGrid(){return this.allRelatedTablesVisible||1===this.relatedTables.length&&!this._shouldShowAttachmentsView}get _shouldShowMenu(){const{header:e,menu:t}=this._effectiveVisibleElements;return!(!e||!t||!this._hasDefaultMenuItems&&!this._hasCustomMenuItems)}get _shouldShowAttachmentsView(){return!(null==this.attachmentsViewOptions.objectId&&!this.relatedTables.some((e=>null!=e.attachmentsViewOptions.objectId)))}get _showClearSelectionAction(){return!(!this.highlightIds.length||!this._effectiveVisibleElements.menuItems?.clearSelection||this.relatedTables.length)}get _showColumnsVisibilityAction(){const{header:e,menu:t,menuItems:i}=this._effectiveVisibleElements;return!(!(e&&t&&i?.toggleColumns)||this.showRelatedTableCallback||this.allRelatedTablesVisible||this._shouldShowAttachmentsView)}get _showDeleteSelectionAction(){return!(!(this.editingEnabled&&this.highlightIds.length&&this._effectiveVisibleElements.menuItems?.deleteSelection&&this.layer?.capabilities?.operations?.supportsDelete)||this.relatedTables.length)}get _showExportSelectionToCSVAction(){return!(!(this._effectiveVisibleElements.menuItems.exportSelectionToCSV&&this.layer&&this.highlightIds.length)||this.relatedTables.length)}get _showLayerDropdown(){return!(!this._effectiveLayers.length||!this._effectiveVisibleElements.layerDropdown)}get _shouldShowNavigationBar(){const e=!!this.relatedTable||this._shouldShowAttachmentsView;return!this.tableParent&&e}get _showRefreshDataAction(){return!!this._effectiveVisibleElements.menuItems?.refreshData}get _showSelectedRecordsShowSelectedAction(){const e=this.objectIds.length,t=this.highlightIds.length;return!(!t||!this._effectiveVisibleElements.menuItems?.selectedRecordsShowSelectedToggle||e&&t===e||this.relatedTables.length)}get _showSelectedRecordsShowAllAction(){return!(!this._effectiveVisibleElements.menuItems?.selectedRecordsShowAllToggle||!this.objectIds.length||this.relatedTables.length)}get _showZoomToSelectionAction(){return!(!this.view||!this.highlightIds.length||this.effectiveTable.layer?.isTable||!this._effectiveVisibleElements.menuItems?.zoomToSelection)}get _viewLayers(){const e=this.view?.map;if(!e)return[];const t=new Set,i=e=>{!A(e)||p(e)||t.has(e)||(e.load(),t.add(e))},l=e=>{c(e)||"catalog-footprint"===e.type||(d(e)?(e.load(),e.layers?.forEach(i),e.tables?.forEach(i)):h(e)?(e.loadAll(),e.sublayers?.forEach(i),e.subtables?.forEach(i)):p(e)?(e.loadAll(),e.sublayers?.forEach(i)):i(e))};return e.allLayers.forEach(l),e.allTables.forEach(l),[...t.values()]}get grid(){return this.viewModel.grid}get actionColumn(){return this.viewModel.actionColumn}get actionColumnConfig(){return this.viewModel.actionColumnConfig}set actionColumnConfig(e){this.viewModel.actionColumnConfig=e}get activeFilters(){return this.viewModel.activeFilters}get activeSortOrders(){return this.viewModel.activeSortOrders}get allColumns(){return this.viewModel.allColumns}get allRelatedTablesVisible(){return this.viewModel.allRelatedTablesVisible}get allVisibleColumns(){return this.viewModel.allVisibleColumns}get attachmentsEnabled(){return this.viewModel.attachmentsEnabled}set attachmentsEnabled(e){this.viewModel.attachmentsEnabled=e}get attachmentsViewOptions(){return this.viewModel.attachmentsViewOptions}set attachmentsViewOptions(e){this.viewModel.attachmentsViewOptions=e}get attributeTableTemplate(){return this.viewModel.attributeTableTemplate}set attributeTableTemplate(e){this.viewModel.attributeTableTemplate=e}get autoRefreshEnabled(){return this.viewModel.autoRefreshEnabled}set autoRefreshEnabled(e){this.viewModel.autoRefreshEnabled=e}get clearPrompt(){return this.viewModel.clearPrompt}set clearPrompt(e){this.viewModel.clearPrompt=e}get columnPerformanceModeEnabled(){return this.viewModel.columnPerformanceModeEnabled}set columnPerformanceModeEnabled(e){this.viewModel.columnPerformanceModeEnabled=e}get columnReorderingEnabled(){return this.viewModel.columnReorderingEnabled}set columnReorderingEnabled(e){this.viewModel.columnReorderingEnabled=e}get columns(){return this.viewModel.columns}get definitionExpression(){return this.viewModel.definitionExpression}set definitionExpression(e){this.viewModel.definitionExpression=e}get editingEnabled(){return this.viewModel.editingEnabled}set editingEnabled(e){this.viewModel.editingEnabled=e}get effectiveSize(){return this.viewModel.effectiveSize}get effectiveTable(){return this.relatedTable||this}get filterGeometry(){return this.viewModel.filterGeometry}set filterGeometry(e){this.viewModel.filterGeometry=e}get filterBySelectionEnabled(){return this.viewModel.filterBySelectionEnabled}set filterBySelectionEnabled(e){this.viewModel.filterBySelectionEnabled=e}get hiddenFields(){return this.viewModel.hiddenFields}set hiddenFields(e){this.viewModel.hiddenFields=e}get highlightEnabled(){return this.viewModel.highlightEnabled}set highlightEnabled(e){this.viewModel.highlightEnabled=e}get highlightIds(){return this.viewModel.highlightIds}set highlightIds(e){this.viewModel.highlightIds=e}get icon(){return"table"}set icon(e){this._overrideIfSome("icon",e)}get initialSize(){return this.viewModel.initialSize}set initialSize(e){this.viewModel.initialSize=e}get isQueryingOrSyncing(){return this.viewModel.isQueryingOrSyncing}get isSyncingAttachments(){return this.viewModel.isSyncingAttachments}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get layer(){return this.viewModel.layer}set layer(e){this.viewModel.layer=e}get layers(){return this.viewModel.layers}set layers(e){this.viewModel.layers=e}get layerView(){return this.viewModel.layerView}get maxSize(){return this.viewModel.maxSize}set maxSize(e){this.viewModel.maxSize=e}get messages(){return this.viewModel.messages}set messages(e){this.viewModel.messages=e}get messagesCommon(){return this.viewModel.messagesCommon}set messagesCommon(e){this.viewModel.messagesCommon=e}get messagesUnits(){return this.viewModel.messagesUnits}set messagesUnits(e){this.viewModel.messagesUnits=e}get messagesURIUtils(){return this.viewModel.messagesURIUtils}set messagesURIUtils(e){this.viewModel.messagesURIUtils=e}get multipleSelectionEnabled(){return this.viewModel.multipleSelectionEnabled}set multipleSelectionEnabled(e){this.viewModel.multipleSelectionEnabled=e}get multiSortEnabled(){return this.viewModel.multiSortEnabled}set multiSortEnabled(e){this.viewModel.multiSortEnabled=e}get multipleSortPriority(){return this.viewModel.multipleSortPriority}set multipleSortPriority(e){this.viewModel.multipleSortPriority=e}get noDataMessage(){return this.viewModel.noDataMessage}set noDataMessage(e){this.viewModel.noDataMessage=e}get objectIds(){return this.viewModel.objectIds}set objectIds(e){this.viewModel.objectIds=e}get outFields(){return this.viewModel.outFields}set outFields(e){this.viewModel.outFields=e}get pageCount(){return this.viewModel.pageCount}get pageIndex(){return this.viewModel.pageIndex}set pageIndex(e){this.viewModel.pageIndex=e}get pageSize(){return this.viewModel.pageSize}set pageSize(e){this.viewModel.pageSize=e}get paginationEnabled(){return this.viewModel.paginationEnabled}set paginationEnabled(e){this.viewModel.paginationEnabled=e}get prompt(){return this.viewModel.prompt}set prompt(e){this.viewModel.prompt=e}get relatedRecordsEnabled(){return this.viewModel.relatedRecordsEnabled}set relatedRecordsEnabled(e){this.viewModel.relatedRecordsEnabled=e}get relatedTable(){return this.viewModel.relatedTable}get relatedTables(){return this.viewModel.relatedTables}set relatedTables(e){this.viewModel.relatedTables=e}get relationship(){return this.viewModel.relationship}get relationshipColumnConfigs(){return this.viewModel.relationshipColumnConfigs}set relationshipColumnConfigs(e){this.viewModel.relationshipColumnConfigs=e}get relationshipConfig(){return this.viewModel.relationshipConfig}set relationshipConfig(e){this.viewModel.relationshipConfig=e}get relationshipInfos(){return this.viewModel.relationshipInfos}get returnGeometryEnabled(){return this.viewModel.returnGeometryEnabled}set returnGeometryEnabled(e){this.viewModel.returnGeometryEnabled=e}get returnMEnabled(){return this.viewModel.returnMEnabled}set returnMEnabled(e){this.viewModel.returnMEnabled=e}get returnZEnabled(){return this.viewModel.returnZEnabled}set returnZEnabled(e){this.viewModel.returnZEnabled=e}get rowHighlightIds(){return this.viewModel.rowHighlightIds}set rowHighlightIds(e){this.viewModel.rowHighlightIds=e}get selectionSource(){return this.viewModel.selectionSource}set selectionSource(e){this.viewModel.selectionSource=e}get showAllRelatedTables(){return this.viewModel.showAllRelatedTables}set showAllRelatedTables(e){this.viewModel.showAllRelatedTables=e}get showPrompt(){return this.viewModel.showPrompt}set showPrompt(e){this.viewModel.showPrompt=e}get showRelatedTableCallback(){return this.viewModel.showRelatedTableCallback}set showRelatedTableCallback(e){this.viewModel.showRelatedTableCallback=e}get size(){return this.viewModel.size}get state(){return this.viewModel.state}get supportsAddAttachments(){return this.viewModel.supportsAddAttachments}get supportsAttachments(){return this.viewModel.supportsAttachments}get supportsDeleteAttachments(){return this.viewModel.supportsDeleteAttachments}get supportsResizeAttachments(){return this.viewModel.supportsResizeAttachments}get supportsUpdateAttachments(){return this.viewModel.supportsUpdateAttachments}get syncTemplateOnChangesEnabled(){return this.viewModel.syncTemplateOnChangesEnabled}set syncTemplateOnChangesEnabled(e){this.viewModel.syncTemplateOnChangesEnabled=e}get tableController(){return this.viewModel.tableController}set tableController(e){this.viewModel.tableController=e}get tableParent(){return this.viewModel.tableParent}set tableParent(e){this.viewModel.tableParent=e}get tableTemplate(){return this.viewModel.tableTemplate}set tableTemplate(e){this.viewModel.tableTemplate=e}get tableTemplateOverride(){return this.viewModel.tableTemplateOverride}set tableTemplateOverride(e){this.viewModel.tableTemplateOverride=e}get timeExtent(){return this.viewModel.timeExtent}set timeExtent(e){this.viewModel.timeExtent=e}get timeZone(){return this.viewModel.timeZone}set timeZone(e){this.viewModel.timeZone=e}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}get visibleColumns(){return this.viewModel.visibleColumns}get visibleElementsOverride(){const{attachmentsViewOptions:e,relatedTable:t,tableController:i,visibleElements:l}=this,{columnDescriptions:o,columnMenus:n,tooltips:s}=l,a=null!=e.objectId;if(t)return new _({columnDescriptions:o,columnMenus:n,tooltips:s,close:l.close,header:l.header,layerDropdown:l.layerDropdown,layerDropdownIcons:l.layerDropdownIcons,menu:l.menu,menuItems:l.menuItems,progress:l.progress,selectionColumn:!1,columnMenuItems:new y({sortAscending:!1,sortDescending:!1})});if(i){const e=i.relatedTable===this,t=i.allRelatedTablesVisible,r=e&&l.selectionColumn&&!t&&!a,c=e&&!t&&!a;return new _({columnDescriptions:o,columnMenus:n,tooltips:s,selectionColumn:r,close:!1,header:!1,layerDropdown:!1,menu:!1,progress:!1,columnMenuItems:new y({sortAscending:c,sortDescending:c})})}return a?new _({columnDescriptions:o,columnMenus:n,tooltips:s,close:l.close,header:l.header,layerDropdown:l.layerDropdown,layerDropdownIcons:l.layerDropdownIcons,menu:l.menu,menuItems:l.menuItems,progress:l.progress,selectionColumn:!1,columnMenuItems:new y({sortAscending:!1,sortDescending:!1})}):null}clearSelectionFilter(){this.viewModel.clearSelectionFilter()}async deleteAttachments(e,t,i){null!=e&&t?.length&&(i?this._showDeleteAttachmentPrompt(e,t):await this.viewModel.deleteAttachments(e,t))}deleteSelection(e){return this.highlightIds.length?e?(this._showDeletePrompt(),this.scheduleRender(),Promise.resolve()):this.viewModel.deleteSelection():Promise.resolve()}async downloadAttachmentById(e,t){return this.viewModel.downloadAttachmentById(e,t)}drainRelatedTables(){this.viewModel.drainRelatedTables()}exportSelectionToCSV(e){return this.viewModel.exportSelectionToCSV(e)}filterBySelection(){this.viewModel.filterBySelection()}findColumn(e){return this.viewModel.findColumn(e)}goToPage(e){this.viewModel.goToPage(e)}hideColumn(e){this.grid?.hideColumn(e)}nextPage(){this.viewModel.nextPage()}previousPage(){this.viewModel.previousPage()}async refresh(){await this.viewModel.refresh()}refreshCellContent(){this.viewModel.refreshCellContent()}async saveAttachmentsViewForm(){await this.viewModel.saveAttachmentsViewForm()}showAllColumns(){this.viewModel.showAllColumns()}showColumn(e){this.grid?.showColumn(e)}sortColumn(e,t){this.viewModel.sortColumn(e,t)}scrollLeft(){this.viewModel.scrollLeft()}scrollToBottom(){this.viewModel.scrollToBottom()}scrollToIndex(e){this.viewModel.scrollToIndex(e)}scrollToRow(e){this.viewModel.scrollToRow(e)}scrollToTop(){this.viewModel.scrollToTop()}toggleColumnVisibility(e){this.viewModel.toggleColumnVisibility(e)}zoomToSelection(){this.effectiveTable.viewModel.zoomToSelection()}render(){const{_effectiveVisibleElements:e,isQueryingOrSyncing:t,menuConfig:i,state:l}=this;return O("div",{bind:this,class:this.classes($.base,I.widget)},O("calcite-panel",{bind:this,class:$.content,closable:e.close,description:this._effectiveDescription,disabled:this.disabled||"disabled"===l&&!this._effectiveLayers?.length,heading:e.header?this._effectiveTitle:void 0,loading:"loading"===l,menuOpen:!!i?.open,overlayPositioning:"fixed",onCalcitePanelClose:e=>{e.currentTarget.closed=!1,this.emit("close")}},e.progress?O("calcite-progress",{type:t?"indeterminate":"determinate"}):null,this._showLayerDropdown?this._renderLayerDropdown():null,this._renderColumnVisibilityAction(),this._renderHeaderMenuActions(),this._renderNavigationBar(),this._renderTables(),this._renderError()),this._renderColumnVisibilityPopover(),this._renderPrompt())}_renderTables(){const{grid:e,relatedTables:t}=this,i=this.classes($.tableContainer);if(t.length){const l=this.classes($.base,this.allRelatedTablesVisible?$.expanded:$.collapsed,this._shouldShowAttachmentsView?$.tableContainerWithAttachments:void 0);return O("div",{class:i},O("calcite-panel",{overlayPositioning:"fixed"},O("div",null,[this._shouldShowGrid?O("div",{class:l},e?.render(),this._renderPagination()):void 0,...this._filteredTables.map((e=>{const i=t.indexOf(e);return O("div",{class:l,key:`related-${i}`},e.render())})),,])))}return null!=this.attachmentsViewOptions.objectId?O("div",{class:i},O("calcite-panel",{overlayPositioning:"fixed"},O("div",null,[O("div",{class:this.classes($.base,$.collapsed)},e?.render(),this._renderPagination()),this._renderAttachmentsView()]))):[O("div",{class:i},e?.render()),this._renderPagination()]}_renderPagination(){if(this.paginationEnabled)return O("calcite-pagination",{pageSize:1,startItem:this.pageIndex+1,totalItems:this.pageCount,onCalcitePaginationChange:e=>this.goToPage(e.currentTarget.startItem-1)})}_renderError(){const{messages:e}=this;return O("calcite-alert",{autoClose:!0,autoCloseDuration:"fast",icon:U.exclamationMarkTriangle,kind:"danger",label:e.errorOccured,open:this._hasAttachmentsViewError,slot:"alerts",onCalciteAlertClose:()=>{this.attachmentsViewOptions.error=null}},O("span",{slot:"message"},e.errorOccured))}_renderPrompt(){return this.prompt?O(v,{...this.prompt,headingLevel:2}):void 0}_showDeletePrompt(){const{messages:e,messagesCommon:t}=this,i=F(e.deleteSelectionCount,{count:this.highlightIds.length});this.showPrompt({title:i,message:e.deleteRecordsRemoved,context:"danger",actions:{primary:{label:t.delete,action:this._onDeleteSelectionClick},secondary:{label:e.keepRecords,action:()=>this.clearPrompt()}}})}_showDeleteAttachmentPrompt(e,t){const{messages:i,messagesCommon:l}=this,o=F(i.deleteAttachmentCount,{count:t.length});this.showPrompt({title:o,message:i.deleteAttachmentConfirmation,context:"danger",actions:{primary:{label:l.delete,action:async()=>{try{await this.deleteAttachments(e,t,!1)}finally{this.clearPrompt()}}},secondary:{label:l.cancel,action:()=>this.clearPrompt()}}})}async _onDeleteSelectionClick(){try{await this.viewModel.deleteSelection()}finally{this.clearPrompt()}}_renderHeaderMenuAction(e){const{disabled:t,hidden:i,icon:l,text:o,clickFunction:n}=e;if(!i)return O("calcite-action",{disabled:t??this.menuConfig?.disabled,icon:l??void 0,key:o,onclick:()=>n(),slot:"header-menu-actions",text:o,textEnabled:!0,title:o})}_renderHeaderMenuActions(){return this._shouldShowMenu?[this._renderDefaultHeaderMenuActions(),this._renderCustomHeaderMenuActions()]:[]}_renderDefaultHeaderMenuActions(){if(!this._hasDefaultMenuItems)return[];const{messages:e}=this;return[this._showRefreshDataAction&&{icon:U.refresh,text:e.refreshData,clickFunction:()=>this.refresh()},this._showDeleteSelectionAction&&{icon:U.delete,text:e.deleteSelection,clickFunction:()=>this.deleteSelection(!0)},this._showClearSelectionAction&&{icon:U.clearSelection,text:e.clearSelection,clickFunction:()=>this.highlightIds?.removeAll()},this._showZoomToSelectionAction&&{icon:U.zoomToSelection,text:e.zoomToSelection,clickFunction:()=>this.zoomToSelection()},this._showSelectedRecordsShowSelectedAction&&{icon:U.showSelected,text:e.showSelected,clickFunction:()=>{const{objectIds:e}=this;e.removeAll(),e.addMany(this.highlightIds.toArray())}},this._showSelectedRecordsShowAllAction&&{icon:U.showAll,text:e.showAllRecords,clickFunction:()=>this.objectIds.removeAll()},this._showExportSelectionToCSVAction&&{icon:U.exportToCSV,text:e.exportSelectionCSV,clickFunction:()=>this.exportSelectionToCSV()}].filter(t).map((e=>e&&this._renderHeaderMenuAction(e)))}_renderCustomHeaderMenuActions(){return this.menuConfig?.items?.map((({disabled:e,hidden:t,icon:i,label:l,clickFunction:o})=>this._renderHeaderMenuAction({hidden:"function"==typeof t?t():t,icon:i,text:l,disabled:e,clickFunction:e=>o(e)})))??[]}_renderColumnVisibilityAction(){if(!this._showColumnsVisibilityAction)return[];const{_columnVisibilityActions:e,effectiveTable:t,id:i}=this,l=this.messages.toggleColumns;return O("calcite-action",{afterCreate:t=>e.set(i,t),afterRemoved:()=>e.delete(i),appearance:"transparent",bind:this,disabled:t.menuConfig?.disabled,icon:U.showColumn,id:`${i}__toggle-columns-action`,slot:"header-actions-end",text:l},this._effectiveVisibleElements.tooltips?O("calcite-tooltip",{closeOnClick:!0,overlayPositioning:"fixed",placement:"bottom-end",slot:"tooltip"},l):null)}_renderColumnVisibilityPopover(){if(!this._showColumnsVisibilityAction||this.effectiveTable.menuConfig?.disabled)return;const{effectiveTable:e}=this,t=this.messages.toggleColumns;return O("calcite-popover",{autoClose:!0,class:$.menuPopover,label:t,overlayPositioning:"fixed",placement:"top-end",pointerDisabled:!0,referenceElement:this._columnVisibilityActions.get(this.id)},O("calcite-list",{displayMode:"nested",filterEnabled:!0,filterPlaceholder:t,label:t,selectionMode:"multiple"},e.columns.toArray().map((t=>{const i=M(t)?t.columns?.map((t=>this._renderColumnListItem({column:t,table:e,ignoreSelect:!0}))):void 0;return this._renderColumnListItem({column:t,table:e,items:i})}))))}_renderColumnListItem(e){const{column:t,table:i,items:l,ignoreSelect:o}=e,{effectiveLabel:n,fieldName:s,hidden:a}=t;return O("calcite-list-item",{expanded:!(!l?.length||a)||void 0,key:`toggle-columns__item-${s}`,label:n,selected:!a,value:s,onCalciteListItemSelect:e=>{o&&e.stopPropagation(),i.toggleColumnVisibility(e.currentTarget.value)}},l)}_renderLayerDropdown(){const e=this.messages.selectALayer;return O("div",{class:$.layerDropdownMenu,key:`${this.id}-layerDropdown`,slot:"header-actions-start"},O("calcite-dropdown",{bind:this,maxItems:5,overlayPositioning:"fixed",placement:"bottom-start"},O("calcite-action",{icon:U.layers,slot:"trigger",text:e,title:e}),O("calcite-dropdown-group",{selectionMode:"single"},this._effectiveLayers.map(((e,t)=>this._renderLayerDropdownItem(e,t)))??null)))}_renderLayerDropdownItem(e,t){const i=this.visibleElements.layerDropdownIcons;return O("calcite-dropdown-item",{iconStart:i?V(e):void 0,key:`dropdown-item-${t}`,label:e.title??"",selected:e===this.layer,value:e.id,onCalciteDropdownItemSelect:()=>{this.layer=e}},e.title)}_onRelatedNavigationItemClick(e){this.viewModel.drainRelatedTablesAboveIndex(e)}_collapseRelatedTable(e){this.viewModel.collapseRelatedTable(this.effectiveTable,e)}_onShowRelatedTable(e){this.showRelatedTableCallback||(this._collapseRelatedTable(e),this._createRelatedTable(e))}async _createRelatedTable(e){const{editingEnabled:t,effectiveTable:i,paginationEnabled:l,pageSize:o,view:n,viewModel:s}=this,{layer:a,objectId:r,relatedLayer:c,relationshipId:d}=e;await a.load();const h=this.attachmentsEnabled&&S(a),p=new j({layer:a,attachmentsEnabled:h,editingEnabled:t,paginationEnabled:l,pageSize:o,relatedRecordsEnabled:!0,relationshipConfig:{objectId:r,relatedLayer:c,relationshipId:d},relationshipColumnConfigs:T(a,d),tableController:this,tableParent:i,view:n,showRelatedTableCallback:e=>s.emit("show-related-table",e)});this.relatedTables.add(p),this.scheduleRender()}_renderAttachmentsView(){const{attachmentInfos:e,mode:t,objectId:i}=this.attachmentsViewOptions;return"file"!==t&&e.length&&null!=i?this._renderAttachmentsViewList():this._renderAttachmentsViewFilePane()}_renderAttachmentsViewFilePane(){const{attachmentsViewOptions:e,isSyncingAttachments:t,supportsAddAttachments:i,messages:l,messagesUnits:o}=this,{attachmentId:n,attachmentInfos:a,candidates:r,objectId:c}=e,d=a.find((e=>e.id===n)),h=a.length,p=r?.length,m=d?O("calcite-label",{alignment:"center",key:"replace-file-node",scale:"l"},l.replaceFile):void 0,u=p?void 0:O("calcite-label",{alignment:"center",key:"message-node",scale:"m"},i?null==c?l.noFeature:l.dragAndDropToUpload:l.editingRestricted),g=Array.from(r??[]).pop(),b=g?O("calcite-label",{key:"filename-node"},g.name):void 0,w=i&&null!=c,v=w&&p,y=O("input",{afterCreate:x,afterRemoved:k,afterUpdate:x,bind:this,"data-node-ref":"_attachmentsInput",files:r,hidden:!0,name:"attachment",onchange:e=>this._onAttachmentsViewCandidateChange(e),type:"file"}),f=w?O("calcite-button",{appearance:"outline-fill",bind:this,disabled:t,iconStart:U.folderOpen,key:"select-node",loading:!1,onclick:()=>{this._attachmentsInput&&(this._attachmentsInput.value="",this._attachmentsInput.click())},width:"full"},l.selectFile):void 0,_=v?O("calcite-button",{appearance:"outline-fill",bind:this,disabled:t,iconStart:U.save,key:"save-node",loading:t,onclick:()=>{this.saveAttachmentsViewForm()},width:"full"},d?l.updateAttachment:l.addAttachment):void 0,M=h||p?O("calcite-button",{appearance:"transparent",bind:this,disabled:t,key:"cancel-node",onclick:()=>{this._attachmentsInput&&(this._attachmentsInput.value=""),e.reset(),e.attachmentInfos?.length&&(e.mode="list")},width:"full"},this.messagesCommon.cancel):void 0;return[O("div",{class:$.attachmentsView,key:"attachments-view"},O("div",{class:$.attachmentsViewContent,key:"attachments-view-content"},O("div",{bind:this,class:$.attachmentsViewDropArea,ondragover:e=>e.preventDefault(),ondrop:this._onAttachmentsViewDrop},O("calcite-icon",{class:$.attachmentsViewIcon,icon:U.upload,scale:"l"}),m,u,O("form",{afterCreate:t=>e.form=t,afterRemoved:()=>e.form=null,bind:this,key:"attachments-form"},O("fieldset",null,b,y,f,_,M)))),null!=c&&null!=d?O("div",{class:$.attachmentsViewInformation,key:"information"},this._renderAttachmentsViewThumbnail(d,200),O("label",{key:"file-label"},l.fileName),O("span",{key:"file-span"},d.name),O("label",{key:"size-label"},l.size),O("span",{key:"size-span"},s(o,d.size??0))):void 0)]}_renderAttachmentsViewList(){const{attachmentsViewOptions:e,isSyncingAttachments:t,messages:i,messagesUnits:l,supportsDeleteAttachments:o,supportsUpdateAttachments:n}=this,{attachmentInfos:a,objectId:r}=e;return O("calcite-list",{afterCreate:x,afterRemoved:k,afterUpdate:x,bind:this,class:$.attachmentsViewList,"data-node-ref":"attachmentsList",key:`attachments-list-${r}`,label:i?.attachments,loading:t,ondragover:e=>e.preventDefault(),ondrop:this._onAttachmentsViewDrop,selectionMode:"multiple",onCalciteListChange:()=>this.scheduleRender()},...a?.map((t=>{const{id:a,name:c,size:d,url:h}=t,p=s(l,d??0);return O("calcite-list-item",{afterRemoved:()=>this.scheduleRender(),key:`attachment-${a}`,label:c,value:a},this._renderAttachmentsViewListThumbnail(t),O("span",{class:$.attachmentsViewListFileSize,slot:"actions-end",title:p},p),O("calcite-action",{appearance:"transparent",icon:U.downloadTo,key:`download-attachment-${a}`,label:`${c}`,onclick:e=>{e.preventDefault(),this.downloadAttachmentById(r??-1,a)},slot:"actions-end",text:i.downloadAttachment,title:i.downloadAttachment}),n&&null!=r?O("calcite-action",{appearance:"transparent",disabled:!n,icon:U.replaceImage,key:`replace-attachment-${a}`,label:`${c}`,onclick:()=>{e.mode="file",e.attachmentId=a},slot:"actions-end",text:i.updateAttachment,title:i.updateAttachment}):void 0,O("calcite-action",{appearance:"transparent",icon:U.launch,key:`launch-attachment-${a}`,label:`${c}`,onclick:()=>{h&&window.open(h,"_blank")},slot:"actions-end",text:i.viewAttachment,title:i.viewAttachment}),o&&null!=r?O("calcite-action",{appearance:"transparent",class:$.attachmentsViewListItemDelete,disabled:!o,icon:U.delete,key:`delete-attachment-${a}`,label:`${c}`,onclick:()=>{this.deleteAttachments(r,[a],!0)},slot:"actions-end",text:i.deleteAttachment,title:i.deleteAttachment}):void 0)})))}_renderAttachmentsViewListThumbnail(e){return O("div",{class:$.attachmentsViewListThumbnail,slot:"content-start"},O("a",{href:e.url??"",rel:"noreferrer",target:"_blank"},this._renderAttachmentsViewThumbnail(e)))}_renderAttachmentsViewThumbnail(e,t=64){const{contentType:i,name:l,size:o,url:n}=e,s=`${n}${n?.includes("?")?"&":"?"}w=${t}&s=${o}`;return this.supportsResizeAttachments&&g(i)?O("img",{alt:l,key:`thumbnail-image-${l}`,src:s,title:l}):O("calcite-icon",{icon:b(i),key:`thumbnail-icon-${l}`,scale:"l",textLabel:l,title:l})}_onAttachmentsViewCandidateChange({target:e}){this.attachmentsViewOptions.candidates=e?.files}_onAttachmentsViewDrop(e){e.preventDefault(),(this.supportsAddAttachments||this.supportsUpdateAttachments)&&this.attachmentsViewOptions.set({mode:"file",candidates:e.dataTransfer?.files})}_renderNavigationBar(){const{effectiveTable:e,messages:t,messagesCommon:i,relatedTable:l,relatedTables:o}=this;if(!this._shouldShowNavigationBar)return;const{attachmentsList:n,attachmentsViewOptions:s,layer:a,supportsAddAttachments:r,supportsDeleteAttachments:c}=e;if(!a)return;const{attachmentInfos:d,objectId:h}=s,p=null!=h,m=d.length,u=n?.selectedItems?.length??0,g=`${a.objectIdField}: ${h}`,b=F(t.selectedCount,{count:u}),w=F(t.attachmentsCount,{count:m}),v=p?O("calcite-action",{bind:this,icon:U.chevronRight,iconFlipRtl:!0,key:"navigation-feature",onclick:()=>e.scrollToRow(h),text:g,textEnabled:!0,title:g}):void 0,y=p?O("calcite-action",{icon:U.chevronRight,iconFlipRtl:!0,key:"navigation-attachments-label",label:w,onclick:()=>{m>0&&(s.mode="list")},text:w,textEnabled:!0,title:w}):void 0,f=p?O("calcite-chip",{closable:!0,closed:0===u,key:"navigation-chip",kind:"inverse",label:b,selected:!0,title:b,value:"selected",onCalciteChipClose:()=>n?.selectedItems?.forEach((e=>e.selected=!1))},b):void 0,_=l?O("calcite-label",{layout:"inline"},t.showAllTables,O("calcite-switch",{checked:this.allRelatedTablesVisible,onCalciteSwitchChange:e=>this.showAllRelatedTables=!!e.currentTarget.checked})):void 0,M=p&&"list"===s.mode&&null!=h&&u&&c?O("calcite-action",{icon:U.delete,iconFlipRtl:!0,key:"attachments-trash-all",onclick:()=>{e.deleteAttachments(h,n?.selectedItems?.map((e=>e.value))??[],!0)},text:i.delete,textEnabled:!0,title:F(t.deleteAttachmentCount,{count:u})}):void 0,C=p&&"list"===s.mode&&r?O("calcite-action",{bind:this,icon:U.plus,iconFlipRtl:!0,key:"attachments-add",onclick:()=>{s.attachmentId=null,s.mode="file"},text:t.addAttachment,textEnabled:!0,title:t.addAttachment}):void 0;return O("div",{class:$.tableNavigation,key:"table-nav"},O("calcite-action",{icon:U.moveUp,iconFlipRtl:!0,key:"go-back",onclick:()=>{l&&this.drainRelatedTables(),e.attachmentsViewOptions.objectId=null},text:this.layer?.title??"",textEnabled:!1,title:l?t.exitRelatedRecords:t.exitAttachments}),o.toArray().map(((e,t)=>this._renderRelatedTableNavigationAction(e,t))),v,y,O("div",null,f,_,M,C))}_renderRelatedTableNavigationAction(e,t){const i=this._getLabelForRelatedTableNavigationAction(e);return O("calcite-action",{icon:U.chevronRight,iconFlipRtl:!0,key:t,onclick:()=>this._onRelatedNavigationItemClick(t),text:i,textEnabled:!0,title:e.layer?.title||""})}_getLabelForRelatedTableNavigationAction(e){const t=e.layer?.title;if(!t)return"";const{relatedTables:i}=this;if(i.length<=1)return t;return i.indexOf(e)!==i.length-1&&t.length>20?`${t.slice(0,20)}...`:t}};e([a()],B.prototype,"_attachmentsInput",void 0),e([a()],B.prototype,"_columnVisibilityActions",void 0),e([a()],B.prototype,"_effectiveDescription",null),e([a()],B.prototype,"_effectiveLayers",null),e([a()],B.prototype,"_effectiveTitle",null),e([a()],B.prototype,"_effectiveVisibleElements",null),e([a()],B.prototype,"_filteredTables",null),e([a()],B.prototype,"_hasAttachmentsViewError",null),e([a()],B.prototype,"_hasCustomMenuItems",null),e([a()],B.prototype,"_hasDefaultMenuItems",null),e([a()],B.prototype,"_shouldShowGrid",null),e([a()],B.prototype,"_shouldShowMenu",null),e([a()],B.prototype,"_shouldShowAttachmentsView",null),e([a()],B.prototype,"_showClearSelectionAction",null),e([a()],B.prototype,"_showColumnsVisibilityAction",null),e([a()],B.prototype,"_showDeleteSelectionAction",null),e([a()],B.prototype,"_showExportSelectionToCSVAction",null),e([a()],B.prototype,"_showLayerDropdown",null),e([a()],B.prototype,"_shouldShowNavigationBar",null),e([a()],B.prototype,"_showRefreshDataAction",null),e([a()],B.prototype,"_showSelectedRecordsShowSelectedAction",null),e([a()],B.prototype,"_showSelectedRecordsShowAllAction",null),e([a()],B.prototype,"_showZoomToSelectionAction",null),e([a()],B.prototype,"_viewLayers",null),e([a()],B.prototype,"attachmentsList",void 0),e([a({readOnly:!0})],B.prototype,"grid",null),e([a()],B.prototype,"actionColumn",null),e([a()],B.prototype,"actionColumnConfig",null),e([a({readOnly:!0})],B.prototype,"activeFilters",null),e([a({readOnly:!0})],B.prototype,"activeSortOrders",null),e([a()],B.prototype,"allColumns",null),e([a({readOnly:!0})],B.prototype,"allRelatedTablesVisible",null),e([a()],B.prototype,"allVisibleColumns",null),e([a()],B.prototype,"attachmentsEnabled",null),e([a()],B.prototype,"attachmentsViewOptions",null),e([a({type:m})],B.prototype,"attributeTableTemplate",null),e([a()],B.prototype,"autoRefreshEnabled",null),e([a()],B.prototype,"clearPrompt",null),e([a()],B.prototype,"columnPerformanceModeEnabled",null),e([a()],B.prototype,"columnReorderingEnabled",null),e([a({readOnly:!0})],B.prototype,"columns",null),e([a()],B.prototype,"definitionExpression",null),e([a()],B.prototype,"description",void 0),e([a()],B.prototype,"disabled",void 0),e([a()],B.prototype,"editingEnabled",null),e([a()],B.prototype,"effectiveSize",null),e([a()],B.prototype,"effectiveTable",null),e([a()],B.prototype,"filterGeometry",null),e([a()],B.prototype,"filterBySelectionEnabled",null),e([a()],B.prototype,"hiddenFields",null),e([a()],B.prototype,"highlightEnabled",null),e([a()],B.prototype,"highlightIds",null),e([a()],B.prototype,"icon",null),e([a()],B.prototype,"initialSize",null),e([a()],B.prototype,"isQueryingOrSyncing",null),e([a()],B.prototype,"isSyncingAttachments",null),e([a()],B.prototype,"label",null),e([a()],B.prototype,"layer",null),e([a()],B.prototype,"layers",null),e([a()],B.prototype,"layerView",null),e([a()],B.prototype,"maxSize",null),e([a(),D("esri/widgets/FeatureTable/t9n/FeatureTable")],B.prototype,"messages",null),e([a(),D("esri/t9n/common")],B.prototype,"messagesCommon",null),e([a(),D("esri/core/t9n/Units")],B.prototype,"messagesUnits",null),e([a(),D("esri/widgets/support/t9n/uriUtils")],B.prototype,"messagesURIUtils",null),e([a()],B.prototype,"menuConfig",void 0),e([a()],B.prototype,"multipleSelectionEnabled",null),e([a()],B.prototype,"multiSortEnabled",null),e([a()],B.prototype,"multipleSortPriority",null),e([a()],B.prototype,"noDataMessage",null),e([a()],B.prototype,"objectIds",null),e([a()],B.prototype,"outFields",null),e([a()],B.prototype,"pageCount",null),e([a()],B.prototype,"pageIndex",null),e([a()],B.prototype,"pageSize",null),e([a()],B.prototype,"paginationEnabled",null),e([a()],B.prototype,"prompt",null),e([a()],B.prototype,"relatedRecordsEnabled",null),e([a()],B.prototype,"relatedTable",null),e([a()],B.prototype,"relatedTables",null),e([a()],B.prototype,"relationship",null),e([a()],B.prototype,"relationshipColumnConfigs",null),e([a()],B.prototype,"relationshipConfig",null),e([a()],B.prototype,"relationshipInfos",null),e([a()],B.prototype,"returnGeometryEnabled",null),e([a()],B.prototype,"returnMEnabled",null),e([a()],B.prototype,"returnZEnabled",null),e([a()],B.prototype,"rowHighlightIds",null),e([a()],B.prototype,"selectionSource",null),e([a()],B.prototype,"showAllRelatedTables",null),e([a()],B.prototype,"showPrompt",null),e([a()],B.prototype,"showRelatedTableCallback",null),e([a()],B.prototype,"size",null),e([a({readOnly:!0})],B.prototype,"state",null),e([a()],B.prototype,"supportsAddAttachments",null),e([a()],B.prototype,"supportsAttachments",null),e([a()],B.prototype,"supportsDeleteAttachments",null),e([a()],B.prototype,"supportsResizeAttachments",null),e([a()],B.prototype,"supportsUpdateAttachments",null),e([a()],B.prototype,"syncTemplateOnChangesEnabled",null),e([a({constructOnly:!0})],B.prototype,"tableController",null),e([a({constructOnly:!0})],B.prototype,"tableParent",null),e([a()],B.prototype,"tableTemplate",null),e([a()],B.prototype,"tableTemplateOverride",null),e([a()],B.prototype,"title",void 0),e([a()],B.prototype,"timeExtent",null),e([a()],B.prototype,"timeZone",null),e([a()],B.prototype,"view",null),e([a({type:f}),P(["cell-click","cell-dblclick","cell-pointerover","cell-pointerout","cell-keydown","column-reorder","show-related-table"])],B.prototype,"viewModel",void 0),e([a()],B.prototype,"visibleColumns",null),e([a({type:_,nonNullable:!0})],B.prototype,"visibleElements",void 0),e([a({type:_})],B.prototype,"visibleElementsOverride",null),B=j=e([r("esri.widgets.FeatureTable")],B);const N=B;export{N as default};
|
|
5
|
+
import{_ as e}from"../chunks/tslib.es6.js";import"../intl.js";import{isSome as t}from"../core/arrayUtils.js";import{watch as i,on as l,sync as o,initial as n}from"../core/reactiveUtils.js";import{formatFileSize as s}from"../core/unitFormatUtils.js";import{property as a}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/Logger.js";import{subclass as r}from"../core/accessorSupport/decorators/subclass.js";import{isLayerFromCatalog as c}from"../layers/catalog/catalogUtils.js";import{isKnowledgeGraphLayer as d,isMapImageLayer as h,isSubtypeGroupLayer as p}from"../layers/support/layerUtils.js";import m from"../tables/AttributeTableTemplate.js";import u from"./Widget.js";import{isSupportedImage as g,getCalciteIconForAttachment as b}from"./Attachments/support/attachmentUtils.js";import{loadPromptComponents as w,Prompt as v}from"./Editor/components/Prompt.js";import y from"./FeatureTable/ColumnMenuVisibleElements.js";import f from"./FeatureTable/FeatureTableViewModel.js";import _ from"./FeatureTable/VisibleElements.js";import{isGroupColumn as M}from"./FeatureTable/support/columnUtils.js";import{loadFieldColumnComponents as C,isIFeatureTableSupportedLayer as A,isIFeatureTableSupportedLayerWithAttachments as S,getRelationshipIdsToShow as T}from"./FeatureTable/support/tableUtils.js";import{loadCalciteComponents as E}from"./support/componentsUtils.js";import{globalCss as I}from"./support/globalCss.js";import{getIconForLayer as V}from"./support/iconUtils.js";import{renderingSanitizer as R,storeNode as x,discardNode as k}from"./support/widgetUtils.js";import{messageBundle as D}from"./support/decorators/messageBundle.js";import{vmEvent as P}from"./support/decorators/vmEvent.js";import{tsx as O}from"./support/jsxFactory.js";import{substitute as F}from"../intl/substitute.js";var j;const L="esri-feature-table",z=`${L}__attachments-view`,$={base:L,content:`${L}__content`,menuPopover:`${L}__menu-popover`,layerDropdownMenu:`${L}__layer-switcher-menu`,tableContainer:`${L}__table-container`,tableContainerWithAttachments:`${L}__table-container--attachments`,tableNavigation:`${L}__table-navigation`,attachmentsView:z,attachmentsViewContent:`${z}__content`,attachmentsViewDropArea:`${z}__drop-area`,attachmentsViewIcon:`${z}__icon`,attachmentsViewInformation:`${z}__information`,attachmentsViewList:`${z}__list`,attachmentsViewListFileSize:`${z}__list__filesize`,attachmentsViewListItemDelete:`${z}__list-item--delete`,attachmentsViewListThumbnail:`${z}__list__thumbnail`,expanded:`${L}__expanded`,collapsed:`${L}__collapsed`},U={chevronRight:"chevron-right",clearSelection:"clear-selection",downloadTo:"download-to",exclamationMarkTriangle:"exclamation-mark-triangle",exportToCSV:"file-csv",folderOpen:"folder-open",delete:"trash",launch:"launch",layers:"layers",moveUp:"move-up",plus:"plus",refresh:"refresh",replaceImage:"replace-image",save:"save",showAll:"selection-x",showColumn:"show-column",showSelected:"selection-filter",upload:"upload",zoomToSelection:"zoom-to-object"};let B=j=class extends u{constructor(e,t){super(e,t),this._attachmentsInput=null,this._columnVisibilityActions=new Map,this.attachmentsList=null,this.description=null,this.disabled=!1,this.menuConfig=null,this.navigationScale="m",this.title=null,this.viewModel=new f,this.visibleElements=new _,this._showDeletePrompt=this._showDeletePrompt.bind(this),this._onDeleteSelectionClick=this._onDeleteSelectionClick.bind(this)}initialize(){this.addHandles([i((()=>[this.isQueryingOrSyncing,this.editingEnabled]),(()=>this.scheduleRender())),i((()=>[this._effectiveVisibleElements,this._effectiveVisibleElements.columnDescriptions,this._effectiveVisibleElements.columnMenus,this._effectiveVisibleElements.columnMenuItems,this.columns.length]),(()=>{this.columns.forEach((e=>e.visibleElements=this._effectiveVisibleElements)),this.refreshCellContent()}),o),i((()=>this._effectiveVisibleElements.selectionColumn),(e=>{this.grid&&(this.grid.selectionColumnEnabled=e)}),n),l((()=>this.viewModel),"show-related-table",(e=>this._onShowRelatedTable(e))),i((()=>this.editingEnabled),(()=>{const{attachmentsViewOptions:e}=this;this.clearPrompt(),e&&(e.form?.reset(),e.candidates=null)}))])}loadDependencies(){return Promise.all([E({action:()=>import("@esri/calcite-components/dist/components/calcite-action"),alert:()=>import("@esri/calcite-components/dist/components/calcite-alert"),button:()=>import("@esri/calcite-components/dist/components/calcite-button"),chip:()=>import("@esri/calcite-components/dist/components/calcite-chip"),dropdown:()=>import("@esri/calcite-components/dist/components/calcite-dropdown"),"dropdown-group":()=>import("@esri/calcite-components/dist/components/calcite-dropdown-group"),"dropdown-item":()=>import("@esri/calcite-components/dist/components/calcite-dropdown-item"),icon:()=>import("@esri/calcite-components/dist/components/calcite-icon"),label:()=>import("@esri/calcite-components/dist/components/calcite-label"),list:()=>import("@esri/calcite-components/dist/components/calcite-list"),"list-item":()=>import("@esri/calcite-components/dist/components/calcite-list-item"),pagination:()=>import("@esri/calcite-components/dist/components/calcite-pagination"),panel:()=>import("@esri/calcite-components/dist/components/calcite-panel"),popover:()=>import("@esri/calcite-components/dist/components/calcite-popover"),progress:()=>import("@esri/calcite-components/dist/components/calcite-progress"),switch:()=>import("@esri/calcite-components/dist/components/calcite-switch"),tooltip:()=>import("@esri/calcite-components/dist/components/calcite-tooltip")}),w(),C()])}destroy(){this.drainRelatedTables(),this.clearPrompt()}get _effectiveDescription(){const{description:e}=this;return null!=e?R.sanitize("function"==typeof e?e():e):void 0}get _effectiveLayers(){const{layer:e,layers:t}=this,i=t?.length?t.filter(A):[],l=i.length?i:[...this._viewLayers];return e&&!l.includes(e)&&l.push(e),l}get _effectiveTitle(){const{layer:e,messages:t,state:i,highlightIds:l,title:o,size:n}=this;if(o)return R.sanitize("function"==typeof o?o():o);if(!e)return t.noLayer;switch(i){case"disabled":return t.errorLayer;case"ready":case"loading":return t.loading;case"error":return t.errorData}return F(t.header,{title:R.sanitize(e.title),count:n,selected:l.length})}get _effectiveVisibleElements(){return this.visibleElementsOverride??this.visibleElements}get _filteredTables(){const e=this.relatedTables.toArray(),t=1===e.length;return this.allRelatedTablesVisible?e:t?[e[0]]:this._shouldShowAttachmentsView?e.slice(-1):e.slice(-2)}get _hasAttachmentsViewError(){return null!=this.attachmentsViewOptions.error}get _hasCustomMenuItems(){return!!this.menuConfig?.items?.length}get _hasDefaultMenuItems(){return!!(this._showClearSelectionAction||this._showDeleteSelectionAction||this._showExportSelectionToCSVAction||this._showRefreshDataAction||this._showZoomToSelectionAction||this._showSelectedRecordsShowSelectedAction||this._showSelectedRecordsShowAllAction||this._showColumnsVisibilityAction)}get _shouldShowGrid(){return this.allRelatedTablesVisible||1===this.relatedTables.length&&!this._shouldShowAttachmentsView}get _shouldShowMenu(){const{header:e,menu:t}=this._effectiveVisibleElements;return!(!e||!t||!this._hasDefaultMenuItems&&!this._hasCustomMenuItems)}get _shouldShowAttachmentsView(){return!(null==this.attachmentsViewOptions.objectId&&!this.relatedTables.some((e=>null!=e.attachmentsViewOptions.objectId)))}get _showClearSelectionAction(){return!(!this.highlightIds.length||!this._effectiveVisibleElements.menuItems?.clearSelection||this.relatedTables.length)}get _showColumnsVisibilityAction(){const{header:e,menu:t,menuItems:i}=this._effectiveVisibleElements;return!(!(e&&t&&i?.toggleColumns)||this.showRelatedTableCallback||this.allRelatedTablesVisible||this._shouldShowAttachmentsView)}get _showDeleteSelectionAction(){return!(!(this.editingEnabled&&this.highlightIds.length&&this._effectiveVisibleElements.menuItems?.deleteSelection&&this.layer?.capabilities?.operations?.supportsDelete)||this.relatedTables.length)}get _showExportSelectionToCSVAction(){return!(!(this._effectiveVisibleElements.menuItems.exportSelectionToCSV&&this.layer&&this.highlightIds.length)||this.relatedTables.length)}get _showLayerDropdown(){return!(!this._effectiveLayers.length||!this._effectiveVisibleElements.layerDropdown)}get _shouldShowNavigationBar(){const e=!!this.relatedTable||this._shouldShowAttachmentsView;return!this.tableParent&&e}get _showRefreshDataAction(){return!!this._effectiveVisibleElements.menuItems?.refreshData}get _showSelectedRecordsShowSelectedAction(){const e=this.objectIds.length,t=this.highlightIds.length;return!(!t||!this._effectiveVisibleElements.menuItems?.selectedRecordsShowSelectedToggle||e&&t===e||this.relatedTables.length)}get _showSelectedRecordsShowAllAction(){return!(!this._effectiveVisibleElements.menuItems?.selectedRecordsShowAllToggle||!this.objectIds.length||this.relatedTables.length)}get _showZoomToSelectionAction(){return!(!this.view||!this.highlightIds.length||this.effectiveTable.layer?.isTable||!this._effectiveVisibleElements.menuItems?.zoomToSelection)}get _viewLayers(){const e=this.view?.map;if(!e)return[];const t=new Set,i=e=>{!A(e)||p(e)||t.has(e)||(e.load(),t.add(e))},l=e=>{c(e)||"catalog-footprint"===e.type||(d(e)?(e.load(),e.layers?.forEach(i),e.tables?.forEach(i)):h(e)?(e.loadAll(),e.sublayers?.forEach(i),e.subtables?.forEach(i)):p(e)?(e.loadAll(),e.sublayers?.forEach(i)):i(e))};return e.allLayers.forEach(l),e.allTables.forEach(l),[...t.values()]}get grid(){return this.viewModel.grid}get actionColumn(){return this.viewModel.actionColumn}get actionColumnConfig(){return this.viewModel.actionColumnConfig}set actionColumnConfig(e){this.viewModel.actionColumnConfig=e}get activeFilters(){return this.viewModel.activeFilters}get activeSortOrders(){return this.viewModel.activeSortOrders}get allColumns(){return this.viewModel.allColumns}get allRelatedTablesVisible(){return this.viewModel.allRelatedTablesVisible}get allVisibleColumns(){return this.viewModel.allVisibleColumns}get attachmentsEnabled(){return this.viewModel.attachmentsEnabled}set attachmentsEnabled(e){this.viewModel.attachmentsEnabled=e}get attachmentsViewOptions(){return this.viewModel.attachmentsViewOptions}set attachmentsViewOptions(e){this.viewModel.attachmentsViewOptions=e}get attributeTableTemplate(){return this.viewModel.attributeTableTemplate}set attributeTableTemplate(e){this.viewModel.attributeTableTemplate=e}get autoRefreshEnabled(){return this.viewModel.autoRefreshEnabled}set autoRefreshEnabled(e){this.viewModel.autoRefreshEnabled=e}get clearPrompt(){return this.viewModel.clearPrompt}set clearPrompt(e){this.viewModel.clearPrompt=e}get columnPerformanceModeEnabled(){return this.viewModel.columnPerformanceModeEnabled}set columnPerformanceModeEnabled(e){this.viewModel.columnPerformanceModeEnabled=e}get columnReorderingEnabled(){return this.viewModel.columnReorderingEnabled}set columnReorderingEnabled(e){this.viewModel.columnReorderingEnabled=e}get columns(){return this.viewModel.columns}get definitionExpression(){return this.viewModel.definitionExpression}set definitionExpression(e){this.viewModel.definitionExpression=e}get editingEnabled(){return this.viewModel.editingEnabled}set editingEnabled(e){this.viewModel.editingEnabled=e}get effectiveSize(){return this.viewModel.effectiveSize}get effectiveTable(){return this.relatedTable||this}get filterGeometry(){return this.viewModel.filterGeometry}set filterGeometry(e){this.viewModel.filterGeometry=e}get filterBySelectionEnabled(){return this.viewModel.filterBySelectionEnabled}set filterBySelectionEnabled(e){this.viewModel.filterBySelectionEnabled=e}get hiddenFields(){return this.viewModel.hiddenFields}set hiddenFields(e){this.viewModel.hiddenFields=e}get highlightEnabled(){return this.viewModel.highlightEnabled}set highlightEnabled(e){this.viewModel.highlightEnabled=e}get highlightIds(){return this.viewModel.highlightIds}set highlightIds(e){this.viewModel.highlightIds=e}get icon(){return"table"}set icon(e){this._overrideIfSome("icon",e)}get initialSize(){return this.viewModel.initialSize}set initialSize(e){this.viewModel.initialSize=e}get isQueryingOrSyncing(){return this.viewModel.isQueryingOrSyncing}get isSyncingAttachments(){return this.viewModel.isSyncingAttachments}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get layer(){return this.viewModel.layer}set layer(e){this.viewModel.layer=e}get layers(){return this.viewModel.layers}set layers(e){this.viewModel.layers=e}get layerView(){return this.viewModel.layerView}get maxSize(){return this.viewModel.maxSize}set maxSize(e){this.viewModel.maxSize=e}get messages(){return this.viewModel.messages}set messages(e){this.viewModel.messages=e}get messagesCommon(){return this.viewModel.messagesCommon}set messagesCommon(e){this.viewModel.messagesCommon=e}get messagesUnits(){return this.viewModel.messagesUnits}set messagesUnits(e){this.viewModel.messagesUnits=e}get messagesURIUtils(){return this.viewModel.messagesURIUtils}set messagesURIUtils(e){this.viewModel.messagesURIUtils=e}get multipleSelectionEnabled(){return this.viewModel.multipleSelectionEnabled}set multipleSelectionEnabled(e){this.viewModel.multipleSelectionEnabled=e}get multiSortEnabled(){return this.viewModel.multiSortEnabled}set multiSortEnabled(e){this.viewModel.multiSortEnabled=e}get multipleSortPriority(){return this.viewModel.multipleSortPriority}set multipleSortPriority(e){this.viewModel.multipleSortPriority=e}get noDataMessage(){return this.viewModel.noDataMessage}set noDataMessage(e){this.viewModel.noDataMessage=e}get objectIds(){return this.viewModel.objectIds}set objectIds(e){this.viewModel.objectIds=e}get outFields(){return this.viewModel.outFields}set outFields(e){this.viewModel.outFields=e}get pageCount(){return this.viewModel.pageCount}get pageIndex(){return this.viewModel.pageIndex}set pageIndex(e){this.viewModel.pageIndex=e}get pageSize(){return this.viewModel.pageSize}set pageSize(e){this.viewModel.pageSize=e}get paginationEnabled(){return this.viewModel.paginationEnabled}set paginationEnabled(e){this.viewModel.paginationEnabled=e}get prompt(){return this.viewModel.prompt}set prompt(e){this.viewModel.prompt=e}get relatedRecordsEnabled(){return this.viewModel.relatedRecordsEnabled}set relatedRecordsEnabled(e){this.viewModel.relatedRecordsEnabled=e}get relatedTable(){return this.viewModel.relatedTable}get relatedTables(){return this.viewModel.relatedTables}set relatedTables(e){this.viewModel.relatedTables=e}get relationship(){return this.viewModel.relationship}get relationshipColumnConfigs(){return this.viewModel.relationshipColumnConfigs}set relationshipColumnConfigs(e){this.viewModel.relationshipColumnConfigs=e}get relationshipConfig(){return this.viewModel.relationshipConfig}set relationshipConfig(e){this.viewModel.relationshipConfig=e}get relationshipInfos(){return this.viewModel.relationshipInfos}get returnGeometryEnabled(){return this.viewModel.returnGeometryEnabled}set returnGeometryEnabled(e){this.viewModel.returnGeometryEnabled=e}get returnMEnabled(){return this.viewModel.returnMEnabled}set returnMEnabled(e){this.viewModel.returnMEnabled=e}get returnZEnabled(){return this.viewModel.returnZEnabled}set returnZEnabled(e){this.viewModel.returnZEnabled=e}get rowHighlightIds(){return this.viewModel.rowHighlightIds}set rowHighlightIds(e){this.viewModel.rowHighlightIds=e}get selectionSource(){return this.viewModel.selectionSource}set selectionSource(e){this.viewModel.selectionSource=e}get showAllRelatedTables(){return this.viewModel.showAllRelatedTables}set showAllRelatedTables(e){this.viewModel.showAllRelatedTables=e}get showPrompt(){return this.viewModel.showPrompt}set showPrompt(e){this.viewModel.showPrompt=e}get showRelatedTableCallback(){return this.viewModel.showRelatedTableCallback}set showRelatedTableCallback(e){this.viewModel.showRelatedTableCallback=e}get size(){return this.viewModel.size}get state(){return this.viewModel.state}get supportsAddAttachments(){return this.viewModel.supportsAddAttachments}get supportsAttachments(){return this.viewModel.supportsAttachments}get supportsDeleteAttachments(){return this.viewModel.supportsDeleteAttachments}get supportsResizeAttachments(){return this.viewModel.supportsResizeAttachments}get supportsUpdateAttachments(){return this.viewModel.supportsUpdateAttachments}get syncTemplateOnChangesEnabled(){return this.viewModel.syncTemplateOnChangesEnabled}set syncTemplateOnChangesEnabled(e){this.viewModel.syncTemplateOnChangesEnabled=e}get tableController(){return this.viewModel.tableController}set tableController(e){this.viewModel.tableController=e}get tableParent(){return this.viewModel.tableParent}set tableParent(e){this.viewModel.tableParent=e}get tableTemplate(){return this.viewModel.tableTemplate}set tableTemplate(e){this.viewModel.tableTemplate=e}get tableTemplateOverride(){return this.viewModel.tableTemplateOverride}set tableTemplateOverride(e){this.viewModel.tableTemplateOverride=e}get timeExtent(){return this.viewModel.timeExtent}set timeExtent(e){this.viewModel.timeExtent=e}get timeZone(){return this.viewModel.timeZone}set timeZone(e){this.viewModel.timeZone=e}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}get visibleColumns(){return this.viewModel.visibleColumns}get visibleElementsOverride(){const{attachmentsViewOptions:e,relatedTable:t,tableController:i,visibleElements:l}=this,{columnDescriptions:o,columnMenus:n,tooltips:s}=l,a=null!=e.objectId;if(t)return new _({columnDescriptions:o,columnMenus:n,tooltips:s,close:l.close,header:l.header,layerDropdown:l.layerDropdown,layerDropdownIcons:l.layerDropdownIcons,menu:l.menu,menuItems:l.menuItems,progress:l.progress,selectionColumn:!1,columnMenuItems:new y({sortAscending:!1,sortDescending:!1})});if(i){const e=i.relatedTable===this,t=i.allRelatedTablesVisible,r=e&&l.selectionColumn&&!t&&!a,c=e&&!t&&!a;return new _({columnDescriptions:o,columnMenus:n,tooltips:s,selectionColumn:r,close:!1,header:!1,layerDropdown:!1,menu:!1,progress:!1,columnMenuItems:new y({sortAscending:c,sortDescending:c})})}return a?new _({columnDescriptions:o,columnMenus:n,tooltips:s,close:l.close,header:l.header,layerDropdown:l.layerDropdown,layerDropdownIcons:l.layerDropdownIcons,menu:l.menu,menuItems:l.menuItems,progress:l.progress,selectionColumn:!1,columnMenuItems:new y({sortAscending:!1,sortDescending:!1})}):null}clearSelectionFilter(){this.viewModel.clearSelectionFilter()}async deleteAttachments(e,t,i){null!=e&&t?.length&&(i?this._showDeleteAttachmentPrompt(e,t):await this.viewModel.deleteAttachments(e,t))}deleteSelection(e){return this.highlightIds.length?e?(this._showDeletePrompt(),this.scheduleRender(),Promise.resolve()):this.viewModel.deleteSelection():Promise.resolve()}async downloadAttachmentById(e,t){return this.viewModel.downloadAttachmentById(e,t)}drainRelatedTables(){this.viewModel.drainRelatedTables()}exportSelectionToCSV(e){return this.viewModel.exportSelectionToCSV(e)}filterBySelection(){this.viewModel.filterBySelection()}findColumn(e){return this.viewModel.findColumn(e)}goToPage(e){this.viewModel.goToPage(e)}hideColumn(e){this.grid?.hideColumn(e)}nextPage(){this.viewModel.nextPage()}previousPage(){this.viewModel.previousPage()}async refresh(){await this.viewModel.refresh()}refreshCellContent(){this.viewModel.refreshCellContent()}async saveAttachmentsViewForm(){await this.viewModel.saveAttachmentsViewForm()}showAllColumns(){this.viewModel.showAllColumns()}showColumn(e){this.grid?.showColumn(e)}sortColumn(e,t){this.viewModel.sortColumn(e,t)}scrollLeft(){this.viewModel.scrollLeft()}scrollToBottom(){this.viewModel.scrollToBottom()}scrollToIndex(e){this.viewModel.scrollToIndex(e)}scrollToRow(e){this.viewModel.scrollToRow(e)}scrollToTop(){this.viewModel.scrollToTop()}toggleColumnVisibility(e){this.viewModel.toggleColumnVisibility(e)}zoomToSelection(){this.effectiveTable.viewModel.zoomToSelection()}render(){const{_effectiveVisibleElements:e,isQueryingOrSyncing:t,menuConfig:i,state:l}=this;return O("div",{bind:this,class:this.classes($.base,I.widget)},O("calcite-panel",{bind:this,class:$.content,closable:e.close,description:this._effectiveDescription,disabled:this.disabled||"disabled"===l&&!this._effectiveLayers?.length,heading:e.header?this._effectiveTitle:void 0,loading:"loading"===l,menuOpen:!!i?.open,overlayPositioning:"fixed",onCalcitePanelClose:e=>{e.currentTarget.closed=!1,this.emit("close")}},e.progress?O("calcite-progress",{type:t?"indeterminate":"determinate"}):null,this._showLayerDropdown?this._renderLayerDropdown():null,this._renderColumnVisibilityAction(),this._renderHeaderMenuActions(),this._renderNavigationBar(),this._renderTables(),this._renderError()),this._renderColumnVisibilityPopover(),this._renderPrompt())}_renderTables(){const{grid:e,relatedTables:t}=this,i=this.classes($.tableContainer);if(t.length){const l=this.classes($.base,this.allRelatedTablesVisible?$.expanded:$.collapsed,this._shouldShowAttachmentsView?$.tableContainerWithAttachments:void 0);return O("div",{class:i},O("calcite-panel",{overlayPositioning:"fixed"},O("div",null,[this._shouldShowGrid?O("div",{class:l},e?.render(),this._renderPagination()):void 0,...this._filteredTables.map((e=>{const i=t.indexOf(e);return O("div",{class:l,key:`related-${i}`},e.render())})),,])))}return null!=this.attachmentsViewOptions.objectId?O("div",{class:i},O("calcite-panel",{overlayPositioning:"fixed"},O("div",null,[O("div",{class:this.classes($.base,$.collapsed)},e?.render(),this._renderPagination()),this._renderAttachmentsView()]))):[O("div",{class:i},e?.render()),this._renderPagination()]}_renderPagination(){if(this.paginationEnabled)return O("calcite-pagination",{pageSize:1,startItem:this.pageIndex+1,totalItems:this.pageCount,onCalcitePaginationChange:e=>this.goToPage(e.currentTarget.startItem-1)})}_renderError(){const{messages:e}=this;return O("calcite-alert",{autoClose:!0,autoCloseDuration:"fast",icon:U.exclamationMarkTriangle,kind:"danger",label:e.errorOccured,open:this._hasAttachmentsViewError,slot:"alerts",onCalciteAlertClose:()=>{this.attachmentsViewOptions.error=null}},O("span",{slot:"message"},e.errorOccured))}_renderPrompt(){return this.prompt?O(v,{...this.prompt,headingLevel:2}):void 0}_showDeletePrompt(){const{messages:e,messagesCommon:t}=this,i=F(e.deleteSelectionCount,{count:this.highlightIds.length});this.showPrompt({title:i,message:e.deleteRecordsRemoved,context:"danger",actions:{primary:{label:t.delete,action:this._onDeleteSelectionClick},secondary:{label:e.keepRecords,action:()=>this.clearPrompt()}}})}_showDeleteAttachmentPrompt(e,t){const{messages:i,messagesCommon:l}=this,o=F(i.deleteAttachmentCount,{count:t.length});this.showPrompt({title:o,message:i.deleteAttachmentConfirmation,context:"danger",actions:{primary:{label:l.delete,action:async()=>{try{await this.deleteAttachments(e,t,!1)}finally{this.clearPrompt()}}},secondary:{label:l.cancel,action:()=>this.clearPrompt()}}})}async _onDeleteSelectionClick(){try{await this.viewModel.deleteSelection()}finally{this.clearPrompt()}}_renderHeaderMenuAction(e){const{disabled:t,hidden:i,icon:l,text:o,clickFunction:n}=e;if(!i)return O("calcite-action",{disabled:t??this.menuConfig?.disabled,icon:l??void 0,key:o,onclick:()=>n(),slot:"header-menu-actions",text:o,textEnabled:!0,title:o})}_renderHeaderMenuActions(){return this._shouldShowMenu?[this._renderDefaultHeaderMenuActions(),this._renderCustomHeaderMenuActions()]:[]}_renderDefaultHeaderMenuActions(){if(!this._hasDefaultMenuItems)return[];const{messages:e}=this;return[this._showRefreshDataAction&&{icon:U.refresh,text:e.refreshData,clickFunction:()=>this.refresh()},this._showDeleteSelectionAction&&{icon:U.delete,text:e.deleteSelection,clickFunction:()=>this.deleteSelection(!0)},this._showClearSelectionAction&&{icon:U.clearSelection,text:e.clearSelection,clickFunction:()=>this.highlightIds?.removeAll()},this._showZoomToSelectionAction&&{icon:U.zoomToSelection,text:e.zoomToSelection,clickFunction:()=>this.zoomToSelection()},this._showSelectedRecordsShowSelectedAction&&{icon:U.showSelected,text:e.showSelected,clickFunction:()=>{const{objectIds:e}=this;e.removeAll(),e.addMany(this.highlightIds.toArray())}},this._showSelectedRecordsShowAllAction&&{icon:U.showAll,text:e.showAllRecords,clickFunction:()=>this.objectIds.removeAll()},this._showExportSelectionToCSVAction&&{icon:U.exportToCSV,text:e.exportSelectionCSV,clickFunction:()=>this.exportSelectionToCSV()}].filter(t).map((e=>e&&this._renderHeaderMenuAction(e)))}_renderCustomHeaderMenuActions(){return this.menuConfig?.items?.map((({disabled:e,hidden:t,icon:i,label:l,clickFunction:o})=>this._renderHeaderMenuAction({hidden:"function"==typeof t?t():t,icon:i,text:l,disabled:e,clickFunction:e=>o(e)})))??[]}_renderColumnVisibilityAction(){if(!this._showColumnsVisibilityAction)return[];const{_columnVisibilityActions:e,effectiveTable:t,id:i}=this,l=this.messages.toggleColumns;return O("calcite-action",{afterCreate:t=>e.set(i,t),afterRemoved:()=>e.delete(i),appearance:"transparent",bind:this,disabled:t.menuConfig?.disabled,icon:U.showColumn,id:`${i}__toggle-columns-action`,slot:"header-actions-end",text:l},this._effectiveVisibleElements.tooltips?O("calcite-tooltip",{closeOnClick:!0,overlayPositioning:"fixed",placement:"bottom-end",slot:"tooltip"},l):null)}_renderColumnVisibilityPopover(){if(!this._showColumnsVisibilityAction||this.effectiveTable.menuConfig?.disabled)return;const{effectiveTable:e}=this,t=this.messages.toggleColumns;return O("calcite-popover",{autoClose:!0,class:$.menuPopover,label:t,overlayPositioning:"fixed",placement:"top-end",pointerDisabled:!0,referenceElement:this._columnVisibilityActions.get(this.id)},O("calcite-list",{displayMode:"nested",filterEnabled:!0,filterPlaceholder:t,label:t,selectionMode:"multiple"},e.columns.toArray().map((t=>{const i=M(t)?t.columns?.map((t=>this._renderColumnListItem({column:t,table:e,ignoreSelect:!0}))):void 0;return this._renderColumnListItem({column:t,table:e,items:i})}))))}_renderColumnListItem(e){const{column:t,table:i,items:l,ignoreSelect:o}=e,{effectiveLabel:n,fieldName:s,hidden:a}=t;return O("calcite-list-item",{expanded:!(!l?.length||a)||void 0,key:`toggle-columns__item-${s}`,label:n,selected:!a,value:s,onCalciteListItemSelect:e=>{o&&e.stopPropagation(),i.toggleColumnVisibility(e.currentTarget.value)}},l)}_renderLayerDropdown(){const e=this.messages.selectALayer;return O("div",{class:$.layerDropdownMenu,key:`${this.id}-layerDropdown`,slot:"header-actions-start"},O("calcite-dropdown",{bind:this,maxItems:5,overlayPositioning:"fixed",placement:"bottom-start"},O("calcite-action",{icon:U.layers,slot:"trigger",text:e,title:e}),O("calcite-dropdown-group",{selectionMode:"single"},this._effectiveLayers.map(((e,t)=>this._renderLayerDropdownItem(e,t)))??null)))}_renderLayerDropdownItem(e,t){const i=this.visibleElements.layerDropdownIcons;return O("calcite-dropdown-item",{iconStart:i?V(e):void 0,key:`dropdown-item-${t}`,label:e.title??"",selected:e===this.layer,value:e.id,onCalciteDropdownItemSelect:()=>{this.layer=e}},e.title)}_onRelatedNavigationItemClick(e){this.viewModel.drainRelatedTablesAboveIndex(e)}_collapseRelatedTable(e){this.viewModel.collapseRelatedTable(this.effectiveTable,e)}_onShowRelatedTable(e){this.showRelatedTableCallback||(this._collapseRelatedTable(e),this._createRelatedTable(e))}async _createRelatedTable(e){const{editingEnabled:t,effectiveTable:i,paginationEnabled:l,pageSize:o,view:n,viewModel:s}=this,{layer:a,objectId:r,relatedLayer:c,relationshipId:d}=e;await a.load();const h=this.attachmentsEnabled&&S(a),p=new j({layer:a,attachmentsEnabled:h,editingEnabled:t,paginationEnabled:l,pageSize:o,relatedRecordsEnabled:!0,relationshipConfig:{objectId:r,relatedLayer:c,relationshipId:d},relationshipColumnConfigs:T(a,d),tableController:this,tableParent:i,view:n,showRelatedTableCallback:e=>s.emit("show-related-table",e)});this.relatedTables.add(p),this.scheduleRender()}_renderAttachmentsView(){const{attachmentInfos:e,mode:t,objectId:i}=this.attachmentsViewOptions;return"file"!==t&&e.length&&null!=i?this._renderAttachmentsViewList():this._renderAttachmentsViewFilePane()}_renderAttachmentsViewFilePane(){const{attachmentsViewOptions:e,isSyncingAttachments:t,supportsAddAttachments:i,messages:l,messagesUnits:o}=this,{attachmentId:n,attachmentInfos:a,candidates:r,objectId:c}=e,d=a.find((e=>e.id===n)),h=a.length,p=r?.length,m=d?O("calcite-label",{alignment:"center",key:"replace-file-node",scale:"l"},l.replaceFile):void 0,u=p?void 0:O("calcite-label",{alignment:"center",key:"message-node",scale:"m"},i?null==c?l.noFeature:l.dragAndDropToUpload:l.editingRestricted),g=Array.from(r??[]).pop(),b=g?O("calcite-label",{key:"filename-node"},g.name):void 0,w=i&&null!=c,v=w&&p,y=O("input",{afterCreate:x,afterRemoved:k,afterUpdate:x,bind:this,"data-node-ref":"_attachmentsInput",files:r,hidden:!0,name:"attachment",onchange:e=>this._onAttachmentsViewCandidateChange(e),type:"file"}),f=w?O("calcite-button",{appearance:"outline-fill",bind:this,disabled:t,iconStart:U.folderOpen,key:"select-node",loading:!1,onclick:()=>{this._attachmentsInput&&(this._attachmentsInput.value="",this._attachmentsInput.click())},width:"full"},l.selectFile):void 0,_=v?O("calcite-button",{appearance:"outline-fill",bind:this,disabled:t,iconStart:U.save,key:"save-node",loading:t,onclick:()=>{this.saveAttachmentsViewForm()},width:"full"},d?l.updateAttachment:l.addAttachment):void 0,M=h||p?O("calcite-button",{appearance:"transparent",bind:this,disabled:t,key:"cancel-node",onclick:()=>{this._attachmentsInput&&(this._attachmentsInput.value=""),e.reset(),e.attachmentInfos?.length&&(e.mode="list")},width:"full"},this.messagesCommon.cancel):void 0;return[O("div",{class:$.attachmentsView,key:"attachments-view"},O("div",{class:$.attachmentsViewContent,key:"attachments-view-content"},O("div",{bind:this,class:$.attachmentsViewDropArea,ondragover:e=>e.preventDefault(),ondrop:this._onAttachmentsViewDrop},O("calcite-icon",{class:$.attachmentsViewIcon,icon:U.upload,scale:"l"}),m,u,O("form",{afterCreate:t=>e.form=t,afterRemoved:()=>e.form=null,bind:this,key:"attachments-form"},O("fieldset",null,b,y,f,_,M)))),null!=c&&null!=d?O("div",{class:$.attachmentsViewInformation,key:"information"},this._renderAttachmentsViewThumbnail(d,200),O("label",{key:"file-label"},l.fileName),O("span",{key:"file-span"},d.name),O("label",{key:"size-label"},l.size),O("span",{key:"size-span"},s(o,d.size??0))):void 0)]}_renderAttachmentsViewList(){const{attachmentsViewOptions:e,isSyncingAttachments:t,messages:i,messagesUnits:l,supportsDeleteAttachments:o,supportsUpdateAttachments:n}=this,{attachmentInfos:a,objectId:r}=e;return O("calcite-list",{afterCreate:x,afterRemoved:k,afterUpdate:x,bind:this,class:$.attachmentsViewList,"data-node-ref":"attachmentsList",key:`attachments-list-${r}`,label:i?.attachments,loading:t,ondragover:e=>e.preventDefault(),ondrop:this._onAttachmentsViewDrop,selectionMode:"multiple",onCalciteListChange:()=>this.scheduleRender()},...a?.map((t=>{const{id:a,name:c,size:d,url:h}=t,p=s(l,d??0);return O("calcite-list-item",{afterRemoved:()=>this.scheduleRender(),key:`attachment-${a}`,label:c,value:a},this._renderAttachmentsViewListThumbnail(t),O("span",{class:$.attachmentsViewListFileSize,slot:"actions-end",title:p},p),O("calcite-action",{appearance:"transparent",icon:U.downloadTo,key:`download-attachment-${a}`,label:`${c}`,onclick:e=>{e.preventDefault(),this.downloadAttachmentById(r??-1,a)},slot:"actions-end",text:i.downloadAttachment,title:i.downloadAttachment}),n&&null!=r?O("calcite-action",{appearance:"transparent",disabled:!n,icon:U.replaceImage,key:`replace-attachment-${a}`,label:`${c}`,onclick:()=>{e.mode="file",e.attachmentId=a},slot:"actions-end",text:i.updateAttachment,title:i.updateAttachment}):void 0,O("calcite-action",{appearance:"transparent",icon:U.launch,key:`launch-attachment-${a}`,label:`${c}`,onclick:()=>{h&&window.open(h,"_blank")},slot:"actions-end",text:i.viewAttachment,title:i.viewAttachment}),o&&null!=r?O("calcite-action",{appearance:"transparent",class:$.attachmentsViewListItemDelete,disabled:!o,icon:U.delete,key:`delete-attachment-${a}`,label:`${c}`,onclick:()=>{this.deleteAttachments(r,[a],!0)},slot:"actions-end",text:i.deleteAttachment,title:i.deleteAttachment}):void 0)})))}_renderAttachmentsViewListThumbnail(e){return O("div",{class:$.attachmentsViewListThumbnail,slot:"content-start"},O("a",{href:e.url??"",rel:"noreferrer",target:"_blank"},this._renderAttachmentsViewThumbnail(e)))}_renderAttachmentsViewThumbnail(e,t=64){const{contentType:i,name:l,size:o,url:n}=e,s=`${n}${n?.includes("?")?"&":"?"}w=${t}&s=${o}`;return this.supportsResizeAttachments&&g(i)?O("img",{alt:l,key:`thumbnail-image-${l}`,src:s,title:l}):O("calcite-icon",{icon:b(i),key:`thumbnail-icon-${l}`,scale:"l",textLabel:l,title:l})}_onAttachmentsViewCandidateChange({target:e}){this.attachmentsViewOptions.candidates=e?.files}_onAttachmentsViewDrop(e){e.preventDefault(),(this.supportsAddAttachments||this.supportsUpdateAttachments)&&this.attachmentsViewOptions.set({mode:"file",candidates:e.dataTransfer?.files})}_renderNavigationBar(){const{effectiveTable:e,messages:t,messagesCommon:i,navigationScale:l,relatedTable:o,relatedTables:n}=this;if(!this._shouldShowNavigationBar)return;const{attachmentsList:s,attachmentsViewOptions:a,layer:r,supportsAddAttachments:c,supportsDeleteAttachments:d}=e;if(!r)return;const{attachmentInfos:h,objectId:p}=a,m=null!=p,u=h.length,g=s?.selectedItems?.length??0,b=`${r.objectIdField}: ${p}`,w=F(t.selectedCount,{count:g}),v=F(t.attachmentsCount,{count:u}),y=m?O("calcite-action",{bind:this,icon:U.chevronRight,iconFlipRtl:!0,key:"navigation-feature",onclick:()=>e.scrollToRow(p),scale:l,text:b,textEnabled:!0,title:b}):void 0,f=m?O("calcite-action",{icon:U.chevronRight,iconFlipRtl:!0,key:"navigation-attachments-label",label:v,onclick:()=>{u>0&&(a.mode="list")},scale:l,text:v,textEnabled:!0,title:v}):void 0,_=m?O("calcite-chip",{closable:!0,closed:0===g,key:"navigation-chip",kind:"inverse",label:w,scale:l,selected:!0,title:w,value:"selected",onCalciteChipClose:()=>s?.selectedItems?.forEach((e=>e.selected=!1))},w):void 0,M=o?O("calcite-label",{layout:"inline",scale:l},t.showAllTables,O("calcite-switch",{checked:this.allRelatedTablesVisible,scale:l,onCalciteSwitchChange:e=>this.showAllRelatedTables=!!e.currentTarget.checked})):void 0,C=m&&"list"===a.mode&&null!=p&&g&&d?O("calcite-action",{icon:U.delete,iconFlipRtl:!0,key:"attachments-trash-all",onclick:()=>{e.deleteAttachments(p,s?.selectedItems?.map((e=>e.value))??[],!0)},scale:l,text:i.delete,textEnabled:!0,title:F(t.deleteAttachmentCount,{count:g})}):void 0,A=m&&"list"===a.mode&&c?O("calcite-action",{bind:this,icon:U.plus,iconFlipRtl:!0,key:"attachments-add",onclick:()=>{a.attachmentId=null,a.mode="file"},scale:l,text:t.addAttachment,textEnabled:!0,title:t.addAttachment}):void 0;return O("div",{class:$.tableNavigation,key:"table-nav"},O("calcite-action",{icon:U.moveUp,iconFlipRtl:!0,key:"go-back",onclick:()=>{o&&this.drainRelatedTables(),e.attachmentsViewOptions.objectId=null},scale:l,text:this.layer?.title??"",textEnabled:!1,title:o?t.exitRelatedRecords:t.exitAttachments}),n.toArray().map(((e,t)=>this._renderRelatedTableNavigationAction(e,t))),y,f,O("div",null,_,M,C,A))}_renderRelatedTableNavigationAction(e,t){const i=this._getLabelForRelatedTableNavigationAction(e);return O("calcite-action",{icon:U.chevronRight,iconFlipRtl:!0,key:t,onclick:()=>this._onRelatedNavigationItemClick(t),scale:this.navigationScale,text:i,textEnabled:!0,title:e.layer?.title||""})}_getLabelForRelatedTableNavigationAction(e){const t=e.layer?.title;if(!t)return"";const{relatedTables:i}=this;if(i.length<=1)return t;return i.indexOf(e)!==i.length-1&&t.length>20?`${t.slice(0,20)}...`:t}};e([a()],B.prototype,"_attachmentsInput",void 0),e([a()],B.prototype,"_columnVisibilityActions",void 0),e([a()],B.prototype,"_effectiveDescription",null),e([a()],B.prototype,"_effectiveLayers",null),e([a()],B.prototype,"_effectiveTitle",null),e([a()],B.prototype,"_effectiveVisibleElements",null),e([a()],B.prototype,"_filteredTables",null),e([a()],B.prototype,"_hasAttachmentsViewError",null),e([a()],B.prototype,"_hasCustomMenuItems",null),e([a()],B.prototype,"_hasDefaultMenuItems",null),e([a()],B.prototype,"_shouldShowGrid",null),e([a()],B.prototype,"_shouldShowMenu",null),e([a()],B.prototype,"_shouldShowAttachmentsView",null),e([a()],B.prototype,"_showClearSelectionAction",null),e([a()],B.prototype,"_showColumnsVisibilityAction",null),e([a()],B.prototype,"_showDeleteSelectionAction",null),e([a()],B.prototype,"_showExportSelectionToCSVAction",null),e([a()],B.prototype,"_showLayerDropdown",null),e([a()],B.prototype,"_shouldShowNavigationBar",null),e([a()],B.prototype,"_showRefreshDataAction",null),e([a()],B.prototype,"_showSelectedRecordsShowSelectedAction",null),e([a()],B.prototype,"_showSelectedRecordsShowAllAction",null),e([a()],B.prototype,"_showZoomToSelectionAction",null),e([a()],B.prototype,"_viewLayers",null),e([a()],B.prototype,"attachmentsList",void 0),e([a({readOnly:!0})],B.prototype,"grid",null),e([a()],B.prototype,"actionColumn",null),e([a()],B.prototype,"actionColumnConfig",null),e([a({readOnly:!0})],B.prototype,"activeFilters",null),e([a({readOnly:!0})],B.prototype,"activeSortOrders",null),e([a()],B.prototype,"allColumns",null),e([a({readOnly:!0})],B.prototype,"allRelatedTablesVisible",null),e([a()],B.prototype,"allVisibleColumns",null),e([a()],B.prototype,"attachmentsEnabled",null),e([a()],B.prototype,"attachmentsViewOptions",null),e([a({type:m})],B.prototype,"attributeTableTemplate",null),e([a()],B.prototype,"autoRefreshEnabled",null),e([a()],B.prototype,"clearPrompt",null),e([a()],B.prototype,"columnPerformanceModeEnabled",null),e([a()],B.prototype,"columnReorderingEnabled",null),e([a({readOnly:!0})],B.prototype,"columns",null),e([a()],B.prototype,"definitionExpression",null),e([a()],B.prototype,"description",void 0),e([a()],B.prototype,"disabled",void 0),e([a()],B.prototype,"editingEnabled",null),e([a()],B.prototype,"effectiveSize",null),e([a()],B.prototype,"effectiveTable",null),e([a()],B.prototype,"filterGeometry",null),e([a()],B.prototype,"filterBySelectionEnabled",null),e([a()],B.prototype,"hiddenFields",null),e([a()],B.prototype,"highlightEnabled",null),e([a()],B.prototype,"highlightIds",null),e([a()],B.prototype,"icon",null),e([a()],B.prototype,"initialSize",null),e([a()],B.prototype,"isQueryingOrSyncing",null),e([a()],B.prototype,"isSyncingAttachments",null),e([a()],B.prototype,"label",null),e([a()],B.prototype,"layer",null),e([a()],B.prototype,"layers",null),e([a()],B.prototype,"layerView",null),e([a()],B.prototype,"maxSize",null),e([a(),D("esri/widgets/FeatureTable/t9n/FeatureTable")],B.prototype,"messages",null),e([a(),D("esri/t9n/common")],B.prototype,"messagesCommon",null),e([a(),D("esri/core/t9n/Units")],B.prototype,"messagesUnits",null),e([a(),D("esri/widgets/support/t9n/uriUtils")],B.prototype,"messagesURIUtils",null),e([a()],B.prototype,"menuConfig",void 0),e([a()],B.prototype,"multipleSelectionEnabled",null),e([a()],B.prototype,"multiSortEnabled",null),e([a()],B.prototype,"multipleSortPriority",null),e([a()],B.prototype,"navigationScale",void 0),e([a()],B.prototype,"noDataMessage",null),e([a()],B.prototype,"objectIds",null),e([a()],B.prototype,"outFields",null),e([a()],B.prototype,"pageCount",null),e([a()],B.prototype,"pageIndex",null),e([a()],B.prototype,"pageSize",null),e([a()],B.prototype,"paginationEnabled",null),e([a()],B.prototype,"prompt",null),e([a()],B.prototype,"relatedRecordsEnabled",null),e([a()],B.prototype,"relatedTable",null),e([a()],B.prototype,"relatedTables",null),e([a()],B.prototype,"relationship",null),e([a()],B.prototype,"relationshipColumnConfigs",null),e([a()],B.prototype,"relationshipConfig",null),e([a()],B.prototype,"relationshipInfos",null),e([a()],B.prototype,"returnGeometryEnabled",null),e([a()],B.prototype,"returnMEnabled",null),e([a()],B.prototype,"returnZEnabled",null),e([a()],B.prototype,"rowHighlightIds",null),e([a()],B.prototype,"selectionSource",null),e([a()],B.prototype,"showAllRelatedTables",null),e([a()],B.prototype,"showPrompt",null),e([a()],B.prototype,"showRelatedTableCallback",null),e([a()],B.prototype,"size",null),e([a({readOnly:!0})],B.prototype,"state",null),e([a()],B.prototype,"supportsAddAttachments",null),e([a()],B.prototype,"supportsAttachments",null),e([a()],B.prototype,"supportsDeleteAttachments",null),e([a()],B.prototype,"supportsResizeAttachments",null),e([a()],B.prototype,"supportsUpdateAttachments",null),e([a()],B.prototype,"syncTemplateOnChangesEnabled",null),e([a({constructOnly:!0})],B.prototype,"tableController",null),e([a({constructOnly:!0})],B.prototype,"tableParent",null),e([a()],B.prototype,"tableTemplate",null),e([a()],B.prototype,"tableTemplateOverride",null),e([a()],B.prototype,"title",void 0),e([a()],B.prototype,"timeExtent",null),e([a()],B.prototype,"timeZone",null),e([a()],B.prototype,"view",null),e([a({type:f}),P(["cell-click","cell-dblclick","cell-pointerover","cell-pointerout","cell-keydown","column-reorder","show-related-table"])],B.prototype,"viewModel",void 0),e([a()],B.prototype,"visibleColumns",null),e([a({type:_,nonNullable:!0})],B.prototype,"visibleElements",void 0),e([a({type:_})],B.prototype,"visibleElementsOverride",null),B=j=e([r("esri.widgets.FeatureTable")],B);const N=B;export{N as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import e from"../../../Color.js";import{round as l,numDigits as
|
|
5
|
+
import e from"../../../Color.js";import{getColorLuminance as t}from"../../../core/colorUtils.js";import{round as l,numDigits as i,percentChange as o}from"../../../renderers/support/numberUtils.js";import{updateReferenceSizeSymbol as s}from"../../../smartMapping/renderers/support/referenceSizeUtils.js";import{getSpikeSymbolBaseWidth as n,updateSpikeSymbol as r}from"../../../smartMapping/renderers/support/spikeUtils.js";import a from"../../../symbols/SimpleLineSymbol.js";import u from"../../../symbols/SimpleMarkerSymbol.js";import{applyCIMSymbolColor as c}from"../../../symbols/support/cimSymbolUtils.js";import{isSymbol3D as m}from"../../../symbols/support/typeUtils.js";import{isVolumetricSymbol as p,getSymbolOutlineSize as f}from"../../../symbols/support/utils.js";import{getAuthoringInfoVisualVariableByTheme as y,getSymbolForFlowRenderer as b,createStopLabel as h}from"./utils.js";import"../../support/widgetUtils.js";import{isDarkMode as d}from"../../../support/modeUtils.js";const g=30,w=12,S=24,v=10,z=[255,255,255],k=[200,200,200],j=[128,128,128],V=20,x=5;function I(e){return"esri.symbols.SimpleMarkerSymbol"===e.declaredClass}function U(e){return"esri.symbols.PictureMarkerSymbol"===e.declaredClass}function M(e){return"esri.symbols.SimpleLineSymbol"===e.declaredClass}function C(e){return"esri.symbols.TextSymbol"===e.declaredClass}function L(e,t){const l=e.length-1;return e.map(((e,i)=>h(e,i,l,t)))}async function D(e,t,i,o,s,r,a){const u=t.legendOptions,c=u?.customValues,m=a||await E(e,i),b=t.stops,h=!!m,d=!!c,g=null!=t.minSize&&null!=t.maxSize,w=b&&b.length>1,z=!!t.target;if(!h||!d&&!(g||w&&!z))return;const k=p(m);let j=!1,V=null,x=null;V=k&&!w?l([t.minDataValue,t.maxDataValue]):c??await O(t,m,o,s?.type);const I=e?.authoringInfo,U="univariate-color-size"===I?.type,M=U&&"above-and-below"===I?.univariateTheme,C=!!y(e,"reference-size"),D=!!y(e,"spike");if(!V&&w&&(V=b.map((e=>e.value)),j=b.some((e=>!!e.label)),"flow"===e.type&&(V=l(V)),j&&(x=b.map((e=>e.label)))),k&&null!=V&&V?.length>2&&!M&&(V=[V[0],V[V.length-1]]),!V)return null;U&&5!==V?.length&&(V=A({minSize:V[0],maxSize:V[V.length-1]}));const q=k?T(e,V):null,B=f(m),P=j?null:L(V,r);return(await Promise.all(V.map((async(l,i)=>{let r=k?q[i]:await J(t,m,l,o,s?.type),a=r;C&&(r*=S/t.maxSize||1,a=S),D&&"cim"===m.type&&(a={width:n(m)??v,height:r});return{value:l,symbol:K(m,r,e,i),label:j?x[i]:P[i],size:a,outlineSize:B}})))).reverse()}function T(e,t){const l=e?.authoringInfo,i="univariate-color-size"===l?.type;let o=[w,g];if(i){const e=t[0],l=t[t.length-1],i=w,s=g;o=t.map((t=>i+(t-e)/(l-e)*(s-i)))}return i&&"below"===l?.univariateTheme&&o.reverse(),o}function q(t,l,i,o){const n="class-breaks"===t.type,r=n?t.classBreakInfos?.[0]?.symbol?.clone():t.uniqueValueInfos?.[0]?.symbol?.clone();return r&&"type"in r&&"cim"===r.type?(s(r,{color:o??(n?null:new e(k)),innerDotSize:l*(S/i)||1,outerRingSize:S}),r):null}function B(e,t){const l=e.classBreakInfos,i=l.length,o=i<2||!(t>=2)?l[0].symbol.clone():l[i-1].symbol.clone(),s=e.visualVariables?.some((e=>"color"===e.type));return s&&(o.type.includes("3d")?R(o):H(o)),o}async function E(l,i){if("flow"===l.type)return b(l,i);if("pie-chart"===l.type)return new u({color:null,outline:l.outline?.width?l.outline:new a});let o=null,n=null;if("simple"===l.type)o=l.symbol;else if("class-breaks"===l.type){const e=l.classBreakInfos;o=e&&e[0]&&e[0].symbol,n=e.length>1}else if("unique-value"===l.type){const e=l.uniqueValueInfos;o=e?.[0]?.symbol,n=null!=e&&e.length>1}if(!o||P(o))return null;if(o=o.clone(),i||n)if(o.type.includes("3d"))R(o);else if(y(l,"reference-size")&&"cim"===o.type)s(o,{color:i??("class-breaks"!==l.type?new e(k):null)});else if(y(l,"spike")&&"cim"===o.type){const s=new e(k);let n,a=i??void 0;if(a){const e=t(a),l=d();if(!l&&e>225||l&&e<25){const e="CIMPointSymbol"===o.data.symbol?.type?o.data.symbol.symbolLayers:null,t=e?.some((e=>"CIMSolidFill"===e?.type));t?a=s:n=s}}else a="class-breaks"!==l.type?s:void 0;r(o,{color:a,strokeColor:n})}else H(o);return o}function P(e){return m(e)?e.symbolLayers?.some((e=>"fill"===e?.type))??!1:e?.type.includes("fill")??!1}function R(e){"line-3d"===e.type?e.symbolLayers.forEach((e=>{e.material={color:j}})):e.symbolLayers.forEach((e=>{"icon"!==e.type||e.resource?.href?e.material={color:k}:(e.material={color:z},e.outline={color:j,size:1.5})}))}function H(t){const l=d();if("cim"===t.type)c(t,new e(k));else if(t.type.includes("line"))t.color=j;else if(t.color=l?j:z,"simple-marker"===t.type)if(t.outline){const e=t.outline?.color?.toHex();"#ffffff"===e&&(t.outline.color=j)}else t.outline={color:j,width:1.5}}async function O(e,t,i,o){const s=(await import("../../../renderers/visualVariables/support/visualVariableUtils.js")).getSizeRangeAtScale(e,i,o),n=s&&A(s);if(!s||!n)return;let r=n.map((t=>F(t,e,s)));r=l(r);for(let l=1;l<r.length-1;l++){const s=await G(e,t,r[l],r[l-1],i,o);s&&(r[l]=s[0],n[l]=s[1])}return r}function A(e){const t=e.minSize,l=e.maxSize,i=x,o=(l-t)/(i-1),s=[];for(let n=0;n<i;n++)s.push(t+o*n);return s}function F(e,t,l){const i=l.minSize,o=l.maxSize,s=t.minDataValue,n=t.maxDataValue;let r;if(e<=i)r=s;else if(e>=o)r=n;else{r=(e-i)/(o-i)*(n-s)+s}return r}async function G(e,t,s,n,r,a){const u=await J(e,t,s,r,a),c=await J(e,t,n,r,a),m=i(s),p=m.fractional,f=V;let y=m.integer,b=null,h=null;s>0&&s<1&&(b=10**p,y=i(s*=b).integer);for(let i=y-1;i>=0;i--){const n=10**i;let m=Math.floor(s/n)*n,p=Math.ceil(s/n)*n;null!=b&&(m/=b,p/=b);let y=(m+p)/2;[,y]=l([m,y,p],{indexes:[1]});const d=await J(e,t,m,r,a),g=await J(e,t,p,r,a),w=await J(e,t,y,r,a),S=o(u,d,c,null),v=o(u,g,c,null),z=o(u,w,c,null);let k=S.previous<=f,j=v.previous<=f;if(k&&j&&(S.previous<=v.previous?(k=!0,j=!1):(j=!0,k=!1)),k?h=[m,d]:j?h=[p,g]:z.previous<=f&&(h=[y,w]),h)break}return h}async function J(e,t,l,i,o){const{getSize:s}=await import("../../../renderers/visualVariables/support/visualVariableUtils.js");return s(e,l,{scale:i,view:o,shape:"simple-marker"===t.type?t.style:null})}function K(e,t,l,i){"univariate-color-size"===l?.authoringInfo?.type&&"above-and-below"===l?.authoringInfo?.univariateTheme&&"class-breaks"===l.type&&(e=B(l,i));const o=e.clone();if(m(o))p(o)||o.symbolLayers.forEach((e=>{"fill"!==e.type&&(e.size=t)}));else if(I(o))o.size=t;else if(U(o)){const e=o.width,l=o.height;o.height=t,o.width=t*(e/l)}else M(o)?o.width=t:C(o)?o.font&&(o.font.size=t):"cim"===o.type&&y(l,"reference-size")?s(o,{innerDotSize:t,outerRingSize:S}):"cim"===o.type&&y(l,"spike")&&r(o,{defaultHeight:t,primitiveOverrides:null});return o}export{D as getRampStops,q as getReferenceSizeSymbol,g as realWorldMaxSize,w as realWorldMinSize};
|