@arcgis/core 5.0.0-next.16 → 5.0.0-next.18

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 (262) hide show
  1. package/analysis/ElevationProfile/ElevationProfileLineInput.js +1 -1
  2. package/assets/esri/core/workers/RemoteClient.js +1 -1
  3. package/assets/esri/core/workers/chunks/{adf7ccf4ef629211c7ee.js → 08aacbfb651cc2e1c054.js} +1 -1
  4. package/assets/esri/core/workers/chunks/234b52b2a391631ceff6.js +1 -0
  5. package/assets/esri/core/workers/chunks/{658cd45b5fb304fd840a.js → 3aa77696c5ea54a238da.js} +1 -1
  6. package/assets/esri/core/workers/chunks/{8f3503b2fb6cd38757b9.js → 458e87902abc24b375da.js} +1 -1
  7. package/assets/esri/core/workers/chunks/{57b410198d83bf0ab708.js → 4a89e120be142ab58a27.js} +1 -1
  8. package/assets/esri/core/workers/chunks/{49571d6875de1f2e7e25.js → 4b9dfdc23ba3d6ebcc1b.js} +2 -2
  9. package/assets/esri/core/workers/chunks/{a410dcf80d17a2383337.js → 65a4099bdbe31834d0cc.js} +1 -1
  10. package/assets/esri/core/workers/chunks/722da7a39a0ad9300752.js +1 -0
  11. package/assets/esri/core/workers/chunks/{cdb4664fd59860ddeb5a.js → 72f1c3d97e7b9546c113.js} +1 -1
  12. package/assets/esri/core/workers/chunks/{bc318b6fef192cee2a72.js → 76e945da8f30d8641c3d.js} +20 -20
  13. package/assets/esri/core/workers/chunks/{319c3f46f2afb8f3e5a9.js → 89c9cf7f799858d14c76.js} +1 -1
  14. package/assets/esri/core/workers/chunks/{e19cd07df8ce87e18832.js → 8b33732e3c2924c1f60d.js} +1 -1
  15. package/assets/esri/core/workers/chunks/98739414c107ad78e4d8.js +1 -0
  16. package/assets/esri/core/workers/chunks/{8b73db0f4d6714396eb0.js → a6fa90eab77ac0e1cdfc.js} +1 -1
  17. package/assets/esri/core/workers/chunks/ac366221e8636b60aee5.js +1 -0
  18. package/assets/esri/core/workers/chunks/{23e17b745adf71a5efc7.js → aca72ca7f43f70eb8077.js} +1 -1
  19. package/assets/esri/core/workers/chunks/ad0c7225941437d18408.js +1 -0
  20. package/assets/esri/core/workers/chunks/b30897952494a3e5b9fe.js +1 -0
  21. package/assets/esri/core/workers/chunks/bfd3d81e8e148be99686.js +1 -0
  22. package/assets/esri/libs/lyr3d/lyr3DMain.wasm +0 -0
  23. package/assets/esri/libs/lyr3d/lyr3DWorker.wasm +0 -0
  24. package/assets/esri/themes/base/widgets/_Editor.scss +2 -1
  25. package/assets/esri/themes/base/widgets/_FeatureForm.scss +1 -1
  26. package/assets/esri/themes/dark/main.css +1 -1
  27. package/assets/esri/themes/light/main.css +1 -1
  28. package/assets/esri/themes/light/view.css +1 -1
  29. package/chunks/GaussianSplat.glsl.js +2 -2
  30. package/chunks/ImageMaterial.glsl.js +1 -1
  31. package/chunks/lyr3DMain.js +1 -1
  32. package/config.js +1 -1
  33. package/graphic/graphicOriginUtils.js +1 -1
  34. package/interfaces.d.ts +113 -54
  35. package/intl/locale.js +1 -1
  36. package/kernel.js +1 -1
  37. package/layers/BingMapsLayer.js +1 -1
  38. package/layers/Lyr3DWasmPerSceneView.js +1 -1
  39. package/layers/support/attributionUtils.js +5 -0
  40. package/layers/support/fieldConfigUtils.js +1 -1
  41. package/layers/support/fieldFormatUtils.js +1 -1
  42. package/layers/video/VideoController.js +1 -1
  43. package/libs/parquet/parquet.js +1 -1
  44. package/package.json +1 -1
  45. package/support/revision.js +1 -1
  46. package/symbols/cim/SDFHelper.js +1 -1
  47. package/symbols/cim/cimAnalyzer.js +1 -1
  48. package/views/2d/LabelManager.js +1 -1
  49. package/views/2d/analysis/ElevationProfile/ElevationProfileLineVisualization2D.js +1 -1
  50. package/views/2d/engine/flow/dataUtils.js +1 -1
  51. package/views/2d/engine/webgl/FeatureTile.js +1 -1
  52. package/views/2d/engine/webgl/OverlayMultipoint.js +1 -1
  53. package/views/2d/engine/webgl/TextureManager.js +1 -1
  54. package/views/2d/engine/webgl/VideoScreenRenderer.js +1 -1
  55. package/views/2d/engine/webgl/animations/store/AnimationStore.js +1 -1
  56. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AAnimatedPolyShader.js +1 -1
  57. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedFillShader.js +1 -1
  58. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedLineShader.js +1 -1
  59. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedPolyMeshWriters.js +1 -1
  60. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedTechnique.js +1 -1
  61. package/views/2d/engine/webgl/shaderGraph/techniques/colorize/ColorizeTechnique.js +1 -1
  62. package/views/2d/engine/webgl/shaderGraph/techniques/dotDensity/DotDensityResources.js +1 -1
  63. package/views/2d/engine/webgl/shaderGraph/techniques/drop-shadow/DropShadowTechnique.js +1 -1
  64. package/views/2d/engine/webgl/shaderGraph/techniques/opacity/OpacityTechnique.js +1 -1
  65. package/views/2d/engine/webgl/shaderGraph/techniques/raster/RasterColorizerTechnique.js +1 -1
  66. package/views/2d/engine/webgl/shaderGraph/techniques/raster/RasterHighlightTechnique.js +1 -1
  67. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/LineShader.js +1 -1
  68. package/views/2d/engine/webgl/textureUtils.js +1 -1
  69. package/views/2d/layers/features/FeatureContainer.js +1 -1
  70. package/views/2d/layers/features/Processor.js +1 -1
  71. package/views/2d/layers/features/processor/BinningStrategy.js +1 -1
  72. package/views/2d/layers/features/processor/ClusterStrategy.js +1 -1
  73. package/views/2d/layers/features/processor/TrackStrategy.js +1 -1
  74. package/views/2d/layers/features/support/FeatureMetadata.js +1 -1
  75. package/views/3d/GroundView3D.js +1 -1
  76. package/views/3d/analysis/Dimension/LengthDimensionSubTool.js +1 -1
  77. package/views/3d/analysis/ElevationProfile/ElevationProfileGeometryVisualization3D.js +1 -1
  78. package/views/3d/analysis/Slice/RotateManipulator.js +1 -1
  79. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillComputation.js +1 -1
  80. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementTool.js +1 -1
  81. package/views/3d/analysis/images/Factory.js +1 -1
  82. package/views/3d/environment/ChapmanAtmosphere.js +1 -1
  83. package/views/3d/environment/ChapmanAtmosphereTechnique.js +1 -1
  84. package/views/3d/environment/CloudsCompositionTechnique.js +1 -1
  85. package/views/3d/environment/CloudsTechnique.js +1 -1
  86. package/views/3d/environment/EnvironmentManager.js +1 -1
  87. package/views/3d/environment/FogTechnique.js +1 -1
  88. package/views/3d/environment/NoiseTextureAtlasTechnique.js +1 -1
  89. package/views/3d/environment/PrecipitationTechnique.js +1 -1
  90. package/views/3d/environment/SimpleAtmosphereTechnique.js +1 -1
  91. package/views/3d/layers/BuildingComponentSublayerView3D.js +1 -1
  92. package/views/3d/layers/DrapedSubView3D.js +1 -1
  93. package/views/3d/layers/FlowSubView3D.js +1 -1
  94. package/views/3d/layers/ImageryTileLayerView3D.js +1 -1
  95. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  96. package/views/3d/layers/IntegratedMeshLayerView3D.js +1 -1
  97. package/views/3d/layers/MediaLayerView3D.js +1 -1
  98. package/views/3d/layers/PointCloudLayerView3D.js +1 -1
  99. package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
  100. package/views/3d/layers/SceneLayerView3D.js +1 -1
  101. package/views/3d/layers/TiledLayerView3D.js +1 -1
  102. package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
  103. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  104. package/views/3d/layers/graphics/Graphics3DTextSymbolLayer.js +1 -1
  105. package/views/3d/layers/graphics/defaultSymbolComplexity.js +1 -1
  106. package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
  107. package/views/3d/layers/graphics/pipeline/rendering/FeaturePipelineRenderManager.js +1 -1
  108. package/views/3d/layers/graphics/wosrLoader.js +1 -1
  109. package/views/3d/layers/i3s/I3SMaterialUtil.js +1 -1
  110. package/views/3d/support/QualityProfile.js +5 -0
  111. package/views/3d/support/QualitySettings.js +1 -1
  112. package/views/3d/support/StreamTextureCollection.js +1 -1
  113. package/views/3d/support/TextureCollection.js +1 -1
  114. package/views/3d/support/engineContent/marker.js +1 -1
  115. package/views/3d/support/engineContent/sdfPrimitives.js +1 -1
  116. package/views/3d/support/flow/FlowSubViewTiles3D.js +1 -1
  117. package/views/3d/support/flow/FlowWorker.js +1 -1
  118. package/views/3d/support/flow/FlowWorkerHandle.js +1 -1
  119. package/views/3d/support/flow/StreamlineResources3D.js +1 -1
  120. package/views/3d/support/flow/StreamlineResources3DOverlay.js +1 -1
  121. package/views/3d/support/flow/StreamlineResources3DShape.js +1 -1
  122. package/views/3d/support/flow/constants.js +1 -1
  123. package/views/3d/support/flow/loadUtils.js +1 -1
  124. package/views/3d/support/gaussianSplatting/GaussianSplatOrderTexture.js +1 -1
  125. package/views/3d/support/popupHitTest.js +1 -1
  126. package/views/3d/terrain/BlendLayersTechnique.js +1 -1
  127. package/views/3d/terrain/OverlayRenderer.js +1 -1
  128. package/views/3d/terrain/RasterColorizerTechnique.js +1 -1
  129. package/views/3d/terrain/TerrainSurface.js +1 -1
  130. package/views/3d/terrain/TileAgent.js +1 -1
  131. package/views/3d/terrain/TileCompositor.js +1 -1
  132. package/views/3d/webgl-engine/Stage.js +1 -1
  133. package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
  134. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  135. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechnique.js +1 -1
  136. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
  137. package/views/3d/webgl-engine/core/material/MaterialBase.js +1 -1
  138. package/views/3d/webgl-engine/core/material/RenderTexture.js +1 -1
  139. package/views/3d/webgl-engine/core/shaderTechnique/{ReloadableShaderModule.js → ReloadableShader.js} +1 -1
  140. package/views/3d/webgl-engine/core/shaderTechnique/ShaderTechnique.js +1 -1
  141. package/views/3d/webgl-engine/effects/focusArea/FocusAreaColorTechnique.js +1 -1
  142. package/views/3d/webgl-engine/effects/focusArea/FocusAreaMaskTechnique.js +1 -1
  143. package/views/3d/webgl-engine/effects/glow/GlowBlurTechnique.js +1 -1
  144. package/views/3d/webgl-engine/effects/glow/GlowCompositionTechnique.js +1 -1
  145. package/views/3d/webgl-engine/effects/haze/Haze.js +1 -1
  146. package/views/3d/webgl-engine/effects/haze/HazeCompositingTechnique.js +1 -1
  147. package/views/3d/webgl-engine/effects/haze/HazeTechnique.js +1 -1
  148. package/views/3d/webgl-engine/effects/highlight/HighlightApplyTechnique.js +1 -1
  149. package/views/3d/webgl-engine/effects/highlight/HighlightBlurTechnique.js +1 -1
  150. package/views/3d/webgl-engine/effects/highlight/HighlightDownsampleTechnique.js +1 -1
  151. package/views/3d/webgl-engine/effects/highlight/HighlightToSingleTechnique.js +1 -1
  152. package/views/3d/webgl-engine/effects/highlight/ShadowHighlightTechnique.js +1 -1
  153. package/views/3d/webgl-engine/effects/laserlines/LaserlinePathTechnique.js +1 -1
  154. package/views/3d/webgl-engine/effects/laserlines/LaserlineTechnique.js +1 -1
  155. package/views/3d/webgl-engine/effects/magnifier/MagnifierTechnique.js +1 -1
  156. package/views/3d/webgl-engine/effects/smaa/SMAA.js +1 -1
  157. package/views/3d/webgl-engine/effects/smaa/SMAABlendWeightsTechnique.js +1 -1
  158. package/views/3d/webgl-engine/effects/smaa/SMAABlurTechnique.js +1 -1
  159. package/views/3d/webgl-engine/effects/smaa/SMAAEdgeDetectTechnique.js +1 -1
  160. package/views/3d/webgl-engine/effects/ssao/SSAO.js +1 -1
  161. package/views/3d/webgl-engine/effects/ssao/SSAOBlurTechnique.js +1 -1
  162. package/views/3d/webgl-engine/effects/ssao/SSAOTechnique.js +1 -1
  163. package/views/3d/webgl-engine/effects/stars/StarsTechnique.js +1 -1
  164. package/views/3d/webgl-engine/effects/transparency/OITBlendTechnique.js +1 -1
  165. package/views/3d/webgl-engine/lib/AnimationTimeStep.js +1 -1
  166. package/views/3d/webgl-engine/lib/BasisUtil.js +1 -1
  167. package/views/3d/webgl-engine/lib/DDSUtil.js +1 -1
  168. package/views/3d/webgl-engine/lib/GLTextureMaterial.js +1 -1
  169. package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
  170. package/views/3d/webgl-engine/lib/ManagedTexture.js +5 -0
  171. package/views/3d/webgl-engine/lib/OrderIndependentTransparency.js +1 -1
  172. package/views/3d/webgl-engine/lib/Program.js +1 -1
  173. package/views/3d/webgl-engine/lib/RenderFeature.js +1 -1
  174. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  175. package/views/3d/webgl-engine/lib/RenderingContext.js +1 -1
  176. package/views/3d/webgl-engine/lib/TextTextureAtlas.js +1 -1
  177. package/views/3d/webgl-engine/lib/TextTextureFactory.js +1 -1
  178. package/views/3d/webgl-engine/lib/TextureRepository.js +1 -1
  179. package/views/3d/webgl-engine/lib/TextureTechnique.js +1 -1
  180. package/views/3d/webgl-engine/lib/edgeRendering/EdgeShaderTechnique.js +1 -1
  181. package/views/3d/webgl-engine/lib/glUtil3D.js +1 -1
  182. package/views/3d/webgl-engine/materials/ImageMaterial.js +1 -1
  183. package/views/3d/webgl-engine/materials/PathTechnique.js +1 -1
  184. package/views/3d/webgl-engine/materials/WaterTechnique.js +1 -1
  185. package/views/3d/webgl-engine/materials/internal/WaterTextureRepository.js +1 -1
  186. package/views/3d/webgl-engine/materials/stippleTextureRepository.js +1 -1
  187. package/views/3d/webgl-engine/parts/RenderView.js +1 -1
  188. package/views/3d/webgl-engine/shaders/AtmosphereCompositingTechnique.js +1 -1
  189. package/views/3d/webgl-engine/shaders/CheckerBoardTechnique.js +1 -1
  190. package/views/3d/webgl-engine/shaders/ColorMaterialTechnique.js +1 -1
  191. package/views/3d/webgl-engine/shaders/CompositingTechnique.js +1 -1
  192. package/views/3d/webgl-engine/shaders/CutFillCompositionTechnique.js +1 -1
  193. package/views/3d/webgl-engine/shaders/CutFillDepthTechnique.js +1 -1
  194. package/views/3d/webgl-engine/shaders/CutFillMaskTechnique.js +1 -1
  195. package/views/3d/webgl-engine/shaders/CutFillReductionTechnique.js +1 -1
  196. package/views/3d/webgl-engine/shaders/CutFillTargetDepthTechnique.js +1 -1
  197. package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
  198. package/views/3d/webgl-engine/shaders/GaussianSplat.glsl.js +1 -1
  199. package/views/3d/webgl-engine/shaders/GaussianSplatCompositionTechnique.js +1 -1
  200. package/views/3d/webgl-engine/shaders/GaussianSplatDepthCompositionTechnique.js +1 -1
  201. package/views/3d/webgl-engine/shaders/GaussianSplatDepthTechnique.js +1 -1
  202. package/views/3d/webgl-engine/shaders/GaussianSplatTechnique.js +1 -1
  203. package/views/3d/webgl-engine/shaders/GaussianSplatTechniqueConfiguration.js +1 -1
  204. package/views/3d/webgl-engine/shaders/HUDCompositingTechnique.js +1 -1
  205. package/views/3d/webgl-engine/shaders/HUDMaterialTechnique.js +1 -1
  206. package/views/3d/webgl-engine/shaders/HeatmapDensityTechnique.js +1 -1
  207. package/views/3d/webgl-engine/shaders/HeatmapTechnique.js +1 -1
  208. package/views/3d/webgl-engine/shaders/ImageMaterialTechnique.js +1 -1
  209. package/views/3d/webgl-engine/shaders/LineCalloutTechnique.js +1 -1
  210. package/views/3d/webgl-engine/shaders/LineMarkerTechnique.js +1 -1
  211. package/views/3d/webgl-engine/shaders/MeasurementArrowTechnique.js +1 -1
  212. package/views/3d/webgl-engine/shaders/NativeLineTechnique.js +1 -1
  213. package/views/3d/webgl-engine/shaders/OverlayCompositingTechnique.js +1 -1
  214. package/views/3d/webgl-engine/shaders/PatternTechnique.js +1 -1
  215. package/views/3d/webgl-engine/shaders/PointRendererTechnique.js +1 -1
  216. package/views/3d/webgl-engine/shaders/RealisticTreeTechnique.js +1 -1
  217. package/views/3d/webgl-engine/shaders/RibbonLineTechnique.js +1 -1
  218. package/views/3d/webgl-engine/shaders/ShadedColorMaterialTechnique.js +1 -1
  219. package/views/3d/webgl-engine/shaders/ShadowCastAccumulateTechnique.js +1 -1
  220. package/views/3d/webgl-engine/shaders/ShadowCastClearTechnique.js +1 -1
  221. package/views/3d/webgl-engine/shaders/ShadowCastVisualizeTechnique.js +1 -1
  222. package/views/3d/webgl-engine/shaders/SlicePlaneMaterialTechnique.js +1 -1
  223. package/views/3d/webgl-engine/shaders/TerrainTechnique.js +1 -1
  224. package/views/3d/webgl-engine/shaders/ViewshedTechnique.js +1 -1
  225. package/views/GroundView.js +1 -1
  226. package/views/SceneView.js +1 -1
  227. package/views/analysis/ElevationProfile/ElevationProfileTool.js +1 -1
  228. package/views/analysis/ElevationProfile/types.d.ts +5 -0
  229. package/views/analysis/ElevationProfile/types.js +5 -0
  230. package/views/support/layerViewUtils.js +1 -1
  231. package/views/webgl/Texture.js +1 -1
  232. package/views/webgl/VertexAttributeLocations.js +1 -1
  233. package/views/webgl/testSVGPremultipliedAlpha.js +1 -1
  234. package/widgets/Attribution/AttributionViewModel.js +1 -1
  235. package/widgets/Editor/MergeFeaturesWorkflow.js +1 -1
  236. package/widgets/Editor/SplitFeatureWorkflow.js +1 -1
  237. package/widgets/Editor/UpdateWorkflow.js +1 -1
  238. package/widgets/Editor/Workflow.js +1 -1
  239. package/widgets/Editor/components/CreateFeaturesPanelContent.js +1 -1
  240. package/widgets/Editor/components/PendingFeatureList.js +1 -1
  241. package/widgets/Editor/components/UpdateFeaturePanelContent.js +1 -1
  242. package/widgets/Editor.js +1 -1
  243. package/widgets/Feature/support/featureUtils.js +1 -1
  244. package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/FeatureFormUtilityNetworkAssociationList.js +1 -1
  245. package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/UtilityNetworkAssociationSettings.js +1 -1
  246. package/widgets/FeatureTable/FieldColumn.js +1 -1
  247. package/widgets/FeatureTable/Grid/Column.js +1 -1
  248. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  249. package/widgets/OrientedImageryViewer/adapters/view/MapViewAdapter.js +1 -1
  250. package/widgets/OrientedImageryViewer/adapters/view/SceneViewAdapter.js +1 -1
  251. package/widgets/OrientedImageryViewer/components/OrientedImageryVideoViewModel.js +1 -1
  252. package/widgets/support/UtilityNetworkAssociations/FeatureUtilityNetworkAssociationsViewModel.js +1 -1
  253. package/assets/esri/core/workers/chunks/38ee69125da60464d5a1.js +0 -1
  254. package/assets/esri/core/workers/chunks/4f0016111fd84c612f41.js +0 -1
  255. package/assets/esri/core/workers/chunks/8208dfa8f7fae7e616b9.js +0 -1
  256. package/assets/esri/core/workers/chunks/847f4fc39100fac1df01.js +0 -1
  257. package/assets/esri/core/workers/chunks/ab005fe84952f0676020.js +0 -1
  258. package/assets/esri/core/workers/chunks/bc19a232076d98825eef.js +0 -1
  259. package/assets/esri/core/workers/chunks/c3dcfe26c2c3c829762d.js +0 -1
  260. package/views/3d/support/DisplayQualityProfile.js +0 -5
  261. package/views/3d/webgl-engine/lib/Texture.js +0 -5
  262. /package/views/3d/webgl-engine/lib/{ITexture.js → IManagedTexture.js} +0 -0
