@arcgis/core 5.0.0-next.55 → 5.0.0-next.56

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.
Files changed (392) hide show
  1. package/Color.d.ts +12 -4
  2. package/Ground.js +1 -1
  3. package/applications/Components/SelectionOperation.d.ts +5 -0
  4. package/applications/Components/SketchTooltipControls.d.ts +5 -0
  5. package/applications/Components/actionUtils.d.ts +5 -0
  6. package/applications/Components/analysisUtils.d.ts +5 -0
  7. package/applications/Components/arcadeEditorUtils.d.ts +5 -0
  8. package/applications/Components/arcadeFeatureUtils.d.ts +5 -0
  9. package/applications/Components/basemapUtils.d.ts +5 -0
  10. package/applications/Components/drawUtils.d.ts +5 -0
  11. package/applications/Components/featureUtils.d.ts +5 -0
  12. package/applications/Components/fontUtils.d.ts +5 -0
  13. package/applications/Components/formatUtils.d.ts +5 -0
  14. package/applications/Components/getDefaultUnits.d.ts +5 -0
  15. package/applications/Components/gfxUtils.d.ts +5 -0
  16. package/applications/Components/imageryUtils.d.ts +5 -0
  17. package/applications/Components/layerOriginUtils.d.ts +5 -0
  18. package/applications/Components/layersEffectsJsonUtils.d.ts +5 -0
  19. package/applications/Components/previewSymbol2D.d.ts +5 -0
  20. package/applications/Components/reactiveUtils.d.ts +6 -0
  21. package/applications/Components/sanitizerUtils.d.ts +5 -0
  22. package/applications/Components/stringUtils.d.ts +6 -2
  23. package/applications/Components/styleUtils.d.ts +5 -0
  24. package/applications/Components/svgUtils.d.ts +5 -0
  25. package/applications/Components/testUtils.d.ts +5 -0
  26. package/applications/Components/viewUtils.d.ts +5 -0
  27. package/applications/Components/webStyleSymbolUtils.d.ts +5 -0
  28. package/applications/Excalibur/videoViewUtils.d.ts +5 -0
  29. package/applications/ExperienceBuilder/sketchUtils.d.ts +5 -0
  30. package/applications/KnowledgeStudio/generalSdkInternalAccess.d.ts +10 -0
  31. package/applications/KnowledgeStudio/generalSharedKgUtils.d.ts +10 -0
  32. package/applications/KnowledgeStudio/layerInternalAccessUtils.d.ts +11 -1
  33. package/applications/KnowledgeStudio/reshape.d.ts +5 -0
  34. package/applications/KnowledgeStudio/resourceSerializationUtils.d.ts +5 -0
  35. package/applications/MapViewer/layerUtils.d.ts +5 -0
  36. package/applications/MapViewer/mediaUtils.d.ts +5 -0
  37. package/applications/MapViewer/templateUtils.d.ts +5 -0
  38. package/applications/PortalApp/layerUtils.d.ts +5 -0
  39. package/applications/SceneViewer/colorUtils.d.ts +5 -0
  40. package/applications/SceneViewer/devEnvironmentUtils.d.ts +5 -0
  41. package/applications/SceneViewer/layerUtils.d.ts +5 -0
  42. package/applications/SceneViewer/sceneViewerUtils.d.ts +5 -0
  43. package/applications/SceneViewer/symbolUtils.d.ts +5 -0
  44. package/applications/Urban/meshUtils.d.ts +5 -0
  45. package/applications/WebEditor/sketchUtils.d.ts +5 -0
  46. package/arcade.d.ts +22 -0
  47. package/assets/esri/core/workers/RemoteClient.js +1 -1
  48. package/assets/esri/core/workers/chunks/5340887a4a48bde3407a.js +1 -0
  49. package/assets/esri/core/workers/chunks/82ced9254b27707522ef.js +1 -0
  50. package/assets/esri/core/workers/chunks/8628bf45a33af786cd49.js +1 -0
  51. package/assets/esri/core/workers/chunks/{d63cf90d1356d1f10138.js → 8f4c480c418eba299c2b.js} +1 -1
  52. package/assets/esri/core/workers/chunks/{fa92a7c11befbad8739f.js → b4f944ef6c174b20b619.js} +1 -1
  53. package/assets/esri/core/workers/chunks/c531c0e3d420a1be0ad2.js +316 -0
  54. package/assets/esri/core/workers/chunks/{14765f98b8ea447498a1.js → da2c41ac0f82f32013c1.js} +4 -4
  55. package/assets/esri/libs/lyr3d/lyr3DMain.wasm +0 -0
  56. package/assets/esri/libs/lyr3d/lyr3DWorker.wasm +0 -0
  57. package/chunks/ChapmanAtmosphere.glsl.js +5 -7
  58. package/chunks/HUDMaterial.glsl.js +1 -1
  59. package/chunks/LineCallout.glsl.js +2 -2
  60. package/chunks/Precipitation.glsl.js +1 -1
  61. package/chunks/Terrain.glsl.js +1 -1
  62. package/chunks/lyr3DMain.js +1 -1
  63. package/chunks/vec32.js +1 -1
  64. package/config.d.ts +19 -1
  65. package/config.js +1 -1
  66. package/core/Error.d.ts +3 -4
  67. package/core/Error.js +1 -1
  68. package/core/Warning.js +1 -1
  69. package/core/accessorSupport/decorators.d.ts +11 -0
  70. package/core/accessorSupport/types.d.ts +2 -0
  71. package/core/has.js +1 -1
  72. package/core/lang.d.ts +6 -0
  73. package/core/libs/gl-matrix-2/math/vec3.js +1 -1
  74. package/core/libs/gl-matrix-2/vec3.js +1 -1
  75. package/core/promiseUtils.d.ts +5 -0
  76. package/core/quantity.d.ts +5 -0
  77. package/core/reactiveUtils.d.ts +142 -0
  78. package/core/scheduling.d.ts +26 -5
  79. package/core/scheduling.js +1 -1
  80. package/core/sql/WhereClause.d.ts +2 -13
  81. package/core/sql/{WhereGrammar.d.ts → types.d.ts} +22 -1
  82. package/core/sql.d.ts +8 -0
  83. package/core/string.js +1 -1
  84. package/core/types.d.ts +30 -1
  85. package/core/units.d.ts +8 -0
  86. package/core/urlUtils.d.ts +7 -0
  87. package/core/workers/loaderConfig.js +1 -1
  88. package/core/workers/workerFactory.js +1 -1
  89. package/core/workers.d.ts +26 -0
  90. package/form/elements/inputs.d.ts +55 -0
  91. package/form/elements.d.ts +43 -0
  92. package/geometry/coordinateFormatter.d.ts +33 -0
  93. package/geometry/geometryEngine.d.ts +16 -0
  94. package/geometry/operators/affineTransformOperator.d.ts +5 -0
  95. package/geometry/operators/alphaShapeOperator.d.ts +9 -0
  96. package/geometry/operators/areaOperator.d.ts +7 -0
  97. package/geometry/operators/autoCompleteOperator.d.ts +5 -0
  98. package/geometry/operators/boundaryOperator.d.ts +5 -0
  99. package/geometry/operators/bufferOperator.d.ts +11 -0
  100. package/geometry/operators/centroidOperator.d.ts +14 -0
  101. package/geometry/operators/clipOperator.d.ts +7 -0
  102. package/geometry/operators/containsOperator.d.ts +9 -0
  103. package/geometry/operators/convexHullOperator.d.ts +9 -0
  104. package/geometry/operators/crossesOperator.d.ts +7 -0
  105. package/geometry/operators/cutOperator.d.ts +18 -0
  106. package/geometry/operators/densifyOperator.d.ts +21 -0
  107. package/geometry/operators/differenceOperator.d.ts +7 -0
  108. package/geometry/operators/disjointOperator.d.ts +8 -0
  109. package/geometry/operators/distanceOperator.d.ts +8 -0
  110. package/geometry/operators/equalsOperator.d.ts +5 -0
  111. package/geometry/operators/extendOperator.d.ts +8 -0
  112. package/geometry/operators/generalizeOperator.d.ts +7 -0
  113. package/geometry/operators/geodesicBufferOperator.d.ts +13 -0
  114. package/geometry/operators/geodesicProximityOperator.d.ts +13 -0
  115. package/geometry/operators/geodeticAreaOperator.d.ts +11 -0
  116. package/geometry/operators/geodeticDensifyOperator.d.ts +12 -0
  117. package/geometry/operators/geodeticDistanceOperator.d.ts +14 -0
  118. package/geometry/operators/geodeticLengthOperator.d.ts +11 -0
  119. package/geometry/operators/geodeticUtilsOperator.d.ts +11 -0
  120. package/geometry/operators/graphicBufferOperator.d.ts +7 -0
  121. package/geometry/operators/integrateOperator.d.ts +9 -0
  122. package/geometry/operators/intersectionOperator.d.ts +7 -0
  123. package/geometry/operators/intersectsOperator.d.ts +9 -0
  124. package/geometry/operators/isNearOperator.d.ts +7 -0
  125. package/geometry/operators/labelPointOperator.d.ts +14 -0
  126. package/geometry/operators/lengthOperator.d.ts +7 -0
  127. package/geometry/operators/linesToPolygonsOperator.d.ts +5 -0
  128. package/geometry/operators/locateBetweenOperator.d.ts +10 -0
  129. package/geometry/operators/minimumBoundingCircleOperator.d.ts +13 -0
  130. package/geometry/operators/multiPartToSinglePartOperator.d.ts +7 -0
  131. package/geometry/operators/offsetOperator.d.ts +44 -0
  132. package/geometry/operators/overlapsOperator.d.ts +7 -0
  133. package/geometry/operators/polygonOverlayOperator.d.ts +6 -0
  134. package/geometry/operators/polygonSlicerOperator.d.ts +5 -0
  135. package/geometry/operators/projectOperator.d.ts +41 -0
  136. package/geometry/operators/proximityOperator.d.ts +8 -0
  137. package/geometry/operators/relateOperator.d.ts +7 -0
  138. package/geometry/operators/reshapeOperator.d.ts +5 -0
  139. package/geometry/operators/shapePreservingProjectOperator.d.ts +27 -0
  140. package/geometry/operators/simplifyOGCOperator.d.ts +8 -0
  141. package/geometry/operators/simplifyOperator.d.ts +9 -0
  142. package/geometry/operators/support/geographicTransformationUtils.d.ts +11 -0
  143. package/geometry/operators/symmetricDifferenceOperator.d.ts +12 -0
  144. package/geometry/operators/touchesOperator.d.ts +7 -0
  145. package/geometry/operators/unionOperator.d.ts +7 -0
  146. package/geometry/operators/withinOperator.d.ts +9 -0
  147. package/geometry/support/geodesicUtils.d.ts +8 -0
  148. package/geometry/support/jsonUtils.d.ts +7 -0
  149. package/geometry/support/meshUtils.d.ts +5 -0
  150. package/geometry/support/normalizeUtils.d.ts +7 -0
  151. package/geometry/support/webMercatorUtils.d.ts +12 -0
  152. package/geometry.d.ts +38 -0
  153. package/interfaces.d.ts +31 -32
  154. package/intl.d.ts +111 -0
  155. package/kernel.d.ts +5 -0
  156. package/kernel.js +1 -1
  157. package/layers/BaseDynamicLayer.d.ts +1 -1
  158. package/layers/CSVLayer.d.ts +2 -2
  159. package/layers/CatalogLayer.d.ts +2 -2
  160. package/layers/FeatureLayer.d.ts +2 -1
  161. package/layers/GeoJSONLayer.d.ts +2 -1
  162. package/layers/ILyr3DWasmPerSceneView.js +1 -1
  163. package/layers/Layer.d.ts +1 -1
  164. package/layers/Lyr3DWasmPerSceneView.js +1 -1
  165. package/layers/OGCFeatureLayer.d.ts +1 -1
  166. package/layers/ParquetLayer.d.ts +1 -1
  167. package/layers/RouteLayer.js +1 -1
  168. package/layers/SceneLayer.d.ts +2 -1
  169. package/layers/StreamLayer.d.ts +6 -5
  170. package/layers/SubtypeGroupLayer.d.ts +3 -4
  171. package/layers/VectorTileLayer.d.ts +1 -1
  172. package/layers/WFSLayer.d.ts +2 -1
  173. package/layers/WMSLayer.d.ts +2 -2
  174. package/layers/catalog/catalogUtils.d.ts +6 -0
  175. package/layers/ogc/wcsUtils.d.ts +6 -0
  176. package/layers/ogc/wfsUtils.d.ts +6 -0
  177. package/layers/orientedImagery/transformations/imageToWorld.d.ts +10 -0
  178. package/layers/orientedImagery/transformations/rectifyMapPoint.js +1 -1
  179. package/layers/orientedImagery/transformations/worldToImage.d.ts +10 -0
  180. package/layers/orientedImagery/types.d.ts +1 -1
  181. package/layers/support/arcadeUtils.d.ts +5 -0
  182. package/layers/support/csvUtils.d.ts +6 -0
  183. package/layers/support/fieldUtils.d.ts +9 -0
  184. package/layers/support/parquetUtils.d.ts +6 -0
  185. package/layers/support/rasterFunctionConstants.d.ts +9 -0
  186. package/layers/support/rasterFunctionUtils.d.ts +7 -0
  187. package/package.json +1 -1
  188. package/pointCloudRenderers.d.ts +44 -0
  189. package/popup/content.d.ts +48 -0
  190. package/rasterRenderers.d.ts +46 -0
  191. package/renderers/support/AuthoringInfo.d.ts +1 -1
  192. package/renderers/support/jsonUtils.d.ts +7 -0
  193. package/renderers/support/utils.d.ts +5 -0
  194. package/renderers/visualVariables/SizeVariable.d.ts +0 -3
  195. package/renderers/visualVariables/VisualVariable.d.ts +1 -1
  196. package/renderers/visualVariables/support/VisualVariableLegendOptions.d.ts +1 -1
  197. package/renderers.d.ts +46 -0
  198. package/request.d.ts +17 -0
  199. package/rest/closestFacility.d.ts +21 -0
  200. package/rest/featureService/utils.d.ts +5 -0
  201. package/rest/find.d.ts +21 -0
  202. package/rest/geometryService.d.ts +14 -0
  203. package/rest/geoprocessor.d.ts +16 -0
  204. package/rest/identify.d.ts +19 -0
  205. package/rest/imageService.d.ts +10 -0
  206. package/rest/knowledgeGraphService.d.ts +39 -0
  207. package/rest/lastMileDelivery.d.ts +12 -0
  208. package/rest/locator.d.ts +24 -0
  209. package/rest/networkService.d.ts +5 -0
  210. package/rest/networks/queryAssociations.d.ts +7 -0
  211. package/rest/networks/support/NetworkElement.d.ts +1 -1
  212. package/rest/networks/synthesizeAssociationGeometries.d.ts +7 -0
  213. package/rest/networks/trace.d.ts +6 -0
  214. package/rest/places.d.ts +34 -0
  215. package/rest/print.d.ts +74 -0
  216. package/rest/query.d.ts +33 -0
  217. package/rest/route.d.ts +18 -0
  218. package/rest/serviceArea.d.ts +18 -0
  219. package/rest/support/AreasAndLengthsParameters.d.ts +2 -2
  220. package/rest/support/AttachmentQuery.d.ts +0 -1
  221. package/rest/support/AttributeBinsQuery.d.ts +3 -3
  222. package/rest/support/AutoIntervalBinParameters.d.ts +4 -4
  223. package/rest/support/DateBinParameters.d.ts +2 -2
  224. package/rest/support/DateBinTimeInterval.d.ts +1 -1
  225. package/rest/support/DensifyParameters.d.ts +1 -1
  226. package/rest/support/DirectionsFeature.d.ts +1 -1
  227. package/rest/support/GPMessage.d.ts +1 -1
  228. package/rest/support/LastMileDeliveryParameters.d.ts +1 -1
  229. package/rest/support/QuantizationParameters.d.ts +3 -3
  230. package/rest/support/Query.d.ts +0 -1
  231. package/rest/support/QueryMixin.d.ts +1 -1
  232. package/rest/support/RelationshipQuery.d.ts +0 -1
  233. package/rest/support/interfaces.d.ts +1 -2
  234. package/rest/symbolService.d.ts +9 -0
  235. package/smartMapping/heuristics/binLevel.d.ts +12 -0
  236. package/smartMapping/heuristics/scaleRange.d.ts +15 -0
  237. package/smartMapping/heuristics/sizeRange.d.ts +12 -0
  238. package/smartMapping/labels/bins.d.ts +13 -0
  239. package/smartMapping/labels/clusters.d.ts +16 -0
  240. package/smartMapping/popup/clusters.d.ts +21 -0
  241. package/smartMapping/popup/templates.d.ts +18 -0
  242. package/smartMapping/raster/renderers/classBreaks.d.ts +7 -0
  243. package/smartMapping/raster/renderers/colormap.d.ts +7 -0
  244. package/smartMapping/raster/renderers/flow.d.ts +19 -0
  245. package/smartMapping/raster/renderers/rgb.d.ts +7 -0
  246. package/smartMapping/raster/renderers/shadedRelief.d.ts +7 -0
  247. package/smartMapping/raster/renderers/stretch.d.ts +7 -0
  248. package/smartMapping/raster/renderers/uniqueValue.d.ts +7 -0
  249. package/smartMapping/raster/renderers/vectorField.d.ts +20 -0
  250. package/smartMapping/raster/support/colorRamps.d.ts +7 -0
  251. package/smartMapping/raster/support/utils.d.ts +5 -0
  252. package/smartMapping/renderers/color.d.ts +17 -0
  253. package/smartMapping/renderers/dotDensity.d.ts +21 -0
  254. package/smartMapping/renderers/heatmap.d.ts +17 -0
  255. package/smartMapping/renderers/location.d.ts +10 -0
  256. package/smartMapping/renderers/opacity.d.ts +19 -0
  257. package/smartMapping/renderers/pieChart.d.ts +19 -0
  258. package/smartMapping/renderers/predominance.d.ts +27 -0
  259. package/smartMapping/renderers/relationship.d.ts +48 -0
  260. package/smartMapping/renderers/size.d.ts +18 -0
  261. package/smartMapping/renderers/support/rendererUtils.d.ts +8 -0
  262. package/smartMapping/renderers/support/spikeUtils.d.ts +6 -0
  263. package/smartMapping/renderers/type.d.ts +18 -0
  264. package/smartMapping/renderers/univariateColorSize.d.ts +29 -0
  265. package/smartMapping/statistics/classBreaks.d.ts +14 -0
  266. package/smartMapping/statistics/heatmapStatistics.d.ts +15 -0
  267. package/smartMapping/statistics/histogram.d.ts +17 -0
  268. package/smartMapping/statistics/predominantCategories.d.ts +6 -0
  269. package/smartMapping/statistics/summaryStatistics.d.ts +15 -0
  270. package/smartMapping/statistics/summaryStatisticsForAge.d.ts +8 -1
  271. package/smartMapping/statistics/support/ageUtils.d.ts +8 -0
  272. package/smartMapping/statistics/support/predominanceUtils.d.ts +8 -1
  273. package/smartMapping/statistics/types.d.ts +6 -1
  274. package/smartMapping/statistics/uniqueValues.d.ts +13 -0
  275. package/smartMapping/symbology/color.d.ts +8 -0
  276. package/smartMapping/symbology/dotDensity.d.ts +7 -0
  277. package/smartMapping/symbology/flow.d.ts +8 -0
  278. package/smartMapping/symbology/heatmap.d.ts +8 -0
  279. package/smartMapping/symbology/location.d.ts +8 -0
  280. package/smartMapping/symbology/pieChart.d.ts +7 -0
  281. package/smartMapping/symbology/predominance.d.ts +7 -0
  282. package/smartMapping/symbology/relationship.d.ts +7 -0
  283. package/smartMapping/symbology/size.d.ts +7 -0
  284. package/smartMapping/symbology/support/colorRamps.d.ts +7 -0
  285. package/smartMapping/symbology/type.d.ts +8 -0
  286. package/support/popupUtils.d.ts +5 -0
  287. package/support/revision.js +1 -1
  288. package/support/timeUtils.d.ts +9 -0
  289. package/symbols/CIMSymbol.d.ts +1 -1
  290. package/symbols/ExtrudeSymbol3DLayer.d.ts +2 -2
  291. package/symbols/FillSymbol3DLayer.d.ts +1 -1
  292. package/symbols/LineSymbol3DLayer.d.ts +2 -2
  293. package/symbols/ObjectSymbol3DLayer.d.ts +2 -2
  294. package/symbols/PathSymbol3DLayer.d.ts +2 -2
  295. package/symbols/TextSymbol.d.ts +2 -2
  296. package/symbols/support/Symbol3DFillMaterial.d.ts +1 -1
  297. package/symbols/support/Symbol3DFillMaterial.js +1 -1
  298. package/symbols/support/Symbol3DHalo.d.ts +8 -4
  299. package/symbols/support/Symbol3DHalo.js +1 -1
  300. package/symbols/support/cimConversionUtils.d.ts +9 -0
  301. package/symbols/support/cimSymbolUtils.d.ts +10 -0
  302. package/symbols/support/jsonUtils.d.ts +7 -0
  303. package/symbols/support/symbolUtils.d.ts +5 -0
  304. package/symbols.d.ts +59 -0
  305. package/tables/elements.d.ts +41 -0
  306. package/time/TimeExtent.d.ts +1 -1
  307. package/time/TimeInterval.d.ts +1 -1
  308. package/unionTypes.d.ts +5 -0
  309. package/versionManagement/utils.d.ts +5 -0
  310. package/versionManagement/versionAdapters/utils.d.ts +5 -0
  311. package/views/2d/MapViewConstraints.d.ts +18 -10
  312. package/views/2d/engine/vectorTiles/shaders/sources/shaderRepository.js +1 -1
  313. package/views/2d/layers/RouteLayerView2D.js +1 -1
  314. package/views/2d/layers/TileLayerView2D.js +1 -1
  315. package/views/2d/layers/support/RouteLayerInteraction.js +1 -1
  316. package/views/2d/layers/support/RouteLayerWaypointVisualization.js +5 -0
  317. package/views/3d/analysis/DirectLineMeasurement/types.d.ts +5 -0
  318. package/views/3d/analysis/LineOfSight/types.d.ts +5 -0
  319. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementError.d.ts +1 -1
  320. package/views/3d/analysis/VolumeMeasurement/types.d.ts +5 -0
  321. package/views/3d/environment/ChapmanRaymarching.glsl.js +2 -1
  322. package/views/3d/interactive/visualElements/PointVisualElement.js +1 -1
  323. package/views/3d/layers/graphics/Deconflictor.js +1 -1
  324. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  325. package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
  326. package/views/3d/layers/graphics/Graphics3DLineCalloutSymbolLayer.js +1 -1
  327. package/views/3d/layers/graphics/Graphics3DSymbolLayer.js +1 -1
  328. package/views/3d/layers/graphics/Graphics3DTextSymbolLayer.js +1 -1
  329. package/views/3d/layers/graphics/GraphicsDeconflictor.js +1 -1
  330. package/views/3d/layers/graphics/GraphicsProcessor.js +1 -1
  331. package/views/3d/layers/graphics/pipeline/symbolization/IconSymbolLayerRenderer.js +1 -1
  332. package/views/3d/state/helpers/SceneIntersectionHelper.js +1 -1
  333. package/views/3d/support/pointsOfInterest/StableSurfaceCenter.js +1 -1
  334. package/views/3d/terrain/TerrainSurface.js +1 -1
  335. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  336. package/views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js +2 -2
  337. package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
  338. package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
  339. package/views/3d/webgl-engine/materials/LineCalloutMaterial.js +1 -1
  340. package/views/3d/webgl-engine/shaders/HUDMaterialTechniqueConfiguration.js +1 -1
  341. package/views/3d/webgl-engine/shaders/LineCalloutTechniqueConfiguration.js +1 -1
  342. package/views/3d/webgl-engine/shaders/OutputColorHighlightOLID.glsl.js +8 -8
  343. package/views/3d/webgl.d.ts +6 -0
  344. package/views/BreakpointsOwner.d.ts +16 -16
  345. package/views/IBreakpointsOwner.d.ts +15 -15
  346. package/views/MapView.d.ts +1 -1
  347. package/views/PopupView.d.ts +2 -2
  348. package/views/SelectionManager.d.ts +1 -0
  349. package/views/SelectionManager.js +1 -1
  350. package/views/VideoView.js +1 -1
  351. package/views/View.d.ts +6 -8
  352. package/views/analysis/AreaMeasurement/types.d.ts +6 -0
  353. package/views/analysis/DistanceMeasurement/types.d.ts +5 -0
  354. package/views/analysis/ElevationProfile/ElevationProfileError.d.ts +4 -4
  355. package/views/analysis/ElevationProfile/types.d.ts +6 -0
  356. package/views/analysis/types.d.ts +5 -0
  357. package/views/interactive/editGeometry/support/editPlaneUtils.js +1 -1
  358. package/views/interactive/snapping/GridSnappingEngine.js +1 -1
  359. package/views/layers/BuildingSceneLayerView.d.ts +1 -1
  360. package/views/layers/LayerView.d.ts +1 -1
  361. package/views/support/colorUtils.d.ts +5 -0
  362. package/views/support/selectionUtils.js +1 -1
  363. package/webscene/types.d.ts +5 -0
  364. package/widgets/FeatureForm/FeatureFormViewModel.d.ts +2 -2
  365. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  366. package/widgets/Features/FeaturesViewModel.d.ts +1 -1
  367. package/widgets/Home/HomeViewModel.d.ts +1 -1
  368. package/widgets/Locate/LocateViewModel.d.ts +2 -2
  369. package/widgets/Search/types.d.ts +5 -0
  370. package/widgets/TimeSlider/TimeSliderViewModel.d.ts +1 -1
  371. package/widgets/UtilityNetworkValidateTopology.js +1 -1
  372. package/widgets/smartMapping/support/utils.d.ts +6 -0
  373. package/widgets/support/SelectionList/FeatureItem.js +1 -1
  374. package/widgets/support/SelectionList/LayerItem.js +1 -1
  375. package/widgets/support/SelectionList/SelectionListViewModel.js +1 -1
  376. package/widgets/support/SelectionList.js +1 -1
  377. package/widgets/support/Selector2D/selectorUtils.js +1 -1
  378. package/widgets/support/symbolPreviewUtils.js +1 -1
  379. package/widgets/support/widget.d.ts +11 -0
  380. package/assets/esri/core/workers/chunks/0d1e8d5d9abee38e275e.js +0 -316
  381. package/assets/esri/core/workers/chunks/73c3ee2697265b0f7208.js +0 -1
  382. package/assets/esri/core/workers/chunks/cd2ea924cb91cdb6dde9.js +0 -1
  383. package/assets/esri/core/workers/chunks/d57577c02fb2932e8305.js +0 -1
  384. package/colorUtils.d.ts +0 -13
  385. package/core/Logger.d.ts +0 -29
  386. package/core/Message.d.ts +0 -2
  387. package/core/Message.js +0 -5
  388. package/core/accessorSupport/PropertyOrigin.d.ts +0 -2
  389. package/core/sql/sql92grammar.d.ts +0 -12
  390. package/core/string.d.ts +0 -3
  391. package/core/time.d.ts +0 -2
  392. package/core/timeUtils.d.ts +0 -2
