@arcgis/core 5.0.0-next.86 → 5.0.0-next.87

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 (290) hide show
  1. package/Ground.js +1 -1
  2. package/WebScene.js +1 -1
  3. package/analysis/VolumeMeasurement/VolumeMeasurementDisplayUnits.d.ts +14 -2
  4. package/analysis/VolumeMeasurement/VolumeMeasurementDisplayUnits.js +1 -1
  5. package/applications/Components/OrientedImageryViewer/galleryUtils.d.ts +80 -0
  6. package/applications/Components/OrientedImageryViewer/galleryUtils.js +5 -0
  7. package/applications/Components/clipboard.d.ts +106 -0
  8. package/applications/Components/clipboard.js +5 -0
  9. package/assets/esri/core/libs/libtess/libtess-f32.wasm +0 -0
  10. package/assets/esri/core/libs/libtess/libtess-f64.wasm +0 -0
  11. package/assets/esri/core/t9n/Units.json +1 -1
  12. package/assets/esri/core/workers/RemoteClient.js +1 -1
  13. package/assets/esri/core/workers/chunks/{6298e71e6c480d6f46e3.js → 0276e689e1371b40cff3.js} +1 -1
  14. package/assets/esri/core/workers/chunks/045a9cc900bb4ac8afde.js +1 -0
  15. package/assets/esri/core/workers/chunks/048173088bbeb1f6b8b6.js +1 -0
  16. package/assets/esri/core/workers/chunks/0be8b9d9ef56c37e74c3.js +1 -0
  17. package/assets/esri/core/workers/chunks/0bef671165e64f90ac86.js +1 -0
  18. package/assets/esri/core/workers/chunks/0c025d2b0d3162b07feb.js +1 -0
  19. package/assets/esri/core/workers/chunks/0c4ed18d67dea0c99f01.js +1 -0
  20. package/assets/esri/core/workers/chunks/0e0208b87566f4470f1d.js +1 -0
  21. package/assets/esri/core/workers/chunks/{981f05b5ef6f9c3f7e8a.js → 0fc0fd7618ef25dd6b67.js} +1 -1
  22. package/assets/esri/core/workers/chunks/{f1e1666bede364c069fc.js → 15c180deb8d09127ad31.js} +1 -1
  23. package/assets/esri/core/workers/chunks/1616ee2f6dce0203f1d5.js +1 -0
  24. package/assets/esri/core/workers/chunks/21bb414cb0623ffad577.js +1 -0
  25. package/assets/esri/core/workers/chunks/21c84e014c73bd85f4a3.js +1 -0
  26. package/assets/esri/core/workers/chunks/262677294d8c653e2b0b.js +1 -0
  27. package/assets/esri/core/workers/chunks/{5139bbe8f94df01467c7.js → 28a6a59033baa44bafab.js} +1 -1
  28. package/assets/esri/core/workers/chunks/{c5d56b85d34026507902.js → 28c273f34ffde25cebc6.js} +1 -1
  29. package/assets/esri/core/workers/chunks/{b7e40118b4d645e9f8e1.js → 2a12026f1ca9e8900a8b.js} +1 -1
  30. package/assets/esri/core/workers/chunks/2bc9f407f89d554a43ce.js +1 -0
  31. package/assets/esri/core/workers/chunks/2f21c5ae4fbe85c2792b.js +1 -0
  32. package/assets/esri/core/workers/chunks/3332ee9727874953523c.js +1 -0
  33. package/assets/esri/core/workers/chunks/{c477b0ce55211339c4cb.js → 33f44cc192c72064b5b6.js} +1 -1
  34. package/assets/esri/core/workers/chunks/{1cf27708d17a4de75b68.js → 3672125daca3df24c8ab.js} +1 -1
  35. package/assets/esri/core/workers/chunks/37a607f3835ec6f60834.js +1 -0
  36. package/assets/esri/core/workers/chunks/{3ebd4cdafa7682062447.js → 39dd80c184ac48f877f1.js} +1 -1
  37. package/assets/esri/core/workers/chunks/3a3adf9b6502ad698aea.js +1 -0
  38. package/assets/esri/core/workers/chunks/3b5f24bb824c95996308.js +1 -0
  39. package/assets/esri/core/workers/chunks/{4a857a7f5e00dfab2b44.js → 3c663035cf872b66cb98.js} +1 -1
  40. package/assets/esri/core/workers/chunks/{32b09ca094377a305881.js → 3d924488471601a17915.js} +1 -1
  41. package/assets/esri/core/workers/chunks/{743165f9bc4d85748a0d.js → 42b56932340b6d0bc712.js} +1 -1
  42. package/assets/esri/core/workers/chunks/4de93e9f91fd891ed96f.js +1 -0
  43. package/assets/esri/core/workers/chunks/4eb02a03956d1c9c77ee.js +1 -0
  44. package/assets/esri/core/workers/chunks/{15132d36e7ccbb3c009e.js → 555a252bdb87e340bd02.js} +1 -1
  45. package/assets/esri/core/workers/chunks/{5d791bfca20791d8e0af.js → 5670e430584f020a3530.js} +1 -1
  46. package/assets/esri/core/workers/chunks/{70df4331ed29d823bf38.js → 5b297353b058323f8080.js} +1 -1
  47. package/assets/esri/core/workers/chunks/5ef5dcca7c9b376f7f77.js +1 -0
  48. package/assets/esri/core/workers/chunks/{c12c095937b21e39ad3c.js → 614c63dae0158da0ed3d.js} +1 -1
  49. package/assets/esri/core/workers/chunks/{8f3abaabc61858e929a5.js → 641450da2680ae09b8e7.js} +1 -1
  50. package/assets/esri/core/workers/chunks/{8b575ac55bc396c0c477.js → 687677acc05b5e87effe.js} +1 -1
  51. package/assets/esri/core/workers/chunks/{1aee859eaffa54ef2515.js → 727321c615f35d708d46.js} +1 -1
  52. package/assets/esri/core/workers/chunks/782c24211daacb47b0b2.js +1 -0
  53. package/assets/esri/core/workers/chunks/79067e7d1ebc46afd775.js +1 -0
  54. package/assets/esri/core/workers/chunks/7a454e4d6df3360e0ab9.js +1 -0
  55. package/assets/esri/core/workers/chunks/7da56ba34c81d2bbaf25.js +1 -0
  56. package/assets/esri/core/workers/chunks/{d8b72c6f5f9b2d013b7f.js → 824b45b04b4f4f91dbce.js} +1 -1
  57. package/assets/esri/core/workers/chunks/836d10ceb93ed19f0aa6.js +1 -0
  58. package/assets/esri/core/workers/chunks/{68d0bae1816061d96307.js → 837d39e70880e4310bda.js} +1 -1
  59. package/assets/esri/core/workers/chunks/8bcb2180ecc88a39b317.js +1 -0
  60. package/assets/esri/core/workers/chunks/{e95f90d59041640727da.js → 8c5d827cbf8869defb87.js} +1 -1
  61. package/assets/esri/core/workers/chunks/{7449af8f3637c1694660.js → 97155c8ac832d7c46f24.js} +1 -1
  62. package/assets/esri/core/workers/chunks/{fbf21fda283836e8633c.js → 98cb131b62e30aee35e1.js} +1 -1
  63. package/assets/esri/core/workers/chunks/{e067bbf12f711fd5b9a6.js → 9b3b9df0aa0fdcc77aa2.js} +1 -1
  64. package/assets/esri/core/workers/chunks/{5852d291ef41201030d5.js → 9fa1512baa6e95d3f878.js} +21 -21
  65. package/assets/esri/core/workers/chunks/{96616126aaf319cd1c6f.js → a5ed35f53769feb751db.js} +1 -1
  66. package/assets/esri/core/workers/chunks/{b6530c66804bede649d7.js → aa09e261d1f7dffaad8c.js} +1 -1
  67. package/assets/esri/core/workers/chunks/b268b4cbf5b0c856f88e.js +1 -0
  68. package/assets/esri/core/workers/chunks/b2f6cee006788ce3bd16.js +1 -0
  69. package/assets/esri/core/workers/chunks/{198ae9e02366870d3ec8.js → b46e772e415e2cfca896.js} +1 -1
  70. package/assets/esri/core/workers/chunks/{cee29c3a94376f6740d7.js → b4ab715a3c506e122f35.js} +1 -1
  71. package/assets/esri/core/workers/chunks/{b5ca894a6cb1a19676d5.js → b9756dce0b3af1a9dc54.js} +1 -1
  72. package/assets/esri/core/workers/chunks/baa7e90ec5259057d86b.js +1 -0
  73. package/assets/esri/core/workers/chunks/{52ae2073604deef63ea2.js → c083045d21636b95f26f.js} +1 -1
  74. package/assets/esri/core/workers/chunks/{5a0c5271304189a2401d.js → c38098f7073a10efdb1e.js} +1 -1
  75. package/assets/esri/core/workers/chunks/{adecd31fd64d6753682d.js → c7c865dc1a93e781a3e3.js} +1 -1
  76. package/assets/esri/core/workers/chunks/c8e56dc1239118ac2a60.js +1 -0
  77. package/assets/esri/core/workers/chunks/{e7e508258ad27468a6a5.js → cc6d9b2062b9de629111.js} +1 -1
  78. package/assets/esri/core/workers/chunks/d5386c0e77063c87fddd.js +1 -0
  79. package/assets/esri/core/workers/chunks/d782671235af2db1c458.js +1 -0
  80. package/assets/esri/core/workers/chunks/de33ce9b6f4e6c0e1389.js +1 -0
  81. package/assets/esri/core/workers/chunks/{0abb084b8a137f4fcdfc.js → e1c5773c12d9947bdc5f.js} +1 -1
  82. package/assets/esri/core/workers/chunks/e55ce8466aa979ac1e6b.js +1 -0
  83. package/assets/esri/core/workers/chunks/{21739c37160061f229ef.js → e585883d0036aa866420.js} +1 -1
  84. package/assets/esri/core/workers/chunks/e6d6d664fc9f2cd6a042.js +1 -0
  85. package/assets/esri/core/workers/chunks/e7cdc2a21104d84aec4a.js +1 -0
  86. package/assets/esri/core/workers/chunks/e9edf3987039def65859.js +1 -0
  87. package/assets/esri/core/workers/chunks/{3b434f318fdbbe4111e3.js → edbe52c2848486d64b16.js} +1 -1
  88. package/assets/esri/core/workers/chunks/{4f8895eb57ec6ab4b318.js → f5a61fa75ac877b5bb74.js} +1 -1
  89. package/assets/esri/core/workers/chunks/f9bc4edfdb1590be2d92.js +1 -0
  90. package/assets/esri/libs/lyr3d/lyr3DMain.wasm +0 -0
  91. package/assets/esri/libs/lyr3d/lyr3DWorker.wasm +0 -0
  92. package/assets/esri/libs/parquet/pkg/bundle_bg.wasm +0 -0
  93. package/assets/esri/themes/base/widgets/_FeatureTable.scss +9 -1
  94. package/assets/esri/themes/dark/main.css +1 -1
  95. package/assets/esri/themes/light/main.css +1 -1
  96. package/assets/esri/themes/light/view.css +1 -1
  97. package/chunks/bundle.js +1 -1
  98. package/chunks/libtess-f32.js +1 -1
  99. package/chunks/libtess-f64.js +1 -1
  100. package/config.js +1 -1
  101. package/copyright.txt +84 -0
  102. package/core/Promise.d.ts +1 -1
  103. package/core/quantity.js +1 -1
  104. package/core/quantityFormatUtils.js +1 -1
  105. package/core/units.d.ts +1 -1
  106. package/core/units.js +1 -1
  107. package/core/workers/WorkerHandle.js +1 -1
  108. package/editing/Clipboard.js +5 -0
  109. package/geometry/ellipsoidUtils.js +1 -1
  110. package/geometry/libtess.js +1 -1
  111. package/geometry/projection/projectors.js +1 -1
  112. package/geometry/projectionUtils.js +1 -1
  113. package/geometry/support/meshUtils/projection.js +1 -1
  114. package/geometry/support/meshUtils/vertexSpaceConversion.js +1 -1
  115. package/geometry/support/planetGCSUtils.js +1 -1
  116. package/geometry/support/spatialReferenceUtils.js +1 -1
  117. package/identity/IdentityModal.js +1 -1
  118. package/kernel.js +1 -1
  119. package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
  120. package/layers/mixins/ArcGISImageService.d.ts +30 -16
  121. package/layers/mixins/ImageryTileMixin.d.ts +2 -1
  122. package/layers/mixins/ImageryTileMixin.js +1 -1
  123. package/layers/orientedImagery/transformations/utils.js +1 -1
  124. package/layers/raster/functions/SpectralConversionFunction.js +5 -0
  125. package/layers/raster/functions/SpectralConversionFunctionArguments.js +5 -0
  126. package/layers/raster/functions/conversionUtils.js +1 -1
  127. package/layers/raster/functions/rasterFunctionHelper.js +1 -1
  128. package/layers/raster/functions/vectorFieldUtils.js +1 -1
  129. package/layers/support/rasterFunctionUtils.d.ts +0 -4
  130. package/package.json +1 -1
  131. package/rest/imageService.d.ts +36 -19
  132. package/rest/imageService.js +1 -1
  133. package/smartMapping/raster/support/adapters/ImageryLayerAdapter.js +1 -1
  134. package/smartMapping/support/adapters/FeatureLayerAdapter.js +1 -1
  135. package/support/revision.js +1 -1
  136. package/views/2d/engine/imagery/RasterVFContainer.js +1 -1
  137. package/views/2d/engine/imagery/RasterVFDisplayObject.js +1 -1
  138. package/views/2d/engine/imagery/RasterVFTileContainer.js +1 -1
  139. package/views/2d/engine/rasterBrushes.js +1 -1
  140. package/views/2d/engine/webgl/shaderGraph/techniques/raster/VectorFieldTechnique.js +5 -0
  141. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/AspectTechnique.js +1 -1
  142. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/BandArithmeticTechnique.js +1 -1
  143. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/ColormapToRGBTechnique.js +1 -1
  144. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/CompositeBandTechnique.js +1 -1
  145. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/ComputeChangeTechnique.js +1 -1
  146. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/ContrastBrightnessTechnique.js +1 -1
  147. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/ConvolutionTechnique.js +1 -1
  148. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/CurvatureTechnique.js +1 -1
  149. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/ExtractBandTechnique.js +1 -1
  150. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/FocalStatisticsTechnique.js +1 -1
  151. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/GrayscaleTechnique.js +1 -1
  152. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/HillshadeTechnique.js +1 -1
  153. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/LocalTechnique.js +1 -1
  154. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/MaskTechnique.js +1 -1
  155. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/NDVITechnique.js +1 -1
  156. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/RemapTechnique.js +1 -1
  157. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/ReprojectTechnique.js +1 -1
  158. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/ShadedReliefTechnique.js +1 -1
  159. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/SlopeTechnique.js +1 -1
  160. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/StretchTechnique.js +1 -1
  161. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/MagDirShader.js +5 -0
  162. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/ScalarShader.js +5 -0
  163. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  164. package/views/2d/layers/MediaLayerView2D.js +1 -1
  165. package/views/2d/layers/TileLayerView2D.js +1 -1
  166. package/views/2d/layers/imagery/ImageryVFStrategy.js +1 -1
  167. package/views/2d/layers/imagery/VectorFieldTileView2D.js +1 -1
  168. package/views/3d/analysis/AreaMeasurement/support/AreaMeasurementVisualization.js +1 -1
  169. package/views/3d/analysis/AreaMeasurement/support/MeasurementData.js +1 -1
  170. package/views/3d/analysis/AreaMeasurementAnalysisView3D.js +1 -1
  171. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillController.js +1 -1
  172. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementRawResult.js +5 -0
  173. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementResult.d.ts +5 -1
  174. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementResult.js +1 -1
  175. package/views/3d/analysis/VolumeMeasurementAnalysisView3D.js +1 -1
  176. package/views/3d/environment/EnvironmentManager.js +1 -1
  177. package/views/3d/layers/FlowSubView3D.js +1 -1
  178. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  179. package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
  180. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  181. package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
  182. package/views/3d/layers/graphics/emissiveUtils.js +5 -0
  183. package/views/3d/layers/support/layerUtils.js +1 -1
  184. package/views/3d/support/mathUtils.js +1 -1
  185. package/views/3d/support/pointsOfInterest/StableSurfaceCenter.js +1 -1
  186. package/views/3d/support/supportedSpatialReference.js +1 -1
  187. package/views/3d/terrain/terrainUtils.js +1 -1
  188. package/views/3d/webgl-engine/core/shaderLibrary/util/EllipsoidMode.js +1 -1
  189. package/views/3d/webgl-engine/parts/RenderView.js +1 -1
  190. package/views/3d/webgl-engine/shaders/AnimatedLine.glsl.js +31 -23
  191. package/views/VideoView.js +1 -1
  192. package/views/input/ViewEvents.js +1 -1
  193. package/views/input/recognizers/VerticalTwoFingerDrag.js +1 -1
  194. package/views/input/types.d.ts +94 -0
  195. package/views/interactive/tooltip/components/DrawHeaderActions.js +1 -1
  196. package/views/support/MeasurementWorker.js +1 -1
  197. package/views/support/MeasurementWorkerHandle.js +1 -1
  198. package/views/support/measurementUtils.js +1 -1
  199. package/views/support/screenUtils.js +1 -1
  200. package/widgets/AreaMeasurement2D/AreaMeasurement2DTool.js +1 -1
  201. package/widgets/AreaMeasurement2D.d.ts +1 -0
  202. package/widgets/AreaMeasurement2D.js +1 -1
  203. package/widgets/BasemapLayerList.d.ts +1 -0
  204. package/widgets/BasemapLayerList.js +1 -1
  205. package/widgets/CatalogLayerList.d.ts +1 -0
  206. package/widgets/CatalogLayerList.js +1 -1
  207. package/widgets/Directions.d.ts +1 -0
  208. package/widgets/Directions.js +1 -1
  209. package/widgets/DistanceMeasurement2D.d.ts +1 -0
  210. package/widgets/DistanceMeasurement2D.js +1 -1
  211. package/widgets/Editor.d.ts +1 -0
  212. package/widgets/Editor.js +1 -1
  213. package/widgets/FeatureForm.d.ts +1 -0
  214. package/widgets/FeatureForm.js +1 -1
  215. package/widgets/FeatureTable.d.ts +1 -0
  216. package/widgets/FeatureTable.js +1 -1
  217. package/widgets/FloorFilter.d.ts +1 -0
  218. package/widgets/FloorFilter.js +1 -1
  219. package/widgets/LayerList.d.ts +1 -0
  220. package/widgets/LayerList.js +1 -1
  221. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  222. package/widgets/OrientedImageryViewer/adapters/sketch/DataCaptureAdapter.js +1 -1
  223. package/widgets/OrientedImageryViewer/adapters/sketch/TriangulatedMeasurementAdapter.js +1 -1
  224. package/widgets/OrientedImageryViewer/adapters/view/MapViewAdapter.js +1 -1
  225. package/widgets/OrientedImageryViewer/adapters/view/SceneViewAdapter.js +1 -1
  226. package/widgets/OrientedImageryViewer/components/ImageOverlays.js +1 -1
  227. package/widgets/OrientedImageryViewer/components/OverlayLayersListViewModel.js +1 -1
  228. package/widgets/OrientedImageryViewer/services/TransformationService.js +5 -0
  229. package/widgets/OrientedImageryViewer/support/dataCaptureUtils.js +5 -0
  230. package/widgets/OrientedImageryViewer/support/geometryUtils.js +5 -0
  231. package/widgets/OrientedImageryViewer/support/typeUtils.js +5 -0
  232. package/widgets/ScaleRangeSlider.d.ts +1 -0
  233. package/widgets/ScaleRangeSlider.js +1 -1
  234. package/widgets/Sketch.d.ts +1 -0
  235. package/widgets/Sketch.js +1 -1
  236. package/widgets/TableList.d.ts +1 -0
  237. package/widgets/TableList.js +1 -1
  238. package/widgets/TimeSlider.d.ts +1 -0
  239. package/widgets/TimeSlider.js +1 -1
  240. package/widgets/UtilityNetworkAssociations.d.ts +1 -0
  241. package/widgets/UtilityNetworkAssociations.js +1 -1
  242. package/widgets/UtilityNetworkTrace.d.ts +1 -0
  243. package/widgets/UtilityNetworkTrace.js +1 -1
  244. package/widgets/UtilityNetworkValidateTopology.d.ts +1 -0
  245. package/widgets/UtilityNetworkValidateTopology.js +1 -1
  246. package/widgets/ValuePicker.d.ts +1 -0
  247. package/widgets/ValuePicker.js +1 -1
  248. package/assets/esri/core/workers/chunks/00e135dc1b4cb024973d.js +0 -1
  249. package/assets/esri/core/workers/chunks/03d037f9f04f165aac63.js +0 -1
  250. package/assets/esri/core/workers/chunks/03da31c7635d077e8d99.js +0 -1
  251. package/assets/esri/core/workers/chunks/0dcf1f3b6aa84cbe03a9.js +0 -1
  252. package/assets/esri/core/workers/chunks/185c97bc63ce546995ce.js +0 -1
  253. package/assets/esri/core/workers/chunks/1a62c456e791c82050fe.js +0 -1
  254. package/assets/esri/core/workers/chunks/21163137e345badb1aaf.js +0 -1
  255. package/assets/esri/core/workers/chunks/25dead73dfc5a4c19285.js +0 -1
  256. package/assets/esri/core/workers/chunks/2767b69085c9f7a1e1af.js +0 -1
  257. package/assets/esri/core/workers/chunks/43e9eaedf65921b58eb2.js +0 -1
  258. package/assets/esri/core/workers/chunks/4caec60ac0a5851730c6.js +0 -1
  259. package/assets/esri/core/workers/chunks/5119e3159617b8e1ea13.js +0 -1
  260. package/assets/esri/core/workers/chunks/59d3f3fbae775fd7686e.js +0 -1
  261. package/assets/esri/core/workers/chunks/5a706eecd8a988fae6b7.js +0 -1
  262. package/assets/esri/core/workers/chunks/5ba2bbbb42ef1920579d.js +0 -1
  263. package/assets/esri/core/workers/chunks/5cc731f161012b63c77a.js +0 -1
  264. package/assets/esri/core/workers/chunks/5fa8fe6353dbdda0b06a.js +0 -1
  265. package/assets/esri/core/workers/chunks/6107b58457a70c8de9da.js +0 -1
  266. package/assets/esri/core/workers/chunks/654eef3ad30f34c42e12.js +0 -1
  267. package/assets/esri/core/workers/chunks/6d9e92d9c2503d5dc8dd.js +0 -1
  268. package/assets/esri/core/workers/chunks/7130b09300032d3a5925.js +0 -1
  269. package/assets/esri/core/workers/chunks/7f7c4ffbdf7b20dc7a54.js +0 -1
  270. package/assets/esri/core/workers/chunks/804c9666d0dc548b9f79.js +0 -1
  271. package/assets/esri/core/workers/chunks/8258b1c8ba6d44ba19c3.js +0 -1
  272. package/assets/esri/core/workers/chunks/8f2fc50eb988c0228b05.js +0 -1
  273. package/assets/esri/core/workers/chunks/97ad3eb25ad003c16148.js +0 -1
  274. package/assets/esri/core/workers/chunks/a270e34bb248114ec280.js +0 -1
  275. package/assets/esri/core/workers/chunks/a56a5e00964d4cd59a66.js +0 -1
  276. package/assets/esri/core/workers/chunks/a774b4fc7df801503bea.js +0 -1
  277. package/assets/esri/core/workers/chunks/b1015e1f25b60c08d2cf.js +0 -1
  278. package/assets/esri/core/workers/chunks/c18a2948ae3cb527d8bb.js +0 -1
  279. package/assets/esri/core/workers/chunks/d4f4c0201d8b641709c0.js +0 -1
  280. package/assets/esri/core/workers/chunks/d6d9d56b3733622deab6.js +0 -1
  281. package/assets/esri/core/workers/chunks/dedd9d47ccc019ffc484.js +0 -1
  282. package/assets/esri/core/workers/chunks/e271065410ba5c872f53.js +0 -1
  283. package/assets/esri/core/workers/chunks/e8a0654cebafa22b5b56.js +0 -1
  284. package/assets/esri/core/workers/chunks/ecf7d34b37ce6f0877af.js +0 -1
  285. package/assets/esri/core/workers/chunks/f25eb512592a84a508c1.js +0 -1
  286. package/assets/esri/core/workers/chunks/f64ec13167eb51da2f9b.js +0 -1
  287. package/views/2d/engine/imagery/BrushVectorField.js +0 -5
  288. package/views/3d/analysis/AreaMeasurement/support/utils.js +0 -5
  289. package/views/3d/analysis/VolumeMeasurement/volumeMeasurementUtils.js +0 -5
  290. package/widgets/OrientedImageryViewer/dataCaptureUtils.js +0 -5