@@ -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 has from"../../../core/has.js";import e from"../../../core/Logger.js";import{replace as t}from"../../../core/string.js";import{convertDateFormatToIntlOptions as n,formatDate as r}from"../../../intl/date.js";import{convertNumberFieldFormatToIntlOptions as i,convertNumberFormatToIntlOptions as o,formatNumber as a}from"../../../intl/number.js";import{isRasterPixelValueField as l,featureHasFields as u,isTimeOnlyField as s}from"../../../layers/support/fieldUtils.js";import{supportsFieldConfiguration as f,getEffectiveLayerCapabilities as d}from"../../../layers/support/layerUtils.js";import{formatAnyDate as c,isAnyDateField as p}from"../../../smartMapping/support/utils.js";import{loadArcade as y}from"../../../support/loadArcade.js";import{getTimeZoneFormattingOptions as m}from"../../../time/timeZoneUtils.js";const g="esri.widgets.Feature.support.featureUtils",I=()=>e.getLogger(g),b=/href=(""|'')/gi,h=/(\{([^{\r\n]+)\})/g,F=/'/g,w=/^\s*expression\//i,T=/(\n)/gi,N=/[\u00A0-\u9999<>&]/gim,j=/href\s*=\s*(?:"([^"]+)"|'([^']+)')/gi,C=/^(?:mailto:|tel:)/,Z="relationships/",v=n("short-date-short-time");function L(e){if(null!=e)return(e.sourceLayer||e.layer)??void 0}async function x({type:e,value:t,event:n}){try{return"function"==typeof t?t(n):await t}catch(r){return void I().error("error",`An error occurred when calling the "${e}" function`,{error:r,graphic:n.graphic,value:t})}}function q(e=""){if(e)return!C.test(e.trim().toLowerCase())}function A(e){return!!e&&w.test(e)}function E(e,t){if(!t||!A(t)||!e)return;const n=t.replace(w,"").toLowerCase();return e.find(({name:e})=>e.toLowerCase()===n)}function U({fieldInfo:e,graphic:t}){return!(!e?.fieldName||A(e.fieldName)||be(e.fieldName)||t?.isAggregate||t?.popupTemplate)}function M({expressionInfos:e,fieldInfo:t,graphic:n,isContentFieldInfos:r,layer:i}){if(!t?.fieldName)return null;const o=E(e,t.fieldName);if(o)return o.title||null;if(f(i)&&U({fieldInfo:t,graphic:n})){const e=i.getFieldAlias(t.fieldName);return r?t.label||e||t.fieldName:e||t.fieldName}return t.label||t.fieldName}function k({fieldInfo:e,isContentFieldInfos:t,layer:n}){if(!e?.fieldName)return null;if(f(n)){const r=n?.getFieldConfiguration?.(e.fieldName)?.fieldFormat;return t&&e.fieldFormat||r}return null}function R(e,t){const n=t.get(e.toLowerCase());return`{${n?.fieldName||e}}`}function $(e){return e.replaceAll(b,"")}function D(e,t){const n=O(t,e);return n?n.name:e}function z(e,t){return e&&e.map(e=>D(e,t))}function O(e,t){return e&&"function"==typeof e.getField&&t?e.getField(t)??null:null}function S(e){return`${e}`.trim()}function G({attributes:e,globalAttributes:t,layer:n,text:r,expressionAttributes:i,fieldInfoMap:o}){return r?Q({formattedAttributes:t,template:B(r,{...t,...i,...e},n),fieldInfoMap:o}):""}function Q({formattedAttributes:e,template:n,fieldInfoMap:r}){return S($(t(t(n,e=>R(e,r)),e)))}function P(e,t,n=!1){const r=t[e];if("string"==typeof r){const i="%27",o=(n?encodeURIComponent(r):r).replaceAll(F,i);t[e]=o}}function _(e,t=!1){const n={...e};return Object.keys(n).forEach(e=>P(e,n,t)),n}function H(e,n,r){const i=(n=S(n))&&!n.startsWith("{");return t(e,_(r,i||!1))}function W(e,t){return e.replaceAll(h,(e,n,r)=>{const i=O(t,r);return i?`{${i.name}}`:n})}function B(e,t,n){const r=W(e,n);return r?r.replaceAll(j,(e,n,r)=>H(e,n||r,t)):r}function J(e,t){const n="number"===t?.fieldFormat?.type||t?.format&&null==t.format.dateFormat&&(null!=t.format.places||null!=t.format.digitSeparator);if("string"==typeof e&&n){const t=Number(e);if(!isNaN(t))return t}return e}function K(e){return null!=e&&"object"==typeof e&&"fieldsIndex"in e&&"geometryType"in e&&"getField"in e&&"load"in e&&"loaded"in e&&"objectIdField"in e&&"spatialReference"in e&&"type"in e&&("feature"===e.type||"scene"===e.type||"subtype-group"===e.type||"subtype-sublayer"===e.type||"sublayer"===e.type)&&"when"in e}function V(e){return null!=e&&"object"==typeof e&&"createQuery"in e&&"queryFeatureCount"in e&&"queryObjectIds"in e&&"queryRelatedFeatures"in e&&"queryRelatedFeaturesCount"in e&&"relationships"in e}function X(e){return K(e)&&V(e)}function Y(e){return!(!(e&&"object"==typeof e&&"createQuery"in e&&"getField"in e&&"queryFeatureCount"in e&&"queryFeatures"in e&&"queryObjectIds"in e&&"capabilities"in e&&"fields"in e&&"fieldsIndex"in e&&"type"in e)||"feature"!==e.type&&"subtype-group"!==e.type&&"subtype-sublayer"!==e.type&&"sublayer"!==e.type||!("when"in e))&&("subtype-sublayer"===e.type&&"parent"in e&&e.parent&&"object"==typeof e.parent?"globalIdField"in e.parent:"globalIdField"in e)}function ee(e){return!!e&&"object"==typeof e&&"sourceLayer"in e&&X(e.sourceLayer)}function te(e,t){const{fieldInfos:n,fieldName:r,graphic:u,isContentFieldInfos:s,layer:d,preventPlacesFormatting:p,timeZone:y}=t,m=ie(n,r),g=O(d,r),I=f(d)&&U({fieldInfo:m,graphic:u}),b=I?null:m?.format,h=I?k({fieldInfo:m,layer:d,isContentFieldInfos:s}):null,F="number"===h?.type;if(m&&!l(r)){const t=g?.type,n="date-time"===h?.type,r=m.format?.dateFormat;if("date"===t||"date-only"===t||"time-only"===t||"timestamp-offset"===t||n||r)return c(e,{format:n?void 0:r,fieldFormat:n?h:void 0,fieldType:t,timeZoneOptions:{layerTimeZone:d&&"preferredTimeZone"in d?d.preferredTimeZone:null,viewTimeZone:y,datesInUnknownTimezone:!(!d||!("datesInUnknownTimezone"in d))&&!!d.datesInUnknownTimezone}})}if("string"==typeof e&&l(r)&&b)return ne(e,b);if("string"==typeof(e=J(e,{format:F?void 0:b,fieldFormat:F?h:void 0}))||null==e||null==b&&null==h)return de(e);const w=F?i(h):b?o(b):void 0;return a(e,p?{...w,minimumFractionDigits:0,maximumFractionDigits:20}:w)}function ne(e,t){return e=e.trim(),/\d{2}-\d{2}/.test(e)?e:e.includes(",")?re(e,",",", ",t):e.includes(";")?re(e,";","; ",t):e.includes(" ")?re(e," "," ",t):a(Number(e),o(t))}function re(e,t,n,r){return e.trim().split(t).map(e=>a(Number(e),o(r))).join(n)}function ie(e,t){if(e?.length&&t)return e.find(e=>e.fieldName?.toLowerCase()===t.toLowerCase())}function oe({fieldName:e,graphic:t,layer:n}){if(be(e))return null;if(!n||"function"!=typeof n.getFeatureType)return null;const{typeIdField:r}=n;if(!r||e!==r)return null;const i=n.getFeatureType(t);return i?i.name:null}function ae({fieldName:e,value:t,graphic:n,layer:r}){if(be(e))return null;if(!r||"function"!=typeof r.getFieldDomain)return null;const i=n&&r.getFieldDomain(e,{feature:n,excludeImpliedDomains:has("esri-widget-legacy-field-domain-calculation")});return i&&"coded-value"===i.type?i.getName(t):null}function le(e,t,n,i){const{creatorField:o,creationDateField:a,editorField:l,editDateField:u}=e;if(!t)return;const s=m(i&&"preferredTimeZone"in i?i.preferredTimeZone:null,!(!i||!("datesInUnknownTimezone"in i))&&!!i.datesInUnknownTimezone,n,v,"date"),f={...v,...s},d=t[u];if("number"==typeof d){const e=t[l];return{type:"edit",date:r(d,f),user:e}}const c=t[a];if("number"==typeof c){const e=t[o];return{type:"create",date:r(c,f),user:e}}return null}function ue(e,t){const n=new Map;if(!e)return n;for(const r of e){if(!r.fieldName)continue;const e=D(r.fieldName,t);r.fieldName=e,n.set(e.toLowerCase(),r)}return n}function se(e){const t=[];if(!e)return t;const{fieldInfos:n,content:r}=e;return n&&t.push(...n),r&&Array.isArray(r)?(r.forEach(e=>{if("fields"===e.type){const n=e?.fieldInfos;n&&t.push(...n)}}),t):t}function fe(e){return e.replaceAll(N,e=>`&#${e.charCodeAt(0)};`)}function de(e){return"string"==typeof e?e.replaceAll(T,'<br class="esri-text-new-line" />'):e}function ce(e){const{fieldInfoMap:t,fieldInfos:n,fieldName:r,graphic:i,isContentFieldInfos:o,layer:a,timeZone:l,value:u}=e;if(null==u)return"";const f=ae({fieldName:r,value:u,graphic:i,layer:a});if(f)return f;const d=oe({fieldName:r,graphic:i,layer:a});if(d)return d;if(t.get(r.toLowerCase()))return te(u,{fieldInfos:n||Array.from(t.values()),fieldName:r,graphic:i,isContentFieldInfos:o,layer:a,timeZone:l});const y=a?.fieldsIndex?.get(r);return y&&(p(y)||s(y))?c(u,{fieldType:y.type,timeZoneOptions:{layerTimeZone:a&&"preferredTimeZone"in a?a.preferredTimeZone:null,viewTimeZone:l,datesInUnknownTimezone:!(!a||!("datesInUnknownTimezone"in a))&&!!a.datesInUnknownTimezone}}):de(u)}function pe({attributes:e,fieldInfoMap:t,fieldInfos:n,graphic:r,isContentFieldInfos:i,layer:o,relatedInfos:a,timeZone:l}){const u={};return a?.forEach(e=>we({attributes:u,relatedInfo:e,fieldInfoMap:t,fieldInfos:n,layer:o,timeZone:l})),e&&Object.keys(e).forEach(a=>{const s=e[a];u[a]=ce({fieldInfoMap:t,fieldInfos:n,fieldName:a,graphic:r,isContentFieldInfos:i,layer:o,timeZone:l,value:s})}),u}async function ye(e,t){const{layer:n,graphic:r,outFields:i,objectIds:o,returnGeometry:a,spatialReference:l}=e,u=o[0];if("number"!=typeof u&&"string"!=typeof u){const e="Could not query required fields for the specified feature. The feature's ID is invalid.",t={layer:n,graphic:r,objectId:u,requiredFields:i};return I().warn(e,t),null}if(!d(n)?.operations?.supportsQuery){const e="The specified layer cannot be queried. The following fields will not be available.",t={layer:n,graphic:r,requiredFields:i,returnGeometry:a};return I().warn(e,t),null}const s=n.createQuery();s.objectIds=o,s.outFields=i?.length?i:[n.objectIdField],s.returnGeometry=!!a,s.returnZ=!!a,s.returnM=!!a,s.outSpatialReference=l;return(await n.queryFeatures(s,t)).features[0]}async function me(e){if(!e.expressionInfos?.length)return!1;const t=await y(),{arcadeUtils:{hasGeometryFunctions:n}}=t;return n(e)}async function ge(e){if(!e.expressionInfos?.length)return!1;const t=await y(),{arcadeUtils:{requiresTrack:n}}=t;return n(e)}async function Ie({graphic:e,popupTemplate:t,layer:n,spatialReference:r},i){if(!n||!t)return;if("function"==typeof n.load&&await n.load(i),!e.attributes)return;const o=n.objectIdField,a=e.attributes[o];if(null==a)return;const l=[a],s=new Set(await t.getRequiredFields(n.fieldsIndex));null==n.timeInfo?.trackIdField||s.has(n.timeInfo.trackIdField)||await ge(t)&&s.add(n.timeInfo.trackIdField);const f=u(e,s),d=f?[]:s.has(o)?[...s]:[...s,o],c=t.returnGeometry||await me(t);if(f&&!c)return;const p=await ye({layer:n,graphic:e,outFields:d,objectIds:l,returnGeometry:c,spatialReference:r},i);p&&(p.geometry&&(e.geometry=p.geometry),p.attributes&&(e.attributes={...e.attributes,...p.attributes}))}function be(e=""){return!!e&&e.includes(Z)}function he(e){return e?`${Z}${e.layerId}/${e.fieldName}`:""}function Fe({attributes:e,graphic:t,relatedInfo:n,fieldInfos:r,fieldInfoMap:i,layer:o,timeZone:a}){e&&t&&n&&Object.keys(t.attributes).forEach(l=>{const u=he({layerId:n.relation.id.toString(),fieldName:l}),s=t.attributes[l];e[u]=ce({fieldName:u,fieldInfos:r,fieldInfoMap:i,layer:o,value:s,graphic:t,timeZone:a})})}function we({attributes:e,relatedInfo:t,fieldInfoMap:n,fieldInfos:r,layer:i,timeZone:o}){e&&t&&(t.relatedFeatures?.forEach(a=>Fe({attributes:e,graphic:a,relatedInfo:t,fieldInfoMap:n,fieldInfos:r,layer:i,timeZone:o})),t.relatedStatsFeatures?.forEach(a=>Fe({attributes:e,graphic:a,relatedInfo:t,fieldInfoMap:n,fieldInfos:r,layer:i,timeZone:o})))}const Te=e=>{if(!e)return!1;const t=e.toUpperCase();return t.includes("CURRENT_TIMESTAMP")||t.includes("CURRENT_DATE")||t.includes("CURRENT_TIME")},Ne=({layer:e,method:t,query:n,definitionExpression:r})=>{if(!e.capabilities?.query?.supportsCacheHint||"attachments"===t)return;const i=null!=n.where?n.where:null,o=null!=n.geometry?n.geometry:null;Te(r)||Te(i)||"extent"===o?.type||"tile"===n.resultType||(n.cacheHint=!0)},je=({query:e,layer:t,method:n})=>{Ne({layer:t,method:n,query:e,definitionExpression:`${t.definitionExpression} ${t.serviceDefinitionExpression??""}`})},Ce=({queryPayload:e,layer:t,method:n})=>{Ne({layer:t,method:n,query:e,definitionExpression:`${t.definitionExpression} ${t.serviceDefinitionExpression??""}`})};function Ze(e,t,n){return e&&t&&n?"sublayer"===t.type?xe({layers:t.layer?.allSublayers,map:e,relatedLayer:t,relationship:n})||xe({layers:t.layer?.subtables,map:e,relatedLayer:t,relationship:n}):xe({layers:e.allLayers,map:e,relatedLayer:t,relationship:n})||xe({layers:e.allTables,map:e,relatedLayer:t,relationship:n}):null}function ve(e,t){return e&&"utilityNetworks"in e&&t?e.utilityNetworks?.find(e=>e.isUtilityLayer(t)):null}function Le(e,t){return e?.allTables.find(e=>"feature"===e.type&&e.layerId===t.id&&e.url===t.layer?.url)}function xe({map:e,relationship:t,relationship:{relatedTableId:n},relatedLayer:r,layers:i}){if(!i)return null;for(const o of i){if("map-image"===o.type){const n=xe({layers:o.sublayers,map:e,relatedLayer:r,relationship:t})||xe({layers:o.subtables,map:e,relatedLayer:r,relationship:t});if(n)return n;continue}if(!X(o))continue;if("sublayer"===r.type){if(o!==r&&o.id===n)return o.isTable?Le(e,o):o;continue}const i="scene"===r.type&&r.associatedLayer?r.associatedLayer.url:r.url;if(!i)return null;if("sublayer"!==o.type){if(o!==r&&o.url===i&&o.layerId===n)return o}else if(o!==r&&o.layer?.url===i&&o.id===n)return o.isTable?Le(e,o):o}return null}export{de as applyTextFormattingHTML,ue as createFieldInfoMap,Ze as findRelatedLayer,ve as findUtilityNetwork,W as fixTokens,pe as formatAttributes,le as formatEditInfo,te as formatValueToFieldInfo,se as getAllFieldInfos,k as getFieldFormat,ie as getFieldInfo,M as getFieldInfoLabel,D as getFixedFieldName,z as getFixedFieldNames,L as getSourceLayer,x as graphicCallback,fe as htmlEntities,Y as isAssociatedFeatureSupportedLayer,A as isExpressionField,K as isFeatureSupportedLayer,ee as isGraphicForRelatableFeatureSupportedLayer,X as isRelatableFeatureSupportedLayer,V as isRelatableLayer,be as isRelatedField,U as isSupportedContext,je as preLayerQueryCallback,Ce as preRequestCallback,ye as querySourceLayer,Ie as queryUpdatedFeature,q as shouldOpenInNewTab,Q as substituteAttributes,G as substituteFieldsInLinksAndAttributes};
5
+ import has from"../../../core/has.js";import e from"../../../core/Logger.js";import{replace as t}from"../../../core/string.js";import{convertDateFormatToIntlOptions as n,formatDate as r}from"../../../intl/date.js";import{convertNumberFieldFormatToIntlOptions as i,convertNumberFormatToIntlOptions as o,formatNumber as a}from"../../../intl/number.js";import{fieldFormatFromFieldInfo as l}from"../../../layers/support/fieldFormatUtils.js";import{isRasterPixelValueField as u,featureHasFields as s,isTimeOnlyField as f}from"../../../layers/support/fieldUtils.js";import{supportsFieldConfiguration as d,getEffectiveLayerCapabilities as c}from"../../../layers/support/layerUtils.js";import{formatAnyDate as p,isAnyDateField as y}from"../../../smartMapping/support/utils.js";import{loadArcade as m}from"../../../support/loadArcade.js";import{getTimeZoneFormattingOptions as g}from"../../../time/timeZoneUtils.js";const I="esri.widgets.Feature.support.featureUtils",b=()=>e.getLogger(I),h=/href=(""|'')/gi,F=/(\{([^{\r\n]+)\})/g,w=/'/g,T=/^\s*expression\//i,N=/(\n)/gi,j=/[\u00A0-\u9999<>&]/gim,C=/href\s*=\s*(?:"([^"]+)"|'([^']+)')/gi,Z=/^(?:mailto:|tel:)/,v="relationships/",L=n("short-date-short-time");function x(e){if(null!=e)return(e.sourceLayer||e.layer)??void 0}async function q({type:e,value:t,event:n}){try{return"function"==typeof t?t(n):await t}catch(r){return void b().error("error",`An error occurred when calling the "${e}" function`,{error:r,graphic:n.graphic,value:t})}}function A(e=""){if(e)return!Z.test(e.trim().toLowerCase())}function U(e){return!!e&&T.test(e)}function E(e,t){if(!t||!U(t)||!e)return;const n=t.replace(T,"").toLowerCase();return e.find(({name:e})=>e.toLowerCase()===n)}function M({fieldInfo:e,graphic:t}){return!(!e?.fieldName||U(e.fieldName)||he(e.fieldName)||t?.isAggregate||t?.popupTemplate)}function k({expressionInfos:e,fieldInfo:t,graphic:n,isContentFieldInfos:r,layer:i}){if(!t?.fieldName)return null;const o=E(e,t.fieldName);if(o)return o.title||null;if(d(i)&&M({fieldInfo:t,graphic:n})){const e=i.getFieldAlias(t.fieldName);return r?t.label||e||t.fieldName:e||t.fieldName}return t.label||t.fieldName}function R({fieldInfo:e,isContentFieldInfos:t,layer:n}){if(!e?.fieldName)return null;if(d(n)){const r=n.popupTemplate||n.fieldConfigurations?n.getFieldConfiguration(e.fieldName)?.fieldFormat:l(e,n.getField(e.fieldName));return t&&e.fieldFormat||r}return null}function $(e,t){const n=t.get(e.toLowerCase());return`{${n?.fieldName||e}}`}function D(e){return e.replaceAll(h,"")}function z(e,t){const n=S(t,e);return n?n.name:e}function O(e,t){return e&&e.map(e=>z(e,t))}function S(e,t){return e&&"function"==typeof e.getField&&t?e.getField(t)??null:null}function G(e){return`${e}`.trim()}function Q({attributes:e,globalAttributes:t,layer:n,text:r,expressionAttributes:i,fieldInfoMap:o}){return r?P({formattedAttributes:t,template:J(r,{...t,...i,...e},n),fieldInfoMap:o}):""}function P({formattedAttributes:e,template:n,fieldInfoMap:r}){return G(D(t(t(n,e=>$(e,r)),e)))}function _(e,t,n=!1){const r=t[e];if("string"==typeof r){const i="%27",o=(n?encodeURIComponent(r):r).replaceAll(w,i);t[e]=o}}function H(e,t=!1){const n={...e};return Object.keys(n).forEach(e=>_(e,n,t)),n}function W(e,n,r){const i=(n=G(n))&&!n.startsWith("{");return t(e,H(r,i||!1))}function B(e,t){return e.replaceAll(F,(e,n,r)=>{const i=S(t,r);return i?`{${i.name}}`:n})}function J(e,t,n){const r=B(e,n);return r?r.replaceAll(C,(e,n,r)=>W(e,n||r,t)):r}function K(e,t){const n="number"===t?.fieldFormat?.type||t?.format&&null==t.format.dateFormat&&(null!=t.format.places||null!=t.format.digitSeparator);if("string"==typeof e&&n){const t=Number(e);if(!isNaN(t))return t}return e}function V(e){return null!=e&&"object"==typeof e&&"fieldsIndex"in e&&"geometryType"in e&&"getField"in e&&"load"in e&&"loaded"in e&&"objectIdField"in e&&"spatialReference"in e&&"type"in e&&("feature"===e.type||"scene"===e.type||"subtype-group"===e.type||"subtype-sublayer"===e.type||"sublayer"===e.type)&&"when"in e}function X(e){return null!=e&&"object"==typeof e&&"createQuery"in e&&"queryFeatureCount"in e&&"queryObjectIds"in e&&"queryRelatedFeatures"in e&&"queryRelatedFeaturesCount"in e&&"relationships"in e}function Y(e){return V(e)&&X(e)}function ee(e){return!(!(e&&"object"==typeof e&&"createQuery"in e&&"getField"in e&&"queryFeatureCount"in e&&"queryFeatures"in e&&"queryObjectIds"in e&&"capabilities"in e&&"fields"in e&&"fieldsIndex"in e&&"type"in e)||"feature"!==e.type&&"subtype-group"!==e.type&&"subtype-sublayer"!==e.type&&"sublayer"!==e.type||!("when"in e))&&("subtype-sublayer"===e.type&&"parent"in e&&e.parent&&"object"==typeof e.parent?"globalIdField"in e.parent:"globalIdField"in e)}function te(e){return!!e&&"object"==typeof e&&"sourceLayer"in e&&Y(e.sourceLayer)}function ne(e,t){const{fieldInfos:n,fieldName:r,graphic:l,isContentFieldInfos:s,layer:f,preventPlacesFormatting:c,timeZone:y}=t,m=oe(n,r),g=S(f,r),I=d(f)&&M({fieldInfo:m,graphic:l}),b=I?null:m?.format,h=I?R({fieldInfo:m,layer:f,isContentFieldInfos:s}):null,F="number"===h?.type;if(m&&!u(r)){const t=g?.type,n="date-time"===h?.type,r=b?.dateFormat;if("date"===t||"date-only"===t||"time-only"===t||"timestamp-offset"===t||n||r)return p(e,{format:n?void 0:r,fieldFormat:n?h:void 0,fieldType:t,timeZoneOptions:{layerTimeZone:f&&"preferredTimeZone"in f?f.preferredTimeZone:null,viewTimeZone:y,datesInUnknownTimezone:!(!f||!("datesInUnknownTimezone"in f))&&!!f.datesInUnknownTimezone}})}if("string"==typeof e&&u(r)&&b)return re(e,b);if("string"==typeof(e=K(e,{format:F?void 0:b,fieldFormat:F?h:void 0}))||null==e||null==b&&null==h)return ce(e);const w=F?i(h):b?o(b):void 0;return a(e,c?{...w,minimumFractionDigits:0,maximumFractionDigits:20}:w)}function re(e,t){return e=e.trim(),/\d{2}-\d{2}/.test(e)?e:e.includes(",")?ie(e,",",", ",t):e.includes(";")?ie(e,";","; ",t):e.includes(" ")?ie(e," "," ",t):a(Number(e),o(t))}function ie(e,t,n,r){return e.trim().split(t).map(e=>a(Number(e),o(r))).join(n)}function oe(e,t){if(e?.length&&t)return e.find(e=>e.fieldName?.toLowerCase()===t.toLowerCase())}function ae({fieldName:e,graphic:t,layer:n}){if(he(e))return null;if(!n||"function"!=typeof n.getFeatureType)return null;const{typeIdField:r}=n;if(!r||e!==r)return null;const i=n.getFeatureType(t);return i?i.name:null}function le({fieldName:e,value:t,graphic:n,layer:r}){if(he(e))return null;if(!r||"function"!=typeof r.getFieldDomain)return null;const i=n&&r.getFieldDomain(e,{feature:n,excludeImpliedDomains:has("esri-widget-legacy-field-domain-calculation")});return i&&"coded-value"===i.type?i.getName(t):null}function ue(e,t,n,i){const{creatorField:o,creationDateField:a,editorField:l,editDateField:u}=e;if(!t)return;const s=g(i&&"preferredTimeZone"in i?i.preferredTimeZone:null,!(!i||!("datesInUnknownTimezone"in i))&&!!i.datesInUnknownTimezone,n,L,"date"),f={...L,...s},d=t[u];if("number"==typeof d){const e=t[l];return{type:"edit",date:r(d,f),user:e}}const c=t[a];if("number"==typeof c){const e=t[o];return{type:"create",date:r(c,f),user:e}}return null}function se(e,t){const n=new Map;if(!e)return n;for(const r of e){if(!r.fieldName)continue;const e=z(r.fieldName,t);r.fieldName=e,n.set(e.toLowerCase(),r)}return n}function fe(e){const t=[];if(!e)return t;const{fieldInfos:n,content:r}=e;return n&&t.push(...n),r&&Array.isArray(r)?(r.forEach(e=>{if("fields"===e.type){const n=e?.fieldInfos;n&&t.push(...n)}}),t):t}function de(e){return e.replaceAll(j,e=>`&#${e.charCodeAt(0)};`)}function ce(e){return"string"==typeof e?e.replaceAll(N,'<br class="esri-text-new-line" />'):e}function pe(e){const{fieldInfoMap:t,fieldInfos:n,fieldName:r,graphic:i,isContentFieldInfos:o,layer:a,timeZone:l,value:u}=e;if(null==u)return"";const s=le({fieldName:r,value:u,graphic:i,layer:a});if(s)return s;const d=ae({fieldName:r,graphic:i,layer:a});if(d)return d;if(t.get(r.toLowerCase()))return ne(u,{fieldInfos:n||Array.from(t.values()),fieldName:r,graphic:i,isContentFieldInfos:o,layer:a,timeZone:l});const c=a?.fieldsIndex?.get(r);return c&&(y(c)||f(c))?p(u,{fieldType:c.type,timeZoneOptions:{layerTimeZone:a&&"preferredTimeZone"in a?a.preferredTimeZone:null,viewTimeZone:l,datesInUnknownTimezone:!(!a||!("datesInUnknownTimezone"in a))&&!!a.datesInUnknownTimezone}}):ce(u)}function ye({attributes:e,fieldInfoMap:t,fieldInfos:n,graphic:r,isContentFieldInfos:i,layer:o,relatedInfos:a,timeZone:l}){const u={};return a?.forEach(e=>Te({attributes:u,relatedInfo:e,fieldInfoMap:t,fieldInfos:n,layer:o,timeZone:l})),e&&Object.keys(e).forEach(a=>{const s=e[a];u[a]=pe({fieldInfoMap:t,fieldInfos:n,fieldName:a,graphic:r,isContentFieldInfos:i,layer:o,timeZone:l,value:s})}),u}async function me(e,t){const{layer:n,graphic:r,outFields:i,objectIds:o,returnGeometry:a,spatialReference:l}=e,u=o[0];if("number"!=typeof u&&"string"!=typeof u){const e="Could not query required fields for the specified feature. The feature's ID is invalid.",t={layer:n,graphic:r,objectId:u,requiredFields:i};return b().warn(e,t),null}if(!c(n)?.operations?.supportsQuery){const e="The specified layer cannot be queried. The following fields will not be available.",t={layer:n,graphic:r,requiredFields:i,returnGeometry:a};return b().warn(e,t),null}const s=n.createQuery();s.objectIds=o,s.outFields=i?.length?i:[n.objectIdField],s.returnGeometry=!!a,s.returnZ=!!a,s.returnM=!!a,s.outSpatialReference=l;return(await n.queryFeatures(s,t)).features[0]}async function ge(e){if(!e.expressionInfos?.length)return!1;const t=await m(),{arcadeUtils:{hasGeometryFunctions:n}}=t;return n(e)}async function Ie(e){if(!e.expressionInfos?.length)return!1;const t=await m(),{arcadeUtils:{requiresTrack:n}}=t;return n(e)}async function be({graphic:e,popupTemplate:t,layer:n,spatialReference:r},i){if(!n||!t)return;if("function"==typeof n.load&&await n.load(i),!e.attributes)return;const o=n.objectIdField,a=e.attributes[o];if(null==a)return;const l=[a],u=new Set(await t.getRequiredFields(n.fieldsIndex));null==n.timeInfo?.trackIdField||u.has(n.timeInfo.trackIdField)||await Ie(t)&&u.add(n.timeInfo.trackIdField);const f=s(e,u),d=f?[]:u.has(o)?[...u]:[...u,o],c=t.returnGeometry||await ge(t);if(f&&!c)return;const p=await me({layer:n,graphic:e,outFields:d,objectIds:l,returnGeometry:c,spatialReference:r},i);p&&(p.geometry&&(e.geometry=p.geometry),p.attributes&&(e.attributes={...e.attributes,...p.attributes}))}function he(e=""){return!!e&&e.includes(v)}function Fe(e){return e?`${v}${e.layerId}/${e.fieldName}`:""}function we({attributes:e,graphic:t,relatedInfo:n,fieldInfos:r,fieldInfoMap:i,layer:o,timeZone:a}){e&&t&&n&&Object.keys(t.attributes).forEach(l=>{const u=Fe({layerId:n.relation.id.toString(),fieldName:l}),s=t.attributes[l];e[u]=pe({fieldName:u,fieldInfos:r,fieldInfoMap:i,layer:o,value:s,graphic:t,timeZone:a})})}function Te({attributes:e,relatedInfo:t,fieldInfoMap:n,fieldInfos:r,layer:i,timeZone:o}){e&&t&&(t.relatedFeatures?.forEach(a=>we({attributes:e,graphic:a,relatedInfo:t,fieldInfoMap:n,fieldInfos:r,layer:i,timeZone:o})),t.relatedStatsFeatures?.forEach(a=>we({attributes:e,graphic:a,relatedInfo:t,fieldInfoMap:n,fieldInfos:r,layer:i,timeZone:o})))}const Ne=e=>{if(!e)return!1;const t=e.toUpperCase();return t.includes("CURRENT_TIMESTAMP")||t.includes("CURRENT_DATE")||t.includes("CURRENT_TIME")},je=({layer:e,method:t,query:n,definitionExpression:r})=>{if(!e.capabilities?.query?.supportsCacheHint||"attachments"===t)return;const i=null!=n.where?n.where:null,o=null!=n.geometry?n.geometry:null;Ne(r)||Ne(i)||"extent"===o?.type||"tile"===n.resultType||(n.cacheHint=!0)},Ce=({query:e,layer:t,method:n})=>{je({layer:t,method:n,query:e,definitionExpression:`${t.definitionExpression} ${t.serviceDefinitionExpression??""}`})},Ze=({queryPayload:e,layer:t,method:n})=>{je({layer:t,method:n,query:e,definitionExpression:`${t.definitionExpression} ${t.serviceDefinitionExpression??""}`})};function ve(e,t,n){return e&&t&&n?"sublayer"===t.type?qe({layers:t.layer?.allSublayers,map:e,relatedLayer:t,relationship:n})||qe({layers:t.layer?.subtables,map:e,relatedLayer:t,relationship:n}):qe({layers:e.allLayers,map:e,relatedLayer:t,relationship:n})||qe({layers:e.allTables,map:e,relatedLayer:t,relationship:n}):null}function Le(e,t){return e&&"utilityNetworks"in e&&t?e.utilityNetworks?.find(e=>e.isUtilityLayer(t)):null}function xe(e,t){return e?.allTables.find(e=>"feature"===e.type&&e.layerId===t.id&&e.url===t.layer?.url)}function qe({map:e,relationship:t,relationship:{relatedTableId:n},relatedLayer:r,layers:i}){if(!i)return null;for(const o of i){if("map-image"===o.type){const n=qe({layers:o.sublayers,map:e,relatedLayer:r,relationship:t})||qe({layers:o.subtables,map:e,relatedLayer:r,relationship:t});if(n)return n;continue}if(!Y(o))continue;if("sublayer"===r.type){if(o!==r&&o.id===n)return o.isTable?xe(e,o):o;continue}const i="scene"===r.type&&r.associatedLayer?r.associatedLayer.url:r.url;if(!i)return null;if("sublayer"!==o.type){if(o!==r&&o.url===i&&o.layerId===n)return o}else if(o!==r&&o.layer?.url===i&&o.id===n)return o.isTable?xe(e,o):o}return null}export{ce as applyTextFormattingHTML,se as createFieldInfoMap,ve as findRelatedLayer,Le as findUtilityNetwork,B as fixTokens,ye as formatAttributes,ue as formatEditInfo,ne as formatValueToFieldInfo,fe as getAllFieldInfos,R as getFieldFormat,oe as getFieldInfo,k as getFieldInfoLabel,z as getFixedFieldName,O as getFixedFieldNames,x as getSourceLayer,q as graphicCallback,de as htmlEntities,ee as isAssociatedFeatureSupportedLayer,U as isExpressionField,V as isFeatureSupportedLayer,te as isGraphicForRelatableFeatureSupportedLayer,Y as isRelatableFeatureSupportedLayer,X as isRelatableLayer,he as isRelatedField,M as isSupportedContext,Ce as preLayerQueryCallback,Ze as preRequestCallback,me as querySourceLayer,be as queryUpdatedFeature,A as shouldOpenInNewTab,P as substituteAttributes,Q as substituteFieldsInLinksAndAttributes};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as t}from"tslib";import{substitute as e}from"../../../intl.js";import{stripHTML as i}from"../../../core/string.js";import{property as s}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as o}from"../../../core/accessorSupport/decorators/subclass.js";import r from"../UtilityNetworkAssociationInput.js";import{AssociationDetails as a}from"./AssociationDetails.js";import n from"./VisibleElements.js";import{loadCalciteComponents as c}from"../../support/componentsUtils.js";import{globalCss as l}from"../../support/globalCss.js";import{Heading as d}from"../../support/Heading.js";import{tsx as p,tsxFragment as u,messageBundle as m}from"../../support/widget.js";import h from"../../support/UtilityNetworkAssociations/FeatureUtilityNetworkAssociationsViewModel.js";import y from"../../support/UtilityNetworkAssociations/UtilityNetworkAssociationList.js";import{formatPercentAlong as g}from"../../support/UtilityNetworkAssociations/utils/formatPercentAlong.js";import{isConnectivity as f}from"../../support/UtilityNetworkAssociations/utils/isConnectivity.js";import{isConnectivityMidspan as F}from"../../support/UtilityNetworkAssociations/utils/isConnectivityMidspan.js";const v="esri-feature-form-utility-network-association-list",_={base:v,header:`${v}__header`,headingContent:`${v}__heading-content`,listContainer:`${v}__list-container`};let L=class extends y{constructor(t,e){super(t,e),this._isLoadingSelectFeature=!1,this.associationInput=null,this.headingLevel=5,this.messagesFeatureForm=null,this.onSelectLayer=()=>{},this.onSelectFeature=async()=>{},this.onAddAssociation=()=>{},this.viewModel=new h,this.visibleElements=new n}initialize(){this.setUpObserver()}loadDependencies(){return c({chip:()=>import("@esri/calcite-components/dist/components/calcite-chip"),fab:()=>import("@esri/calcite-components/dist/components/calcite-fab"),icon:()=>import("@esri/calcite-components/dist/components/calcite-icon"),list:()=>import("@esri/calcite-components/dist/components/calcite-list"),"list-item":()=>import("@esri/calcite-components/dist/components/calcite-list-item"),tooltip:()=>import("@esri/calcite-components/dist/components/calcite-tooltip")})}get associatedFeatureCount(){const{associationInput:t}=this;if(!t)return 0;const{associatedFeatureInfos:e,associatedLayer:i}=t,s=i?e.get(i):null;return s?s.length:0}render(){const{associationInput:t}=this;if(!t)return p("div",{class:this.classes(_.base,l.widget)});const{associatedLayer:e}=t,{state:i}=this.viewModel;return p("div",{class:this.classes(_.base,l.widget)},"loading"===i||"querying"===i?this.renderLoading():e?this._renderFeatureList(t,e):this._renderLayerList(t))}_renderLayerList(t){const{associatedFeatureInfos:e,editable:i}=t;return p("div",{class:_.listContainer},p("calcite-list",{label:this.messagesFeatureForm?.associations.associatedLayers},Array.from(e.keys(),e=>this._renderLayerItem(t,e))),i?p("calcite-fab",{appearance:"outline-fill",icon:"plus",key:`${t.uid}-add-button`,kind:"neutral",onclick:()=>this.onAddAssociation({feature:t.feature,associationType:t.activeAssociationType,utilityNetwork:t.utilityNetwork}),text:this.messagesCommon.add,textEnabled:!0}):null)}_renderFeatureList(t,e){return p(u,null,this._renderHeader(t,e),p("div",{class:_.listContainer},this.renderFeatureCountWarning(),p("calcite-list",{label:this.messagesFeatureForm?.associations.associatedFeatures},this._renderAssociatedFeatureListPage(t,e),this.renderFeatureObserver())))}_renderLayerTitle(t){return t.title?p(d,{key:"title",level:this.headingLevel},p("div",{class:_.headingContent},p("calcite-icon",{icon:"layer"}),t.title)):null}_renderTotal(t,i){const{messagesFeature:s}=this,{associatedFeatureInfos:o}=t,r=o.get(i),a=e(s?.numberRecords,{number:r?.length??"0"});return p("div",{key:i.id},a)}_renderHeader(t,e){const{messagesFeatureForm:i}=this,{activeAssociationType:s,featureItem:o,feature:r}=t;return p("div",{class:_.header,key:"filter"},this.visibleElements.associationDetails?p(a,{associationType:s?.type,feature:r,heading:o?.label,messages:i.associations}):void 0,this._renderLayerTitle(e),this.renderFilter(),this._renderTotal(t,e))}_renderAssociatedFeatureListPage(t,e){const{filterText:i,endIndex:s}=this,o=t.associatedFeatureInfos.get(e)?.filter(t=>t.title?.toLowerCase().includes(i)??!1).slice(0,s).toArray()??[];return[...this._renderTooltips(o),...this._renderAssociatedFeatureList(o)]}_renderItemTooltip(t){const{tooltipReferenceMap:e}=this,i=t.feature.uid.toString();return f(t.association)?p("calcite-tooltip",{key:`tooltip-${i}`,overlayPositioning:"fixed",referenceElement:e.get(i)},this.getConnectivityTooltip(t.association.associationType)):null}_renderAssociatedFeature(t){const e=this.messagesCommon.untitled,s=t.title||e,o=t.feature.uid.toString();return p("calcite-list-item",{description:i(t.terminalName??""),key:`associated-feature-type-${o}`,label:i(s),onCalciteListItemSelect:()=>this._selectAssociation(t)},f(t.association)?this.renderConnectivityIcon(t.association.associationType,o):null,F(t.association)?p("calcite-chip",{label:g(t.association),scale:"s",slot:"content-end"},g(t.association)):null,p("calcite-icon",{flipRtl:!0,icon:"chevron-right",scale:"s",slot:"content-end"}))}_renderTooltips(t){return t.map(t=>this._renderItemTooltip(t))}_renderAssociatedFeatureList(t){return t.map(t=>this._renderAssociatedFeature(t))}_renderLayerItem(t,e){const{associatedFeatureInfos:i}=t,s=i.get(e)?.length??0;return p("calcite-list-item",{expanded:!0,key:`${e.id}-show-all`,label:e.title??this.messagesCommon.untitled,value:e.id,onCalciteListItemSelect:()=>this._showAllAssociations(e)},p("calcite-chip",{label:s.toString(),scale:"s",slot:"content-end"},s),p("calcite-icon",{flipRtl:!0,icon:"chevron-right",scale:"s",slot:"content-end"}))}async _selectAssociation(t){this._isLoadingSelectFeature||(this._isLoadingSelectFeature=!0,await this.onSelectFeature({feature:t.feature,association:t.association}),this._isLoadingSelectFeature=!1)}_showAllAssociations(t){this.onSelectLayer({layer:t,associationInput:this.associationInput})}};t([s()],L.prototype,"associatedFeatureCount",null),t([s({type:r})],L.prototype,"associationInput",void 0),t([s()],L.prototype,"headingLevel",void 0),t([s(),m("esri/widgets/FeatureForm/t9n/FeatureForm")],L.prototype,"messagesFeatureForm",void 0),t([s({constructOnly:!0})],L.prototype,"onSelectLayer",void 0),t([s({constructOnly:!0})],L.prototype,"onSelectFeature",void 0),t([s({constructOnly:!0})],L.prototype,"onAddAssociation",void 0),t([s({type:h})],L.prototype,"viewModel",void 0),t([s({type:n,nonNullable:!0})],L.prototype,"visibleElements",void 0),L=t([o("esri.widgets.FeatureForm.FeatureFormUtilityNetworkAssociations.FeatureFormUtilityNetworkAssociationList")],L);const A=L;export{A as default};
5
+ import{__decorate as t}from"tslib";import{substitute as e}from"../../../intl.js";import{stripHTML as i}from"../../../core/string.js";import{property as s}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as o}from"../../../core/accessorSupport/decorators/subclass.js";import r from"../UtilityNetworkAssociationInput.js";import{AssociationDetails as a}from"./AssociationDetails.js";import n from"./VisibleElements.js";import{loadCalciteComponents as c}from"../../support/componentsUtils.js";import{globalCss as l}from"../../support/globalCss.js";import{Heading as d}from"../../support/Heading.js";import{tsx as p,tsxFragment as u,messageBundle as m}from"../../support/widget.js";import h from"../../support/UtilityNetworkAssociations/FeatureUtilityNetworkAssociationsViewModel.js";import y from"../../support/UtilityNetworkAssociations/UtilityNetworkAssociationList.js";import{formatPercentAlong as f}from"../../support/UtilityNetworkAssociations/utils/formatPercentAlong.js";import{isConnectivity as g}from"../../support/UtilityNetworkAssociations/utils/isConnectivity.js";import{isConnectivityMidspan as F}from"../../support/UtilityNetworkAssociations/utils/isConnectivityMidspan.js";const _="esri-feature-form-utility-network-association-list",v={base:_,header:`${_}__header`,headingContent:`${_}__heading-content`,listContainer:`${_}__list-container`};let L=class extends y{constructor(t,e){super(t,e),this._isLoadingSelectFeature=!1,this.associationInput=null,this.headingLevel=5,this.messagesFeatureForm=null,this.onSelectLayer=()=>{},this.onSelectFeature=async()=>{},this.onAddAssociation=()=>{},this.viewModel=new h,this.visibleElements=new n}initialize(){this.setUpObserver()}loadDependencies(){return c({chip:()=>import("@esri/calcite-components/dist/components/calcite-chip"),fab:()=>import("@esri/calcite-components/dist/components/calcite-fab"),icon:()=>import("@esri/calcite-components/dist/components/calcite-icon"),list:()=>import("@esri/calcite-components/dist/components/calcite-list"),"list-item":()=>import("@esri/calcite-components/dist/components/calcite-list-item"),tooltip:()=>import("@esri/calcite-components/dist/components/calcite-tooltip")})}get _filteredFeatureInfos(){const{associationInput:t,filterText:e}=this;return t?.associatedLayer?t?.associatedFeatureInfos.get(t.associatedLayer)?.filter(t=>t.title?.toLowerCase().includes(e)??!1).toArray()??[]:[]}get associatedFeatureCount(){const{associationInput:t}=this;if(!t)return 0;const{associatedFeatureInfos:e,associatedLayer:i}=t,s=i?e.get(i):null;return s?s.length:0}render(){const{associationInput:t}=this;if(!t)return p("div",{class:this.classes(v.base,l.widget)});const{associatedLayer:e}=t,{state:i}=this.viewModel;return p("div",{class:this.classes(v.base,l.widget)},"loading"===i||"querying"===i?this.renderLoading():e?this._renderFeatureList(t,e):this._renderLayerList(t))}_renderLayerList(t){const{associatedFeatureInfos:e,editable:i}=t;return p("div",{class:v.listContainer},p("calcite-list",{label:this.messagesFeatureForm?.associations.associatedLayers},Array.from(e.keys(),e=>this._renderLayerItem(t,e))),i?p("calcite-fab",{appearance:"outline-fill",icon:"plus",key:`${t.uid}-add-button`,kind:"neutral",onclick:()=>this.onAddAssociation({feature:t.feature,associationType:t.activeAssociationType,utilityNetwork:t.utilityNetwork}),text:this.messagesCommon.add,textEnabled:!0}):null)}_renderFeatureList(t,e){return p(u,null,this._renderHeader(t,e),p("div",{class:v.listContainer},this.renderFeatureCountWarning(),p("calcite-list",{label:this.messagesFeatureForm?.associations.associatedFeatures},this._renderAssociatedFeatureListPage(),this.renderFeatureObserver())))}_renderLayerTitle(t){return t.title?p(d,{key:"title",level:this.headingLevel},p("div",{class:v.headingContent},p("calcite-icon",{icon:"layer"}),t.title)):null}_renderTotal(t){const i=e(this.messagesFeature?.numberRecords,{number:this._filteredFeatureInfos.length});return p("div",{key:t.id},i)}_renderHeader(t,e){const{messagesFeatureForm:i}=this,{activeAssociationType:s,featureItem:o,feature:r}=t;return p("div",{class:v.header,key:"filter"},this.visibleElements.associationDetails?p(a,{associationType:s?.type,feature:r,heading:o?.label,messages:i.associations}):void 0,this._renderLayerTitle(e),this.renderFilter(),this._renderTotal(e))}_renderAssociatedFeatureListPage(){const t=this._filteredFeatureInfos.slice(0,this.endIndex);return[...this._renderTooltips(t),...this._renderAssociatedFeatureList(t)]}_renderItemTooltip(t){const{tooltipReferenceMap:e}=this,i=t.feature.uid.toString();return g(t.association)?p("calcite-tooltip",{key:`tooltip-${i}`,overlayPositioning:"fixed",referenceElement:e.get(i)},this.getConnectivityTooltip(t.association.associationType)):null}_renderAssociatedFeature(t){const e=this.messagesCommon.untitled,s=t.title||e,o=t.feature.uid.toString();return p("calcite-list-item",{description:i(t.terminalName??""),key:`associated-feature-type-${o}`,label:i(s),onCalciteListItemSelect:()=>this._selectAssociation(t)},g(t.association)?this.renderConnectivityIcon(t.association.associationType,o):null,F(t.association)?p("calcite-chip",{label:f(t.association),scale:"s",slot:"content-end"},f(t.association)):null,p("calcite-icon",{flipRtl:!0,icon:"chevron-right",scale:"s",slot:"content-end"}))}_renderTooltips(t){return t.map(t=>this._renderItemTooltip(t))}_renderAssociatedFeatureList(t){return t.map(t=>this._renderAssociatedFeature(t))}_renderLayerItem(t,e){const{associatedFeatureInfos:i}=t,s=i.get(e)?.length??0;return p("calcite-list-item",{expanded:!0,key:`${e.id}-show-all`,label:e.title??this.messagesCommon.untitled,value:e.id,onCalciteListItemSelect:()=>{this.filterText="",this._showAllAssociations(e)}},p("calcite-chip",{label:s.toString(),scale:"s",slot:"content-end"},s),p("calcite-icon",{flipRtl:!0,icon:"chevron-right",scale:"s",slot:"content-end"}))}async _selectAssociation(t){this._isLoadingSelectFeature||(this._isLoadingSelectFeature=!0,await this.onSelectFeature({feature:t.feature,association:t.association}),this._isLoadingSelectFeature=!1)}_showAllAssociations(t){this.onSelectLayer({layer:t,associationInput:this.associationInput})}};t([s()],L.prototype,"_filteredFeatureInfos",null),t([s()],L.prototype,"associatedFeatureCount",null),t([s({type:r})],L.prototype,"associationInput",void 0),t([s()],L.prototype,"headingLevel",void 0),t([s(),m("esri/widgets/FeatureForm/t9n/FeatureForm")],L.prototype,"messagesFeatureForm",void 0),t([s({constructOnly:!0})],L.prototype,"onSelectLayer",void 0),t([s({constructOnly:!0})],L.prototype,"onSelectFeature",void 0),t([s({constructOnly:!0})],L.prototype,"onAddAssociation",void 0),t([s({type:h})],L.prototype,"viewModel",void 0),t([s({type:n,nonNullable:!0})],L.prototype,"visibleElements",void 0),L=t([o("esri.widgets.FeatureForm.FeatureFormUtilityNetworkAssociations.FeatureFormUtilityNetworkAssociationList")],L);const A=L;export{A as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import{property as t}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as o}from"../../../core/accessorSupport/decorators/subclass.js";import i from"../../Widget.js";import{loadCalciteComponents as n}from"../../support/componentsUtils.js";import{globalCss as s}from"../../support/globalCss.js";import{tsx as r,messageBundle as c}from"../../support/widget.js";import{getAssociationTitle as a}from"../../support/UtilityNetworkAssociations/utils/getAssociationTitle.js";import{isFromElement as l}from"../../support/UtilityNetworkAssociations/utils/isFromElement.js";const m="esri-feature-form-utility-network-association-settings",d={base:m,infoContainer:`${m}__info-container`};let u=class extends i{constructor(e,t){super(e,t),this.percentAlong=50,this.headingLevel=5,this.messagesFeature=null,this.messagesCommon=null,this.messagesFeatureForm=null,this.readOnly=!1,this.sourceFeature=null,this.targetFeature=null,this.utilityNetwork=null}loadDependencies(){return n({block:()=>import("@esri/calcite-components/dist/components/calcite-block"),combobox:()=>import("@esri/calcite-components/dist/components/calcite-combobox"),"combobox-item":()=>import("@esri/calcite-components/dist/components/calcite-combobox-item"),"input-number":()=>import("@esri/calcite-components/dist/components/calcite-input-number"),label:()=>import("@esri/calcite-components/dist/components/calcite-label"),switch:()=>import("@esri/calcite-components/dist/components/calcite-switch")})}get association(){return this._get("association")}set association(e){this.percentAlong=e.percentAlong?100*e.percentAlong:50,this._set("association",e)}get associationType(){return this.association.associationType}set associationType(e){this.association.associationType=e,"junction-edge-to-connectivity"!==e&&"junction-edge-from-connectivity"!==e||(this.association.percentAlong=void 0)}render(){return r("div",{class:this.classes(d.base,s.widget)},this._renderFromAssociationEndpoint(),this._renderToAssociationEndpoint(),this._renderAdditionalContent())}_renderFromAssociationEndpoint(){const{associationType:e,association:t,sourceFeature:o,targetFeature:i,messagesFeatureForm:n}=this,s=l(o.feature,t)?o:i,r=s.label,c=a(t,"from",n.associations);switch(e){case"connectivity":case"junction-junction-connectivity":case"junction-edge-midspan-connectivity":case"junction-edge-from-connectivity":case"junction-edge-to-connectivity":return this._renderAssociationEndpoint(r,c,this._renderConnectivityContent(s.feature,t.fromNetworkElement))}return this._renderAssociationEndpoint(r,c)}_renderToAssociationEndpoint(){const{associationType:e,association:t,sourceFeature:o,targetFeature:i,messagesFeatureForm:n}=this,s=l(o.feature,t)?i:o,r=s.label,c=a(t,"to",n.associations);let m;switch(e){case"connectivity":case"junction-junction-connectivity":m=this._renderConnectivityContent(s.feature,t.toNetworkElement);break;case"containment":m=this._isNonspatial(s.feature)?null:this._renderContainmentContent()}return this._renderAssociationEndpoint(r,c,m)}_renderAssociationEndpoint(e,t,o){return r("calcite-block",{description:t,expanded:!0,heading:e},o)}_renderContainmentContent(){const{messagesFeatureForm:e,association:t}=this,o=t.isContentVisible??!1;return r("calcite-label",{layout:"inline"},e.associations.visible,r("calcite-switch",{checked:o,onCalciteSwitchChange:({currentTarget:e})=>{t.isContentVisible=e.checked}}))}_renderConnectivityContent(e,t){const{messagesFeatureForm:o,utilityNetwork:i}=this,n=i.getTerminalConfiguration(e),s=n?.terminals.map(e=>this._renderComboboxListItemNumber(e.id,t.terminalId,e.name))||[];return r("calcite-label",null,o.associations.terminal,r("calcite-combobox",{allowCustomValues:!1,clearDisabled:!0,label:o.associations.terminalComboboxLabel,overlayPositioning:"fixed",selectionMode:"single",onCalciteComboboxChange:({currentTarget:e})=>{t.terminalId=parseInt(e.value,10)}},...s))}_renderAdditionalContent(){const{associationType:e}=this;switch(e){case"connectivity":case"junction-junction-connectivity":case"attachment":case"containment":return}const t="junction-edge-midspan-connectivity"===e?e:"junction-edge-from-connectivity",{messagesFeatureForm:o}=this,i=[this._renderComboboxListItemString("junction-edge-midspan-connectivity",t,o.associations.midspanEdge),this._renderComboboxListItemString("junction-edge-from-connectivity",t,o.associations.endpointEdge)];return r("div",{class:d.infoContainer},r("calcite-label",{key:"additional-content"},o.associations.connectTo,r("calcite-combobox",{allowCustomValues:!1,clearDisabled:!0,label:o.associations.edgeConnectionComboboxLabel,overlayPositioning:"fixed",selectionMode:"single",onCalciteComboboxChange:({currentTarget:e})=>{this.associationType=e.value}},...i)),"junction-edge-midspan-connectivity"===t?this._renderMidspanEdgeContent():this._renderEndpointEdgeContent())}_renderMidspanEdgeContent(){const{messagesFeatureForm:e,percentAlong:t,association:o}=this;return o.percentAlong=t/100,r("calcite-label",{key:"midspan-edge"},e.associations.midspanLocation,r("calcite-input-number",{max:100,min:0,numberButtonType:"vertical",suffixText:"%",value:`${t}`,onCalciteInputNumberInput:({currentTarget:e})=>{this.percentAlong=parseFloat(e.value)}}))}_renderEndpointEdgeContent(){const{associationType:e,messagesFeatureForm:t}=this,o="junction-edge-to-connectivity"===e;return r("calcite-label",{key:"endpoint-edge"},t.associations.edgeSide,r("calcite-label",{layout:"inline"},t.associations.fromSide,r("calcite-switch",{checked:o,onCalciteSwitchChange:({currentTarget:e})=>{const t=e.checked?"junction-edge-to-connectivity":"junction-edge-from-connectivity";this.associationType=t}}),t.associations.toSide))}_renderComboboxListItemNumber(e,t,o){return r("calcite-combobox-item",{heading:o,key:`#${e}`,selected:t===e,value:`${e}`})}_renderComboboxListItemString(e,t,o){return r("calcite-combobox-item",{heading:o,key:`#${e}`,selected:t===e,value:`${e}`})}_isNonspatial(e){const{sourceLayer:t}=e;return null!=t&&"geometryType"in t&&null==t.geometryType}};e([t()],u.prototype,"association",null),e([t()],u.prototype,"percentAlong",void 0),e([t()],u.prototype,"associationType",null),e([t()],u.prototype,"headingLevel",void 0),e([t(),c("esri/widgets/Feature/t9n/Feature")],u.prototype,"messagesFeature",void 0),e([t(),c("esri/t9n/common")],u.prototype,"messagesCommon",void 0),e([t(),c("esri/widgets/FeatureForm/t9n/FeatureForm")],u.prototype,"messagesFeatureForm",void 0),e([t()],u.prototype,"readOnly",void 0),e([t()],u.prototype,"sourceFeature",void 0),e([t()],u.prototype,"targetFeature",void 0),e([t()],u.prototype,"utilityNetwork",void 0),u=e([o("esri.widgets.FeatureForm.FeatureFormUtilityNetworkAssociations.UtilityNetworkAssociationSettings")],u);const p=u;export{p as default};
5
+ import{__decorate as e}from"tslib";import{property as t}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as o}from"../../../core/accessorSupport/decorators/subclass.js";import i from"../../Widget.js";import{loadCalciteComponents as n}from"../../support/componentsUtils.js";import{globalCss as s}from"../../support/globalCss.js";import{tsx as r,messageBundle as c}from"../../support/widget.js";import{getAssociationTitle as a}from"../../support/UtilityNetworkAssociations/utils/getAssociationTitle.js";import{isFromElement as l}from"../../support/UtilityNetworkAssociations/utils/isFromElement.js";const m="esri-feature-form-utility-network-association-settings",u={base:m,infoContainer:`${m}__info-container`};let d=class extends i{constructor(e,t){super(e,t),this.percentAlong=50,this.headingLevel=5,this.messagesFeature=null,this.messagesCommon=null,this.messagesFeatureForm=null,this.readOnly=!1,this.sourceFeature=null,this.targetFeature=null,this.utilityNetwork=null}loadDependencies(){return n({block:()=>import("@esri/calcite-components/dist/components/calcite-block"),combobox:()=>import("@esri/calcite-components/dist/components/calcite-combobox"),"combobox-item":()=>import("@esri/calcite-components/dist/components/calcite-combobox-item"),"input-number":()=>import("@esri/calcite-components/dist/components/calcite-input-number"),label:()=>import("@esri/calcite-components/dist/components/calcite-label"),switch:()=>import("@esri/calcite-components/dist/components/calcite-switch")})}get association(){return this._get("association")}set association(e){this.percentAlong=e.percentAlong?100*e.percentAlong:50,this._set("association",e)}get associationType(){return this.association.associationType}set associationType(e){this.association.associationType=e,"junction-edge-to-connectivity"!==e&&"junction-edge-from-connectivity"!==e||(this.association.percentAlong=void 0)}render(){return r("div",{class:this.classes(u.base,s.widget)},this._renderFromAssociationEndpoint(),this._renderToAssociationEndpoint(),this._renderAdditionalContent())}_renderFromAssociationEndpoint(){const{associationType:e,association:t,sourceFeature:o,targetFeature:i,messagesFeatureForm:n}=this,s=l(o.feature,t)?o:i,r=s.label,c=a(t,"from",n.associations);switch(e){case"connectivity":case"junction-junction-connectivity":case"junction-edge-midspan-connectivity":case"junction-edge-from-connectivity":case"junction-edge-to-connectivity":return this._renderAssociationEndpoint(r,c,this._renderConnectivityContent(s.feature,t.fromNetworkElement))}return this._renderAssociationEndpoint(r,c)}_renderToAssociationEndpoint(){const{associationType:e,association:t,sourceFeature:o,targetFeature:i,messagesFeatureForm:n}=this,s=l(o.feature,t)?i:o,r=s.label,c=a(t,"to",n.associations);let m;switch(e){case"connectivity":case"junction-junction-connectivity":m=this._renderConnectivityContent(s.feature,t.toNetworkElement);break;case"containment":m=this._isNonspatial(s.feature)?null:this._renderContainmentContent()}return this._renderAssociationEndpoint(r,c,m)}_renderAssociationEndpoint(e,t,o){return r("calcite-block",{description:t,expanded:!0,heading:e},o)}_renderContainmentContent(){const{messagesFeatureForm:e,association:t}=this,o=t.isContentVisible??!1;return r("calcite-label",{layout:"inline"},e.associations.visible,r("calcite-switch",{checked:o,onCalciteSwitchChange:({currentTarget:e})=>{t.isContentVisible=e.checked}}))}_renderConnectivityContent(e,t){const{messagesFeatureForm:o,utilityNetwork:i}=this,n=i.getTerminalConfiguration(e),s=n?.terminals.map(e=>this._renderComboboxListItemNumber(e.id,t.terminalId,e.name))||[];return r("calcite-label",null,o.associations.terminal,r("calcite-combobox",{allowCustomValues:!1,label:o.associations.terminalComboboxLabel,overlayPositioning:"fixed",selectionMode:"single-persist",onCalciteComboboxChange:({currentTarget:e})=>{t.terminalId=parseInt(e.value,10)}},...s))}_renderAdditionalContent(){const{associationType:e}=this;switch(e){case"connectivity":case"junction-junction-connectivity":case"attachment":case"containment":return}const t="junction-edge-midspan-connectivity"===e?e:"junction-edge-from-connectivity",{messagesFeatureForm:o}=this,i=[this._renderComboboxListItemString("junction-edge-midspan-connectivity",t,o.associations.midspanEdge),this._renderComboboxListItemString("junction-edge-from-connectivity",t,o.associations.endpointEdge)];return r("div",{class:u.infoContainer},r("calcite-label",{key:"additional-content"},o.associations.connectTo,r("calcite-combobox",{allowCustomValues:!1,label:o.associations.edgeConnectionComboboxLabel,overlayPositioning:"fixed",selectionMode:"single-persist",onCalciteComboboxChange:({currentTarget:e})=>{this.associationType=e.value}},...i)),"junction-edge-midspan-connectivity"===t?this._renderMidspanEdgeContent():this._renderEndpointEdgeContent())}_renderMidspanEdgeContent(){const{messagesFeatureForm:e,percentAlong:t,association:o}=this;return o.percentAlong=t/100,r("calcite-label",{key:"midspan-edge"},e.associations.midspanLocation,r("calcite-input-number",{max:100,min:0,numberButtonType:"vertical",suffixText:"%",value:`${t}`,onCalciteInputNumberInput:({currentTarget:e})=>{this.percentAlong=parseFloat(e.value)}}))}_renderEndpointEdgeContent(){const{associationType:e,messagesFeatureForm:t}=this,o="junction-edge-to-connectivity"===e;return r("calcite-label",{key:"endpoint-edge"},t.associations.edgeSide,r("calcite-label",{layout:"inline"},t.associations.fromSide,r("calcite-switch",{checked:o,onCalciteSwitchChange:({currentTarget:e})=>{const t=e.checked?"junction-edge-to-connectivity":"junction-edge-from-connectivity";this.associationType=t}}),t.associations.toSide))}_renderComboboxListItemNumber(e,t,o){return r("calcite-combobox-item",{heading:o,key:`#${e}`,selected:t===e,value:`${e}`})}_renderComboboxListItemString(e,t,o){return r("calcite-combobox-item",{heading:o,key:`#${e}`,selected:t===e,value:`${e}`})}_isNonspatial(e){const{sourceLayer:t}=e;return null!=t&&"geometryType"in t&&null==t.geometryType}};e([t()],d.prototype,"association",null),e([t()],d.prototype,"percentAlong",void 0),e([t()],d.prototype,"associationType",null),e([t()],d.prototype,"headingLevel",void 0),e([t(),c("esri/widgets/Feature/t9n/Feature")],d.prototype,"messagesFeature",void 0),e([t(),c("esri/t9n/common")],d.prototype,"messagesCommon",void 0),e([t(),c("esri/widgets/FeatureForm/t9n/FeatureForm")],d.prototype,"messagesFeatureForm",void 0),e([t()],d.prototype,"readOnly",void 0),e([t()],d.prototype,"sourceFeature",void 0),e([t()],d.prototype,"targetFeature",void 0),e([t()],d.prototype,"utilityNetwork",void 0),d=e([o("esri.widgets.FeatureForm.FeatureFormUtilityNetworkAssociations.UtilityNetworkAssociationSettings")],d);const p=d;export{p as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import"../../core/has.js";import t from"../../core/Logger.js";import{on as i,sync as n}from"../../core/reactiveUtils.js";import{renderingSanitizer as o}from"../../core/sanitizerUtils.js";import{property as r}from"../../core/accessorSupport/decorators/property.js";import"../../core/RandomLCG.js";import{subclass as l}from"../../core/accessorSupport/decorators/subclass.js";import{getEffectiveFieldAlias as a}from"../../editing/fieldUtils.js";import{convertDateFormatToIntlOptions as s,defaultFormatterOptionsNoTime as u,convertDateTimeFieldFormatToIntlOptions as p,defaultFormatterOptions as d}from"../../intl/date.js";import{formatNumber as m,convertNumberFormatToIntlOptions as c,convertNumberFieldFormatToIntlOptions as f}from"../../intl/number.js";import{isEditableLayer as h}from"../../layers/support/editableLayers.js";import{computeDomainFromTypes as y}from"../../layers/support/featureLayerUtils.js";import g from"../../layers/support/Field.js";import{defaultFieldFormat as v}from"../../layers/support/fieldFormatUtils.js";import{validateFieldValue as F,isDateField as _,isTimeOnlyField as C,isIntegerField as b,isNumericField as D,isStringField as I,isDateOnlyField as x,isTimestampOffsetField as O}from"../../layers/support/fieldUtils.js";import{isAnyDateField as T}from"../../smartMapping/support/utils.js";import{system as w}from"../../time/constants.js";import{getTimeZoneFormattingOptions as V}from"../../time/timeZoneUtils.js";import E from"../FeatureForm/FieldInput.js";import Z from"./Grid/EditorColumn.js";import{isIFeatureTableSupportedLayerWithFieldConfigurations as j,isEmptyStringOrWhitespace as L}from"./support/tableUtils.js";import{dateFieldsWithStringFieldValue as R,getLabelForDateFieldValue as S,valueIsInRange as N,dateTimeIsInRange as U,getUnixFieldValueFromDateComponents as A,getISOFieldValueFromDateComponents as q,normalizeTimeOnlyString as k,prepareISOFieldValueForDateComponents as z,prepareUnixFieldValueForDateComponents as B}from"../support/dateUtils.js";import{setFocus as H}from"../support/widgetUtils.js";const P={cancelEdit:"Escape"},M=Symbol(),W="esri-column",G={input:`${W}__cell-input`,inputContainer:`${W}__cell__input-container`};let $=class extends Z{constructor(e){super(e),this._activeFieldInput=null,this.cellValueFormatFunction=({root:e,rowData:t,value:i})=>{const{formatFunction:n}=this;if(n&&t){const{index:r,item:{attachments:l,feature:a,relatedRecords:s}}=t;return n({attachments:l,column:this,feature:a,field:this.field,index:r,relatedRecords:s,value:o.sanitize(i),virtualIndex:this.getVirtualRowIndex(e)})}if(null===i)return"&nbsp;";const{field:r}=this,l=this._getDomainForFeature(t?.item?.feature);if(l){const e=this._getComputedDomain(i,l);return"date"===r.type&&"range"===l.type?this._formatDateValueForDisplay(r,e):this._isNumericField&&"range"===l.type?m(parseFloat(i),this._numberFormatOptions):R.has(r.type)?"range"===l.type?o.sanitize(S(r,e)):o.sanitize(e):e}return"date"===r.type||R.has(r.type)?this._formatDateValueForDisplay(r,i):this._isNumericField?m(parseFloat(i),this._numberFormatOptions):o.sanitize(i)},this.cellValueValidatorFunction=({oldValue:e,value:i})=>{const{_effectiveRange:n,field:o}=this,{max:r,min:l}=n;if(this.effectiveRequired&&(null==i||""===i))return!1;if(this._isNumericField&&(F(o,i)||!N({max:r,min:l,value:i})))return t.getLogger(this).warn("value-exceeds-valid-range","Field value exceeds valid range. Attempted edit was rejected."),!1;if(this._isAnyDateOrTimeField){const e=o.type;if(!U({type:e,range:n,value:i}))return!1}return e!==i},this.field=null,this.formatFunction=null,this.inputRenderFunction=async({root:e,column:i,rowData:n})=>{if(this.editInfo||!this.effectiveEditable)return;const o=this.getCellValue(n),{field:r}=this;if("big-integer"===r.type&&F(r,o))return void t.getLogger(this).warn("value-exceeds-valid-range","Field value is beyond supported limit. Editing is disabled for this field value.");const l=n?.item.feature;if(!l)return;this._activeFieldInput=this._setUpFieldInput(l,o);const a=document.createElement("div");a.classList.add(G.inputContainer);const s=[],u="coded-value"===this._effectiveDomain?.type;if(this._isAnyDateOrTimeField&&!u){const e=document.createElement("div"),t=this._setUpDateComponents(o),i=this._setUpDateActionBar();t.forEach(t=>e.appendChild(t)),a.appendChild(e),a.appendChild(i),s.push(...t)}else{const e=this.createInputElement({value:o});a.appendChild(e),s.push(e)}this._set("editInfo",{column:i,inputs:s,root:e,rowData:n,oldValue:o}),this.removeCellContent(e),e.appendChild(a),this._syncRowEditingState(e,!0),this.grid?.generateCellPartNames();const p=s[0];await H(p),"selectText"in p&&await p.selectText()},this.layer=null,this.parseInputValueFunction=({inputs:e})=>{const{editInfo:t,field:i,includeTime:n}=this;if(!t||!e.length)return null;const o=e[0];if(this._isAnyDateOrTimeField){if("coded-value"===this._effectiveDomain?.type){if(null==o.value||""===o.value)return null;const e=String(o.value);return _(i)?parseFloat(e):e}const{timeZone:r}=this.effectiveTimeZoneOptions,l=t.oldValue??void 0;switch(i.type){case"date-only":{const e=o.value;return""!==e?e:null}case"time-only":{const e=k(o.value);return""!==e?e:null}case"timestamp-offset":{const t=n?e[1]:void 0,i=e.at(-1);return q({oldValue:l,dateComponent:o,timeComponent:t,timeZoneComponent:i,defaultTimeZone:r})}case"date":{const{max:t,min:i}=this._effectiveRange;return A({oldValue:l,dateComponent:o,timeComponent:e[1],timeZone:r,max:t,min:i})}}return null}const r=o.value,{effectiveRequired:l}=this;return l||null!=r&&""!==r?this._isNumericField?parseFloat(r):this._isStringField?r.trim():r:null},this.sortable=!0,this.store=null,this.template=null,this.view=null}get _effectiveDomain(){const e=this._activeFieldInput?.feature;return e?this._getDomainForFeature(e):null}get _effectiveRange(){return this._activeFieldInput?.range??{max:null,min:null}}get _isAnyDateOrTimeField(){const{field:e}=this;return T(e)||C(e)}get _isIntegerField(){return b(this.field)}get _isNumericField(){return D(this.field)}get _isStringField(){return I(this.field)}get _isSubtypeField(){const{layer:e}=this;if(e?.subtypeField){const{subtypeField:t,fieldsIndex:i}=e;return(i.get(t)?.name??t)===this.fieldName}return!1}get _layerWithFieldConfigurations(){const{layer:e}=this;return j(e)?e:null}get _dateTimeFormatOptions(){const{layerFieldConfigurationFormat:e,template:t}=this;return t?.format?.dateFormat?s(t.format.dateFormat):t?.input&&"includeTime"in t.input&&!1===t.input.includeTime?u:"date-time"===e?.type?p(e):this._isAnyDateOrTimeField?d:void 0}get _numberFormatOptions(){const{layerFieldConfigurationFormat:e,template:t}=this;return t?.format?c(t.format):"number"===e?.type?f(e):this._isNumericField?{useGrouping:!0,maximumFractionDigits:20}:void 0}get alias(){return a(this.field,this._layerWithFieldConfigurations)}get defaultValue(){return this.field?.defaultValue}get effectiveDescription(){const{description:e,field:t}=this,i=t.description,n=L(e)?L(i)?null:i:e;return null==n?null:o.sanitize(n)}get effectiveEditable(){const{editable:e,field:t,layer:i,tableEditingEnabled:n}=this;if(!t||!i)return!1;const o=h(i),r=i.effectiveCapabilities??i.capabilities,l=r?.operations?.supportsUpdate;return!!(t.editable&&o&&l&&"oid"!==t.type&&n)&&e}get effectiveLabel(){return o.sanitize(this.label||this.alias||this.fieldName)}get effectiveRequired(){return!this.nullable||this._isSubtypeField||this._activeFieldInput?.required||this.required}get effectiveSortable(){return!(!this.layer?.capabilities?.query?.supportsOrderBy||!this.sortable)}get effectiveTimeZoneOptions(){const{layer:e,field:t}=this;if(!e||"date"!==t?.type&&"timestamp-offset"!==t?.type)return{timeZone:void 0,timeZoneName:void 0};const{tableTimeZone:i,timeZone:n,view:o}=this;return V(e.preferredTimeZone||null,!!e.datesInUnknownTimezone,n??i??o?.timeZone??w,s("short-time"),t.type)}get includeTime(){const{field:e,template:t}=this;return"time-only"===e.type||"date-only"!==e.type&&(!t?.input||"includeTime"in t.input&&!1!==t.input.includeTime)}get layerFieldConfigurationFormat(){const{_layerWithFieldConfigurations:e}=this;if(e)return e.getFieldConfiguration(this.fieldName)?.fieldFormat??v(this.field)}get loadingMessage(){return this.messages?.loading||"..."}get maxLength(){const{field:e,template:t}=this,i=e?.length??-1,n=t?.input&&"maxLength"in t.input?t.input.maxLength:null;return null!=n&&!isNaN(n)&&n>=-1&&(-1===i||n<=i)?n:i}get minLength(){const{template:e,maxLength:t}=this,i=e?.input&&"minLength"in e.input?e.input.minLength:null;return t&&i<=t?i:null}get name(){return this.field?.name}get nullable(){return!1!==this.field.nullable}get shouldShowPrompt(){return this._isSubtypeField}createInputElement({value:e}){const{_effectiveDomain:t,maxLength:o,minLength:r,effectiveRequired:l}=this;let a;if("coded-value"===t?.type)a=this.createCalciteSelect(e,t.codedValues.map(({code:e,name:t})=>({value:e,name:t}))),this.addHandles([i(()=>a,"calciteSelectChange",()=>this.onInputBlur(),n)],M);else if(this._isNumericField){const{_effectiveRange:{max:t,min:i}}=this;a=document.createElement("calcite-input"),a.type="number",this._isIntegerField&&(a.step=1),null!=t&&(a.max=t),null!=i&&(a.min=i),a.status=N({max:t,min:i,value:e})?"idle":"invalid"}else a=document.createElement("calcite-input"),this.addHandles([i(()=>a,"calciteInputChange",()=>this.onInputBlur(),n)],M),o>-1&&(a.maxLength=o),r>0&&(a.minLength=r);return a.classList.add(G.input),a.required=l,a.value=null!=e?e.toString():"",this.addHandles([i(()=>a,"keydown",e=>{e.key===P.cancelEdit&&this.onInputBlur(!0)},n),i(()=>a,"blur",()=>this.onInputBlur(),n)],M),a}onInputBlur(e=!1){this.removeHandles(M),super.onInputBlur(e)}onEditComplete(){const e=this.editInfo?.root;e&&this._syncRowEditingState(e,!1),this._activeFieldInput=null,super.onEditComplete()}get test(){}_clearActiveEditValues(){this.editInfo?.inputs?.forEach(e=>e.value="")}_setUpDateActionBar(){const{messagesCommon:e}=this,t=e?.cancel??"",i=e?.clear??"",n=e?.save??"",o=document.createElement("calcite-action-bar");return o.expandDisabled=!0,o.layout="horizontal",o.appendChild(this.createCalciteAction({text:n,icon:"save",onclick:()=>this.submit()})),this.effectiveRequired||o.appendChild(this.createCalciteAction({text:i,icon:"trash",onclick:()=>{this._clearActiveEditValues(),this.submit()}})),o.appendChild(this.createCalciteAction({text:t,icon:"x",onclick:()=>this.cancel()})),o}_formatDateValueForDisplay(e,t){const{timeZone:i,timeZoneName:n}=this.effectiveTimeZoneOptions;return null!=t?S(e,t,{...this._dateTimeFormatOptions,timeZone:i,timeZoneName:n}):null}_setUpDateComponents(e){const{_effectiveRange:{max:t,min:n,rawMax:o,rawMin:r},field:l,effectiveRequired:a}=this,s=this._getDateFieldValuesForComponents(l,e),u=[];if(T(l)){const e=this.createDateComponent(),p=x(l)||O(l)?o:t,d=x(l)||O(l)?r:n,m=this._getDateFieldValuesForComponents(l,p??null),c=this._getDateFieldValuesForComponents(l,d??null);e.value=s.date??"",e.max=m.date??"",e.min=c.date??"",e.required=a,this.addHandles([i(()=>e,"calciteInputDatePickerOpen",()=>this._onDateComponentOpen(e))],M),u.push(e)}if(this.includeTime){const e=this.createTimeComponent();e.value=s.time??"",e.required=a,this.addHandles([i(()=>e,"calciteInputTimePickerOpen",()=>this._onDateComponentOpen(e))],M),u.push(e)}if("timestamp-offset"===l.type){const e=this.createTimeZoneComponent();e.value=s.timeZoneOffset??"0",this.addHandles([i(()=>e,"calciteInputTimeZoneOpen",()=>this._onDateComponentOpen(e))],M),u.push(e)}return u}_onDateComponentOpen(e){this.editInfo?.inputs.forEach(t=>{t!==e&&"open"in t&&(t.open=!1)})}_syncRowEditingState(e,t=!1){const i=this.grid?.getRowContainingNode(e);i&&(t?i.setAttribute("editing","true"):i.removeAttribute("editing"))}_getDateFieldValuesForComponents(e,t){switch(e.type){case"date":return B(t,this.effectiveTimeZoneOptions.timeZone);case"date-only":return{date:t};case"time-only":return{time:t};case"timestamp-offset":return z(t);default:return{}}}_setUpFieldInput(e,t){const{field:i,layer:n,effectiveTimeZoneOptions:{timeZone:o}}=this,r=new E({feature:e,field:i,initialFeature:e.clone(),layer:n,timeZone:o});return r.set("value",t),r}_isDomainCompatible(e){if(!e)return!1;const{_isNumericField:t,_isStringField:i}=this,{type:n}=e;if("coded-value"===n){const n=typeof e.codedValues[0].code;if("string"===n&&i||"number"===n&&t)return!0}return!("range"!==n||!t)}_getDomainForFeature(e){const{fieldName:t,layer:i,template:n}=this;if(!e||!i?.getFieldDomain)return null;if("wfs"===i.type||"geojson"===i.type||"csv"===i.type||"knowledge-graph-sublayer"===i.type)return null;if(n?.domain&&this._isDomainCompatible(n.domain))return n.domain;if("feature"!==i.type&&"subtype-group"!==i.type&&null==i.getField(t)?.domain){const e=y(i,t);if(e)return e}return i.getFieldDomain(t,{feature:e})}_getComputedDomain(e,t){if(!t)return null;if("range"===t.type)return e;if("coded-value"===t.type){const i=t.codedValues.filter(t=>t.hasOwnProperty("code")&&t.code===e);return i&&i.length?i[0].name:e}return null}};e([r()],$.prototype,"_effectiveDomain",null),e([r()],$.prototype,"_activeFieldInput",void 0),e([r()],$.prototype,"_effectiveRange",null),e([r()],$.prototype,"_isAnyDateOrTimeField",null),e([r()],$.prototype,"_isIntegerField",null),e([r()],$.prototype,"_isNumericField",null),e([r()],$.prototype,"_isStringField",null),e([r()],$.prototype,"_isSubtypeField",null),e([r()],$.prototype,"_layerWithFieldConfigurations",null),e([r()],$.prototype,"_dateTimeFormatOptions",null),e([r()],$.prototype,"_numberFormatOptions",null),e([r({readOnly:!0})],$.prototype,"alias",null),e([r()],$.prototype,"cellValueFormatFunction",void 0),e([r()],$.prototype,"cellValueValidatorFunction",void 0),e([r({readOnly:!0})],$.prototype,"defaultValue",null),e([r()],$.prototype,"effectiveDescription",null),e([r()],$.prototype,"effectiveEditable",null),e([r()],$.prototype,"effectiveLabel",null),e([r()],$.prototype,"effectiveRequired",null),e([r()],$.prototype,"effectiveSortable",null),e([r()],$.prototype,"effectiveTimeZoneOptions",null),e([r({type:g})],$.prototype,"field",void 0),e([r()],$.prototype,"formatFunction",void 0),e([r()],$.prototype,"includeTime",null),e([r()],$.prototype,"inputRenderFunction",void 0),e([r()],$.prototype,"layer",void 0),e([r()],$.prototype,"layerFieldConfigurationFormat",null),e([r({readOnly:!0})],$.prototype,"loadingMessage",null),e([r()],$.prototype,"maxLength",null),e([r()],$.prototype,"minLength",null),e([r({readOnly:!0})],$.prototype,"name",null),e([r({readOnly:!0})],$.prototype,"nullable",null),e([r()],$.prototype,"parseInputValueFunction",void 0),e([r()],$.prototype,"shouldShowPrompt",null),e([r()],$.prototype,"sortable",void 0),e([r()],$.prototype,"store",void 0),e([r()],$.prototype,"template",void 0),e([r()],$.prototype,"view",void 0),$=e([l("esri.widgets.FeatureTable.FieldColumn")],$);const J=$;export{J as default};
5
+ import{__decorate as e}from"tslib";import"../../core/has.js";import t from"../../core/Logger.js";import{on as i,sync as n}from"../../core/reactiveUtils.js";import{property as o}from"../../core/accessorSupport/decorators/property.js";import"../../core/RandomLCG.js";import{subclass as l}from"../../core/accessorSupport/decorators/subclass.js";import{getEffectiveFieldAlias as r}from"../../editing/fieldUtils.js";import{convertDateFormatToIntlOptions as a,defaultFormatterOptionsNoTime as s,convertDateTimeFieldFormatToIntlOptions as u,defaultFormatterOptions as p}from"../../intl/date.js";import{formatNumber as d,convertNumberFormatToIntlOptions as m,convertNumberFieldFormatToIntlOptions as c}from"../../intl/number.js";import{isEditableLayer as f}from"../../layers/support/editableLayers.js";import{computeDomainFromTypes as h}from"../../layers/support/featureLayerUtils.js";import y from"../../layers/support/Field.js";import{defaultFieldFormat as g}from"../../layers/support/fieldFormatUtils.js";import{validateFieldValue as v,isDateField as F,isTimeOnlyField as _,isIntegerField as C,isNumericField as b,isStringField as D,isDateOnlyField as I,isTimestampOffsetField as x}from"../../layers/support/fieldUtils.js";import{isAnyDateField as T}from"../../smartMapping/support/utils.js";import{system as O}from"../../time/constants.js";import{getTimeZoneFormattingOptions as w}from"../../time/timeZoneUtils.js";import V from"../FeatureForm/FieldInput.js";import E from"./Grid/EditorColumn.js";import{isIFeatureTableSupportedLayerWithFieldConfigurations as Z,isEmptyStringOrWhitespace as L}from"./support/tableUtils.js";import{valueIsInRange as j,dateTimeIsInRange as R,getUnixFieldValueFromDateComponents as S,getISOFieldValueFromDateComponents as N,normalizeTimeOnlyString as A,getLabelForDateFieldValue as U,prepareISOFieldValueForDateComponents as q,prepareUnixFieldValueForDateComponents as k}from"../support/dateUtils.js";import{setFocus as B}from"../support/widgetUtils.js";const z={cancelEdit:"Escape"},H=Symbol(),P="esri-column",M={input:`${P}__cell-input`,inputContainer:`${P}__cell__input-container`};let W=class extends E{constructor(e){super(e),this._activeFieldInput=null,this.cellValueFormatFunction=({root:e,rowData:t,value:i})=>{const{formatFunction:n}=this;if(n&&t){const{index:o,item:{attachments:l,feature:r,relatedRecords:a}}=t,s=n({attachments:l,column:this,feature:r,field:this.field,index:o,relatedRecords:a,value:this.sanitizeContent(i),virtualIndex:this.getVirtualRowIndex(e)});return this.sanitizeContent(s)}if(null===i)return"&nbsp;";const o=this._getDomainForFeature(t?.item?.feature),l=this._getComputedDomain(i,o)||i;return this._isAnyDateOrTimeField&&"coded-value"!==o?.type?this._formatDateValueForDisplay(this.field,l):this._isNumericField&&"coded-value"!==o?.type?d(parseFloat(l),this._numberFormatOptions):this.sanitizeContent(l)},this.cellValueValidatorFunction=({oldValue:e,value:i})=>{const{_effectiveRange:n,field:o}=this,{max:l,min:r}=n;if(this.effectiveRequired&&(null==i||""===i))return!1;if(this._isNumericField&&(v(o,i)||!j({max:l,min:r,value:i})))return t.getLogger(this).warn("value-exceeds-valid-range","Field value exceeds valid range. Attempted edit was rejected."),!1;if(this._isAnyDateOrTimeField){const e=o.type;if(!R({type:e,range:n,value:i}))return!1}return e!==i},this.field=null,this.formatFunction=null,this.inputRenderFunction=async({root:e,column:i,rowData:n})=>{if(this.editInfo||!this.effectiveEditable)return;const o=this.getCellValue(n),{field:l}=this;if("big-integer"===l.type&&v(l,o))return void t.getLogger(this).warn("value-exceeds-valid-range","Field value is beyond supported limit. Editing is disabled for this field value.");const r=n?.item.feature;if(!r)return;this._activeFieldInput=this._setUpFieldInput(r,o);const a=document.createElement("div");a.classList.add(M.inputContainer);const s=[],u="coded-value"===this._effectiveDomain?.type;if(this._isAnyDateOrTimeField&&!u){const e=document.createElement("div"),t=this._setUpDateComponents(o),i=this._setUpDateActionBar();t.forEach(t=>e.appendChild(t)),a.appendChild(e),a.appendChild(i),s.push(...t)}else{const e=this.createInputElement({value:o});a.appendChild(e),s.push(e)}this._set("editInfo",{column:i,inputs:s,root:e,rowData:n,oldValue:o}),this.removeCellContent(e),e.appendChild(a),this._syncRowEditingState(e,!0),this.grid?.generateCellPartNames();const p=s[0];await B(p),"selectText"in p&&await p.selectText()},this.layer=null,this.parseInputValueFunction=({inputs:e})=>{const{editInfo:t,field:i,includeTime:n}=this;if(!t||!e.length)return null;const o=e[0];if(this._isAnyDateOrTimeField){if("coded-value"===this._effectiveDomain?.type){if(null==o.value||""===o.value)return null;const e=String(o.value);return F(i)?parseFloat(e):e}const{timeZone:l}=this.effectiveTimeZoneOptions,r=t.oldValue??void 0;switch(i.type){case"date-only":{const e=o.value;return""!==e?e:null}case"time-only":{const e=A(o.value);return""!==e?e:null}case"timestamp-offset":{const t=n?e[1]:void 0,i=e.at(-1);return N({oldValue:r,dateComponent:o,timeComponent:t,timeZoneComponent:i,defaultTimeZone:l})}case"date":{const{max:t,min:i}=this._effectiveRange;return S({oldValue:r,dateComponent:o,timeComponent:e[1],timeZone:l,max:t,min:i})}}return null}const l=o.value,{effectiveRequired:r}=this;return r||null!=l&&""!==l?this._isNumericField?parseFloat(l):this._isStringField?l.trim():l:null},this.sortable=!0,this.store=null,this.template=null,this.view=null}get _effectiveDomain(){const e=this._activeFieldInput?.feature;return e?this._getDomainForFeature(e):null}get _effectiveRange(){return this._activeFieldInput?.range??{max:null,min:null}}get _isAnyDateOrTimeField(){const{field:e}=this;return T(e)||_(e)}get _isIntegerField(){return C(this.field)}get _isNumericField(){return b(this.field)}get _isStringField(){return D(this.field)}get _isSubtypeField(){const{layer:e}=this;if(e?.subtypeField){const{subtypeField:t,fieldsIndex:i}=e;return(i.get(t)?.name??t)===this.fieldName}return!1}get _layerWithFieldConfigurations(){const{layer:e}=this;return Z(e)?e:null}get _dateTimeFormatOptions(){const{layerFieldConfigurationFormat:e,template:t}=this;return t?.format?.dateFormat?a(t.format.dateFormat):t?.input&&"includeTime"in t.input&&!1===t.input.includeTime?s:"date-time"===e?.type?u(e):this._isAnyDateOrTimeField?p:void 0}get _numberFormatOptions(){const{layerFieldConfigurationFormat:e,template:t}=this;return t?.format?m(t.format):"number"===e?.type?c(e):this._isNumericField?{useGrouping:!0,maximumFractionDigits:20}:void 0}get alias(){return r(this.field,this._layerWithFieldConfigurations)}get defaultValue(){return this.field?.defaultValue}get effectiveDescription(){const{description:e,field:t}=this,i=t.description,n=L(e)?L(i)?null:i:e;return null==n?null:this.sanitizeLabel(n)}get effectiveEditable(){const{editable:e,field:t,layer:i,tableEditingEnabled:n}=this;if(!t||!i)return!1;const o=f(i),l=i.effectiveCapabilities??i.capabilities,r=l?.operations?.supportsUpdate;return!!(t.editable&&o&&r&&"oid"!==t.type&&n)&&e}get effectiveLabel(){return this.sanitizeLabel(this.label||this.alias||this.fieldName)}get effectiveRequired(){return!this.nullable||this._isSubtypeField||this._activeFieldInput?.required||this.required}get effectiveSortable(){return!(!this.layer?.capabilities?.query?.supportsOrderBy||!this.sortable)}get effectiveTimeZoneOptions(){const{layer:e,field:t}=this;if(!e||"date"!==t?.type&&"timestamp-offset"!==t?.type)return{timeZone:void 0,timeZoneName:void 0};const{tableTimeZone:i,timeZone:n,view:o}=this;return w(e.preferredTimeZone||null,!!e.datesInUnknownTimezone,n??i??o?.timeZone??O,a("short-time"),t.type)}get includeTime(){const{field:e,template:t}=this;return"time-only"===e.type||"date-only"!==e.type&&(!t?.input||"includeTime"in t.input&&!1!==t.input.includeTime)}get layerFieldConfigurationFormat(){const{_layerWithFieldConfigurations:e}=this;if(e)return e.getFieldConfiguration(this.fieldName)?.fieldFormat??g(this.field)}get loadingMessage(){return this.messages?.loading||"..."}get maxLength(){const{field:e,template:t}=this,i=e?.length??-1,n=t?.input&&"maxLength"in t.input?t.input.maxLength:null;return null!=n&&!isNaN(n)&&n>=-1&&(-1===i||n<=i)?n:i}get minLength(){const{template:e,maxLength:t}=this,i=e?.input&&"minLength"in e.input?e.input.minLength:null;return t&&i<=t?i:null}get name(){return this.field?.name}get nullable(){return!1!==this.field.nullable}get shouldShowPrompt(){return this._isSubtypeField}createInputElement({value:e}){const{_effectiveDomain:t,maxLength:o,minLength:l,effectiveRequired:r}=this;let a;if("coded-value"===t?.type)a=this.createCalciteSelect(e,t.codedValues.map(({code:e,name:t})=>({value:e,name:t}))),this.addHandles([i(()=>a,"calciteSelectChange",()=>this.onInputBlur(),n)],H);else if(this._isNumericField){const{_effectiveRange:{max:t,min:i}}=this;a=document.createElement("calcite-input"),a.type="number",this._isIntegerField&&(a.step=1),null!=t&&(a.max=t),null!=i&&(a.min=i),a.status=j({max:t,min:i,value:e})?"idle":"invalid"}else a=document.createElement("calcite-input"),this.addHandles([i(()=>a,"calciteInputChange",()=>this.onInputBlur(),n)],H),o>-1&&(a.maxLength=o),l>0&&(a.minLength=l);return a.classList.add(M.input),a.required=r,a.value=null!=e?e.toString():"",this.addHandles([i(()=>a,"keydown",e=>{e.key===z.cancelEdit&&this.onInputBlur(!0)},n),i(()=>a,"blur",()=>this.onInputBlur(),n)],H),a}onInputBlur(e=!1){this.removeHandles(H),super.onInputBlur(e)}onEditComplete(){const e=this.editInfo?.root;e&&this._syncRowEditingState(e,!1),this._activeFieldInput=null,super.onEditComplete()}get test(){}_clearActiveEditValues(){this.editInfo?.inputs?.forEach(e=>e.value="")}_setUpDateActionBar(){const{messagesCommon:e}=this,t=e?.cancel??"",i=e?.clear??"",n=e?.save??"",o=document.createElement("calcite-action-bar");return o.expandDisabled=!0,o.layout="horizontal",o.appendChild(this.createCalciteAction({text:n,icon:"save",onclick:()=>this.submit()})),this.effectiveRequired||o.appendChild(this.createCalciteAction({text:i,icon:"trash",onclick:()=>{this._clearActiveEditValues(),this.submit()}})),o.appendChild(this.createCalciteAction({text:t,icon:"x",onclick:()=>this.cancel()})),o}_formatDateValueForDisplay(e,t){const{timeZone:i,timeZoneName:n}=this.effectiveTimeZoneOptions;return null!=t?U(e,t,{...this._dateTimeFormatOptions,timeZone:i,timeZoneName:n}):null}_setUpDateComponents(e){const{_effectiveRange:{max:t,min:n,rawMax:o,rawMin:l},field:r,effectiveRequired:a}=this,s=this._getDateFieldValuesForComponents(r,e),u=[];if(T(r)){const e=this.createDateComponent(),p=I(r)||x(r)?o:t,d=I(r)||x(r)?l:n,m=this._getDateFieldValuesForComponents(r,p??null),c=this._getDateFieldValuesForComponents(r,d??null);e.value=s.date??"",e.max=m.date??"",e.min=c.date??"",e.required=a,this.addHandles([i(()=>e,"calciteInputDatePickerOpen",()=>this._onDateComponentOpen(e))],H),u.push(e)}if(this.includeTime){const e=this.createTimeComponent();e.value=s.time??"",e.required=a,this.addHandles([i(()=>e,"calciteInputTimePickerOpen",()=>this._onDateComponentOpen(e))],H),u.push(e)}if("timestamp-offset"===r.type){const e=this.createTimeZoneComponent();e.value=s.timeZoneOffset??"0",this.addHandles([i(()=>e,"calciteInputTimeZoneOpen",()=>this._onDateComponentOpen(e))],H),u.push(e)}return u}_onDateComponentOpen(e){this.editInfo?.inputs.forEach(t=>{t!==e&&"open"in t&&(t.open=!1)})}_syncRowEditingState(e,t=!1){const i=this.grid?.getRowContainingNode(e);i&&(t?i.setAttribute("editing","true"):i.removeAttribute("editing"))}_getDateFieldValuesForComponents(e,t){switch(e.type){case"date":return k(t,this.effectiveTimeZoneOptions.timeZone);case"date-only":return{date:t};case"time-only":return{time:t};case"timestamp-offset":return q(t);default:return{}}}_setUpFieldInput(e,t){const{field:i,layer:n,effectiveTimeZoneOptions:{timeZone:o}}=this,l=new V({feature:e,field:i,initialFeature:e.clone(),layer:n,timeZone:o});return l.set("value",t),l}_isDomainCompatible(e){if(!e)return!1;const{_isNumericField:t,_isStringField:i}=this,{type:n}=e;if("coded-value"===n){const n=typeof e.codedValues[0].code;if("string"===n&&i||"number"===n&&t)return!0}return!("range"!==n||!t)}_getDomainForFeature(e){const{fieldName:t,layer:i,template:n}=this;if(!e||!i?.getFieldDomain)return null;if("wfs"===i.type||"geojson"===i.type||"csv"===i.type||"knowledge-graph-sublayer"===i.type)return null;if(n?.domain&&this._isDomainCompatible(n.domain))return n.domain;if("feature"!==i.type&&"subtype-group"!==i.type&&null==i.getField(t)?.domain){const e=h(i,t);if(e)return e}return i.getFieldDomain(t,{feature:e})}_getComputedDomain(e,t){if(!t)return null;if("range"===t.type)return e;if("coded-value"===t.type){const i=t.codedValues.filter(t=>t.hasOwnProperty("code")&&t.code===e);return i&&i.length?i[0].name:e}return null}};e([o()],W.prototype,"_effectiveDomain",null),e([o()],W.prototype,"_activeFieldInput",void 0),e([o()],W.prototype,"_effectiveRange",null),e([o()],W.prototype,"_isAnyDateOrTimeField",null),e([o()],W.prototype,"_isIntegerField",null),e([o()],W.prototype,"_isNumericField",null),e([o()],W.prototype,"_isStringField",null),e([o()],W.prototype,"_isSubtypeField",null),e([o()],W.prototype,"_layerWithFieldConfigurations",null),e([o()],W.prototype,"_dateTimeFormatOptions",null),e([o()],W.prototype,"_numberFormatOptions",null),e([o({readOnly:!0})],W.prototype,"alias",null),e([o()],W.prototype,"cellValueFormatFunction",void 0),e([o()],W.prototype,"cellValueValidatorFunction",void 0),e([o({readOnly:!0})],W.prototype,"defaultValue",null),e([o()],W.prototype,"effectiveDescription",null),e([o()],W.prototype,"effectiveEditable",null),e([o()],W.prototype,"effectiveLabel",null),e([o()],W.prototype,"effectiveRequired",null),e([o()],W.prototype,"effectiveSortable",null),e([o()],W.prototype,"effectiveTimeZoneOptions",null),e([o({type:y})],W.prototype,"field",void 0),e([o()],W.prototype,"formatFunction",void 0),e([o()],W.prototype,"includeTime",null),e([o()],W.prototype,"inputRenderFunction",void 0),e([o()],W.prototype,"layer",void 0),e([o()],W.prototype,"layerFieldConfigurationFormat",null),e([o({readOnly:!0})],W.prototype,"loadingMessage",null),e([o()],W.prototype,"maxLength",null),e([o()],W.prototype,"minLength",null),e([o({readOnly:!0})],W.prototype,"name",null),e([o({readOnly:!0})],W.prototype,"nullable",null),e([o()],W.prototype,"parseInputValueFunction",void 0),e([o()],W.prototype,"shouldShowPrompt",null),e([o()],W.prototype,"sortable",void 0),e([o()],W.prototype,"store",void 0),e([o()],W.prototype,"template",void 0),e([o()],W.prototype,"view",void 0),W=e([l("esri.widgets.FeatureTable.FieldColumn")],W);const G=W;export{G as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import t from"../../../core/Accessor.js";import{watch as i,when as n,initial as o}from"../../../core/reactiveUtils.js";import{renderingSanitizer as s}from"../../../core/sanitizerUtils.js";import{property as r}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as l}from"../../../core/accessorSupport/decorators/subclass.js";import{css as a}from"./ColumnCSS.js";import{isEmptyStringOrWhitespace as c}from"../support/tableUtils.js";import{autoLink as d}from"../../support/uriUtils.js";import{setFocus as p}from"../../support/widgetUtils.js";let u=class extends t{constructor(e){super(e),this._menuIsOpen=!1,this.autoWidth=!1,this.cellValueFormatFunction=({root:e,rowData:t,value:i})=>{const{formatFunction:n}=this,o=s.sanitize(i);if(n&&t){const{index:i,item:{attachments:s,feature:r,relatedRecords:l}}=t;return n({attachments:s,column:this,feature:r,index:i,relatedRecords:l,value:o,virtualIndex:this.getVirtualRowIndex(e),field:void 0})}return o},this.description=null,this.direction=null,this.fieldName=null,this.flexGrow=1,this.footerRenderFunction=null,this.formatFunction=null,this.frozen=!1,this.frozenToEnd=!1,this.grid=null,this.headerRenderFunction=e=>{const{root:t}=e,i=this.createHeaderContent();this.removeCellContent(t),t.appendChild(i)},this.hidden=!1,this.icon=null,this.iconText=null,this.initialSortPriority=null,this.label=null,this.labelTooltipText=null,this.menuConfig=null,this.messages=null,this.messagesCommon=null,this.messagesURIUtils=null,this.renderFunction=({root:e,rowData:t})=>{const i=this.getCellValue(t),n=this.cellValueFormatFunction({root:e,rowData:t,value:i});let o=null;if(o=n instanceof HTMLElement?n:d(this.messagesURIUtils,n),this.removeCellContent(e),o instanceof HTMLElement)e.removeAttribute("title"),e.appendChild(o);else if(null!=o){const t=o.toString();e.innerHTML=t,e.title=t}},this.resizable=!0,this.sortable=!1,this.store=null,this.tableTimeZone=null,this.textAlign="start",this.textWrap=!1,this.timeZone=null,this.visibleElements=null,this.width=200}initialize(){const{fieldName:e}=this;this._set("sortElement",this.createSortElement()),this.sortElement.setAttribute("path",e),this.addHandles([i(()=>this.direction,e=>{const{sortElement:t}=this;this.effectiveSortable&&t&&(e?this.sortElement.direction!==e&&t.setAttribute("direction",e):t.removeAttribute("direction"))}),n(()=>this.grid?.isReady&&this.sortElement,()=>{const{direction:e,grid:t,hidden:i,sortElement:n}=this;i&&e&&n&&t&&!t.hasSorter(n)&&t.addSorter(n)},o),i(()=>[this.timeZone,this.icon,this.iconText,this.labelTooltipText],()=>this.grid?.requestContentUpdate()),i(()=>this.hidden,()=>this.closeMenu()),i(()=>this.fieldName,e=>{const{sortElement:t}=this;t&&t.path!==e&&t.setAttribute("path",e)}),i(()=>[this.effectiveLabel,this.labelTooltipText],([e,t])=>{const{sortElement:i}=this;i&&(i.setAttribute("title",t||e),i.textContent=e)})])}get _headerRequiresTextContainer(){return!(!this.effectiveSortable&&""===this.effectiveLabel&&null==this.effectiveDescription)}get customMenuItems(){return this.menuConfig?.items?.map(({disabled:e,hidden:t,icon:i,iconClass:n,label:o,selected:s,clickFunction:r})=>this.createCalciteDropdownItem({disabled:e,hidden:t,iconClass:n,iconStart:i,selected:s,textContent:o,onclick:e=>r(e)}))??[]}get defaultMenuItems(){if(!this.effectiveSortable)return[];const e=this.messages,t=[],i=this.visibleElements?.columnMenuItems;if(!1!==i?.sortAscending){const i=this.createCalciteDropdownItem({iconStart:"sort-ascending-arrow",textContent:e?.sortAsc,onclick:()=>this.direction="asc"});t.push(i)}if(!1!==i?.sortDescending){const i=this.createCalciteDropdownItem({iconStart:"sort-descending-arrow",textContent:e?.sortDesc,onclick:()=>this.direction="desc"});t.push(i)}return t}get effectiveDescription(){const{description:e}=this;return c(e)?null:s.sanitize(e)}get effectiveLabel(){return s.sanitize(this.label||this.fieldName)}get effectiveSortable(){return this.sortable}get iconNode(){const{icon:e,iconText:t}=this,i=t?s.sanitize(t):void 0;return e?this.createCalciteIcon({icon:e,textLabel:i}):null}set invalid(e){this._set("invalid",e),this.grid?.generateCellPartNames()}get invalid(){return this._get("invalid")??!1}get menu(){const{customMenuItems:e,defaultMenuItems:t,menuConfig:i}=this,n=!!i?.open,o=this.createCalciteAction({icon:i?.icon??"ellipsis",text:this.messages?.menu??"",slot:"trigger"}),s=document.createElement("calcite-dropdown");if(s.maxItems=i?.maxItems??4,s.placement="top-end",s.scale=i?.scale??"m",n&&(s.open=n,this._menuIsOpen=!0),s.appendChild(o),s.addEventListener("calciteDropdownOpen",()=>this._menuIsOpen=!0),s.addEventListener("calciteDropdownClose",()=>this._menuIsOpen=!1),s.onkeydown=this._stopPropagationOnSelect,s.addEventListener("mousewheel",e=>{e.stopPropagation()}),t.length){const e=s.appendChild(document.createElement("calcite-dropdown-group"));e.selectionMode="none",e.append(...t)}if(e.length){const t=s.appendChild(document.createElement("calcite-dropdown-group"));t.selectionMode=i?.selectionMode??"none",t.append(...e)}return s}get menuItems(){return[...this.defaultMenuItems,...this.customMenuItems]}get menuIsOpen(){return this._menuIsOpen}get menuIsVisible(){return!(!1===this.visibleElements?.columnMenus||!this.menuItems.length)}closeMenu(){this.menu.open=!1}createSortElement(){const{effectiveLabel:e,direction:t,fieldName:i,initialSortPriority:n}=this,o=document.createElement("vaadin-grid-sorter");return o.classList.add(a.sorter),o.setAttribute("path",i),o.setAttribute("title",this.labelTooltipText||e),o.textContent=e,t&&o.setAttribute("direction",t),null!=n&&(o._initialOrder=n),o.addEventListener("direction-changed",()=>{this.direction!==o.direction&&this._set("direction",o.direction)}),o}createCalciteAction(e){const t=document.createElement("calcite-action"),{alignment:i,appearance:n,className:o,disabled:s,icon:r,label:l,scale:a,slot:c,text:d,textEnabled:p,onclick:u}=e;return t.alignment=i??"center",t.appearance=n??"transparent",t.className=o??"",t.disabled=!!s,t.icon=r??"",t.label=l??"",t.scale=a??"s",t.slot=c??"",t.text=t.title=d??"",t.textEnabled=!!p,t.onclick=u??null,t}createCalciteButton(e){const t=document.createElement("calcite-button"),{alignment:i,appearance:n,className:o,disabled:s,iconEnd:r,iconFlipRtl:l,kind:a,loading:c,onclick:d,scale:p,textContent:u,title:m,width:h}=e;return t.alignment=i??"center",t.className=o??"",t.scale=p??"s",t.appearance=n??"transparent",t.disabled=!!s,t.iconEnd=r??"",l&&(t.iconFlipRtl=l),t.kind=a??"brand",t.loading=!!c,t.textContent=u??"",m&&(t.title=m),t.width=h??"auto",t.onclick=d??null,t}createCalciteDropdownItem(e){const t=document.createElement("calcite-dropdown-item"),{disabled:i,hidden:n,iconClass:o,iconStart:s,textContent:r,onclick:l,selected:c}=e,d=r??"";if(o&&!s){const e=document.createElement("span"),i=document.createElement("span");i.classList.add(a.headerMenuIcon,o),e.textContent=e.title=d,e.insertBefore(i,e.firstChild),t.appendChild(e)}else t.iconStart=s??"",t.textContent=t.title=d;return t.disabled=!!i,t.hidden="function"==typeof n?n():!!n,t.selected=!!c,l&&(t.addEventListener("calciteDropdownItemSelect",l),t.onkeydown=this._stopPropagationOnSelect),t}createCalciteIcon(e){const{effectiveLabel:t}=this,{icon:i,scale:n,textLabel:o}=e,s=document.createElement("calcite-icon"),r=o??t;return s.icon=i,s.scale=n??"s",s.textLabel=r,s.title=r,s}createHeaderContent(){const{effectiveDescription:e,effectiveLabel:t,iconNode:i}=this,n=document.createElement("div");if(n.classList.add(a.headerContent),i&&n.appendChild(i),!this._headerRequiresTextContainer)return n;const o=n.appendChild(document.createElement("div"));return this.effectiveSortable?o.appendChild(this.sortElement):""!==t&&o.appendChild(this._createHeaderTextElement({label:t,cssClass:a.headerLabel,title:this.labelTooltipText})),null!=e&&!1!==this.visibleElements?.columnDescriptions&&o.appendChild(this._createHeaderTextElement({label:e,cssClass:a.headerDescription})),this.menuIsVisible&&n.appendChild(this.menu),n}getCellValue(e){return e?.item.feature.attributes?.[this.fieldName]}getVirtualRowIndex(e){const t=this.grid?.getRowContainingNode(e);return t?.parentElement?[...t.parentElement.children].indexOf(t):-1}removeCellContent(e){if(e&&e.firstChild)try{for(;e?.firstChild;)e?.removeChild(e.firstChild)}catch(t){}}openMenu(){this.menuIsVisible&&(this.menu.open=!0,p(this.menuItems[0]))}sort(){this.effectiveSortable&&this.sortElement?.click()}_stopPropagationOnSelect(e){"Enter"!==e.key&&" "!==e.key||e.stopPropagation()}_createHeaderTextElement({cssClass:e,label:t,title:i}){const n=document.createElement("span");n.classList.add(e);const o=n.appendChild(document.createElement("span"));return o.textContent=t,o.setAttribute("title",i||t),n}};e([r()],u.prototype,"_headerRequiresTextContainer",null),e([r()],u.prototype,"_menuIsOpen",void 0),e([r()],u.prototype,"autoWidth",void 0),e([r()],u.prototype,"cellValueFormatFunction",void 0),e([r()],u.prototype,"customMenuItems",null),e([r()],u.prototype,"defaultMenuItems",null),e([r()],u.prototype,"description",void 0),e([r()],u.prototype,"direction",void 0),e([r()],u.prototype,"effectiveDescription",null),e([r()],u.prototype,"effectiveLabel",null),e([r()],u.prototype,"effectiveSortable",null),e([r({constructOnly:!0})],u.prototype,"fieldName",void 0),e([r()],u.prototype,"flexGrow",void 0),e([r()],u.prototype,"footerRenderFunction",void 0),e([r()],u.prototype,"formatFunction",void 0),e([r()],u.prototype,"frozen",void 0),e([r()],u.prototype,"frozenToEnd",void 0),e([r()],u.prototype,"grid",void 0),e([r()],u.prototype,"iconNode",null),e([r()],u.prototype,"invalid",null),e([r()],u.prototype,"headerRenderFunction",void 0),e([r()],u.prototype,"hidden",void 0),e([r()],u.prototype,"icon",void 0),e([r()],u.prototype,"iconText",void 0),e([r({constructOnly:!0})],u.prototype,"initialSortPriority",void 0),e([r()],u.prototype,"label",void 0),e([r()],u.prototype,"labelTooltipText",void 0),e([r()],u.prototype,"menu",null),e([r()],u.prototype,"menuItems",null),e([r()],u.prototype,"menuConfig",void 0),e([r()],u.prototype,"menuIsOpen",null),e([r()],u.prototype,"menuIsVisible",null),e([r()],u.prototype,"messages",void 0),e([r()],u.prototype,"messagesCommon",void 0),e([r()],u.prototype,"messagesURIUtils",void 0),e([r()],u.prototype,"renderFunction",void 0),e([r()],u.prototype,"resizable",void 0),e([r()],u.prototype,"sortable",void 0),e([r({readOnly:!0})],u.prototype,"sortElement",void 0),e([r()],u.prototype,"store",void 0),e([r()],u.prototype,"tableTimeZone",void 0),e([r()],u.prototype,"textAlign",void 0),e([r()],u.prototype,"textWrap",void 0),e([r()],u.prototype,"timeZone",void 0),e([r()],u.prototype,"visibleElements",void 0),e([r()],u.prototype,"width",void 0),u=e([l("esri.widgets.FeatureTable.Grid.Column")],u);const m=u;export{m as default};
5
+ import{__decorate as e}from"tslib";import t from"../../../core/Accessor.js";import{watch as i,when as n,initial as o}from"../../../core/reactiveUtils.js";import{renderingSanitizer as s,stripHTMLSanitizer as r}from"../../../core/sanitizerUtils.js";import{property as l}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as a}from"../../../core/accessorSupport/decorators/subclass.js";import{css as c}from"./ColumnCSS.js";import{isEmptyStringOrWhitespace as d}from"../support/tableUtils.js";import{autoLink as p}from"../../support/uriUtils.js";import{setFocus as u}from"../../support/widgetUtils.js";const m=/<br\s*\/*>/gi;let h=class extends t{constructor(e){super(e),this._menuIsOpen=!1,this.autoWidth=!1,this.cellValueFormatFunction=({root:e,rowData:t,value:i})=>{const{formatFunction:n}=this,o=this.sanitizeContent(i);if(n&&t){const{index:i,item:{attachments:s,feature:r,relatedRecords:l}}=t,a=n({attachments:s,column:this,feature:r,index:i,relatedRecords:l,value:o,virtualIndex:this.getVirtualRowIndex(e),field:void 0});return this.sanitizeContent(a)}return o},this.description=null,this.direction=null,this.fieldName=null,this.flexGrow=1,this.footerRenderFunction=null,this.formatFunction=null,this.frozen=!1,this.frozenToEnd=!1,this.grid=null,this.headerRenderFunction=e=>{const{root:t}=e,i=this.createHeaderContent();this.removeCellContent(t),t.appendChild(i)},this.hidden=!1,this.icon=null,this.iconText=null,this.initialSortPriority=null,this.label=null,this.labelTooltipText=null,this.menuConfig=null,this.messages=null,this.messagesCommon=null,this.messagesURIUtils=null,this.renderFunction=({root:e,rowData:t})=>{const i=this.getCellValue(t),n=this.cellValueFormatFunction({root:e,rowData:t,value:i});let o=null;if(o=n instanceof HTMLElement?n:p(this.messagesURIUtils,n),this.removeCellContent(e),o instanceof HTMLElement)e.removeAttribute("title"),e.appendChild(o);else if(null!=o){const t=o.toString();e.innerHTML=t,e.title=t}},this.resizable=!0,this.sortable=!1,this.store=null,this.tableTimeZone=null,this.textAlign="start",this.textWrap=!1,this.timeZone=null,this.visibleElements=null,this.width=200}initialize(){const{fieldName:e}=this;this._set("sortElement",this.createSortElement()),this.sortElement.setAttribute("path",e),this.addHandles([i(()=>this.direction,e=>{const{sortElement:t}=this;this.effectiveSortable&&t&&(e?this.sortElement.direction!==e&&t.setAttribute("direction",e):t.removeAttribute("direction"))}),n(()=>this.grid?.isReady&&this.sortElement,()=>{const{direction:e,grid:t,hidden:i,sortElement:n}=this;i&&e&&n&&t&&!t.hasSorter(n)&&t.addSorter(n)},o),i(()=>[this.timeZone,this.icon,this.iconText,this.labelTooltipText],()=>this.grid?.requestContentUpdate()),i(()=>this.hidden,()=>this.closeMenu()),i(()=>this.fieldName,e=>{const{sortElement:t}=this;t&&t.path!==e&&t.setAttribute("path",e)}),i(()=>[this.effectiveLabel,this.labelTooltipText],([e,t])=>{const{sortElement:i}=this;i&&(i.setAttribute("title",t||e),i.textContent=e)})])}get _headerRequiresTextContainer(){return!(!this.effectiveSortable&&""===this.effectiveLabel&&null==this.effectiveDescription)}get customMenuItems(){return this.menuConfig?.items?.map(({disabled:e,hidden:t,icon:i,iconClass:n,label:o,selected:s,clickFunction:r})=>this.createCalciteDropdownItem({disabled:e,hidden:t,iconClass:n,iconStart:i,selected:s,textContent:o,onclick:e=>r(e)}))??[]}get defaultMenuItems(){if(!this.effectiveSortable)return[];const e=this.messages,t=[],i=this.visibleElements?.columnMenuItems;if(!1!==i?.sortAscending){const i=this.createCalciteDropdownItem({iconStart:"sort-ascending-arrow",textContent:e?.sortAsc,onclick:()=>this.direction="asc"});t.push(i)}if(!1!==i?.sortDescending){const i=this.createCalciteDropdownItem({iconStart:"sort-descending-arrow",textContent:e?.sortDesc,onclick:()=>this.direction="desc"});t.push(i)}return t}get effectiveDescription(){const{description:e}=this;return d(e)?null:this.sanitizeLabel(e)}get effectiveLabel(){return this.sanitizeLabel(this.label||this.fieldName)}get effectiveSortable(){return this.sortable}get iconNode(){const{icon:e,iconText:t}=this,i=t?this.sanitizeLabel(t):void 0;return e?this.createCalciteIcon({icon:e,textLabel:i}):null}set invalid(e){this._set("invalid",e),this.grid?.generateCellPartNames()}get invalid(){return this._get("invalid")??!1}get menu(){const{customMenuItems:e,defaultMenuItems:t,menuConfig:i}=this,n=!!i?.open,o=this.createCalciteAction({icon:i?.icon??"ellipsis",text:this.messages?.menu??"",slot:"trigger"}),s=document.createElement("calcite-dropdown");if(s.maxItems=i?.maxItems??4,s.placement="top-end",s.scale=i?.scale??"m",n&&(s.open=n,this._menuIsOpen=!0),s.appendChild(o),s.addEventListener("calciteDropdownOpen",()=>this._menuIsOpen=!0),s.addEventListener("calciteDropdownClose",()=>this._menuIsOpen=!1),s.onkeydown=this._stopPropagationOnSelect,s.addEventListener("mousewheel",e=>{e.stopPropagation()}),t.length){const e=s.appendChild(document.createElement("calcite-dropdown-group"));e.selectionMode="none",e.append(...t)}if(e.length){const t=s.appendChild(document.createElement("calcite-dropdown-group"));t.selectionMode=i?.selectionMode??"none",t.append(...e)}return s}get menuItems(){return[...this.defaultMenuItems,...this.customMenuItems]}get menuIsOpen(){return this._menuIsOpen}get menuIsVisible(){return!(!1===this.visibleElements?.columnMenus||!this.menuItems.length)}closeMenu(){this.menu.open=!1}createSortElement(){const{effectiveLabel:e,direction:t,fieldName:i,initialSortPriority:n}=this,o=document.createElement("vaadin-grid-sorter");return o.classList.add(c.sorter),o.setAttribute("path",i),o.setAttribute("title",this.labelTooltipText||e),o.textContent=e,t&&o.setAttribute("direction",t),null!=n&&(o._initialOrder=n),o.addEventListener("direction-changed",()=>{this.direction!==o.direction&&this._set("direction",o.direction)}),o}createCalciteAction(e){const t=document.createElement("calcite-action"),{alignment:i,appearance:n,className:o,disabled:s,icon:r,label:l,scale:a,slot:c,text:d,textEnabled:p,onclick:u}=e;return t.alignment=i??"center",t.appearance=n??"transparent",t.className=o??"",t.disabled=!!s,t.icon=r??"",t.label=l??"",t.scale=a??"s",t.slot=c??"",t.text=t.title=d??"",t.textEnabled=!!p,t.onclick=u??null,t}createCalciteButton(e){const t=document.createElement("calcite-button"),{alignment:i,appearance:n,className:o,disabled:s,iconEnd:r,iconFlipRtl:l,kind:a,loading:c,onclick:d,scale:p,textContent:u,title:m,width:h}=e;return t.alignment=i??"center",t.className=o??"",t.scale=p??"s",t.appearance=n??"transparent",t.disabled=!!s,t.iconEnd=r??"",l&&(t.iconFlipRtl=l),t.kind=a??"brand",t.loading=!!c,t.textContent=u??"",m&&(t.title=m),t.width=h??"auto",t.onclick=d??null,t}createCalciteDropdownItem(e){const t=document.createElement("calcite-dropdown-item"),{disabled:i,hidden:n,iconClass:o,iconStart:s,textContent:r,onclick:l,selected:a}=e,d=r??"";if(o&&!s){const e=document.createElement("span"),i=document.createElement("span");i.classList.add(c.headerMenuIcon,o),e.textContent=e.title=d,e.insertBefore(i,e.firstChild),t.appendChild(e)}else t.iconStart=s??"",t.textContent=t.title=d;return t.disabled=!!i,t.hidden="function"==typeof n?n():!!n,t.selected=!!a,l&&(t.addEventListener("calciteDropdownItemSelect",l),t.onkeydown=this._stopPropagationOnSelect),t}createCalciteIcon(e){const{effectiveLabel:t}=this,{icon:i,scale:n,textLabel:o}=e,s=document.createElement("calcite-icon"),r=o??t;return s.icon=i,s.scale=n??"s",s.textLabel=r,s.title=r,s}createHeaderContent(){const{effectiveDescription:e,effectiveLabel:t,iconNode:i}=this,n=document.createElement("div");if(n.classList.add(c.headerContent),i&&n.appendChild(i),!this._headerRequiresTextContainer)return n;const o=n.appendChild(document.createElement("div"));return this.effectiveSortable?o.appendChild(this.sortElement):""!==t&&o.appendChild(this._createHeaderTextElement({label:t,cssClass:c.headerLabel,title:this.labelTooltipText})),null!=e&&!1!==this.visibleElements?.columnDescriptions&&o.appendChild(this._createHeaderTextElement({label:e,cssClass:c.headerDescription})),this.menuIsVisible&&n.appendChild(this.menu),n}getCellValue(e){return e?.item.feature.attributes?.[this.fieldName]}getVirtualRowIndex(e){const t=this.grid?.getRowContainingNode(e);return t?.parentElement?[...t.parentElement.children].indexOf(t):-1}removeCellContent(e){if(e&&e.firstChild)try{for(;e?.firstChild;)e?.removeChild(e.firstChild)}catch(t){}}openMenu(){this.menuIsVisible&&(this.menu.open=!0,u(this.menuItems[0]))}sanitizeContent(e){return s.sanitize(e)}sanitizeLabel(e){return null==e||""===e?"":r.sanitize(e.toString()).replaceAll(m," ")}sort(){this.effectiveSortable&&this.sortElement?.click()}_stopPropagationOnSelect(e){"Enter"!==e.key&&" "!==e.key||e.stopPropagation()}_createHeaderTextElement({cssClass:e,label:t,title:i}){const n=document.createElement("span");n.classList.add(e);const o=n.appendChild(document.createElement("span"));return o.textContent=t,o.setAttribute("title",i||t),n}};e([l()],h.prototype,"_headerRequiresTextContainer",null),e([l()],h.prototype,"_menuIsOpen",void 0),e([l()],h.prototype,"autoWidth",void 0),e([l()],h.prototype,"cellValueFormatFunction",void 0),e([l()],h.prototype,"customMenuItems",null),e([l()],h.prototype,"defaultMenuItems",null),e([l()],h.prototype,"description",void 0),e([l()],h.prototype,"direction",void 0),e([l()],h.prototype,"effectiveDescription",null),e([l()],h.prototype,"effectiveLabel",null),e([l()],h.prototype,"effectiveSortable",null),e([l({constructOnly:!0})],h.prototype,"fieldName",void 0),e([l()],h.prototype,"flexGrow",void 0),e([l()],h.prototype,"footerRenderFunction",void 0),e([l()],h.prototype,"formatFunction",void 0),e([l()],h.prototype,"frozen",void 0),e([l()],h.prototype,"frozenToEnd",void 0),e([l()],h.prototype,"grid",void 0),e([l()],h.prototype,"iconNode",null),e([l()],h.prototype,"invalid",null),e([l()],h.prototype,"headerRenderFunction",void 0),e([l()],h.prototype,"hidden",void 0),e([l()],h.prototype,"icon",void 0),e([l()],h.prototype,"iconText",void 0),e([l({constructOnly:!0})],h.prototype,"initialSortPriority",void 0),e([l()],h.prototype,"label",void 0),e([l()],h.prototype,"labelTooltipText",void 0),e([l()],h.prototype,"menu",null),e([l()],h.prototype,"menuItems",null),e([l()],h.prototype,"menuConfig",void 0),e([l()],h.prototype,"menuIsOpen",null),e([l()],h.prototype,"menuIsVisible",null),e([l()],h.prototype,"messages",void 0),e([l()],h.prototype,"messagesCommon",void 0),e([l()],h.prototype,"messagesURIUtils",void 0),e([l()],h.prototype,"renderFunction",void 0),e([l()],h.prototype,"resizable",void 0),e([l()],h.prototype,"sortable",void 0),e([l({readOnly:!0})],h.prototype,"sortElement",void 0),e([l()],h.prototype,"store",void 0),e([l()],h.prototype,"tableTimeZone",void 0),e([l()],h.prototype,"textAlign",void 0),e([l()],h.prototype,"textWrap",void 0),e([l()],h.prototype,"timeZone",void 0),e([l()],h.prototype,"visibleElements",void 0),e([l()],h.prototype,"width",void 0),h=e([a("esri.widgets.FeatureTable.Grid.Column")],h);const f=h;export{f as default};