@@ -4,9 +4,9 @@ import type Error from "../../../core/Error.js";
4
4
  export type ElevationProfileErrorName = "too-complex" | "elevation-query-error" | "unknown";
5
5
 
6
6
  /**
7
- * ElevationProfileError is an error class for reporting errors in an
8
- * {@link views/2d/analysis/ElevationProfileAnalysisView2D#result} or
9
- * {@link views/3d/analysis/ElevationProfileAnalysisView3D#result}.
7
+ * ElevationProfileError is an error class for reporting errors in
8
+ * [ElevationProfileAnalysisView2D#results](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-analysis-ElevationProfileAnalysisView2D.html#results) or
9
+ * [ElevationProfileAnalysisView3D#results](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-analysis-ElevationProfileAnalysisView3D.html#results).
10
10
  *
11
11
  * The following error names are defined:
12
12
  *
@@ -31,5 +31,5 @@ export default class ElevationProfileError<T = any> extends Error {
31
31
  * console.log("Error name: ", error.name);
32
32
  * });
33
33
  */
34
- name: ElevationProfileErrorName;
34
+ readonly name: ElevationProfileErrorName;
35
35
  }
@@ -1,3 +1,9 @@
1
+ /**
2
+ * Types common to the [ElevationProfileAnalysisView2D](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-analysis-ElevationProfileAnalysisView2D.html) and
3
+ * [ElevationProfileAnalysisView3D](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-analysis-ElevationProfileAnalysisView3D.html).
4
+ *
5
+ * @since 5.0
6
+ */
1
7
  import type Graphic from "../../../Graphic.js";
2
8
  import type { LengthUnit } from "../../../core/units.js";
3
9
 
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Types for the various interactive analyses.
3
+ *
4
+ * @since 5.0
5
+ */
1
6
  import type { AnalysisView2DUnion } from "../2d/analysis/types.js";
2
7
  import type { AnalysisView3DUnion } from "../3d/analysis/types.js";
3
8
 
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{set as o,dot as i,min as r,max as t,subtract as s,add as n,scale as e,projectAndScale as a}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{h as c,i as f,K as m,j as p}from"../../../../chunks/vec32.js";import{fromValues as g,ZEROS as u}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{d as b,u as I}from"../../../../chunks/boundedPlane.js";import{sv2d as N}from"../../../../geometry/support/vectorStacks.js";import{MoveVertex as l}from"../operations/MoveVertex.js";import{RotateVertex as d}from"../operations/RotateVertex.js";import{ScaleVertex as j}from"../operations/ScaleVertex.js";import{UpdateVertices as x}from"../operations/UpdateVertices.js";function V(o,i){return E(o,i,!1)}function T(o,i){return E(o,i,!0)}function E(o,i,r){if(o instanceof x){if(o.operation instanceof l)return h(o.operation,i,r),!0;if(o.operation instanceof d)return v(o.operation,i,r),!0;if(o.operation instanceof j)return F(o.operation,i,r),!0}return!1}function h(o,i,r=!1){const t=r?-1:1,s=g(t*o.dx,t*o.dy,t*o.dz);f(i.origin,i.origin,s),I(i)}function v(o,i,r=!1){const t=r?-o.angle:o.angle;m(i.basis1,i.basis1,u,t),m(i.basis2,i.basis2,u,t),I(i)}function F(o,i,r=!1){const t=r?1/o.factor1:o.factor1,s=r?1/o.factor2:o.factor2;p(i.basis1,i.basis1,t),p(i.basis2,i.basis2,s),a(i.origin,i.origin,o.origin,o.axis1,t),a(i.origin,i.origin,o.origin,o.axis2,s),I(i)}function S(a,m,p,g,u=!1){g||(g=b());const l=o(N.get(),a[1],-a[0]),d=o(N.get(),Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY),j=o(N.get(),Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY),x=N.get(),V=m.allVerticesUnordered;V.forEach(({pos:s})=>{o(x,i(a,s),i(l,s)),r(d,d,x),t(j,j,x)});const T=1e-6,E=o(N.get(),j[0]-d[0]<T?p/2:0,j[1]-d[1]<T?p/2:0);s(d,d,E),n(j,j,E);const h=u?V.reduce((o,i)=>o+(i.pos[2]??0),0)/V.length:0;return e(g.basis1,a,(j[0]-d[0])/2),e(g.basis2,l,(j[1]-d[1])/2),c(g.origin,d[0]*a[0]+d[1]*l[0],d[0]*a[1]+d[1]*l[1],h),f(g.origin,g.origin,g.basis1),f(g.origin,g.origin,g.basis2),I(g),g}export{V as apply,T as applyInverse,S as calculateOrientedBounds};
5
+ import{set as o,dot as i,min as r,max as t,subtract as s,add as n,scale as e,projectAndScale as a}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{h as c,i as f,L as m,j as p}from"../../../../chunks/vec32.js";import{fromValues as g,ZEROS as u}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{d as b,u as I}from"../../../../chunks/boundedPlane.js";import{sv2d as N}from"../../../../geometry/support/vectorStacks.js";import{MoveVertex as l}from"../operations/MoveVertex.js";import{RotateVertex as d}from"../operations/RotateVertex.js";import{ScaleVertex as j}from"../operations/ScaleVertex.js";import{UpdateVertices as x}from"../operations/UpdateVertices.js";function V(o,i){return E(o,i,!1)}function T(o,i){return E(o,i,!0)}function E(o,i,r){if(o instanceof x){if(o.operation instanceof l)return h(o.operation,i,r),!0;if(o.operation instanceof d)return v(o.operation,i,r),!0;if(o.operation instanceof j)return F(o.operation,i,r),!0}return!1}function h(o,i,r=!1){const t=r?-1:1,s=g(t*o.dx,t*o.dy,t*o.dz);f(i.origin,i.origin,s),I(i)}function v(o,i,r=!1){const t=r?-o.angle:o.angle;m(i.basis1,i.basis1,u,t),m(i.basis2,i.basis2,u,t),I(i)}function F(o,i,r=!1){const t=r?1/o.factor1:o.factor1,s=r?1/o.factor2:o.factor2;p(i.basis1,i.basis1,t),p(i.basis2,i.basis2,s),a(i.origin,i.origin,o.origin,o.axis1,t),a(i.origin,i.origin,o.origin,o.axis2,s),I(i)}function S(a,m,p,g,u=!1){g||(g=b());const l=o(N.get(),a[1],-a[0]),d=o(N.get(),Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY),j=o(N.get(),Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY),x=N.get(),V=m.allVerticesUnordered;V.forEach(({pos:s})=>{o(x,i(a,s),i(l,s)),r(d,d,x),t(j,j,x)});const T=1e-6,E=o(N.get(),j[0]-d[0]<T?p/2:0,j[1]-d[1]<T?p/2:0);s(d,d,E),n(j,j,E);const h=u?V.reduce((o,i)=>o+(i.pos[2]??0),0)/V.length:0;return e(g.basis1,a,(j[0]-d[0])/2),e(g.basis2,l,(j[1]-d[1])/2),c(g.origin,d[0]*a[0]+d[1]*l[0],d[0]*a[1]+d[1]*l[1],h),f(g.origin,g.origin,g.basis1),f(g.origin,g.origin,g.basis2),I(g),g}export{V as apply,T as applyInverse,S as calculateOrientedBounds};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as t}from"tslib";import e from"../../../core/Accessor.js";import r from"../../../core/Logger.js";import{deg2rad as i}from"../../../core/mathUtils.js";import{convertUnit as n}from"../../../core/units.js";import{property as o,subclass as s}from"../../../core/accessorSupport/decorators.js";import{K as a}from"../../../chunks/vec32.js";import{isLoadedOrLoadFor as l,project as p}from"../../../geometry/projectionUtils.js";import{getClosestDenormalizedXToReference as c}from"../../../geometry/support/normalizeUtils.js";import{getResolutionForScale as u}from"../../../geometry/support/scaleUtils.js";import{minimumPixelsPerStrideForDisplayWhenScalingOff as d}from"../../2d/grid/constants.js";import{getScaleFactor as g,measureMetersPerUnitAtReferencePoint as f}from"../../2d/grid/gridUtils.js";import{create as h,createWritable as m}from"../sketch/normalizedPoint.js";import{gridPlacementGraphicSymbol as S}from"./snappingUtils.js";import{IntersectionSnappingCandidate as v}from"./candidates/IntersectionSnappingCandidate.js";import{LineSnappingCandidate as y}from"./candidates/LineSnappingCandidate.js";let w=class extends e{constructor(t){super(t),this.options=null}destroy(){this._set("options",null)}get grid(){return this.view.grid}get effectiveViewRotation(){return this.grid?.rotateWithMap?0:i(this.view.rotation??0)}get gridRotation(){return i(this.grid?.rotation??0)}get gridCenter(){const{spatialReference:t,grid:e}=this;if(!e||!t||!l(e.center.spatialReference,t))return null;try{const r=p(e.center,t),i=t.isWrappable&&null!=this.view?.center?c(r.x,this.view.center.x,t):r.x;return h(i,r.y,r.z)}catch(i){return r.getLogger(this).errorOnce("Grid Snapping - Failed to project grid center.",i),null}}get offsetScaleFactor(){const{pixelsPerStride:t,grid:e}=this;if(!e||!t)return 1;const{majorLineInterval:r,dynamicScaling:i}=e;return r<1?null:g(r,t,i)}get spatialReference(){return this.view.spatialReference}get gridMetersPerStride(){const{grid:t}=this;return t?n(t.spacing,t.units,"meters"):null}get viewMetersPerPixel(){const{viewMetersPerSRUnit:t}=this;return null==t?null:t*u(this.view.scale,this.view.spatialReference)}get viewMetersPerSRUnit(){const{spatialReference:t}=this.view;return this.gridCenter?f(this.gridCenter[0],this.gridCenter[1],t):null}get pixelsPerStride(){const{gridMetersPerStride:t,viewMetersPerPixel:e}=this;return e&&t?t/e:null}get updating(){return null!=this.grid&&null!=this.spatialReference&&null==this.viewMetersPerSRUnit}async fetchCandidates(t,e,r){const{options:i,view:n}=this;if(!i?.effectiveGridEnabled||!n.grid||r.feature?.attributes&&S in r.feature.attributes)return[];const o=r.coordinateHelper.arrayToPoint(t),s=i.distance*("touch"===r.pointer?i.touchSensitivityMultiplier:1);return this.fetchCandidatesSync(o,s)}fetchCandidatesSync(t,e){const r=[],{grid:i,effectiveViewRotation:n,gridRotation:o,gridCenter:s,viewMetersPerPixel:a,viewMetersPerSRUnit:c,offsetScaleFactor:u,spatialReference:g,gridMetersPerStride:f,pixelsPerStride:m}=this;if(!(i&&a&&c&&s&&g&&u&&f&&m))return r;if(!i.dynamicScaling&&m<d)return r;if(!l(t.spatialReference,g))return r;const S=p(t,g),w=h(S.x,S.y,S.z),x=P(w,-o,s,-n),C=f/c*u,U=M(x,C,s),{shouldSnapX:b,shouldSnapY:z}=R(U,x,e,a,c);if(!b&&!z)return[];const E=h((b?U:x)[0],(z?U:x)[1]),F=P(E,o,s,n),L=P(U,o,s,n);if(z){const t=j(U,x,C,"y"),e=P(t,o,s,n);r.push(new y({lineStart:L,lineEnd:e,targetPoint:F,isDraped:!1}))}if(b){const t=j(U,x,C,"x"),e=P(t,o,s,n);r.push(new y({lineStart:L,lineEnd:e,targetPoint:F,isDraped:!1}))}return b&&z&&r.push(new v(F,r[0],r[1],!1)),r}};t([o({constructOnly:!0})],w.prototype,"view",void 0),t([o()],w.prototype,"options",void 0),t([o()],w.prototype,"grid",null),t([o()],w.prototype,"effectiveViewRotation",null),t([o()],w.prototype,"gridRotation",null),t([o()],w.prototype,"gridCenter",null),t([o()],w.prototype,"offsetScaleFactor",null),t([o()],w.prototype,"spatialReference",null),t([o()],w.prototype,"gridMetersPerStride",null),t([o()],w.prototype,"viewMetersPerPixel",null),t([o()],w.prototype,"viewMetersPerSRUnit",null),t([o()],w.prototype,"pixelsPerStride",null),t([o()],w.prototype,"updating",null),w=t([s("esri.views.interactive.snapping.GridSnappingEngine")],w);const P=(t,e,r,i)=>{const n=m(t[0],t[1],t[2]);return a(n,a(n,n,r,e),r,i)},M=(t,e,r)=>{const i=(t[0]-r[0])/e,n=(t[1]-r[1])/e,o=Math.trunc(i),s=Math.trunc(n),a=Math.round(i%1),l=Math.round(n%1),p=r[0]+(o+a)*e,c=r[1]+(s+l)*e;return h(p,c)},R=(t,e,r,i,n)=>{if(i<=0)return{shouldSnapX:!1,shouldSnapY:!1};const o=(t[0]-e[0])/i,s=(t[1]-e[1])/i;return{shouldSnapX:Math.abs(o*n)<r,shouldSnapY:Math.abs(s*n)<r}},j=(t,e,r,i)=>{if("y"===i){const i=e[0]>t[0]?1:-1;return h(t[0]+r*i,t[1])}const n=e[1]>t[1]?1:-1;return h(t[0],t[1]+r*n)};export{w as GridSnappingEngine};
5
+ import{__decorate as t}from"tslib";import e from"../../../core/Accessor.js";import r from"../../../core/Logger.js";import{deg2rad as i}from"../../../core/mathUtils.js";import{convertUnit as n}from"../../../core/units.js";import{property as o,subclass as s}from"../../../core/accessorSupport/decorators.js";import{L as a}from"../../../chunks/vec32.js";import{isLoadedOrLoadFor as l,project as p}from"../../../geometry/projectionUtils.js";import{getClosestDenormalizedXToReference as c}from"../../../geometry/support/normalizeUtils.js";import{getResolutionForScale as u}from"../../../geometry/support/scaleUtils.js";import{minimumPixelsPerStrideForDisplayWhenScalingOff as d}from"../../2d/grid/constants.js";import{getScaleFactor as g,measureMetersPerUnitAtReferencePoint as f}from"../../2d/grid/gridUtils.js";import{create as h,createWritable as m}from"../sketch/normalizedPoint.js";import{gridPlacementGraphicSymbol as S}from"./snappingUtils.js";import{IntersectionSnappingCandidate as v}from"./candidates/IntersectionSnappingCandidate.js";import{LineSnappingCandidate as y}from"./candidates/LineSnappingCandidate.js";let w=class extends e{constructor(t){super(t),this.options=null}destroy(){this._set("options",null)}get grid(){return this.view.grid}get effectiveViewRotation(){return this.grid?.rotateWithMap?0:i(this.view.rotation??0)}get gridRotation(){return i(this.grid?.rotation??0)}get gridCenter(){const{spatialReference:t,grid:e}=this;if(!e||!t||!l(e.center.spatialReference,t))return null;try{const r=p(e.center,t),i=t.isWrappable&&null!=this.view?.center?c(r.x,this.view.center.x,t):r.x;return h(i,r.y,r.z)}catch(i){return r.getLogger(this).errorOnce("Grid Snapping - Failed to project grid center.",i),null}}get offsetScaleFactor(){const{pixelsPerStride:t,grid:e}=this;if(!e||!t)return 1;const{majorLineInterval:r,dynamicScaling:i}=e;return r<1?null:g(r,t,i)}get spatialReference(){return this.view.spatialReference}get gridMetersPerStride(){const{grid:t}=this;return t?n(t.spacing,t.units,"meters"):null}get viewMetersPerPixel(){const{viewMetersPerSRUnit:t}=this;return null==t?null:t*u(this.view.scale,this.view.spatialReference)}get viewMetersPerSRUnit(){const{spatialReference:t}=this.view;return this.gridCenter?f(this.gridCenter[0],this.gridCenter[1],t):null}get pixelsPerStride(){const{gridMetersPerStride:t,viewMetersPerPixel:e}=this;return e&&t?t/e:null}get updating(){return null!=this.grid&&null!=this.spatialReference&&null==this.viewMetersPerSRUnit}async fetchCandidates(t,e,r){const{options:i,view:n}=this;if(!i?.effectiveGridEnabled||!n.grid||r.feature?.attributes&&S in r.feature.attributes)return[];const o=r.coordinateHelper.arrayToPoint(t),s=i.distance*("touch"===r.pointer?i.touchSensitivityMultiplier:1);return this.fetchCandidatesSync(o,s)}fetchCandidatesSync(t,e){const r=[],{grid:i,effectiveViewRotation:n,gridRotation:o,gridCenter:s,viewMetersPerPixel:a,viewMetersPerSRUnit:c,offsetScaleFactor:u,spatialReference:g,gridMetersPerStride:f,pixelsPerStride:m}=this;if(!(i&&a&&c&&s&&g&&u&&f&&m))return r;if(!i.dynamicScaling&&m<d)return r;if(!l(t.spatialReference,g))return r;const S=p(t,g),w=h(S.x,S.y,S.z),x=P(w,-o,s,-n),C=f/c*u,U=M(x,C,s),{shouldSnapX:b,shouldSnapY:L}=R(U,x,e,a,c);if(!b&&!L)return[];const z=h((b?U:x)[0],(L?U:x)[1]),E=P(z,o,s,n),F=P(U,o,s,n);if(L){const t=j(U,x,C,"y"),e=P(t,o,s,n);r.push(new y({lineStart:F,lineEnd:e,targetPoint:E,isDraped:!1}))}if(b){const t=j(U,x,C,"x"),e=P(t,o,s,n);r.push(new y({lineStart:F,lineEnd:e,targetPoint:E,isDraped:!1}))}return b&&L&&r.push(new v(E,r[0],r[1],!1)),r}};t([o({constructOnly:!0})],w.prototype,"view",void 0),t([o()],w.prototype,"options",void 0),t([o()],w.prototype,"grid",null),t([o()],w.prototype,"effectiveViewRotation",null),t([o()],w.prototype,"gridRotation",null),t([o()],w.prototype,"gridCenter",null),t([o()],w.prototype,"offsetScaleFactor",null),t([o()],w.prototype,"spatialReference",null),t([o()],w.prototype,"gridMetersPerStride",null),t([o()],w.prototype,"viewMetersPerPixel",null),t([o()],w.prototype,"viewMetersPerSRUnit",null),t([o()],w.prototype,"pixelsPerStride",null),t([o()],w.prototype,"updating",null),w=t([s("esri.views.interactive.snapping.GridSnappingEngine")],w);const P=(t,e,r,i)=>{const n=m(t[0],t[1],t[2]);return a(n,a(n,n,r,e),r,i)},M=(t,e,r)=>{const i=(t[0]-r[0])/e,n=(t[1]-r[1])/e,o=Math.trunc(i),s=Math.trunc(n),a=Math.round(i%1),l=Math.round(n%1),p=r[0]+(o+a)*e,c=r[1]+(s+l)*e;return h(p,c)},R=(t,e,r,i,n)=>{if(i<=0)return{shouldSnapX:!1,shouldSnapY:!1};const o=(t[0]-e[0])/i,s=(t[1]-e[1])/i;return{shouldSnapX:Math.abs(o*n)<r,shouldSnapY:Math.abs(s*n)<r}},j=(t,e,r,i)=>{if("y"===i){const i=e[0]>t[0]?1:-1;return h(t[0]+r*i,t[1])}const n=e[1]>t[1]?1:-1;return h(t[0],t[1]+r*n)};export{w as GridSnappingEngine};
@@ -18,7 +18,7 @@ export interface BuildingSceneLayerViewProperties extends LayerViewProperties {}
18
18
  * The BuildingSceneLayerView contains a list of [sublayer views](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-BuildingComponentSublayerView.html)