@@ -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 n,on as s,sync as o,initial as l}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()},o),n(()=>this._effectiveVisibleElements.selectionColumn,e=>{this.grid&&(this.grid.selectionColumnEnabled=e)},l),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:o,size:l}=this;if(o)return a.sanitize("function"==typeof o?o():o);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:l,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 pendingEditsCount(){return this.viewModel.pendingEditsCount}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:o,tooltips:l}=n,a=null!=e.objectId;if(t)return new S({columnDescriptions:s,columnMenus:o,tooltips:l,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:o,tooltips:l,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:o,tooltips:l,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}addPendingEdits(e){this.viewModel.addPendingEdits(e)}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()}discardPendingEdits(e){this.viewModel.discardPendingEdits(e)}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,o=this.hasContingentValues,l=[L("calcite-button",{appearance:"outline",disabled:t,iconStart:G.reset,key:"footer-reset-button",onclick:()=>this.discardPendingEdits(),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(o){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;l.push(L("div",{class:Z.footerMessage,key:"footer-message",slot:"footer-start"},n,t))}return l}_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,o=t(n.deleteAttachmentCount,{count:i.length});this.showPrompt({title:o,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:o}=e;if(!i)return L("calcite-action",{disabled:t??this.menuConfig?.disabled,icon:n??void 0,key:s,onclick:()=>o(),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:o,fieldName:l,hidden:a}=t;return L("calcite-list-item",{expanded:!(!n?.length||a)||void 0,key:`toggle-columns__item-${l}`,label:o,selected:!a,value:l,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:o,pageSize:l,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:o,pageSize:l,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:o}=e,{messages:l}=this;return y(i)?L("img",{alt:n,key:`thumbnail-image-${n}`,src:`${o}${o?.includes("?")?"&":"?"}s=${s}`,title:n}):t?[L("calcite-icon",{icon:f(i),key:`thumbnail-icon-${n}`,scale:"l",textLabel:n,title:n}),l.noPreviewAvailable]:l.noPreviewAvailable}_renderAttachmentsViewInformation(){const{attachmentsViewOptions:e,messages:t,messagesUnits:i}=this,{attachmentInfo:n,objectId:s}=e;if(!n||null==s)return;const{contentType:o,name:l}=n;return L("div",{class:Z.attachmentsViewInformation,key:"information"},this._renderAttachmentViewInformationButtons(n,s),L("calcite-icon",{"aria-hidden":!0,icon:f(o),key:"attachment-icon",scale:"l",textLabel:l}),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,o="details"!==i.effectiveMode,l=e.id,a=[L("calcite-button",{appearance:"outline",disabled:o,key:"download-button",onclick:e=>{e.preventDefault(),this.downloadAttachmentById(t,l)},width:"full"},n.download)];return this.supportsUpdateAttachments&&a.push(L("calcite-button",{appearance:"outline",disabled:o,key:"replace-button",onclick:()=>{i.mode="file",i.attachmentId=l},width:"full"},n.replace)),this.supportsDeleteAttachments&&a.push(L("calcite-button",{appearance:"outline",disabled:o,key:"delete-button",onclick:()=>{this.deleteAttachments(t,[l],!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:o}=e;return L("calcite-list",{afterCreate:j,afterRemoved:$,afterUpdate:j,bind:this,class:Z.attachmentsViewList,"data-node-ref":"attachmentsList",key:`attachments-list-${o}`,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:l,size:a}=t,c=r(n,a??0);return L("calcite-list-item",{afterRemoved:()=>this.scheduleRender(),key:`attachment-${s}`,label:l,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:l,onclick:e=>{e.preventDefault(),this.downloadAttachmentById(o??-1,s)},slot:"actions-end",text:i.downloadAttachment,title:i.downloadAttachment}),L("calcite-action",{icon:G.chevronRight,iconFlipRtl:!0,key:"details",label:l,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:o}=e,l=`${o}${o?.includes("?")?"&":"?"}w=${t}&s=${s}`;return this.supportsResizeAttachments&&y(i)?L("img",{alt:n,key:`thumbnail-image-${n}`,src:l,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:o,relatedTables:l}=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=o?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:()=>{o&&this.drainRelatedTables(),e.attachmentsViewOptions.objectId=null},scale:s,text:this.layer?.title??"",textEnabled:!1,title:o?i.exitRelatedRecords:i.exitAttachments}),l.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,"pendingEditsCount",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};
5
+ import{__decorate as e}from"tslib";import{substitute as t}from"../intl.js";import{isSome as i}from"../core/arrayUtils.js";import{deprecateWidget as n}from"../core/deprecate.js";import s from"../core/Logger.js";import{watch as o,on as l,sync as a,initial as r}from"../core/reactiveUtils.js";import{renderingSanitizer as c}from"../core/sanitizerUtils.js";import{formatFileSize as d}from"../core/unitFormatUtils.js";import{property as h,subclass as m}from"../core/accessorSupport/decorators.js";import{geometryTypes as p}from"../geometry/support/typeUtils.js";import{isLayerFromCatalog as u}from"../layers/catalog/catalogUtils.js";import{isKnowledgeGraphLayer as g,isMapImageLayer as w,isSubtypeGroupLayer as b}from"../layers/support/layerUtils.js";import v from"../tables/AttributeTableTemplate.js";import y from"../time/TimeExtent.js";import f from"./Widget.js";import{isSupportedImage as _,getCalciteIconForAttachment as M}from"./Attachments/support/attachmentUtils.js";import{loadPromptComponents as C,Prompt as A}from"./Editor/components/Prompt.js";import S from"./FeatureTable/ColumnMenuVisibleElements.js";import V from"./FeatureTable/FeatureTableViewModel.js";import T from"./FeatureTable/VisibleElements.js";import{isGroupColumn as E}from"./FeatureTable/support/columnUtils.js";import I from"./FeatureTable/support/TableTemplate.js";import{loadFieldColumnComponents as D,isIFeatureTableSupportedLayer as k,isIFeatureTableSupportedLayerWithAttachments as R,getRelationshipIdsToShow as P}from"./FeatureTable/support/tableUtils.js";import{loadCalciteComponents as x}from"./support/componentsUtils.js";import{globalCss as F}from"./support/globalCss.js";import{getIconForLayer as O}from"./support/iconUtils.js";import{messageBundle as L,vmEvent as z,tsx as j,tsxFragment as $}from"./support/widget.js";import{storeNode as U,discardNode as N}from"./support/widgetUtils.js";var B;const H="esri-feature-table",Z=`${H}__dialog`,G=`${H}__attachments-view`,W={base:H,content:`${H}__content`,menuPopover:`${H}__menu-popover`,layerDropdownMenu:`${H}__layer-switcher-menu`,tableContainer:`${H}__table-container`,tableContainerWithAttachments:`${H}__table-container--attachments`,tableNavigation:`${H}__table-navigation`,attachmentsView:G,attachmentsViewContent:`${G}__content`,attachmentsViewDetails:`${G}__details`,attachmentsViewDropArea:`${G}__drop-area`,attachmentsViewDropAreaLabel:`${G}__drop-area__label`,attachmentsViewDropAreaMessage:`${G}__drop-area__message`,attachmentsViewIcon:`${G}__icon`,attachmentsViewInformation:`${G}__information`,attachmentsViewInformationData:`${G}__information__data`,attachmentsViewInformationLabel:`${G}__information__label`,attachmentsViewList:`${G}__list`,attachmentsViewListFileSize:`${G}__list__filesize`,attachmentsViewListThumbnail:`${G}__list__thumbnail`,expanded:`${H}__expanded`,collapsed:`${H}__collapsed`,dialog:`${Z}`,dialogContent:`${Z}__content`,dialogHeader:`${Z}__header`,footerMessage:`${H}__footer__message`,footerIconDanger:`${H}__footer__icon--danger`},Q={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 K=B=class extends f{constructor(e,t){super(e,t),this._attachmentsDialogPreviewLoading=!1,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 V,this.visibleElements=new T,n(s.getLogger(this),"Feature Table","arcgis-feature-table",{version:"5.0"}),this._showDeletePrompt=this._showDeletePrompt.bind(this),this._onDeleteSelectionClick=this._onDeleteSelectionClick.bind(this)}initialize(){this.addHandles([o(()=>[this.isQueryingOrSyncing,this.editingEnabled],()=>this.scheduleRender()),o(()=>[this._effectiveVisibleElements,this._effectiveVisibleElements.columnDescriptions,this._effectiveVisibleElements.columnMenus,this._effectiveVisibleElements.columnMenuItems,this.columns.length],()=>{this.columns.forEach(e=>e.visibleElements=this._effectiveVisibleElements),this.refreshCellContent()},a),o(()=>this._effectiveVisibleElements.selectionColumn,e=>{this.grid&&(this.grid.selectionColumnEnabled=e)},r),l(()=>this.viewModel,"show-related-table",e=>this._onShowRelatedTable(e)),o(()=>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"),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")}),C(),D()])}destroy(){this.drainRelatedTables(),this.clearPrompt()}get _attachmentsViewFileCancelNode(){const{hasAttachments:e,hasCandidates:t}=this.attachmentsViewOptions;if(e||t)return j("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 j("span",{class:W.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 j("span",{class:W.attachmentsViewDropAreaMessage,key:"message-node"},i)}get _attachmentsViewFileNameNode(){const e=this.attachmentsViewOptions.candidates,t=Array.from(e??[]).at(-1);if(t)return j("span",{class:W.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 j("calcite-button",{appearance:"solid",disabled:e,iconStart:Q.save,key:"save-node",loading:e,onclick:()=>{this.saveAttachmentsViewForm()}},i?t?.updateAttachment:t?.addAttachment)}get _attachmentsViewFileSelectNode(){if(this.supportsAddAttachments)return j("calcite-button",{appearance:"outline-fill",disabled:this.isSyncingAttachments,iconStart:Q.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?c.sanitize("function"==typeof e?e():e):void 0}get _effectiveLayers(){const{layer:e,layers:t}=this,i=t?.length?t.filter(k):[],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:o,size:l}=this;if(o)return c.sanitize("function"==typeof o?o():o);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:c.sanitize(e.title),count:l,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=>{!k(e)||b(e)||t.has(e)||"sublayer"===e.type&&!e.capabilities?.operations?.supportsQuery||(e.load(),t.add(e))},n=e=>{u(e)||"catalog-footprint"===e.type||(g(e)?(e.load(),e.layers?.forEach(i),e.tables?.forEach(i)):w(e)?(e.loadAll(),e.allSublayers?.forEach(i),e.subtables?.forEach(i)):b(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 Q.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 pendingEditsCount(){return this.viewModel.pendingEditsCount}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:o,tooltips:l}=n,a=null!=e.objectId;if(t)return new T({columnDescriptions:s,columnMenus:o,tooltips:l,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 S({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 T({columnDescriptions:s,columnMenus:o,tooltips:l,selectionColumn:r,close:!1,header:!1,layerDropdown:!1,menu:!1,progress:!1,columnMenuItems:new S({sortAscending:c,sortDescending:c})})}return a?new T({columnDescriptions:s,columnMenus:o,tooltips:l,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 S({sortAscending:!1,sortDescending:!1})}):null}addPendingEdits(e){this.viewModel.addPendingEdits(e)}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()}discardPendingEdits(e){this.viewModel.discardPendingEdits(e)}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 j("div",{bind:this,class:this.classes(W.base,F.widget)},j("calcite-panel",{bind:this,class:W.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?j("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(W.tableContainer);if(t.length){const n=this.classes(W.base,this.allRelatedTablesVisible?W.expanded:W.collapsed,this._shouldShowAttachmentsView?W.tableContainerWithAttachments:void 0);return j("div",{class:i},j("calcite-panel",{overlayPositioning:"fixed"},j("div",null,[this._shouldShowGrid?j("div",{class:n},e?.render(),this._renderPagination()):void 0,...this._filteredTables.map(e=>{const i=t.indexOf(e);return j("div",{class:n,key:`related-${i}`},e.render())}),,])))}return null!=this.attachmentsViewOptions.objectId?j("div",{class:i},j("calcite-panel",{overlayPositioning:"fixed"},j("div",null,[j("div",{class:this.classes(W.base,W.collapsed)},e?.render(),this._renderPagination()),this._renderAttachmentsView()]))):[j("div",{class:i},e?.render()),this._renderPagination()]}_renderPagination(){if(this.paginationEnabled)return j("calcite-pagination",{pageSize:1,startItem:this.pageIndex+1,totalItems:this.pageCount,onCalcitePaginationChange:e=>{this._attachmentsDialogPreviewLoading=!1,this.goToPage(e.currentTarget.startItem-1)}})}_renderError(){const{messages:e}=this;return j("calcite-alert",{autoClose:!0,autoCloseDuration:"fast",icon:Q.exclamationMarkTriangle,kind:"danger",label:e.errorOccured,open:this._hasAttachmentsViewError,slot:"alerts",onCalciteAlertClose:()=>{this.attachmentsViewOptions.error=null}},j("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,o=this.hasContingentValues,l=[j("calcite-button",{appearance:"outline",disabled:t,iconStart:Q.reset,key:"footer-reset-button",onclick:()=>this.discardPendingEdits(),slot:"footer-end",width:"auto"},n.reset),j("calcite-button",{disabled:s,iconStart:Q.save,key:"footer-save-button",loading:this.isSyncing,onclick:()=>{this.savePendingEdits()},slot:"footer-end",width:"auto"},n.save)];if(o){const t=e?i.contingentValues.hasInvalidValues:i.contingentValues.hasValidValues,n=e?j("calcite-icon",{class:W.footerIconDanger,icon:Q.exclamationMarkTriangle,scale:"s",slot:"footer-start"}):void 0;l.push(j("div",{class:W.footerMessage,key:"footer-message",slot:"footer-start"},n,t))}return l}_renderPrompt(){return this.prompt?j(A,{...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,o=t(n.deleteAttachmentCount,{count:i.length});this.showPrompt({title:o,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 j("calcite-dialog",{class:W.dialog,description:this.viewModel.getFeatureTitleSync(i),heading:t.attachments,modal:!0,open:this._dialogIsOpen,placement:"cover",width:"l",onCalciteDialogClose:()=>this._onDialogClose()},this._renderDialogContent())}_renderDialogContent(){const e=this.attachmentsViewOptions.dialogInfo;if(e)return this._renderAttachmentsDialogContent(e)}_renderAttachmentsDialogContent(e){const{attachmentsViewOptions:t,messages:i}=this,{attachmentInfos:n}=t,s=n.indexOf(e);return j($,null,j("div",{class:W.dialogHeader,key:"header",slot:"content-top"},j("span",null,e.name),j("calcite-button",{appearance:"outline",onclick:()=>{t.attachmentId=e.id,t.dialogId=null}},i.viewDetails)),j("calcite-progress",{type:this._attachmentsDialogPreviewLoading?"indeterminate":"determinate"}),j("div",{class:W.dialogContent,key:"content"},this._renderAttachmentsViewDetailsImage(e,!0)),j("calcite-pagination",{pageSize:1,slot:"footer",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),this._attachmentsDialogPreviewLoading=!1}_renderHeaderMenuAction(e){const{disabled:t,hidden:i,icon:n,text:s,clickFunction:o}=e;if(!i)return j("calcite-action",{disabled:t??this.menuConfig?.disabled,icon:n??void 0,key:s,onclick:()=>o(),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:Q.refresh,text:e.refreshData,clickFunction:()=>this.refresh()},this._showDeleteSelectionAction&&{icon:Q.delete,text:e.deleteSelection,clickFunction:()=>this.deleteSelection(!0)},this._showClearSelectionAction&&{icon:Q.clearSelection,text:e.clearSelection,clickFunction:()=>this.highlightIds?.removeAll()},this._showZoomToSelectionAction&&{icon:Q.zoomToSelection,text:e.zoomToSelection,clickFunction:()=>this.zoomToSelection()},this._showSelectedRecordsShowSelectedAction&&{icon:Q.showSelected,text:e.showSelected,clickFunction:()=>{const{objectIds:e}=this;e.removeAll(),e.addMany(this.highlightIds.toArray())}},this._showSelectedRecordsShowAllAction&&{icon:Q.showAll,text:e.showAllRecords,clickFunction:()=>this.objectIds.removeAll()},this._showExportSelectionToCSVAction&&{icon:Q.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 j("calcite-action",{afterCreate:t=>e.set(i,t),afterRemoved:()=>e.delete(i),bind:this,disabled:t.menuConfig?.disabled,icon:Q.showColumn,id:`${i}__toggle-columns-action`,slot:"header-actions-end",text:n},this._effectiveVisibleElements.tooltips?j("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 j("calcite-popover",{autoClose:!0,class:W.menuPopover,label:t,overlayPositioning:"fixed",placement:"top-end",pointerDisabled:!0,referenceElement:this._columnVisibilityActions.get(this.id)},j("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:n,ignoreSelect:s}=e,{effectiveLabel:o,fieldName:l,hidden:a}=t;return j("calcite-list-item",{expanded:!(!n?.length||a)||void 0,key:`toggle-columns__item-${l}`,label:o,selected:!a,value:l,onCalciteListItemSelect:e=>{s&&e.stopPropagation(),i.toggleColumnVisibility(e.currentTarget.value)}},n)}_renderLayerDropdown(){const e=this.messages.selectALayer;return j("div",{class:W.layerDropdownMenu,key:`${this.id}-layerDropdown`,slot:"header-actions-start"},j("calcite-dropdown",{bind:this,maxItems:5,overlayPositioning:"fixed",placement:"bottom-start"},j("calcite-action",{icon:Q.layers,slot:"trigger",text:e,title:e}),j("calcite-dropdown-group",{selectionMode:"single"},this._effectiveLayers.map((e,t)=>this._renderLayerDropdownItem(e,t))??null)))}_renderLayerDropdownItem(e,t){const i=this.visibleElements.layerDropdownIcons;return j("calcite-dropdown-item",{iconStart:i?O(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:o,pageSize:l,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 B({layer:c,autoRefreshEnabled:t,autoSaveEnabled:i,attachmentsEnabled:p,editingEnabled:n,paginationEnabled:o,pageSize:l,relatedRecordsEnabled:!0,relationshipConfig:{objectId:d,relatedLayer:h,relationshipId:m},relationshipColumnConfigs:P(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[j("div",{class:W.attachmentsView,key:"attachments-view"},this._renderAttachmentsViewInformation(),j("div",{class:W.attachmentsViewContent,key:"attachments-view-content"},j("div",{bind:this,class:W.attachmentsViewDropArea,ondragover:e=>e.preventDefault(),ondrop:this._onAttachmentsViewDrop},j("calcite-icon",{class:W.attachmentsViewIcon,icon:Q.upload,scale:"l"}),this._attachmentsViewFileLabelNode,this._attachmentsViewFileMessageNode,j("form",{afterCreate:t=>e.form=t,afterRemoved:()=>e.form=null,bind:this,key:"attachments-form"},j("fieldset",null,this._attachmentsViewFileNameNode,j("input",{afterCreate:U,afterRemoved:N,afterUpdate:U,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[j("div",{class:W.attachmentsView,key:"attachments-view"},this._renderAttachmentsViewInformation(),j("div",{class:W.attachmentsViewContent,key:"attachments-view-content"},j("div",{class:W.attachmentsViewDetails},this._renderAttachmentsViewDetailsPreview(e))))]}_renderAttachmentsViewDetailsPreview(e){const t=this.messages;if(!_(e.contentType))return j("span",null,t.noPreviewAvailable);const i=t.maximize;return[this._renderAttachmentsViewDetailsImage(e),j("calcite-action",{icon:Q.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:o}=e,{messages:l}=this;return _(i)?j("img",{afterCreate:()=>this._attachmentsDialogPreviewLoading=!0,alt:n,key:`thumbnail-image-${n}`,onerror:()=>this._attachmentsDialogPreviewLoading=!1,onload:()=>this._attachmentsDialogPreviewLoading=!1,src:`${o}${o?.includes("?")?"&":"?"}s=${s}`,title:n}):t?[j("calcite-icon",{icon:M(i),key:`thumbnail-icon-${n}`,scale:"l",textLabel:n,title:n}),l.noPreviewAvailable]:l.noPreviewAvailable}_renderAttachmentsViewInformation(){const{attachmentsViewOptions:e,messages:t,messagesUnits:i}=this,{attachmentInfo:n,objectId:s}=e;if(!n||null==s)return;const{contentType:o,name:l}=n;return j("div",{class:W.attachmentsViewInformation,key:"information"},this._renderAttachmentViewInformationButtons(n,s),j("calcite-icon",{"aria-hidden":!0,icon:M(o),key:"attachment-icon",scale:"l",textLabel:l}),j("span",{class:W.attachmentsViewInformationLabel,key:"file-label"},t.fileName),j("span",{class:W.attachmentsViewInformationData,key:"file-value"},n.name),j("span",{class:W.attachmentsViewInformationLabel,key:"type-label"},t.attachmentType),j("span",{class:W.attachmentsViewInformationData,key:"type-value"},this._getLabelForAttachmentType(n)),this._renderAttachmentKeywordDetails(n),j("span",{class:W.attachmentsViewInformationLabel,key:"size-label"},t.size),j("span",{class:W.attachmentsViewInformationData,key:"size-span"},d(i,n.size??0)))}_renderAttachmentViewInformationButtons(e,t){const{attachmentsViewOptions:i,messages:n,messagesCommon:s}=this,o="details"!==i.effectiveMode,l=e.id,a=[j("calcite-button",{appearance:"outline",disabled:o,key:"download-button",onclick:e=>{e.preventDefault(),this.downloadAttachmentById(t,l)},width:"full"},n.download)];return this.supportsUpdateAttachments&&a.push(j("calcite-button",{appearance:"outline",disabled:o,key:"replace-button",onclick:()=>{i.mode="file",i.attachmentId=l},width:"full"},n.replace)),this.supportsDeleteAttachments&&a.push(j("calcite-button",{appearance:"outline",disabled:o,key:"delete-button",onclick:()=>{this.deleteAttachments(t,[l],!0)},width:"full"},s.delete)),a}_renderAttachmentKeywordDetails({keywords:e}){if(e&&""!==e)return[j("span",{class:W.attachmentsViewInformationLabel,key:"keyword-label"},this.messages.keyword),j("span",{class:W.attachmentsViewInformationData,key:"keyword-value"},e)]}_renderAttachmentsViewList(){const{attachmentsViewOptions:e,isSyncingAttachments:t,messages:i,messagesUnits:n}=this,{attachmentInfos:s,objectId:o}=e;return j("calcite-list",{afterCreate:U,afterRemoved:N,afterUpdate:U,bind:this,class:W.attachmentsViewList,"data-node-ref":"attachmentsList",key:`attachments-list-${o}`,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:l,size:a}=t,r=d(n,a??0);return j("calcite-list-item",{afterRemoved:()=>this.scheduleRender(),key:`attachment-${s}`,label:l,value:s},this._renderAttachmentsViewListPreview(t),j("span",{class:W.attachmentsViewListFileSize,slot:"actions-end",title:r},r),j("calcite-action",{icon:Q.downloadTo,key:"download",label:l,onclick:e=>{e.preventDefault(),this.downloadAttachmentById(o??-1,s)},slot:"actions-end",text:i.downloadAttachment,title:i.downloadAttachment}),j("calcite-action",{icon:Q.chevronRight,iconFlipRtl:!0,key:"details",label:l,onclick:()=>{e.mode="details",e.attachmentId=s},slot:"actions-end",text:i.viewAttachment,title:i.viewAttachment}))}))}_renderAttachmentsViewListPreview(e){return j("div",{class:W.attachmentsViewListThumbnail,slot:"content-start"},j("span",null,this._renderAttachmentsViewListImage(e)))}_renderAttachmentsViewListImage(e,t=64){const{contentType:i,name:n,size:s,url:o}=e,l=`${o}${o?.includes("?")?"&":"?"}w=${t}&s=${s}`;return this.supportsResizeAttachments&&_(i)?j("img",{alt:n,key:`thumbnail-image-${n}`,src:l,title:n}):j("calcite-icon",{icon:M(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:o,relatedTables:l}=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?j("calcite-action",{bind:this,icon:Q.chevronRight,iconFlipRtl:!0,key:"navigation-feature",onclick:()=>e.scrollToRow(p),scale:s,text:b,textEnabled:!0,title:b}):void 0,_=u?j("calcite-action",{icon:Q.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?j("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=o?j("calcite-label",{layout:"inline",scale:s},i.showAllTables,j("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?j("calcite-action",{icon:Q.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?j("calcite-action",{bind:this,icon:Q.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 j("div",{class:W.tableNavigation,key:"table-nav"},j("calcite-action",{icon:Q.moveUp,iconFlipRtl:!0,key:"go-back",onclick:()=>{o&&this.drainRelatedTables(),e.attachmentsViewOptions.objectId=null},scale:s,text:this.layer?.title??"",textEnabled:!1,title:o?i.exitRelatedRecords:i.exitAttachments}),l.toArray().map((e,t)=>this._renderRelatedTableNavigationAction(e,t)),f,_,j("div",null,M,C,A,S))}_renderRelatedTableNavigationAction(e,t){const i=this._getLabelForRelatedTableNavigationAction(e);return j("calcite-action",{icon:Q.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([h()],K.prototype,"_attachmentsDialogPreviewLoading",void 0),e([h()],K.prototype,"_attachmentsInput",void 0),e([h()],K.prototype,"_attachmentsViewFileCancelNode",null),e([h()],K.prototype,"_attachmentsViewFileLabelNode",null),e([h()],K.prototype,"_attachmentsViewFileMessageNode",null),e([h()],K.prototype,"_attachmentsViewFileNameNode",null),e([h()],K.prototype,"_attachmentsViewFileSaveNode",null),e([h()],K.prototype,"_attachmentsViewFileSelectNode",null),e([h()],K.prototype,"_columnVisibilityActions",void 0),e([h()],K.prototype,"_dialogIsOpen",null),e([h()],K.prototype,"_effectiveDescription",null),e([h()],K.prototype,"_effectiveLayers",null),e([h()],K.prototype,"_effectiveTitle",null),e([h()],K.prototype,"_effectiveVisibleElements",null),e([h()],K.prototype,"_filteredTables",null),e([h()],K.prototype,"_hasAttachmentsViewError",null),e([h()],K.prototype,"_hasCustomMenuItems",null),e([h()],K.prototype,"_hasDefaultMenuItems",null),e([h()],K.prototype,"_shouldShowGrid",null),e([h()],K.prototype,"_shouldShowMenu",null),e([h()],K.prototype,"_shouldShowAttachmentsView",null),e([h()],K.prototype,"_showClearSelectionAction",null),e([h()],K.prototype,"_showColumnsVisibilityAction",null),e([h()],K.prototype,"_showDeleteSelectionAction",null),e([h()],K.prototype,"_showExportSelectionToCSVAction",null),e([h()],K.prototype,"_showLayerDropdown",null),e([h()],K.prototype,"_shouldShowNavigationBar",null),e([h()],K.prototype,"_showRefreshDataAction",null),e([h()],K.prototype,"_showSelectedRecordsShowSelectedAction",null),e([h()],K.prototype,"_showSelectedRecordsShowAllAction",null),e([h()],K.prototype,"_showZoomToSelectionAction",null),e([h()],K.prototype,"_viewLayers",null),e([h()],K.prototype,"attachmentsList",void 0),e([h({readOnly:!0})],K.prototype,"grid",null),e([h()],K.prototype,"actionColumn",null),e([h()],K.prototype,"actionColumnConfig",null),e([h({readOnly:!0})],K.prototype,"activeFilters",null),e([h({readOnly:!0})],K.prototype,"activeSortOrders",null),e([h()],K.prototype,"allColumns",null),e([h({readOnly:!0})],K.prototype,"allRelatedTablesVisible",null),e([h()],K.prototype,"allVisibleColumns",null),e([h()],K.prototype,"attachmentsColumns",null),e([h()],K.prototype,"attachmentsEnabled",null),e([h()],K.prototype,"attachmentsViewOptions",null),e([h({type:v})],K.prototype,"attributeTableTemplate",null),e([h()],K.prototype,"autoRefreshEnabled",null),e([h()],K.prototype,"autoSaveEnabled",null),e([h()],K.prototype,"clearPrompt",null),e([h()],K.prototype,"columnPerformanceModeEnabled",null),e([h()],K.prototype,"columnReorderingEnabled",null),e([h({readOnly:!0})],K.prototype,"columns",null),e([h()],K.prototype,"definitionExpression",null),e([h()],K.prototype,"description",void 0),e([h()],K.prototype,"disabled",void 0),e([h()],K.prototype,"editingEnabled",null),e([h()],K.prototype,"effectiveSize",null),e([h()],K.prototype,"effectiveTable",null),e([h()],K.prototype,"fieldColumns",null),e([h({types:p})],K.prototype,"filterGeometry",null),e([h()],K.prototype,"filterBySelectionEnabled",null),e([h()],K.prototype,"groupColumns",null),e([h()],K.prototype,"hasContingentValues",null),e([h()],K.prototype,"hasInvalidPendingEdits",null),e([h()],K.prototype,"hasPendingEdits",null),e([h()],K.prototype,"hiddenFields",null),e([h()],K.prototype,"highlightEnabled",null),e([h()],K.prototype,"highlightIds",null),e([h()],K.prototype,"icon",null),e([h()],K.prototype,"initialSize",null),e([h()],K.prototype,"isQueryingOrSyncing",null),e([h()],K.prototype,"isSyncing",null),e([h()],K.prototype,"isSyncingAttachments",null),e([h()],K.prototype,"label",null),e([h()],K.prototype,"layer",null),e([h()],K.prototype,"layers",null),e([h()],K.prototype,"layerView",null),e([h()],K.prototype,"maxSize",null),e([h(),L("esri/widgets/FeatureTable/t9n/FeatureTable")],K.prototype,"messages",null),e([h(),L("esri/t9n/common")],K.prototype,"messagesCommon",null),e([h(),L("esri/core/t9n/Units")],K.prototype,"messagesUnits",null),e([h(),L("esri/widgets/support/t9n/uriUtils")],K.prototype,"messagesURIUtils",null),e([h()],K.prototype,"menuConfig",null),e([h()],K.prototype,"multipleSelectionEnabled",null),e([h()],K.prototype,"multiSortEnabled",null),e([h()],K.prototype,"multipleSortPriority",null),e([h()],K.prototype,"navigationScale",void 0),e([h()],K.prototype,"noDataMessage",null),e([h()],K.prototype,"objectIds",null),e([h()],K.prototype,"outFields",null),e([h()],K.prototype,"pageCount",null),e([h()],K.prototype,"pageIndex",null),e([h()],K.prototype,"pageSize",null),e([h()],K.prototype,"paginationEnabled",null),e([h()],K.prototype,"pendingEditsCount",null),e([h()],K.prototype,"prompt",null),e([h()],K.prototype,"relatedRecordsEnabled",null),e([h()],K.prototype,"relatedTable",null),e([h()],K.prototype,"relatedTables",null),e([h()],K.prototype,"relationship",null),e([h()],K.prototype,"relationshipColumnConfigs",null),e([h()],K.prototype,"relationshipColumns",null),e([h()],K.prototype,"relationshipConfig",null),e([h()],K.prototype,"relationshipInfos",null),e([h()],K.prototype,"returnGeometryEnabled",null),e([h()],K.prototype,"returnMEnabled",null),e([h()],K.prototype,"returnZEnabled",null),e([h()],K.prototype,"rowHighlightIds",null),e([h()],K.prototype,"selectionSource",null),e([h()],K.prototype,"showAllRelatedTables",null),e([h()],K.prototype,"showPrompt",null),e([h()],K.prototype,"showRelatedTableCallback",null),e([h()],K.prototype,"size",null),e([h({readOnly:!0})],K.prototype,"state",null),e([h()],K.prototype,"supportsAddAttachments",null),e([h()],K.prototype,"supportsAttachments",null),e([h()],K.prototype,"supportsDeleteAttachments",null),e([h()],K.prototype,"supportsResizeAttachments",null),e([h()],K.prototype,"supportsUpdateAttachments",null),e([h()],K.prototype,"syncTemplateOnChangesEnabled",null),e([h({constructOnly:!0})],K.prototype,"tableController",null),e([h({constructOnly:!0})],K.prototype,"tableParent",null),e([h({type:I})],K.prototype,"tableTemplate",null),e([h()],K.prototype,"tableTemplateOverride",null),e([h()],K.prototype,"title",void 0),e([h({type:y})],K.prototype,"timeExtent",null),e([h()],K.prototype,"timeZone",null),e([h()],K.prototype,"view",null),e([h({type:V}),z(["cell-click","cell-dblclick","cell-pointerover","cell-pointerout","cell-keydown","column-reorder","show-related-table"])],K.prototype,"viewModel",void 0),e([h()],K.prototype,"visibleColumns",null),e([h({type:T,nonNullable:!0})],K.prototype,"visibleElements",void 0),e([h({type:T})],K.prototype,"visibleElementsOverride",null),K=B=e([m("esri.widgets.FeatureTable")],K);const q=K;export{q as default};
@@ -50,6 +50,7 @@ export interface FloorFilterProperties extends WidgetProperties, Partial<Pick<Fl
50
50
  * >
51
51
  * > If a default site, facility, or level is selected in the floor filter when sharing a floor-aware web map from ArcGIS Pro, it will also be the default selection within the FloorFilter widget.
52
52
  *
53
+ * @deprecated since version 5.0. Use the [Floor Filter](https://developers.arcgis.com/javascript/latest/references/map-components/arcgis-floor-filter/) component instead. For information on widget deprecation, read about [Esri's move to web components](https://developers.arcgis.com/javascript/latest/components-transition-plan/).
53
54
  * @since 4.19
54
55
  * @see [FloorFilterViewModel](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FloorFilter-FloorFilterViewModel.html)
55
56
  * @see [Sample - FloorFilter widget](https://developers.arcgis.com/javascript/latest/sample-code/widgets-floorfilter/)
@@ -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{watch as i}from"../core/reactiveUtils.js";import{property as s,subclass as l}from"../core/accessorSupport/decorators.js";import n from"./Widget.js";import{css as o}from"./FloorFilter/css.js";import r from"./FloorFilter/FloorFilterViewModel.js";import{loadCalciteComponents as a}from"./support/componentsUtils.js";import{globalCss as c}from"./support/globalCss.js";import{Heading as h,incrementHeadingLevel as d}from"./support/Heading.js";import{messageBundle as u,tsx as v}from"./support/widget.js";import{isRTL as m,storeNode as M}from"./support/widgetUtils.js";const g=new Set(["ArrowUp","ArrowDown","End","Home"]);let f=class extends n{constructor(e,t){super(e,t),this._activeMenu=null,this._activeMenuIndex={levels:-1,menuItems:-1},this._baseNode=null,this._facilitiesListNode=null,this._levelsListNode=null,this._sitesListNode=null,this._searchInput=null,this.viewModel=new r,this.messages=null,this.messagesCommon=null,this.headingLevel=2,this._resizeObserver=new ResizeObserver(()=>this.scheduleRender()),this.addHandles(i(()=>this._searchInput,()=>this._focusSearch()))}loadDependencies(){return a({icon:()=>import("@esri/calcite-components/dist/components/calcite-icon")})}destroy(){this._resizeObserver?.disconnect()}get enabled(){return this.viewModel.enabled}set enabled(e){this.viewModel.enabled=e}get longNames(){return this.viewModel.longNames}set longNames(e){this.viewModel.longNames=e}get minimized(){return this.viewModel.minimized}set minimized(e){this.viewModel.minimized=e}get pinnedLevels(){return this.viewModel.pinnedLevels}set pinnedLevels(e){this.viewModel.pinnedLevels=e}get site(){return this.viewModel.site}set site(e){this.viewModel.site=e}get facility(){return this.viewModel.facility}set facility(e){this.viewModel.facility=e}get level(){return this.viewModel.level}set level(e){this.viewModel.level=e}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}get goToOverride(){return this.viewModel.goToOverride}set goToOverride(e){this.viewModel.goToOverride=e}get icon(){return"urban-model"}set icon(e){this._overrideIfSome("icon",e)}updateWebDocument(e){return this.viewModel.updateWebDocument(e)}render(){const{longNames:e}=this,t=e&&this.viewModel.isNormalMode?"expanded":"collapsed",i=this._renderButtons(),s=this._renderFilterMenu(),l=v("div",{class:this.classes(o.separator)}),n=this._getComponentPosition(),r=this._getPosition(n),a="top-right"===n||"bottom-right"===n,h="top-left"===n||"bottom-left"===n,d=m(this.container),u=d&&h||!d&&a?s:i,M=d&&h||!d&&a?i:s;return v("div",{afterCreate:this._afterBaseNodeCreate,class:this.classes(o.floorFilter,c.widget,`${o.floorFilterLayout}${t}`,`${o.floorFilterPosition}${r}`),key:"floor-filter-menu"},u,this.viewModel?.filterMenuOpen?l:null,M)}_renderButtons(){const e=this._getComponentPosition(),t=[];return"top"===this._getPosition(e)?(t.push(this._renderBrowseButton()),t.push(this._renderLevelButtons()),t.push(this._renderCloseLevelsButton()),t.push(this._renderZoomButton()),t.push(this._renderCollapseToggleButton())):(t.push(this._renderCollapseToggleButton()),t.push(this._renderZoomButton()),t.push(this._renderCloseLevelsButton()),t.push(this._renderLevelButtons()),t.push(this._renderBrowseButton())),v("div",{class:this.classes(c.widget,o.buttonContainer),key:"button-container"},t)}_renderBrowseButton(){const{longNames:e,messages:t}=this;return v("button",{"aria-expanded":this.viewModel.filterMenuOpen.toString(),"aria-label":t.buttons.browse,bind:this,class:this.classes(c.widget,c.widgetButton,c.interactive,("loading"===this.viewModel.state||"disabled"===this.viewModel.state)&&c.buttonDisabled,o.browseButton,this.viewModel?.filterMenuOpen&&c.widgetButtonActive),key:"browse-button",onclick:this._toggleFilterMenu,title:t.buttons.browse,type:"button"},v("div",{class:this.classes(o.buttonInfo)},v("calcite-icon",{icon:this.icon,scale:"s"}),v("span",{class:this.classes(o.buttonLabel)},e&&this.viewModel.isNormalMode?t.buttons.browse:null)))}_renderLevelButtons(){if(!this.viewModel?.filterFeatures?.levels?.levelsInfo||!this.facility)return null;const{facility:e,messagesCommon:i,messages:s}=this,l=this.viewModel?.getFacility(e),n=this.viewModel?.getFacilityLevels(e),r=n.map(e=>this._renderLevelButton(e));if(!r.length)return null;const a=l&&t(s.selector.levelsLabel,{name:`"${l.name}"`});if(this._isWebScene(this.view?.map)&&r?.length>1){const t={id:`all--${e}`,facilityId:e,shortName:i.all,longName:i.all,levelNumber:null,verticalOrder:null},s=this._renderLevelButton(t);r.push(s)}return v("ul",{afterCreate:M,"aria-label":a,bind:this,class:this.classes(o.levelsContainer),"data-id":"levels","data-node-ref":"_levelsListNode",key:"levels-button-container",onkeydown:this._handleListKeydown},r)}_renderLevelButton(e){const{longNames:t}=this,{shortName:i,longName:s,id:l}=e,n=`levels--${l}`,r=this.level===l,a=t&&this.viewModel.isNormalMode?s:i;return this.viewModel.isNormalMode||r||this.viewModel.levelsExpanded?v("li",{key:n},v("button",{bind:this,class:this.classes(c.widgetButton,r?c.widgetButtonActive:null,c.interactive,o.levelButton),"data-id":l,"data-list-id":"levels",onclick:this._levelSelected,onfocus:this._onItemFocus,type:"button"},a)):null}_renderCloseLevelsButton(){if(!this.level||this.viewModel.isNormalMode||!this.viewModel.levelsExpanded)return null;const{messagesCommon:e}=this;return v("button",{"aria-label":e.close,bind:this,class:this.classes(c.widget,c.widgetButton,c.interactive,o.closeLevelsButton),key:"close-levels-button",onclick:this._closeLevels,title:e.close,type:"button"},v("div",{class:this.classes(o.buttonInfo)},v("calcite-icon",{icon:"x"})))}_renderZoomButton(){const{longNames:e,messages:t,facility:i,site:s}=this,l=this.viewModel?.filterMenuType,n=this.viewModel?.filterMenuOpen,r=this.viewModel?.getSite(s),a=this.viewModel?.getFacility(i),h="site"===l&&n?!r:!a;return v("button",{"aria-label":t.buttons.zoomTo,bind:this,class:this.classes(c.widget,c.widgetButton,h&&c.buttonDisabled,c.interactive,this.viewModel?.getFacilityLevels(i).length>0?o.zoomButtonLevels:o.zoomButton),key:"zoom-button",onclick:this._zoomToClicked,title:t.buttons.zoomTo,type:"button"},v("div",{class:this.classes(o.buttonInfo)},v("calcite-icon",{icon:"zoom-to-object",scale:"s"}),v("span",{class:this.classes(o.buttonLabel)},e&&this.viewModel.isNormalMode?t.buttons.zoomTo:null)))}_renderCollapseToggleButton(){const{longNames:e,messagesCommon:t}=this,i=e?"chevrons-right":"chevrons-left",s=e?t.collapse:t.expand;return v("button",{"aria-label":s,bind:this,class:this.classes(c.widget,c.widgetButton,c.interactive,o.minimizeToggleButton),key:"minimize-toggle-button",onclick:this._toggleCollapsed,title:s,type:"button"},v("div",{class:this.classes(o.buttonInfo)},v("calcite-icon",{class:this.classes(o.iconFlip),icon:i,scale:"s"}),v("span",{class:this.classes(o.buttonLabel)},e&&this.viewModel.isNormalMode?t.collapse:null)))}_renderFilterMenu(){return this.viewModel?.filterMenuOpen?"site"===this.viewModel?.filterMenuType?this._renderSiteFilterMenu():"facility"===this.viewModel?.filterMenuType?this._renderFacilityFilterMenu():null:null}_renderSiteFilterMenu(){const{messages:e,messagesCommon:t}=this,i=this.site?this.viewModel?.getSite(this.site)?.name:e.selector.selectSite,s=v("div",{class:this.classes(`${o.filterMenuHeader}`),key:"filter-menu-site-header"},v("div",{class:this.classes(o.filterMenuHeaderTextGroup)},v(h,{class:this.classes(o.filterMenuHeaderText),level:this.headingLevel},i)),v("button",{bind:this,class:this.classes(o.iconClose),onclick:this._closeClicked,title:t.close,type:"button"},v("calcite-icon",{icon:"x"}))),l=this._renderSearchInput(),n=this._renderSiteItems();return v("div",{class:this.classes(o.filterMenu),key:"filter-menu-site"},s,l,n)}_renderFacilityFilterMenu(){const{messages:e,messagesCommon:t,site:i}=this,s=this.viewModel?.getSite(i)?.name,l=this.facility&&this.viewModel?.getFacility(this.facility)?.name||e.selector.selectFacility,n=this.viewModel.hasMultipleSites?v("button",{bind:this,class:this.classes(o.filterMenuHeaderBack),onclick:this._backClicked,title:t.back,type:"button"},v("calcite-icon",{class:this.classes(m(this.container)?o.iconRight:o.iconLeft),icon:m(this.container)?"chevron-right":"chevron-left"})):null,r=this.viewModel.hasMultipleSites?v(h,{class:this.classes(o.filterMenuHeaderSubtext),level:d(this.headingLevel)},s):null,a=v("div",{class:this.classes(o.filterMenuHeader),key:"filter-menu-site-header"},n,v("div",{class:this.classes(o.filterMenuHeaderTextGroup)},v(h,{class:this.classes(o.filterMenuHeaderText),level:this.headingLevel},l),r),v("button",{bind:this,class:this.classes(o.iconClose),onclick:this._closeClicked,title:t.close,type:"button"},v("calcite-icon",{icon:"x"}))),c=this._renderSearchInput(),u=this._renderFacilityItems();return v("div",{class:this.classes(o.filterMenu),key:"filter-menu-facility"},a,c,u)}_renderSearchInput(){const{messagesCommon:e}=this,t=!!(this.viewModel.searchTerm&&this.viewModel.searchTerm?.length>0);return v("div",{class:this.classes(o.filterMenuSearch),key:"filter-menu-search"},v("calcite-icon",{icon:"search",key:"filter-menu-search-icon"}),v("input",{afterCreate:M,bind:this,class:this.classes(o.filterMenuSearchInput),"data-node-ref":"_searchInput",oninput:this._onSearchChange,onpaste:this._onSearchChange,placeholder:e.search,value:this.viewModel.searchTerm??void 0}),t?v("calcite-icon",{bind:this,class:this.classes(o.iconClose),icon:"x",key:"filter-menu-search-clear",onclick:this._onSearchClear,title:e.clear}):null)}_renderBlueCircle(){return v("span",{class:this.classes(o.selectedItemCircle),key:"floor-filter__selected-item-circle"})}_renderSiteItems(){if(!this.viewModel?.filterFeatures?.sites?.sitesInfo)return null;const{messages:e}=this,t=this.viewModel.filterFeatures.sites.sitesInfo,i=this.viewModel.filterSites(t).map(e=>this._renderSiteItem(e)),s=0===i.length&&this.viewModel?.searchTerm&&v("div",{class:this.classes(c.empty)},e.noResults);return v("ul",{afterCreate:M,"aria-label":e.selector.sitesLabel,bind:this,class:this.classes(o.filterMenuItems),"data-id":"sites","data-node-ref":"_sitesListNode",key:"filter-menu-items--sites",onkeydown:this._handleListKeydown,tabIndex:-1},i,s)}_renderSiteItem(e){const{name:t,id:i}=e,s=`filter-menu-site--${i}`,l=this.site===i;return v("li",{key:s},v("button",{bind:this,class:this.classes(o.filterMenuSite),"data-id":i,"data-list-id":"sites",onclick:this._siteSelected,onfocus:this._onItemFocus,type:"button"},l?this._renderBlueCircle():null,v("span",{class:this.classes(l?o.filterMenuSelectedItem:o.filterMenuItemName)},t),v("calcite-icon",{class:this.classes(m(this.container)?o.iconLeft:o.iconRight),icon:"chevron-right",scale:"s"})))}_renderFacilityItems(){if(!this.viewModel?.filterFeatures?.facilities?.facilitiesInfo)return null;const{messages:e,site:i}=this,s=this.viewModel.getSite(i),l=this.viewModel.filterFeatures.facilities.facilitiesInfo,n=this.viewModel.filterFacilities(l).map(e=>this._renderFacilityItem(e)),r=0===n.length&&this.viewModel?.searchTerm&&v("div",{class:this.classes(c.empty)},e.noResults),a=s?t(e.selector.siteFacilitiesLabel,{name:`"${s.name}"`}):e.selector.facilitiesLabel;return v("ul",{afterCreate:M,"aria-label":a,bind:this,class:this.classes(o.filterMenuItems),"data-id":"facilities","data-node-ref":"_facilitiesListNode",key:"filter-menu-items--facilities",onkeydown:this._handleListKeydown,tabIndex:-1},n,r)}_renderFacilityItem(e){const{name:t,id:i}=e,s=`filter-menu-facility--${i}`,l=this.facility===i;return v("li",{key:s},v("button",{bind:this,class:this.classes(o.filterMenuFacility),"data-id":i,"data-list-id":"facilities",onclick:this._facilitySelected,onfocus:this._onItemFocus,type:"button"},l?this._renderBlueCircle():null,v("span",{class:this.classes(l?o.filterMenuSelectedItem:o.filterMenuItemName)},t)))}_afterBaseNodeCreate(e){this._baseNode&&this._resizeObserver?.unobserve(this._baseNode),this._baseNode=e,this._resizeObserver?.observe(this._baseNode)}_toggleCollapsed(){this.longNames=!this.longNames}_toggleFilterMenu(){const e=this.viewModel?.filterMenuOpen??!1;this.viewModel.filterMenuOpen=!e}_setFilterMenuType(e){this.viewModel.filterMenuType=e}_zoomToClicked(){if(this.site&&"site"===this.viewModel?.filterMenuType&&this.viewModel?.filterMenuOpen){const e=this.viewModel?.getSite(this.site);this.viewModel.goTo(e)}else if(this.facility){const e=this.viewModel?.getFacility(this.facility);this.viewModel.goTo(e)}else if(this.site){const e=this.viewModel?.getSite(this.site);this.viewModel.goTo(e)}}_onSearchChange(e){const t=e.target;""===t.value?this.viewModel.searchTerm=null:t.value&&this.viewModel?.searchTerm!==t.value&&(this.viewModel.searchTerm=t.value)}_onSearchClear(){this.viewModel.searchTerm=null}_closeClicked(){this.viewModel.searchTerm=null,this.viewModel.filterMenuOpen=!1}_backClicked(){this._setFilterMenuType("site"),this.viewModel.searchTerm=null}_siteSelected(e){const t=e.currentTarget.getAttribute("data-id"),i=this.viewModel.getSite(t);let s=!1;this.site!==t&&(this.facility=null,this.level=null,s=!0,this.viewModel.levelsExpanded=!1),this.site=t,this.viewModel.searchTerm=null,this._setFilterMenuType("facility"),this.viewModel.goTo(i),s&&this.viewModel.setFloors(null)}_facilitySelected(e){const t=e.currentTarget.getAttribute("data-id"),i=this.viewModel.getFacility(t);let s=!1;if(this.facility!==t){if("base-floors"===this.viewModel.filterMode){const e=this.viewModel?.getBaseLevel(i);this.level=e?e.id:null}else this.level=null;s=!0,this.viewModel.levelsExpanded=!1}if(this.facility=t,this.viewModel.goTo(i),s){const e=this.viewModel.getLevel(this.level);this.viewModel.setFloors(e)}if(!this.viewModel.isNormalMode){const e=this.viewModel.getFacilityLevels(t);e?.length>1&&(this.viewModel.levelsExpanded=!0)}setTimeout(()=>this._focusActiveLevel(),50)}_levelSelected(e){const t=e.currentTarget.getAttribute("data-id");this.level=t}_closeLevels(){this.viewModel.levelsExpanded=!1}_isWebScene(e){return"esri.WebScene"===e?.declaredClass}_getComponentPosition(){return null!=this.container?this.view?.ui?.getPosition(this.container):null}_getPosition(e){switch(e){case"bottom-right":case"bottom-left":return"bottom";default:return"top"}}_handleListKeydown(e){const t=e.currentTarget.getAttribute("data-id");let i=null;"sites"===t||"facilities"===t?(this._activeMenu!==t&&(this._activeMenuIndex.menuItems=-1),this._activeMenu=t,i="menuItems"):"levels"===t&&(i="levels");const s="sites"===t?this._sitesListNode:"facilities"===t?this._facilitiesListNode:"levels"===t?this._levelsListNode:null,{key:l}=e,n="Tab"===l,o=g.has(l);o&&e.preventDefault();const r=s?.getElementsByTagName("li");r&&0!==r.length&&(o||n)&&this._handleItemNavigation(l,e.shiftKey,r,n,i)}_handleItemNavigation(e,t,i,s,l){if(!l)return;this._activeMenuIndex[l]===i.length&&this._activeMenuIndex[l]--,-1===this._activeMenuIndex[l]&&this._activeMenuIndex[l]++;const n=this._activeMenuIndex[l];switch(e){case"Home":this._activeMenuIndex[l]=0;break;case"End":this._activeMenuIndex[l]=i.length-1;break;case"ArrowUp":this._activeMenuIndex[l]=this._activeMenuIndex[l]<=0?i.length-1:this._activeMenuIndex[l]-1;break;case"ArrowDown":this._activeMenuIndex[l]=this._activeMenuIndex[l]===i.length-1?0:this._activeMenuIndex[l]+1}if("Tab"===e&&t&&this._activeMenuIndex[l]>=0&&this._activeMenuIndex[l]--,"Tab"===e&&!t&&this._activeMenuIndex[l]<i.length&&this._activeMenuIndex[l]++,n!==this._activeMenuIndex[l]&&this._activeMenuIndex[l]>-1&&this._activeMenuIndex[l]<i.length&&!s){const e=i[this._activeMenuIndex[l]].getElementsByTagName("button"),t=1===e?.length?e[0]:null;t?.focus()}}_focusSearch(){this._searchInput?.focus()}_focusActiveLevel(){const{level:e}=this,t=this._levelsListNode,i=t?.getElementsByTagName("li");if(!e||!t||!i)return;const s=this._facilitiesListNode?.getElementsByTagName("li");this._activeMenuIndex.menuItems=s?s.length-1:-1;const l=[];for(let n=0;n<i.length;n++){const e=i[n].getElementsByTagName("button");1===e?.length&&l.push(e[0])}l.forEach((t,i)=>{t.getAttribute("data-id")===e&&(t.focus(),this._activeMenuIndex.levels=i)})}_onItemFocus(e){const t=e.currentTarget,i=t.getAttribute("data-list-id"),s=t.getAttribute("data-id"),l="sites"===i?this._sitesListNode:"facilities"===i?this._facilitiesListNode:"levels"===i?this._levelsListNode:null;if(!l)return;const n=l?.getElementsByTagName("li");if(!n)return;const o=[];Array.from(n).forEach(e=>{const t=e.getElementsByTagName("button");1===t?.length&&o.push(t[0])});let r=null;switch(i){case"sites":case"facilities":r="menuItems";break;case"levels":r="levels"}if(!r)return;const a=r;o.forEach((e,t)=>{e.getAttribute("data-id")===s&&this._activeMenuIndex[a]!==t&&(this._activeMenuIndex[a]=t)})}};e([s()],f.prototype,"_searchInput",void 0),e([s()],f.prototype,"enabled",null),e([s()],f.prototype,"longNames",null),e([s()],f.prototype,"minimized",null),e([s()],f.prototype,"pinnedLevels",null),e([s()],f.prototype,"site",null),e([s()],f.prototype,"facility",null),e([s()],f.prototype,"level",null),e([s()],f.prototype,"view",null),e([s({type:r})],f.prototype,"viewModel",void 0),e([s(),u("esri/widgets/FloorFilter/t9n/FloorFilter")],f.prototype,"messages",void 0),e([s(),u("esri/t9n/common")],f.prototype,"messagesCommon",void 0),e([s()],f.prototype,"goToOverride",null),e([s()],f.prototype,"headingLevel",void 0),e([s()],f.prototype,"icon",null),f=e([l("esri.widgets.FloorFilter")],f);const p=f;export{p as default};
5
+ import{__decorate as e}from"tslib";import{substitute as t}from"../intl.js";import{deprecateWidget as i}from"../core/deprecate.js";import s from"../core/Logger.js";import{watch as l}from"../core/reactiveUtils.js";import{property as n,subclass as o}from"../core/accessorSupport/decorators.js";import r from"./Widget.js";import{css as a}from"./FloorFilter/css.js";import c from"./FloorFilter/FloorFilterViewModel.js";import{loadCalciteComponents as h}from"./support/componentsUtils.js";import{globalCss as d}from"./support/globalCss.js";import{Heading as u,incrementHeadingLevel as v}from"./support/Heading.js";import{messageBundle as m,tsx as g}from"./support/widget.js";import{isRTL as M,storeNode as f}from"./support/widgetUtils.js";const p=new Set(["ArrowUp","ArrowDown","End","Home"]);let _=class extends r{constructor(e,t){super(e,t),this._activeMenu=null,this._activeMenuIndex={levels:-1,menuItems:-1},this._baseNode=null,this._facilitiesListNode=null,this._levelsListNode=null,this._sitesListNode=null,this._searchInput=null,this.viewModel=new c,this.messages=null,this.messagesCommon=null,this.headingLevel=2,i(s.getLogger(this),"Floor Filter","arcgis-floor-filter",{version:"5.0"}),this._resizeObserver=new ResizeObserver(()=>this.scheduleRender()),this.addHandles(l(()=>this._searchInput,()=>this._focusSearch()))}loadDependencies(){return h({icon:()=>import("@esri/calcite-components/dist/components/calcite-icon")})}destroy(){this._resizeObserver?.disconnect()}get enabled(){return this.viewModel.enabled}set enabled(e){this.viewModel.enabled=e}get longNames(){return this.viewModel.longNames}set longNames(e){this.viewModel.longNames=e}get minimized(){return this.viewModel.minimized}set minimized(e){this.viewModel.minimized=e}get pinnedLevels(){return this.viewModel.pinnedLevels}set pinnedLevels(e){this.viewModel.pinnedLevels=e}get site(){return this.viewModel.site}set site(e){this.viewModel.site=e}get facility(){return this.viewModel.facility}set facility(e){this.viewModel.facility=e}get level(){return this.viewModel.level}set level(e){this.viewModel.level=e}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}get goToOverride(){return this.viewModel.goToOverride}set goToOverride(e){this.viewModel.goToOverride=e}get icon(){return"urban-model"}set icon(e){this._overrideIfSome("icon",e)}updateWebDocument(e){return this.viewModel.updateWebDocument(e)}render(){const{longNames:e}=this,t=e&&this.viewModel.isNormalMode?"expanded":"collapsed",i=this._renderButtons(),s=this._renderFilterMenu(),l=g("div",{class:this.classes(a.separator)}),n=this._getComponentPosition(),o=this._getPosition(n),r="top-right"===n||"bottom-right"===n,c="top-left"===n||"bottom-left"===n,h=M(this.container),u=h&&c||!h&&r?s:i,v=h&&c||!h&&r?i:s;return g("div",{afterCreate:this._afterBaseNodeCreate,class:this.classes(a.floorFilter,d.widget,`${a.floorFilterLayout}${t}`,`${a.floorFilterPosition}${o}`),key:"floor-filter-menu"},u,this.viewModel?.filterMenuOpen?l:null,v)}_renderButtons(){const e=this._getComponentPosition(),t=[];return"top"===this._getPosition(e)?(t.push(this._renderBrowseButton()),t.push(this._renderLevelButtons()),t.push(this._renderCloseLevelsButton()),t.push(this._renderZoomButton()),t.push(this._renderCollapseToggleButton())):(t.push(this._renderCollapseToggleButton()),t.push(this._renderZoomButton()),t.push(this._renderCloseLevelsButton()),t.push(this._renderLevelButtons()),t.push(this._renderBrowseButton())),g("div",{class:this.classes(d.widget,a.buttonContainer),key:"button-container"},t)}_renderBrowseButton(){const{longNames:e,messages:t}=this;return g("button",{"aria-expanded":this.viewModel.filterMenuOpen.toString(),"aria-label":t.buttons.browse,bind:this,class:this.classes(d.widget,d.widgetButton,d.interactive,("loading"===this.viewModel.state||"disabled"===this.viewModel.state)&&d.buttonDisabled,a.browseButton,this.viewModel?.filterMenuOpen&&d.widgetButtonActive),key:"browse-button",onclick:this._toggleFilterMenu,title:t.buttons.browse,type:"button"},g("div",{class:this.classes(a.buttonInfo)},g("calcite-icon",{icon:this.icon,scale:"s"}),g("span",{class:this.classes(a.buttonLabel)},e&&this.viewModel.isNormalMode?t.buttons.browse:null)))}_renderLevelButtons(){if(!this.viewModel?.filterFeatures?.levels?.levelsInfo||!this.facility)return null;const{facility:e,messagesCommon:i,messages:s}=this,l=this.viewModel?.getFacility(e),n=this.viewModel?.getFacilityLevels(e),o=n.map(e=>this._renderLevelButton(e));if(!o.length)return null;const r=l&&t(s.selector.levelsLabel,{name:`"${l.name}"`});if(this._isWebScene(this.view?.map)&&o?.length>1){const t={id:`all--${e}`,facilityId:e,shortName:i.all,longName:i.all,levelNumber:null,verticalOrder:null},s=this._renderLevelButton(t);o.push(s)}return g("ul",{afterCreate:f,"aria-label":r,bind:this,class:this.classes(a.levelsContainer),"data-id":"levels","data-node-ref":"_levelsListNode",key:"levels-button-container",onkeydown:this._handleListKeydown},o)}_renderLevelButton(e){const{longNames:t}=this,{shortName:i,longName:s,id:l}=e,n=`levels--${l}`,o=this.level===l,r=t&&this.viewModel.isNormalMode?s:i;return this.viewModel.isNormalMode||o||this.viewModel.levelsExpanded?g("li",{key:n},g("button",{bind:this,class:this.classes(d.widgetButton,o?d.widgetButtonActive:null,d.interactive,a.levelButton),"data-id":l,"data-list-id":"levels",onclick:this._levelSelected,onfocus:this._onItemFocus,type:"button"},r)):null}_renderCloseLevelsButton(){if(!this.level||this.viewModel.isNormalMode||!this.viewModel.levelsExpanded)return null;const{messagesCommon:e}=this;return g("button",{"aria-label":e.close,bind:this,class:this.classes(d.widget,d.widgetButton,d.interactive,a.closeLevelsButton),key:"close-levels-button",onclick:this._closeLevels,title:e.close,type:"button"},g("div",{class:this.classes(a.buttonInfo)},g("calcite-icon",{icon:"x"})))}_renderZoomButton(){const{longNames:e,messages:t,facility:i,site:s}=this,l=this.viewModel?.filterMenuType,n=this.viewModel?.filterMenuOpen,o=this.viewModel?.getSite(s),r=this.viewModel?.getFacility(i),c="site"===l&&n?!o:!r;return g("button",{"aria-label":t.buttons.zoomTo,bind:this,class:this.classes(d.widget,d.widgetButton,c&&d.buttonDisabled,d.interactive,this.viewModel?.getFacilityLevels(i).length>0?a.zoomButtonLevels:a.zoomButton),key:"zoom-button",onclick:this._zoomToClicked,title:t.buttons.zoomTo,type:"button"},g("div",{class:this.classes(a.buttonInfo)},g("calcite-icon",{icon:"zoom-to-object",scale:"s"}),g("span",{class:this.classes(a.buttonLabel)},e&&this.viewModel.isNormalMode?t.buttons.zoomTo:null)))}_renderCollapseToggleButton(){const{longNames:e,messagesCommon:t}=this,i=e?"chevrons-right":"chevrons-left",s=e?t.collapse:t.expand;return g("button",{"aria-label":s,bind:this,class:this.classes(d.widget,d.widgetButton,d.interactive,a.minimizeToggleButton),key:"minimize-toggle-button",onclick:this._toggleCollapsed,title:s,type:"button"},g("div",{class:this.classes(a.buttonInfo)},g("calcite-icon",{class:this.classes(a.iconFlip),icon:i,scale:"s"}),g("span",{class:this.classes(a.buttonLabel)},e&&this.viewModel.isNormalMode?t.collapse:null)))}_renderFilterMenu(){return this.viewModel?.filterMenuOpen?"site"===this.viewModel?.filterMenuType?this._renderSiteFilterMenu():"facility"===this.viewModel?.filterMenuType?this._renderFacilityFilterMenu():null:null}_renderSiteFilterMenu(){const{messages:e,messagesCommon:t}=this,i=this.site?this.viewModel?.getSite(this.site)?.name:e.selector.selectSite,s=g("div",{class:this.classes(`${a.filterMenuHeader}`),key:"filter-menu-site-header"},g("div",{class:this.classes(a.filterMenuHeaderTextGroup)},g(u,{class:this.classes(a.filterMenuHeaderText),level:this.headingLevel},i)),g("button",{bind:this,class:this.classes(a.iconClose),onclick:this._closeClicked,title:t.close,type:"button"},g("calcite-icon",{icon:"x"}))),l=this._renderSearchInput(),n=this._renderSiteItems();return g("div",{class:this.classes(a.filterMenu),key:"filter-menu-site"},s,l,n)}_renderFacilityFilterMenu(){const{messages:e,messagesCommon:t,site:i}=this,s=this.viewModel?.getSite(i)?.name,l=this.facility&&this.viewModel?.getFacility(this.facility)?.name||e.selector.selectFacility,n=this.viewModel.hasMultipleSites?g("button",{bind:this,class:this.classes(a.filterMenuHeaderBack),onclick:this._backClicked,title:t.back,type:"button"},g("calcite-icon",{class:this.classes(M(this.container)?a.iconRight:a.iconLeft),icon:M(this.container)?"chevron-right":"chevron-left"})):null,o=this.viewModel.hasMultipleSites?g(u,{class:this.classes(a.filterMenuHeaderSubtext),level:v(this.headingLevel)},s):null,r=g("div",{class:this.classes(a.filterMenuHeader),key:"filter-menu-site-header"},n,g("div",{class:this.classes(a.filterMenuHeaderTextGroup)},g(u,{class:this.classes(a.filterMenuHeaderText),level:this.headingLevel},l),o),g("button",{bind:this,class:this.classes(a.iconClose),onclick:this._closeClicked,title:t.close,type:"button"},g("calcite-icon",{icon:"x"}))),c=this._renderSearchInput(),h=this._renderFacilityItems();return g("div",{class:this.classes(a.filterMenu),key:"filter-menu-facility"},r,c,h)}_renderSearchInput(){const{messagesCommon:e}=this,t=!!(this.viewModel.searchTerm&&this.viewModel.searchTerm?.length>0);return g("div",{class:this.classes(a.filterMenuSearch),key:"filter-menu-search"},g("calcite-icon",{icon:"search",key:"filter-menu-search-icon"}),g("input",{afterCreate:f,bind:this,class:this.classes(a.filterMenuSearchInput),"data-node-ref":"_searchInput",oninput:this._onSearchChange,onpaste:this._onSearchChange,placeholder:e.search,value:this.viewModel.searchTerm??void 0}),t?g("calcite-icon",{bind:this,class:this.classes(a.iconClose),icon:"x",key:"filter-menu-search-clear",onclick:this._onSearchClear,title:e.clear}):null)}_renderBlueCircle(){return g("span",{class:this.classes(a.selectedItemCircle),key:"floor-filter__selected-item-circle"})}_renderSiteItems(){if(!this.viewModel?.filterFeatures?.sites?.sitesInfo)return null;const{messages:e}=this,t=this.viewModel.filterFeatures.sites.sitesInfo,i=this.viewModel.filterSites(t).map(e=>this._renderSiteItem(e)),s=0===i.length&&this.viewModel?.searchTerm&&g("div",{class:this.classes(d.empty)},e.noResults);return g("ul",{afterCreate:f,"aria-label":e.selector.sitesLabel,bind:this,class:this.classes(a.filterMenuItems),"data-id":"sites","data-node-ref":"_sitesListNode",key:"filter-menu-items--sites",onkeydown:this._handleListKeydown,tabIndex:-1},i,s)}_renderSiteItem(e){const{name:t,id:i}=e,s=`filter-menu-site--${i}`,l=this.site===i;return g("li",{key:s},g("button",{bind:this,class:this.classes(a.filterMenuSite),"data-id":i,"data-list-id":"sites",onclick:this._siteSelected,onfocus:this._onItemFocus,type:"button"},l?this._renderBlueCircle():null,g("span",{class:this.classes(l?a.filterMenuSelectedItem:a.filterMenuItemName)},t),g("calcite-icon",{class:this.classes(M(this.container)?a.iconLeft:a.iconRight),icon:"chevron-right",scale:"s"})))}_renderFacilityItems(){if(!this.viewModel?.filterFeatures?.facilities?.facilitiesInfo)return null;const{messages:e,site:i}=this,s=this.viewModel.getSite(i),l=this.viewModel.filterFeatures.facilities.facilitiesInfo,n=this.viewModel.filterFacilities(l).map(e=>this._renderFacilityItem(e)),o=0===n.length&&this.viewModel?.searchTerm&&g("div",{class:this.classes(d.empty)},e.noResults),r=s?t(e.selector.siteFacilitiesLabel,{name:`"${s.name}"`}):e.selector.facilitiesLabel;return g("ul",{afterCreate:f,"aria-label":r,bind:this,class:this.classes(a.filterMenuItems),"data-id":"facilities","data-node-ref":"_facilitiesListNode",key:"filter-menu-items--facilities",onkeydown:this._handleListKeydown,tabIndex:-1},n,o)}_renderFacilityItem(e){const{name:t,id:i}=e,s=`filter-menu-facility--${i}`,l=this.facility===i;return g("li",{key:s},g("button",{bind:this,class:this.classes(a.filterMenuFacility),"data-id":i,"data-list-id":"facilities",onclick:this._facilitySelected,onfocus:this._onItemFocus,type:"button"},l?this._renderBlueCircle():null,g("span",{class:this.classes(l?a.filterMenuSelectedItem:a.filterMenuItemName)},t)))}_afterBaseNodeCreate(e){this._baseNode&&this._resizeObserver?.unobserve(this._baseNode),this._baseNode=e,this._resizeObserver?.observe(this._baseNode)}_toggleCollapsed(){this.longNames=!this.longNames}_toggleFilterMenu(){const e=this.viewModel?.filterMenuOpen??!1;this.viewModel.filterMenuOpen=!e}_setFilterMenuType(e){this.viewModel.filterMenuType=e}_zoomToClicked(){if(this.site&&"site"===this.viewModel?.filterMenuType&&this.viewModel?.filterMenuOpen){const e=this.viewModel?.getSite(this.site);this.viewModel.goTo(e)}else if(this.facility){const e=this.viewModel?.getFacility(this.facility);this.viewModel.goTo(e)}else if(this.site){const e=this.viewModel?.getSite(this.site);this.viewModel.goTo(e)}}_onSearchChange(e){const t=e.target;""===t.value?this.viewModel.searchTerm=null:t.value&&this.viewModel?.searchTerm!==t.value&&(this.viewModel.searchTerm=t.value)}_onSearchClear(){this.viewModel.searchTerm=null}_closeClicked(){this.viewModel.searchTerm=null,this.viewModel.filterMenuOpen=!1}_backClicked(){this._setFilterMenuType("site"),this.viewModel.searchTerm=null}_siteSelected(e){const t=e.currentTarget.getAttribute("data-id"),i=this.viewModel.getSite(t);let s=!1;this.site!==t&&(this.facility=null,this.level=null,s=!0,this.viewModel.levelsExpanded=!1),this.site=t,this.viewModel.searchTerm=null,this._setFilterMenuType("facility"),this.viewModel.goTo(i),s&&this.viewModel.setFloors(null)}_facilitySelected(e){const t=e.currentTarget.getAttribute("data-id"),i=this.viewModel.getFacility(t);let s=!1;if(this.facility!==t){if("base-floors"===this.viewModel.filterMode){const e=this.viewModel?.getBaseLevel(i);this.level=e?e.id:null}else this.level=null;s=!0,this.viewModel.levelsExpanded=!1}if(this.facility=t,this.viewModel.goTo(i),s){const e=this.viewModel.getLevel(this.level);this.viewModel.setFloors(e)}if(!this.viewModel.isNormalMode){const e=this.viewModel.getFacilityLevels(t);e?.length>1&&(this.viewModel.levelsExpanded=!0)}setTimeout(()=>this._focusActiveLevel(),50)}_levelSelected(e){const t=e.currentTarget.getAttribute("data-id");this.level=t}_closeLevels(){this.viewModel.levelsExpanded=!1}_isWebScene(e){return"esri.WebScene"===e?.declaredClass}_getComponentPosition(){return null!=this.container?this.view?.ui?.getPosition(this.container):null}_getPosition(e){switch(e){case"bottom-right":case"bottom-left":return"bottom";default:return"top"}}_handleListKeydown(e){const t=e.currentTarget.getAttribute("data-id");let i=null;"sites"===t||"facilities"===t?(this._activeMenu!==t&&(this._activeMenuIndex.menuItems=-1),this._activeMenu=t,i="menuItems"):"levels"===t&&(i="levels");const s="sites"===t?this._sitesListNode:"facilities"===t?this._facilitiesListNode:"levels"===t?this._levelsListNode:null,{key:l}=e,n="Tab"===l,o=p.has(l);o&&e.preventDefault();const r=s?.getElementsByTagName("li");r&&0!==r.length&&(o||n)&&this._handleItemNavigation(l,e.shiftKey,r,n,i)}_handleItemNavigation(e,t,i,s,l){if(!l)return;this._activeMenuIndex[l]===i.length&&this._activeMenuIndex[l]--,-1===this._activeMenuIndex[l]&&this._activeMenuIndex[l]++;const n=this._activeMenuIndex[l];switch(e){case"Home":this._activeMenuIndex[l]=0;break;case"End":this._activeMenuIndex[l]=i.length-1;break;case"ArrowUp":this._activeMenuIndex[l]=this._activeMenuIndex[l]<=0?i.length-1:this._activeMenuIndex[l]-1;break;case"ArrowDown":this._activeMenuIndex[l]=this._activeMenuIndex[l]===i.length-1?0:this._activeMenuIndex[l]+1}if("Tab"===e&&t&&this._activeMenuIndex[l]>=0&&this._activeMenuIndex[l]--,"Tab"===e&&!t&&this._activeMenuIndex[l]<i.length&&this._activeMenuIndex[l]++,n!==this._activeMenuIndex[l]&&this._activeMenuIndex[l]>-1&&this._activeMenuIndex[l]<i.length&&!s){const e=i[this._activeMenuIndex[l]].getElementsByTagName("button"),t=1===e?.length?e[0]:null;t?.focus()}}_focusSearch(){this._searchInput?.focus()}_focusActiveLevel(){const{level:e}=this,t=this._levelsListNode,i=t?.getElementsByTagName("li");if(!e||!t||!i)return;const s=this._facilitiesListNode?.getElementsByTagName("li");this._activeMenuIndex.menuItems=s?s.length-1:-1;const l=[];for(let n=0;n<i.length;n++){const e=i[n].getElementsByTagName("button");1===e?.length&&l.push(e[0])}l.forEach((t,i)=>{t.getAttribute("data-id")===e&&(t.focus(),this._activeMenuIndex.levels=i)})}_onItemFocus(e){const t=e.currentTarget,i=t.getAttribute("data-list-id"),s=t.getAttribute("data-id"),l="sites"===i?this._sitesListNode:"facilities"===i?this._facilitiesListNode:"levels"===i?this._levelsListNode:null;if(!l)return;const n=l?.getElementsByTagName("li");if(!n)return;const o=[];Array.from(n).forEach(e=>{const t=e.getElementsByTagName("button");1===t?.length&&o.push(t[0])});let r=null;switch(i){case"sites":case"facilities":r="menuItems";break;case"levels":r="levels"}if(!r)return;const a=r;o.forEach((e,t)=>{e.getAttribute("data-id")===s&&this._activeMenuIndex[a]!==t&&(this._activeMenuIndex[a]=t)})}};e([n()],_.prototype,"_searchInput",void 0),e([n()],_.prototype,"enabled",null),e([n()],_.prototype,"longNames",null),e([n()],_.prototype,"minimized",null),e([n()],_.prototype,"pinnedLevels",null),e([n()],_.prototype,"site",null),e([n()],_.prototype,"facility",null),e([n()],_.prototype,"level",null),e([n()],_.prototype,"view",null),e([n({type:c})],_.prototype,"viewModel",void 0),e([n(),m("esri/widgets/FloorFilter/t9n/FloorFilter")],_.prototype,"messages",void 0),e([n(),m("esri/t9n/common")],_.prototype,"messagesCommon",void 0),e([n()],_.prototype,"goToOverride",null),e([n()],_.prototype,"headingLevel",void 0),e([n()],_.prototype,"icon",null),_=e([o("esri.widgets.FloorFilter")],_);const w=_;export{w as default};
@@ -98,6 +98,7 @@ export interface LayerListEvents extends LayerListViewModelEvents {}
98
98
  * > When a [CatalogLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CatalogLayer.html) is present in the map, the LayerList widget will display the
99
99
  * > [CatalogLayer#dynamicGroupLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CatalogLayer.html#dynamicGroupLayer) in a [catalogLayerList](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList.html#catalogLayerList) [ListItem](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList-ListItem.html).
100
100
  *
101
+ * @deprecated since version 5.0. Use the [Layer List](https://developers.arcgis.com/javascript/latest/references/map-components/arcgis-layer-list/) component instead. For information on widget deprecation, read about [Esri's move to web components](https://developers.arcgis.com/javascript/latest/components-transition-plan/).
101
102
  * @since 4.2
102
103
  * @see [Sample - LayerList widget](https://developers.arcgis.com/javascript/latest/sample-code/widgets-layerlist/)
103
104
  * @see [Sample - LayerList widget with actions](https://developers.arcgis.com/javascript/latest/sample-code/widgets-layerlist-actions/)
@@ -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 t from"../core/Collection.js";import{IdentifiableMixin as i}from"../core/Identifiable.js";import o from"../core/ReactiveMap.js";import{on as s,watch as l,initial as a}from"../core/reactiveUtils.js";import{property as r,subclass as n}from"../core/accessorSupport/decorators.js";import d from"./Widget.js";import{css as p}from"./LayerList/css.js";import c from"./LayerList/LayerListItem.js";import m from"./LayerList/LayerListViewModel.js";import h from"./LayerList/LayerListVisibleElements.js";import y from"./LayerList/ListItem.js";import{minDragEnabledItems as u,minFilterItems as g,getItem as _,getLayerType as L,removeDestroyedListItems as f,setFilterPredicate as v,sortLayersToIds as I,sortChildLayersToIds as w}from"./LayerList/support/layerListUtils.js";import{loadCalciteComponents as b}from"./support/componentsUtils.js";import{globalCss as C}from"./support/globalCss.js";import{calciteListFilterProps as E}from"./support/listUtils.js";import{tsx as F,messageBundle as M,vmEvent as O}from"./support/widget.js";import{setFocus as T}from"./support/widgetUtils.js";const P=t.ofType(y),A="nested";let D=class extends(i(d)){constructor(e,i){super(e,i),this._rootListEl=null,this._activeItem=null,this._tooltipReferenceMap=new o,this._focusRootFlowItem=!1,this._focusPanelFlowItem=!1,this._focusLayerFlowItem=null,this._layerListMap=new o,this._lastDragDetail=null,this._selectedDragItemLayerUid=null,this._rootGroupUid=`operational-${this.uid}`,this._openedLayersController=null,this.catalogLayerList=null,this.catalogOptions=null,this.collapsed=!1,this.dragEnabled=!1,this.filterPlaceholder="",this.filterPredicate=null,this.filterText="",this.headingLevel=2,this.knowledgeGraphOptions=null,this.layerTablesEnabled=new t(["knowledge-graph"]),this.listItemCanGiveFunction=null,this.listItemCanReceiveFunction=null,this.mapImageOptions=null,this.messages=null,this.messagesCommon=null,this.minDragEnabledItems=u,this.minFilterItems=g,this.openedLayers=new t,this.openedLayerLists=new t,this.selectedItems=new P,this.selectionMode="none",this.tableList=null,this.tileOptions=null,this.viewModel=new m,this.visibilityAppearance="default",this.visibleElements=new h,this._canMove=({dragEl:e,fromEl:t,toEl:i},o)=>{const s="pull"===o?this.listItemCanGiveFunction:this.listItemCanReceiveFunction,l=_(e);if(!l?.sortable)return!1;const a=_(t),r=L(t),n=_(i),d=L(i),p=!!r&&!!d&&r===d,c={selected:l,from:a,to:n},m=t.group,h=i.group,y=a?.layer?.type??"",u=n?.layer?.type??"",g=new Set(["map-image","catalog","knowledge-graph"]),f="sublayer";return m&&h&&"function"==typeof s?s.call(null,c):p&&!g.has(y)&&!g.has(u)&&l?.layer?.type!==f},this._onCatalogOpen=e=>{this.openedLayers.push(e.layer?.parent),this._focusLayerFlowItem=e.layer?.uid},this._onTablesOpen=e=>{this.openedLayers.push(e.layer),this._focusLayerFlowItem=e.layer?.uid},this._onPanelOpen=()=>{this._focusPanelFlowItem=!0},this._onTooltipReferenceChange=(e,t)=>{t?this._tooltipReferenceMap.set(e,t):this._tooltipReferenceMap.delete(e)},this._onSelectedDragItemLayerUidChange=e=>{this._selectedDragItemLayerUid=e},this._onTriggerAction=(e,t)=>{this.triggerAction(e,t)},this._clearActiveItem=()=>{this._activeItem=null},this._setActiveItem=e=>{if("default"!==this.visibilityAppearance)return;const t=Array.from(e.composedPath()).find(e=>e.classList?.contains(p.item));this._activeItem=_(t)},this._onCalciteListOrderChange=e=>{const{_lastDragDetail:t}=this,{toEl:i,fromEl:o,dragEl:s,newIndex:l}=e;if(o&&i&&!(t?.newIndex===l&&t?.dragEl===s&&t?.toEl===i&&t?.fromEl===o)){if(this._lastDragDetail=e,this._selectedDragItemLayerUid=s.value,o===i){const e=Array.from(o.children).filter(e=>e?.matches("calcite-list-item")).map(e=>e.value);return void this._sortLayers(o,e)}this._moveLayerFromChildList({toEl:i,fromEl:o,dragEl:s,newIndex:l})}}}initialize(){this.addHandles([s(()=>this.openedLayers,"change",()=>this._handleOpenedLayersChange(),a),s(()=>this.viewModel.operationalItems,"change",()=>f(this.selectedItems),a),l(()=>[this.filterPredicate,this._rootListEl],()=>v(this._rootListEl,this.filterPredicate))])}loadDependencies(){return b({button:()=>import("@esri/calcite-components/dist/components/calcite-button"),flow:()=>import("@esri/calcite-components/dist/components/calcite-flow"),"flow-item":()=>import("@esri/calcite-components/dist/components/calcite-flow-item"),list:()=>import("@esri/calcite-components/dist/components/calcite-list"),notice:()=>import("@esri/calcite-components/dist/components/calcite-notice"),tooltip:()=>import("@esri/calcite-components/dist/components/calcite-tooltip")})}destroy(){this._destroyOpenedLayerLists(),this._tooltipReferenceMap.clear()}get _totalItems(){return this.viewModel.operationalItems.flatten(e=>e.children.filter(e=>"catalog-dynamic-group"!==e.layer?.type)).length}get _visibleItems(){return this.operationalItems?.filter(e=>!e.hidden&&(this.visibleElements.errors||!e.error))}get _openedPanelItems(){return this._visibleItems.flatten(e=>e.children).filter(({hidden:e,panel:t})=>!e&&t?.open&&!t.disabled&&t.flowEnabled)}get _dragEnabled(){return this._totalItems>=this.minDragEnabledItems&&this.dragEnabled}get _filterEnabled(){return this._totalItems>=this.minFilterItems&&this.visibleElements.filter}get _renderedOpenLayerFlowItems(){const{openedLayers:e}=this;return e.toArray().map((t,i)=>this._renderLayerFlowItem(t,i===e.length-1))}get icon(){return"layers"}set icon(e){this._overrideIfSome("icon",e)}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get listItemCreatedFunction(){return this.viewModel.listItemCreatedFunction}set listItemCreatedFunction(e){this.viewModel.listItemCreatedFunction=e}get operationalItems(){return this.viewModel.operationalItems}set operationalItems(e){this.viewModel.operationalItems=e}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}triggerAction(e,t){return this.viewModel.triggerAction(e,t)}render(){const e=this.viewModel?.state,t={[C.hidden]:"loading"===e,[C.disabled]:"disabled"===e};return F("div",{class:this.classes(p.base,C.widget,C.panel,t)},this._renderItemTooltips(),this._renderItems())}async _createFlowList(e,t){const{_layerListMap:i}=this,o=i.get(e);if(o)return o;const s="catalog"===e.type?await this._createCatalogLayerList(e):await this._createTableList(e);return t.aborted||i.set(e,s),s}async _handleOpenedLayersChange(){const{_layerListMap:e,openedLayers:t,openedLayerLists:i}=this;this._openedLayersController?.abort();const o=new AbortController,{signal:s}=o;this._openedLayersController=o,e.forEach((i,o)=>{t.includes(o)||(i.destroy(),e.delete(o))});const l=await Promise.all(t.map(e=>this._createFlowList(e,s)));if(s.aborted)return;i.removeAll(),i.addMany(l);const a=i.at(-1);a?"catalogLayer"in a?(this._set("catalogLayerList",a),this._set("tableList",null)):(this._set("catalogLayerList",null),this._set("tableList",a)):(this._set("catalogLayerList",null),this._set("tableList",null))}_destroyOpenedLayerLists(){this.openedLayerLists.destroyAll(),this.openedLayers.removeAll(),this._layerListMap.clear()}_renderItemTooltip(e){const{_tooltipReferenceMap:t,messages:i}=this;return e?F("calcite-tooltip",{key:`tooltip-${e.layer?.uid}`,overlayPositioning:"fixed",referenceElement:t.get(e.layer?.uid)},i.layerIncompatibleTooltip):null}_renderItemTooltipNodes(e){return e.incompatible?this._renderItemTooltip(e):e.children?.filter(e=>!e.hidden).toArray().map(e=>this._renderItemTooltipNodes(e))}_renderItemTooltips(){return this._visibleItems?.toArray().map(e=>this._renderItemTooltipNodes(e))}_renderNoItemsMessage(){return F("div",{slot:"message"},this.messages.noItemsToDisplay)}_renderNoItems(){return F("div",{class:p.itemMessage,key:"esri-layer-list__no-items"},F("calcite-notice",{icon:"information",kind:"info",open:!0,width:"full"},this._renderNoItemsMessage()))}async _createCatalogLayerList(e){const{default:t}=await import("./CatalogLayerList.js"),{headingLevel:i,catalogOptions:o,view:s,filterPlaceholder:l,listItemCreatedFunction:a,minFilterItems:r,selectionMode:n,visibilityAppearance:d,_onCatalogOpen:p,_onTablesOpen:c,layerTablesEnabled:m}=this;return new t({headingLevel:i,view:s,filterPlaceholder:l,listItemCreatedFunction:a,minFilterItems:r,selectionMode:n,visibilityAppearance:d,...o,catalogLayer:e,layerTablesEnabled:m,onCatalogOpen:p,onTablesOpen:c})}_getTableListParams(e){switch(e.type){case"knowledge-graph":return{...this.knowledgeGraphOptions,tables:e.tables};case"map-image":return{...this.mapImageOptions,tables:e.subtables};case"tile":return{...this.tileOptions,tables:e.subtables};default:return null}}async _createTableList(e){const{default:t}=await import("./TableList.js"),{headingLevel:i,selectionMode:o,dragEnabled:s}=this;return new t({headingLevel:i,selectionMode:o,dragEnabled:s,...this._getTableListParams(e)})}_renderLayerFlowItem(e,t){const{messages:i,openedLayers:o}=this,s=e.title||this.messages.untitledLayer;return F("calcite-flow-item",{afterCreate:this._focusLayerFlowItemNode,afterUpdate:this._focusLayerFlowItemNode,bind:this,"data-layer-uid":e.uid,description:s,heading:i["catalog"===e.type?"catalogLayers":"tables"],headingLevel:this.headingLevel,key:`flow-layer-list-${e.uid}`,selected:t,onCalciteFlowItemBack:e=>{e.preventDefault(),o.pop();const t=o.at(-1);t?this._focusLayerFlowItem=t.uid:this._focusRootFlowItem=!0}},this._layerListMap.get(e)?.render())}_renderPanelFlowItems(){const{_openedPanelItems:e,openedLayers:t}=this;return e.toArray().map(({title:i,panel:o},s)=>{const l=()=>this._handlePanelFlowItemBack(o);return F("calcite-flow-item",{afterCreate:this._focusPanelFlowItemNode,afterUpdate:this._focusPanelFlowItemNode,bind:this,description:i,heading:o.title,headingLevel:this.headingLevel,key:`flow-panel-${o.uid}`,selected:!t.length&&s===e.length-1,onCalciteFlowItemBack:e=>{e.preventDefault(),l()}},o.render(),F("calcite-button",{appearance:"transparent",onclick:l,slot:"footer-start",width:"full"},this.messagesCommon.back))})}_handlePanelFlowItemBack(e){e.open=!1,this._focusRootFlowItem=!0}_focusRootFlowItemNode(e){this._focusRootFlowItem&&(this._focusRootFlowItem=!1,T(e))}_focusLayerFlowItemNode(e){this._focusLayerFlowItem===e.dataset.layerUid&&(this._focusLayerFlowItem=null,T(e))}_focusPanelFlowItemNode(e){this._focusPanelFlowItem&&(this._focusPanelFlowItem=!1,T(e))}_renderItems(){const{visible:e,collapsed:t,_visibleItems:i,_openedPanelItems:o,_filterEnabled:s,_rootGroupUid:l,visibleElements:{closeButton:a,collapseButton:r,heading:n,flow:d},_dragEnabled:c,selectionMode:m,filterText:h,openedLayers:y,filterPlaceholder:u,messages:g}=this,_=[F("calcite-flow-item",{afterCreate:this._focusRootFlowItemNode,afterUpdate:this._focusRootFlowItemNode,bind:this,closable:a,closed:!e,collapsed:t,collapsible:r,heading:n?g.widgetLabel:void 0,headingLevel:this.headingLevel,key:"root-flow-item",selected:!y.length&&!o.length,onCalciteFlowItemClose:()=>this.visible=!1},i?.length?null:this._renderNoItems(),F("calcite-list",{afterCreate:e=>{this._rootListEl=e,e.addEventListener("focusin",this._setActiveItem),e.addEventListener("focusout",this._clearActiveItem)},afterRemoved:e=>{this._rootListEl=null,e.removeEventListener("focusin",this._setActiveItem),e.removeEventListener("focusout",this._clearActiveItem)},canPull:e=>this._canMove(e,"pull"),canPut:e=>this._canMove(e,"put"),"data-layer-type":l,displayMode:A,dragEnabled:c,filterEnabled:s,filterPlaceholder:u,filterProps:E,filterText:s?h:"",group:l,key:"root-list",label:g.widgetLabel,onmouseleave:this._clearActiveItem,onmouseover:this._setActiveItem,selectionAppearance:"border",selectionMode:m,onCalciteListChange:e=>this._handleCalciteListChange(e),onCalciteListDragEnd:e=>this._handleCalciteListDragEnd(e.detail),onCalciteListFilter:e=>this.filterText=e.currentTarget?.filterText??"",onCalciteListOrderChange:e=>this._onCalciteListOrderChange(e.detail)},i.toArray().map(e=>this._renderItem(e)),s?F("div",{class:p.filterNoResults,slot:"filter-no-results"},F("calcite-notice",{kind:"info",open:!0,width:"full"},this._renderNoItemsMessage())):null)),this._renderPanelFlowItems(),this._renderedOpenLayerFlowItems];return e?d?F("calcite-flow",{key:"root-flow"},_):_:null}_renderItem(e,t,i){return F(c,{activeItem:this._activeItem,canMove:this._canMove,css:p,displayMode:A,dragEnabled:this.dragEnabled,item:e,key:`layerListItem-${e.layer?.uid}`,layerTablesEnabled:this.layerTablesEnabled,listModeDisabled:this.viewModel.listModeDisabled,messages:this.messages,messagesCommon:this.messagesCommon,parent:t,parentTitles:i,rootGroupUid:this._rootGroupUid,selectedDragItemLayerUid:this._selectedDragItemLayerUid,selectedItems:this.selectedItems,selectionMode:this.selectionMode,visibilityAppearance:this.visibilityAppearance,visibleElements:this.visibleElements,onAction:this._onTriggerAction,onCatalogOpen:this._onCatalogOpen,onPanelOpen:this._onPanelOpen,onSelectedDragItemLayerUidChange:this._onSelectedDragItemLayerUidChange,onTablesOpen:this._onTablesOpen,onTooltipReferenceChange:this._onTooltipReferenceChange})}_moveLayerFromChildList({toEl:e,fromEl:t,dragEl:i,newIndex:o}){const s=_(i),l=_(e),a=_(t);this.viewModel.moveListItem(s,a,l,o)}_handleCalciteListDragEnd(e){const{fromEl:t,dragEl:i,oldIndex:o}=e;t.insertBefore(i,t.children[o])}_sortLayers(e,t){if(e)if(e===this._rootListEl)I(this.view?.map?.layers,t);else{const i=_(e);if(!i)return;w(i,t)}}_handleCalciteListChange(e){const{selectionMode:t,selectedItems:i}=this;if("none"===t)return;const o=e.target.selectedItems.map(e=>_(e)).filter(Boolean);i.removeAll(),i.addMany(o)}};e([r()],D.prototype,"_rootListEl",void 0),e([r()],D.prototype,"_activeItem",void 0),e([r()],D.prototype,"_tooltipReferenceMap",void 0),e([r()],D.prototype,"_focusRootFlowItem",void 0),e([r()],D.prototype,"_focusPanelFlowItem",void 0),e([r()],D.prototype,"_focusLayerFlowItem",void 0),e([r()],D.prototype,"_layerListMap",void 0),e([r()],D.prototype,"_totalItems",null),e([r()],D.prototype,"_visibleItems",null),e([r()],D.prototype,"_openedPanelItems",null),e([r()],D.prototype,"_dragEnabled",null),e([r()],D.prototype,"_filterEnabled",null),e([r()],D.prototype,"_renderedOpenLayerFlowItems",null),e([r({readOnly:!0})],D.prototype,"catalogLayerList",void 0),e([r()],D.prototype,"catalogOptions",void 0),e([r()],D.prototype,"collapsed",void 0),e([r()],D.prototype,"dragEnabled",void 0),e([r()],D.prototype,"filterPlaceholder",void 0),e([r()],D.prototype,"filterPredicate",void 0),e([r()],D.prototype,"filterText",void 0),e([r()],D.prototype,"headingLevel",void 0),e([r()],D.prototype,"icon",null),e([r()],D.prototype,"knowledgeGraphOptions",void 0),e([r()],D.prototype,"label",null),e([r()],D.prototype,"layerTablesEnabled",void 0),e([r()],D.prototype,"listItemCanGiveFunction",void 0),e([r()],D.prototype,"listItemCanReceiveFunction",void 0),e([r()],D.prototype,"listItemCreatedFunction",null),e([r()],D.prototype,"mapImageOptions",void 0),e([r(),M("esri/widgets/LayerList/t9n/LayerList")],D.prototype,"messages",void 0),e([r(),M("esri/t9n/common")],D.prototype,"messagesCommon",void 0),e([r()],D.prototype,"minDragEnabledItems",void 0),e([r()],D.prototype,"minFilterItems",void 0),e([r({readOnly:!0})],D.prototype,"openedLayers",void 0),e([r({readOnly:!0})],D.prototype,"openedLayerLists",void 0),e([r()],D.prototype,"operationalItems",null),e([r()],D.prototype,"selectedItems",void 0),e([r()],D.prototype,"selectionMode",void 0),e([r({readOnly:!0})],D.prototype,"tableList",void 0),e([r()],D.prototype,"tileOptions",void 0),e([r()],D.prototype,"view",null),e([O("trigger-action"),r({type:m})],D.prototype,"viewModel",void 0),e([r()],D.prototype,"visibilityAppearance",void 0),e([r({type:h,nonNullable:!0})],D.prototype,"visibleElements",void 0),D=e([n("esri.widgets.LayerList")],D);const R=D;export{R as default};
5
+ import{__decorate as e}from"tslib";import t from"../core/Collection.js";import{deprecateWidget as i}from"../core/deprecate.js";import{IdentifiableMixin as o}from"../core/Identifiable.js";import s from"../core/Logger.js";import l from"../core/ReactiveMap.js";import{on as r,watch as a,initial as n}from"../core/reactiveUtils.js";import{property as d,subclass as p}from"../core/accessorSupport/decorators.js";import c from"./Widget.js";import{css as m}from"./LayerList/css.js";import h from"./LayerList/LayerListItem.js";import y from"./LayerList/LayerListViewModel.js";import u from"./LayerList/LayerListVisibleElements.js";import g from"./LayerList/ListItem.js";import{minDragEnabledItems as _,minFilterItems as L,getItem as f,getLayerType as v,removeDestroyedListItems as I,setFilterPredicate as w,sortLayersToIds as b,sortChildLayersToIds as C}from"./LayerList/support/layerListUtils.js";import{loadCalciteComponents as E}from"./support/componentsUtils.js";import{globalCss as F}from"./support/globalCss.js";import{calciteListFilterProps as M}from"./support/listUtils.js";import{tsx as O,messageBundle as T,vmEvent as P}from"./support/widget.js";import{setFocus as A}from"./support/widgetUtils.js";const D=t.ofType(g),R="nested";let k=class extends(o(c)){constructor(e,o){super(e,o),this._rootListEl=null,this._activeItem=null,this._tooltipReferenceMap=new l,this._focusRootFlowItem=!1,this._focusPanelFlowItem=!1,this._focusLayerFlowItem=null,this._layerListMap=new l,this._lastDragDetail=null,this._selectedDragItemLayerUid=null,this._rootGroupUid=`operational-${this.uid}`,this._openedLayersController=null,this.catalogLayerList=null,this.catalogOptions=null,this.collapsed=!1,this.dragEnabled=!1,this.filterPlaceholder="",this.filterPredicate=null,this.filterText="",this.headingLevel=2,this.knowledgeGraphOptions=null,this.layerTablesEnabled=new t(["knowledge-graph"]),this.listItemCanGiveFunction=null,this.listItemCanReceiveFunction=null,this.mapImageOptions=null,this.messages=null,this.messagesCommon=null,this.minDragEnabledItems=_,this.minFilterItems=L,this.openedLayers=new t,this.openedLayerLists=new t,this.selectedItems=new D,this.selectionMode="none",this.tableList=null,this.tileOptions=null,this.viewModel=new y,this.visibilityAppearance="default",this.visibleElements=new u,this._canMove=({dragEl:e,fromEl:t,toEl:i},o)=>{const s="pull"===o?this.listItemCanGiveFunction:this.listItemCanReceiveFunction,l=f(e);if(!l?.sortable)return!1;const r=f(t),a=v(t),n=f(i),d=v(i),p=!!a&&!!d&&a===d,c={selected:l,from:r,to:n},m=t.group,h=i.group,y=r?.layer?.type??"",u=n?.layer?.type??"",g=new Set(["map-image","catalog","knowledge-graph"]),_="sublayer";return m&&h&&"function"==typeof s?s.call(null,c):p&&!g.has(y)&&!g.has(u)&&l?.layer?.type!==_},this._onCatalogOpen=e=>{this.openedLayers.push(e.layer?.parent),this._focusLayerFlowItem=e.layer?.uid},this._onTablesOpen=e=>{this.openedLayers.push(e.layer),this._focusLayerFlowItem=e.layer?.uid},this._onPanelOpen=()=>{this._focusPanelFlowItem=!0},this._onTooltipReferenceChange=(e,t)=>{t?this._tooltipReferenceMap.set(e,t):this._tooltipReferenceMap.delete(e)},this._onSelectedDragItemLayerUidChange=e=>{this._selectedDragItemLayerUid=e},this._onTriggerAction=(e,t)=>{this.triggerAction(e,t)},this._clearActiveItem=()=>{this._activeItem=null},this._setActiveItem=e=>{if("default"!==this.visibilityAppearance)return;const t=Array.from(e.composedPath()).find(e=>e.classList?.contains(m.item));this._activeItem=f(t)},this._onCalciteListOrderChange=e=>{const{_lastDragDetail:t}=this,{toEl:i,fromEl:o,dragEl:s,newIndex:l}=e;if(o&&i&&!(t?.newIndex===l&&t?.dragEl===s&&t?.toEl===i&&t?.fromEl===o)){if(this._lastDragDetail=e,this._selectedDragItemLayerUid=s.value,o===i){const e=Array.from(o.children).filter(e=>e?.matches("calcite-list-item")).map(e=>e.value);return void this._sortLayers(o,e)}this._moveLayerFromChildList({toEl:i,fromEl:o,dragEl:s,newIndex:l})}},i(s.getLogger(this),"Layer List","arcgis-layer-list",{version:"5.0"})}initialize(){this.addHandles([r(()=>this.openedLayers,"change",()=>this._handleOpenedLayersChange(),n),r(()=>this.viewModel.operationalItems,"change",()=>I(this.selectedItems),n),a(()=>[this.filterPredicate,this._rootListEl],()=>w(this._rootListEl,this.filterPredicate))])}loadDependencies(){return E({button:()=>import("@esri/calcite-components/dist/components/calcite-button"),flow:()=>import("@esri/calcite-components/dist/components/calcite-flow"),"flow-item":()=>import("@esri/calcite-components/dist/components/calcite-flow-item"),list:()=>import("@esri/calcite-components/dist/components/calcite-list"),notice:()=>import("@esri/calcite-components/dist/components/calcite-notice"),tooltip:()=>import("@esri/calcite-components/dist/components/calcite-tooltip")})}destroy(){this._destroyOpenedLayerLists(),this._tooltipReferenceMap.clear()}get _totalItems(){return this.viewModel.operationalItems.flatten(e=>e.children.filter(e=>"catalog-dynamic-group"!==e.layer?.type)).length}get _visibleItems(){return this.operationalItems?.filter(e=>!e.hidden&&(this.visibleElements.errors||!e.error))}get _openedPanelItems(){return this._visibleItems.flatten(e=>e.children).filter(({hidden:e,panel:t})=>!e&&t?.open&&!t.disabled&&t.flowEnabled)}get _dragEnabled(){return this._totalItems>=this.minDragEnabledItems&&this.dragEnabled}get _filterEnabled(){return this._totalItems>=this.minFilterItems&&this.visibleElements.filter}get _renderedOpenLayerFlowItems(){const{openedLayers:e}=this;return e.toArray().map((t,i)=>this._renderLayerFlowItem(t,i===e.length-1))}get icon(){return"layers"}set icon(e){this._overrideIfSome("icon",e)}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get listItemCreatedFunction(){return this.viewModel.listItemCreatedFunction}set listItemCreatedFunction(e){this.viewModel.listItemCreatedFunction=e}get operationalItems(){return this.viewModel.operationalItems}set operationalItems(e){this.viewModel.operationalItems=e}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}triggerAction(e,t){return this.viewModel.triggerAction(e,t)}render(){const e=this.viewModel?.state,t={[F.hidden]:"loading"===e,[F.disabled]:"disabled"===e};return O("div",{class:this.classes(m.base,F.widget,F.panel,t)},this._renderItemTooltips(),this._renderItems())}async _createFlowList(e,t){const{_layerListMap:i}=this,o=i.get(e);if(o)return o;const s="catalog"===e.type?await this._createCatalogLayerList(e):await this._createTableList(e);return t.aborted||i.set(e,s),s}async _handleOpenedLayersChange(){const{_layerListMap:e,openedLayers:t,openedLayerLists:i}=this;this._openedLayersController?.abort();const o=new AbortController,{signal:s}=o;this._openedLayersController=o,e.forEach((i,o)=>{t.includes(o)||(i.destroy(),e.delete(o))});const l=await Promise.all(t.map(e=>this._createFlowList(e,s)));if(s.aborted)return;i.removeAll(),i.addMany(l);const r=i.at(-1);r?"catalogLayer"in r?(this._set("catalogLayerList",r),this._set("tableList",null)):(this._set("catalogLayerList",null),this._set("tableList",r)):(this._set("catalogLayerList",null),this._set("tableList",null))}_destroyOpenedLayerLists(){this.openedLayerLists.destroyAll(),this.openedLayers.removeAll(),this._layerListMap.clear()}_renderItemTooltip(e){const{_tooltipReferenceMap:t,messages:i}=this;return e?O("calcite-tooltip",{key:`tooltip-${e.layer?.uid}`,overlayPositioning:"fixed",referenceElement:t.get(e.layer?.uid)},i.layerIncompatibleTooltip):null}_renderItemTooltipNodes(e){return e.incompatible?this._renderItemTooltip(e):e.children?.filter(e=>!e.hidden).toArray().map(e=>this._renderItemTooltipNodes(e))}_renderItemTooltips(){return this._visibleItems?.toArray().map(e=>this._renderItemTooltipNodes(e))}_renderNoItemsMessage(){return O("div",{slot:"message"},this.messages.noItemsToDisplay)}_renderNoItems(){return O("div",{class:m.itemMessage,key:"esri-layer-list__no-items"},O("calcite-notice",{icon:"information",kind:"info",open:!0,width:"full"},this._renderNoItemsMessage()))}async _createCatalogLayerList(e){const{default:t}=await import("./CatalogLayerList.js"),{headingLevel:i,catalogOptions:o,view:s,filterPlaceholder:l,listItemCreatedFunction:r,minFilterItems:a,selectionMode:n,visibilityAppearance:d,_onCatalogOpen:p,_onTablesOpen:c,layerTablesEnabled:m}=this;return new t({headingLevel:i,view:s,filterPlaceholder:l,listItemCreatedFunction:r,minFilterItems:a,selectionMode:n,visibilityAppearance:d,...o,catalogLayer:e,layerTablesEnabled:m,onCatalogOpen:p,onTablesOpen:c})}_getTableListParams(e){switch(e.type){case"knowledge-graph":return{...this.knowledgeGraphOptions,tables:e.tables};case"map-image":return{...this.mapImageOptions,tables:e.subtables};case"tile":return{...this.tileOptions,tables:e.subtables};default:return null}}async _createTableList(e){const{default:t}=await import("./TableList.js"),{headingLevel:i,selectionMode:o,dragEnabled:s}=this;return new t({headingLevel:i,selectionMode:o,dragEnabled:s,...this._getTableListParams(e)})}_renderLayerFlowItem(e,t){const{messages:i,openedLayers:o}=this,s=e.title||this.messages.untitledLayer;return O("calcite-flow-item",{afterCreate:this._focusLayerFlowItemNode,afterUpdate:this._focusLayerFlowItemNode,bind:this,"data-layer-uid":e.uid,description:s,heading:i["catalog"===e.type?"catalogLayers":"tables"],headingLevel:this.headingLevel,key:`flow-layer-list-${e.uid}`,selected:t,onCalciteFlowItemBack:e=>{e.preventDefault(),o.pop();const t=o.at(-1);t?this._focusLayerFlowItem=t.uid:this._focusRootFlowItem=!0}},this._layerListMap.get(e)?.render())}_renderPanelFlowItems(){const{_openedPanelItems:e,openedLayers:t}=this;return e.toArray().map(({title:i,panel:o},s)=>{const l=()=>this._handlePanelFlowItemBack(o);return O("calcite-flow-item",{afterCreate:this._focusPanelFlowItemNode,afterUpdate:this._focusPanelFlowItemNode,bind:this,description:i,heading:o.title,headingLevel:this.headingLevel,key:`flow-panel-${o.uid}`,selected:!t.length&&s===e.length-1,onCalciteFlowItemBack:e=>{e.preventDefault(),l()}},o.render(),O("calcite-button",{appearance:"transparent",onclick:l,slot:"footer-start",width:"full"},this.messagesCommon.back))})}_handlePanelFlowItemBack(e){e.open=!1,this._focusRootFlowItem=!0}_focusRootFlowItemNode(e){this._focusRootFlowItem&&(this._focusRootFlowItem=!1,A(e))}_focusLayerFlowItemNode(e){this._focusLayerFlowItem===e.dataset.layerUid&&(this._focusLayerFlowItem=null,A(e))}_focusPanelFlowItemNode(e){this._focusPanelFlowItem&&(this._focusPanelFlowItem=!1,A(e))}_renderItems(){const{visible:e,collapsed:t,_visibleItems:i,_openedPanelItems:o,_filterEnabled:s,_rootGroupUid:l,visibleElements:{closeButton:r,collapseButton:a,heading:n,flow:d},_dragEnabled:p,selectionMode:c,filterText:h,openedLayers:y,filterPlaceholder:u,messages:g}=this,_=[O("calcite-flow-item",{afterCreate:this._focusRootFlowItemNode,afterUpdate:this._focusRootFlowItemNode,bind:this,closable:r,closed:!e,collapsed:t,collapsible:a,heading:n?g.widgetLabel:void 0,headingLevel:this.headingLevel,key:"root-flow-item",selected:!y.length&&!o.length,onCalciteFlowItemClose:()=>this.visible=!1},i?.length?null:this._renderNoItems(),O("calcite-list",{afterCreate:e=>{this._rootListEl=e,e.addEventListener("focusin",this._setActiveItem),e.addEventListener("focusout",this._clearActiveItem)},afterRemoved:e=>{this._rootListEl=null,e.removeEventListener("focusin",this._setActiveItem),e.removeEventListener("focusout",this._clearActiveItem)},canPull:e=>this._canMove(e,"pull"),canPut:e=>this._canMove(e,"put"),"data-layer-type":l,displayMode:R,dragEnabled:p,filterEnabled:s,filterPlaceholder:u,filterProps:M,filterText:s?h:"",group:l,key:"root-list",label:g.widgetLabel,onmouseleave:this._clearActiveItem,onmouseover:this._setActiveItem,selectionAppearance:"border",selectionMode:c,onCalciteListChange:e=>this._handleCalciteListChange(e),onCalciteListDragEnd:e=>this._handleCalciteListDragEnd(e.detail),onCalciteListFilter:e=>this.filterText=e.currentTarget?.filterText??"",onCalciteListOrderChange:e=>this._onCalciteListOrderChange(e.detail)},i.toArray().map(e=>this._renderItem(e)),s?O("div",{class:m.filterNoResults,slot:"filter-no-results"},O("calcite-notice",{kind:"info",open:!0,width:"full"},this._renderNoItemsMessage())):null)),this._renderPanelFlowItems(),this._renderedOpenLayerFlowItems];return e?d?O("calcite-flow",{key:"root-flow"},_):_:null}_renderItem(e,t,i){return O(h,{activeItem:this._activeItem,canMove:this._canMove,css:m,displayMode:R,dragEnabled:this.dragEnabled,item:e,key:`layerListItem-${e.layer?.uid}`,layerTablesEnabled:this.layerTablesEnabled,listModeDisabled:this.viewModel.listModeDisabled,messages:this.messages,messagesCommon:this.messagesCommon,parent:t,parentTitles:i,rootGroupUid:this._rootGroupUid,selectedDragItemLayerUid:this._selectedDragItemLayerUid,selectedItems:this.selectedItems,selectionMode:this.selectionMode,visibilityAppearance:this.visibilityAppearance,visibleElements:this.visibleElements,onAction:this._onTriggerAction,onCatalogOpen:this._onCatalogOpen,onPanelOpen:this._onPanelOpen,onSelectedDragItemLayerUidChange:this._onSelectedDragItemLayerUidChange,onTablesOpen:this._onTablesOpen,onTooltipReferenceChange:this._onTooltipReferenceChange})}_moveLayerFromChildList({toEl:e,fromEl:t,dragEl:i,newIndex:o}){const s=f(i),l=f(e),r=f(t);this.viewModel.moveListItem(s,r,l,o)}_handleCalciteListDragEnd(e){const{fromEl:t,dragEl:i,oldIndex:o}=e;t.insertBefore(i,t.children[o])}_sortLayers(e,t){if(e)if(e===this._rootListEl)b(this.view?.map?.layers,t);else{const i=f(e);if(!i)return;C(i,t)}}_handleCalciteListChange(e){const{selectionMode:t,selectedItems:i}=this;if("none"===t)return;const o=e.target.selectedItems.map(e=>f(e)).filter(Boolean);i.removeAll(),i.addMany(o)}};e([d()],k.prototype,"_rootListEl",void 0),e([d()],k.prototype,"_activeItem",void 0),e([d()],k.prototype,"_tooltipReferenceMap",void 0),e([d()],k.prototype,"_focusRootFlowItem",void 0),e([d()],k.prototype,"_focusPanelFlowItem",void 0),e([d()],k.prototype,"_focusLayerFlowItem",void 0),e([d()],k.prototype,"_layerListMap",void 0),e([d()],k.prototype,"_totalItems",null),e([d()],k.prototype,"_visibleItems",null),e([d()],k.prototype,"_openedPanelItems",null),e([d()],k.prototype,"_dragEnabled",null),e([d()],k.prototype,"_filterEnabled",null),e([d()],k.prototype,"_renderedOpenLayerFlowItems",null),e([d({readOnly:!0})],k.prototype,"catalogLayerList",void 0),e([d()],k.prototype,"catalogOptions",void 0),e([d()],k.prototype,"collapsed",void 0),e([d()],k.prototype,"dragEnabled",void 0),e([d()],k.prototype,"filterPlaceholder",void 0),e([d()],k.prototype,"filterPredicate",void 0),e([d()],k.prototype,"filterText",void 0),e([d()],k.prototype,"headingLevel",void 0),e([d()],k.prototype,"icon",null),e([d()],k.prototype,"knowledgeGraphOptions",void 0),e([d()],k.prototype,"label",null),e([d()],k.prototype,"layerTablesEnabled",void 0),e([d()],k.prototype,"listItemCanGiveFunction",void 0),e([d()],k.prototype,"listItemCanReceiveFunction",void 0),e([d()],k.prototype,"listItemCreatedFunction",null),e([d()],k.prototype,"mapImageOptions",void 0),e([d(),T("esri/widgets/LayerList/t9n/LayerList")],k.prototype,"messages",void 0),e([d(),T("esri/t9n/common")],k.prototype,"messagesCommon",void 0),e([d()],k.prototype,"minDragEnabledItems",void 0),e([d()],k.prototype,"minFilterItems",void 0),e([d({readOnly:!0})],k.prototype,"openedLayers",void 0),e([d({readOnly:!0})],k.prototype,"openedLayerLists",void 0),e([d()],k.prototype,"operationalItems",null),e([d()],k.prototype,"selectedItems",void 0),e([d()],k.prototype,"selectionMode",void 0),e([d({readOnly:!0})],k.prototype,"tableList",void 0),e([d()],k.prototype,"tileOptions",void 0),e([d()],k.prototype,"view",null),e([P("trigger-action"),d({type:y})],k.prototype,"viewModel",void 0),e([d()],k.prototype,"visibilityAppearance",void 0),e([d({type:u,nonNullable:!0})],k.prototype,"visibleElements",void 0),k=e([p("esri.widgets.LayerList")],k);const j=k;export{j as default};