@arcgis/core 5.0.0-next.72 → 5.0.0-next.74

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 (258) hide show
  1. package/WebDocument2D.d.ts +5 -30
  2. package/analysis/ElevationProfile/ElevationProfileLineQuery.d.ts +1 -1
  3. package/assets/esri/core/workers/RemoteClient.js +1 -1
  4. package/assets/esri/core/workers/chunks/0b666327e8090a6e6f6a.js +1 -0
  5. package/assets/esri/core/workers/chunks/16a7edb381621085a631.js +1 -0
  6. package/assets/esri/core/workers/chunks/{e246b256347a281c13fd.js → 22288b62da20a7a78a4f.js} +1 -1
  7. package/assets/esri/core/workers/chunks/{7e37a3005f2ad2c0a918.js → 23cf4cbc389d2b50e968.js} +1 -1
  8. package/assets/esri/core/workers/chunks/{935a6dccb88557f98189.js → 2a2f33df530b61e3a43f.js} +7 -5
  9. package/assets/esri/core/workers/chunks/4750f55a289bc0cf3d77.js +1 -0
  10. package/assets/esri/core/workers/chunks/a5181292b309b8249bd8.js +1 -0
  11. package/assets/esri/core/workers/chunks/ae733ee050f27f7d8924.js +1 -0
  12. package/assets/esri/core/workers/chunks/{64985e9b6e2edb3ceb37.js → b498db9715a722c52995.js} +45 -58
  13. package/assets/esri/core/workers/chunks/befeca51530bba5e8073.js +1 -0
  14. package/assets/esri/core/workers/chunks/cd788ed111e1e35cf9c8.js +1 -0
  15. package/assets/esri/core/workers/chunks/f35021214e534d5e0446.js +1 -0
  16. package/assets/esri/themes/base/widgets/_FeatureTable.scss +99 -22
  17. package/assets/esri/themes/dark/main.css +1 -1
  18. package/assets/esri/themes/light/main.css +1 -1
  19. package/assets/esri/themes/light/view.css +1 -1
  20. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable.json +1 -1
  21. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_en.json +1 -1
  22. package/chunks/ComponentShader.glsl.js +1 -1
  23. package/chunks/GlowBlur.glsl.js +2 -3
  24. package/chunks/HUDMaterial.glsl.js +43 -56
  25. package/config.d.ts +6 -8
  26. package/config.js +1 -1
  27. package/core/Collection.d.ts +27 -1
  28. package/core/types.d.ts +0 -23
  29. package/geometry/support/MeshTexture.d.ts +0 -2
  30. package/geometry/support/MeshVertexAttributes.d.ts +0 -2
  31. package/identity/IdentityManagerBase.d.ts +3 -6
  32. package/interfaces.d.ts +3 -3
  33. package/kernel.js +1 -1
  34. package/layers/BaseDynamicLayer.d.ts +1 -4
  35. package/layers/BaseElevationLayer.d.ts +3 -6
  36. package/layers/BuildingSceneLayer.d.ts +1 -4
  37. package/layers/CSVLayer.d.ts +1 -4
  38. package/layers/CatalogLayer.d.ts +1 -4
  39. package/layers/DimensionLayer.d.ts +1 -4
  40. package/layers/ElevationLayer.d.ts +3 -6
  41. package/layers/FeatureLayer.d.ts +1 -4
  42. package/layers/GaussianSplatLayer.d.ts +0 -1
  43. package/layers/GeoJSONLayer.d.ts +1 -4
  44. package/layers/GeoRSSLayer.d.ts +1 -4
  45. package/layers/GraphicsLayer.d.ts +1 -4
  46. package/layers/GroupLayer.d.ts +1 -4
  47. package/layers/ImageryLayer.d.ts +1 -4
  48. package/layers/ImageryTileLayer.d.ts +1 -4
  49. package/layers/IntegratedMesh3DTilesLayer.d.ts +1 -4
  50. package/layers/IntegratedMeshLayer.d.ts +1 -4
  51. package/layers/KMLLayer.d.ts +1 -4
  52. package/layers/Layer.d.ts +2 -6
  53. package/layers/LineOfSightLayer.d.ts +1 -4
  54. package/layers/MapImageLayer.d.ts +1 -4
  55. package/layers/MapNotesLayer.d.ts +1 -4
  56. package/layers/MediaLayer.d.ts +1 -4
  57. package/layers/OGCFeatureLayer.d.ts +1 -4
  58. package/layers/OrientedImageryLayer.d.ts +1 -4
  59. package/layers/ParquetLayer.d.ts +1 -4
  60. package/layers/PointCloudLayer.d.ts +1 -4
  61. package/layers/RouteLayer.d.ts +2 -5
  62. package/layers/SceneLayer.d.ts +1 -4
  63. package/layers/SubtypeGroupLayer.d.ts +1 -12
  64. package/layers/TileLayer.d.ts +1 -4
  65. package/layers/UnknownLayer.d.ts +1 -4
  66. package/layers/UnsupportedLayer.d.ts +1 -4
  67. package/layers/VectorTileLayer.d.ts +1 -4
  68. package/layers/VideoLayer.d.ts +1 -4
  69. package/layers/ViewshedLayer.d.ts +1 -4
  70. package/layers/VoxelLayer.d.ts +1 -4
  71. package/layers/WCSLayer.d.ts +1 -4
  72. package/layers/WFSLayer.d.ts +1 -4
  73. package/layers/WMSLayer.d.ts +1 -4
  74. package/layers/WMTSLayer.d.ts +1 -4
  75. package/layers/catalog/CatalogDynamicGroupLayer.d.ts +1 -4
  76. package/layers/catalog/CatalogFootprintLayer.d.ts +1 -4
  77. package/layers/knowledgeGraph/KnowledgeGraphSublayer.d.ts +1 -6
  78. package/layers/mixins/EditBusLayer.d.ts +0 -1
  79. package/layers/support/FeatureFilter.d.ts +0 -1
  80. package/layers/support/MosaicRule.d.ts +0 -4
  81. package/layers/support/types.d.ts +2 -2
  82. package/layers/types.d.ts +19 -6
  83. package/package.json +1 -1
  84. package/portal/PortalUser.d.ts +1 -1
  85. package/renderers/support/RendererLegendOptions.d.ts +0 -1
  86. package/request/types.d.ts +0 -1
  87. package/rest/support/NormalizationBinParametersMixin.d.ts +18 -20
  88. package/rest/support/PrintTemplate.d.ts +0 -1
  89. package/rest/support/RelationshipQuery.d.ts +1 -10
  90. package/rest/support/types.d.ts +29 -3
  91. package/smartMapping/heuristics/binLevel.d.ts +1 -1
  92. package/smartMapping/heuristics/scaleRange.d.ts +1 -1
  93. package/smartMapping/heuristics/sizeRange.d.ts +1 -1
  94. package/smartMapping/heuristics/types.d.ts +0 -2
  95. package/smartMapping/labels/bins.d.ts +1 -1
  96. package/smartMapping/labels/clusters.d.ts +1 -1
  97. package/smartMapping/popup/clusters.d.ts +1 -1
  98. package/smartMapping/popup/templates.d.ts +1 -1
  99. package/smartMapping/raster/renderers/classBreaks.d.ts +1 -1
  100. package/smartMapping/raster/renderers/colormap.d.ts +1 -1
  101. package/smartMapping/raster/renderers/flow.d.ts +0 -1
  102. package/smartMapping/raster/renderers/rgb.d.ts +1 -1
  103. package/smartMapping/raster/renderers/shadedRelief.d.ts +0 -1
  104. package/smartMapping/raster/renderers/stretch.d.ts +1 -1
  105. package/smartMapping/raster/renderers/uniqueValue.d.ts +0 -1
  106. package/smartMapping/raster/renderers/vectorField.d.ts +0 -1
  107. package/smartMapping/raster/support/utils.d.ts +0 -2
  108. package/smartMapping/renderers/color.d.ts +6 -6
  109. package/smartMapping/renderers/dotDensity.d.ts +0 -1
  110. package/smartMapping/renderers/heatmap.d.ts +1 -1
  111. package/smartMapping/renderers/location.d.ts +0 -1
  112. package/smartMapping/renderers/opacity.d.ts +1 -1
  113. package/smartMapping/renderers/pieChart.d.ts +0 -2
  114. package/smartMapping/renderers/predominance.d.ts +0 -1
  115. package/smartMapping/renderers/relationship.d.ts +0 -1
  116. package/smartMapping/renderers/size.d.ts +4 -6
  117. package/smartMapping/renderers/type.d.ts +9 -5
  118. package/smartMapping/renderers/univariateColorSize.d.ts +2 -2
  119. package/smartMapping/statistics/classBreaks.d.ts +1 -1
  120. package/smartMapping/statistics/heatmapStatistics.d.ts +1 -1
  121. package/smartMapping/statistics/histogram.d.ts +1 -1
  122. package/smartMapping/statistics/predominantCategories.d.ts +1 -1
  123. package/smartMapping/statistics/summaryStatistics.d.ts +1 -1
  124. package/smartMapping/statistics/summaryStatisticsForAge.d.ts +1 -1
  125. package/smartMapping/statistics/support/ageUtils.d.ts +1 -1
  126. package/smartMapping/statistics/types.d.ts +26 -8
  127. package/smartMapping/statistics/uniqueValues.d.ts +1 -1
  128. package/smartMapping/symbology/color.d.ts +4 -4
  129. package/smartMapping/symbology/dotDensity.d.ts +3 -3
  130. package/smartMapping/symbology/flow.d.ts +3 -3
  131. package/smartMapping/symbology/heatmap.d.ts +3 -3
  132. package/smartMapping/symbology/location.d.ts +1 -1
  133. package/smartMapping/symbology/pieChart.d.ts +3 -3
  134. package/smartMapping/symbology/predominance.d.ts +3 -3
  135. package/smartMapping/symbology/relationship.d.ts +3 -3
  136. package/smartMapping/symbology/size.d.ts +1 -1
  137. package/smartMapping/symbology/support/colorRamps.d.ts +1 -1
  138. package/smartMapping/symbology/type.d.ts +3 -3
  139. package/support/revision.js +1 -1
  140. package/symbols/cim/types.d.ts +0 -12
  141. package/symbols/support/symbolUtils.d.ts +1 -1
  142. package/views/2d/MapViewConstraints.d.ts +2 -10
  143. package/views/2d/engine/brushes.js +1 -1
  144. package/views/2d/engine/vectorTiles/GlyphMosaic.js +1 -1
  145. package/views/2d/engine/vectorTiles/MemoryBuffer.js +1 -1
  146. package/views/2d/engine/vectorTiles/RenderBucket.js +1 -1
  147. package/views/2d/engine/vectorTiles/SpriteMosaic.js +1 -1
  148. package/views/2d/engine/vectorTiles/VTLPainter3D.js +1 -1
  149. package/views/2d/engine/vectorTiles/VectorTileContainer.js +1 -1
  150. package/views/2d/engine/vectorTiles/VertexMemoryBuffer.js +1 -1
  151. package/views/2d/engine/vectorTiles/shaders/VTLBackgroundMaterial.js +1 -1
  152. package/views/2d/engine/vectorTiles/shaders/VTLCircleMaterial.js +1 -1
  153. package/views/2d/engine/vectorTiles/shaders/VTLFillMaterial.js +1 -1
  154. package/views/2d/engine/vectorTiles/shaders/VTLLineMaterial.js +1 -1
  155. package/views/2d/engine/vectorTiles/shaders/VTLMaterial.js +1 -1
  156. package/views/2d/engine/vectorTiles/shaders/VTLSymbolMaterial.js +1 -1
  157. package/views/2d/engine/vectorTiles/style/StyleLayer.js +1 -1
  158. package/views/2d/engine/webgl/Painter.js +1 -1
  159. package/views/2d/engine/webgl/RenderingDevice.js +5 -0
  160. package/views/2d/engine/webgl/WGLContainer.js +1 -1
  161. package/views/2d/engine/webgl/meshing/Mesh.js +1 -1
  162. package/views/2d/engine/webgl/number.js +1 -1
  163. package/views/2d/engine/webgl/shaderGraph/graph/glsl.js +1 -1
  164. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/vector-tiles/VTLShaderBackground.js +5 -0
  165. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/vector-tiles/VTLShaderCircle.js +5 -0
  166. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/vector-tiles/VTLShaderFill.js +5 -0
  167. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/vector-tiles/VTLShaderIcon.js +5 -0
  168. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/vector-tiles/VTLShaderLine.js +5 -0
  169. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/vector-tiles/VTLShaderOutline.js +5 -0
  170. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/vector-tiles/VTLShaderText.js +5 -0
  171. package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueBackground.js +5 -0
  172. package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueCircle.js +5 -0
  173. package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueFill.js +5 -0
  174. package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueLine.js +5 -0
  175. package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueSymbol.js +5 -0
  176. package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniques.js +5 -0
  177. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  178. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  179. package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
  180. package/views/3d/layers/graphics/Graphics3DTextSymbolLayer.js +1 -1
  181. package/views/3d/layers/i3s/meshUtils.js +1 -1
  182. package/views/3d/state/NearFarHeuristic.js +1 -1
  183. package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
  184. package/views/3d/webgl-engine/collections/Component/Material/ComponentData.glsl.js +1 -1
  185. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  186. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
  187. package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexNormal.glsl.js +6 -4
  188. package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexPosition.glsl.js +18 -14
  189. package/views/3d/webgl-engine/effects/glow/GlowBlur.glsl.js +1 -1
  190. package/views/3d/webgl-engine/effects/glow/GlowRenderNode.js +1 -1
  191. package/views/3d/webgl-engine/lib/edgeRendering/EdgeShaderTechniqueConfiguration.js +1 -1
  192. package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
  193. package/views/3d/webgl-engine/shaders/HUDMaterial.glsl.js +1 -1
  194. package/views/3d/webgl-engine/shaders/HUDMaterialTechniqueConfiguration.js +1 -1
  195. package/views/3d/webgl-engine/shaders/sources/edgeRenderer/EdgeUtil.glsl.js +23 -20
  196. package/views/BreakpointsOwner.d.ts +2 -2
  197. package/views/LinkChartView.d.ts +0 -2
  198. package/views/View2D.d.ts +3 -15
  199. package/views/input/types.d.ts +2 -13
  200. package/views/layers/BuildingComponentSublayerView.d.ts +0 -1
  201. package/views/types.d.ts +2 -9
  202. package/views/webgl/VertexArrayObject.js +1 -1
  203. package/webdoc/ips/SmoothingProperties.d.ts +1 -1
  204. package/webdoc/ips/SmoothingProperties.js +1 -1
  205. package/widgets/BasemapLayerList/BasemapLayerListVisibleElements.d.ts +10 -10
  206. package/widgets/BasemapLayerList/types.d.ts +6 -1
  207. package/widgets/Bookmarks/BookmarksVisibleElements.d.ts +0 -9
  208. package/widgets/Bookmarks/types.d.ts +0 -4
  209. package/widgets/CatalogLayerList/CatalogLayerListVisibleElements.d.ts +2 -2
  210. package/widgets/CatalogLayerList/types.d.ts +5 -1
  211. package/widgets/Editor/VisibleElements.d.ts +0 -11
  212. package/widgets/ElevationProfile/types.d.ts +1 -1
  213. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  214. package/widgets/FeatureTable/FieldColumn.d.ts +0 -1
  215. package/widgets/FeatureTable/VisibleElements.d.ts +2 -16
  216. package/widgets/FeatureTable/support/AttachmentsViewOptions.d.ts +5 -3
  217. package/widgets/FeatureTable/support/AttachmentsViewOptions.js +1 -1
  218. package/widgets/FeatureTable/support/FeatureStore.js +1 -1
  219. package/widgets/FeatureTable.js +1 -1
  220. package/widgets/Features/FeaturesViewModel.d.ts +3 -27
  221. package/widgets/Features/FeaturesVisibleElements.d.ts +4 -4
  222. package/widgets/LayerList/LayerListViewModel.d.ts +20 -5
  223. package/widgets/LayerList/LayerListVisibleElements.d.ts +10 -12
  224. package/widgets/LayerList/ListItem.d.ts +33 -0
  225. package/widgets/LayerList/ListItemPanel.d.ts +8 -2
  226. package/widgets/LayerList/types.d.ts +58 -15
  227. package/widgets/Popup/PopupVisibleElements.d.ts +6 -6
  228. package/widgets/Popup/types.d.ts +1 -1
  229. package/widgets/ScaleRangeSlider/ScaleRanges.d.ts +1 -1
  230. package/widgets/Sketch/CreateToolVisibilityMap.d.ts +0 -4
  231. package/widgets/Sketch/VisibleElements.d.ts +0 -2
  232. package/widgets/Sketch/types.d.ts +1 -1
  233. package/widgets/TableList/ListItemPanel.d.ts +8 -0
  234. package/widgets/TableList/TableListViewModel.d.ts +9 -14
  235. package/widgets/TableList/TableListVisibleElements.d.ts +9 -11
  236. package/widgets/TableList/types.d.ts +13 -7
  237. package/widgets/support/SnappingControls/VisibleElements.d.ts +0 -4
  238. package/widgets/types.d.ts +1 -9
  239. package/assets/esri/core/workers/chunks/1d8fc0239c907ff5d1e8.js +0 -1
  240. package/assets/esri/core/workers/chunks/562cddaf63985e53ee6e.js +0 -1
  241. package/assets/esri/core/workers/chunks/b899b4e7979c13b99526.js +0 -1
  242. package/assets/esri/core/workers/chunks/d0ae8752419d5b761190.js +0 -1
  243. package/assets/esri/core/workers/chunks/df2ba5f9d57080fca183.js +0 -1
  244. package/assets/esri/core/workers/chunks/ee175fd4ec706f7878c0.js +0 -1
  245. package/assets/esri/core/workers/chunks/fc00d7278b43df813c54.js +0 -1
  246. package/layers/mixins/ScaleRange.d.ts +0 -16
  247. package/views/2d/engine/vectorTiles/shaders/Programs.js +0 -5
  248. package/views/2d/engine/vectorTiles/shaders/VTLMaterialManager.js +0 -5
  249. package/views/2d/engine/vectorTiles/shaders/sources/resolver.js +0 -5
  250. package/views/2d/engine/vectorTiles/shaders/sources/shaderRepository.js +0 -5
  251. package/views/2d/engine/vtlBrushes.js +0 -5
  252. package/views/2d/engine/webgl/brushes/WGLBrushVTLBackground.js +0 -5
  253. package/views/2d/engine/webgl/brushes/WGLBrushVTLCircle.js +0 -5
  254. package/views/2d/engine/webgl/brushes/WGLBrushVTLFill.js +0 -5
  255. package/views/2d/engine/webgl/brushes/WGLBrushVTLLine.js +0 -5
  256. package/views/2d/engine/webgl/brushes/WGLBrushVTLSymbol.js +0 -5
  257. package/views/3d/webgl-engine/effects/glow/GlowPresets.glsl.js +0 -5
  258. package/widgets/FeatureTable/support/FeatureStore.d.ts +0 -1
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import{substitute as t}from"../intl.js";import{isSome as i}from"../core/arrayUtils.js";import{watch as l,on as o,sync as n,initial as s}from"../core/reactiveUtils.js";import{renderingSanitizer as a}from"../core/sanitizerUtils.js";import{formatFileSize as r}from"../core/unitFormatUtils.js";import{property as c,subclass as d}from"../core/accessorSupport/decorators.js";import{geometryTypes as h}from"../geometry/support/typeUtils.js";import{isLayerFromCatalog as m}from"../layers/catalog/catalogUtils.js";import{isKnowledgeGraphLayer as p,isMapImageLayer as u,isSubtypeGroupLayer as g}from"../layers/support/layerUtils.js";import b from"../tables/AttributeTableTemplate.js";import w from"../time/TimeExtent.js";import v from"./Widget.js";import{isSupportedImage as y,getCalciteIconForAttachment as f}from"./Attachments/support/attachmentUtils.js";import{loadPromptComponents as _,Prompt as M}from"./Editor/components/Prompt.js";import C from"./FeatureTable/ColumnMenuVisibleElements.js";import S from"./FeatureTable/FeatureTableViewModel.js";import A from"./FeatureTable/VisibleElements.js";import{isGroupColumn as E}from"./FeatureTable/support/columnUtils.js";import T from"./FeatureTable/support/TableTemplate.js";import{loadFieldColumnComponents as V,isIFeatureTableSupportedLayer as I,isIFeatureTableSupportedLayerWithAttachments as R,getRelationshipIdsToShow as k}from"./FeatureTable/support/tableUtils.js";import{loadCalciteComponents as x}from"./support/componentsUtils.js";import{globalCss as D}from"./support/globalCss.js";import{getIconForLayer as P}from"./support/iconUtils.js";import{messageBundle as F,vmEvent as O,tsx as z}from"./support/widget.js";import{storeNode as L,discardNode as j}from"./support/widgetUtils.js";var $;const U="esri-feature-table",B=`${U}__attachments-view`,N={base:U,content:`${U}__content`,menuPopover:`${U}__menu-popover`,layerDropdownMenu:`${U}__layer-switcher-menu`,tableContainer:`${U}__table-container`,tableContainerWithAttachments:`${U}__table-container--attachments`,tableNavigation:`${U}__table-navigation`,attachmentsView:B,attachmentsViewContent:`${B}__content`,attachmentsViewDropArea:`${B}__drop-area`,attachmentsViewIcon:`${B}__icon`,attachmentsViewInformation:`${B}__information`,attachmentsViewList:`${B}__list`,attachmentsViewListFileSize:`${B}__list__filesize`,attachmentsViewListItemDelete:`${B}__list-item--delete`,attachmentsViewListThumbnail:`${B}__list__thumbnail`,expanded:`${U}__expanded`,collapsed:`${U}__collapsed`,footerMessage:`${U}__footer__message`,footerIconDanger:`${U}__footer__icon--danger`},H={chevronRight:"chevron-right",clearSelection:"clear-selection",downloadTo:"download-to",exclamationMarkTriangle:"exclamation-mark-triangle",exportToCSV:"file-csv",folderOpen:"folder-open",delete:"trash",launch:"launch",layers:"layers",moveUp:"move-up",plus:"plus",refresh:"refresh",replaceImage:"replace-image",reset:"reset",save:"save",showAll:"selection-x",showColumn:"show-column",showSelected:"selection-filter",upload:"upload",zoomToSelection:"zoom-to-object"};let Z=$=class extends v{constructor(e,t){super(e,t),this._attachmentsInput=null,this._columnVisibilityActions=new Map,this.attachmentsList=null,this.description=null,this.disabled=!1,this.navigationScale="m",this.title=null,this.viewModel=new S,this.visibleElements=new A,this._showDeletePrompt=this._showDeletePrompt.bind(this),this._onDeleteSelectionClick=this._onDeleteSelectionClick.bind(this)}initialize(){this.addHandles([l(()=>[this.isQueryingOrSyncing,this.editingEnabled],()=>this.scheduleRender()),l(()=>[this._effectiveVisibleElements,this._effectiveVisibleElements.columnDescriptions,this._effectiveVisibleElements.columnMenus,this._effectiveVisibleElements.columnMenuItems,this.columns.length],()=>{this.columns.forEach(e=>e.visibleElements=this._effectiveVisibleElements),this.refreshCellContent()},n),l(()=>this._effectiveVisibleElements.selectionColumn,e=>{this.grid&&(this.grid.selectionColumnEnabled=e)},s),o(()=>this.viewModel,"show-related-table",e=>this._onShowRelatedTable(e)),l(()=>this.editingEnabled,()=>{const{attachmentsViewOptions:e}=this;this.clearPrompt(),e&&(e.form?.reset(),e.candidates=null)})])}loadDependencies(){return Promise.all([x({action:()=>import("@esri/calcite-components/dist/components/calcite-action"),alert:()=>import("@esri/calcite-components/dist/components/calcite-alert"),button:()=>import("@esri/calcite-components/dist/components/calcite-button"),chip:()=>import("@esri/calcite-components/dist/components/calcite-chip"),dropdown:()=>import("@esri/calcite-components/dist/components/calcite-dropdown"),"dropdown-group":()=>import("@esri/calcite-components/dist/components/calcite-dropdown-group"),"dropdown-item":()=>import("@esri/calcite-components/dist/components/calcite-dropdown-item"),icon:()=>import("@esri/calcite-components/dist/components/calcite-icon"),label:()=>import("@esri/calcite-components/dist/components/calcite-label"),list:()=>import("@esri/calcite-components/dist/components/calcite-list"),"list-item":()=>import("@esri/calcite-components/dist/components/calcite-list-item"),pagination:()=>import("@esri/calcite-components/dist/components/calcite-pagination"),panel:()=>import("@esri/calcite-components/dist/components/calcite-panel"),popover:()=>import("@esri/calcite-components/dist/components/calcite-popover"),progress:()=>import("@esri/calcite-components/dist/components/calcite-progress"),switch:()=>import("@esri/calcite-components/dist/components/calcite-switch"),tooltip:()=>import("@esri/calcite-components/dist/components/calcite-tooltip")}),_(),V()])}destroy(){this.drainRelatedTables(),this.clearPrompt()}get _effectiveDescription(){const{description:e}=this;return null!=e?a.sanitize("function"==typeof e?e():e):void 0}get _effectiveLayers(){const{layer:e,layers:t}=this,i=t?.length?t.filter(I):[],l=i.length?i:[...this._viewLayers];return e&&!l.includes(e)&&l.push(e),l}get _effectiveTitle(){const{layer:e,messages:i,state:l,highlightIds:o,title:n,size:s}=this;if(n)return a.sanitize("function"==typeof n?n():n);if(!e)return i.noLayer;switch(l){case"disabled":return i.errorLayer;case"ready":case"loading":return i.loading;case"error":return i.errorData}return t(i.header,{title:a.sanitize(e.title),count:s,selected:o.length})}get _effectiveVisibleElements(){return this.visibleElementsOverride??this.visibleElements}get _filteredTables(){const e=this.relatedTables.toArray(),t=1===e.length;return this.allRelatedTablesVisible?e:t?[e[0]]:this._shouldShowAttachmentsView?e.slice(-1):e.slice(-2)}get _hasAttachmentsViewError(){return null!=this.attachmentsViewOptions.error}get _hasCustomMenuItems(){return!!this.menuConfig?.items?.length}get _hasDefaultMenuItems(){return!!(this._showClearSelectionAction||this._showDeleteSelectionAction||this._showExportSelectionToCSVAction||this._showRefreshDataAction||this._showZoomToSelectionAction||this._showSelectedRecordsShowSelectedAction||this._showSelectedRecordsShowAllAction||this._showColumnsVisibilityAction)}get _shouldShowGrid(){return this.allRelatedTablesVisible||1===this.relatedTables.length&&!this._shouldShowAttachmentsView}get _shouldShowMenu(){const{header:e,menu:t}=this._effectiveVisibleElements;return!(!e||!t||!this._hasDefaultMenuItems&&!this._hasCustomMenuItems)}get _shouldShowAttachmentsView(){return!(null==this.attachmentsViewOptions.objectId&&!this.relatedTables.some(e=>null!=e.attachmentsViewOptions.objectId))}get _showClearSelectionAction(){return!(!this.highlightIds.length||!this._effectiveVisibleElements.menuItems?.clearSelection||this.relatedTables.length||this._shouldShowAttachmentsView)}get _showColumnsVisibilityAction(){const{header:e,menu:t,menuItems:i}=this._effectiveVisibleElements;return!(!(e&&t&&i?.toggleColumns)||this.showRelatedTableCallback||this.allRelatedTablesVisible||this._shouldShowAttachmentsView)}get _showDeleteSelectionAction(){return!(!(this.editingEnabled&&this.highlightIds.length&&this._effectiveVisibleElements.menuItems?.deleteSelection&&this.layer?.capabilities?.operations?.supportsDelete)||this.relatedTables.length||this._shouldShowAttachmentsView)}get _showExportSelectionToCSVAction(){return!(!(this._effectiveVisibleElements.menuItems.exportSelectionToCSV&&this.layer&&this.highlightIds.length)||this.relatedTables.length)}get _showLayerDropdown(){return!(!this._effectiveLayers.length||!this._effectiveVisibleElements.layerDropdown)}get _shouldShowNavigationBar(){const e=!!this.relatedTable||this._shouldShowAttachmentsView;return!this.tableParent&&e}get _showRefreshDataAction(){return!!this._effectiveVisibleElements.menuItems?.refreshData}get _showSelectedRecordsShowSelectedAction(){const e=this.objectIds.length,t=this.highlightIds.length;return!(!t||!this._effectiveVisibleElements.menuItems?.selectedRecordsShowSelectedToggle||e&&t===e||this.relatedTables.length||this._shouldShowAttachmentsView)}get _showSelectedRecordsShowAllAction(){return!(!this._effectiveVisibleElements.menuItems?.selectedRecordsShowAllToggle||!this.objectIds.length||this.relatedTables.length)}get _showZoomToSelectionAction(){return!(!this.view||!this.highlightIds.length||this.effectiveTable.layer?.isTable||!this._effectiveVisibleElements.menuItems?.zoomToSelection)}get _viewLayers(){const e=this.view?.map;if(!e)return[];const t=new Set,i=e=>{!I(e)||g(e)||t.has(e)||"sublayer"===e.type&&!e.capabilities?.operations?.supportsQuery||(e.load(),t.add(e))},l=e=>{m(e)||"catalog-footprint"===e.type||(p(e)?(e.load(),e.layers?.forEach(i),e.tables?.forEach(i)):u(e)?(e.loadAll(),e.allSublayers?.forEach(i),e.subtables?.forEach(i)):g(e)?(e.loadAll(),e.sublayers?.forEach(i)):i(e))};return e.allLayers.forEach(l),e.allTables.forEach(l),[...t.values()]}get grid(){return this.viewModel.grid}get actionColumn(){return this.viewModel.actionColumn}get actionColumnConfig(){return this.viewModel.actionColumnConfig}set actionColumnConfig(e){this.viewModel.actionColumnConfig=e}get activeFilters(){return this.viewModel.activeFilters}get activeSortOrders(){return this.viewModel.activeSortOrders}get allColumns(){return this.viewModel.allColumns}get allRelatedTablesVisible(){return this.viewModel.allRelatedTablesVisible}get allVisibleColumns(){return this.viewModel.allVisibleColumns}get attachmentsColumns(){return this.viewModel.attachmentsColumns}get attachmentsEnabled(){return this.viewModel.attachmentsEnabled}set attachmentsEnabled(e){this.viewModel.attachmentsEnabled=e}get attachmentsViewOptions(){return this.viewModel.attachmentsViewOptions}set attachmentsViewOptions(e){this.viewModel.attachmentsViewOptions=e}get attributeTableTemplate(){return this.viewModel.attributeTableTemplate}set attributeTableTemplate(e){this.viewModel.attributeTableTemplate=e}get autoRefreshEnabled(){return this.viewModel.autoRefreshEnabled}set autoRefreshEnabled(e){this.viewModel.autoRefreshEnabled=e}get autoSaveEnabled(){return this.viewModel.autoSaveEnabled}set autoSaveEnabled(e){this.viewModel.autoSaveEnabled=e}get clearPrompt(){return this.viewModel.clearPrompt}set clearPrompt(e){this.viewModel.clearPrompt=e}get columnPerformanceModeEnabled(){return this.viewModel.columnPerformanceModeEnabled}set columnPerformanceModeEnabled(e){this.viewModel.columnPerformanceModeEnabled=e}get columnReorderingEnabled(){return this.viewModel.columnReorderingEnabled}set columnReorderingEnabled(e){this.viewModel.columnReorderingEnabled=e}get columns(){return this.viewModel.columns}get definitionExpression(){return this.viewModel.definitionExpression}set definitionExpression(e){this.viewModel.definitionExpression=e}get container(){return super.container}set container(e){super.container=e}get editingEnabled(){return this.viewModel.editingEnabled}set editingEnabled(e){this.viewModel.editingEnabled=e}get effectiveSize(){return this.viewModel.effectiveSize}get effectiveTable(){return this.relatedTable||this}get fieldColumns(){return this.viewModel.fieldColumns}get filterGeometry(){return this.viewModel.filterGeometry}set filterGeometry(e){this.viewModel.filterGeometry=e}get filterBySelectionEnabled(){return this.viewModel.filterBySelectionEnabled}set filterBySelectionEnabled(e){this.viewModel.filterBySelectionEnabled=e}get groupColumns(){return this.viewModel.groupColumns}get hasContingentValues(){return this.viewModel.hasContingentValues}get hasInvalidPendingEdits(){return this.viewModel.hasInvalidPendingEdits}get hasPendingEdits(){return this.viewModel.hasPendingEdits}get hiddenFields(){return this.viewModel.hiddenFields}set hiddenFields(e){this.viewModel.hiddenFields=e}get highlightEnabled(){return this.viewModel.highlightEnabled}set highlightEnabled(e){this.viewModel.highlightEnabled=e}get highlightIds(){return this.viewModel.highlightIds}set highlightIds(e){this.viewModel.highlightIds=e}get icon(){return"table"}set icon(e){this._overrideIfSome("icon",e)}get initialSize(){return this.viewModel.initialSize}set initialSize(e){this.viewModel.initialSize=e}get isQueryingOrSyncing(){return this.viewModel.isQueryingOrSyncing}get isSyncing(){return this.viewModel.isSyncing}get isSyncingAttachments(){return this.viewModel.isSyncingAttachments}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get layer(){return this.viewModel.layer}set layer(e){this.viewModel.layer=e}get layers(){return this.viewModel.layers}set layers(e){this.viewModel.layers=e}get layerView(){return this.viewModel.layerView}get maxSize(){return this.viewModel.maxSize}set maxSize(e){this.viewModel.maxSize=e}get messages(){return this.viewModel.messages}set messages(e){this.viewModel.messages=e}get messagesCommon(){return this.viewModel.messagesCommon}set messagesCommon(e){this.viewModel.messagesCommon=e}get messagesUnits(){return this.viewModel.messagesUnits}set messagesUnits(e){this.viewModel.messagesUnits=e}get messagesURIUtils(){return this.viewModel.messagesURIUtils}set messagesURIUtils(e){this.viewModel.messagesURIUtils=e}get menuConfig(){return this.viewModel.menuConfig}set menuConfig(e){this.viewModel.menuConfig=e}get multipleSelectionEnabled(){return this.viewModel.multipleSelectionEnabled}set multipleSelectionEnabled(e){this.viewModel.multipleSelectionEnabled=e}get multiSortEnabled(){return this.viewModel.multiSortEnabled}set multiSortEnabled(e){this.viewModel.multiSortEnabled=e}get multipleSortPriority(){return this.viewModel.multipleSortPriority}set multipleSortPriority(e){this.viewModel.multipleSortPriority=e}get noDataMessage(){return this.viewModel.noDataMessage}set noDataMessage(e){this.viewModel.noDataMessage=e}get objectIds(){return this.viewModel.objectIds}set objectIds(e){this.viewModel.objectIds=e}get outFields(){return this.viewModel.outFields}set outFields(e){this.viewModel.outFields=e}get pageCount(){return this.viewModel.pageCount}get pageIndex(){return this.viewModel.pageIndex}set pageIndex(e){this.viewModel.pageIndex=e}get pageSize(){return this.viewModel.pageSize}set pageSize(e){this.viewModel.pageSize=e}get paginationEnabled(){return this.viewModel.paginationEnabled}set paginationEnabled(e){this.viewModel.paginationEnabled=e}get prompt(){return this.viewModel.prompt}set prompt(e){this.viewModel.prompt=e}get relatedRecordsEnabled(){return this.viewModel.relatedRecordsEnabled}set relatedRecordsEnabled(e){this.viewModel.relatedRecordsEnabled=e}get relatedTable(){return this.viewModel.relatedTable}get relatedTables(){return this.viewModel.relatedTables}set relatedTables(e){this.viewModel.relatedTables=e}get relationship(){return this.viewModel.relationship}get relationshipColumnConfigs(){return this.viewModel.relationshipColumnConfigs}set relationshipColumnConfigs(e){this.viewModel.relationshipColumnConfigs=e}get relationshipColumns(){return this.viewModel.relationshipColumns}get relationshipConfig(){return this.viewModel.relationshipConfig}set relationshipConfig(e){this.viewModel.relationshipConfig=e}get relationshipInfos(){return this.viewModel.relationshipInfos}get returnGeometryEnabled(){return this.viewModel.returnGeometryEnabled}set returnGeometryEnabled(e){this.viewModel.returnGeometryEnabled=e}get returnMEnabled(){return this.viewModel.returnMEnabled}set returnMEnabled(e){this.viewModel.returnMEnabled=e}get returnZEnabled(){return this.viewModel.returnZEnabled}set returnZEnabled(e){this.viewModel.returnZEnabled=e}get rowHighlightIds(){return this.viewModel.rowHighlightIds}set rowHighlightIds(e){this.viewModel.rowHighlightIds=e}get selectionSource(){return this.viewModel.selectionSource}set selectionSource(e){this.viewModel.selectionSource=e}get showAllRelatedTables(){return this.viewModel.showAllRelatedTables}set showAllRelatedTables(e){this.viewModel.showAllRelatedTables=e}get showPrompt(){return this.viewModel.showPrompt}set showPrompt(e){this.viewModel.showPrompt=e}get showRelatedTableCallback(){return this.viewModel.showRelatedTableCallback}set showRelatedTableCallback(e){this.viewModel.showRelatedTableCallback=e}get size(){return this.viewModel.size}get state(){return this.viewModel.state}get supportsAddAttachments(){return this.viewModel.supportsAddAttachments}get supportsAttachments(){return this.viewModel.supportsAttachments}get supportsDeleteAttachments(){return this.viewModel.supportsDeleteAttachments}get supportsResizeAttachments(){return this.viewModel.supportsResizeAttachments}get supportsUpdateAttachments(){return this.viewModel.supportsUpdateAttachments}get syncTemplateOnChangesEnabled(){return this.viewModel.syncTemplateOnChangesEnabled}set syncTemplateOnChangesEnabled(e){this.viewModel.syncTemplateOnChangesEnabled=e}get tableController(){return this.viewModel.tableController}set tableController(e){this.viewModel.tableController=e}get tableParent(){return this.viewModel.tableParent}set tableParent(e){this.viewModel.tableParent=e}get tableTemplate(){return this.viewModel.tableTemplate}set tableTemplate(e){this.viewModel.tableTemplate=e}get tableTemplateOverride(){return this.viewModel.tableTemplateOverride}set tableTemplateOverride(e){this.viewModel.tableTemplateOverride=e}get timeExtent(){return this.viewModel.timeExtent}set timeExtent(e){this.viewModel.timeExtent=e}get timeZone(){return this.viewModel.timeZone}set timeZone(e){this.viewModel.timeZone=e}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}get visibleColumns(){return this.viewModel.visibleColumns}get visibleElementsOverride(){const{attachmentsViewOptions:e,relatedTable:t,tableController:i,visibleElements:l}=this,{columnDescriptions:o,columnMenus:n,tooltips:s}=l,a=null!=e.objectId;if(t)return new A({columnDescriptions:o,columnMenus:n,tooltips:s,close:l.close,header:l.header,layerDropdown:l.layerDropdown,layerDropdownIcons:l.layerDropdownIcons,menu:l.menu,menuItems:l.menuItems,progress:l.progress,selectionColumn:!1,columnMenuItems:new C({sortAscending:!1,sortDescending:!1})});if(i){const e=i.relatedTable===this,t=i.allRelatedTablesVisible,r=e&&l.selectionColumn&&!t&&!a,c=e&&!t&&!a;return new A({columnDescriptions:o,columnMenus:n,tooltips:s,selectionColumn:r,close:!1,header:!1,layerDropdown:!1,menu:!1,progress:!1,columnMenuItems:new C({sortAscending:c,sortDescending:c})})}return a?new A({columnDescriptions:o,columnMenus:n,tooltips:s,close:l.close,header:l.header,layerDropdown:l.layerDropdown,layerDropdownIcons:l.layerDropdownIcons,menu:l.menu,menuItems:l.menuItems,progress:l.progress,selectionColumn:!1,columnMenuItems:new C({sortAscending:!1,sortDescending:!1})}):null}cancelPendingEdits(){this.viewModel.cancelPendingEdits()}clearSelectionFilter(){this.viewModel.clearSelectionFilter()}async deleteAttachments(e,t,i){null!=e&&t?.length&&(i?this._showDeleteAttachmentPrompt(e,t):await this.viewModel.deleteAttachments(e,t))}deleteSelection(e){return this.highlightIds.length?e?(this._showDeletePrompt(),this.scheduleRender(),Promise.resolve()):this.viewModel.deleteSelection():Promise.resolve()}async downloadAttachmentById(e,t){return this.viewModel.downloadAttachmentById(e,t)}drainRelatedTables(){this.viewModel.drainRelatedTables()}exportSelectionToCSV(e){return this.viewModel.exportSelectionToCSV(e)}filterBySelection(){this.viewModel.filterBySelection()}findColumn(e){return this.viewModel.findColumn(e)}goToPage(e){this.viewModel.goToPage(e)}hideColumn(e){this.grid?.hideColumn(e)}nextPage(){this.viewModel.nextPage()}previousPage(){this.viewModel.previousPage()}async refresh(){await this.viewModel.refresh()}refreshCellContent(){this.viewModel.refreshCellContent()}async saveAttachmentsViewForm(){await this.viewModel.saveAttachmentsViewForm()}async savePendingEdits(){await this.viewModel.savePendingEdits()}showAllColumns(){this.viewModel.showAllColumns()}showColumn(e){this.grid?.showColumn(e)}sortColumn(e,t){this.viewModel.sortColumn(e,t)}scrollLeft(){this.viewModel.scrollLeft()}scrollToBottom(){this.viewModel.scrollToBottom()}scrollToIndex(e){this.viewModel.scrollToIndex(e)}scrollToRow(e){this.viewModel.scrollToRow(e)}scrollToTop(){this.viewModel.scrollToTop()}toggleColumnVisibility(e){this.viewModel.toggleColumnVisibility(e)}zoomToSelection(){this.effectiveTable.viewModel.zoomToSelection()}render(){const{_effectiveVisibleElements:e,isQueryingOrSyncing:t,menuConfig:i,state:l}=this;return z("div",{bind:this,class:this.classes(N.base,D.widget)},z("calcite-panel",{bind:this,class:N.content,closable:e.close,description:this._effectiveDescription,disabled:this.disabled||"disabled"===l&&!this._effectiveLayers?.length,heading:e.header?this._effectiveTitle:void 0,key:"table-content",loading:"loading"===l,menuOpen:!!i?.open,overlayPositioning:"fixed",onCalcitePanelClose:e=>{e.currentTarget.closed=!1,this.emit("close")}},e.progress?z("calcite-progress",{type:t?"indeterminate":"determinate"}):null,this._showLayerDropdown?this._renderLayerDropdown():null,this._renderColumnVisibilityAction(),this._renderHeaderMenuActions(),this._renderNavigationBar(),this._renderTables(),this._renderError(),this._renderFooterContent()),this._renderColumnVisibilityPopover(),this._renderPrompt())}_renderTables(){const{grid:e,relatedTables:t}=this,i=this.classes(N.tableContainer);if(t.length){const l=this.classes(N.base,this.allRelatedTablesVisible?N.expanded:N.collapsed,this._shouldShowAttachmentsView?N.tableContainerWithAttachments:void 0);return z("div",{class:i},z("calcite-panel",{overlayPositioning:"fixed"},z("div",null,[this._shouldShowGrid?z("div",{class:l},e?.render(),this._renderPagination()):void 0,...this._filteredTables.map(e=>{const i=t.indexOf(e);return z("div",{class:l,key:`related-${i}`},e.render())}),,])))}return null!=this.attachmentsViewOptions.objectId?z("div",{class:i},z("calcite-panel",{overlayPositioning:"fixed"},z("div",null,[z("div",{class:this.classes(N.base,N.collapsed)},e?.render(),this._renderPagination()),this._renderAttachmentsView()]))):[z("div",{class:i},e?.render()),this._renderPagination()]}_renderPagination(){if(this.paginationEnabled)return z("calcite-pagination",{pageSize:1,startItem:this.pageIndex+1,totalItems:this.pageCount,onCalcitePaginationChange:e=>this.goToPage(e.currentTarget.startItem-1)})}_renderError(){const{messages:e}=this;return z("calcite-alert",{autoClose:!0,autoCloseDuration:"fast",icon:H.exclamationMarkTriangle,kind:"danger",label:e.errorOccured,open:this._hasAttachmentsViewError,slot:"alerts",onCalciteAlertClose:()=>{this.attachmentsViewOptions.error=null}},z("span",{slot:"message"},e.errorOccured))}_renderFooterContent(){if(!this.hasPendingEdits||!this.visibleElements.pendingEditsFooter)return;const{hasInvalidPendingEdits:e,isQueryingOrSyncing:t,messages:i,messagesCommon:l}=this,o=e||t,n=this.hasContingentValues,s=[z("calcite-button",{appearance:"outline",disabled:t,iconStart:H.reset,key:"footer-reset-button",onclick:()=>this.cancelPendingEdits(),slot:"footer-end",width:"auto"},l.reset),z("calcite-button",{disabled:o,iconStart:H.save,key:"footer-save-button",loading:this.isSyncing,onclick:()=>{this.savePendingEdits()},slot:"footer-end",width:"auto"},l.save)];if(n){const t=e?i.contingentValues.hasInvalidValues:i.contingentValues.hasValidValues,l=e?z("calcite-icon",{class:N.footerIconDanger,icon:H.exclamationMarkTriangle,scale:"s",slot:"footer-start"}):void 0;s.push(z("div",{class:N.footerMessage,key:"footer-message",slot:"footer-start"},l,t))}return s}_renderPrompt(){return this.prompt?z(M,{...this.prompt,headingLevel:2}):void 0}_showDeletePrompt(){const{messages:e,messagesCommon:i}=this,l=t(e.deleteSelectionCount,{count:this.highlightIds.length});this.showPrompt({title:l,message:e.deleteRecordsRemoved,context:"danger",actions:{primary:{label:i.delete,action:this._onDeleteSelectionClick},secondary:{label:e.keepRecords,action:()=>this.clearPrompt()}}})}_showDeleteAttachmentPrompt(e,i){const{messages:l,messagesCommon:o}=this,n=t(l.deleteAttachmentCount,{count:i.length});this.showPrompt({title:n,message:l.deleteAttachmentConfirmation,context:"danger",actions:{primary:{label:o.delete,action:async()=>{try{await this.deleteAttachments(e,i,!1)}finally{this.clearPrompt()}}},secondary:{label:o.cancel,action:()=>this.clearPrompt()}}})}async _onDeleteSelectionClick(){try{await this.viewModel.deleteSelection()}finally{this.clearPrompt()}}_renderHeaderMenuAction(e){const{disabled:t,hidden:i,icon:l,text:o,clickFunction:n}=e;if(!i)return z("calcite-action",{disabled:t??this.menuConfig?.disabled,icon:l??void 0,key:o,onclick:()=>n(),slot:"header-menu-actions",text:o,textEnabled:!0,title:o})}_renderHeaderMenuActions(){return this._shouldShowMenu?[this._renderDefaultHeaderMenuActions(),this._renderCustomHeaderMenuActions()]:[]}_renderDefaultHeaderMenuActions(){if(!this._hasDefaultMenuItems)return[];const{messages:e}=this;return[this._showRefreshDataAction&&{icon:H.refresh,text:e.refreshData,clickFunction:()=>this.refresh()},this._showDeleteSelectionAction&&{icon:H.delete,text:e.deleteSelection,clickFunction:()=>this.deleteSelection(!0)},this._showClearSelectionAction&&{icon:H.clearSelection,text:e.clearSelection,clickFunction:()=>this.highlightIds?.removeAll()},this._showZoomToSelectionAction&&{icon:H.zoomToSelection,text:e.zoomToSelection,clickFunction:()=>this.zoomToSelection()},this._showSelectedRecordsShowSelectedAction&&{icon:H.showSelected,text:e.showSelected,clickFunction:()=>{const{objectIds:e}=this;e.removeAll(),e.addMany(this.highlightIds.toArray())}},this._showSelectedRecordsShowAllAction&&{icon:H.showAll,text:e.showAllRecords,clickFunction:()=>this.objectIds.removeAll()},this._showExportSelectionToCSVAction&&{icon:H.exportToCSV,text:e.exportSelectionCSV,clickFunction:()=>this.exportSelectionToCSV()}].filter(i).map(e=>e&&this._renderHeaderMenuAction(e))}_renderCustomHeaderMenuActions(){return this.menuConfig?.items?.map(({disabled:e,hidden:t,icon:i,label:l,clickFunction:o})=>this._renderHeaderMenuAction({hidden:"function"==typeof t?t():t,icon:i,text:l,disabled:e,clickFunction:e=>o(e)}))??[]}_renderColumnVisibilityAction(){if(!this._showColumnsVisibilityAction)return[];const{_columnVisibilityActions:e,effectiveTable:t,id:i}=this,l=this.messages.toggleColumns;return z("calcite-action",{afterCreate:t=>e.set(i,t),afterRemoved:()=>e.delete(i),bind:this,disabled:t.menuConfig?.disabled,icon:H.showColumn,id:`${i}__toggle-columns-action`,slot:"header-actions-end",text:l},this._effectiveVisibleElements.tooltips?z("calcite-tooltip",{closeOnClick:!0,overlayPositioning:"fixed",placement:"bottom-end",slot:"tooltip"},l):null)}_renderColumnVisibilityPopover(){if(!this._showColumnsVisibilityAction||this.effectiveTable.menuConfig?.disabled)return;const{effectiveTable:e}=this,t=this.messages.toggleColumns;return z("calcite-popover",{autoClose:!0,class:N.menuPopover,label:t,overlayPositioning:"fixed",placement:"top-end",pointerDisabled:!0,referenceElement:this._columnVisibilityActions.get(this.id)},z("calcite-list",{displayMode:"nested",filterEnabled:!0,filterPlaceholder:t,label:t,selectionMode:"multiple"},e.columns.toArray().map(t=>{const i=E(t)?t.columns?.map(t=>this._renderColumnListItem({column:t,table:e,ignoreSelect:!0})):void 0;return this._renderColumnListItem({column:t,table:e,items:i})})))}_renderColumnListItem(e){const{column:t,table:i,items:l,ignoreSelect:o}=e,{effectiveLabel:n,fieldName:s,hidden:a}=t;return z("calcite-list-item",{expanded:!(!l?.length||a)||void 0,key:`toggle-columns__item-${s}`,label:n,selected:!a,value:s,onCalciteListItemSelect:e=>{o&&e.stopPropagation(),i.toggleColumnVisibility(e.currentTarget.value)}},l)}_renderLayerDropdown(){const e=this.messages.selectALayer;return z("div",{class:N.layerDropdownMenu,key:`${this.id}-layerDropdown`,slot:"header-actions-start"},z("calcite-dropdown",{bind:this,maxItems:5,overlayPositioning:"fixed",placement:"bottom-start"},z("calcite-action",{icon:H.layers,slot:"trigger",text:e,title:e}),z("calcite-dropdown-group",{selectionMode:"single"},this._effectiveLayers.map((e,t)=>this._renderLayerDropdownItem(e,t))??null)))}_renderLayerDropdownItem(e,t){const i=this.visibleElements.layerDropdownIcons;return z("calcite-dropdown-item",{iconStart:i?P(e):void 0,key:`dropdown-item-${t}`,label:e.title??"",selected:e===this.layer,value:e.id,onCalciteDropdownItemSelect:()=>{this.layer=e}},e.title)}_onRelatedNavigationItemClick(e){this.viewModel.drainRelatedTablesAboveIndex(e)}_collapseRelatedTable(e){this.viewModel.collapseRelatedTable(this.effectiveTable,e)}_onShowRelatedTable(e){this.showRelatedTableCallback||(this._collapseRelatedTable(e),this._createRelatedTable(e))}async _createRelatedTable(e){const{autoRefreshEnabled:t,autoSaveEnabled:i,editingEnabled:l,effectiveTable:o,paginationEnabled:n,pageSize:s,view:a,viewModel:r}=this,{layer:c,objectId:d,relatedLayer:h,relationshipId:m}=e;await c.load();const p=this.attachmentsEnabled&&R(c),u=new $({layer:c,autoRefreshEnabled:t,autoSaveEnabled:i,attachmentsEnabled:p,editingEnabled:l,paginationEnabled:n,pageSize:s,relatedRecordsEnabled:!0,relationshipConfig:{objectId:d,relatedLayer:h,relationshipId:m},relationshipColumnConfigs:k(c,m),tableController:this,tableParent:o,view:a,showRelatedTableCallback:e=>r.emit("show-related-table",e)});this.relatedTables.add(u),this.scheduleRender()}_renderAttachmentsView(){const{attachmentInfos:e,mode:t,objectId:i}=this.attachmentsViewOptions;return"file"!==t&&e.length&&null!=i?this._renderAttachmentsViewList():this._renderAttachmentsViewFilePane()}_renderAttachmentsViewFilePane(){const{attachmentsViewOptions:e,isSyncingAttachments:t,supportsAddAttachments:i,messages:l,messagesUnits:o}=this,{attachmentId:n,attachmentInfos:s,candidates:a,objectId:c}=e,d=s.find(e=>e.id===n),h=s.length,m=a?.length,p=d?z("calcite-label",{alignment:"center",key:"replace-file-node",scale:"l"},l.replaceFile):void 0,u=m?void 0:z("calcite-label",{alignment:"center",key:"message-node",scale:"m"},i?null==c?l.noFeature:l.dragAndDropToUpload:l.editingRestricted),g=Array.from(a??[]).pop(),b=g?z("calcite-label",{key:"filename-node"},g.name):void 0,w=i&&null!=c,v=w&&m,y=z("input",{afterCreate:L,afterRemoved:j,afterUpdate:L,bind:this,"data-node-ref":"_attachmentsInput",files:a,hidden:!0,name:"attachment",onchange:e=>this._onAttachmentsViewCandidateChange(e),type:"file"}),f=w?z("calcite-button",{appearance:"outline-fill",bind:this,disabled:t,iconStart:H.folderOpen,key:"select-node",loading:!1,onclick:()=>{this._attachmentsInput&&(this._attachmentsInput.value="",this._attachmentsInput.click())},width:"full"},l.selectFile):void 0,_=v?z("calcite-button",{appearance:"outline-fill",bind:this,disabled:t,iconStart:H.save,key:"save-node",loading:t,onclick:()=>{this.saveAttachmentsViewForm()},width:"full"},d?l.updateAttachment:l.addAttachment):void 0,M=h||m?z("calcite-button",{appearance:"transparent",bind:this,disabled:t,key:"cancel-node",onclick:()=>{this._attachmentsInput&&(this._attachmentsInput.value=""),e.reset(),e.attachmentInfos?.length&&(e.mode="list")},width:"full"},this.messagesCommon.cancel):void 0;return[z("div",{class:N.attachmentsView,key:"attachments-view"},z("div",{class:N.attachmentsViewContent,key:"attachments-view-content"},z("div",{bind:this,class:N.attachmentsViewDropArea,ondragover:e=>e.preventDefault(),ondrop:this._onAttachmentsViewDrop},z("calcite-icon",{class:N.attachmentsViewIcon,icon:H.upload,scale:"l"}),p,u,z("form",{afterCreate:t=>e.form=t,afterRemoved:()=>e.form=null,bind:this,key:"attachments-form"},z("fieldset",null,b,y,f,_,M)))),null!=c&&null!=d?z("div",{class:N.attachmentsViewInformation,key:"information"},this._renderAttachmentsViewThumbnail(d,200),z("label",{key:"file-label"},l.fileName),z("span",{key:"file-span"},d.name),z("label",{key:"size-label"},l.size),z("span",{key:"size-span"},r(o,d.size??0))):void 0)]}_renderAttachmentsViewList(){const{attachmentsViewOptions:e,isSyncingAttachments:t,messages:i,messagesUnits:l,supportsDeleteAttachments:o,supportsUpdateAttachments:n}=this,{attachmentInfos:s,objectId:a}=e;return z("calcite-list",{afterCreate:L,afterRemoved:j,afterUpdate:L,bind:this,class:N.attachmentsViewList,"data-node-ref":"attachmentsList",key:`attachments-list-${a}`,label:i?.attachments,loading:t,ondragover:e=>e.preventDefault(),ondrop:this._onAttachmentsViewDrop,selectionMode:"multiple",onCalciteListChange:()=>this.scheduleRender()},...s?.map(t=>{const{id:s,name:c,size:d,url:h}=t,m=r(l,d??0);return z("calcite-list-item",{afterRemoved:()=>this.scheduleRender(),key:`attachment-${s}`,label:c,value:s},this._renderAttachmentsViewListThumbnail(t),z("span",{class:N.attachmentsViewListFileSize,slot:"actions-end",title:m},m),z("calcite-action",{icon:H.downloadTo,key:`download-attachment-${s}`,label:`${c}`,onclick:e=>{e.preventDefault(),this.downloadAttachmentById(a??-1,s)},slot:"actions-end",text:i.downloadAttachment,title:i.downloadAttachment}),n&&null!=a?z("calcite-action",{disabled:!n,icon:H.replaceImage,key:`replace-attachment-${s}`,label:`${c}`,onclick:()=>{e.mode="file",e.attachmentId=s},slot:"actions-end",text:i.updateAttachment,title:i.updateAttachment}):void 0,z("calcite-action",{icon:H.launch,key:`launch-attachment-${s}`,label:`${c}`,onclick:()=>{h&&window.open(h,"_blank")},slot:"actions-end",text:i.viewAttachment,title:i.viewAttachment}),o&&null!=a?z("calcite-action",{class:N.attachmentsViewListItemDelete,disabled:!o,icon:H.delete,key:`delete-attachment-${s}`,label:`${c}`,onclick:()=>{this.deleteAttachments(a,[s],!0)},slot:"actions-end",text:i.deleteAttachment,title:i.deleteAttachment}):void 0)}))}_renderAttachmentsViewListThumbnail(e){return z("div",{class:N.attachmentsViewListThumbnail,slot:"content-start"},z("a",{href:e.url??"",rel:"noreferrer",target:"_blank"},this._renderAttachmentsViewThumbnail(e)))}_renderAttachmentsViewThumbnail(e,t=64){const{contentType:i,name:l,size:o,url:n}=e,s=`${n}${n?.includes("?")?"&":"?"}w=${t}&s=${o}`;return this.supportsResizeAttachments&&y(i)?z("img",{alt:l,key:`thumbnail-image-${l}`,src:s,title:l}):z("calcite-icon",{icon:f(i),key:`thumbnail-icon-${l}`,scale:"l",textLabel:l,title:l})}_onAttachmentsViewCandidateChange({target:e}){this.attachmentsViewOptions.candidates=e?.files}_onAttachmentsViewDrop(e){e.preventDefault(),(this.supportsAddAttachments||this.supportsUpdateAttachments)&&this.attachmentsViewOptions.set({mode:"file",candidates:e.dataTransfer?.files})}_renderNavigationBar(){const{effectiveTable:e,messages:i,messagesCommon:l,navigationScale:o,relatedTable:n,relatedTables:s}=this;if(!this._shouldShowNavigationBar)return;const{attachmentsList:a,attachmentsViewOptions:r,layer:c,supportsAddAttachments:d,supportsDeleteAttachments:h}=e;if(!c)return;const{attachmentInfos:m,objectId:p}=r,u=null!=p,g=m.length,b=a?.selectedItems?.length??0,w=`${c.objectIdField}: ${p}`,v=t(i.selectedCount,{count:b}),y=t(i.attachmentsCount,{count:g}),f=u?z("calcite-action",{bind:this,icon:H.chevronRight,iconFlipRtl:!0,key:"navigation-feature",onclick:()=>e.scrollToRow(p),scale:o,text:w,textEnabled:!0,title:w}):void 0,_=u?z("calcite-action",{icon:H.chevronRight,iconFlipRtl:!0,key:"navigation-attachments-label",label:y,onclick:()=>{g>0&&(r.mode="list")},scale:o,text:y,textEnabled:!0,title:y}):void 0,M=u?z("calcite-chip",{closable:!0,closed:0===b,key:"navigation-chip",kind:"inverse",label:v,scale:o,selected:!0,title:v,value:"selected",onCalciteChipClose:()=>a?.selectedItems?.forEach(e=>e.selected=!1)},v):void 0,C=n?z("calcite-label",{layout:"inline",scale:o},i.showAllTables,z("calcite-switch",{checked:this.allRelatedTablesVisible,scale:o,onCalciteSwitchChange:e=>this.showAllRelatedTables=!!e.currentTarget.checked})):void 0,S=u&&"list"===r.mode&&null!=p&&b&&h?z("calcite-action",{icon:H.delete,iconFlipRtl:!0,key:"attachments-trash-all",onclick:()=>{e.deleteAttachments(p,a?.selectedItems?.map(e=>e.value)??[],!0)},scale:o,text:l.delete,textEnabled:!0,title:t(i.deleteAttachmentCount,{count:b})}):void 0,A=u&&"list"===r.mode&&d?z("calcite-action",{bind:this,icon:H.plus,iconFlipRtl:!0,key:"attachments-add",onclick:()=>{r.attachmentId=null,r.mode="file"},scale:o,text:i.addAttachment,textEnabled:!0,title:i.addAttachment}):void 0;return z("div",{class:N.tableNavigation,key:"table-nav"},z("calcite-action",{icon:H.moveUp,iconFlipRtl:!0,key:"go-back",onclick:()=>{n&&this.drainRelatedTables(),e.attachmentsViewOptions.objectId=null},scale:o,text:this.layer?.title??"",textEnabled:!1,title:n?i.exitRelatedRecords:i.exitAttachments}),s.toArray().map((e,t)=>this._renderRelatedTableNavigationAction(e,t)),f,_,z("div",null,M,C,S,A))}_renderRelatedTableNavigationAction(e,t){const i=this._getLabelForRelatedTableNavigationAction(e);return z("calcite-action",{icon:H.chevronRight,iconFlipRtl:!0,key:t,onclick:()=>this._onRelatedNavigationItemClick(t),scale:this.navigationScale,text:i,textEnabled:!0,title:e.layer?.title||""})}_getLabelForRelatedTableNavigationAction(e){const t=e.layer?.title;if(!t)return"";const{relatedTables:i}=this;if(i.length<=1)return t;return i.indexOf(e)!==i.length-1&&t.length>20?`${t.slice(0,20)}...`:t}};e([c()],Z.prototype,"_attachmentsInput",void 0),e([c()],Z.prototype,"_columnVisibilityActions",void 0),e([c()],Z.prototype,"_effectiveDescription",null),e([c()],Z.prototype,"_effectiveLayers",null),e([c()],Z.prototype,"_effectiveTitle",null),e([c()],Z.prototype,"_effectiveVisibleElements",null),e([c()],Z.prototype,"_filteredTables",null),e([c()],Z.prototype,"_hasAttachmentsViewError",null),e([c()],Z.prototype,"_hasCustomMenuItems",null),e([c()],Z.prototype,"_hasDefaultMenuItems",null),e([c()],Z.prototype,"_shouldShowGrid",null),e([c()],Z.prototype,"_shouldShowMenu",null),e([c()],Z.prototype,"_shouldShowAttachmentsView",null),e([c()],Z.prototype,"_showClearSelectionAction",null),e([c()],Z.prototype,"_showColumnsVisibilityAction",null),e([c()],Z.prototype,"_showDeleteSelectionAction",null),e([c()],Z.prototype,"_showExportSelectionToCSVAction",null),e([c()],Z.prototype,"_showLayerDropdown",null),e([c()],Z.prototype,"_shouldShowNavigationBar",null),e([c()],Z.prototype,"_showRefreshDataAction",null),e([c()],Z.prototype,"_showSelectedRecordsShowSelectedAction",null),e([c()],Z.prototype,"_showSelectedRecordsShowAllAction",null),e([c()],Z.prototype,"_showZoomToSelectionAction",null),e([c()],Z.prototype,"_viewLayers",null),e([c()],Z.prototype,"attachmentsList",void 0),e([c({readOnly:!0})],Z.prototype,"grid",null),e([c()],Z.prototype,"actionColumn",null),e([c()],Z.prototype,"actionColumnConfig",null),e([c({readOnly:!0})],Z.prototype,"activeFilters",null),e([c({readOnly:!0})],Z.prototype,"activeSortOrders",null),e([c()],Z.prototype,"allColumns",null),e([c({readOnly:!0})],Z.prototype,"allRelatedTablesVisible",null),e([c()],Z.prototype,"allVisibleColumns",null),e([c()],Z.prototype,"attachmentsColumns",null),e([c()],Z.prototype,"attachmentsEnabled",null),e([c()],Z.prototype,"attachmentsViewOptions",null),e([c({type:b})],Z.prototype,"attributeTableTemplate",null),e([c()],Z.prototype,"autoRefreshEnabled",null),e([c()],Z.prototype,"autoSaveEnabled",null),e([c()],Z.prototype,"clearPrompt",null),e([c()],Z.prototype,"columnPerformanceModeEnabled",null),e([c()],Z.prototype,"columnReorderingEnabled",null),e([c({readOnly:!0})],Z.prototype,"columns",null),e([c()],Z.prototype,"definitionExpression",null),e([c()],Z.prototype,"description",void 0),e([c()],Z.prototype,"disabled",void 0),e([c()],Z.prototype,"editingEnabled",null),e([c()],Z.prototype,"effectiveSize",null),e([c()],Z.prototype,"effectiveTable",null),e([c()],Z.prototype,"fieldColumns",null),e([c({types:h})],Z.prototype,"filterGeometry",null),e([c()],Z.prototype,"filterBySelectionEnabled",null),e([c()],Z.prototype,"groupColumns",null),e([c()],Z.prototype,"hasContingentValues",null),e([c()],Z.prototype,"hasInvalidPendingEdits",null),e([c()],Z.prototype,"hasPendingEdits",null),e([c()],Z.prototype,"hiddenFields",null),e([c()],Z.prototype,"highlightEnabled",null),e([c()],Z.prototype,"highlightIds",null),e([c()],Z.prototype,"icon",null),e([c()],Z.prototype,"initialSize",null),e([c()],Z.prototype,"isQueryingOrSyncing",null),e([c()],Z.prototype,"isSyncing",null),e([c()],Z.prototype,"isSyncingAttachments",null),e([c()],Z.prototype,"label",null),e([c()],Z.prototype,"layer",null),e([c()],Z.prototype,"layers",null),e([c()],Z.prototype,"layerView",null),e([c()],Z.prototype,"maxSize",null),e([c(),F("esri/widgets/FeatureTable/t9n/FeatureTable")],Z.prototype,"messages",null),e([c(),F("esri/t9n/common")],Z.prototype,"messagesCommon",null),e([c(),F("esri/core/t9n/Units")],Z.prototype,"messagesUnits",null),e([c(),F("esri/widgets/support/t9n/uriUtils")],Z.prototype,"messagesURIUtils",null),e([c()],Z.prototype,"menuConfig",null),e([c()],Z.prototype,"multipleSelectionEnabled",null),e([c()],Z.prototype,"multiSortEnabled",null),e([c()],Z.prototype,"multipleSortPriority",null),e([c()],Z.prototype,"navigationScale",void 0),e([c()],Z.prototype,"noDataMessage",null),e([c()],Z.prototype,"objectIds",null),e([c()],Z.prototype,"outFields",null),e([c()],Z.prototype,"pageCount",null),e([c()],Z.prototype,"pageIndex",null),e([c()],Z.prototype,"pageSize",null),e([c()],Z.prototype,"paginationEnabled",null),e([c()],Z.prototype,"prompt",null),e([c()],Z.prototype,"relatedRecordsEnabled",null),e([c()],Z.prototype,"relatedTable",null),e([c()],Z.prototype,"relatedTables",null),e([c()],Z.prototype,"relationship",null),e([c()],Z.prototype,"relationshipColumnConfigs",null),e([c()],Z.prototype,"relationshipColumns",null),e([c()],Z.prototype,"relationshipConfig",null),e([c()],Z.prototype,"relationshipInfos",null),e([c()],Z.prototype,"returnGeometryEnabled",null),e([c()],Z.prototype,"returnMEnabled",null),e([c()],Z.prototype,"returnZEnabled",null),e([c()],Z.prototype,"rowHighlightIds",null),e([c()],Z.prototype,"selectionSource",null),e([c()],Z.prototype,"showAllRelatedTables",null),e([c()],Z.prototype,"showPrompt",null),e([c()],Z.prototype,"showRelatedTableCallback",null),e([c()],Z.prototype,"size",null),e([c({readOnly:!0})],Z.prototype,"state",null),e([c()],Z.prototype,"supportsAddAttachments",null),e([c()],Z.prototype,"supportsAttachments",null),e([c()],Z.prototype,"supportsDeleteAttachments",null),e([c()],Z.prototype,"supportsResizeAttachments",null),e([c()],Z.prototype,"supportsUpdateAttachments",null),e([c()],Z.prototype,"syncTemplateOnChangesEnabled",null),e([c({constructOnly:!0})],Z.prototype,"tableController",null),e([c({constructOnly:!0})],Z.prototype,"tableParent",null),e([c({type:T})],Z.prototype,"tableTemplate",null),e([c()],Z.prototype,"tableTemplateOverride",null),e([c()],Z.prototype,"title",void 0),e([c({type:w})],Z.prototype,"timeExtent",null),e([c()],Z.prototype,"timeZone",null),e([c()],Z.prototype,"view",null),e([c({type:S}),O(["cell-click","cell-dblclick","cell-pointerover","cell-pointerout","cell-keydown","column-reorder","show-related-table"])],Z.prototype,"viewModel",void 0),e([c()],Z.prototype,"visibleColumns",null),e([c({type:A,nonNullable:!0})],Z.prototype,"visibleElements",void 0),e([c({type:A})],Z.prototype,"visibleElementsOverride",null),Z=$=e([d("esri.widgets.FeatureTable")],Z);const G=Z;export{G as default};
5
+ import{__decorate as e}from"tslib";import{substitute as t}from"../intl.js";import{isSome as i}from"../core/arrayUtils.js";import{watch as n,on as s,sync as l,initial as o}from"../core/reactiveUtils.js";import{renderingSanitizer as a}from"../core/sanitizerUtils.js";import{formatFileSize as r}from"../core/unitFormatUtils.js";import{property as c,subclass as d}from"../core/accessorSupport/decorators.js";import{geometryTypes as h}from"../geometry/support/typeUtils.js";import{isLayerFromCatalog as m}from"../layers/catalog/catalogUtils.js";import{isKnowledgeGraphLayer as p,isMapImageLayer as u,isSubtypeGroupLayer as g}from"../layers/support/layerUtils.js";import w from"../tables/AttributeTableTemplate.js";import b from"../time/TimeExtent.js";import v from"./Widget.js";import{isSupportedImage as y,getCalciteIconForAttachment as f}from"./Attachments/support/attachmentUtils.js";import{loadPromptComponents as _,Prompt as M}from"./Editor/components/Prompt.js";import C from"./FeatureTable/ColumnMenuVisibleElements.js";import A from"./FeatureTable/FeatureTableViewModel.js";import S from"./FeatureTable/VisibleElements.js";import{isGroupColumn as V}from"./FeatureTable/support/columnUtils.js";import T from"./FeatureTable/support/TableTemplate.js";import{loadFieldColumnComponents as E,isIFeatureTableSupportedLayer as I,isIFeatureTableSupportedLayerWithAttachments as D,getRelationshipIdsToShow as k}from"./FeatureTable/support/tableUtils.js";import{loadCalciteComponents as R}from"./support/componentsUtils.js";import{globalCss as x}from"./support/globalCss.js";import{getIconForLayer as P}from"./support/iconUtils.js";import{messageBundle as F,vmEvent as O,tsx as L,tsxFragment as z}from"./support/widget.js";import{storeNode as j,discardNode as $}from"./support/widgetUtils.js";var U;const N="esri-feature-table",B=`${N}__dialog`,H=`${N}__attachments-view`,Z={base:N,content:`${N}__content`,menuPopover:`${N}__menu-popover`,layerDropdownMenu:`${N}__layer-switcher-menu`,tableContainer:`${N}__table-container`,tableContainerWithAttachments:`${N}__table-container--attachments`,tableNavigation:`${N}__table-navigation`,attachmentsView:H,attachmentsViewContent:`${H}__content`,attachmentsViewDetails:`${H}__details`,attachmentsViewDropArea:`${H}__drop-area`,attachmentsViewDropAreaLabel:`${H}__drop-area__label`,attachmentsViewDropAreaMessage:`${H}__drop-area__message`,attachmentsViewIcon:`${H}__icon`,attachmentsViewInformation:`${H}__information`,attachmentsViewInformationData:`${H}__information__data`,attachmentsViewInformationLabel:`${H}__information__label`,attachmentsViewList:`${H}__list`,attachmentsViewListFileSize:`${H}__list__filesize`,attachmentsViewListThumbnail:`${H}__list__thumbnail`,expanded:`${N}__expanded`,collapsed:`${N}__collapsed`,dialog:`${B}`,dialogContent:`${B}__content`,dialogHeader:`${B}__header`,footerMessage:`${N}__footer__message`,footerIconDanger:`${N}__footer__icon--danger`},G={chevronRight:"chevron-right",clearSelection:"clear-selection",downloadTo:"download-to",exclamationMarkTriangle:"exclamation-mark-triangle",expand:"expand",exportToCSV:"file-csv",folderOpen:"folder-open",delete:"trash",layers:"layers",moveUp:"move-up",plus:"plus",refresh:"refresh",reset:"reset",save:"save",showAll:"selection-x",showColumn:"show-column",showSelected:"selection-filter",table:"table",upload:"upload",zoomToSelection:"zoom-to-object"};let W=U=class extends v{constructor(e,t){super(e,t),this._attachmentsInput=null,this._columnVisibilityActions=new Map,this.attachmentsList=null,this.description=null,this.disabled=!1,this.navigationScale="m",this.title=null,this.viewModel=new A,this.visibleElements=new S,this._showDeletePrompt=this._showDeletePrompt.bind(this),this._onDeleteSelectionClick=this._onDeleteSelectionClick.bind(this)}initialize(){this.addHandles([n(()=>[this.isQueryingOrSyncing,this.editingEnabled],()=>this.scheduleRender()),n(()=>[this._effectiveVisibleElements,this._effectiveVisibleElements.columnDescriptions,this._effectiveVisibleElements.columnMenus,this._effectiveVisibleElements.columnMenuItems,this.columns.length],()=>{this.columns.forEach(e=>e.visibleElements=this._effectiveVisibleElements),this.refreshCellContent()},l),n(()=>this._effectiveVisibleElements.selectionColumn,e=>{this.grid&&(this.grid.selectionColumnEnabled=e)},o),s(()=>this.viewModel,"show-related-table",e=>this._onShowRelatedTable(e)),n(()=>this.editingEnabled,()=>{const{attachmentsViewOptions:e}=this;this.clearPrompt(),e&&(e.form?.reset(),e.candidates=null)})])}loadDependencies(){return Promise.all([R({action:()=>import("@esri/calcite-components/dist/components/calcite-action"),alert:()=>import("@esri/calcite-components/dist/components/calcite-alert"),button:()=>import("@esri/calcite-components/dist/components/calcite-button"),chip:()=>import("@esri/calcite-components/dist/components/calcite-chip"),dialog:()=>import("@esri/calcite-components/dist/components/calcite-dialog"),dropdown:()=>import("@esri/calcite-components/dist/components/calcite-dropdown"),"dropdown-group":()=>import("@esri/calcite-components/dist/components/calcite-dropdown-group"),"dropdown-item":()=>import("@esri/calcite-components/dist/components/calcite-dropdown-item"),icon:()=>import("@esri/calcite-components/dist/components/calcite-icon"),label:()=>import("@esri/calcite-components/dist/components/calcite-label"),list:()=>import("@esri/calcite-components/dist/components/calcite-list"),"list-item":()=>import("@esri/calcite-components/dist/components/calcite-list-item"),pagination:()=>import("@esri/calcite-components/dist/components/calcite-pagination"),panel:()=>import("@esri/calcite-components/dist/components/calcite-panel"),popover:()=>import("@esri/calcite-components/dist/components/calcite-popover"),progress:()=>import("@esri/calcite-components/dist/components/calcite-progress"),switch:()=>import("@esri/calcite-components/dist/components/calcite-switch"),tooltip:()=>import("@esri/calcite-components/dist/components/calcite-tooltip")}),_(),E()])}destroy(){this.drainRelatedTables(),this.clearPrompt()}get _attachmentsViewFileCancelNode(){const{hasAttachments:e,hasCandidates:t}=this.attachmentsViewOptions;if(e||t)return L("calcite-button",{appearance:"transparent",bind:this,disabled:this.isSyncingAttachments,key:"cancel-node",onclick:()=>{this._resetAttachmentsInput(),this.attachmentsViewOptions.cancel()}},this.messagesCommon.cancel)}get _attachmentsViewFileLabelNode(){if("replace"===this.attachmentsViewOptions.fileMode)return L("span",{class:Z.attachmentsViewDropAreaLabel,key:"replace-file-node"},this.messages.replaceFile)}get _attachmentsViewFileMessageNode(){const e=this.attachmentsViewOptions;if(e.hasCandidates)return;const{messages:t}=this,i=this.supportsAddAttachments?null==e.objectId?t.noFeature:t.dragAndDropToUpload:t.editingRestricted;return L("span",{class:Z.attachmentsViewDropAreaMessage,key:"message-node"},i)}get _attachmentsViewFileNameNode(){const e=this.attachmentsViewOptions.candidates,t=Array.from(e??[]).at(-1);if(t)return L("span",{class:Z.attachmentsViewDropAreaMessage,key:"filename-node"},t.name)}get _attachmentsViewFileSaveNode(){const{isSyncingAttachments:e,messages:t}=this,{attachmentInfo:i,hasCandidates:n}=this.attachmentsViewOptions;if(this.supportsAddAttachments&&n)return L("calcite-button",{appearance:"solid",disabled:e,iconStart:G.save,key:"save-node",loading:e,onclick:()=>{this.saveAttachmentsViewForm()}},i?t.updateAttachment:t.addAttachment)}get _attachmentsViewFileSelectNode(){if(this.supportsAddAttachments)return L("calcite-button",{appearance:"outline-fill",disabled:this.isSyncingAttachments,iconStart:G.folderOpen,key:"select-node",loading:!1,onclick:()=>{this._resetAttachmentsInput(),this._attachmentsInput?.click()}},this.messages.selectFile)}get _dialogIsOpen(){return!!this.attachmentsViewOptions.dialogInfo}get _effectiveDescription(){const{description:e}=this;return null!=e?a.sanitize("function"==typeof e?e():e):void 0}get _effectiveLayers(){const{layer:e,layers:t}=this,i=t?.length?t.filter(I):[],n=i.length?i:[...this._viewLayers];return e&&!n.includes(e)&&n.push(e),n}get _effectiveTitle(){const{layer:e,messages:i,state:n,highlightIds:s,title:l,size:o}=this;if(l)return a.sanitize("function"==typeof l?l():l);if(!e)return i.noLayer;switch(n){case"disabled":return i.errorLayer;case"ready":case"loading":return i.loading;case"error":return i.errorData}return t(i.header,{title:a.sanitize(e.title),count:o,selected:s.length})}get _effectiveVisibleElements(){return this.visibleElementsOverride??this.visibleElements}get _filteredTables(){const e=this.relatedTables.toArray(),t=1===e.length;return this.allRelatedTablesVisible?e:t?[e[0]]:this._shouldShowAttachmentsView?e.slice(-1):e.slice(-2)}get _hasAttachmentsViewError(){return null!=this.attachmentsViewOptions.error}get _hasCustomMenuItems(){return!!this.menuConfig?.items?.length}get _hasDefaultMenuItems(){return!!(this._showClearSelectionAction||this._showDeleteSelectionAction||this._showExportSelectionToCSVAction||this._showRefreshDataAction||this._showZoomToSelectionAction||this._showSelectedRecordsShowSelectedAction||this._showSelectedRecordsShowAllAction||this._showColumnsVisibilityAction)}get _shouldShowGrid(){return this.allRelatedTablesVisible||1===this.relatedTables.length&&!this._shouldShowAttachmentsView}get _shouldShowMenu(){const{header:e,menu:t}=this._effectiveVisibleElements;return!(!e||!t||!this._hasDefaultMenuItems&&!this._hasCustomMenuItems)}get _shouldShowAttachmentsView(){return!(null==this.attachmentsViewOptions.objectId&&!this.relatedTables.some(e=>null!=e.attachmentsViewOptions.objectId))}get _showClearSelectionAction(){return!(!this.highlightIds.length||!this._effectiveVisibleElements.menuItems?.clearSelection||this.relatedTables.length||this._shouldShowAttachmentsView)}get _showColumnsVisibilityAction(){const{header:e,menu:t,menuItems:i}=this._effectiveVisibleElements;return!(!(e&&t&&i?.toggleColumns)||this.showRelatedTableCallback||this.allRelatedTablesVisible||this._shouldShowAttachmentsView)}get _showDeleteSelectionAction(){return!(!(this.editingEnabled&&this.highlightIds.length&&this._effectiveVisibleElements.menuItems?.deleteSelection&&this.layer?.capabilities?.operations?.supportsDelete)||this.relatedTables.length||this._shouldShowAttachmentsView)}get _showExportSelectionToCSVAction(){return!(!(this._effectiveVisibleElements.menuItems.exportSelectionToCSV&&this.layer&&this.highlightIds.length)||this.relatedTables.length)}get _showLayerDropdown(){return!(!this._effectiveLayers.length||!this._effectiveVisibleElements.layerDropdown)}get _shouldShowNavigationBar(){const e=!!this.relatedTable||this._shouldShowAttachmentsView;return!this.tableParent&&e}get _showRefreshDataAction(){return!!this._effectiveVisibleElements.menuItems?.refreshData}get _showSelectedRecordsShowSelectedAction(){const e=this.objectIds.length,t=this.highlightIds.length;return!(!t||!this._effectiveVisibleElements.menuItems?.selectedRecordsShowSelectedToggle||e&&t===e||this.relatedTables.length||this._shouldShowAttachmentsView)}get _showSelectedRecordsShowAllAction(){return!(!this._effectiveVisibleElements.menuItems?.selectedRecordsShowAllToggle||!this.objectIds.length||this.relatedTables.length)}get _showZoomToSelectionAction(){return!(!this.view||!this.highlightIds.length||this.effectiveTable.layer?.isTable||!this._effectiveVisibleElements.menuItems?.zoomToSelection)}get _viewLayers(){const e=this.view?.map;if(!e)return[];const t=new Set,i=e=>{!I(e)||g(e)||t.has(e)||"sublayer"===e.type&&!e.capabilities?.operations?.supportsQuery||(e.load(),t.add(e))},n=e=>{m(e)||"catalog-footprint"===e.type||(p(e)?(e.load(),e.layers?.forEach(i),e.tables?.forEach(i)):u(e)?(e.loadAll(),e.allSublayers?.forEach(i),e.subtables?.forEach(i)):g(e)?(e.loadAll(),e.sublayers?.forEach(i)):i(e))};return e.allLayers.forEach(n),e.allTables.forEach(n),[...t.values()]}get grid(){return this.viewModel.grid}get actionColumn(){return this.viewModel.actionColumn}get actionColumnConfig(){return this.viewModel.actionColumnConfig}set actionColumnConfig(e){this.viewModel.actionColumnConfig=e}get activeFilters(){return this.viewModel.activeFilters}get activeSortOrders(){return this.viewModel.activeSortOrders}get allColumns(){return this.viewModel.allColumns}get allRelatedTablesVisible(){return this.viewModel.allRelatedTablesVisible}get allVisibleColumns(){return this.viewModel.allVisibleColumns}get attachmentsColumns(){return this.viewModel.attachmentsColumns}get attachmentsEnabled(){return this.viewModel.attachmentsEnabled}set attachmentsEnabled(e){this.viewModel.attachmentsEnabled=e}get attachmentsViewOptions(){return this.viewModel.attachmentsViewOptions}set attachmentsViewOptions(e){this.viewModel.attachmentsViewOptions=e}get attributeTableTemplate(){return this.viewModel.attributeTableTemplate}set attributeTableTemplate(e){this.viewModel.attributeTableTemplate=e}get autoRefreshEnabled(){return this.viewModel.autoRefreshEnabled}set autoRefreshEnabled(e){this.viewModel.autoRefreshEnabled=e}get autoSaveEnabled(){return this.viewModel.autoSaveEnabled}set autoSaveEnabled(e){this.viewModel.autoSaveEnabled=e}get clearPrompt(){return this.viewModel.clearPrompt}set clearPrompt(e){this.viewModel.clearPrompt=e}get columnPerformanceModeEnabled(){return this.viewModel.columnPerformanceModeEnabled}set columnPerformanceModeEnabled(e){this.viewModel.columnPerformanceModeEnabled=e}get columnReorderingEnabled(){return this.viewModel.columnReorderingEnabled}set columnReorderingEnabled(e){this.viewModel.columnReorderingEnabled=e}get columns(){return this.viewModel.columns}get definitionExpression(){return this.viewModel.definitionExpression}set definitionExpression(e){this.viewModel.definitionExpression=e}get container(){return super.container}set container(e){super.container=e}get editingEnabled(){return this.viewModel.editingEnabled}set editingEnabled(e){this.viewModel.editingEnabled=e}get effectiveSize(){return this.viewModel.effectiveSize}get effectiveTable(){return this.relatedTable||this}get fieldColumns(){return this.viewModel.fieldColumns}get filterGeometry(){return this.viewModel.filterGeometry}set filterGeometry(e){this.viewModel.filterGeometry=e}get filterBySelectionEnabled(){return this.viewModel.filterBySelectionEnabled}set filterBySelectionEnabled(e){this.viewModel.filterBySelectionEnabled=e}get groupColumns(){return this.viewModel.groupColumns}get hasContingentValues(){return this.viewModel.hasContingentValues}get hasInvalidPendingEdits(){return this.viewModel.hasInvalidPendingEdits}get hasPendingEdits(){return this.viewModel.hasPendingEdits}get hiddenFields(){return this.viewModel.hiddenFields}set hiddenFields(e){this.viewModel.hiddenFields=e}get highlightEnabled(){return this.viewModel.highlightEnabled}set highlightEnabled(e){this.viewModel.highlightEnabled=e}get highlightIds(){return this.viewModel.highlightIds}set highlightIds(e){this.viewModel.highlightIds=e}get icon(){return G.table}set icon(e){this._overrideIfSome("icon",e)}get initialSize(){return this.viewModel.initialSize}set initialSize(e){this.viewModel.initialSize=e}get isQueryingOrSyncing(){return this.viewModel.isQueryingOrSyncing}get isSyncing(){return this.viewModel.isSyncing}get isSyncingAttachments(){return this.viewModel.isSyncingAttachments}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get layer(){return this.viewModel.layer}set layer(e){this.viewModel.layer=e}get layers(){return this.viewModel.layers}set layers(e){this.viewModel.layers=e}get layerView(){return this.viewModel.layerView}get maxSize(){return this.viewModel.maxSize}set maxSize(e){this.viewModel.maxSize=e}get messages(){return this.viewModel.messages}set messages(e){this.viewModel.messages=e}get messagesCommon(){return this.viewModel.messagesCommon}set messagesCommon(e){this.viewModel.messagesCommon=e}get messagesUnits(){return this.viewModel.messagesUnits}set messagesUnits(e){this.viewModel.messagesUnits=e}get messagesURIUtils(){return this.viewModel.messagesURIUtils}set messagesURIUtils(e){this.viewModel.messagesURIUtils=e}get menuConfig(){return this.viewModel.menuConfig}set menuConfig(e){this.viewModel.menuConfig=e}get multipleSelectionEnabled(){return this.viewModel.multipleSelectionEnabled}set multipleSelectionEnabled(e){this.viewModel.multipleSelectionEnabled=e}get multiSortEnabled(){return this.viewModel.multiSortEnabled}set multiSortEnabled(e){this.viewModel.multiSortEnabled=e}get multipleSortPriority(){return this.viewModel.multipleSortPriority}set multipleSortPriority(e){this.viewModel.multipleSortPriority=e}get noDataMessage(){return this.viewModel.noDataMessage}set noDataMessage(e){this.viewModel.noDataMessage=e}get objectIds(){return this.viewModel.objectIds}set objectIds(e){this.viewModel.objectIds=e}get outFields(){return this.viewModel.outFields}set outFields(e){this.viewModel.outFields=e}get pageCount(){return this.viewModel.pageCount}get pageIndex(){return this.viewModel.pageIndex}set pageIndex(e){this.viewModel.pageIndex=e}get pageSize(){return this.viewModel.pageSize}set pageSize(e){this.viewModel.pageSize=e}get paginationEnabled(){return this.viewModel.paginationEnabled}set paginationEnabled(e){this.viewModel.paginationEnabled=e}get prompt(){return this.viewModel.prompt}set prompt(e){this.viewModel.prompt=e}get relatedRecordsEnabled(){return this.viewModel.relatedRecordsEnabled}set relatedRecordsEnabled(e){this.viewModel.relatedRecordsEnabled=e}get relatedTable(){return this.viewModel.relatedTable}get relatedTables(){return this.viewModel.relatedTables}set relatedTables(e){this.viewModel.relatedTables=e}get relationship(){return this.viewModel.relationship}get relationshipColumnConfigs(){return this.viewModel.relationshipColumnConfigs}set relationshipColumnConfigs(e){this.viewModel.relationshipColumnConfigs=e}get relationshipColumns(){return this.viewModel.relationshipColumns}get relationshipConfig(){return this.viewModel.relationshipConfig}set relationshipConfig(e){this.viewModel.relationshipConfig=e}get relationshipInfos(){return this.viewModel.relationshipInfos}get returnGeometryEnabled(){return this.viewModel.returnGeometryEnabled}set returnGeometryEnabled(e){this.viewModel.returnGeometryEnabled=e}get returnMEnabled(){return this.viewModel.returnMEnabled}set returnMEnabled(e){this.viewModel.returnMEnabled=e}get returnZEnabled(){return this.viewModel.returnZEnabled}set returnZEnabled(e){this.viewModel.returnZEnabled=e}get rowHighlightIds(){return this.viewModel.rowHighlightIds}set rowHighlightIds(e){this.viewModel.rowHighlightIds=e}get selectionSource(){return this.viewModel.selectionSource}set selectionSource(e){this.viewModel.selectionSource=e}get showAllRelatedTables(){return this.viewModel.showAllRelatedTables}set showAllRelatedTables(e){this.viewModel.showAllRelatedTables=e}get showPrompt(){return this.viewModel.showPrompt}set showPrompt(e){this.viewModel.showPrompt=e}get showRelatedTableCallback(){return this.viewModel.showRelatedTableCallback}set showRelatedTableCallback(e){this.viewModel.showRelatedTableCallback=e}get size(){return this.viewModel.size}get state(){return this.viewModel.state}get supportsAddAttachments(){return this.viewModel.supportsAddAttachments}get supportsAttachments(){return this.viewModel.supportsAttachments}get supportsDeleteAttachments(){return this.viewModel.supportsDeleteAttachments}get supportsResizeAttachments(){return this.viewModel.supportsResizeAttachments}get supportsUpdateAttachments(){return this.viewModel.supportsUpdateAttachments}get syncTemplateOnChangesEnabled(){return this.viewModel.syncTemplateOnChangesEnabled}set syncTemplateOnChangesEnabled(e){this.viewModel.syncTemplateOnChangesEnabled=e}get tableController(){return this.viewModel.tableController}set tableController(e){this.viewModel.tableController=e}get tableParent(){return this.viewModel.tableParent}set tableParent(e){this.viewModel.tableParent=e}get tableTemplate(){return this.viewModel.tableTemplate}set tableTemplate(e){this.viewModel.tableTemplate=e}get tableTemplateOverride(){return this.viewModel.tableTemplateOverride}set tableTemplateOverride(e){this.viewModel.tableTemplateOverride=e}get timeExtent(){return this.viewModel.timeExtent}set timeExtent(e){this.viewModel.timeExtent=e}get timeZone(){return this.viewModel.timeZone}set timeZone(e){this.viewModel.timeZone=e}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}get visibleColumns(){return this.viewModel.visibleColumns}get visibleElementsOverride(){const{attachmentsViewOptions:e,relatedTable:t,tableController:i,visibleElements:n}=this,{columnDescriptions:s,columnMenus:l,tooltips:o}=n,a=null!=e.objectId;if(t)return new S({columnDescriptions:s,columnMenus:l,tooltips:o,close:n.close,header:n.header,layerDropdown:n.layerDropdown,layerDropdownIcons:n.layerDropdownIcons,menu:n.menu,menuItems:n.menuItems,progress:n.progress,selectionColumn:!1,columnMenuItems:new C({sortAscending:!1,sortDescending:!1})});if(i){const e=i.relatedTable===this,t=i.allRelatedTablesVisible,r=e&&n.selectionColumn&&!t&&!a,c=e&&!t&&!a;return new S({columnDescriptions:s,columnMenus:l,tooltips:o,selectionColumn:r,close:!1,header:!1,layerDropdown:!1,menu:!1,progress:!1,columnMenuItems:new C({sortAscending:c,sortDescending:c})})}return a?new S({columnDescriptions:s,columnMenus:l,tooltips:o,close:n.close,header:n.header,layerDropdown:n.layerDropdown,layerDropdownIcons:n.layerDropdownIcons,menu:n.menu,menuItems:n.menuItems,progress:n.progress,selectionColumn:!1,columnMenuItems:new C({sortAscending:!1,sortDescending:!1})}):null}cancelPendingEdits(){this.viewModel.cancelPendingEdits()}clearSelectionFilter(){this.viewModel.clearSelectionFilter()}async deleteAttachments(e,t,i){null!=e&&t?.length&&(i?this._showDeleteAttachmentPrompt(e,t):await this.viewModel.deleteAttachments(e,t))}deleteSelection(e){return this.highlightIds.length?e?(this._showDeletePrompt(),this.scheduleRender(),Promise.resolve()):this.viewModel.deleteSelection():Promise.resolve()}async downloadAttachmentById(e,t){return this.viewModel.downloadAttachmentById(e,t)}drainRelatedTables(){this.viewModel.drainRelatedTables()}exportSelectionToCSV(e){return this.viewModel.exportSelectionToCSV(e)}filterBySelection(){this.viewModel.filterBySelection()}findColumn(e){return this.viewModel.findColumn(e)}goToPage(e){this.viewModel.goToPage(e)}hideColumn(e){this.grid?.hideColumn(e)}nextPage(){this.viewModel.nextPage()}previousPage(){this.viewModel.previousPage()}async refresh(){await this.viewModel.refresh()}refreshCellContent(){this.viewModel.refreshCellContent()}async saveAttachmentsViewForm(){await this.viewModel.saveAttachmentsViewForm()}async savePendingEdits(){await this.viewModel.savePendingEdits()}showAllColumns(){this.viewModel.showAllColumns()}showColumn(e){this.grid?.showColumn(e)}sortColumn(e,t){this.viewModel.sortColumn(e,t)}scrollLeft(){this.viewModel.scrollLeft()}scrollToBottom(){this.viewModel.scrollToBottom()}scrollToIndex(e){this.viewModel.scrollToIndex(e)}scrollToRow(e){this.viewModel.scrollToRow(e)}scrollToTop(){this.viewModel.scrollToTop()}toggleColumnVisibility(e){this.viewModel.toggleColumnVisibility(e)}zoomToSelection(){this.effectiveTable.viewModel.zoomToSelection()}render(){const{_effectiveVisibleElements:e,isQueryingOrSyncing:t,menuConfig:i,state:n}=this;return L("div",{bind:this,class:this.classes(Z.base,x.widget)},L("calcite-panel",{bind:this,class:Z.content,closable:e.close,description:this._effectiveDescription,disabled:this.disabled||"disabled"===n&&!this._effectiveLayers?.length,heading:e.header?this._effectiveTitle:void 0,key:"table-content",loading:"loading"===n,menuOpen:!!i?.open,overlayPositioning:"fixed",onCalcitePanelClose:e=>{e.currentTarget.closed=!1,this.emit("close")}},e.progress?L("calcite-progress",{type:t?"indeterminate":"determinate"}):null,this._showLayerDropdown?this._renderLayerDropdown():null,this._renderColumnVisibilityAction(),this._renderHeaderMenuActions(),this._renderNavigationBar(),this._renderTables(),this._renderError(),this._renderFooterContent()),this._renderColumnVisibilityPopover(),this._renderPrompt(),this._renderDialog())}_renderTables(){const{grid:e,relatedTables:t}=this,i=this.classes(Z.tableContainer);if(t.length){const n=this.classes(Z.base,this.allRelatedTablesVisible?Z.expanded:Z.collapsed,this._shouldShowAttachmentsView?Z.tableContainerWithAttachments:void 0);return L("div",{class:i},L("calcite-panel",{overlayPositioning:"fixed"},L("div",null,[this._shouldShowGrid?L("div",{class:n},e?.render(),this._renderPagination()):void 0,...this._filteredTables.map(e=>{const i=t.indexOf(e);return L("div",{class:n,key:`related-${i}`},e.render())}),,])))}return null!=this.attachmentsViewOptions.objectId?L("div",{class:i},L("calcite-panel",{overlayPositioning:"fixed"},L("div",null,[L("div",{class:this.classes(Z.base,Z.collapsed)},e?.render(),this._renderPagination()),this._renderAttachmentsView()]))):[L("div",{class:i},e?.render()),this._renderPagination()]}_renderPagination(){if(this.paginationEnabled)return L("calcite-pagination",{pageSize:1,startItem:this.pageIndex+1,totalItems:this.pageCount,onCalcitePaginationChange:e=>this.goToPage(e.currentTarget.startItem-1)})}_renderError(){const{messages:e}=this;return L("calcite-alert",{autoClose:!0,autoCloseDuration:"fast",icon:G.exclamationMarkTriangle,kind:"danger",label:e.errorOccured,open:this._hasAttachmentsViewError,slot:"alerts",onCalciteAlertClose:()=>{this.attachmentsViewOptions.error=null}},L("span",{slot:"message"},e.errorOccured))}_renderFooterContent(){if(!this.hasPendingEdits||!this.visibleElements.pendingEditsFooter)return;const{hasInvalidPendingEdits:e,isQueryingOrSyncing:t,messages:i,messagesCommon:n}=this,s=e||t,l=this.hasContingentValues,o=[L("calcite-button",{appearance:"outline",disabled:t,iconStart:G.reset,key:"footer-reset-button",onclick:()=>this.cancelPendingEdits(),slot:"footer-end",width:"auto"},n.reset),L("calcite-button",{disabled:s,iconStart:G.save,key:"footer-save-button",loading:this.isSyncing,onclick:()=>{this.savePendingEdits()},slot:"footer-end",width:"auto"},n.save)];if(l){const t=e?i.contingentValues.hasInvalidValues:i.contingentValues.hasValidValues,n=e?L("calcite-icon",{class:Z.footerIconDanger,icon:G.exclamationMarkTriangle,scale:"s",slot:"footer-start"}):void 0;o.push(L("div",{class:Z.footerMessage,key:"footer-message",slot:"footer-start"},n,t))}return o}_renderPrompt(){return this.prompt?L(M,{...this.prompt,headingLevel:2}):void 0}_showDeletePrompt(){const{messages:e,messagesCommon:i}=this,n=t(e.deleteSelectionCount,{count:this.highlightIds.length});this.showPrompt({title:n,message:e.deleteRecordsRemoved,context:"danger",actions:{primary:{label:i.delete,action:this._onDeleteSelectionClick},secondary:{label:e.keepRecords,action:()=>this.clearPrompt()}}})}_showDeleteAttachmentPrompt(e,i){const{messages:n,messagesCommon:s}=this,l=t(n.deleteAttachmentCount,{count:i.length});this.showPrompt({title:l,message:n.deleteAttachmentConfirmation,context:"danger",actions:{primary:{label:s.delete,action:async()=>{try{await this.deleteAttachments(e,i,!1)}finally{this.clearPrompt()}}},secondary:{label:s.cancel,action:()=>this.clearPrompt()}}})}async _onDeleteSelectionClick(){try{await this.viewModel.deleteSelection()}finally{this.clearPrompt()}}_renderDialog(){const{attachmentsViewOptions:e,messages:t}=this,{objectId:i}=e;return L("calcite-dialog",{class:Z.dialog,description:this.viewModel.getFeatureTitleSync(i),heading:t.attachments,modal:!0,open:this._dialogIsOpen,width:"l",onCalciteDialogClose:()=>this._onDialogClose()},this._renderDialogContent())}_renderDialogContent(){const e=this.attachmentsViewOptions.dialogInfo;if(e)return this._renderAttachmentDialogContent(e)}_renderAttachmentDialogContent(e){const{attachmentsViewOptions:t,messages:i}=this,{attachmentInfos:n}=t,s=n.indexOf(e);return L(z,null,L("div",{class:Z.dialogHeader,key:"header",slot:"content-top"},L("span",null,e.name),L("calcite-button",{appearance:"outline",onclick:()=>{t.attachmentId=e.id,t.dialogId=null}},i.viewDetails)),L("div",{class:Z.dialogContent,key:"content"},this._renderAttachmentsViewDetailsImage(e,!0)),L("calcite-pagination",{pageSize:1,slot:"content-bottom",startItem:s+1,totalItems:n.length,onCalcitePaginationChange:e=>{const i=e.currentTarget.startItem-1,s=n[i]?.id;t.dialogId=s}}))}_onDialogClose(){const e=this.attachmentsViewOptions;null!=e.dialogId&&(e.dialogId=null)}_renderHeaderMenuAction(e){const{disabled:t,hidden:i,icon:n,text:s,clickFunction:l}=e;if(!i)return L("calcite-action",{disabled:t??this.menuConfig?.disabled,icon:n??void 0,key:s,onclick:()=>l(),slot:"header-menu-actions",text:s,textEnabled:!0,title:s})}_renderHeaderMenuActions(){return this._shouldShowMenu?[this._renderDefaultHeaderMenuActions(),this._renderCustomHeaderMenuActions()]:[]}_renderDefaultHeaderMenuActions(){if(!this._hasDefaultMenuItems)return[];const{messages:e}=this;return[this._showRefreshDataAction&&{icon:G.refresh,text:e.refreshData,clickFunction:()=>this.refresh()},this._showDeleteSelectionAction&&{icon:G.delete,text:e.deleteSelection,clickFunction:()=>this.deleteSelection(!0)},this._showClearSelectionAction&&{icon:G.clearSelection,text:e.clearSelection,clickFunction:()=>this.highlightIds?.removeAll()},this._showZoomToSelectionAction&&{icon:G.zoomToSelection,text:e.zoomToSelection,clickFunction:()=>this.zoomToSelection()},this._showSelectedRecordsShowSelectedAction&&{icon:G.showSelected,text:e.showSelected,clickFunction:()=>{const{objectIds:e}=this;e.removeAll(),e.addMany(this.highlightIds.toArray())}},this._showSelectedRecordsShowAllAction&&{icon:G.showAll,text:e.showAllRecords,clickFunction:()=>this.objectIds.removeAll()},this._showExportSelectionToCSVAction&&{icon:G.exportToCSV,text:e.exportSelectionCSV,clickFunction:()=>this.exportSelectionToCSV()}].filter(i).map(e=>e&&this._renderHeaderMenuAction(e))}_renderCustomHeaderMenuActions(){return this.menuConfig?.items?.map(({disabled:e,hidden:t,icon:i,label:n,clickFunction:s})=>this._renderHeaderMenuAction({hidden:"function"==typeof t?t():t,icon:i,text:n,disabled:e,clickFunction:e=>s(e)}))??[]}_renderColumnVisibilityAction(){if(!this._showColumnsVisibilityAction)return[];const{_columnVisibilityActions:e,effectiveTable:t,id:i}=this,n=this.messages.toggleColumns;return L("calcite-action",{afterCreate:t=>e.set(i,t),afterRemoved:()=>e.delete(i),bind:this,disabled:t.menuConfig?.disabled,icon:G.showColumn,id:`${i}__toggle-columns-action`,slot:"header-actions-end",text:n},this._effectiveVisibleElements.tooltips?L("calcite-tooltip",{closeOnClick:!0,overlayPositioning:"fixed",placement:"bottom-end",slot:"tooltip"},n):null)}_renderColumnVisibilityPopover(){if(!this._showColumnsVisibilityAction||this.effectiveTable.menuConfig?.disabled)return;const{effectiveTable:e}=this,t=this.messages.toggleColumns;return L("calcite-popover",{autoClose:!0,class:Z.menuPopover,label:t,overlayPositioning:"fixed",placement:"top-end",pointerDisabled:!0,referenceElement:this._columnVisibilityActions.get(this.id)},L("calcite-list",{displayMode:"nested",filterEnabled:!0,filterPlaceholder:t,label:t,selectionMode:"multiple"},e.columns.toArray().map(t=>{const i=V(t)?t.columns?.map(t=>this._renderColumnListItem({column:t,table:e,ignoreSelect:!0})):void 0;return this._renderColumnListItem({column:t,table:e,items:i})})))}_renderColumnListItem(e){const{column:t,table:i,items:n,ignoreSelect:s}=e,{effectiveLabel:l,fieldName:o,hidden:a}=t;return L("calcite-list-item",{expanded:!(!n?.length||a)||void 0,key:`toggle-columns__item-${o}`,label:l,selected:!a,value:o,onCalciteListItemSelect:e=>{s&&e.stopPropagation(),i.toggleColumnVisibility(e.currentTarget.value)}},n)}_renderLayerDropdown(){const e=this.messages.selectALayer;return L("div",{class:Z.layerDropdownMenu,key:`${this.id}-layerDropdown`,slot:"header-actions-start"},L("calcite-dropdown",{bind:this,maxItems:5,overlayPositioning:"fixed",placement:"bottom-start"},L("calcite-action",{icon:G.layers,slot:"trigger",text:e,title:e}),L("calcite-dropdown-group",{selectionMode:"single"},this._effectiveLayers.map((e,t)=>this._renderLayerDropdownItem(e,t))??null)))}_renderLayerDropdownItem(e,t){const i=this.visibleElements.layerDropdownIcons;return L("calcite-dropdown-item",{iconStart:i?P(e):void 0,key:`dropdown-item-${t}`,label:e.title??"",selected:e===this.layer,value:e.id,onCalciteDropdownItemSelect:()=>{this.layer=e}},e.title)}_onRelatedNavigationItemClick(e){this.viewModel.drainRelatedTablesAboveIndex(e)}_collapseRelatedTable(e){this.viewModel.collapseRelatedTable(this.effectiveTable,e)}_onShowRelatedTable(e){this.showRelatedTableCallback||(this._collapseRelatedTable(e),this._createRelatedTable(e))}async _createRelatedTable(e){const{autoRefreshEnabled:t,autoSaveEnabled:i,editingEnabled:n,effectiveTable:s,paginationEnabled:l,pageSize:o,view:a,viewModel:r}=this,{layer:c,objectId:d,relatedLayer:h,relationshipId:m}=e;await c.load();const p=this.attachmentsEnabled&&D(c),u=new U({layer:c,autoRefreshEnabled:t,autoSaveEnabled:i,attachmentsEnabled:p,editingEnabled:n,paginationEnabled:l,pageSize:o,relatedRecordsEnabled:!0,relationshipConfig:{objectId:d,relatedLayer:h,relationshipId:m},relationshipColumnConfigs:k(c,m),tableController:this,tableParent:s,view:a,showRelatedTableCallback:e=>r.emit("show-related-table",e)});this.relatedTables.add(u),this.scheduleRender()}_renderAttachmentsView(){switch(this.attachmentsViewOptions.effectiveMode){case"list":return this._renderAttachmentsViewList();case"details":return this._renderAttachmentsViewDetails();case"file":return this._renderAttachmentsViewFile()}}_renderAttachmentsViewFile(){const e=this.attachmentsViewOptions,{objectId:t}=e;if(null!=t)return[L("div",{class:Z.attachmentsView,key:"attachments-view"},this._renderAttachmentsViewInformation(),L("div",{class:Z.attachmentsViewContent,key:"attachments-view-content"},L("div",{bind:this,class:Z.attachmentsViewDropArea,ondragover:e=>e.preventDefault(),ondrop:this._onAttachmentsViewDrop},L("calcite-icon",{class:Z.attachmentsViewIcon,icon:G.upload,scale:"l"}),this._attachmentsViewFileLabelNode,this._attachmentsViewFileMessageNode,L("form",{afterCreate:t=>e.form=t,afterRemoved:()=>e.form=null,bind:this,key:"attachments-form"},L("fieldset",null,this._attachmentsViewFileNameNode,L("input",{afterCreate:j,afterRemoved:$,afterUpdate:j,bind:this,"data-node-ref":"_attachmentsInput",files:e.candidates,hidden:!0,name:"attachment",onchange:e=>this._onAttachmentsViewCandidateChange(e),type:"file"}),this._attachmentsViewFileSelectNode,this._attachmentsViewFileSaveNode,this._attachmentsViewFileCancelNode)))))]}_renderAttachmentsViewDetails(){const{attachmentInfo:e}=this.attachmentsViewOptions;if(e)return[L("div",{class:Z.attachmentsView,key:"attachments-view"},this._renderAttachmentsViewInformation(),L("div",{class:Z.attachmentsViewContent,key:"attachments-view-content"},L("div",{class:Z.attachmentsViewDetails},this._renderAttachmentsViewDetailsPreview(e))))]}_renderAttachmentsViewDetailsPreview(e){const t=this.messages;if(!y(e.contentType))return L("span",null,t.noPreviewAvailable);const i=t.maximize;return[this._renderAttachmentsViewDetailsImage(e),L("calcite-action",{icon:G.expand,label:i,onclick:t=>{t.preventDefault(),this.attachmentsViewOptions.dialogId=e.id},text:i,textEnabled:!0,title:i})]}_renderAttachmentsViewDetailsImage(e,t=!1){const{contentType:i,name:n,size:s,url:l}=e,{messages:o}=this;return y(i)?L("img",{alt:n,key:`thumbnail-image-${n}`,src:`${l}${l?.includes("?")?"&":"?"}s=${s}`,title:n}):t?[L("calcite-icon",{icon:f(i),key:`thumbnail-icon-${n}`,scale:"l",textLabel:n,title:n}),o.noPreviewAvailable]:o.noPreviewAvailable}_renderAttachmentsViewInformation(){const{attachmentsViewOptions:e,messages:t,messagesUnits:i}=this,{attachmentInfo:n,objectId:s}=e;if(!n||null==s)return;const{contentType:l,name:o}=n;return L("div",{class:Z.attachmentsViewInformation,key:"information"},this._renderAttachmentViewInformationButtons(n,s),L("calcite-icon",{"aria-hidden":!0,icon:f(l),key:"attachment-icon",scale:"l",textLabel:o}),L("span",{class:Z.attachmentsViewInformationLabel,key:"file-label"},t.fileName),L("span",{class:Z.attachmentsViewInformationData,key:"file-value"},n.name),L("span",{class:Z.attachmentsViewInformationLabel,key:"type-label"},t.attachmentType),L("span",{class:Z.attachmentsViewInformationData,key:"type-value"},this._getLabelForAttachmentType(n)),this._renderAttachmentKeywordDetails(n),L("span",{class:Z.attachmentsViewInformationLabel,key:"size-label"},t.size),L("span",{class:Z.attachmentsViewInformationData,key:"size-span"},r(i,n.size??0)))}_renderAttachmentViewInformationButtons(e,t){const{attachmentsViewOptions:i,messages:n,messagesCommon:s}=this,l="details"!==i.effectiveMode,o=e.id,a=[L("calcite-button",{appearance:"outline",disabled:l,key:"download-button",onclick:e=>{e.preventDefault(),this.downloadAttachmentById(t,o)},width:"full"},n.download)];return this.supportsUpdateAttachments&&a.push(L("calcite-button",{appearance:"outline",disabled:l,key:"replace-button",onclick:()=>{i.mode="file",i.attachmentId=o},width:"full"},n.replace)),this.supportsDeleteAttachments&&a.push(L("calcite-button",{appearance:"outline",disabled:l,key:"delete-button",onclick:()=>{this.deleteAttachments(t,[o],!0)},width:"full"},s.delete)),a}_renderAttachmentKeywordDetails({keywords:e}){if(e&&""!==e)return[L("span",{class:Z.attachmentsViewInformationLabel,key:"keyword-label"},this.messages.keyword),L("span",{class:Z.attachmentsViewInformationData,key:"keyword-value"},e)]}_renderAttachmentsViewList(){const{attachmentsViewOptions:e,isSyncingAttachments:t,messages:i,messagesUnits:n}=this,{attachmentInfos:s,objectId:l}=e;return L("calcite-list",{afterCreate:j,afterRemoved:$,afterUpdate:j,bind:this,class:Z.attachmentsViewList,"data-node-ref":"attachmentsList",key:`attachments-list-${l}`,label:i?.attachments,loading:t,ondragover:e=>e.preventDefault(),ondrop:this._onAttachmentsViewDrop,selectionMode:this.supportsDeleteAttachments?"multiple":"none",onCalciteListChange:()=>this.scheduleRender()},...s?.map(t=>{const{id:s,name:o,size:a}=t,c=r(n,a??0);return L("calcite-list-item",{afterRemoved:()=>this.scheduleRender(),key:`attachment-${s}`,label:o,value:s},this._renderAttachmentsViewListPreview(t),L("span",{class:Z.attachmentsViewListFileSize,slot:"actions-end",title:c},c),L("calcite-action",{icon:G.downloadTo,key:"download",label:o,onclick:e=>{e.preventDefault(),this.downloadAttachmentById(l??-1,s)},slot:"actions-end",text:i.downloadAttachment,title:i.downloadAttachment}),L("calcite-action",{icon:G.chevronRight,key:"details",label:o,onclick:()=>{e.mode="details",e.attachmentId=s},slot:"actions-end",text:i.viewAttachment,title:i.viewAttachment}))}))}_renderAttachmentsViewListPreview(e){return L("div",{class:Z.attachmentsViewListThumbnail,slot:"content-start"},L("span",null,this._renderAttachmentsViewListImage(e)))}_renderAttachmentsViewListImage(e,t=64){const{contentType:i,name:n,size:s,url:l}=e,o=`${l}${l?.includes("?")?"&":"?"}w=${t}&s=${s}`;return this.supportsResizeAttachments&&y(i)?L("img",{alt:n,key:`thumbnail-image-${n}`,src:o,title:n}):L("calcite-icon",{icon:f(i),key:`thumbnail-icon-${n}`,scale:"l",textLabel:n,title:n})}_onAttachmentsViewCandidateChange({target:e}){this.attachmentsViewOptions.candidates=e?.files}_onAttachmentsViewDrop(e){e.preventDefault(),(this.supportsAddAttachments||this.supportsUpdateAttachments)&&(this.attachmentsViewOptions.mode="file",this.attachmentsViewOptions.candidates=e.dataTransfer?.files)}_resetAttachmentsInput(){this._attachmentsInput&&(this._attachmentsInput.value="")}_getLabelForAttachmentType({contentType:e}){const t=this.messages;return e.startsWith("image/")?t.attachmentTypes.image:e.startsWith("audio/")?t.attachmentTypes.audio:e.startsWith("video/")?t.attachmentTypes.video:e.startsWith("text/")||e.startsWith("application/")||e.startsWith("model/")?t.attachmentTypes.document:t.attachmentTypes.unknown}_renderNavigationBar(){const{effectiveTable:e,messages:i,messagesCommon:n,navigationScale:s,relatedTable:l,relatedTables:o}=this;if(!this._shouldShowNavigationBar)return;const{attachmentsList:a,attachmentsViewOptions:r,layer:c,supportsAddAttachments:d,supportsDeleteAttachments:h}=e;if(!c)return;const{attachmentInfos:m,objectId:p}=r,u=null!=p,g=m.length,w=a?.selectedItems?.length??0,b=`${c.objectIdField}: ${p}`,v=t(i.selectedCount,{count:w}),y=t(i.attachmentsCount,{count:g}),f=u?L("calcite-action",{bind:this,icon:G.chevronRight,iconFlipRtl:!0,key:"navigation-feature",onclick:()=>e.scrollToRow(p),scale:s,text:b,textEnabled:!0,title:b}):void 0,_=u?L("calcite-action",{icon:G.chevronRight,iconFlipRtl:!0,key:"navigation-attachments-label",label:y,onclick:()=>{g>0&&(r.mode="list")},scale:s,text:y,textEnabled:!0,title:y}):void 0,M=u?L("calcite-chip",{closable:!0,closed:0===w,key:"navigation-chip",kind:"inverse",label:v,scale:"s",selected:!0,title:v,value:"selected",onCalciteChipClose:()=>a?.selectedItems?.forEach(e=>e.selected=!1)},v):void 0,C=l?L("calcite-label",{layout:"inline",scale:s},i.showAllTables,L("calcite-switch",{checked:this.allRelatedTablesVisible,scale:s,onCalciteSwitchChange:e=>this.showAllRelatedTables=!!e.currentTarget.checked})):void 0,A=u&&"list"===r.effectiveMode&&null!=p&&w&&h?L("calcite-action",{icon:G.delete,iconFlipRtl:!0,key:"attachments-trash-all",onclick:()=>{e.deleteAttachments(p,a?.selectedItems?.map(e=>e.value)??[],!0)},scale:s,text:n.delete,textEnabled:!0,title:t(i.deleteAttachmentCount,{count:w})}):void 0,S=u&&"list"===r.effectiveMode&&d?L("calcite-action",{bind:this,icon:G.plus,iconFlipRtl:!0,key:"attachments-add",onclick:()=>{r.objectId=p,r.attachmentId=null,r.mode="file"},scale:s,text:i.addAttachment,textEnabled:!0,title:i.addAttachment}):void 0;return L("div",{class:Z.tableNavigation,key:"table-nav"},L("calcite-action",{icon:G.moveUp,iconFlipRtl:!0,key:"go-back",onclick:()=>{l&&this.drainRelatedTables(),e.attachmentsViewOptions.objectId=null},scale:s,text:this.layer?.title??"",textEnabled:!1,title:l?i.exitRelatedRecords:i.exitAttachments}),o.toArray().map((e,t)=>this._renderRelatedTableNavigationAction(e,t)),f,_,L("div",null,M,C,A,S))}_renderRelatedTableNavigationAction(e,t){const i=this._getLabelForRelatedTableNavigationAction(e);return L("calcite-action",{icon:G.chevronRight,iconFlipRtl:!0,key:t,onclick:()=>this._onRelatedNavigationItemClick(t),scale:this.navigationScale,text:i,textEnabled:!0,title:e.layer?.title||""})}_getLabelForRelatedTableNavigationAction(e){const t=e.layer?.title;if(!t)return"";const{relatedTables:i}=this;if(i.length<=1)return t;return i.indexOf(e)!==i.length-1&&t.length>20?`${t.slice(0,20)}...`:t}};e([c()],W.prototype,"_attachmentsInput",void 0),e([c()],W.prototype,"_attachmentsViewFileCancelNode",null),e([c()],W.prototype,"_attachmentsViewFileLabelNode",null),e([c()],W.prototype,"_attachmentsViewFileMessageNode",null),e([c()],W.prototype,"_attachmentsViewFileNameNode",null),e([c()],W.prototype,"_attachmentsViewFileSaveNode",null),e([c()],W.prototype,"_attachmentsViewFileSelectNode",null),e([c()],W.prototype,"_columnVisibilityActions",void 0),e([c()],W.prototype,"_dialogIsOpen",null),e([c()],W.prototype,"_effectiveDescription",null),e([c()],W.prototype,"_effectiveLayers",null),e([c()],W.prototype,"_effectiveTitle",null),e([c()],W.prototype,"_effectiveVisibleElements",null),e([c()],W.prototype,"_filteredTables",null),e([c()],W.prototype,"_hasAttachmentsViewError",null),e([c()],W.prototype,"_hasCustomMenuItems",null),e([c()],W.prototype,"_hasDefaultMenuItems",null),e([c()],W.prototype,"_shouldShowGrid",null),e([c()],W.prototype,"_shouldShowMenu",null),e([c()],W.prototype,"_shouldShowAttachmentsView",null),e([c()],W.prototype,"_showClearSelectionAction",null),e([c()],W.prototype,"_showColumnsVisibilityAction",null),e([c()],W.prototype,"_showDeleteSelectionAction",null),e([c()],W.prototype,"_showExportSelectionToCSVAction",null),e([c()],W.prototype,"_showLayerDropdown",null),e([c()],W.prototype,"_shouldShowNavigationBar",null),e([c()],W.prototype,"_showRefreshDataAction",null),e([c()],W.prototype,"_showSelectedRecordsShowSelectedAction",null),e([c()],W.prototype,"_showSelectedRecordsShowAllAction",null),e([c()],W.prototype,"_showZoomToSelectionAction",null),e([c()],W.prototype,"_viewLayers",null),e([c()],W.prototype,"attachmentsList",void 0),e([c({readOnly:!0})],W.prototype,"grid",null),e([c()],W.prototype,"actionColumn",null),e([c()],W.prototype,"actionColumnConfig",null),e([c({readOnly:!0})],W.prototype,"activeFilters",null),e([c({readOnly:!0})],W.prototype,"activeSortOrders",null),e([c()],W.prototype,"allColumns",null),e([c({readOnly:!0})],W.prototype,"allRelatedTablesVisible",null),e([c()],W.prototype,"allVisibleColumns",null),e([c()],W.prototype,"attachmentsColumns",null),e([c()],W.prototype,"attachmentsEnabled",null),e([c()],W.prototype,"attachmentsViewOptions",null),e([c({type:w})],W.prototype,"attributeTableTemplate",null),e([c()],W.prototype,"autoRefreshEnabled",null),e([c()],W.prototype,"autoSaveEnabled",null),e([c()],W.prototype,"clearPrompt",null),e([c()],W.prototype,"columnPerformanceModeEnabled",null),e([c()],W.prototype,"columnReorderingEnabled",null),e([c({readOnly:!0})],W.prototype,"columns",null),e([c()],W.prototype,"definitionExpression",null),e([c()],W.prototype,"description",void 0),e([c()],W.prototype,"disabled",void 0),e([c()],W.prototype,"editingEnabled",null),e([c()],W.prototype,"effectiveSize",null),e([c()],W.prototype,"effectiveTable",null),e([c()],W.prototype,"fieldColumns",null),e([c({types:h})],W.prototype,"filterGeometry",null),e([c()],W.prototype,"filterBySelectionEnabled",null),e([c()],W.prototype,"groupColumns",null),e([c()],W.prototype,"hasContingentValues",null),e([c()],W.prototype,"hasInvalidPendingEdits",null),e([c()],W.prototype,"hasPendingEdits",null),e([c()],W.prototype,"hiddenFields",null),e([c()],W.prototype,"highlightEnabled",null),e([c()],W.prototype,"highlightIds",null),e([c()],W.prototype,"icon",null),e([c()],W.prototype,"initialSize",null),e([c()],W.prototype,"isQueryingOrSyncing",null),e([c()],W.prototype,"isSyncing",null),e([c()],W.prototype,"isSyncingAttachments",null),e([c()],W.prototype,"label",null),e([c()],W.prototype,"layer",null),e([c()],W.prototype,"layers",null),e([c()],W.prototype,"layerView",null),e([c()],W.prototype,"maxSize",null),e([c(),F("esri/widgets/FeatureTable/t9n/FeatureTable")],W.prototype,"messages",null),e([c(),F("esri/t9n/common")],W.prototype,"messagesCommon",null),e([c(),F("esri/core/t9n/Units")],W.prototype,"messagesUnits",null),e([c(),F("esri/widgets/support/t9n/uriUtils")],W.prototype,"messagesURIUtils",null),e([c()],W.prototype,"menuConfig",null),e([c()],W.prototype,"multipleSelectionEnabled",null),e([c()],W.prototype,"multiSortEnabled",null),e([c()],W.prototype,"multipleSortPriority",null),e([c()],W.prototype,"navigationScale",void 0),e([c()],W.prototype,"noDataMessage",null),e([c()],W.prototype,"objectIds",null),e([c()],W.prototype,"outFields",null),e([c()],W.prototype,"pageCount",null),e([c()],W.prototype,"pageIndex",null),e([c()],W.prototype,"pageSize",null),e([c()],W.prototype,"paginationEnabled",null),e([c()],W.prototype,"prompt",null),e([c()],W.prototype,"relatedRecordsEnabled",null),e([c()],W.prototype,"relatedTable",null),e([c()],W.prototype,"relatedTables",null),e([c()],W.prototype,"relationship",null),e([c()],W.prototype,"relationshipColumnConfigs",null),e([c()],W.prototype,"relationshipColumns",null),e([c()],W.prototype,"relationshipConfig",null),e([c()],W.prototype,"relationshipInfos",null),e([c()],W.prototype,"returnGeometryEnabled",null),e([c()],W.prototype,"returnMEnabled",null),e([c()],W.prototype,"returnZEnabled",null),e([c()],W.prototype,"rowHighlightIds",null),e([c()],W.prototype,"selectionSource",null),e([c()],W.prototype,"showAllRelatedTables",null),e([c()],W.prototype,"showPrompt",null),e([c()],W.prototype,"showRelatedTableCallback",null),e([c()],W.prototype,"size",null),e([c({readOnly:!0})],W.prototype,"state",null),e([c()],W.prototype,"supportsAddAttachments",null),e([c()],W.prototype,"supportsAttachments",null),e([c()],W.prototype,"supportsDeleteAttachments",null),e([c()],W.prototype,"supportsResizeAttachments",null),e([c()],W.prototype,"supportsUpdateAttachments",null),e([c()],W.prototype,"syncTemplateOnChangesEnabled",null),e([c({constructOnly:!0})],W.prototype,"tableController",null),e([c({constructOnly:!0})],W.prototype,"tableParent",null),e([c({type:T})],W.prototype,"tableTemplate",null),e([c()],W.prototype,"tableTemplateOverride",null),e([c()],W.prototype,"title",void 0),e([c({type:b})],W.prototype,"timeExtent",null),e([c()],W.prototype,"timeZone",null),e([c()],W.prototype,"view",null),e([c({type:A}),O(["cell-click","cell-dblclick","cell-pointerover","cell-pointerout","cell-keydown","column-reorder","show-related-table"])],W.prototype,"viewModel",void 0),e([c()],W.prototype,"visibleColumns",null),e([c({type:S,nonNullable:!0})],W.prototype,"visibleElements",void 0),e([c({type:S})],W.prototype,"visibleElementsOverride",null),W=U=e([d("esri.widgets.FeatureTable")],W);const Q=W;export{Q as default};
@@ -252,7 +252,6 @@ export default class FeaturesViewModel extends FeaturesViewModelSuperclass {
252
252
  /**
253
253
  * Indicates if the view model is active when it is visible and is not [waiting for results](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Features-FeaturesViewModel.html#waitingForResult).
254
254
  *
255
- * @since 4.17
256
255
  * @see [waitingForResult](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Features-FeaturesViewModel.html#waitingForResult)
257
256
  * @see [visible](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Features-FeaturesViewModel.html#visible)
258
257
  */
@@ -263,17 +262,12 @@ export default class FeaturesViewModel extends FeaturesViewModelSuperclass {
263
262
  * @since 4.32
264
263
  */
265
264
  accessor activeFeature: Graphic | null | undefined;
266
- /**
267
- * A collection of [actions](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-actions-ActionButton.html) or [action toggles](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-actions-ActionToggle.html).
268
- *
269
- * @since 4.8
270
- */
265
+ /** A collection of [actions](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-actions-ActionButton.html) or [action toggles](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-actions-ActionToggle.html). */
271
266
  get allActions(): Collection<PopupAction>;
272
267
  /**
273
268
  * This closes the container when the [View](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html) camera or [Viewpoint](https://developers.arcgis.com/javascript/latest/api-reference/esri-Viewpoint.html) changes.
274
269
  *
275
270
  * @default false
276
- * @since 4.5
277
271
  */
278
272
  accessor autoCloseEnabled: boolean;
279
273
  /**
@@ -287,7 +281,6 @@ export default class FeaturesViewModel extends FeaturesViewModelSuperclass {
287
281
  * an [aggregate graphic](https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html#isAggregate) and represents a cluster.
288
282
  *
289
283
  * @default false
290
- * @since 4.24
291
284
  * @example
292
285
  * // open the browse features experience for a cluster graphic
293
286
  * featuresWidget.viewModel.browseClusterEnabled = featuresWidget.viewModel.selectedFeature?.isAggregate;
@@ -319,8 +312,6 @@ export default class FeaturesViewModel extends FeaturesViewModelSuperclass {
319
312
  * > [!WARNING]
320
313
  * >
321
314
  * > In order to disable any default actions, it is necessary to set [includeDefaultActions](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Features-FeaturesViewModel.html#includeDefaultActions) to `false`.
322
- *
323
- * @since 4.19
324
315
  */
325
316
  get defaultActions(): Collection<PopupAction>;
326
317
  /**
@@ -337,7 +328,6 @@ export default class FeaturesViewModel extends FeaturesViewModelSuperclass {
337
328
  * [ImageryLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ImageryLayer.html)).
338
329
  *
339
330
  * @default false
340
- * @since 4.11
341
331
  */
342
332
  accessor defaultPopupTemplateEnabled: boolean;
343
333
  /**
@@ -401,24 +391,15 @@ export default class FeaturesViewModel extends FeaturesViewModelSuperclass {
401
391
  * @default 20
402
392
  */
403
393
  accessor featuresPerPage: number;
404
- /**
405
- * Defines the specific [Abilities](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature-types.html#Abilities) that can be used when querying and displaying content.
406
- *
407
- * @since 4.21
408
- */
394
+ /** Defines the specific [Abilities](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature-types.html#Abilities) that can be used when querying and displaying content. */
409
395
  accessor featureViewModelAbilities: FeatureViewModelAbilities | null | undefined;
410
- /**
411
- * An array of [feature view model(s)](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature-FeatureViewModel.html).
412
- *
413
- * @since 4.21
414
- */
396
+ /** An array of [feature view model(s)](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Feature-FeatureViewModel.html). */
415
397
  get featureViewModels(): FeatureViewModel[];
416
398
  /**
417
399
  * Highlight the selected feature using one of the [HighlightOptions](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-support-HighlightOptions.html) defined in the view's
418
400
  * [View#highlights](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#highlights) collection.
419
401
  *
420
402
  * @default true
421
- * @since 4.4
422
403
  */
423
404
  accessor highlightEnabled: boolean;
424
405
  /**
@@ -429,7 +410,6 @@ export default class FeaturesViewModel extends FeaturesViewModelSuperclass {
429
410
  * > In order to disable any [default actions](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Features-FeaturesViewModel.html#defaultActions), it is necessary to set [includeDefaultActions](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Features-FeaturesViewModel.html#includeDefaultActions) to `false`.
430
411
  *
431
412
  * @default true
432
- * @since 4.19
433
413
  * @example
434
414
  * // Removes the default actions
435
415
  * viewModel.includeDefaultActions = false;
@@ -512,8 +492,6 @@ export default class FeaturesViewModel extends FeaturesViewModelSuperclass {
512
492
  * The graphic used to represent the cluster extent when the `Browse features` action
513
493
  * is active. Only applies when a PopupTemplate is set on
514
494
  * a [FeatureReductionCluster](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-FeatureReductionCluster.html) instance.
515
- *
516
- * @since 4.19
517
495
  */
518
496
  get selectedClusterBoundaryFeature(): Graphic;
519
497
  /**
@@ -617,7 +595,6 @@ export default class FeaturesViewModel extends FeaturesViewModelSuperclass {
617
595
  * Indicates whether a feature was found while resolving [promises](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Features-FeaturesViewModel.html#promises).
618
596
  *
619
597
  * @default false
620
- * @since 4.17
621
598
  * @see [active](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Features-FeaturesViewModel.html#active)
622
599
  */
623
600
  get waitingForResult(): boolean;
@@ -663,7 +640,6 @@ export default class FeaturesViewModel extends FeaturesViewModelSuperclass {
663
640
  * Most commonly if accessing all features, use the single promise returned in the
664
641
  * [result's allGraphicsPromise](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-types.html#FetchPopupFeaturesResult) and call `.then()` as seen in
665
642
  * the example snippet.
666
- * @since 4.15
667
643
  * @example
668
644
  * // Get view's click event
669
645
  * reactiveUtils.on(()=>view, "click", (event) => {
@@ -28,14 +28,14 @@ export default abstract class FeaturesVisibleElements extends Accessor {
28
28
  */
29
29
  accessor closeButton: boolean;
30
30
  /**
31
- * **Since 4.28.** Indicates whether to display the collapse button on the widget dialog.
31
+ * Indicates whether to display the collapse button on the widget dialog.
32
32
  *
33
33
  * @default false
34
34
  * @since 5.0
35
35
  */
36
36
  accessor collapseButton: boolean;
37
37
  /**
38
- * **Since 4.30.** Indicates whether to display the group heading for a list of multiple features.
38
+ * Indicates whether to display the group heading for a list of multiple features.
39
39
  *
40
40
  * ![popup-visibleElements-featureListLayerTitle](https://developers.arcgis.com/javascript/latest/assets/img/apiref/widgets/popup/popup-listlayertitle-true2.png)
41
41
  *
@@ -44,7 +44,7 @@ export default abstract class FeaturesVisibleElements extends Accessor {
44
44
  */
45
45
  accessor featureListLayerTitle: boolean;
46
46
  /**
47
- * **Since 4.32.** Indicates whether to display a heading and description on the widget feature menu list.
47
+ * Indicates whether to display a heading and description on the widget feature menu list.
48
48
  *
49
49
  * @default true
50
50
  * @since 5.0
@@ -58,7 +58,7 @@ export default abstract class FeaturesVisibleElements extends Accessor {
58
58
  */
59
59
  accessor featureNavigation: boolean;
60
60
  /**
61
- * **Since 4.29.** Determines whether the widget should be shown within its built-in [flow component](https://developers.arcgis.com/calcite-design-system/components/flow/) or if the flow component should be excluded.
61
+ * Determines whether the widget should be shown within its built-in [flow component](https://developers.arcgis.com/calcite-design-system/components/flow/) or if the flow component should be excluded.
62
62
  * The widget will be displayed within its original flow component if set to `true`.
63
63
  * The flow component will be omitted from the widget if set to `false`.
64
64
  * To place the widget into an existing Calcite flow component, set this property to `false`.
@@ -8,17 +8,32 @@ export interface LayerListViewModelProperties extends EventedMixinProperties, Pa
8
8
 
9
9
  export interface LayerListViewModelEvents {
10
10
  /**
11
- * Fires after the user clicks on an [action](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-actions-ActionButton.html)
12
- * or [action toggle](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-actions-ActionToggle.html) inside the LayerList.
13
- * This event may be used to define a custom function to execute when particular actions are clicked.
11
+ * Emitted when the user clicks an [action](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-actions-ActionButton.html) or
12
+ * [action toggle](https://developers.arcgis.com/javascript/latest/api-reference/esri-support-actions-ActionToggle.html) in a layer list.
13
+ * Use this event to run custom logic when a specific action is triggered.
14
+ *
15
+ * @see [BasemapLayerList#@trigger-action](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BasemapLayerList.html#event-trigger-action)
16
+ * @see [CatalogLayerList#@trigger-action](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CatalogLayerList.html#event-trigger-action)
17
+ * @see [CatalogLayerListViewModel#@trigger-action](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CatalogLayerList-CatalogLayerListViewModel.html#event-trigger-action)
18
+ * @see [LayerList#@trigger-action](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList.html#event-trigger-action)
19
+ * @see [@trigger-action](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList-LayerListViewModel.html#event-trigger-action)
14
20
  */
15
21
  "trigger-action": LayerListViewModelTriggerActionEvent;
16
22
  }
17
23
 
24
+ /**
25
+ * The event object for the `trigger-action` event in the layer lists.
26
+ *
27
+ * @see [BasemapLayerList#@trigger-action](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BasemapLayerList.html#event-trigger-action)
28
+ * @see [CatalogLayerList#@trigger-action](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CatalogLayerList.html#event-trigger-action)
29
+ * @see [CatalogLayerListViewModel#@trigger-action](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CatalogLayerList-CatalogLayerListViewModel.html#event-trigger-action)
30
+ * @see [LayerList#@trigger-action](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList.html#event-trigger-action)
31
+ * @see [@trigger-action](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList-LayerListViewModel.html#event-trigger-action)
32
+ */
18
33
  export interface LayerListViewModelTriggerActionEvent {
19
- /** The action clicked by the user. */
34
+ /** The action that was clicked by the user. */
20
35
  action: Action;
21
- /** An item associated with the action. */
36
+ /** The list item associated with the action. */
22
37
  item: ListItem;
23
38
  }
24
39
 
@@ -4,56 +4,54 @@ import type Accessor from "../../core/Accessor.js";
4
4
  export interface LayerListVisibleElementsProperties extends Partial<Pick<LayerListVisibleElements, "catalogLayerList" | "closeButton" | "collapseButton" | "errors" | "filter" | "flow" | "heading" | "statusIndicators" | "temporaryLayerIndicators">> {}
5
5
 
6
6
  /**
7
- * The visible elements that are displayed within the widget.
8
- * This provides the ability to turn individual elements of the widget's display on/off.
9
- *
10
- * @since 4.15
7
+ * The visible elements that are displayed within the layer list.
8
+ * This provides the ability to turn on/off individual elements of the layer list.
11
9
  */
12
10
  export default abstract class LayerListVisibleElements extends Accessor {
13
11
  /**
14
- * **Since 4.30** Indicates whether to display the [LayerList#catalogLayerList](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList.html#catalogLayerList).
12
+ * Indicates whether to display the [LayerList#catalogLayerList](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList.html#catalogLayerList).
15
13
  *
16
14
  * @default true
17
15
  * @since 5.0
18
16
  */
19
17
  accessor catalogLayerList: boolean;
20
18
  /**
21
- * **Since 4.29** Indicates whether to display a close button in the header.
19
+ * Indicates whether to display a close button in the header.
22
20
  *
23
21
  * @default false
24
22
  * @since 5.0
25
23
  */
26
24
  accessor closeButton: boolean;
27
25
  /**
28
- * **Since 4.29** Indicates whether to display a collapse button in the header.
26
+ * Indicates whether to display a collapse button in the header.
29
27
  *
30
28
  * @default false
31
29
  * @since 5.0
32
30
  */
33
31
  accessor collapseButton: boolean;
34
32
  /**
35
- * **Since 4.25** Indicates whether to display layers with load errors.
33
+ * Indicates whether to display layers with load errors.
36
34
  *
37
35
  * @default false
38
36
  * @since 5.0
39
37
  */
40
38
  accessor errors: boolean;
41
39
  /**
42
- * **Since 4.29** Indicates whether to display a filter input box when then number of list items is equal to or greater than the value set in [LayerList#minFilterItems](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList.html#minFilterItems), allowing users to filter layers by their title.
40
+ * Indicates whether to display a filter input box when then number of list items is equal to or greater than the value set in [LayerList#minFilterItems](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList.html#minFilterItems), allowing users to filter layers by their title.
43
41
  *
44
42
  * @default false
45
43
  * @since 5.0
46
44
  */
47
45
  accessor filter: boolean;
48
46
  /**
49
- * **Since 4.29** Determines whether the widget should be shown within its built-in [flow component](https://developers.arcgis.com/calcite-design-system/components/flow/) or if the flow component should be excluded. The widget will be displayed within its original flow component if set to `true`. The flow component will be omitted from the widget if set to `false`. To place the widget into an existing Calcite flow component, set this property to `false`.
47
+ * Indicates whether the layer list should be shown within its built-in [flow component](https://developers.arcgis.com/calcite-design-system/components/flow/) or if the flow component should be excluded. The layer list will be displayed within its original flow component if set to `true`. The flow component will be omitted from the layer list if set to `false`. To place the layer list into an existing Calcite flow component, set this property to `false`.
50
48
  *
51
49
  * @default true
52
50
  * @since 5.0
53
51
  */
54
52
  accessor flow: boolean;
55
53
  /**
56
- * **Since 4.29** Indicates whether to display the widget heading. The heading text is "Layer List". The heading level can be set with the [LayerList#headingLevel](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList.html#headingLevel).
54
+ * Indicates whether to display the layer list heading. The heading text is "Layer List". The heading level can be set with the [LayerList#headingLevel](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList.html#headingLevel).
57
55
  *
58
56
  * @default false
59
57
  * @since 5.0
@@ -67,7 +65,7 @@ export default abstract class LayerListVisibleElements extends Accessor {
67
65
  */
68
66
  accessor statusIndicators: boolean;
69
67
  /**
70
- * **Since 4.29** Indicates whether temporary layer indicators will be displayed for layers with [Layer#persistenceEnabled](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-Layer.html#persistenceEnabled) set to `false`. A [temporary icon](https://developers.arcgis.com/calcite-design-system/icons/?icon=temporary&library=Calcite%20UI&query=temporary) will be displayed on the near side of the layer title.
68
+ * Indicates whether temporary layer indicators will be displayed for layers with [Layer#persistenceEnabled](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-Layer.html#persistenceEnabled) set to `false`. A [temporary icon](https://developers.arcgis.com/calcite-design-system/icons/?icon=temporary&library=Calcite%20UI&query=temporary) will be displayed on the near side of the layer title.
71
69
  *
72
70
  * @default false
73
71
  * @since 5.0
@@ -64,14 +64,47 @@ export interface ListItemProperties extends IdentifiableMixinProperties, Partial
64
64
  title?: string | null;
65
65
  }
66
66
 
67
+ /**
68
+ * Represents a layer view that supports spatial referencing. Used to indicate whether the
69
+ * associated layer view can operate with a spatial reference in the current view context.
70
+ *
71
+ * @since 5.0
72
+ * @see [layerView](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList-ListItem.html#layerView)
73
+ */
67
74
  export interface SpatiallyReferencedLayerView extends LayerView {
75
+ /**
76
+ * Indicates if the layer view supports the current spatial reference.
77
+ *
78
+ * @since 5.0
79
+ */
68
80
  spatialReferenceSupported: boolean;
69
81
  }
70
82
 
83
+ /**
84
+ * Represents a layer view for stream layers that provides connection status information.
85
+ * Used to determine the current connection state of a stream layer in the view.
86
+ *
87
+ * @since 5.0
88
+ * @see [connectionStatus](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList-ListItem.html#connectionStatus)
89
+ */
71
90
  export interface ConnectedLayerView extends LayerView {
91
+ /**
92
+ * The current connection status of the stream layer view.
93
+ *
94
+ * @since 5.0
95
+ */
72
96
  connectionStatus: StreamLayerViewConnectionStatus;
73
97
  }
74
98
 
99
+ /**
100
+ * Defines how the visibility of child layers is managed within a list item.
101
+ *
102
+ * - `independent`: Each child layer's visibility is controlled separately.
103
+ * - `inherited`: Child layers inherit the visibility from their parent layer.
104
+ * - `exclusive`: Only one child layer can be visible at a time.
105
+ *
106
+ * @see [visibilityMode](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList-ListItem.html#visibilityMode)
107
+ */
75
108
  export type ListItemVisibilityMode = "independent" | "inherited" | "exclusive";
76
109
 
77
110
  /**
@@ -47,12 +47,18 @@ export interface ListItemPanelProperties extends WidgetProperties, IdentifiableM
47
47
  /**
48
48
  * The content displayed in the ListItem panel. This can be a [String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String),
49
49
  * a [Widget](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Widget.html) instance, or an [HTMLElement](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement).
50
+ * If the string `legend` is used, then an instance of the [Legend](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html) widget is placed in the content.
50
51
  *
51
- * If the string `legend` is used, then an instance of the [Legend](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html)
52
- * widget is placed in the content.
52
+ * @see [content](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList-ListItemPanel.html#content)
53
53
  */
54
54
  export type ListItemPanelContent = "legend" | Widget | HTMLElement | string;
55
55
 
56
+ /**
57
+ * Defines the content(s) that can be displayed in a ListItem panel. This can be a single content item
58
+ * or an array of content items, allowing for flexible panel layouts.
59
+ *
60
+ * @see [content](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList-ListItemPanel.html#content)
61
+ */
56
62
  export type ListItemPanelContents = ListItemPanelContent | ListItemPanelContent[];
57
63
 
58
64
  /**