19
19
  * for all the [component sublayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-buildingSublayers-BuildingComponentSublayer.html) of a
20
20
  * [BuildingSceneLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-BuildingSceneLayer.html). The BuildingSceneLayerView doesn't have query methods. To query the features
21
- * loaded on the client, use the {@link views/layers/BuildingComponentSublayerView#methodsSummary query methods}
21
+ * loaded on the client, use the {@link views/layers/BuildingComponentSublayerView#methods-summary query methods}
22
22
  * on the component [sublayer views](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-BuildingComponentSublayerView.html):
23
23
  *
24
24
  * ```js
@@ -27,7 +27,7 @@ export default abstract class LayerView extends LayerViewSuperclass {
27
27
  /** The layer being viewed. */
28
28
  get layer(): Layer;
29
29
  /**
30
- * Indicates if the [MapView#spatialReference](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#spatialReference) of the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) is supported by the layer view.
30
+ * Indicates if the [View2D#spatialReference](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View2D.html#spatialReference) of the [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) is supported by the layer view.
31
31
  * When `false` layer view will be [suspended](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-LayerView.html#suspended).
32
32
  *
33
33
  * @since 4.23
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Contains utilities for working with colors in the [View](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html).
3
+ *
4
+ * @since 4.13
5
+ */
1
6
  import type Color from "../../Color.js";
2
7
  import type { BasemapTheme } from "../../smartMapping/symbology/types.js";
3
8
  import type { MapViewOrSceneView } from "../MapViewOrSceneView.js";
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- function n(n){return!(null==n||"object"!=typeof n||!("id"in n)||!("type"in n))}function e(e){return!!(n(e)&&"on"in e&&e.on)}function r(e){return!!(n(e)&&"graphics"in e&&e.graphics)}function i(e){return!!(n(e)&&"fields"in e&&"fieldsIndex"in e&&"objectIdField"in e&&"createQuery"in e&&e.createQuery&&"queryFeatures"in e&&e.queryFeatures)}function t(n){return i(n)}function u(e){return!!(null!=e&&"object"==typeof e&&"layer"in e&&e.layer&&n(e.layer)&&"view"in e)}function c(n){return!(!u(n)||!("queryGraphics"in n))}function o(n){return!!(u(n)&&"highlight"in n&&n.highlight)}function a(n){return!!(u(n)&&"createQuery"in n&&n.createQuery&&"queryFeatures"in n&&n.queryFeatures)}function f(n){return a(n)}function y(n){return!!n.isTable}export{t as isISelectableLayer,n as isISelectableLayerBase,e as isISelectableLayerBaseWithEditing,f as isISelectableLayerView,u as isISelectableLayerViewBase,c as isISelectableLayerViewWithGraphics,o as isISelectableLayerViewWithHighlights,a as isISelectableLayerViewWithObjectIds,r as isISelectableLayerWithGraphics,i as isISelectableLayerWithObjectIds,y as isTableLayer};
5
+ import{isGraphic as n}from"../../support/guards.js";function e(n){return!(null==n||"object"!=typeof n||!("id"in n)||!("type"in n))}function r(n){return!!(e(n)&&"on"in n&&n.on)}function t(n){return!!(e(n)&&"graphics"in n&&n.graphics)}function i(n){return!!(e(n)&&"fields"in n&&"fieldsIndex"in n&&"objectIdField"in n&&"createQuery"in n&&n.createQuery&&"queryFeatures"in n&&n.queryFeatures)}function u(n){return i(n)||t(n)}function o(n){return!!(null!=n&&"object"==typeof n&&"layer"in n&&n.layer&&e(n.layer)&&"view"in n)}function c(n){return!(!o(n)||!("queryGraphics"in n))}function f(n){return!!(o(n)&&"highlight"in n&&n.highlight)}function a(n){return!!(o(n)&&"createQuery"in n&&n.createQuery&&"queryFeatures"in n&&n.queryFeatures)}function y(n){return a(n)||c(n)}function l(n){return!!n.isTable}function s(e){return!!e.length&&n(e[0])}export{s as isGraphicsSelectionIdentifier,u as isISelectableLayer,e as isISelectableLayerBase,r as isISelectableLayerBaseWithEditing,y as isISelectableLayerView,o as isISelectableLayerViewBase,c as isISelectableLayerViewWithGraphics,f as isISelectableLayerViewWithHighlights,a as isISelectableLayerViewWithObjectIds,t as isISelectableLayerWithGraphics,i as isISelectableLayerWithObjectIds,l as isTableLayer};
@@ -1,3 +1,8 @@
1
+ /**
2
+ * A module for importing types used in WebScene modules.
3
+ *
4
+ * @since 4.33
5
+ */
1
6
  import type SliceAnalysis from "../analysis/SliceAnalysis.js";
2
7
  import type FeatureReferenceGlobalId from "./support/FeatureReferenceGlobalId.js";
3
8
  import type FeatureReferenceObjectId from "./support/FeatureReferenceObjectId.js";
@@ -46,8 +46,8 @@ export interface FeatureFormViewModelEvents {
46
46
  * Call [FeatureLayer#applyEdits()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#applyEdits) method
47
47
  * to update a feature's attributes.
48
48
  *
49
- * @see [FeatureForm#submit()](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm.html#submit)
50
- * @see [FeatureForm#getValues()](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm.html#getValues)
49
+ * @see [submit()](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm.html#submit)
50
+ * @see [getValues()](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm.html#getValues)
51
51
  * @example
52
52
  * // Listen to the feature form's submit event.
53
53
  * featureForm.on("submit", function(){
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import{onLocaleChange as t,substitute as i,fetchMessageBundle as s}from"../../intl.js";import{isSome as l}from"../../core/arrayUtils.js";import o from"../../core/Collection.js";import{referenceSetter as r}from"../../core/collectionUtils.js";import{deprecatedFunction as n}from"../../core/deprecate.js";import a from"../../core/Error.js";import h from"../../core/Handles.js";import d from"../../core/Logger.js";import{abortMaybe as m}from"../../core/maybe.js";import{debounce as c,ignoreAbortErrors as p,after as u,throwIfAborted as g,createResolver as b}from"../../core/promiseUtils.js";import{watch as f,on as y,initial as T}from"../../core/reactiveUtils.js";import{throttle as w}from"../../core/throttle.js";import{property as _,subclass as C}from"../../core/accessorSupport/decorators.js";import{getEffectiveFieldAlias as I}from"../../editing/fieldUtils.js";import{geometryTypes as v}from"../../geometry/support/typeUtils.js";import{getLowerCaseDefaultHiddenFields as E}from"../../layers/support/fieldUtils.js";import{getSubtypesFromLayer as A,isSubtypeGroupLayer as F}from"../../layers/support/layerUtils.js";import{createFieldInfos as S}from"../../support/popupUtils.js";import j from"../../tables/AttributeTableTemplate.js";import R from"../../tables/support/FieldOrder.js";import x from"../../time/TimeExtent.js";import{defaultHighlightName as U,temporaryHighlightName as O}from"../../views/support/HighlightDefaults.js";import{highlightsSupported as V}from"../../views/support/layerViewUtils.js";import{isISelectableLayerWithObjectIds as z}from"../../views/support/selectionUtils.js";import W from"./ActionColumn.js";import P from"./AttachmentsColumn.js";import H from"./FieldColumn.js";import L from"./RelationshipColumn.js";import B from"./Grid/Column.js";import G from"./Grid/Grid.js";import k from"./Grid/GridViewModel.js";import N from"./Grid/GroupColumn.js";import D from"./support/AttachmentsColumnTemplate.js";import M from"./support/AttachmentsViewOptions.js";import{isAttachmentsColumn as $,isFieldColumn as Z,isRelationshipColumn as q}from"./support/columnUtils.js";import{downloadAttachmentInfo as Q,exportToCSV as K}from"./support/exportUtils.js";import J from"./support/FeatureStore.js";import X from"./support/FieldColumnTemplate.js";import Y from"./support/RelationshipColumnTemplate.js";import ee from"./support/TableTemplate.js";import{isIFeatureTableSupportedLayerWithFieldConfigurations as te,isIFeatureTableSupportedLayerWithRelationships as ie,findRelatedLayerInSources as se,findRelationship as le,uniqueColumnNames as oe,hasColumnForField as re,findField as ne,isIFeatureTableSupportedLayerWithAttachments as ae,getTableHighlightKey as he,getRelationshipIdsToShow as de}from"./support/tableUtils.js";import{createAttributeTableElements as me}from"./support/templateUtils.js";import{goTo as ce}from"../support/goToUtils.js";import{messageBundle as pe}from"../support/widget.js";const ue="80px";let ge=class extends k{constructor(e){super(e),this._currentTemporaryHighlight=null,this._highlights=new h,this._refreshDebounced=c(()=>this._refresh()),this._syncTemplateThrottled=w(()=>this._syncAttributeTableTemplate()),this._temporaryHighlightAbortController=null,this.attachmentsViewOptions=new M,this.attributeTableTemplate=null,this.autoRefreshEnabled=!0,this.columns=new o,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,r=await s.fetchItems({...e,page:o});t&&t(r)},this.grid=null,this.highlightEnabled=!0,this.layers=null,this.maxSize=null,this.menuConfig=null,this.messages=null,this.messagesCommon=null,this.messagesUnits=null,this.messagesURIUtils=null,this.prompt=null,this.relatedTables=new o,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 J),this._set("grid",new G({viewModel:this}))}initialize(){const e=async()=>{this.messages=await s("esri/widgets/FeatureTable/t9n/FeatureTable"),this.messagesCommon=await s("esri/t9n/common"),this.messagesUnits=await s("esri/core/t9n/Units"),this.messagesURIUtils=await s("esri/widgets/support/t9n/uriUtils")};e(),this.addHandles([t(()=>{e(),this._generateColumns()}),f(()=>[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()},T),y(()=>this.highlightIds,"change",e=>this._onHighlightIdsChange(e),{onListenerAdd:()=>this._syncSelection(),onListenerRemove:()=>this._highlights.removeAll()}),f(()=>this.grid?.temporaryHighlightId,e=>{this._temporaryHighlightAbortController?.abort(),this._temporaryHighlightAbortController=new AbortController,p(this._syncTemporaryHighlight(e,this._temporaryHighlightAbortController.signal))}),f(()=>this.attachmentsEnabled,()=>this.layer?.loaded&&this._generateColumns()),f(()=>this._viewSelection,()=>{this._viewSelectionReady&&(this.highlightIds.items=this._viewSelection)}),f(()=>[this._tableHighlightsReady,this._viewSelectionReady],()=>this._syncSelection()),f(()=>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)}),f(()=>this.layer?.loaded,e=>e&&this._onLayerLoad()),f(()=>this.store.state,e=>{"loaded"===e&&(this.scrollToTop(),this.refreshCellContent())}),f(()=>this._effectiveTableTemplate,()=>{this.scrollLeft(),this.layer?.loaded&&this._generateColumns()}),f(()=>this.editingEnabled,()=>this.refreshCellContent()),f(()=>this.timeZone??this.view?.timeZone,()=>this.refreshCellContent()),f(()=>this.store.effectiveWhere,()=>"loaded"===this.store.state&&this.reset()),f(()=>this.layer?.timeExtent,(e,t)=>(e||t)&&!this.timeExtent&&"loaded"===this.store.state&&this.reset()),y(()=>this.layer,"refresh",e=>this._onLayerRefresh(e)),y(()=>this.grid,["cell-click","cell-dblclick","cell-pointerover","cell-pointerout","cell-keydown","column-reorder"],({index:e,item:t,native:i,path:s,type:l})=>{const o=t?.feature,r=o?.getObjectId(),n="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:r}),(n||"cell-click"===l)&&this._onCellInteraction(r)}),f(()=>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())}),f(()=>this.relatedRecordsEnabled,()=>this.layer?.loaded&&this._generateColumns()),y(()=>this.objectIds,"change",()=>this._onObjectIdsChange(),{onListenerAdd:()=>this._onObjectIdsChange()}),f(()=>[this.paginationEnabled,this.pageIndex],()=>this.refreshPageCache()),f(()=>this.activeSortOrders,e=>{this.store.sortOrders=e,this._syncTemplateThrottled()}),f(()=>this.allVisibleColumns,()=>this._syncTemplateThrottled()),f(()=>this.pageCount,()=>{this.pageIndex>=this.pageCount&&this.goToPage(0)}),f(()=>this.state,e=>{"disabled"===e&&this.relatedTables.length&&this.drainRelatedTables()}),y(()=>this.tableParent?.highlightIds,"change",({added:e})=>{const{relationshipConfig:t}=this,i=e[0];if(null==i||!t)return;const{relatedLayer:s,relationshipId:l}=t;this.relationshipConfig={objectId:i,relatedLayer:s,relationshipId:l}}),y(()=>this.tableParent,"cell-click",e=>{const{tableParent:t}=this,{objectId:i}=e;t&&null!=i&&t.highlightIds.add(i)}),f(()=>this.attachmentsViewOptions.objectId,(e,t)=>{null!=e?null==t&&this.showAttachmentsView({objectId:e}):this.hideAttachmentsView()}),f(()=>this.layerFieldConfigurations,()=>this.refreshCellContent())])}destroy(){this._drainColumns(),this._highlights.removeAll(),this._highlights.destroy(),this._currentTemporaryHighlight?.handle.remove(),this._temporaryHighlightAbortController=m(this._temporaryHighlightAbortController),this.grid?.destroy(),this.columns.destroyed||this.columns.destroy(),this.layer=null,this.view=null}get _defaultHiddenFields(){return E(this.layer)}get _effectiveTableTemplate(){return this.tableTemplateOverride||this.tableTemplate}get _effectiveAttributeTableTemplate(){return this.attributeTableTemplate||this.layer?.attributeTableTemplate}get _highlightableLayerView(){const e=this.layerView;return V(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;return z(e)&&this._selectionManager?.sources?.includes(e)?e:null}get _subtypes(){return A(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 actionColumn(){return super.actionColumn}get activeFilters(){const{filterGeometry:e,objectIds:t,filterBySelectionEnabled:i,highlightIds:s}=this,l=new o;return e&&l.push({type:"geometry",geometry:e}),i?l.push({type:"selection",objectIds:s.toArray()}):t.length&&l.push({type:"objectId",objectIds:t.toArray()}),l}get activeSortOrders(){return this.grid?.sortOrders?this.grid.sortOrders.map(({path:e,direction:t})=>({fieldName:e,direction:t})).filter(e=>e.fieldName&&e.direction):[]}get allColumns(){return super.allColumns}get allRelatedTablesVisible(){return!!(this.relatedRecordsEnabled&&this.relatedTables.length&&this.showAllRelatedTables)}get allVisibleColumns(){return super.allVisibleColumns}get attachmentsColumns(){return this.allColumns.filter(e=>$(e))}get attachmentsEnabled(){return this.store.attachmentsEnabled}set attachmentsEnabled(e){this.store.attachmentsEnabled=e}get clearPrompt(){return()=>this.prompt=null}set clearPrompt(e){this._overrideIfSome("clearPrompt",e)}get definitionExpression(){return this.store.where}set definitionExpression(e){this.store.where=e}get editingEnabled(){return super.editingEnabled}set editingEnabled(e){super.editingEnabled=e}get effectiveSize(){return super.effectiveSize}get fieldColumns(){return this.allColumns.filter(e=>Z(e))}get filterGeometry(){return this.store.filterGeometry}set filterGeometry(e){this.store.filterGeometry=e}get filterBySelectionEnabled(){return!!this._get("filterBySelectionEnabled")}set filterBySelectionEnabled(e){const{objectIds:t}=this,i=t.length;e?(i&&(t.removeAll(),this._logWarning("Selection filter has been applied with an objectID filter. Object ID filter has been removed.")),this.filterGeometry&&this._logWarning("Selection filter has been applied with a geometry filter. Results may appear inconsistent"),this._syncObjectIdsWithStore(this.highlightIds.toArray())):i||this._syncObjectIdsWithStore(null),this._set("filterBySelectionEnabled",e)}get groupColumns(){return super.groupColumns}get hiddenFields(){return this._get("hiddenFields")??new o}set hiddenFields(e){this._set("hiddenFields",r(e,this._get("hiddenFields"),o))}get highlightIds(){return super.highlightIds}set highlightIds(e){super.highlightIds=e}get initialSize(){return this.store.initialSize}set initialSize(e){this.store.initialSize=e}get isEditing(){return super.isEditing}get isQuerying(){return super.isQuerying}get isSyncing(){return super.isSyncing}get isQueryingOrSyncing(){return this.isQuerying||this.isSyncing||this.relatedTables.some(e=>!!e.isQueryingOrSyncing)}get isSyncingAttachments(){return this.store.isSyncingAttachmentEdits||this.relatedTables.some(e=>!!e.isSyncingAttachments)}get layer(){return this._get("layer")}set layer(e){this._highlights.removeAll(),this.drainRelatedTables(),this._set("layer",e)}get layerFieldConfigurations(){const e=this.layer;return te(e)?e.fieldConfigurations:void 0}get layerView(){return this.store.layerView}get objectIds(){return super.objectIds}set objectIds(e){super.objectIds=e}get outFields(){return this.store.outFields}set outFields(e){this.store.outFields=e}get pageCount(){return super.pageCount}get pageIndex(){return super.pageIndex}set pageIndex(e){super.pageIndex=e}get pageSize(){return super.pageSize}set pageSize(e){super.pageSize=e}get 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 relationshipColumns(){return this.allColumns.filter(e=>q(e))}get relationshipConfig(){return this.store.relationshipConfig}set relationshipConfig(e){this.highlightIds.removeAll(),this.objectIds.removeAll(),this.filterBySelectionEnabled=!1,this.store.relationshipConfig=e}get relationshipInfos(){const{layer:e,layers:t,relationships:i,tableController:s}=this,l=this.store.relationshipInfos;if(l.length||!ie(e)||!i?.length)return l;const o=[],r=s?.layers||t||[];return i.forEach(t=>{const i=se(e,r,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 rowHighlightIds(){return super.rowHighlightIds}set rowHighlightIds(e){super.rowHighlightIds=e}get showAllRelatedTables(){return this._get("showAllRelatedTables")}set showAllRelatedTables(e){const{relatedTable:t}=this;this._set("showAllRelatedTables",e),t&&(e?this._showAllRelatedTables(t):this._hideAllRelatedTables(t))}get showPrompt(){return e=>{this.prompt?.cancel?.(),this.prompt=e}}set showPrompt(e){this._overrideIfSome("showPrompt",e)}get size(){return super.size}get state(){return super.state}get supportsAttachments(){return this.store.supportsAttachments}get supportsAddAttachments(){const{store:{supportsAddAttachments:e,supportsEditing:t}}=this;return this.editingEnabled&&t&&e}get supportsDeleteAttachments(){return this.supportsUpdateAttachments}get supportsResizeAttachments(){return this.store.supportsResizeAttachments}get supportsUpdateAttachments(){const{store:{supportsUpdateAttachments:e,supportsEditing:t}}=this;return this.editingEnabled&&t&&e}get timeExtent(){return this.store.timeExtent}set timeExtent(e){this.store.timeExtent=e}get timeZone(){return this.store.timeZone}set timeZone(e){this.store.timeZone=e}get view(){return this.store.view}set view(e){this.store.view=e,this.fieldColumns.forEach(t=>t.view=e),this.refreshCellContent()}get visibleColumns(){return super.visibleColumns}async addAttachment(e,t){const{attachmentsViewOptions:i,store:s}=this,l=i.objectId===e;await s.addAttachment(e,t).catch(e=>{l&&e&&"object"==typeof e&&"error"in e&&e.error instanceof a&&(this._logWarning(`Unable to add attachment. ${e.error.name} ${e.error.message}`),i.error=e.error)}),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 a&&(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:i,objectId:s,relationshipId:l}=t,{objectIdField:r}=i,n=le(i,l),a=i.displayField||n?.keyField||r;e.set({highlightIds:new o([s]),multipleSelectionEnabled:!1,tableTemplateOverride:this._getTableTemplateForRelatedTableView(e,a,l)});const h=e.hiddenFields;h.includes(oe.action)||h.add(oe.action),h.includes(oe.attachments)||h.add(oe.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);await Q(i)}drainRelatedTables(){this.relatedTables.drain(e=>e.destroy()),this.set({multipleSelectionEnabled:!0,relationshipColumnConfigs:null,showAllRelatedTables:!1,tableTemplateOverride:null}),this.hiddenFields.removeMany([oe.action,oe.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."):(n(d.getLogger(this),"`FeatureTable.filterBySelection` is deprecated in favor of 'filterBySelectionEnabled' and 'objectIds'",{replacement:"FeatureTable.filterBySelectionEnabled or FeatureTable.objectIds",version:"4.30",warnOnce:!0}),this.objectIds.addMany(this.highlightIds.toArray()))}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(oe.action)}nextPage(){const e=this.paginationEnabled?this.pageIndex:this.getVirtualPageIndex();this.goToPage(e+1)}previousPage(){const e=this.paginationEnabled?this.pageIndex:this.getVirtualPageIndex();this.goToPage(e-1)}async refresh(){await Promise.all([...this.relatedTables.map(e=>e.refresh()),p(this._refreshDebounced())])}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:i,layer:s}=this;if(!this.attachmentsEnabled||!s)return void this._logWarning("The 'attachmentsEnabled' property is currently false.");await s.load();const l=this._getDefaultLayerDisplayField(s),r=await this.store.getAttachmentsByObjectId(e,!0),n=this.store.getItemIndexByObjectId(e);t.set({attachmentInfos:r,mode:r.length?"list":"file",objectId:e}),this.set({highlightIds:new o([e]),multipleSelectionEnabled:!1,relationshipColumnConfigs:[],tableTemplateOverride:this._getTableTemplateForAttachmentsView(l)}),i.includes(oe.action)||i.add(oe.action),null!=n&&this.scrollToIndex(n)}syncAttributeTableTemplate(){this._syncAttributeTableTemplate(!0)}clearSelectionFilter(){n(d.getLogger(this),"`FeatureTable.clearSelectionFilter` is deprecated in favor of 'filterBySelectionEnabled' and 'objectIds'",{replacement:"FeatureTable.filterBySelectionEnabled or FeatureTable.objectIds",version:"4.30",warnOnce:!0}),this.objectIds.removeAll()}async updateAttachment(e,t,i){const{attachmentsViewOptions:s,store:l}=this,o=s.objectId===e;await l.updateAttachment(e,t,i).catch(e=>{o&&e&&"object"==typeof e&&"error"in e&&e.error instanceof a&&(this._logWarning(`Unable to update attachment. ${e.error.name} ${e.error.message}`),s.error=e.error)}),o&&!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 ce(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:r,columns:n}=this,a=[],h=me(n.toArray());o.forEach(({fieldName:e,direction:t})=>{e&&t&&a.push(new R({field:e,order:t}))}),r.forEach(({fieldName:e,direction:t})=>{t&&!a.some(t=>t.field===e)&&a.push(new R({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&&F(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=>$(e))&&s.push(this._generateDefaultAttachmentsColumn()),this.relatedRecordsEnabled&&this.relationshipInfos.length&&!s.some(e=>q(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:t}=this;if(!e||!t)return null;const{elements:i,orderByFields:s}=e,o=S(t),r=[];r.push(...this._generateColumnsFromAttributeTableElements(i,s));const n=o.map(e=>{if(!e.fieldName||re(e.fieldName,r))return null;const{fieldName:i}=e,l=ne(t,i);return l?this._generateDefaultFieldColumn(l,{hidden:!0,orderByFields:s}):(this._logTemplateWarning("A valid 'field' could not be found for the provided template."),null)}).filter(l);return r.push(...n),this.attachmentsEnabled&&ae(t)&&!r.some(e=>$(e))&&r.push(this._generateDefaultAttachmentsColumn({hidden:!0})),this.relatedRecordsEnabled&&ie(t)&&t.relationships?.forEach(({id:e},t)=>{const i=this.relationshipInfos.find(t=>t.relationshipId===e);i&&!r.some(t=>q(t)&&t.relationshipId===e)&&r.push(this._generateDefaultRelationshipColumn({hidden:!0,info:i,index:t}))}),r.length?r:null}_generateColumnsFromAttributeTableElements(e,t){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=ne(t,l);if(!o)return this._logTemplateWarning("A valid 'field' could not be found for the provided template."),null;const{description:r,label:n}=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,{grid:m,messages:c,messagesCommon:p,messagesURIUtils:u,store:g,view:b}=this;return new H({description:r,direction:h,field:o,fieldName:l,grid:m,initialSortPriority:d,label:n,layer:t,messages:c,messagesCommon:p,messagesURIUtils:u,store:g,view:b,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:r,messagesCommon:n,messagesURIUtils:a,store:h}=this;return new N({columns:this._generateColumnsFromAttributeTableElements(t.elements,i),description:s,grid:o,label:l,messages:r,messagesCommon:n,messagesURIUtils:a,store:h})}_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:r,messages:n,messagesCommon:a,messagesURIUtils:h,store:d}=this;return new P({description:s,fieldName:`${oe.attachments}-${i}`,grid:o,label:l,layer:r,messages:n,messagesCommon:a,messagesURIUtils:h,store:d,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,r=this.relationshipInfos.find(e=>e.relationshipId===o);if(!r)return this._logTemplateWarning("Unable to find valid related layer target based on the provided relationship id."),null;const{grid:n,messages:a,messagesCommon:h,messagesURIUtils:d,store:m}=this;return new L({description:s,fieldName:`${oe.relationship}-${o}-${i}`,grid:n,label:l,messages:a,messagesCommon:h,messagesURIUtils:d,relationshipId:o,store:m,layer:r.relatedLayer,relatedLayer:r.layer,showRelatedTableCallback:e=>this._onShowRelatedTable(e)})}_generateColumnsFromColumnTemplates(e){const{grid:t,layer:i,messages:s,messagesCommon:l,messagesURIUtils:o,store:r,view:n}=this;if(!e?.length||!i)return null;const a=[];return e.forEach((e,h)=>{const{autoWidth:d,description:m,direction:c,flexGrow:p,fieldName:u,formatFunction:g,frozen:b,frozenToEnd:f,icon:y,iconText:T,initialSortPriority:w,invalid:_,label:C,labelTooltipText:I,menuConfig:v,resizable:E,sortable:A,textAlign:F,textWrap:S,timeZone:j,type:R,width:x}=e;if(!R)return void this._logTemplateWarning("Property 'type' is missing from the provided template.");if(b&&f)return void this._logTemplateWarning("Properties 'frozen' and 'frozenToEnd' cannot both be true for the same column.");const U=!1===e.visible;if("group"===R){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 i=this._generateColumnsFromColumnTemplates(e.columnTemplates),r=U||this._isFieldHidden(e.label);a.push(new N({autoWidth:d,columns:i,description:m,flexGrow:p,frozen:b,frozenToEnd:f,grid:t,hidden:r,icon:y,iconText:T,invalid:_,label:C,labelTooltipText:I,menuConfig:v,messages:s,messagesCommon:l,messagesURIUtils:o,resizable:E,textAlign:F,textWrap:S,timeZone:j,width:x}))}else if("attachment"===R){if(!this.attachmentsEnabled)return void this._logTemplateWarning("Attachment columns require attachments to be enabled on the table.");a.push(this._generateAttachmentsColumnFromTemplate(e,h))}else if("relationship"===R){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.");a.push(this._generateRelationshipColumnFromTemplate(i,e,h))}else if(!u)return void this._logTemplateWarning("Value for 'fieldName' property was missing from the provided template.");const O=U||this._isFieldHidden(u);if("column"===R)a.push(new B({autoWidth:d,description:m,direction:c,fieldName:u,flexGrow:p,formatFunction:g,frozen:b,frozenToEnd:f,grid:t,hidden:O,icon:y,iconText:T,initialSortPriority:w,invalid:_,label:C,labelTooltipText:I,menuConfig:v,messages:s,messagesCommon:l,messagesURIUtils:o,resizable:E,sortable:A,textAlign:F,textWrap:S,timeZone:j,width:x}));else if("field"===R){const h=ne(i,e.fieldName);if(!h)return void this._logTemplateWarning("A valid 'field' could not be found for the provided template.");const{editable:u,required:R}=e;a.push(new H({autoWidth:d,description:m,direction:c,editable:u,field:h,fieldName:h.name,flexGrow:p,formatFunction:g,frozen:b,frozenToEnd:f,grid:t,hidden:O,icon:y,iconText:T,initialSortPriority:w,invalid:_,label:C,labelTooltipText:I,layer:i,messages:s,messagesCommon:l,messagesURIUtils:o,menuConfig:v,required:R,resizable:E,sortable:A,store:r,template:e,textAlign:F,textWrap:S,timeZone:j,width:x,view:n,onShowPromptCallback:this._onShowPromptCallback}))}}),a.length?a:null}_generateDefaultFieldColumns(){return this.layer?.fields?.map(e=>this._generateDefaultFieldColumn(e)).filter(l)??[]}_generateDefaultFieldColumn(e,t){const{grid:i,layer:s,messages:l,messagesCommon:o,messagesURIUtils:r,store:n,view:a}=this,h=t?.orderByFields;if(!e.visible||"geometry"===e.type)return null;const d=e.name,m=h?.findIndex(({field:e})=>e&&e===d)??-1,c=m>-1?h?.at(m)?.order:void 0,p=m>-1?m:void 0;return new H({direction:c,field:e,fieldName:d,grid:i,hidden:t?.hidden||this._isFieldHidden(d),initialSortPriority:p,layer:s,messages:l,messagesCommon:o,messagesURIUtils:r,store:n,view:a,onShowPromptCallback:this._onShowPromptCallback})}_generateAttachmentsColumnFromTemplate(e,t){const{grid:i,layer:s,messages:l,messagesCommon:o,messagesURIUtils:r,store:n}=this,{attachmentsViewEnabled:a,autoWidth:h,description:d,flexGrow:m,fieldName:c,formatFunction:p,frozen:u,frozenToEnd:g,icon:b,iconText:f,invalid:y,label:T,labelTooltipText:w,menuConfig:_,resizable:C,textAlign:I,textWrap:v,thumbnailAppearance:E,thumbnailCount:A,thumbnailIconScale:F,thumbnailsEnabled:S,timeZone:j,width:R}=e;return new P({attachmentsViewEnabled:a,autoWidth:h,description:d,fieldName:`${oe.attachments}-${t}`,flexGrow:m,formatFunction:p,frozen:u,frozenToEnd:g,grid:i,hidden:!1===e.visible||this._isFieldHidden(T)||this._isFieldHidden(c),icon:b,iconText:f,invalid:y,label:T,labelTooltipText:w,layer:s,menuConfig:_,messages:l,messagesCommon:o,messagesURIUtils:r,resizable:C,store:n,textAlign:I,textWrap:v,thumbnailAppearance:E,thumbnailCount:A,thumbnailIconScale:F,thumbnailsEnabled:S,timeZone:j,width:R,onShowAttachments:e=>this._onShowAttachments(e)})}_generateDefaultAttachmentsColumn(e){const{grid:t,layer:i,messages:s,messagesCommon:l,messagesURIUtils:o,store:r}=this,n=oe.attachments;return new P({fieldName:n,grid:t,hidden:e?.hidden||this._isFieldHidden(n),layer:i,messages:s,messagesCommon:l,messagesURIUtils:o,store:r,onShowAttachments:e=>this._onShowAttachments(e)})}_generateRelationshipColumnFromTemplate(e,t,i){const{grid:s,messages:l,messagesCommon:o,messagesURIUtils:r,store:n}=this,{autoWidth:a,collapsed:h,description:d,flexGrow:m,fieldName:c,formatFunction:p,frozen:u,frozenToEnd:g,icon:b,iconText:f,invalid:y,label:T,labelTooltipText:w,menuConfig:_,relationshipId:C,resizable:I,textAlign:v,textWrap:E,timeZone:A,width:F}=t;return new L({autoWidth:a,collapsed:h,description:d,fieldName:`${oe.relationship}-${C}-${i}`,flexGrow:m,formatFunction:p,frozen:u,frozenToEnd:g,grid:s,hidden:!1===t.visible||this._isFieldHidden(T)||this._isFieldHidden(c),icon:b,iconText:f,invalid:y,label:T,labelTooltipText:w,menuConfig:_,messages:l,messagesCommon:o,messagesURIUtils:r,relationshipId:C,resizable:I,store:n,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:r,messagesCommon:n,messagesURIUtils:a}=this,{relationshipId:h}=l;return new L({...t,fieldName:`${oe.relationship}-${h}-${s}`,grid:o,hidden:i,messages:r,messagesCommon:n,messagesURIUtils:a,layer:l.relatedLayer,relatedLayer:l.layer,relationshipId:h,showRelatedTableCallback:e=>this._onShowRelatedTable(e)})}_generateActionColumn(){return new W({hidden:this._isFieldHidden(oe.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:U}),he(i,e))}}_removeTableHighlight(e){const{layer:t}=this;t&&this._highlights.remove(he(t,e))}async _syncTemporaryHighlight(e,t){if(!this.highlightEnabled)return this._currentTemporaryHighlight?.handle.remove(),void(this._currentTemporaryHighlight=null);if(await u(25),g(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:O})})}_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(oe.action)||s.add(oe.action),s.includes(oe.attachments)||s.add(oe.attachments)}_hideAllRelatedTables(e){const{layer:t,relationship:i}=e;if(t&&null!=i?.id)if(null!=e.attachmentsViewOptions.objectId){const i=this._getDefaultLayerDisplayField(t);e.set({multipleSelectionEnabled:!1,relationshipColumnConfigs:[],showAllRelatedTables:!1,tableTemplateOverride:this._getTableTemplateForAttachmentsView(i)})}else e.set({multipleSelectionEnabled:!0,relationshipColumnConfigs:de(t,i.id),showAllRelatedTables:!1,tableTemplateOverride:null}),e.hiddenFields.removeMany([oe.action,oe.attachments])}_getTableTemplateForRelatedTableView(e,t,i){return new ee({columnTemplates:[new X({fieldName:t,editable:!1,menuConfig:{selectionMode:"single",icon:"chevron-down",items:this._extractFieldColumnInfosFromTableTemplate(e.viewModel).map(([s,l])=>({selected:s===t,label:l||s,clickFunction:()=>{e.tableTemplateOverride=this._getTableTemplateForRelatedTableView(e,s,i)}}))},resizable:!1}),new Y({autoWidth:!1,collapsed:!0,flexGrow:0,label:"",resizable:!1,relationshipId:i,width:ue})]})}_getTableTemplateForShowAllTablesView(e,t){const i=[new X({fieldName:t,editable:!1,menuConfig:{selectionMode:"single",icon:"chevron-down",items:this._extractFieldColumnInfosFromTableTemplate(e.viewModel).map(([i,s])=>({selected:i===t,label:s||i,clickFunction:()=>{e.tableTemplateOverride=this._getTableTemplateForShowAllTablesView(e,i)}}))},resizable:!1})];return null!=e.attachmentsViewOptions.objectId&&i.push(new D({attachmentsViewEnabled:!1,autoWidth:!1,flexGrow:0,label:"",resizable:!1,thumbnailsEnabled:!1,width:ue})),new ee({columnTemplates:i})}async _onShowPromptCallback(e){const{column:t,objectId:i,oldValue:s,value:l}=e,{_subtypes:o,layer:r}=this;if(!r||!o.length)return void t.cancel();const n=o.find(e=>e.code===l);if(!n)return void t.cancel();const a=b(),h=this._createSubtypeEditPrompt(s,n,a),d=!!r.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(n.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,s){const{_subtypes:l,messages:o,messagesCommon:r}=this,n=l.find(t=>t.code===e)?.name??`${e}`;let a="update-fields";const h=[{label:o.subtypes.useDefaultValuesOption,value:"update-fields"},{label:o.subtypes.keepCurrentValuesOption,value:"keep-existing"}];return{context:"info",title:o.subtypes.changeWarningTitle,message:i(o.subtypes.changeWarning,{originalType:n,newType:t.name}),radios:h,defaultRadioSelection:"update-fields",onRadioSelection:e=>{a=e},actions:{primary:{label:r.apply,action:()=>s.resolve(a),type:"positive"},secondary:{label:r.cancel,type:"neutral",action:()=>s.resolve("undo")}},cancel:()=>s.reject()}}_onShowAttachments({objectId:e}){this.attachmentsViewOptions.objectId=e}_getTableTemplateForAttachmentsView(e){return new ee({columnTemplates:[new X({fieldName:e,editable:!1,menuConfig:{selectionMode:"single",icon:"chevron-down",items:this._extractFieldColumnInfosFromTableTemplate(this).map(([t,i])=>({selected:t===e,label:i||t,clickFunction:()=>{this.tableTemplateOverride=this._getTableTemplateForAttachmentsView(t)}}))},resizable:!1}),new D({attachmentsViewEnabled:!1,autoWidth:!1,flexGrow:0,label:"",resizable:!1,thumbnailsEnabled:!1,width:ue})]})}_extractFieldColumnInfosFromTableTemplate(e){const t=e??this,{layer:i,tableTemplate:s}=t;return s?s.columnTemplates.filter(({type:e})=>"field"===e||"column"===e).map(({fieldName:e,label:t})=>{if(null!=t&&""!==t)return[e,t];const s=i?.fieldsIndex.get(e);return[e,s&&I(s,i)]}):i?.fields.map(e=>[e.name,I(e,i)])??[]}_getDefaultLayerDisplayField(e){const{displayField:t,objectIdField:i}=e;return t&&""!==t.trim()?t:i||(e.fields.length?e.fields[0].name:"")}_getIndexOfFirstFrozenToEndColumn(){const e=this.columns.findIndex(e=>e.frozenToEnd);return e>-1?e:void 0}_logWarning(e,t){t?d.getLogger(this).warnOnce(e):d.getLogger(this).warn(e)}_logTemplateWarning(e){this._logWarning(`${e} Skipped generating a column using the provided template.`,!0)}_onCellInteraction(e){null!=e&&null!=this.attachmentsViewOptions.objectId&&this.highlightIds.add(e)}};e([_()],ge.prototype,"_defaultHiddenFields",null),e([_()],ge.prototype,"_effectiveTableTemplate",null),e([_()],ge.prototype,"_effectiveAttributeTableTemplate",null),e([_()],ge.prototype,"_highlights",void 0),e([_()],ge.prototype,"_highlightableLayerView",null),e([_()],ge.prototype,"_selectionManager",null),e([_()],ge.prototype,"_selectableLayer",null),e([_()],ge.prototype,"_subtypes",null),e([_()],ge.prototype,"_tableHighlightsReady",null),e([_()],ge.prototype,"_viewSelection",null),e([_()],ge.prototype,"_viewSelectionReady",null),e([_()],ge.prototype,"activeFilters",null),e([_({readOnly:!0})],ge.prototype,"activeSortOrders",null),e([_()],ge.prototype,"allRelatedTablesVisible",null),e([_()],ge.prototype,"attachmentsColumns",null),e([_()],ge.prototype,"attachmentsEnabled",null),e([_()],ge.prototype,"attachmentsViewOptions",void 0),e([_({type:j})],ge.prototype,"attributeTableTemplate",void 0),e([_()],ge.prototype,"autoRefreshEnabled",void 0),e([_()],ge.prototype,"clearPrompt",null),e([_({readOnly:!0})],ge.prototype,"columns",void 0),e([_()],ge.prototype,"dataProvider",void 0),e([_()],ge.prototype,"definitionExpression",null),e([_()],ge.prototype,"fieldColumns",null),e([_({types:v})],ge.prototype,"filterGeometry",null),e([_()],ge.prototype,"filterBySelectionEnabled",null),e([_({readOnly:!0})],ge.prototype,"grid",void 0),e([_()],ge.prototype,"hiddenFields",null),e([_()],ge.prototype,"highlightEnabled",void 0),e([_()],ge.prototype,"initialSize",null),e([_()],ge.prototype,"isQueryingOrSyncing",null),e([_()],ge.prototype,"isSyncingAttachments",null),e([_()],ge.prototype,"layer",null),e([_()],ge.prototype,"layers",void 0),e([_()],ge.prototype,"layerFieldConfigurations",null),e([_()],ge.prototype,"layerView",null),e([_()],ge.prototype,"menuConfig",void 0),e([_()],ge.prototype,"messages",void 0),e([_(),pe("esri/t9n/common")],ge.prototype,"messagesCommon",void 0),e([_(),pe("esri/core/t9n/Units")],ge.prototype,"messagesUnits",void 0),e([_(),pe("esri/widgets/support/t9n/uriUtils")],ge.prototype,"messagesURIUtils",void 0),e([_()],ge.prototype,"outFields",null),e([_()],ge.prototype,"prompt",void 0),e([_()],ge.prototype,"relatedRecordsEnabled",null),e([_()],ge.prototype,"relatedTable",null),e([_()],ge.prototype,"relatedTables",void 0),e([_()],ge.prototype,"relationship",null),e([_()],ge.prototype,"relationshipColumnConfigs",void 0),e([_()],ge.prototype,"relationshipColumns",null),e([_()],ge.prototype,"relationshipConfig",null),e([_()],ge.prototype,"relationshipInfos",null),e([_()],ge.prototype,"relationships",null),e([_()],ge.prototype,"returnGeometryEnabled",null),e([_()],ge.prototype,"returnMEnabled",null),e([_()],ge.prototype,"returnZEnabled",null),e([_()],ge.prototype,"selectionSource",void 0),e([_()],ge.prototype,"showAllRelatedTables",null),e([_()],ge.prototype,"showPrompt",null),e([_()],ge.prototype,"showRelatedTableCallback",void 0),e([_({readOnly:!0,type:J})],ge.prototype,"store",void 0),e([_()],ge.prototype,"supportsAttachments",null),e([_()],ge.prototype,"supportsAddAttachments",null),e([_()],ge.prototype,"supportsDeleteAttachments",null),e([_()],ge.prototype,"supportsResizeAttachments",null),e([_()],ge.prototype,"supportsUpdateAttachments",null),e([_()],ge.prototype,"syncTemplateOnChangesEnabled",void 0),e([_()],ge.prototype,"tableController",void 0),e([_()],ge.prototype,"tableParent",void 0),e([_({type:ee})],ge.prototype,"tableTemplate",void 0),e([_()],ge.prototype,"tableTemplateOverride",void 0),e([_({type:x})],ge.prototype,"timeExtent",null),e([_()],ge.prototype,"timeZone",null),e([_()],ge.prototype,"view",null),ge=e([C("esri.widgets.FeatureTable.FeatureTableViewModel")],ge);const be=ge;export{be as default};
5
+ import{__decorate as e}from"tslib";import{onLocaleChange as t,substitute as i,fetchMessageBundle as s}from"../../intl.js";import{isSome as l}from"../../core/arrayUtils.js";import o from"../../core/Collection.js";import{referenceSetter as r}from"../../core/collectionUtils.js";import{deprecatedFunction as n}from"../../core/deprecate.js";import a from"../../core/Error.js";import h from"../../core/Handles.js";import d from"../../core/Logger.js";import{abortMaybe as m}from"../../core/maybe.js";import{debounce as c,ignoreAbortErrors as p,after as u,throwIfAborted as g,createResolver as b}from"../../core/promiseUtils.js";import{watch as f,on as y,initial as T}from"../../core/reactiveUtils.js";import{throttle as w}from"../../core/throttle.js";import{property as _,subclass as C}from"../../core/accessorSupport/decorators.js";import{getEffectiveFieldAlias as I}from"../../editing/fieldUtils.js";import{geometryTypes as v}from"../../geometry/support/typeUtils.js";import{getLowerCaseDefaultHiddenFields as E}from"../../layers/support/fieldUtils.js";import{getSubtypesFromLayer as A,isSubtypeGroupLayer as F}from"../../layers/support/layerUtils.js";import{createFieldInfos as S}from"../../support/popupUtils.js";import j from"../../tables/AttributeTableTemplate.js";import R from"../../tables/support/FieldOrder.js";import x from"../../time/TimeExtent.js";import{defaultHighlightName as U,temporaryHighlightName as O}from"../../views/support/HighlightDefaults.js";import{highlightsSupported as V}from"../../views/support/layerViewUtils.js";import{isISelectableLayerWithObjectIds as z}from"../../views/support/selectionUtils.js";import W from"./ActionColumn.js";import P from"./AttachmentsColumn.js";import H from"./FieldColumn.js";import L from"./RelationshipColumn.js";import B from"./Grid/Column.js";import G from"./Grid/Grid.js";import k from"./Grid/GridViewModel.js";import N from"./Grid/GroupColumn.js";import D from"./support/AttachmentsColumnTemplate.js";import M from"./support/AttachmentsViewOptions.js";import{isAttachmentsColumn as $,isFieldColumn as Z,isRelationshipColumn as q}from"./support/columnUtils.js";import{downloadAttachmentInfo as Q,exportToCSV as K}from"./support/exportUtils.js";import J from"./support/FeatureStore.js";import X from"./support/FieldColumnTemplate.js";import Y from"./support/RelationshipColumnTemplate.js";import ee from"./support/TableTemplate.js";import{isIFeatureTableSupportedLayerWithFieldConfigurations as te,isIFeatureTableSupportedLayerWithRelationships as ie,findRelatedLayerInSources as se,findRelationship as le,uniqueColumnNames as oe,hasColumnForField as re,findField as ne,isIFeatureTableSupportedLayerWithAttachments as ae,getTableHighlightKey as he,getRelationshipIdsToShow as de}from"./support/tableUtils.js";import{createAttributeTableElements as me}from"./support/templateUtils.js";import{goTo as ce}from"../support/goToUtils.js";import{messageBundle as pe}from"../support/widget.js";const ue="80px";let ge=class extends k{constructor(e){super(e),this._currentTemporaryHighlight=null,this._highlights=new h,this._refreshDebounced=c(()=>this._refresh()),this._syncTemplateThrottled=w(()=>this._syncAttributeTableTemplate()),this._temporaryHighlightAbortController=null,this.attachmentsViewOptions=new M,this.attributeTableTemplate=null,this.autoRefreshEnabled=!0,this.columns=new o,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,r=await s.fetchItems({...e,page:o});t&&t(r)},this.grid=null,this.highlightEnabled=!0,this.layers=null,this.maxSize=null,this.menuConfig=null,this.messages=null,this.messagesCommon=null,this.messagesUnits=null,this.messagesURIUtils=null,this.prompt=null,this.relatedTables=new o,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 J),this._set("grid",new G({viewModel:this}))}initialize(){const e=async()=>{this.messages=await s("esri/widgets/FeatureTable/t9n/FeatureTable"),this.messagesCommon=await s("esri/t9n/common"),this.messagesUnits=await s("esri/core/t9n/Units"),this.messagesURIUtils=await s("esri/widgets/support/t9n/uriUtils")};e(),this.addHandles([t(()=>{e(),this._generateColumns()}),f(()=>[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()},T),y(()=>this.highlightIds,"change",e=>this._onHighlightIdsChange(e),{onListenerAdd:()=>this._syncSelection(),onListenerRemove:()=>this._highlights.removeAll()}),f(()=>this.grid?.temporaryHighlightId,e=>{this._temporaryHighlightAbortController?.abort(),this._temporaryHighlightAbortController=new AbortController,p(this._syncTemporaryHighlight(e,this._temporaryHighlightAbortController.signal))}),f(()=>this.attachmentsEnabled,()=>this.layer?.loaded&&this._generateColumns()),f(()=>this._viewSelection,()=>{this._viewSelectionReady&&(this.highlightIds.items=this._viewSelection)}),f(()=>[this._tableHighlightsReady,this._viewSelectionReady],()=>this._syncSelection()),f(()=>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)}),f(()=>this.layer?.loaded,e=>e&&this._onLayerLoad()),f(()=>this.store.state,e=>{"loaded"===e&&(this.scrollToTop(),this.refreshCellContent())}),f(()=>this._effectiveTableTemplate,()=>{this.scrollLeft(),this.layer?.loaded&&this._generateColumns()}),f(()=>this.editingEnabled,()=>this.refreshCellContent()),f(()=>this.timeZone??this.view?.timeZone,()=>this.refreshCellContent()),f(()=>this.store.effectiveWhere,()=>"loaded"===this.store.state&&this.reset()),f(()=>this.layer?.timeExtent,(e,t)=>(e||t)&&!this.timeExtent&&"loaded"===this.store.state&&this.reset()),y(()=>this.layer,"refresh",e=>this._onLayerRefresh(e)),y(()=>this.grid,["cell-click","cell-dblclick","cell-pointerover","cell-pointerout","cell-keydown","column-reorder"],({index:e,item:t,native:i,path:s,type:l})=>{const o=t?.feature,r=o?.getObjectId(),n="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:r}),(n||"cell-click"===l)&&this._onCellInteraction(r)}),f(()=>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())}),f(()=>this.relatedRecordsEnabled,()=>this.layer?.loaded&&this._generateColumns()),y(()=>this.objectIds,"change",()=>this._onObjectIdsChange(),{onListenerAdd:()=>this._onObjectIdsChange()}),f(()=>[this.paginationEnabled,this.pageIndex],()=>this.refreshPageCache()),f(()=>this.activeSortOrders,e=>{this.store.sortOrders=e,this._syncTemplateThrottled()}),f(()=>this.allVisibleColumns,()=>this._syncTemplateThrottled()),f(()=>this.pageCount,()=>{this.pageIndex>=this.pageCount&&this.goToPage(0)}),f(()=>this.state,e=>{"disabled"===e&&this.relatedTables.length&&this.drainRelatedTables()}),y(()=>this.tableParent?.highlightIds,"change",({added:e})=>{const{relationshipConfig:t}=this,i=e[0];if(null==i||!t)return;const{relatedLayer:s,relationshipId:l}=t;this.relationshipConfig={objectId:i,relatedLayer:s,relationshipId:l}}),y(()=>this.tableParent,"cell-click",e=>{const{tableParent:t}=this,{objectId:i}=e;t&&null!=i&&t.highlightIds.add(i)}),f(()=>this.attachmentsViewOptions.objectId,(e,t)=>{null!=e?null==t&&this.showAttachmentsView({objectId:e}):this.hideAttachmentsView()}),f(()=>this.layerFieldConfigurations,()=>this.refreshCellContent())])}destroy(){this._drainColumns(),this._highlights.removeAll(),this._highlights.destroy(),this._currentTemporaryHighlight?.handle.remove(),this._temporaryHighlightAbortController=m(this._temporaryHighlightAbortController),this.grid?.destroy(),this.columns.destroyed||this.columns.destroy(),this.layer=null,this.view=null}get _defaultHiddenFields(){return E(this.layer)}get _effectiveTableTemplate(){return this.tableTemplateOverride||this.tableTemplate}get _effectiveAttributeTableTemplate(){return this.attributeTableTemplate||this.layer?.attributeTableTemplate}get _highlightableLayerView(){const e=this.layerView;return V(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;return z(e)&&this._selectionManager?.sources?.includes(e)?e:null}get _subtypes(){return A(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 actionColumn(){return super.actionColumn}get activeFilters(){const{filterGeometry:e,objectIds:t,filterBySelectionEnabled:i,highlightIds:s}=this,l=new o;return e&&l.push({type:"geometry",geometry:e}),i?l.push({type:"selection",objectIds:s.toArray()}):t.length&&l.push({type:"objectId",objectIds:t.toArray()}),l}get activeSortOrders(){return this.grid?.sortOrders?this.grid.sortOrders.map(({path:e,direction:t})=>({fieldName:e,direction:t})).filter(e=>e.fieldName&&e.direction):[]}get allColumns(){return super.allColumns}get allRelatedTablesVisible(){return!!(this.relatedRecordsEnabled&&this.relatedTables.length&&this.showAllRelatedTables)}get allVisibleColumns(){return super.allVisibleColumns}get attachmentsColumns(){return this.allColumns.filter(e=>$(e))}get attachmentsEnabled(){return this.store.attachmentsEnabled}set attachmentsEnabled(e){this.store.attachmentsEnabled=e}get clearPrompt(){return()=>this.prompt=null}set clearPrompt(e){this._overrideIfSome("clearPrompt",e)}get definitionExpression(){return this.store.where}set definitionExpression(e){this.store.where=e}get editingEnabled(){return super.editingEnabled}set editingEnabled(e){super.editingEnabled=e}get effectiveSize(){return super.effectiveSize}get fieldColumns(){return this.allColumns.filter(e=>Z(e))}get filterGeometry(){return this.store.filterGeometry}set filterGeometry(e){this.store.filterGeometry=e}get filterBySelectionEnabled(){return!!this._get("filterBySelectionEnabled")}set filterBySelectionEnabled(e){const{objectIds:t}=this,i=t.length;e?(i&&(t.removeAll(),this._logWarning("Selection filter has been applied with an objectID filter. Object ID filter has been removed.")),this.filterGeometry&&this._logWarning("Selection filter has been applied with a geometry filter. Results may appear inconsistent"),this._syncObjectIdsWithStore(this.highlightIds.toArray())):i||this._syncObjectIdsWithStore(null),this._set("filterBySelectionEnabled",e)}get groupColumns(){return super.groupColumns}get hiddenFields(){return this._get("hiddenFields")??new o}set hiddenFields(e){this._set("hiddenFields",r(e,this._get("hiddenFields"),o))}get highlightIds(){return super.highlightIds}set highlightIds(e){super.highlightIds=e}get initialSize(){return this.store.initialSize}set initialSize(e){this.store.initialSize=e}get isEditing(){return super.isEditing}get isQuerying(){return super.isQuerying}get isSyncing(){return super.isSyncing}get isQueryingOrSyncing(){return this.isQuerying||this.isSyncing||this.relatedTables.some(e=>!!e.isQueryingOrSyncing)}get isSyncingAttachments(){return this.store.isSyncingAttachmentEdits||this.relatedTables.some(e=>!!e.isSyncingAttachments)}get layer(){return this._get("layer")}set layer(e){this._highlights.removeAll(),this.drainRelatedTables(),this._set("layer",e)}get layerFieldConfigurations(){const e=this.layer;return te(e)?e.fieldConfigurations:void 0}get layerView(){return this.store.layerView}get objectIds(){return super.objectIds}set objectIds(e){super.objectIds=e}get outFields(){return this.store.outFields}set outFields(e){this.store.outFields=e}get pageCount(){return super.pageCount}get pageIndex(){return super.pageIndex}set pageIndex(e){super.pageIndex=e}get pageSize(){return super.pageSize}set pageSize(e){super.pageSize=e}get 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 relationshipColumns(){return this.allColumns.filter(e=>q(e))}get relationshipConfig(){return this.store.relationshipConfig}set relationshipConfig(e){this.highlightIds.removeAll(),this.objectIds.removeAll(),this.filterBySelectionEnabled=!1,this.store.relationshipConfig=e}get relationshipInfos(){const{layer:e,layers:t,relationships:i,tableController:s}=this,l=this.store.relationshipInfos;if(l.length||!ie(e)||!i?.length)return l;const o=[],r=s?.layers||t||[];return i.forEach(t=>{const i=se(e,r,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 rowHighlightIds(){return super.rowHighlightIds}set rowHighlightIds(e){super.rowHighlightIds=e}get showAllRelatedTables(){return this._get("showAllRelatedTables")}set showAllRelatedTables(e){const{relatedTable:t}=this;this._set("showAllRelatedTables",e),t&&(e?this._showAllRelatedTables(t):this._hideAllRelatedTables(t))}get showPrompt(){return e=>{this.prompt?.cancel?.(),this.prompt=e}}set showPrompt(e){this._overrideIfSome("showPrompt",e)}get size(){return super.size}get state(){return super.state}get supportsAttachments(){return this.store.supportsAttachments}get supportsAddAttachments(){const{store:{supportsAddAttachments:e,supportsEditing:t}}=this;return this.editingEnabled&&t&&e}get supportsDeleteAttachments(){return this.supportsUpdateAttachments}get supportsResizeAttachments(){return this.store.supportsResizeAttachments}get supportsUpdateAttachments(){const{store:{supportsUpdateAttachments:e,supportsEditing:t}}=this;return this.editingEnabled&&t&&e}get timeExtent(){return this.store.timeExtent}set timeExtent(e){this.store.timeExtent=e}get timeZone(){return this.store.timeZone}set timeZone(e){this.store.timeZone=e}get view(){return this.store.view}set view(e){this.store.view=e,this.fieldColumns.forEach(t=>t.view=e),this.refreshCellContent()}get visibleColumns(){return super.visibleColumns}async addAttachment(e,t){const{attachmentsViewOptions:i,store:s}=this,l=i.objectId===e;await s.addAttachment(e,t).catch(e=>{l&&e&&"object"==typeof e&&"error"in e&&e.error instanceof a&&(this._logWarning(`Unable to add attachment. ${e.error.name} ${e.error.message}`),i.error=e.error)}),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 a&&(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:i,objectId:s,relationshipId:l}=t,{objectIdField:r}=i,n=le(i,l),a=i.displayField||n?.keyField||r;e.set({highlightIds:new o([s]),multipleSelectionEnabled:!1,tableTemplateOverride:this._getTableTemplateForRelatedTableView(e,a,l)});const h=e.hiddenFields;h.includes(oe.action)||h.add(oe.action),h.includes(oe.attachments)||h.add(oe.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);await Q(i)}drainRelatedTables(){this.relatedTables.drain(e=>e.destroy()),this.set({multipleSelectionEnabled:!0,relationshipColumnConfigs:null,showAllRelatedTables:!1,tableTemplateOverride:null}),this.hiddenFields.removeMany([oe.action,oe.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."):(n(d.getLogger(this),"`FeatureTable.filterBySelection` is deprecated in favor of 'filterBySelectionEnabled' and 'objectIds'",{replacement:"FeatureTable.filterBySelectionEnabled or FeatureTable.objectIds",version:"4.30",warnOnce:!0}),this.objectIds.addMany(this.highlightIds.toArray()))}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(oe.action)}nextPage(){const e=this.paginationEnabled?this.pageIndex:this.getVirtualPageIndex();this.goToPage(e+1)}previousPage(){const e=this.paginationEnabled?this.pageIndex:this.getVirtualPageIndex();this.goToPage(e-1)}async refresh(){await Promise.all([...this.relatedTables.map(e=>e.refresh()),p(this._refreshDebounced())])}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:i,layer:s}=this;if(!this.attachmentsEnabled||!s)return void this._logWarning("The 'attachmentsEnabled' property is currently false.");await s.load();const l=this._getDefaultLayerDisplayField(s),r=await this.store.getAttachmentsByObjectId(e,!0),n=this.store.getItemIndexByObjectId(e);t.set({attachmentInfos:r,mode:r.length?"list":"file",objectId:e}),this.set({highlightIds:new o([e]),multipleSelectionEnabled:!1,relationshipColumnConfigs:[],tableTemplateOverride:this._getTableTemplateForAttachmentsView(l)}),i.includes(oe.action)||i.add(oe.action),null!=n&&this.scrollToIndex(n)}syncAttributeTableTemplate(){this._syncAttributeTableTemplate(!0)}clearSelectionFilter(){n(d.getLogger(this),"`FeatureTable.clearSelectionFilter` is deprecated in favor of 'filterBySelectionEnabled' and 'objectIds'",{replacement:"FeatureTable.filterBySelectionEnabled or FeatureTable.objectIds",version:"4.30",warnOnce:!0}),this.objectIds.removeAll()}async updateAttachment(e,t,i){const{attachmentsViewOptions:s,store:l}=this,o=s.objectId===e;await l.updateAttachment(e,t,i).catch(e=>{o&&e&&"object"==typeof e&&"error"in e&&e.error instanceof a&&(this._logWarning(`Unable to update attachment. ${e.error.name} ${e.error.message}`),s.error=e.error)}),o&&!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 ce(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:r,columns:n}=this,a=[],h=me(n.toArray());o.forEach(({fieldName:e,direction:t})=>{e&&t&&a.push(new R({field:e,order:t}))}),r.forEach(({fieldName:e,direction:t})=>{t&&!a.some(t=>t.field===e)&&a.push(new R({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&&F(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=>$(e))&&s.push(this._generateDefaultAttachmentsColumn()),this.relatedRecordsEnabled&&this.relationshipInfos.length&&!s.some(e=>q(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:t}=this;if(!e||!t)return null;const{elements:i,orderByFields:s}=e,o=S(t),r=[];r.push(...this._generateColumnsFromAttributeTableElements(i,s));const n=o.map(e=>{if(!e.fieldName||re(e.fieldName,r))return null;const{fieldName:i}=e,l=ne(t,i);return l?this._generateDefaultFieldColumn(l,{hidden:!0,orderByFields:s}):(this._logTemplateWarning("A valid 'field' could not be found for the provided template."),null)}).filter(l);return r.push(...n),this.attachmentsEnabled&&ae(t)&&!r.some(e=>$(e))&&r.push(this._generateDefaultAttachmentsColumn({hidden:!0})),this.relatedRecordsEnabled&&ie(t)&&t.relationships?.forEach(({id:e},t)=>{const i=this.relationshipInfos.find(t=>t.relationshipId===e);i&&!r.some(t=>q(t)&&t.relationshipId===e)&&r.push(this._generateDefaultRelationshipColumn({hidden:!0,info:i,index:t}))}),r.length?r:null}_generateColumnsFromAttributeTableElements(e,t){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=ne(t,l);if(!o)return this._logTemplateWarning("A valid 'field' could not be found for the provided template."),null;const{description:r,label:n}=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,{grid:m,messages:c,messagesCommon:p,messagesURIUtils:u,store:g,view:b}=this;return new H({description:r,direction:h,field:o,fieldName:l,grid:m,initialSortPriority:d,label:n,layer:t,messages:c,messagesCommon:p,messagesURIUtils:u,store:g,view:b,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:r,messagesCommon:n,messagesURIUtils:a,store:h}=this;return new N({columns:this._generateColumnsFromAttributeTableElements(t.elements,i),description:s,grid:o,label:l,messages:r,messagesCommon:n,messagesURIUtils:a,store:h})}_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:r,messages:n,messagesCommon:a,messagesURIUtils:h,store:d}=this;return new P({description:s,fieldName:`${oe.attachments}-${i}`,grid:o,label:l,layer:r,messages:n,messagesCommon:a,messagesURIUtils:h,store:d,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,r=this.relationshipInfos.find(e=>e.relationshipId===o);if(!r)return this._logTemplateWarning("Unable to find valid related layer target based on the provided relationship id."),null;const{grid:n,messages:a,messagesCommon:h,messagesURIUtils:d,store:m}=this;return new L({description:s,fieldName:`${oe.relationship}-${o}-${i}`,grid:n,label:l,messages:a,messagesCommon:h,messagesURIUtils:d,relationshipId:o,store:m,layer:r.relatedLayer,relatedLayer:r.layer,showRelatedTableCallback:e=>this._onShowRelatedTable(e)})}_generateColumnsFromColumnTemplates(e){const{grid:t,layer:i,messages:s,messagesCommon:l,messagesURIUtils:o,store:r,view:n}=this;if(!e?.length||!i)return null;const a=[];return e.forEach((e,h)=>{const{autoWidth:d,description:m,direction:c,flexGrow:p,fieldName:u,formatFunction:g,frozen:b,frozenToEnd:f,icon:y,iconText:T,initialSortPriority:w,invalid:_,label:C,labelTooltipText:I,menuConfig:v,resizable:E,sortable:A,textAlign:F,textWrap:S,timeZone:j,type:R,width:x}=e;if(!R)return void this._logTemplateWarning("Property 'type' is missing from the provided template.");if(b&&f)return void this._logTemplateWarning("Properties 'frozen' and 'frozenToEnd' cannot both be true for the same column.");const U=!1===e.visible;if("group"===R){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 i=this._generateColumnsFromColumnTemplates(e.columnTemplates),r=U||this._isFieldHidden(e.label);a.push(new N({autoWidth:d,columns:i,description:m,flexGrow:p,frozen:b,frozenToEnd:f,grid:t,hidden:r,icon:y,iconText:T,invalid:_,label:C,labelTooltipText:I,menuConfig:v,messages:s,messagesCommon:l,messagesURIUtils:o,resizable:E,textAlign:F,textWrap:S,timeZone:j,width:x}))}else if("attachment"===R){if(!this.attachmentsEnabled)return void this._logTemplateWarning("Attachment columns require attachments to be enabled on the table.");a.push(this._generateAttachmentsColumnFromTemplate(e,h))}else if("relationship"===R){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.");a.push(this._generateRelationshipColumnFromTemplate(i,e,h))}else if(!u)return void this._logTemplateWarning("Value for 'fieldName' property was missing from the provided template.");const O=U||this._isFieldHidden(u);if("column"===R)a.push(new B({autoWidth:d,description:m,direction:c,fieldName:u,flexGrow:p,formatFunction:g,frozen:b,frozenToEnd:f,grid:t,hidden:O,icon:y,iconText:T,initialSortPriority:w,invalid:_,label:C,labelTooltipText:I,menuConfig:v,messages:s,messagesCommon:l,messagesURIUtils:o,resizable:E,sortable:A,textAlign:F,textWrap:S,timeZone:j,width:x}));else if("field"===R){const h=ne(i,e.fieldName);if(!h)return void this._logTemplateWarning("A valid 'field' could not be found for the provided template.");const{editable:u,required:R}=e;a.push(new H({autoWidth:d,description:m,direction:c,editable:u,field:h,fieldName:h.name,flexGrow:p,formatFunction:g,frozen:b,frozenToEnd:f,grid:t,hidden:O,icon:y,iconText:T,initialSortPriority:w,invalid:_,label:C,labelTooltipText:I,layer:i,messages:s,messagesCommon:l,messagesURIUtils:o,menuConfig:v,required:R,resizable:E,sortable:A,store:r,template:e,textAlign:F,textWrap:S,timeZone:j,width:x,view:n,onShowPromptCallback:this._onShowPromptCallback}))}}),a.length?a:null}_generateDefaultFieldColumns(){return this.layer?.fields?.map(e=>this._generateDefaultFieldColumn(e)).filter(l)??[]}_generateDefaultFieldColumn(e,t){const{grid:i,layer:s,messages:l,messagesCommon:o,messagesURIUtils:r,store:n,view:a}=this,h=t?.orderByFields;if(!e.visible||"geometry"===e.type)return null;const d=e.name,m=h?.findIndex(({field:e})=>e&&e===d)??-1,c=m>-1?h?.at(m)?.order:void 0,p=m>-1?m:void 0;return new H({direction:c,field:e,fieldName:d,grid:i,hidden:t?.hidden||this._isFieldHidden(d),initialSortPriority:p,layer:s,messages:l,messagesCommon:o,messagesURIUtils:r,store:n,view:a,onShowPromptCallback:this._onShowPromptCallback})}_generateAttachmentsColumnFromTemplate(e,t){const{grid:i,layer:s,messages:l,messagesCommon:o,messagesURIUtils:r,store:n}=this,{attachmentsViewEnabled:a,autoWidth:h,description:d,flexGrow:m,fieldName:c,formatFunction:p,frozen:u,frozenToEnd:g,icon:b,iconText:f,invalid:y,label:T,labelTooltipText:w,menuConfig:_,resizable:C,textAlign:I,textWrap:v,thumbnailAppearance:E,thumbnailCount:A,thumbnailIconScale:F,thumbnailsEnabled:S,timeZone:j,width:R}=e;return new P({attachmentsViewEnabled:a,autoWidth:h,description:d,fieldName:`${oe.attachments}-${t}`,flexGrow:m,formatFunction:p,frozen:u,frozenToEnd:g,grid:i,hidden:!1===e.visible||this._isFieldHidden(T)||this._isFieldHidden(c),icon:b,iconText:f,invalid:y,label:T,labelTooltipText:w,layer:s,menuConfig:_,messages:l,messagesCommon:o,messagesURIUtils:r,resizable:C,store:n,textAlign:I,textWrap:v,thumbnailAppearance:E,thumbnailCount:A,thumbnailIconScale:F,thumbnailsEnabled:S,timeZone:j,width:R,onShowAttachments:e=>this._onShowAttachments(e)})}_generateDefaultAttachmentsColumn(e){const{grid:t,layer:i,messages:s,messagesCommon:l,messagesURIUtils:o,store:r}=this,n=oe.attachments;return new P({fieldName:n,grid:t,hidden:e?.hidden||this._isFieldHidden(n),layer:i,messages:s,messagesCommon:l,messagesURIUtils:o,store:r,onShowAttachments:e=>this._onShowAttachments(e)})}_generateRelationshipColumnFromTemplate(e,t,i){const{grid:s,messages:l,messagesCommon:o,messagesURIUtils:r,store:n}=this,{autoWidth:a,collapsed:h,description:d,flexGrow:m,fieldName:c,formatFunction:p,frozen:u,frozenToEnd:g,icon:b,iconText:f,invalid:y,label:T,labelTooltipText:w,menuConfig:_,relationshipId:C,resizable:I,textAlign:v,textWrap:E,timeZone:A,width:F}=t;return new L({autoWidth:a,collapsed:h,description:d,fieldName:`${oe.relationship}-${C}-${i}`,flexGrow:m,formatFunction:p,frozen:u,frozenToEnd:g,grid:s,hidden:!1===t.visible||this._isFieldHidden(T)||this._isFieldHidden(c),icon:b,iconText:f,invalid:y,label:T,labelTooltipText:w,menuConfig:_,messages:l,messagesCommon:o,messagesURIUtils:r,relationshipId:C,resizable:I,store:n,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:r,messagesCommon:n,messagesURIUtils:a}=this,{relationshipId:h}=l;return new L({...t,fieldName:`${oe.relationship}-${h}-${s}`,grid:o,hidden:i,messages:r,messagesCommon:n,messagesURIUtils:a,layer:l.relatedLayer,relatedLayer:l.layer,relationshipId:h,showRelatedTableCallback:e=>this._onShowRelatedTable(e)})}_generateActionColumn(){return new W({hidden:this._isFieldHidden(oe.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:U}),he(i,e))}}_removeTableHighlight(e){const{layer:t}=this;t&&this._highlights.remove(he(t,e))}async _syncTemporaryHighlight(e,t){if(!this.highlightEnabled)return this._currentTemporaryHighlight?.handle.remove(),void(this._currentTemporaryHighlight=null);if(await u(25),g(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:O})})}_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?.add(t,e)}_removeFromViewSelection(e){const{_selectableLayer:t}=this;t&&this._selectionManager?.remove(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(oe.action)||s.add(oe.action),s.includes(oe.attachments)||s.add(oe.attachments)}_hideAllRelatedTables(e){const{layer:t,relationship:i}=e;if(t&&null!=i?.id)if(null!=e.attachmentsViewOptions.objectId){const i=this._getDefaultLayerDisplayField(t);e.set({multipleSelectionEnabled:!1,relationshipColumnConfigs:[],showAllRelatedTables:!1,tableTemplateOverride:this._getTableTemplateForAttachmentsView(i)})}else e.set({multipleSelectionEnabled:!0,relationshipColumnConfigs:de(t,i.id),showAllRelatedTables:!1,tableTemplateOverride:null}),e.hiddenFields.removeMany([oe.action,oe.attachments])}_getTableTemplateForRelatedTableView(e,t,i){return new ee({columnTemplates:[new X({fieldName:t,editable:!1,menuConfig:{selectionMode:"single",icon:"chevron-down",items:this._extractFieldColumnInfosFromTableTemplate(e.viewModel).map(([s,l])=>({selected:s===t,label:l||s,clickFunction:()=>{e.tableTemplateOverride=this._getTableTemplateForRelatedTableView(e,s,i)}}))},resizable:!1}),new Y({autoWidth:!1,collapsed:!0,flexGrow:0,label:"",resizable:!1,relationshipId:i,width:ue})]})}_getTableTemplateForShowAllTablesView(e,t){const i=[new X({fieldName:t,editable:!1,menuConfig:{selectionMode:"single",icon:"chevron-down",items:this._extractFieldColumnInfosFromTableTemplate(e.viewModel).map(([i,s])=>({selected:i===t,label:s||i,clickFunction:()=>{e.tableTemplateOverride=this._getTableTemplateForShowAllTablesView(e,i)}}))},resizable:!1})];return null!=e.attachmentsViewOptions.objectId&&i.push(new D({attachmentsViewEnabled:!1,autoWidth:!1,flexGrow:0,label:"",resizable:!1,thumbnailsEnabled:!1,width:ue})),new ee({columnTemplates:i})}async _onShowPromptCallback(e){const{column:t,objectId:i,oldValue:s,value:l}=e,{_subtypes:o,layer:r}=this;if(!r||!o.length)return void t.cancel();const n=o.find(e=>e.code===l);if(!n)return void t.cancel();const a=b(),h=this._createSubtypeEditPrompt(s,n,a),d=!!r.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(n.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,s){const{_subtypes:l,messages:o,messagesCommon:r}=this,n=l.find(t=>t.code===e)?.name??`${e}`;let a="update-fields";const h=[{label:o.subtypes.useDefaultValuesOption,value:"update-fields"},{label:o.subtypes.keepCurrentValuesOption,value:"keep-existing"}];return{context:"info",title:o.subtypes.changeWarningTitle,message:i(o.subtypes.changeWarning,{originalType:n,newType:t.name}),radios:h,defaultRadioSelection:"update-fields",onRadioSelection:e=>{a=e},actions:{primary:{label:r.apply,action:()=>s.resolve(a),type:"positive"},secondary:{label:r.cancel,type:"neutral",action:()=>s.resolve("undo")}},cancel:()=>s.reject()}}_onShowAttachments({objectId:e}){this.attachmentsViewOptions.objectId=e}_getTableTemplateForAttachmentsView(e){return new ee({columnTemplates:[new X({fieldName:e,editable:!1,menuConfig:{selectionMode:"single",icon:"chevron-down",items:this._extractFieldColumnInfosFromTableTemplate(this).map(([t,i])=>({selected:t===e,label:i||t,clickFunction:()=>{this.tableTemplateOverride=this._getTableTemplateForAttachmentsView(t)}}))},resizable:!1}),new D({attachmentsViewEnabled:!1,autoWidth:!1,flexGrow:0,label:"",resizable:!1,thumbnailsEnabled:!1,width:ue})]})}_extractFieldColumnInfosFromTableTemplate(e){const t=e??this,{layer:i,tableTemplate:s}=t;return s?s.columnTemplates.filter(({type:e})=>"field"===e||"column"===e).map(({fieldName:e,label:t})=>{if(null!=t&&""!==t)return[e,t];const s=i?.fieldsIndex.get(e);return[e,s&&I(s,i)]}):i?.fields.map(e=>[e.name,I(e,i)])??[]}_getDefaultLayerDisplayField(e){const{displayField:t,objectIdField:i}=e;return t&&""!==t.trim()?t:i||(e.fields.length?e.fields[0].name:"")}_getIndexOfFirstFrozenToEndColumn(){const e=this.columns.findIndex(e=>e.frozenToEnd);return e>-1?e:void 0}_logWarning(e,t){t?d.getLogger(this).warnOnce(e):d.getLogger(this).warn(e)}_logTemplateWarning(e){this._logWarning(`${e} Skipped generating a column using the provided template.`,!0)}_onCellInteraction(e){null!=e&&null!=this.attachmentsViewOptions.objectId&&this.highlightIds.add(e)}};e([_()],ge.prototype,"_defaultHiddenFields",null),e([_()],ge.prototype,"_effectiveTableTemplate",null),e([_()],ge.prototype,"_effectiveAttributeTableTemplate",null),e([_()],ge.prototype,"_highlights",void 0),e([_()],ge.prototype,"_highlightableLayerView",null),e([_()],ge.prototype,"_selectionManager",null),e([_()],ge.prototype,"_selectableLayer",null),e([_()],ge.prototype,"_subtypes",null),e([_()],ge.prototype,"_tableHighlightsReady",null),e([_()],ge.prototype,"_viewSelection",null),e([_()],ge.prototype,"_viewSelectionReady",null),e([_()],ge.prototype,"activeFilters",null),e([_({readOnly:!0})],ge.prototype,"activeSortOrders",null),e([_()],ge.prototype,"allRelatedTablesVisible",null),e([_()],ge.prototype,"attachmentsColumns",null),e([_()],ge.prototype,"attachmentsEnabled",null),e([_()],ge.prototype,"attachmentsViewOptions",void 0),e([_({type:j})],ge.prototype,"attributeTableTemplate",void 0),e([_()],ge.prototype,"autoRefreshEnabled",void 0),e([_()],ge.prototype,"clearPrompt",null),e([_({readOnly:!0})],ge.prototype,"columns",void 0),e([_()],ge.prototype,"dataProvider",void 0),e([_()],ge.prototype,"definitionExpression",null),e([_()],ge.prototype,"fieldColumns",null),e([_({types:v})],ge.prototype,"filterGeometry",null),e([_()],ge.prototype,"filterBySelectionEnabled",null),e([_({readOnly:!0})],ge.prototype,"grid",void 0),e([_()],ge.prototype,"hiddenFields",null),e([_()],ge.prototype,"highlightEnabled",void 0),e([_()],ge.prototype,"initialSize",null),e([_()],ge.prototype,"isQueryingOrSyncing",null),e([_()],ge.prototype,"isSyncingAttachments",null),e([_()],ge.prototype,"layer",null),e([_()],ge.prototype,"layers",void 0),e([_()],ge.prototype,"layerFieldConfigurations",null),e([_()],ge.prototype,"layerView",null),e([_()],ge.prototype,"menuConfig",void 0),e([_()],ge.prototype,"messages",void 0),e([_(),pe("esri/t9n/common")],ge.prototype,"messagesCommon",void 0),e([_(),pe("esri/core/t9n/Units")],ge.prototype,"messagesUnits",void 0),e([_(),pe("esri/widgets/support/t9n/uriUtils")],ge.prototype,"messagesURIUtils",void 0),e([_()],ge.prototype,"outFields",null),e([_()],ge.prototype,"prompt",void 0),e([_()],ge.prototype,"relatedRecordsEnabled",null),e([_()],ge.prototype,"relatedTable",null),e([_()],ge.prototype,"relatedTables",void 0),e([_()],ge.prototype,"relationship",null),e([_()],ge.prototype,"relationshipColumnConfigs",void 0),e([_()],ge.prototype,"relationshipColumns",null),e([_()],ge.prototype,"relationshipConfig",null),e([_()],ge.prototype,"relationshipInfos",null),e([_()],ge.prototype,"relationships",null),e([_()],ge.prototype,"returnGeometryEnabled",null),e([_()],ge.prototype,"returnMEnabled",null),e([_()],ge.prototype,"returnZEnabled",null),e([_()],ge.prototype,"selectionSource",void 0),e([_()],ge.prototype,"showAllRelatedTables",null),e([_()],ge.prototype,"showPrompt",null),e([_()],ge.prototype,"showRelatedTableCallback",void 0),e([_({readOnly:!0,type:J})],ge.prototype,"store",void 0),e([_()],ge.prototype,"supportsAttachments",null),e([_()],ge.prototype,"supportsAddAttachments",null),e([_()],ge.prototype,"supportsDeleteAttachments",null),e([_()],ge.prototype,"supportsResizeAttachments",null),e([_()],ge.prototype,"supportsUpdateAttachments",null),e([_()],ge.prototype,"syncTemplateOnChangesEnabled",void 0),e([_()],ge.prototype,"tableController",void 0),e([_()],ge.prototype,"tableParent",void 0),e([_({type:ee})],ge.prototype,"tableTemplate",void 0),e([_()],ge.prototype,"tableTemplateOverride",void 0),e([_({type:x})],ge.prototype,"timeExtent",null),e([_()],ge.prototype,"timeZone",null),e([_()],ge.prototype,"view",null),ge=e([C("esri.widgets.FeatureTable.FeatureTableViewModel")],ge);const be=ge;export{be as default};
@@ -111,7 +111,7 @@ export interface FeaturesViewModelEvents {
111
111
  *
112
112
  * @see [Popup#actions](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html#actions)
113
113
  * @see [PopupTemplate#actions](https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html#actions)
114
- * @see [Features#open()](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Features.html#open)
114
+ * @see [open()](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Features.html#open)
115
115
  * @example
116
116
  * featuresWidget.open({
117
117
  * location: event.mapPoint,
@@ -32,7 +32,7 @@ export interface HomeViewModelEvents {
32
32
  /**
33
33
  * Fires when the [Home#go()](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Home.html#go) method is called.
34
34
  *
35
- * @see [Home#go()](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Home.html#go)
35
+ * @see [go()](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Home.html#go)
36
36
  * @example
37
37
  * homeWidget.on("go", function(event){
38
38
  * console.log("updating viewpoint");
@@ -9,7 +9,7 @@ export interface LocateViewModelEvents {
9
9
  /**
10
10
  * Fires after the `locate()` method is called and succeeds.
11
11
  *
12
- * @see [locate()](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Locate-LocateViewModel.html#locate)
12
+ * @see [LocateViewModel#locate()](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Locate-LocateViewModel.html#locate)
13
13
  * @example
14
14
  * locateBtn.on("locate", ({ position }) => {
15
15
  * const { longitude, latitude } = position.coords;
@@ -20,7 +20,7 @@ export interface LocateViewModelEvents {
20
20
  /**
21
21
  * Fires after the [Locate#locate()](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Locate.html#locate) method is called and fails.
22
22
  *
23
- * @see [locate()](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Locate-LocateViewModel.html#locate)
23
+ * @see [LocateViewModel#locate()](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Locate-LocateViewModel.html#locate)
24
24
  */
25
25
  "locate-error": LocateViewModelLocateErrorEvent;
26
26
  }
@@ -1,3 +1,8 @@
1
+ /**
2
+ * A module for importing types used in Search modules.
3
+ *
4
+ * @since 4.33
5
+ */
1
6
  import type Graphic from "../../Graphic.js";
2
7
  import type Collection from "../../core/Collection.js";
3
8
  import type EsriError from "../../core/Error.js";
@@ -134,7 +134,7 @@ export interface TimeSliderViewModelEvents {
134
134
  * Fires when a user clicks on an action in the actions menu.
135
135
  *
136
136
  * @since 4.21
137
- * @see [TimeSlider#actions](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-TimeSlider.html#actions)
137
+ * @see [actions](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-TimeSlider.html#actions)
138
138
  * @example
139
139
  * // Add an action to reset the time extent to the full time extent.
140
140
  * timeSlider.actions.add({
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as t}from"tslib";import{property as e,subclass as o}from"../core/accessorSupport/decorators.js";import i from"./Widget.js";import{loadCalciteComponents as s}from"./support/componentsUtils.js";import{messageBundle as n,tsx as c}from"./support/widget.js";import a from"./UtilityNetworkValidateTopology/UtilityNetworkValidateTopologyViewModel.js";const l="esri-un-validate-topology",r={container:`${l}__container`,content:`${l}__content`,controlsContainer:`${l}__controls-container`,statusIconError:`${l}__status-icon-error`,statusIconSuccess:`${l}__status-icon-success`,statusIconContainer:`${l}__status-icon-container`};let d=class extends i{constructor(t,e){super(t,e),this.messages=null,this.viewModel=new a}loadDependencies(){return s({action:()=>import("@esri/calcite-components/dist/components/calcite-action"),block:()=>import("@esri/calcite-components/dist/components/calcite-block"),icon:()=>import("@esri/calcite-components/dist/components/calcite-icon"),notice:()=>import("@esri/calcite-components/dist/components/calcite-notice"),option:()=>import("@esri/calcite-components/dist/components/calcite-option"),select:()=>import("@esri/calcite-components/dist/components/calcite-select"),tooltip:()=>import("@esri/calcite-components/dist/components/calcite-tooltip")})}get extentToValidate(){return this.viewModel.extentToValidate}set extentToValidate(t){this.viewModel.extentToValidate=t}get icon(){return"check-circle"}set icon(t){this._overrideIfSome("icon",t)}get label(){return this.messages?.label??""}set label(t){this._overrideIfSome("label",t)}get utilityNetwork(){return this.viewModel.utilityNetwork}set utilityNetwork(t){this.viewModel.utilityNetwork=t}get view(){return this.viewModel.view}set view(t){this.viewModel.view=t}render(){const{viewModel:t}=this;return"disabled"===t.state?c("div",{class:r.container},c("calcite-block",{class:r.content,collapsible:!1,expanded:!0,heading:this.label},this._renderLoadErrorStatusIcon(),this._renderLoadErrorsNotices())):c("div",{class:r.container},c("calcite-block",{class:r.content,collapsible:!0,expanded:!1,heading:this.label},this._renderStatusIcon(),this._renderValidateTopologyAction(),this._renderControls()))}_extentOptionSelectChange(t){this.extentToValidate=t.currentTarget.value}_getLoadErrorMessagesAsNotices(t,e){return c("calcite-notice",{closable:!1,key:"error-notice-"+e,kind:"warning",open:!0,scale:"s"},c("div",{slot:"message"},t))}_handleValidateTopologyAction(){this.viewModel.validateTopology().catch(()=>{})}_renderControls(){const{viewModel:t}=this;return"failed"===t.state?c("div",{class:r.controlsContainer},this._renderExtentOptionSelect(),this._renderStatusNotice()):this._renderExtentOptionSelect()}_renderExtentOptionSelect(){const{messages:t,viewModel:e}=this;return c("div",{key:"selectExtentDiv"},c("calcite-select",{bind:this,disabled:"loading"===e.state||"executing"===e.state,label:t.input.extentToValidate,onCalciteSelectChange:this._extentOptionSelectChange},c("calcite-option",{value:"current"},t.input.currentExtent),c("calcite-option",{value:"entire"},t.input.entireExtent)))}_renderLoadErrorsNotices(){const{viewModel:t}=this;return c("div",{class:r.controlsContainer,key:"loadErrorsDiv"},t.loadErrors.items.map(this._getLoadErrorMessagesAsNotices))}_renderLoadErrorStatusIcon(){return c("div",{class:r.statusIconContainer,key:"statusDiv",slot:"control"},c("calcite-icon",{class:r.statusIconError,icon:"exclamation-mark-triangle",scale:"s"}))}_renderStatusIcon(){const{messages:t,viewModel:e}=this,o=`${this.id}-validation-status-action`,i=`${this.id}-error-status-icon`,s=`${this.id}-success-status-icon`,n=t=>{setTimeout(()=>{t.textContent=""},3500)};return"executing"===e.state?c("div",{key:"statusDivExecuting",slot:"control"},c("calcite-action",{id:o,loading:!0,text:t.status.executing}),c("calcite-tooltip",{overlayPositioning:"fixed",referenceElement:o},c("span",null,t.status.executing))):"success"===e.state?c("div",{afterCreate:n,class:r.statusIconContainer,key:"statusDivSuccess",slot:"control"},c("calcite-icon",{class:r.statusIconSuccess,icon:"check-circle",id:s,scale:"s"}),c("calcite-tooltip",{referenceElement:s},c("span",null,t.status.success))):"failed"===e.state?c("div",{class:r.statusIconContainer,key:"statusDivFailed",slot:"control"},c("calcite-icon",{class:r.statusIconError,icon:"exclamation-mark-triangle",id:i,scale:"s"}),c("calcite-tooltip",{referenceElement:i},c("span",null,e.executionError))):c("div",{class:r.statusIconContainer,key:"statusDiv",slot:"control"})}_renderStatusNotice(){const{viewModel:t}=this;return c("div",{key:"executionErrorDiv"},c("calcite-notice",{closable:!0,kind:"warning",open:!0,scale:"s"},c("div",{slot:"message"},t.executionError)))}_renderValidateTopologyAction(){const{messages:t,viewModel:e}=this,o=`${this.id}-validation-action`;return c("div",{key:"actionDiv",slot:"control"},c("calcite-action",{bind:this,disabled:"executing"===e.state,icon:"play-f",id:o,loading:"loading"===e.state,onclick:this._handleValidateTopologyAction,text:t.input.validateTopology}),c("calcite-tooltip",{referenceElement:o},c("span",null,"loading"===e.state?t.status.loading:t.input.validateTopology)))}};t([e()],d.prototype,"extentToValidate",null),t([e()],d.prototype,"icon",null),t([e()],d.prototype,"label",null),t([e(),n("esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology")],d.prototype,"messages",void 0),t([e()],d.prototype,"utilityNetwork",null),t([e()],d.prototype,"view",null),t([e({type:a})],d.prototype,"viewModel",void 0),d=t([o("esri.widgets.UtilityNetworkValidateTopology")],d);const p=d;export{p as default};
5
+ import{__decorate as t}from"tslib";import{property as e,subclass as o}from"../core/accessorSupport/decorators.js";import i from"./Widget.js";import{loadCalciteComponents as s}from"./support/componentsUtils.js";import{messageBundle as n,tsx as c}from"./support/widget.js";import a from"./UtilityNetworkValidateTopology/UtilityNetworkValidateTopologyViewModel.js";const l="esri-un-validate-topology",r={container:`${l}__container`,content:`${l}__content`,controlsContainer:`${l}__controls-container`,statusIconError:`${l}__status-icon-error`,statusIconSuccess:`${l}__status-icon-success`,statusIconContainer:`${l}__status-icon-container`};let d=class extends i{constructor(t,e){super(t,e),this.messages=null,this.viewModel=new a}loadDependencies(){return s({action:()=>import("@esri/calcite-components/dist/components/calcite-action"),block:()=>import("@esri/calcite-components/dist/components/calcite-block"),icon:()=>import("@esri/calcite-components/dist/components/calcite-icon"),notice:()=>import("@esri/calcite-components/dist/components/calcite-notice"),option:()=>import("@esri/calcite-components/dist/components/calcite-option"),select:()=>import("@esri/calcite-components/dist/components/calcite-select"),tooltip:()=>import("@esri/calcite-components/dist/components/calcite-tooltip")})}get extentToValidate(){return this.viewModel.extentToValidate}set extentToValidate(t){this.viewModel.extentToValidate=t}get icon(){return"check-circle"}set icon(t){this._overrideIfSome("icon",t)}get label(){return this.messages?.label??""}set label(t){this._overrideIfSome("label",t)}get utilityNetwork(){return this.viewModel.utilityNetwork}set utilityNetwork(t){this.viewModel.utilityNetwork=t}get view(){return this.viewModel.view}set view(t){this.viewModel.view=t}render(){const{viewModel:t}=this;return"disabled"===t.state?c("div",{class:r.container},c("calcite-block",{class:r.content,collapsible:!1,expanded:!0,heading:this.label},this._renderLoadErrorStatusIcon(),this._renderLoadErrorsNotices())):c("div",{class:r.container},c("calcite-block",{class:r.content,collapsible:!0,expanded:!1,heading:this.label},this._renderStatusIcon(),this._renderValidateTopologyAction(),this._renderControls()))}_extentOptionSelectChange(t){this.extentToValidate=t.currentTarget.value}_getLoadErrorMessagesAsNotices(t,e){return c("calcite-notice",{closable:!1,key:"error-notice-"+e,kind:"warning",open:!0,scale:"s"},c("div",{slot:"message"},t))}_handleValidateTopologyAction(){this.viewModel.validateTopology().catch(()=>{})}_renderControls(){const{viewModel:t}=this;return"failed"===t.state?c("div",{class:r.controlsContainer},this._renderExtentOptionSelect(),this._renderStatusNotice()):this._renderExtentOptionSelect()}_renderExtentOptionSelect(){const{messages:t,viewModel:e}=this;return c("div",{key:"selectExtentDiv"},c("calcite-select",{bind:this,disabled:"loading"===e.state||"executing"===e.state,label:t.input.extentToValidate,onCalciteSelectChange:this._extentOptionSelectChange},c("calcite-option",{selected:"current"===e.extentToValidate,value:"current"},t.input.currentExtent),c("calcite-option",{selected:"entire"===e.extentToValidate,value:"entire"},t.input.entireExtent)))}_renderLoadErrorsNotices(){const{viewModel:t}=this;return c("div",{class:r.controlsContainer,key:"loadErrorsDiv"},t.loadErrors.items.map(this._getLoadErrorMessagesAsNotices))}_renderLoadErrorStatusIcon(){return c("div",{class:r.statusIconContainer,key:"statusDiv",slot:"control"},c("calcite-icon",{class:r.statusIconError,icon:"exclamation-mark-triangle",scale:"s"}))}_renderStatusIcon(){const{messages:t,viewModel:e}=this,o=`${this.id}-validation-status-action`,i=`${this.id}-error-status-icon`,s=`${this.id}-success-status-icon`,n=t=>{setTimeout(()=>{t.textContent=""},3500)};return"executing"===e.state?c("div",{key:"statusDivExecuting",slot:"control"},c("calcite-action",{id:o,loading:!0,text:t.status.executing}),c("calcite-tooltip",{overlayPositioning:"fixed",referenceElement:o},c("span",null,t.status.executing))):"success"===e.state?c("div",{afterCreate:n,class:r.statusIconContainer,key:"statusDivSuccess",slot:"control"},c("calcite-icon",{class:r.statusIconSuccess,icon:"check-circle",id:s,scale:"s"}),c("calcite-tooltip",{referenceElement:s},c("span",null,t.status.success))):"failed"===e.state?c("div",{class:r.statusIconContainer,key:"statusDivFailed",slot:"control"},c("calcite-icon",{class:r.statusIconError,icon:"exclamation-mark-triangle",id:i,scale:"s"}),c("calcite-tooltip",{referenceElement:i},c("span",null,e.executionError))):c("div",{class:r.statusIconContainer,key:"statusDiv",slot:"control"})}_renderStatusNotice(){const{viewModel:t}=this;return c("div",{key:"executionErrorDiv"},c("calcite-notice",{closable:!0,kind:"warning",open:!0,scale:"s"},c("div",{slot:"message"},t.executionError)))}_renderValidateTopologyAction(){const{messages:t,viewModel:e}=this,o=`${this.id}-validation-action`;return c("div",{key:"actionDiv",slot:"control"},c("calcite-action",{bind:this,disabled:"executing"===e.state,icon:"play-f",id:o,loading:"loading"===e.state,onclick:this._handleValidateTopologyAction,text:t.input.validateTopology}),c("calcite-tooltip",{referenceElement:o},c("span",null,"loading"===e.state?t.status.loading:t.input.validateTopology)))}};t([e()],d.prototype,"extentToValidate",null),t([e()],d.prototype,"icon",null),t([e()],d.prototype,"label",null),t([e(),n("esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology")],d.prototype,"messages",void 0),t([e()],d.prototype,"utilityNetwork",null),t([e()],d.prototype,"view",null),t([e({type:a})],d.prototype,"viewModel",void 0),d=t([o("esri.widgets.UtilityNetworkValidateTopology")],d);const p=d;export{p as default};
@@ -1,3 +1,9 @@
1
+ /**
2
+ * Various utils for tying Smart Mapping renderers to the Smart Mapping
3
+ * slider widgets.
4
+ *
5
+ * @since 4.12
6
+ */
1
7
 
2
8
  /**
3
9
  * Formats a UNIX timestamp to a basic date string. This function is only intended for convenience in
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as t}from"tslib";import{isSome as e}from"../../../core/arrayUtils.js";import{property as i,subclass as r}from"../../../core/accessorSupport/decorators.js";import{fetchThumbnail as l}from"../symbolPreviewUtils.js";import o from"./ItemBase.js";let s=class extends o{constructor(t){super(t),this._thumbnail=null,this.graphic=null,this.layer=null,this.layerItem=null,this.thumbnailSize=24}get _filterTerms(){return[this.title,this.layerItem.title,this.layerItem.groupLayerItem?.title].filter(e)}get key(){return`${this.layer.id}:${this.objectId??this.graphic.uid}`}get objectId(){return this.graphic.getObjectId()}get title(){const{objectId:t}=this;if(null!=t)return this.layerItem.featureTitleMap.get(t)||`${t}`}get thumbnail(){return this._thumbnail??void 0}get thumbnailKey(){return`${this.key}-${this.graphic.uid}`}get visible(){const{_filterTerms:t,viewModel:{activeLayerItem:e,filterText:i}}=this;if(e&&e.layer!==this.layer)return!1;if(null==i||""===i||!t.length)return!0;const r=new RegExp(i,"iu");return t.some(t=>r.test(t))}async fetchThumbnail(t){return this._thumbnail=await l(this.graphic,this.layer,{maxSize:this.thumbnailSize,ariaLabel:t?.ariaLabel})}};t([i()],s.prototype,"_filterTerms",null),t([i()],s.prototype,"_thumbnail",void 0),t([i()],s.prototype,"graphic",void 0),t([i()],s.prototype,"key",null),t([i()],s.prototype,"layer",void 0),t([i()],s.prototype,"layerItem",void 0),t([i()],s.prototype,"objectId",null),t([i()],s.prototype,"title",null),t([i()],s.prototype,"thumbnail",null),t([i()],s.prototype,"thumbnailKey",null),t([i()],s.prototype,"thumbnailSize",void 0),t([i()],s.prototype,"visible",null),s=t([r("esri.widgets.support.SelectionList.FeatureItem")],s);const a=s;export{a as default};
5
+ import{__decorate as t}from"tslib";import{isSome as e}from"../../../core/arrayUtils.js";import{property as i,subclass as r}from"../../../core/accessorSupport/decorators.js";import{isISelectableLayerWithObjectIds as l}from"../../../views/support/selectionUtils.js";import{fetchThumbnail as o}from"../symbolPreviewUtils.js";import s from"./ItemBase.js";let a=class extends s{constructor(t){super(t),this._thumbnail=null,this.graphic=null,this.layer=null,this.layerItem=null,this.thumbnailSize=24}get _filterTerms(){return[this.title,this.layerItem.title,this.layerItem.groupLayerItem?.title].filter(e)}get identifier(){return l(this.layer)&&null!=this.objectId?this.objectId:this.graphic}get key(){return`${this.layer.id}:${this.objectId??this.graphic.uid}`}get objectId(){return this.graphic.getObjectId()}get title(){const{objectId:t}=this;if(null!=t)return this.layerItem.featureTitleMap.get(t)||`${t}`}get thumbnail(){return this._thumbnail??void 0}get thumbnailKey(){return`${this.key}-${this.graphic.uid}`}get visible(){const{_filterTerms:t,viewModel:{activeLayerItem:e,filterText:i}}=this;if(e&&e.layer!==this.layer)return!1;if(null==i||""===i||!t.length)return!0;const r=new RegExp(i,"iu");return t.some(t=>r.test(t))}async fetchThumbnail(t){return this._thumbnail=await o(this.graphic,this.layer,{maxSize:this.thumbnailSize,ariaLabel:t?.ariaLabel})}};t([i()],a.prototype,"_filterTerms",null),t([i()],a.prototype,"_thumbnail",void 0),t([i()],a.prototype,"graphic",void 0),t([i()],a.prototype,"identifier",null),t([i()],a.prototype,"key",null),t([i()],a.prototype,"layer",void 0),t([i()],a.prototype,"layerItem",void 0),t([i()],a.prototype,"objectId",null),t([i()],a.prototype,"title",null),t([i()],a.prototype,"thumbnail",null),t([i()],a.prototype,"thumbnailKey",null),t([i()],a.prototype,"thumbnailSize",void 0),t([i()],a.prototype,"visible",null),a=t([r("esri.widgets.support.SelectionList.FeatureItem")],a);const n=a;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/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import{countIf as t,addMany as r,isSome as s}from"../../../core/arrayUtils.js";import o from"../../../core/ReactiveMap.js";import{property as i,subclass as a}from"../../../core/accessorSupport/decorators.js";import{getDisplayFieldNameFromFields as l}from"../../../layers/support/fieldUtils.js";import n from"./FeatureItem.js";import u from"./ItemBase.js";import{getSuggestedQueryOutFields as c}from"../Selector2D/selectorUtils.js";let p=class extends u{constructor(e){super(e),this._onChangeController=null,this.featureItems=[],this.featureTitleMap=new o,this.groupLayerItem=null,this.layer=null}get effectiveObjectIds(){return this.objectIds.slice(0,this.maxVisibleFeatureCountPerLayer)}get maxVisibleFeatureCountExceeded(){const{viewModel:e}=this;return this.objectIds.length>e.maxVisibleFeatureCountPerLayer&&this.visibleTotal===e.maxVisibleFeatureCountPerLayer}get maxVisibleFeatureCountPerLayer(){return this.viewModel.maxVisibleFeatureCountPerLayer}get objectIds(){return this.viewModel.effectiveSelectionManager?.getSelection(this.layer)??[]}get total(){return this.objectIds.length}get visible(){return this.featureItems.some(e=>e.visible)}get visibleTotal(){return t(this.featureItems,e=>e.visible)}cancel(){this._onChangeController?.abort()}reset(){this.featureItems.forEach(e=>e.destroy()),this.featureItems=[]}async sync({controller:e,promises:t}){this.cancel();const o=new Map(this.featureItems.map(e=>[e.objectId,e])),i=new Map,a=[],l=[];for(const r of this.effectiveObjectIds){const e=o.get(r);e?i.set(r,e):(a.push(r),i.set(r,null))}if(this._onChangeController=e,a.length>0){const t=await this._createFeatureItems(a,e);r(l,t);for(const e of l)null!=e.objectId&&i.set(e.objectId,e)}e.signal.aborted||(this.featureItems=Array.from(i.values()).filter(s),t.push(this.syncTitles(l)))}async syncTitles(e=this.featureItems){const{layer:t}=this,r=e.map(e=>e.graphic);if("getFeatureTitles"in t&&t.getFeatureTitles){(await t.getFeatureTitles(r,{fetchMissingFields:!0,removeHTML:!0})).forEach((e,t)=>this.featureTitleMap.set(t,e))}else{const e=t.displayField||l(t.fields);e&&r.forEach(t=>{const r=t.getObjectId(),s=t.attributes[e];null!=r&&s&&this.featureTitleMap.set(r,s)})}}async _createFeatureItems(e,t){const{layer:r,layerView:s,viewModel:o}=this,i=new Map;if(s){const r=s.createQuery();r.objectIds=e,r.outFields=["*"],r.returnGeometry=!0;const o=await s.queryFeatures(r,t);for(const e of o.features){const t=e.getObjectId();null!=t&&i.set(t,e)}}if(t.signal.aborted)return[];const a=e.filter(e=>!i.has(e));if(a.length){const{view:e}=this,s=r.createQuery();s.objectIds=a,s.outSpatialReference=e?.spatialReference,s.outFields=e?c(r,e,!0):["*"],s.returnGeometry=!0;const o=await r.queryFeatures(s,t);for(const t of o.features){const e=t.getObjectId();null!=e&&i.set(e,t)}}return Array.from(i.values()).map(e=>new n({graphic:e,layer:r,layerItem:this,viewModel:o}))}};e([i()],p.prototype,"_onChangeController",void 0),e([i()],p.prototype,"effectiveObjectIds",null),e([i()],p.prototype,"featureItems",void 0),e([i()],p.prototype,"featureTitleMap",void 0),e([i()],p.prototype,"groupLayerItem",void 0),e([i()],p.prototype,"layer",void 0),e([i()],p.prototype,"maxVisibleFeatureCountExceeded",null),e([i()],p.prototype,"maxVisibleFeatureCountPerLayer",null),e([i()],p.prototype,"objectIds",null),e([i()],p.prototype,"total",null),e([i()],p.prototype,"visible",null),e([i()],p.prototype,"visibleTotal",null),p=e([a("esri.widgets.support.SelectionList.LayerItem")],p);const f=p;export{f as default};
5
+ import{__decorate as e}from"tslib";import{countIf as t,addMany as r,isSome as s}from"../../../core/arrayUtils.js";import i from"../../../core/ReactiveMap.js";import{property as o,subclass as a}from"../../../core/accessorSupport/decorators.js";import{getDisplayFieldNameFromFields as l}from"../../../layers/support/fieldUtils.js";import{isISelectableLayerWithObjectIds as n,isISelectableLayerViewWithObjectIds as c}from"../../../views/support/selectionUtils.js";import u from"./FeatureItem.js";import p from"./ItemBase.js";import{getSuggestedQueryOutFields as f}from"../Selector2D/selectorUtils.js";let m=class extends p{constructor(e){super(e),this._onChangeController=null,this.featureItems=[],this.featureTitleMap=new i,this.groupLayerItem=null,this.layer=null}get effectiveObjectIds(){return this.objectIds.slice(0,this.maxVisibleFeatureCountPerLayer)}get effectiveSelection(){return this.selection.slice(0,this.maxVisibleFeatureCountPerLayer)}get maxVisibleFeatureCountExceeded(){const{viewModel:e}=this;return this.selection.length>e.maxVisibleFeatureCountPerLayer&&this.visibleTotal===e.maxVisibleFeatureCountPerLayer}get maxVisibleFeatureCountPerLayer(){return this.viewModel.maxVisibleFeatureCountPerLayer}get objectIds(){const e=this.layer;return n(e)?this.selection:[]}get selection(){return this.viewModel.effectiveSelectionManager?.getSelection(this.layer)??[]}get total(){return this.selection.length}get visible(){return this.featureItems.some(e=>e.visible)}get visibleTotal(){return t(this.featureItems,e=>e.visible)}cancel(){this._onChangeController?.abort()}reset(){this.featureItems.forEach(e=>e.destroy()),this.featureItems=[]}async sync({controller:e,promises:t}){const{effectiveSelection:i,layer:o}=this;this.cancel();const a=new Map(this.featureItems.map(e=>[e.identifier,e])),l=new Map,c=[],u=[];for(const r of i){const e=a.get(r);e?l.set(r,e):(c.push(r),l.set(r,null))}if(this._onChangeController=e,c.length>0){n(o)?r(u,await this._createFeatureItemsFromIds(o,c,e)):r(u,this._createFeatureItemsFromGraphics(c));for(const e of u)null!=e.identifier&&l.set(e.identifier,e)}e.signal.aborted||(this.featureItems=Array.from(l.values()).filter(s),t.push(this.syncTitles(u)))}async syncTitles(e=this.featureItems){const{layer:t}=this,r=e.map(e=>e.graphic);if("getFeatureTitles"in t&&t.getFeatureTitles){(await t.getFeatureTitles(r,{fetchMissingFields:!0,removeHTML:!0})).forEach((e,t)=>this.featureTitleMap.set(t,e))}else if(n(t)){const e=t.displayField||l(t.fields);e&&r.forEach(t=>{const r=t.getObjectId(),s=t.attributes[e];null!=r&&s&&this.featureTitleMap.set(r,s)})}}_createFeatureItemsFromGraphics(e){const{layer:t,viewModel:r}=this;return e.map(e=>new u({graphic:e,layer:t,layerItem:this,viewModel:r}))}async _createFeatureItemsFromIds(e,t,r){const{layerView:s,viewModel:i}=this,o=new Map;if(c(s)){const e=s.createQuery();e.objectIds=t,e.outFields=["*"],e.returnGeometry=!0;const i=await s.queryFeatures(e,r);for(const t of i.features){const e=t.getObjectId();null!=e&&o.set(e,t)}}if(r.signal.aborted)return[];const a=t.filter(e=>!o.has(e));if(a.length){const{view:t}=this,s=e.createQuery();s.objectIds=a,s.outSpatialReference=t?.spatialReference,s.outFields=t?f(e,t,!0):["*"],s.returnGeometry=!0;const i=await e.queryFeatures(s,r);for(const e of i.features){const t=e.getObjectId();null!=t&&o.set(t,e)}}return Array.from(o.values()).map(t=>new u({graphic:t,layer:e,layerItem:this,viewModel:i}))}};e([o()],m.prototype,"_onChangeController",void 0),e([o()],m.prototype,"effectiveObjectIds",null),e([o()],m.prototype,"effectiveSelection",null),e([o()],m.prototype,"featureItems",void 0),e([o()],m.prototype,"featureTitleMap",void 0),e([o()],m.prototype,"groupLayerItem",void 0),e([o()],m.prototype,"layer",void 0),e([o()],m.prototype,"maxVisibleFeatureCountExceeded",null),e([o()],m.prototype,"maxVisibleFeatureCountPerLayer",null),e([o()],m.prototype,"objectIds",null),e([o()],m.prototype,"selection",null),e([o()],m.prototype,"total",null),e([o()],m.prototype,"visible",null),e([o()],m.prototype,"visibleTotal",null),m=e([a("esri.widgets.support.SelectionList.LayerItem")],m);const h=m;export{h as default};