@arcgis/core 5.1.0-next.126 → 5.1.0-next.128

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 (470) hide show
  1. package/applications/Urban/editingSessionUtils.js +1 -1
  2. package/arcade/featureSetUtils.js +1 -1
  3. package/arcade/featureset/sources/FeatureLayerDynamic.js +1 -1
  4. package/arcade/featureset/sources/FeatureLayerParquet.js +2 -0
  5. package/arcade/featureset/support/FeatureSet.js +1 -1
  6. package/arcade/featureset/support/shared.js +1 -1
  7. package/arcade.d.ts +2 -1
  8. package/arcgisGlobal.d.ts +6 -4
  9. package/assets/esri/core/workers/RemoteClient.js +1 -1
  10. package/assets/esri/core/workers/chunks/01ba5319cac3e0f14205.js +1 -0
  11. package/assets/esri/core/workers/chunks/02a94efda13d9b683272.js +1 -0
  12. package/assets/esri/core/workers/chunks/05e1f1628a3726eca03d.js +1 -0
  13. package/assets/esri/core/workers/chunks/{81808c3aead7dfac3049.js → 07ca020796c57cefda62.js} +1 -1
  14. package/assets/esri/core/workers/chunks/08dfe61c75f0032db4d4.js +1 -0
  15. package/assets/esri/core/workers/chunks/0a1037fdc8c7bf8d0e7e.js +1 -0
  16. package/assets/esri/core/workers/chunks/{ac33b10fe65f9e9e824f.js → 0acf8df4e9556d05136c.js} +1 -1
  17. package/assets/esri/core/workers/chunks/0b45d34938fa7862f746.js +1 -0
  18. package/assets/esri/core/workers/chunks/0fe57b2d06368d3f68c9.js +1 -0
  19. package/assets/esri/core/workers/chunks/10605362b74cc63bd8a2.js +1 -0
  20. package/assets/esri/core/workers/chunks/11c3b1e8ca21ad62fdd1.js +1 -0
  21. package/assets/esri/core/workers/chunks/{7c6f4104f5325ce0afbc.js → 183b7664c68babd90fc8.js} +1 -1
  22. package/assets/esri/core/workers/chunks/{c187bc997bad61b6c6e9.js → 18d1ac2165a84c42e98f.js} +1 -1
  23. package/assets/esri/core/workers/chunks/1a0903b1d2d5101977c6.js +1 -0
  24. package/assets/esri/core/workers/chunks/{0b169bb1969f86232a1a.js → 1b03e10a6b721365acbb.js} +1 -1
  25. package/assets/esri/core/workers/chunks/{100130a80bc151f2e493.js → 1b07d7656ffcf53cba2b.js} +1 -1
  26. package/assets/esri/core/workers/chunks/1bd49e8d2657c72bf3f9.js +1 -0
  27. package/assets/esri/core/workers/chunks/1d38b2fcd85ac9ebd7c6.js +1 -0
  28. package/assets/esri/core/workers/chunks/1d91e69483c3ceec3c4d.js +1 -0
  29. package/assets/esri/core/workers/chunks/1effde6a39ef0d4af525.js +1 -0
  30. package/assets/esri/core/workers/chunks/{0f75c19d8e296a32e329.js → 1ff57bf19f021f5fd246.js} +1 -1
  31. package/assets/esri/core/workers/chunks/268243ee64d001009f78.js +1 -0
  32. package/assets/esri/core/workers/chunks/26aa8190ac439f634c5b.js +1 -0
  33. package/assets/esri/core/workers/chunks/2b781de7b467c61849b2.js +1 -0
  34. package/assets/esri/core/workers/chunks/2c4f10eaf02ef090ee8f.js +1 -0
  35. package/assets/esri/core/workers/chunks/309fcc46da0b4393960e.js +1 -0
  36. package/assets/esri/core/workers/chunks/314bc1b356d43bfa72a8.js +1 -0
  37. package/assets/esri/core/workers/chunks/{03e93c18efc67a25ca63.js → 35c4037b8eea067d9638.js} +1 -1
  38. package/assets/esri/core/workers/chunks/39a10b2092a98083f4cf.js +1 -0
  39. package/assets/esri/core/workers/chunks/{96e46424c3fb1dd9ce3b.js → 3a284a81d1fdfae2dc77.js} +1 -1
  40. package/assets/esri/core/workers/chunks/3b9174de370b187a0985.js +1 -0
  41. package/assets/esri/core/workers/chunks/3bd32387af52fa48d747.js +1 -0
  42. package/assets/esri/core/workers/chunks/3d4bb539bf939fcdeef9.js +1 -0
  43. package/assets/esri/core/workers/chunks/3d83ac791212b81c9d11.js +1 -0
  44. package/assets/esri/core/workers/chunks/3dc6e9494af16f7b8009.js +1 -0
  45. package/assets/esri/core/workers/chunks/3ecb906322a6a5c8c93b.js +1 -0
  46. package/assets/esri/core/workers/chunks/3f67162456a1f02190fa.js +1 -0
  47. package/assets/esri/core/workers/chunks/{d63f532dd7d60ee8ef2c.js → 42e5e00610f281ca8ffa.js} +1 -1
  48. package/assets/esri/core/workers/chunks/{73c355b895fd6a34fcb8.js → 45b560ca01fb566ba560.js} +1 -1
  49. package/assets/esri/core/workers/chunks/{d36b407f5ad5eabac530.js → 4a9e34fe9a16b1850876.js} +28 -28
  50. package/assets/esri/core/workers/chunks/{e25bcfdd8f20f8a08b19.js → 4d57c771af4137f74bfb.js} +1 -1
  51. package/assets/esri/core/workers/chunks/4e59e5a5d0ff887ff899.js +1 -0
  52. package/assets/esri/core/workers/chunks/4e788fc6cb2ea936f676.js +1 -0
  53. package/assets/esri/core/workers/chunks/4efef5fa8bf23aaf34cd.js +1 -0
  54. package/assets/esri/core/workers/chunks/511b9c12a7479d39dac0.js +1 -0
  55. package/assets/esri/core/workers/chunks/51a53011478e0cf96e0b.js +1 -0
  56. package/assets/esri/core/workers/chunks/5282705a4b515d38ebde.js +1 -0
  57. package/assets/esri/core/workers/chunks/53c8062f4573fa64c49d.js +1 -0
  58. package/assets/esri/core/workers/chunks/599bd80379423c99799d.js +1 -0
  59. package/assets/esri/core/workers/chunks/5aba23584e0b230c75f5.js +1 -0
  60. package/assets/esri/core/workers/chunks/{77214e6081c1c28f1345.js → 6144f59bc0ba153a82d3.js} +1 -1
  61. package/assets/esri/core/workers/chunks/65cc9a48ac95523f7aa8.js +1 -0
  62. package/assets/esri/core/workers/chunks/66392ff750c28064040a.js +1 -0
  63. package/assets/esri/core/workers/chunks/668d84dc512b3085a960.js +1 -0
  64. package/assets/esri/core/workers/chunks/{d3c760109a70a71448c5.js → 67773a9f031d9f1d672f.js} +1 -1
  65. package/assets/esri/core/workers/chunks/67bf361d0b5cfd6b53da.js +1 -0
  66. package/assets/esri/core/workers/chunks/68b77b36daae2b4b4237.js +1 -0
  67. package/assets/esri/core/workers/chunks/6f5a82388a5eb5fcf1b7.js +1 -0
  68. package/assets/esri/core/workers/chunks/70b5e0fce22122a7ccc2.js +1 -0
  69. package/assets/esri/core/workers/chunks/{b606af35a4fb893b762c.js → 71a48f597fda322ea56f.js} +1 -1
  70. package/assets/esri/core/workers/chunks/71c996e1ae84d9daddf2.js +1 -0
  71. package/assets/esri/core/workers/chunks/73b0edabddbb72fe1104.js +1 -0
  72. package/assets/esri/core/workers/chunks/753e0b21e57c12c742ee.js +1 -0
  73. package/assets/esri/core/workers/chunks/{8b0a01ebc86ab226f01f.js → 75b4c27ca02b124a713c.js} +1 -1
  74. package/assets/esri/core/workers/chunks/764c8ba14ab74b66b391.js +1 -0
  75. package/assets/esri/core/workers/chunks/7a1f65511bce26e6b770.js +1 -0
  76. package/assets/esri/core/workers/chunks/7f849c8255140be6097f.js +1 -0
  77. package/assets/esri/core/workers/chunks/{cc697c4d9cdc116373dc.js → 81726d997a2d34449bb2.js} +1 -1
  78. package/assets/esri/core/workers/chunks/{74e1826ad9e2c4fd3b42.js → 81883bca8a79ee2ddb00.js} +1 -1
  79. package/assets/esri/core/workers/chunks/831455798b177678720c.js +1 -0
  80. package/assets/esri/core/workers/chunks/85505a8b8b0794656d06.js +1 -0
  81. package/assets/esri/core/workers/chunks/8570d1c7159b5a84d56c.js +1 -0
  82. package/assets/esri/core/workers/chunks/{5bd7ee40a1c469c24013.js → 86cad656a6a473982109.js} +2 -2
  83. package/assets/esri/core/workers/chunks/{9331969046f2b277d620.js → 8a39dd585742960d3ca2.js} +1 -1
  84. package/assets/esri/core/workers/chunks/{5cb1b950249d651f3837.js → 8dcb3e77f76d8396706b.js} +1 -1
  85. package/assets/esri/core/workers/chunks/{3ff7aa216cd794d951e8.js → 8e99f937fd36cf2cd05f.js} +1 -1
  86. package/assets/esri/core/workers/chunks/8f25d91ea7b99597124e.js +1 -0
  87. package/assets/esri/core/workers/chunks/92341f36a8b15f34bcca.js +1 -0
  88. package/assets/esri/core/workers/chunks/93d08d82ceab19e314f8.js +1 -0
  89. package/assets/esri/core/workers/chunks/96f58e0157b960f6ee22.js +1 -0
  90. package/assets/esri/core/workers/chunks/{bf706a5d065a357de51b.js → 993fee0e91303eb1f01f.js} +1 -1
  91. package/assets/esri/core/workers/chunks/9da1a514e042eb642d35.js +1 -0
  92. package/assets/esri/core/workers/chunks/9f93c29af2a18f7cb160.js +1 -0
  93. package/assets/esri/core/workers/chunks/{00da56b977a7c61b5c94.js → 9fd61a387bd6603da299.js} +1 -1
  94. package/assets/esri/core/workers/chunks/a0208e35b217808777c4.js +1 -0
  95. package/assets/esri/core/workers/chunks/a18cb809dd56c5537b3b.js +1 -0
  96. package/assets/esri/core/workers/chunks/{52175ff9e8c2c136f90a.js → a3ecde3794a7db3cf283.js} +1 -1
  97. package/assets/esri/core/workers/chunks/{c9fefb6316c51cbdc61f.js → a4cdcb0b06242a95722a.js} +1 -1
  98. package/assets/esri/core/workers/chunks/a892b3be70f482bef0ba.js +1 -0
  99. package/assets/esri/core/workers/chunks/a8ef7acb6d3d1f45e14c.js +1 -0
  100. package/assets/esri/core/workers/chunks/aa5f36d7ed59c625ba78.js +1 -0
  101. package/assets/esri/core/workers/chunks/ac5032253c752768021b.js +2 -0
  102. package/assets/esri/core/workers/chunks/ac7ecd90330090c90005.js +1 -0
  103. package/assets/esri/core/workers/chunks/b1524f23e6cee5301a14.js +1 -0
  104. package/assets/esri/core/workers/chunks/{c983e5ce0ff952b65d7f.js → b2b342b06d502fc61ea5.js} +1 -1
  105. package/assets/esri/core/workers/chunks/b3c8aa11ae7f63cb6d74.js +1 -0
  106. package/assets/esri/core/workers/chunks/b590402170ae289290d7.js +1 -0
  107. package/assets/esri/core/workers/chunks/b75a4753cea6544da8bb.js +1 -0
  108. package/assets/esri/core/workers/chunks/b775a0d8894930af4983.js +1 -0
  109. package/assets/esri/core/workers/chunks/bbcad2fde838819ffc7b.js +1 -0
  110. package/assets/esri/core/workers/chunks/{1a527c0740d9f4fa0791.js → bc547cf814d6703cef59.js} +1 -1
  111. package/assets/esri/core/workers/chunks/bd36c57dd0cd28dee55f.js +30 -0
  112. package/assets/esri/core/workers/chunks/be1d2c3a61e6447fbbc7.js +1 -0
  113. package/assets/esri/core/workers/chunks/be8340d5ae5e662c2671.js +1 -0
  114. package/assets/esri/core/workers/chunks/bf6ae205fbfbfcd1a0ee.js +1 -0
  115. package/assets/esri/core/workers/chunks/bfa6f4c08e7571bb1f37.js +1 -0
  116. package/assets/esri/core/workers/chunks/c030cdb4cdb08cb51501.js +262 -0
  117. package/assets/esri/core/workers/chunks/c148ad0ea9258046ac1f.js +1 -0
  118. package/assets/esri/core/workers/chunks/c2cbc2a920e6e199533a.js +1 -0
  119. package/assets/esri/core/workers/chunks/c8460bdf60aca749ed05.js +30 -0
  120. package/assets/esri/core/workers/chunks/c9057b0ad2c2bae4a8ce.js +1 -0
  121. package/assets/esri/core/workers/chunks/cc0efa716b8414a44398.js +1 -0
  122. package/assets/esri/core/workers/chunks/{8f6833671c071b522923.js → cd66bd30f654fe571e57.js} +1 -1
  123. package/assets/esri/core/workers/chunks/cf41a66fb97c1076fb34.js +1 -0
  124. package/assets/esri/core/workers/chunks/cf9a132c4c37e62de3d7.js +1 -0
  125. package/assets/esri/core/workers/chunks/d3be4d914fc99a1d686c.js +1 -0
  126. package/assets/esri/core/workers/chunks/d6145cd7e7c5346f62ec.js +1 -0
  127. package/assets/esri/core/workers/chunks/d6911e9453532501f460.js +1 -0
  128. package/assets/esri/core/workers/chunks/{8407c91cce31e087b41b.js → d750e4abeb777caa8c36.js} +1 -1
  129. package/assets/esri/core/workers/chunks/dada22a4350e9ddaf850.js +30 -0
  130. package/assets/esri/core/workers/chunks/{6675d56f49d07a97dc40.js → dd0c1cf921369e2bc48b.js} +1 -1
  131. package/assets/esri/core/workers/chunks/e656fd5ecf9ac059a87b.js +1 -0
  132. package/assets/esri/core/workers/chunks/{7a474ce61cf484df87b4.js → e80376832050a4b6d28a.js} +1 -1
  133. package/assets/esri/core/workers/chunks/e9acc05b0cf9e05f31a8.js +1 -0
  134. package/assets/esri/core/workers/chunks/e9cd84ad0054e9fea448.js +1 -0
  135. package/assets/esri/core/workers/chunks/ead719bff4a94816a42e.js +1 -0
  136. package/assets/esri/core/workers/chunks/f116331c6eca937aac8e.js +1 -0
  137. package/assets/esri/core/workers/chunks/f116ff0121d28bbf7a23.js +1 -0
  138. package/assets/esri/core/workers/chunks/{3b837b512999e6ab24bc.js → f148666308071bdb185a.js} +1 -1
  139. package/assets/esri/core/workers/chunks/f23e995320674b32e142.js +1 -0
  140. package/assets/esri/core/workers/chunks/f27c7d5cb0937fe50acf.js +1 -0
  141. package/assets/esri/core/workers/chunks/f5f9f21c23c51e35ae65.js +1 -0
  142. package/assets/esri/core/workers/chunks/{893c0d28a5bf3f9f29f1.js → f93facf47aba9b128fcc.js} +1 -1
  143. package/assets/esri/core/workers/chunks/f955b35337a08f9f747d.js +1 -0
  144. package/assets/esri/core/workers/chunks/{f75295cdd5e84eb97d5a.js → f9d583785b3b09ace222.js} +1 -1
  145. package/assets/esri/core/workers/chunks/fa1336b60278017d2525.js +1 -0
  146. package/assets/esri/core/workers/chunks/fe6385115d76e16e8da0.js +1 -0
  147. package/assets/esri/rest/knowledgeGraph/wasmInterface/arcgis-knowledge-client-core-simd.wasm +0 -0
  148. package/assets/esri/rest/knowledgeGraph/wasmInterface/arcgis-knowledge-client-core.wasm +0 -0
  149. package/assets/esri/themes/base/widgets/_BatchAttributeForm.scss +5 -1
  150. package/assets/esri/themes/dark/main.css +1 -1
  151. package/assets/esri/themes/light/main.css +1 -1
  152. package/assets/esri/themes/light/view.css +1 -1
  153. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_fr.json +1 -1
  154. package/chunks/ComponentShader.glsl.js +11 -11
  155. package/chunks/GaussianSplatComposition.glsl.js +1 -1
  156. package/chunks/GlobalIlluminationBlur.glsl.js +8 -8
  157. package/chunks/OITBlend.glsl.js +1 -24
  158. package/chunks/OITBlendEmission.glsl.js +9 -9
  159. package/chunks/OITDimOpaque.glsl.js +3 -9
  160. package/chunks/arcgis-knowledge-client-core-simd.js +1 -1
  161. package/chunks/arcgis-knowledge-client-core.js +1 -1
  162. package/config.js +1 -1
  163. package/core/promiseUtils.d.ts +1 -1
  164. package/core/promiseUtils.js +1 -1
  165. package/core/reactiveUtils.d.ts +410 -109
  166. package/core/units.js +1 -1
  167. package/form/types.d.ts +1 -1
  168. package/geometry/Mesh.d.ts +220 -95
  169. package/geometry/operators/support/projectionZScaling.js +1 -1
  170. package/geometry/support/MeshGeoreferencedVertexSpace.d.ts +35 -13
  171. package/geometry/support/MeshLocalVertexSpace.d.ts +32 -8
  172. package/geometry/support/MeshVertexAttributes.d.ts +6 -2
  173. package/geometry/support/heightModelInfoUtils.js +1 -1
  174. package/geometry/support/zscale.js +1 -1
  175. package/graphic/{AnnotationGraphicOrigin.d.ts → AnnotationFeatureGraphicOrigin.d.ts} +12 -9
  176. package/graphic/AnnotationFeatureGraphicOrigin.js +2 -0
  177. package/graphic/DimensionFeatureGraphicOrigin.js +1 -1
  178. package/graphic/graphicOrigins.js +1 -1
  179. package/graphic/isAnnotationFeatureGraphicOrigin.d.ts +29 -0
  180. package/graphic/isAnnotationFeatureGraphicOrigin.js +2 -0
  181. package/graphic/isDimensionFeatureGraphicOrigin.d.ts +29 -0
  182. package/graphic/isDimensionFeatureGraphicOrigin.js +2 -0
  183. package/interfaces.d.ts +6 -6
  184. package/kernel.js +1 -1
  185. package/layers/{AnnotationLayer.d.ts → AnnotationFeatureLayer.d.ts} +97 -24
  186. package/layers/AnnotationFeatureLayer.js +2 -0
  187. package/layers/GaussianSplatLayer.d.ts +4 -1
  188. package/layers/ParquetLayer.js +1 -1
  189. package/layers/graphics/data/queryUtils.js +1 -1
  190. package/layers/graphics/sources/MemorySource.js +1 -1
  191. package/layers/graphics/sources/ParquetSource.js +1 -1
  192. package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
  193. package/layers/mixins/OperationalLayer.js +1 -1
  194. package/layers/save/featureLayerUtils.js +1 -1
  195. package/layers/support/AnnotationFeatureSublayer.d.ts +44 -0
  196. package/layers/support/AnnotationFeatureSublayer.js +2 -0
  197. package/layers/support/ExportImageServiceParameters.js +1 -1
  198. package/layers/support/ParquetPortalItemData.js +1 -1
  199. package/layers/support/arcgisLayers.js +1 -1
  200. package/layers/support/fetchService.js +1 -1
  201. package/layers/support/layerUtils.js +1 -1
  202. package/layers/support/layersLoader.js +1 -1
  203. package/layers/support/layersMapping.js +1 -1
  204. package/layers/support/schemaValidator.js +1 -1
  205. package/layers/types.d.ts +1 -1
  206. package/networks/support/networkFieldUtils.js +1 -1
  207. package/package.json +3 -3
  208. package/portal/schemas/definitions.js +1 -1
  209. package/portal/schemas/gaussianSplatLayerItem.js +2 -0
  210. package/portal/schemas/integratedMesh3DTilesLayerItem.js +1 -1
  211. package/portal/support/loadUtils.js +1 -1
  212. package/rest/knowledgeGraph/ReplicaDefinition.d.ts +0 -2
  213. package/rest/knowledgeGraph/wasmInterface/replicaToWasmEncodedFactories.js +1 -1
  214. package/rest/knowledgeGraph/wasmInterface/wasmToReplicaFactories.js +1 -1
  215. package/rest/knowledgeGraphService.js +1 -1
  216. package/rest/print.js +1 -1
  217. package/rest/support/AttributeBinsQuery.js +1 -1
  218. package/rest/support/Query.js +1 -1
  219. package/rest/support/TopFeaturesQuery.js +1 -1
  220. package/smartMapping/renderers/location.js +1 -1
  221. package/smartMapping/renderers/predominance.js +1 -1
  222. package/smartMapping/renderers/support/regenerateUtils.js +1 -1
  223. package/smartMapping/renderers/support/rendererUtils.d.ts +3 -1
  224. package/smartMapping/renderers/support/rendererUtils.js +1 -1
  225. package/support/revision.js +1 -1
  226. package/symbols/WebStyleSymbol.js +1 -1
  227. package/symbols/support/symbolUtils.js +1 -1
  228. package/symbols/support/webStyleSymbolCache.js +2 -0
  229. package/undoredo/support/ApplySet.js +1 -1
  230. package/undoredo/support/ApplySetItem.js +1 -1
  231. package/views/2d/engine/vectorTiles/VectorTileContainer.js +1 -1
  232. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AAnimatedShader.js +1 -1
  233. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedMarkerMeshWriter.js +1 -1
  234. package/views/2d/engine/webgl/shaderGraph/techniques/animated/attributes.js +1 -1
  235. package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueBackground.js +1 -1
  236. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  237. package/views/2d/engine/webgl/util/createMatcher.js +1 -1
  238. package/views/2d/layerViewModuleImportUtils.js +1 -1
  239. package/views/2d/layers/AnnotationFeatureLayerView2D.js +2 -0
  240. package/views/2d/layers/FeatureLikeLayerView2D.js +1 -1
  241. package/views/2d/layers/TileLayerView2D.js +1 -1
  242. package/views/2d/layers/features/layerAdapters/AnnotationLayerAdapter.js +1 -1
  243. package/views/2d/layers/features/sources/strategies/support/queryAdapters.js +1 -1
  244. package/views/2d/layers/support/annodime/annotationSchema.js +1 -1
  245. package/views/2d/types.d.ts +2 -2
  246. package/views/3d/analysis/LineOfSight/LineOfSightTool.js +1 -1
  247. package/views/3d/interactive/visualElements/DrapedVisualElementResources.js +1 -1
  248. package/views/3d/layerViewModuleImportUtils.js +1 -1
  249. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  250. package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
  251. package/views/3d/support/GaussianSplatSortWorker.js +1 -1
  252. package/views/3d/support/GaussianSplatWorkerHandle.js +1 -1
  253. package/views/3d/support/gaussianSplatting/GaussianSplatDataStore.js +1 -1
  254. package/views/3d/support/gaussianSplatting/GaussianSplatOrderTexture.js +1 -1
  255. package/views/3d/support/gaussianSplatting/GaussianSplatTextureAtlas.js +1 -1
  256. package/views/3d/terrain/Tile.js +1 -1
  257. package/views/3d/terrain/isTerrainSurfaceLayer.js +1 -1
  258. package/views/3d/types.d.ts +1 -1
  259. package/views/3d/webgl-engine/collections/Component/Material/ComponentShader.glsl.js +1 -1
  260. package/views/3d/webgl-engine/core/shaderLibrary/TextureBackedBuffer.glsl.js +7 -7
  261. package/views/3d/webgl-engine/core/shaderLibrary/TextureBackedBufferFields.glsl.js +29 -20
  262. package/views/3d/webgl-engine/core/shaderLibrary/shading/Gamma.glsl.js +2 -2
  263. package/views/3d/webgl-engine/core/shaderLibrary/util/EmissionDimming.glsl.js +1 -1
  264. package/views/3d/webgl-engine/core/shaderLibrary/util/GaussianSplatTextureFetch.glsl.js +6 -8
  265. package/views/3d/webgl-engine/core/shaderTechnique/ShaderTechniqueRepository.js +1 -1
  266. package/views/3d/webgl-engine/effects/fog/FogTechniqueConfiguration.js +1 -1
  267. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationBlur.glsl.js +1 -1
  268. package/views/3d/webgl-engine/effects/glow/Glow.js +1 -1
  269. package/views/3d/webgl-engine/effects/glow/GlowBlurTechniqueConfiguration.js +1 -1
  270. package/views/3d/webgl-engine/effects/glow/GlowCompositionTechniqueConfiguration.js +1 -1
  271. package/views/3d/webgl-engine/effects/smaa/SMAA.js +1 -1
  272. package/views/3d/webgl-engine/effects/transparency/OITBlend.glsl.js +1 -1
  273. package/views/3d/webgl-engine/effects/transparency/OITBlend.js +1 -1
  274. package/views/3d/webgl-engine/effects/transparency/OITBlendEmission.glsl.js +1 -1
  275. package/views/3d/webgl-engine/effects/transparency/OITBlendEmissionTechnique.js +1 -1
  276. package/views/3d/webgl-engine/effects/transparency/OITBlendFragmentTechniqueConfiguration.js +2 -0
  277. package/views/3d/webgl-engine/effects/transparency/OITBlendTechnique.js +1 -1
  278. package/views/3d/webgl-engine/effects/transparency/OITBlendTechniqueConfiguration.js +1 -1
  279. package/views/3d/webgl-engine/effects/transparency/OITDimOpaque.glsl.js +1 -1
  280. package/views/3d/webgl-engine/effects/transparency/OITDimOpaqueTechnique.js +1 -1
  281. package/views/3d/webgl-engine/effects/transparency/oitBlendFragment.glsl.js +2 -0
  282. package/views/3d/webgl-engine/lib/Compositor.js +1 -1
  283. package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
  284. package/views/3d/webgl-engine/lib/Material.js +1 -1
  285. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  286. package/views/3d/webgl-engine/lib/TextureBackedBuffer/TexelFormatInfo.js +2 -0
  287. package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBackedBufferFieldCreation.js +1 -1
  288. package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBackedBufferLayout.js +1 -1
  289. package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBuffer.js +1 -1
  290. package/views/3d/webgl-engine/lib/lodRendering/LodComponentData.js +1 -1
  291. package/views/3d/webgl-engine/lib/lodRendering/LodLevel.js +1 -1
  292. package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
  293. package/views/3d/webgl-engine/materials/ColorMaterial.js +1 -1
  294. package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
  295. package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
  296. package/views/3d/webgl-engine/materials/PatternMaterial.js +1 -1
  297. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  298. package/views/3d/webgl-engine/materials/renderers/MergedRenderer.js +1 -1
  299. package/views/3d/webgl-engine/shaders/GaussianSplatCompositionTechniqueConfiguration.js +1 -1
  300. package/views/3d/webgl-engine/shaders/OutputColorHighlightOLID.glsl.js +1 -1
  301. package/views/3d/webgl-engine/shaders/alphaCutoff.glsl.js +1 -1
  302. package/views/3d/webgl-engine/shaders/oitResolution.glsl.js +1 -1
  303. package/views/View2D.d.ts +2 -3
  304. package/views/draw/support/editingSessionUtils.js +1 -1
  305. package/views/layers/{AnnotationLayerView.d.ts → AnnotationFeatureLayerView.d.ts} +6 -6
  306. package/views/layers/FeatureLikeLayerView.d.ts +2 -2
  307. package/views/layers/FeatureLikeLayerView.js +1 -1
  308. package/webdoc/support/writeUtils.js +1 -1
  309. package/webdoc/widgets/FloorFilter.d.ts +14 -1
  310. package/webdoc/widgets/FloorFilter.js +1 -1
  311. package/webscene/support/AlphaCutoff.js +1 -1
  312. package/widgets/AreaMeasurement2D/AreaMeasurement2DTool.js +1 -1
  313. package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.d.ts +12 -4
  314. package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js +1 -1
  315. package/widgets/BatchAttributeForm/ReactiveGraphic.js +1 -1
  316. package/widgets/BatchAttributeForm/ValueChangeTransaction.js +2 -0
  317. package/widgets/BatchAttributeForm/VisibleElements.d.ts +8 -1
  318. package/widgets/BatchAttributeForm/VisibleElements.js +1 -1
  319. package/widgets/BatchAttributeForm/batchAttributeFormUtils.js +1 -1
  320. package/widgets/BatchAttributeForm/css.js +1 -1
  321. package/widgets/BatchAttributeForm/expressions/ExpressionsManager.js +1 -1
  322. package/widgets/BatchAttributeForm/expressions/ExpressionsModel.js +1 -1
  323. package/widgets/BatchAttributeForm/inputs/AttachmentElementInput.d.ts +2 -2
  324. package/widgets/BatchAttributeForm/inputs/AttachmentElementInput.js +1 -1
  325. package/widgets/BatchAttributeForm/inputs/BatchFormInputs.d.ts +3 -0
  326. package/widgets/BatchAttributeForm/inputs/BatchFormInputs.js +1 -1
  327. package/widgets/BatchAttributeForm/inputs/FieldInput.js +1 -1
  328. package/widgets/BatchAttributeForm/inputs/GroupInput.js +1 -1
  329. package/widgets/BatchAttributeForm/inputs/InputBase.js +1 -1
  330. package/widgets/BatchAttributeForm/inputs/RelationshipElementInput.js +1 -1
  331. package/widgets/BatchAttributeForm/inputs/support/inputUtils.js +1 -1
  332. package/widgets/BatchAttributeForm/interfaceUtils.js +1 -1
  333. package/widgets/BatchAttributeForm/stringUtils.js +2 -0
  334. package/widgets/BatchAttributeForm/templates/support/createBatchFormTemplate.js +1 -1
  335. package/widgets/BatchAttributeForm/types.d.ts +49 -7
  336. package/widgets/BatchAttributeForm.js +1 -1
  337. package/widgets/Editor/AddAssociationWorkflow.js +1 -1
  338. package/widgets/Editor/AddAssociationWorkflowData.js +1 -1
  339. package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
  340. package/widgets/Editor/EditorViewModel.d.ts +1 -1
  341. package/widgets/Editor/EditorViewModel.js +1 -1
  342. package/widgets/Editor/MergeFeaturesWorkflow.d.ts +3 -3
  343. package/widgets/Editor/MergeFeaturesWorkflow.js +1 -1
  344. package/widgets/Editor/SplitFeatureWorkflow.d.ts +3 -3
  345. package/widgets/Editor/SplitFeatureWorkflow.js +1 -1
  346. package/widgets/Editor/UpdateFeatureWorkflow.js +1 -1
  347. package/widgets/Editor/UpdateFeaturesWorkflow.js +1 -1
  348. package/widgets/Editor/UpdateRecordWorkflow.js +1 -1
  349. package/widgets/Editor/UpdateRecordWorkflowData.js +1 -1
  350. package/widgets/Editor/UpdateWorkflow.js +1 -1
  351. package/widgets/Editor/components/UpdateFeaturePanelContent.js +1 -1
  352. package/widgets/Editor/support/SketchController.js +1 -1
  353. package/widgets/Editor/workflowUtils.js +1 -1
  354. package/widgets/Editor.js +1 -1
  355. package/widgets/FloorFilter/FloorFilterViewModel.d.ts +10 -0
  356. package/widgets/FloorFilter/FloorFilterViewModel.js +1 -1
  357. package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
  358. package/widgets/Print/PrintViewModel.d.ts +11 -1
  359. package/widgets/Print/PrintViewModel.js +1 -1
  360. package/assets/esri/core/workers/chunks/034a5c55ceeb1f85ccba.js +0 -1
  361. package/assets/esri/core/workers/chunks/160e5b99f1097a473e6b.js +0 -1
  362. package/assets/esri/core/workers/chunks/17e68828ca6ff6912d3e.js +0 -1
  363. package/assets/esri/core/workers/chunks/184d896fe66340129acd.js +0 -1
  364. package/assets/esri/core/workers/chunks/1996f0a930abdd97b855.js +0 -1
  365. package/assets/esri/core/workers/chunks/19dcae83be0fc0aced02.js +0 -1
  366. package/assets/esri/core/workers/chunks/1a95370ddc22729ab3c6.js +0 -1
  367. package/assets/esri/core/workers/chunks/1c16f3db1c98da8730b9.js +0 -1
  368. package/assets/esri/core/workers/chunks/1e340536d3c5f94920b5.js +0 -1
  369. package/assets/esri/core/workers/chunks/24810c36ae09bb4e83dc.js +0 -1
  370. package/assets/esri/core/workers/chunks/274b82cb183ddd0042f3.js +0 -1
  371. package/assets/esri/core/workers/chunks/297ae764445e6f73a5ea.js +0 -1
  372. package/assets/esri/core/workers/chunks/29aba121db7f00e0cf81.js +0 -1
  373. package/assets/esri/core/workers/chunks/2a3145a595d19391bb8a.js +0 -1
  374. package/assets/esri/core/workers/chunks/2b00229c238aae70b948.js +0 -1
  375. package/assets/esri/core/workers/chunks/2b814bb51704a5b4fdc2.js +0 -30
  376. package/assets/esri/core/workers/chunks/30f1909c5ef1835b8507.js +0 -1
  377. package/assets/esri/core/workers/chunks/3172d7fc23787a287191.js +0 -1
  378. package/assets/esri/core/workers/chunks/3297658ccd8d4b9ce733.js +0 -1
  379. package/assets/esri/core/workers/chunks/38ca59db0e8f45bd7811.js +0 -1
  380. package/assets/esri/core/workers/chunks/39596715e84d0da2f803.js +0 -30
  381. package/assets/esri/core/workers/chunks/3c5534c576528c1921d2.js +0 -1
  382. package/assets/esri/core/workers/chunks/41f12eb7c9b7086528d5.js +0 -1
  383. package/assets/esri/core/workers/chunks/426156137f279d979ddd.js +0 -1
  384. package/assets/esri/core/workers/chunks/44e52fe98ffafe6a2807.js +0 -1
  385. package/assets/esri/core/workers/chunks/47f65ffcf23713f0fd5c.js +0 -1
  386. package/assets/esri/core/workers/chunks/4d09ef7c57ab7f9782fe.js +0 -1
  387. package/assets/esri/core/workers/chunks/5022413f5a41b5d435ea.js +0 -1
  388. package/assets/esri/core/workers/chunks/538537f9bc866d9caa75.js +0 -1
  389. package/assets/esri/core/workers/chunks/58a7cdebc3d182c15ec6.js +0 -1
  390. package/assets/esri/core/workers/chunks/59dafa1e1340ea4043e6.js +0 -1
  391. package/assets/esri/core/workers/chunks/5c7aff9604b4576a0e1d.js +0 -1
  392. package/assets/esri/core/workers/chunks/5d3ddbf94539cb4f493e.js +0 -1
  393. package/assets/esri/core/workers/chunks/5eb9fdb076488de9cd83.js +0 -1
  394. package/assets/esri/core/workers/chunks/603177137eb680afe371.js +0 -1
  395. package/assets/esri/core/workers/chunks/629099f05ca5c9ca1973.js +0 -1
  396. package/assets/esri/core/workers/chunks/62f78fa455d556008f6a.js +0 -1
  397. package/assets/esri/core/workers/chunks/65f02eca694cc1c9f5a7.js +0 -1
  398. package/assets/esri/core/workers/chunks/661f7e3f88727dc4801c.js +0 -1
  399. package/assets/esri/core/workers/chunks/686c51fd2144e132783e.js +0 -1
  400. package/assets/esri/core/workers/chunks/6cab67fc7044ee9b863b.js +0 -1
  401. package/assets/esri/core/workers/chunks/6d616b66fb32904b55a1.js +0 -1
  402. package/assets/esri/core/workers/chunks/6d696beddcc5fbed5875.js +0 -1
  403. package/assets/esri/core/workers/chunks/6f0341cfa4c68e6e60b3.js +0 -1
  404. package/assets/esri/core/workers/chunks/6f125b4ed06c0022dee6.js +0 -1
  405. package/assets/esri/core/workers/chunks/6f4825c3ef1fe202ab82.js +0 -1
  406. package/assets/esri/core/workers/chunks/728ad5bbbcbf88d6249f.js +0 -1
  407. package/assets/esri/core/workers/chunks/72d67cc3a382e83bf1a2.js +0 -1
  408. package/assets/esri/core/workers/chunks/7cadb872b9ca96eedca5.js +0 -1
  409. package/assets/esri/core/workers/chunks/7e89cb9ff615742e0894.js +0 -1
  410. package/assets/esri/core/workers/chunks/851705cf276eae8d4d37.js +0 -1
  411. package/assets/esri/core/workers/chunks/882ee7ed8a3a0215f9b9.js +0 -1
  412. package/assets/esri/core/workers/chunks/890b7a1153b7f65eba9a.js +0 -1
  413. package/assets/esri/core/workers/chunks/8c443c52c846a096a250.js +0 -1
  414. package/assets/esri/core/workers/chunks/985fceacd6ec137bd490.js +0 -1
  415. package/assets/esri/core/workers/chunks/9d27cc631bab8aa7479e.js +0 -1
  416. package/assets/esri/core/workers/chunks/9d5f7573bfe3b051daf1.js +0 -1
  417. package/assets/esri/core/workers/chunks/a0c00c6fe60db49b3ab9.js +0 -1
  418. package/assets/esri/core/workers/chunks/a4245bd4e67a428fd835.js +0 -1
  419. package/assets/esri/core/workers/chunks/a643a4751bbf4430bde2.js +0 -262
  420. package/assets/esri/core/workers/chunks/ab62724b80b3c478a597.js +0 -1
  421. package/assets/esri/core/workers/chunks/b002304a45856b024b46.js +0 -1
  422. package/assets/esri/core/workers/chunks/b44cf254585210578eab.js +0 -1
  423. package/assets/esri/core/workers/chunks/b5937ce657c1fff3864f.js +0 -1
  424. package/assets/esri/core/workers/chunks/c2a65de34f6a6c89c652.js +0 -1
  425. package/assets/esri/core/workers/chunks/c3cf9e6e91f71c9cc5f3.js +0 -1
  426. package/assets/esri/core/workers/chunks/c6d0b4875b6b8d6bc25a.js +0 -1
  427. package/assets/esri/core/workers/chunks/c755bfd90c9654170e67.js +0 -1
  428. package/assets/esri/core/workers/chunks/c80fc1b3048e8d58a1f8.js +0 -1
  429. package/assets/esri/core/workers/chunks/c911f0b5bdd43b66b731.js +0 -1
  430. package/assets/esri/core/workers/chunks/cc3e895cff019e811c07.js +0 -1
  431. package/assets/esri/core/workers/chunks/d122431f3b0b88dcb488.js +0 -1
  432. package/assets/esri/core/workers/chunks/d24e027bb8b2c09f25c8.js +0 -1
  433. package/assets/esri/core/workers/chunks/d2df8c328054dc6cb7b7.js +0 -1
  434. package/assets/esri/core/workers/chunks/d41caf20c26f80385265.js +0 -1
  435. package/assets/esri/core/workers/chunks/d468994822f9bc3d6279.js +0 -1
  436. package/assets/esri/core/workers/chunks/d52864823067e57a719a.js +0 -1
  437. package/assets/esri/core/workers/chunks/d5c35a75fd4c41def420.js +0 -1
  438. package/assets/esri/core/workers/chunks/d64613209a9eb1eafb11.js +0 -1
  439. package/assets/esri/core/workers/chunks/d7be278aed1fb37ad5ec.js +0 -1
  440. package/assets/esri/core/workers/chunks/d8ec0afb2b91ccf32e55.js +0 -1
  441. package/assets/esri/core/workers/chunks/da1e8b338ab9fe9e0a8e.js +0 -1
  442. package/assets/esri/core/workers/chunks/dd920a6f6422fa213eba.js +0 -1
  443. package/assets/esri/core/workers/chunks/e1505ec80b068011bdc5.js +0 -1
  444. package/assets/esri/core/workers/chunks/e279bcbe4f10e87bde6c.js +0 -1
  445. package/assets/esri/core/workers/chunks/e2de13810dce01b98520.js +0 -1
  446. package/assets/esri/core/workers/chunks/e33d2ede6c9f1527d51b.js +0 -1
  447. package/assets/esri/core/workers/chunks/e5837e5ac6ef761f26a2.js +0 -1
  448. package/assets/esri/core/workers/chunks/e82488b9b3bb0c1dedb4.js +0 -1
  449. package/assets/esri/core/workers/chunks/e912b515704e20313e53.js +0 -1
  450. package/assets/esri/core/workers/chunks/eabeaab5c4810f999a4d.js +0 -1
  451. package/assets/esri/core/workers/chunks/ec723f8777b935c5e81a.js +0 -1
  452. package/assets/esri/core/workers/chunks/ef46ef4f0ee9f2aeaa4a.js +0 -1
  453. package/assets/esri/core/workers/chunks/f274a8e8c7ca4294e876.js +0 -1
  454. package/assets/esri/core/workers/chunks/f4f642ddd4d5db7cbbb4.js +0 -1
  455. package/assets/esri/core/workers/chunks/f590db684d88e72bd79b.js +0 -1
  456. package/assets/esri/core/workers/chunks/f622ae3887c85535e8ab.js +0 -30
  457. package/assets/esri/core/workers/chunks/f6d047358d14328f3622.js +0 -1
  458. package/assets/esri/core/workers/chunks/f80613cce68dc3df8303.js +0 -2
  459. package/assets/esri/core/workers/chunks/fb6605be0c5e36785543.js +0 -1
  460. package/assets/esri/core/workers/chunks/fd70a25ffdf2cc6c5be2.js +0 -1
  461. package/graphic/AnnotationGraphicOrigin.js +0 -2
  462. package/layers/AnnotationLayer.js +0 -2
  463. package/layers/support/AnnotationSublayer.d.ts +0 -44
  464. package/layers/support/AnnotationSublayer.js +0 -2
  465. package/views/2d/layers/AnnotationLayerView2D.js +0 -2
  466. package/views/3d/webgl-engine/effects/transparency/OITBlendEmissionTechniqueConfiguration.js +0 -2
  467. package/views/3d/webgl-engine/effects/transparency/OITDimOpaqueTechniqueConfiguration.js +0 -2
  468. /package/assets/esri/core/workers/chunks/{5bd7ee40a1c469c24013.js.LICENSE.txt → 86cad656a6a473982109.js.LICENSE.txt} +0 -0
  469. /package/assets/esri/core/workers/chunks/{f80613cce68dc3df8303.js.LICENSE.txt → ac5032253c752768021b.js.LICENSE.txt} +0 -0
  470. /package/views/layers/{AnnotationLayerView.js → AnnotationFeatureLayerView.js} +0 -0
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{isSome as t}from"../../../core/arrayUtils.js";import{getOrCreateMapValue as i}from"../../../core/MapUtils.js";import{property as l,subclass as r}from"../../../core/accessorSupport/decorators.js";import{isMultipleChoiceInput as o}from"../../../form/elements/inputs/inputUtils.js";import n from"../../../layers/support/CodedValue.js";import a from"../../../layers/support/CodedValueDomain.js";import{getDomainRange as s,dateTimeFieldValuesToNumericRange as u,isDomainValidForField as h}from"../../../layers/support/domainUtils.js";import{isNumericField as p,isStringField as c,isTimeOnlyField as m,getFieldRange as d,isDateOnlyField as f,isTimestampOffsetField as C}from"../../../layers/support/fieldUtils.js";import{supportsFieldConfiguration as g}from"../../../layers/support/layerUtils.js";import y from"../../../layers/support/RangeDomain.js";import{isAnyDateField as b}from"../../../smartMapping/support/utils.js";import{isNumber as x}from"../../../support/guards.js";import v from"./EditableInput.js";import{visibilityCodeToBoolean as F,differentValuesString as V,isFieldInputWithShowNoValueOptionInput as O}from"./support/inputUtils.js";import{otherChoiceCheckedPlaceholderValue as M,multipleChoiceOtherChoiceCheckedStateByExpressionsManager as _}from"./support/multipleChoiceInputUtils.js";import{isEmptyValue as E,getMaxLength as S,getMinLength as w,dateIsValid as k,validateFormValue as D}from"../../support/forms/formUtils.js";let N=class extends v{constructor(e){super(e),this.getExternalErrorForFeature=null,this.getFieldValueOptionsForFeature=null,this.group=null,this.type="field",this.userHasChangedValue=!1,this._hasIntersectionWithElementFieldDomain=!1}get compositeError(){if(this.valid)return null;const{errors:e}=this;if(e.length<this.features.length)return"batch-attribute-form-validation::features-have-different-errors";const t=e[0];for(const i of e)if(i.error!==t.error)return"batch-attribute-form-validation::features-have-different-errors";return t.error}get dataType(){const{field:e}=this;return p(e)?"number":c(e)?"text":b(e)||m(e)?"date":"unsupported"}get domain(){const e=this._allDomains.toArray();return this.calculateDomain(e)}get distinctValues(){if(this.featuresHaveSameValue)return[this.value];const e=new Set;for(const t of this.features)e.add(t.getAttribute(this.fieldName));return Array.from(e)}get editable(){return!!this.field.editable&&(this._evaluatedEditableExpression??!0)}get label(){const e=this.template;if(null!=e.label&&""!==e.label)return e.label;const{field:t,layers:i}=this;if(1===i.length){const e=i[0];if(g(e)){const i=e.getFieldAlias(t.name);if(null!=i&&""!==i)return i}}return t.alias||t.name}get effectiveVisible(){return F(this.effectiveVisibilityCode)}get effectiveVisibilityCode(){const{visibilityCode:e}=this;if("visible"!==e)return e;const{group:t}=this;if(null==t)return e;const i=t.visibilityCode;return"hidden:visibility-expression:all-features"===i?"hidden:group-visibility-expression:all-features":"hidden:visibility-expression:some-features"===i?"hidden:group-visibility-expression:some-features":e}get errors(){return this._validate()}get featuresHaveSameValue(){const{fieldName:e}=this,t=this.features.at(0)?.getAttribute(e);return this.features.every(i=>i.getAttribute(e)===t)}get field(){return this.template.field}get fieldName(){return this.field.name}get input(){return this.template.input}get multipleChoiceInput(){const{input:e}=this;return e&&o(e)?e:null}get multipleChoiceChoices(){const{multipleChoiceInput:e}=this;if(!e)return null;const t=new Map;for(const i of e.choices)t.has(i.value)||t.set(i.value,i);return Array.from(t.values())}get multipleChoiceValues(){return this.multipleChoiceChoices?.map(e=>e.value)??null}get multipleChoiceOtherChoiceFieldName(){return this.multipleChoiceInput?.otherChoice?.fieldName??null}get multipleChoiceOtherChoiceHint(){return this.multipleChoiceInput?.otherChoice?.hint??""}get multipleChoiceOtherChoiceLabel(){return this.multipleChoiceInput?.otherChoice?.label??null}get hasMultipleChoiceOtherChoiceField(){const{multipleChoiceOtherChoiceFieldName:e}=this;return!!e&&this.layers.every(t=>null!=t.getField(e))}get shouldShowMultipleChoiceOtherChoice(){return null!=this.multipleChoiceInput?.otherChoice&&this.hasMultipleChoiceOtherChoiceField}set shouldShowMultipleChoiceOtherChoice(e){this._overrideIfSome("shouldShowMultipleChoiceOtherChoice",e)}get multipleChoiceOtherChoiceValue(){const{multipleChoiceOtherChoiceFieldName:e}=this;if(!e||!this.shouldShowMultipleChoiceOtherChoice)return null;const t=this.features.map(t=>t.getAttribute(e));if(0===t.length)return null;const[i]=t;return t.every(e=>e===i)?i:V}get multipleChoiceOtherChoiceMaxLength(){const{multipleChoiceOtherChoiceFieldName:e}=this;if(!e||!this.shouldShowMultipleChoiceOtherChoice)return;let t;for(const i of this.layers){const l=i.getField(e)?.length;null==l||l<0||(t=null==t?l:Math.min(t,l))}return t}getMultipleChoiceOtherChoiceRenderState(e){const t=this.multipleChoiceOtherChoiceFieldName??void 0,i=this.shouldShowMultipleChoiceOtherChoice,l=this.multipleChoiceOtherChoiceValue,r=i?this.multipleChoiceOtherChoiceCheckboxState:{checked:!1,indeterminate:!1},o=i?this.getExplicitMultipleChoiceOtherChoiceCheckedState():void 0,n=void 0===o?r:{checked:o,indeterminate:!1};return{fieldName:t,hint:this.multipleChoiceOtherChoiceHint,label:this.multipleChoiceOtherChoiceLabel??e,shouldShow:i,checkboxState:n,value:l,normalizedValue:l===M?"":l,maxLength:this.multipleChoiceOtherChoiceMaxLength}}get multipleChoiceOtherChoiceCheckboxState(){const e=this.multipleChoiceOtherChoiceFieldName;if(!e)return{checked:!1,indeterminate:!1};const t=this.features.map(t=>t.getAttribute(e));return{checked:t.length>0&&t.every(e=>!E(e)),indeterminate:t.some(e=>!E(e))&&t.some(e=>E(e))}}initializeExplicitMultipleChoiceOtherChoiceCheckedState(){this.hasExplicitMultipleChoiceOtherChoiceCheckedState()||this.setExplicitMultipleChoiceOtherChoiceCheckedState(this.multipleChoiceOtherChoiceCheckboxState.checked)}hasExplicitMultipleChoiceOtherChoiceCheckedState(){return void 0!==this.getExplicitMultipleChoiceOtherChoiceCheckedState()}getExplicitMultipleChoiceOtherChoiceCheckedState(){const e=this._multipleChoiceOtherChoiceCheckedStateKey;if(e)return this._multipleChoiceOtherChoiceCheckedStateStore.get(e)}setExplicitMultipleChoiceOtherChoiceCheckedState(e){const t=this._multipleChoiceOtherChoiceCheckedStateKey;t&&this._multipleChoiceOtherChoiceCheckedStateStore.set(t,e)}stashMultipleChoiceOtherChoiceDraftValueForFeatures(e,t){const i=this.multipleChoiceOtherChoiceFieldName;if(i)for(const l of e)l.stashAttribute(i,t)}setMultipleChoiceOtherChoiceDraftValuesFromFeatures(e){const t=this.multipleChoiceOtherChoiceFieldName;if(t)for(const i of e)i.stashAttribute(t,i.getAttribute(t))}getMultipleChoiceOtherChoiceDraftValue(e){const t=this.multipleChoiceOtherChoiceFieldName;if(t)return e.getStashedAttribute(t)}get invalidFeatures(){return this.errors.map(e=>e.feature)}get _multipleChoiceOtherChoiceCheckedStateKey(){return null!=this.multipleChoiceOtherChoiceFieldName?this.template.elementId:null}get _multipleChoiceOtherChoiceCheckedStateStore(){const e=this.expressionsManager;return e?i(_,e,()=>new Map):new Map}get isSubtypeField(){return this.layers.some(e=>{if(e&&"subtypeField"in e){const{subtypeField:t,fieldsIndex:i}=e;return(i.get(t)?.name??t)===this.fieldName}return!1})}get showNoValueOptionEnabled(){const{input:e}=this;return!this.required&&(!O(e)||!0===e?.showNoValueOption)}get showNoValueLabel(){const{input:e}=this;return O(e)?e?.noValueOptionLabel:null}get includeTime(){const{template:e,field:t}=this;return"date"===this.dataType&&("time-only"===t.type||"date-only"!==t.type&&("datetime-picker"!==e.input?.type||e.input.includeTime))}get includeTimeOffset(){if("timestamp-offset"!==this.field.type)return!1;const{input:e}=this;return!e||"timestampoffset-picker"===e.type&&e.includeTimeOffset}get maxLength(){return S({dataType:this.dataType,field:this.field,input:this.input})}get minLength(){return w({dataType:this.dataType,field:this.field,input:this.input})}get range(){if("date"===this.dataType)return this._dateRange;const{domain:e,field:t}=this;if(e){const i=s(t,e);return{max:i?.max,min:i?.min}}const i=this._allDomains.toArray().every(e=>!e)?d(t):null;return{max:i?.max===Number.MAX_VALUE?null:i?.max??null,min:i?.min===-Number.MAX_VALUE?null:i?.min??null}}get required(){if(!this.editable)return!1;if(!this.field.nullable||this.isSubtypeField)return!0;const e=this.visible&&!1!==this.group?.visible,t=this._evaluatedRequiredExpression;return!(!e||null==t)&&t}get submittable(){return(!this.required||!this.distinctValues.some(e=>E(e)))&&!!this.valid}get valid(){return 0===this.errors.length}get value(){return this.featuresHaveSameValue?this.features.at(0)?.getAttribute(this.fieldName)??null:V}get visibilityCode(){return this.field.visible?this._fieldShouldHaveDomain&&null==this.domain?"hidden:no-domain-in-common":this._baseVisibilityCode:"hidden:field-definition"}get codedValueDomainOptions(){return"coded-value"===this.domain?.type?this.domain.codedValues.map(({name:e,code:t})=>({name:e,value:t})):[]}get codedValueOptions(){const{getFieldValueOptionsForFeature:e}=this;if(1===this.features.length&&e){const t=this.features.at(0);return e({domain:this.domain??void 0,feature:t,fieldName:this.fieldName,layer:t.layer})}const t=this.codedValueDomainOptions,{value:i}=this,l=null==i||i===V||t.some(e=>e.value===i)?[]:[{name:`${i}`,value:i}];return{recommended:t,other:[],unsupported:l,containsEmptyOption:!1}}get _evaluatedRequiredExpression(){let e=!1,t=!0;const i=this.template;for(const l of this.features){if(null==i.getExpressionExecutorsForLayer(l.layer)?.requiredExpression)continue;t=!1;const r=this._lookupEvaluatedExpression(l,"required");"success"===r?.status?e=e||!0===r.result:e=!0}return t?null:e}get _allDomains(){const e=this.template.domain;return this.features.map(t=>{const i=t.layer.getFieldDomain(this.fieldName,{feature:t.plainGraphic});return"range"===i?.type||"range"===e?.type?i??this.template.domain:i})}get _fieldShouldHaveDomain(){return!!this._hasIntersectionWithElementFieldDomain||this._allDomains.some(t)}get _dateFormRange(){if("date"!==this.dataType)return{};const{input:e}=this;if(!e)return{};const{type:t}=e;let i={};if("date-picker"!==t&&"time-picker"!==t&&"timestampoffset-picker"!==t||(i=u(this.field,e.max,e.min)),"datetime-picker"===t){const{max:t,min:l}=e;i={max:null!=t&&k(t)?t.getTime():null,min:null!=l&&k(l)?l.getTime():null}}return{min:i.min,max:i.max,rawMax:i?.rawMax??null,rawMin:i?.rawMin??null}}get _dateRange(){const{_dateFormRange:e,template:t,field:i,domain:l}=this;if("date"!==this.dataType)return{};if(!l)return this._fieldShouldHaveDomain?{}:e;const r=s(i,l);if(!r)return e;const{max:o,min:n,rawMax:a,rawMin:u}=e,{type:h}=t.field;if("date"===h){const{max:e,min:t}=r;return{max:x(o)&&(null===e||null!=e&&o<=e)?o:e??null,min:x(n)&&(null===t||null!=t&&n>=t)?n:t??null}}if("date-only"===h||"time-only"===h||"timestamp-offset"===h){const{max:e,min:t,rawMax:i,rawMin:l}=r,s=x(o)&&a&&(null==e||o<e),h=x(n)&&u&&(null==t||n>t);return{max:s?o:e,min:h?n:t,rawMax:s?a:i,rawMin:h?u:l}}return{}}_validate(){const{dataType:e,fieldName:t,maxLength:i,minLength:l,range:r}=this,o=[],{multipleChoiceInput:n}=this;for(const a of this.features){const{layer:s}=a,u=s.getField(t)??this.field,h=s.getFieldDomain(t,{feature:a.plainGraphic}),p=this.calculateDomain([h]),c=this._requiredForFeature(a),m=a.getAttribute(t),d=D(m,{dataType:e,domain:p,field:u,maxLength:i,minLength:l,multipleChoice:n,range:r,required:c})??this.getExternalErrorForFeature?.(a,t);d&&o.push({error:d,feature:a.source})}return o}_editableForFeature(e){if(!this.field.editable)return!1;if(null==this.template.getExpressionExecutorsForLayer(e.layer)?.editableExpression)return!0;const t=this._lookupEvaluatedExpression(e,"editable");return"success"===t?.status&&!0===t.result}_effectiveVisibleFeature(e){if(this.group&&!this.group.visibleForFeature(e))return!1;if(null==this.template.getExpressionExecutorsForLayer(e.layer)?.visibilityExpression)return!0;const t=this._lookupEvaluatedExpression(e,"visibility");return"success"===t?.status&&!0===t.result}_requiredForFeature(e){if(!this._editableForFeature(e))return!1;if(!this.field.nullable||this.isSubtypeField)return!0;const t=this._effectiveVisibleFeature(e);if(null==this.template.getExpressionExecutorsForLayer(e.layer)?.requiredExpression)return!1;const i=this._lookupEvaluatedExpression(e,"required");return"success"!==i?.status?t:t&&!0===i.result}calculateDomain(e){const t=e.find(e=>null!=e),i=this.template.domain;if(!t)return i&&h(this.field,i)?i:null;switch(t.type){case"coded-value":if(e.some(e=>!e)){if(!i)return null;e=e.filter(e=>null!==e)}break;case"range":e=e.filter(e=>null!==e)}if(!e.every(e=>e?.type===t?.type))return null;let l=null;switch(t?.type){case"range":l=this._intersectRangeDomains(e);break;case"coded-value":l=this._intersectCodedValueDomains(e)}return l}_intersectCodedValueDomains(e){if(!e.length)return null;const t=new Map(e[0].codedValues.map(({code:e,name:t})=>[e,t])),i=this.template.domain?new Map(this.template.domain.codedValues.map(({code:e,name:t})=>[e,t])):null;for(const o of e)for(const[e,i]of t){o.codedValues.some(t=>t.code===e&&t.name===i)||t.delete(e)}let l=t;if(i){l=new Map;for(const[e,r]of i)t.has(e)&&l.set(e,r)}const r=Array.from(l.entries()).map(([e,t])=>new n({code:e,name:t}));return r.length?new a({codedValues:r}):null}_intersectRangeDomains(e){if(!e.length)return null;let t=e[0];for(let l=1;l<e.length;l++){if(!t)return null;t=this._findMinMaxValuesBetweenTwoDomains(t,e[l])}if(t&&!h(this.field,t))return null;const{domain:i}=this.template;if(t&&i&&i instanceof y){const e=this._findMinMaxValuesBetweenTwoDomains(t,i);return this._hasIntersectionWithElementFieldDomain=!!e,e}return t}_getMinMaxFromRangeDomain(e){const t=e.minValue,i=e.maxValue,{field:l}=this;return f(l)||m(l)||C(l)?u(l,i,t):{min:null!=t&&"number"==typeof t?t:null,max:null!=i&&"number"==typeof i?i:null}}_findMinMaxValuesBetweenTwoDomains(e,t){const i=new y,l=this._getMinMaxFromRangeDomain(e),r=this._getMinMaxFromRangeDomain(t),{field:o}=this,n=this._getValidRangeValue(l.min,-1/0),a=this._getValidRangeValue(l.max,1/0),s=this._getValidRangeValue(r.min,-1/0),u=this._getValidRangeValue(r.max,1/0);return i.minValue=Math.max(n,s),i.maxValue=Math.min(a,u),i.minValue===-1/0||i.maxValue===1/0||i.minValue>i.maxValue?null:((f(o)||m(o)||C(o))&&(i.minValue=Number(l.min)>Number(r.min)?l.rawMin:r.rawMin,i.maxValue=Number(l.max)<Number(r.max)?l.rawMax:r.rawMax),i.name="intersection",i)}_getValidRangeValue(e,t){return x(e)?e:t}};e([l()],N.prototype,"dataType",null),e([l()],N.prototype,"domain",null),e([l()],N.prototype,"distinctValues",null),e([l()],N.prototype,"editable",null),e([l()],N.prototype,"label",null),e([l()],N.prototype,"effectiveVisible",null),e([l()],N.prototype,"effectiveVisibilityCode",null),e([l()],N.prototype,"errors",null),e([l()],N.prototype,"featuresHaveSameValue",null),e([l()],N.prototype,"field",null),e([l()],N.prototype,"fieldName",null),e([l()],N.prototype,"getExternalErrorForFeature",void 0),e([l()],N.prototype,"getFieldValueOptionsForFeature",void 0),e([l()],N.prototype,"group",void 0),e([l()],N.prototype,"input",null),e([l()],N.prototype,"multipleChoiceInput",null),e([l()],N.prototype,"multipleChoiceChoices",null),e([l()],N.prototype,"multipleChoiceValues",null),e([l()],N.prototype,"multipleChoiceOtherChoiceFieldName",null),e([l()],N.prototype,"multipleChoiceOtherChoiceHint",null),e([l()],N.prototype,"multipleChoiceOtherChoiceLabel",null),e([l()],N.prototype,"hasMultipleChoiceOtherChoiceField",null),e([l()],N.prototype,"shouldShowMultipleChoiceOtherChoice",null),e([l()],N.prototype,"multipleChoiceOtherChoiceValue",null),e([l()],N.prototype,"multipleChoiceOtherChoiceMaxLength",null),e([l()],N.prototype,"multipleChoiceOtherChoiceCheckboxState",null),e([l()],N.prototype,"invalidFeatures",null),e([l()],N.prototype,"_multipleChoiceOtherChoiceCheckedStateStore",null),e([l()],N.prototype,"isSubtypeField",null),e([l()],N.prototype,"showNoValueOptionEnabled",null),e([l()],N.prototype,"showNoValueLabel",null),e([l()],N.prototype,"includeTime",null),e([l()],N.prototype,"includeTimeOffset",null),e([l()],N.prototype,"maxLength",null),e([l()],N.prototype,"minLength",null),e([l()],N.prototype,"range",null),e([l()],N.prototype,"required",null),e([l()],N.prototype,"submittable",null),e([l({readOnly:!0})],N.prototype,"type",void 0),e([l()],N.prototype,"userHasChangedValue",void 0),e([l()],N.prototype,"valid",null),e([l()],N.prototype,"value",null),e([l()],N.prototype,"visibilityCode",null),e([l()],N.prototype,"codedValueDomainOptions",null),e([l()],N.prototype,"codedValueOptions",null),e([l()],N.prototype,"_evaluatedRequiredExpression",null),e([l()],N.prototype,"_hasIntersectionWithElementFieldDomain",void 0),e([l()],N.prototype,"_allDomains",null),e([l()],N.prototype,"_fieldShouldHaveDomain",null),e([l()],N.prototype,"_dateFormRange",null),e([l()],N.prototype,"_dateRange",null),N=e([r("esri.widgets.BatchAttributeForm.inputs.FieldInput")],N);const L=N;export{L as default};
2
+ import{__decorate as e}from"tslib";import{isSome as t}from"../../../core/arrayUtils.js";import{getOrCreateMapValue as i}from"../../../core/MapUtils.js";import{property as l,subclass as r}from"../../../core/accessorSupport/decorators.js";import{isMultipleChoiceInput as o}from"../../../form/elements/inputs/inputUtils.js";import n from"../../../layers/support/CodedValue.js";import a from"../../../layers/support/CodedValueDomain.js";import{getDomainRange as s,dateTimeFieldValuesToNumericRange as u,isDomainValidForField as h}from"../../../layers/support/domainUtils.js";import{isNumericField as p,isStringField as c,isTimeOnlyField as m,getFieldRange as d,isDateOnlyField as f,isTimestampOffsetField as C}from"../../../layers/support/fieldUtils.js";import{supportsFieldConfiguration as g}from"../../../layers/support/layerUtils.js";import y from"../../../layers/support/RangeDomain.js";import{isAnyDateField as x}from"../../../smartMapping/support/utils.js";import{isNumber as b}from"../../../support/guards.js";import v from"./EditableInput.js";import{visibilityCodeToBoolean as F,differentValuesString as O,isFieldInputWithShowNoValueOptionInput as V}from"./support/inputUtils.js";import{otherChoiceCheckedPlaceholderValue as M,multipleChoiceOtherChoiceCheckedStateByExpressionsManager as _}from"./support/multipleChoiceInputUtils.js";import{isEmptyValue as E,getMaxLength as S,getMinLength as w,dateIsValid as k,validateFormValue as D}from"../../support/forms/formUtils.js";let N=class extends v{constructor(e){super(e),this.getExternalErrorForFeature=null,this.getFieldValueOptionsForFeature=null,this.group=null,this.type="field",this.userHasChangedValue=!1,this._hasIntersectionWithElementFieldDomain=!1}get compositeError(){if(this.valid)return null;const{errors:e}=this;if(e.length<this.features.length)return"batch-attribute-form-validation::features-have-different-errors";const t=e[0];for(const i of e)if(i.error!==t.error)return"batch-attribute-form-validation::features-have-different-errors";return t.error}get dataType(){const{field:e}=this;return p(e)?"number":c(e)?"text":x(e)||m(e)?"date":"unsupported"}get domain(){const e=this._allDomains.toArray();return this.calculateDomain(e)}get distinctValues(){if(this.featuresHaveSameValue)return[this.value];const e=new Set;for(const t of this.features)e.add(t.getAttribute(this.fieldName));return Array.from(e)}get editable(){return!!this.field.editable&&(this._evaluatedEditableExpression??!0)}get label(){const e=this.template;if(null!=e.label&&""!==e.label)return e.label;const{field:t,layers:i}=this;if(1===i.length){const e=i[0];if(g(e)){const i=e.getFieldAlias(t.name);if(null!=i&&""!==i)return i}}return t.alias||t.name}get effectiveVisible(){return F(this.effectiveVisibilityCode)}get effectiveVisibilityCode(){const{visibilityCode:e}=this;if("visible"!==e)return e;const{group:t}=this;if(null==t)return e;const i=t.visibilityCode;return"hidden:visibility-expression:all-features"===i?"hidden:group-visibility-expression:all-features":"hidden:visibility-expression:some-features"===i?"hidden:group-visibility-expression:some-features":e}get errors(){return this._validate()}get featuresHaveSameValue(){const{fieldName:e}=this,t=this.features.at(0)?.getAttribute(e);return this.features.every(i=>i.getAttribute(e)===t)}get field(){return this.template.field}get fieldName(){return this.field.name}get input(){return this.template.input}get multipleChoiceInput(){const{input:e}=this;return e&&o(e)?e:null}get multipleChoiceChoices(){const{multipleChoiceInput:e}=this;if(!e)return null;const t=new Map;for(const i of e.choices)t.has(i.value)||t.set(i.value,i);return Array.from(t.values())}get multipleChoiceValues(){return this.multipleChoiceChoices?.map(e=>e.value)??null}get multipleChoiceOtherChoiceFieldName(){return this.multipleChoiceInput?.otherChoice?.fieldName??null}get multipleChoiceOtherChoiceHint(){return this.multipleChoiceInput?.otherChoice?.hint??""}get multipleChoiceOtherChoiceLabel(){return this.multipleChoiceInput?.otherChoice?.label??null}get hasMultipleChoiceOtherChoiceField(){const{multipleChoiceOtherChoiceFieldName:e}=this;return!!e&&this.layers.every(t=>null!=t.getField(e))}get shouldShowMultipleChoiceOtherChoice(){return null!=this.multipleChoiceInput?.otherChoice&&this.hasMultipleChoiceOtherChoiceField}set shouldShowMultipleChoiceOtherChoice(e){this._overrideIfSome("shouldShowMultipleChoiceOtherChoice",e)}get multipleChoiceOtherChoiceValue(){const{multipleChoiceOtherChoiceFieldName:e}=this;if(!e||!this.shouldShowMultipleChoiceOtherChoice)return null;const t=this.features.map(t=>t.getAttribute(e));if(0===t.length)return null;const[i]=t;return t.every(e=>e===i)?i:O}get multipleChoiceOtherChoiceMaxLength(){const{multipleChoiceOtherChoiceFieldName:e}=this;if(!e||!this.shouldShowMultipleChoiceOtherChoice)return;let t;for(const i of this.layers){const l=i.getField(e)?.length;null==l||l<0||(t=null==t?l:Math.min(t,l))}return t}getMultipleChoiceOtherChoiceRenderState(e){const t=this.multipleChoiceOtherChoiceFieldName??void 0,i=this.shouldShowMultipleChoiceOtherChoice,l=this.multipleChoiceOtherChoiceValue,r=i?this.multipleChoiceOtherChoiceCheckboxState:{checked:!1,indeterminate:!1},o=i?this.getExplicitMultipleChoiceOtherChoiceCheckedState():void 0,n=void 0===o?r:{checked:o,indeterminate:!1};return{fieldName:t,hint:this.multipleChoiceOtherChoiceHint,label:this.multipleChoiceOtherChoiceLabel??e,shouldShow:i,checkboxState:n,value:l,normalizedValue:l===M?"":l,maxLength:this.multipleChoiceOtherChoiceMaxLength}}get multipleChoiceOtherChoiceCheckboxState(){const e=this.multipleChoiceOtherChoiceFieldName;if(!e)return{checked:!1,indeterminate:!1};const t=this.features.map(t=>t.getAttribute(e));return{checked:t.length>0&&t.every(e=>!E(e)),indeterminate:t.some(e=>!E(e))&&t.some(e=>E(e))}}initializeExplicitMultipleChoiceOtherChoiceCheckedState(){this.hasExplicitMultipleChoiceOtherChoiceCheckedState()||this.setExplicitMultipleChoiceOtherChoiceCheckedState(this.multipleChoiceOtherChoiceCheckboxState.checked)}hasExplicitMultipleChoiceOtherChoiceCheckedState(){return void 0!==this.getExplicitMultipleChoiceOtherChoiceCheckedState()}getExplicitMultipleChoiceOtherChoiceCheckedState(){const e=this._multipleChoiceOtherChoiceCheckedStateKey;if(e)return this._multipleChoiceOtherChoiceCheckedStateStore.get(e)}setExplicitMultipleChoiceOtherChoiceCheckedState(e){const t=this._multipleChoiceOtherChoiceCheckedStateKey;t&&this._multipleChoiceOtherChoiceCheckedStateStore.set(t,e)}stashMultipleChoiceOtherChoiceDraftValueForFeatures(e,t){const i=this.multipleChoiceOtherChoiceFieldName;if(i)for(const l of e)l.stashAttribute(i,t)}setMultipleChoiceOtherChoiceDraftValuesFromFeatures(e){const t=this.multipleChoiceOtherChoiceFieldName;if(t)for(const i of e)i.stashAttribute(t,i.getAttribute(t))}getMultipleChoiceOtherChoiceDraftValue(e){const t=this.multipleChoiceOtherChoiceFieldName;if(t)return e.getStashedAttribute(t)}get invalidFeatures(){return this.errors.map(e=>e.feature)}get _multipleChoiceOtherChoiceCheckedStateKey(){return null!=this.multipleChoiceOtherChoiceFieldName?this.template.elementId:null}get _multipleChoiceOtherChoiceCheckedStateStore(){const e=this.expressionsManager;return e?i(_,e,()=>new Map):new Map}get isSubtypeField(){return this.layers.some(e=>{if(e&&"subtypeField"in e){const{subtypeField:t,fieldsIndex:i}=e;return(i.get(t)?.name??t)===this.fieldName}return!1})}get showNoValueOptionEnabled(){const{input:e}=this;return!this.required&&(!V(e)||!0===e?.showNoValueOption)}get showNoValueLabel(){const{input:e}=this;return V(e)?e?.noValueOptionLabel:null}get includeTime(){const{template:e,field:t}=this;return"date"===this.dataType&&("time-only"===t.type||"date-only"!==t.type&&("datetime-picker"!==e.input?.type||e.input.includeTime))}get includeTimeOffset(){if("timestamp-offset"!==this.field.type)return!1;const{input:e}=this;return!e||"timestampoffset-picker"===e.type&&e.includeTimeOffset}get inputType(){return this.input?.type}get maxLength(){return S({dataType:this.dataType,field:this.field,input:this.input})}get minLength(){return w({dataType:this.dataType,field:this.field,input:this.input})}get range(){if("date"===this.dataType)return this._dateRange;const{domain:e,field:t}=this;if(e){const i=s(t,e);return{max:i?.max,min:i?.min}}const i=this._allDomains.toArray().every(e=>!e)?d(t):null;return{max:i?.max===Number.MAX_VALUE?null:i?.max??null,min:i?.min===-Number.MAX_VALUE?null:i?.min??null}}get required(){if(!this.editable)return!1;if(!this.field.nullable||this.isSubtypeField)return!0;const e=this.visible&&!1!==this.group?.visible,t=this._evaluatedRequiredExpression;return!(!e||null==t)&&t}get valid(){return 0===this.errors.length}get value(){return this.featuresHaveSameValue?this.features.at(0)?.getAttribute(this.fieldName)??null:O}get visibilityCode(){return this.field.visible?this._fieldShouldHaveDomain&&null==this.domain?"hidden:no-domain-in-common":this._baseVisibilityCode:"hidden:field-definition"}get codedValueDomainOptions(){return"coded-value"===this.domain?.type?this.domain.codedValues.map(({name:e,code:t})=>({name:e,value:t})):[]}get codedValueOptions(){const{getFieldValueOptionsForFeature:e}=this;if(1===this.features.length&&e){const t=this.features.at(0);return e({domain:this.domain??void 0,feature:t,fieldName:this.fieldName,layer:t.layer})}const t=this.codedValueDomainOptions,{value:i}=this,l=null==i||i===O||t.some(e=>e.value===i)?[]:[{name:`${i}`,value:i}];return{recommended:t,other:[],unsupported:l,containsEmptyOption:!1}}get _evaluatedRequiredExpression(){let e=!1,t=!0;const i=this.template;for(const l of this.features){if(null==i.getExpressionExecutorsForLayer(l.layer)?.requiredExpression)continue;t=!1;const r=this._lookupEvaluatedExpression(l,"required");"success"===r?.status?e=e||!0===r.result:e=!0}return t?null:e}get _allDomains(){const e=this.template.domain;return this.features.map(t=>{const i=t.layer.getFieldDomain(this.fieldName,{feature:t.plainGraphic});return"range"===i?.type||"range"===e?.type?i??this.template.domain:i})}get _fieldShouldHaveDomain(){return!!this._hasIntersectionWithElementFieldDomain||this._allDomains.some(t)}get _dateFormRange(){if("date"!==this.dataType)return{};const{input:e}=this;if(!e)return{};const{type:t}=e;let i={};if("date-picker"!==t&&"time-picker"!==t&&"timestampoffset-picker"!==t||(i=u(this.field,e.max,e.min)),"datetime-picker"===t){const{max:t,min:l}=e;i={max:null!=t&&k(t)?t.getTime():null,min:null!=l&&k(l)?l.getTime():null}}return{min:i.min,max:i.max,rawMax:i?.rawMax??null,rawMin:i?.rawMin??null}}get _dateRange(){const{_dateFormRange:e,template:t,field:i,domain:l}=this;if("date"!==this.dataType)return{};if(!l)return this._fieldShouldHaveDomain?{}:e;const r=s(i,l);if(!r)return e;const{max:o,min:n,rawMax:a,rawMin:u}=e,{type:h}=t.field;if("date"===h){const{max:e,min:t}=r;return{max:b(o)&&(null===e||null!=e&&o<=e)?o:e??null,min:b(n)&&(null===t||null!=t&&n>=t)?n:t??null}}if("date-only"===h||"time-only"===h||"timestamp-offset"===h){const{max:e,min:t,rawMax:i,rawMin:l}=r,s=b(o)&&a&&(null==e||o<e),h=b(n)&&u&&(null==t||n>t);return{max:s?o:e,min:h?n:t,rawMax:s?a:i,rawMin:h?u:l}}return{}}_validate(){const{dataType:e,fieldName:t,maxLength:i,minLength:l,range:r}=this,o=[],{multipleChoiceInput:n}=this;for(const a of this.features){const{layer:s}=a,u=s.getField(t)??this.field,h=s.getFieldDomain(t,{feature:a.plainGraphic}),p=this.calculateDomain([h]),c=this._requiredForFeature(a),m=a.getAttribute(t),d=D(m,{dataType:e,domain:p,field:u,maxLength:i,minLength:l,multipleChoice:n,range:r,required:c})??this.getExternalErrorForFeature?.(a,t);d&&o.push({error:d,feature:a.source})}return o}_editableForFeature(e){if(!this.field.editable)return!1;if(null==this.template.getExpressionExecutorsForLayer(e.layer)?.editableExpression)return!0;const t=this._lookupEvaluatedExpression(e,"editable");return"success"===t?.status&&!0===t.result}_effectiveVisibleFeature(e){if(this.group&&!this.group.visibleForFeature(e))return!1;if(null==this.template.getExpressionExecutorsForLayer(e.layer)?.visibilityExpression)return!0;const t=this._lookupEvaluatedExpression(e,"visibility");return"success"===t?.status&&!0===t.result}_requiredForFeature(e){if(!this._editableForFeature(e))return!1;if(!this.field.nullable||this.isSubtypeField)return!0;const t=this._effectiveVisibleFeature(e);if(null==this.template.getExpressionExecutorsForLayer(e.layer)?.requiredExpression)return!1;const i=this._lookupEvaluatedExpression(e,"required");return"success"!==i?.status?t:t&&!0===i.result}calculateDomain(e){const t=e.find(e=>null!=e),i=this.template.domain;if(!t)return i&&h(this.field,i)?i:null;switch(t.type){case"coded-value":if(e.some(e=>!e)){if(!i)return null;e=e.filter(e=>null!==e)}break;case"range":e=e.filter(e=>null!==e)}if(!e.every(e=>e?.type===t?.type))return null;let l=null;switch(t?.type){case"range":l=this._intersectRangeDomains(e);break;case"coded-value":l=this._intersectCodedValueDomains(e)}return l}_intersectCodedValueDomains(e){if(!e.length)return null;const t=new Map(e[0].codedValues.map(({code:e,name:t})=>[e,t])),i=this.template.domain?new Map(this.template.domain.codedValues.map(({code:e,name:t})=>[e,t])):null;for(const o of e)for(const[e,i]of t){o.codedValues.some(t=>t.code===e&&t.name===i)||t.delete(e)}let l=t;if(i){l=new Map;for(const[e,r]of i)t.has(e)&&l.set(e,r)}const r=Array.from(l.entries()).map(([e,t])=>new n({code:e,name:t}));return r.length?new a({codedValues:r}):null}_intersectRangeDomains(e){if(!e.length)return null;let t=e[0];for(let l=1;l<e.length;l++){if(!t)return null;t=this._findMinMaxValuesBetweenTwoDomains(t,e[l])}if(t&&!h(this.field,t))return null;const{domain:i}=this.template;if(t&&i&&i instanceof y){const e=this._findMinMaxValuesBetweenTwoDomains(t,i);return this._hasIntersectionWithElementFieldDomain=!!e,e}return t}_getMinMaxFromRangeDomain(e){const t=e.minValue,i=e.maxValue,{field:l}=this;return f(l)||m(l)||C(l)?u(l,i,t):{min:null!=t&&"number"==typeof t?t:null,max:null!=i&&"number"==typeof i?i:null}}_findMinMaxValuesBetweenTwoDomains(e,t){const i=new y,l=this._getMinMaxFromRangeDomain(e),r=this._getMinMaxFromRangeDomain(t),{field:o}=this,n=this._getValidRangeValue(l.min,-1/0),a=this._getValidRangeValue(l.max,1/0),s=this._getValidRangeValue(r.min,-1/0),u=this._getValidRangeValue(r.max,1/0);return i.minValue=Math.max(n,s),i.maxValue=Math.min(a,u),i.minValue===-1/0||i.maxValue===1/0||i.minValue>i.maxValue?null:((f(o)||m(o)||C(o))&&(i.minValue=Number(l.min)>Number(r.min)?l.rawMin:r.rawMin,i.maxValue=Number(l.max)<Number(r.max)?l.rawMax:r.rawMax),i.name="intersection",i)}_getValidRangeValue(e,t){return b(e)?e:t}};e([l()],N.prototype,"dataType",null),e([l()],N.prototype,"domain",null),e([l()],N.prototype,"distinctValues",null),e([l()],N.prototype,"editable",null),e([l()],N.prototype,"label",null),e([l()],N.prototype,"effectiveVisible",null),e([l()],N.prototype,"effectiveVisibilityCode",null),e([l()],N.prototype,"errors",null),e([l()],N.prototype,"featuresHaveSameValue",null),e([l()],N.prototype,"field",null),e([l()],N.prototype,"fieldName",null),e([l()],N.prototype,"getExternalErrorForFeature",void 0),e([l()],N.prototype,"getFieldValueOptionsForFeature",void 0),e([l()],N.prototype,"group",void 0),e([l()],N.prototype,"input",null),e([l()],N.prototype,"multipleChoiceInput",null),e([l()],N.prototype,"multipleChoiceChoices",null),e([l()],N.prototype,"multipleChoiceValues",null),e([l()],N.prototype,"multipleChoiceOtherChoiceFieldName",null),e([l()],N.prototype,"multipleChoiceOtherChoiceHint",null),e([l()],N.prototype,"multipleChoiceOtherChoiceLabel",null),e([l()],N.prototype,"hasMultipleChoiceOtherChoiceField",null),e([l()],N.prototype,"shouldShowMultipleChoiceOtherChoice",null),e([l()],N.prototype,"multipleChoiceOtherChoiceValue",null),e([l()],N.prototype,"multipleChoiceOtherChoiceMaxLength",null),e([l()],N.prototype,"multipleChoiceOtherChoiceCheckboxState",null),e([l()],N.prototype,"invalidFeatures",null),e([l()],N.prototype,"_multipleChoiceOtherChoiceCheckedStateStore",null),e([l()],N.prototype,"isSubtypeField",null),e([l()],N.prototype,"showNoValueOptionEnabled",null),e([l()],N.prototype,"showNoValueLabel",null),e([l()],N.prototype,"includeTime",null),e([l()],N.prototype,"includeTimeOffset",null),e([l({readOnly:!0})],N.prototype,"inputType",null),e([l()],N.prototype,"maxLength",null),e([l()],N.prototype,"minLength",null),e([l()],N.prototype,"range",null),e([l()],N.prototype,"required",null),e([l({readOnly:!0})],N.prototype,"type",void 0),e([l()],N.prototype,"userHasChangedValue",void 0),e([l()],N.prototype,"valid",null),e([l()],N.prototype,"value",null),e([l()],N.prototype,"visibilityCode",null),e([l()],N.prototype,"codedValueDomainOptions",null),e([l()],N.prototype,"codedValueOptions",null),e([l()],N.prototype,"_evaluatedRequiredExpression",null),e([l()],N.prototype,"_hasIntersectionWithElementFieldDomain",void 0),e([l()],N.prototype,"_allDomains",null),e([l()],N.prototype,"_fieldShouldHaveDomain",null),e([l()],N.prototype,"_dateFormRange",null),e([l()],N.prototype,"_dateRange",null),N=e([r("esri.widgets.BatchAttributeForm.inputs.FieldInput")],N);const T=N;export{T as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as t}from"tslib";import{property as e,subclass as i}from"../../../core/accessorSupport/decorators.js";import s from"./InputBase.js";import{visibilityCodeToBoolean as o}from"./support/inputUtils.js";let r=class extends s{constructor(t){super(t),this.inputs=[],this.type="group"}initialize(){for(const t of this.inputs)t.group=this}get open(){return"expanded"===this.template.initialState}set open(t){this._override("open",t)}get visible(){return o(this.visibilityCode)&&this.inputs.some(t=>t.visible)}visibleForFeature(t){if(null==this.template.getExpressionExecutorsForLayer(t.layer)?.visibilityExpression)return!0;const e=this._lookupEvaluatedExpression(t,"visibility");return"success"===e?.status&&!0===e.result}};t([e()],r.prototype,"inputs",void 0),t([e({readOnly:!0})],r.prototype,"type",void 0),t([e()],r.prototype,"open",null),t([e()],r.prototype,"visible",null),r=t([i("esri.widgets.BatchAttributeForm.inputs.GroupInput")],r);const p=r;export{p as default};
2
+ import{__decorate as t}from"tslib";import{destroyMaybe as e}from"../../../core/maybe.js";import{property as i,subclass as s}from"../../../core/accessorSupport/decorators.js";import o from"./InputBase.js";import{visibilityCodeToBoolean as r}from"./support/inputUtils.js";let p=class extends o{constructor(t){super(t),this.inputs=[],this.type="group"}initialize(){for(const t of this.inputs)t.group=this}destroy(){this.inputs.forEach(t=>e(t))}get open(){return"expanded"===this.template.initialState}set open(t){this._override("open",t)}get visible(){return r(this.visibilityCode)&&this.inputs.some(t=>t.visible)}visibleForFeature(t){if(null==this.template.getExpressionExecutorsForLayer(t.layer)?.visibilityExpression)return!0;const e=this._lookupEvaluatedExpression(t,"visibility");return"success"===e?.status&&!0===e.result}};t([i()],p.prototype,"inputs",void 0),t([i({readOnly:!0})],p.prototype,"type",void 0),t([i()],p.prototype,"open",null),t([i()],p.prototype,"visible",null),p=t([s("esri.widgets.BatchAttributeForm.inputs.GroupInput")],p);const n=p;export{n as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../../../core/Accessor.js";import i from"../../../core/Collection.js";import{property as s,subclass as r}from"../../../core/accessorSupport/decorators.js";import{unknown as o,utc as l}from"../../../time/constants.js";import{isAttributeFormSupportedLayerUnion as n}from"../batchAttributeFormUtils.js";import{visibilityCodeToBoolean as a,makeUseId as p}from"./support/inputUtils.js";let u=class extends t{constructor(e){super(e),this.existsInAllLayers=!0,this.features=new i}get description(){return this.template.description}get effectiveTimeZone(){const{formTimeZone:e,layerTimeZone:t}=this.template;return e||t?t===o?l:e&&e!==o?e:t??"system":"system"}get featuresHaveSameCalculatedVisibility(){const e=new Set;for(const t of this.features){if(null==this.template.getExpressionExecutorsForLayer(t.layer)?.visibilityExpression){e.add(!0);continue}const i=this._lookupEvaluatedExpression(t,"visibility");if("success"===i?.status){if(e.add(!0===i.result),e.size>1)return!1}else e.add(!1)}return e.size<=1}get label(){return this.template.label}get layers(){return Array.from(new Set(this.features.map(e=>e.layer).filter(n)))}get visibilityCode(){return this._baseVisibilityCode}get visible(){return a(this.visibilityCode)}get _baseVisibilityCode(){return this.existsInAllLayers?this.featuresHaveSameCalculatedVisibility?!1===this._evaluatedVisibilityExpression?"hidden:visibility-expression:all-features":"visible":"hidden:visibility-expression:some-features":"hidden:not-in-all-layers"}get _evaluatedVisibilityExpression(){let e=!0,t=!0;for(const i of this.features){if(null==this.template.getExpressionExecutorsForLayer(i.layer)?.visibilityExpression){e=e&&!0;continue}t=!1;const s=this._lookupEvaluatedExpression(i,"visibility");"success"===s?.status?e=e&&!0===s.result:e=!1}return t?null:e}_lookupEvaluatedExpression(e,t,i){return this.expressionsManager.evaluatedExpressions.get(e)?.get(p({elementId:this.template.elementId,executorPurpose:t,textExpressionIndex:i}))}};e([s({constructOnly:!0})],u.prototype,"expressionsManager",void 0),e([s()],u.prototype,"description",null),e([s()],u.prototype,"effectiveTimeZone",null),e([s()],u.prototype,"existsInAllLayers",void 0),e([s()],u.prototype,"features",void 0),e([s()],u.prototype,"featuresHaveSameCalculatedVisibility",null),e([s()],u.prototype,"label",null),e([s()],u.prototype,"layers",null),e([s({constructOnly:!0})],u.prototype,"template",void 0),e([s()],u.prototype,"visibilityCode",null),e([s()],u.prototype,"visible",null),e([s()],u.prototype,"_baseVisibilityCode",null),e([s()],u.prototype,"_evaluatedVisibilityExpression",null),u=e([r("esri.widgets.BatchAttributeForm.inputs.InputBase")],u);const y=u;export{y as default};
2
+ import{__decorate as e}from"tslib";import t from"../../../core/Accessor.js";import i from"../../../core/Collection.js";import{property as s,subclass as r}from"../../../core/accessorSupport/decorators.js";import{getEffectiveTimeZone as o,isAttributeFormSupportedLayerUnion as l}from"../batchAttributeFormUtils.js";import{visibilityCodeToBoolean as a,makeUseId as n}from"./support/inputUtils.js";let p=class extends t{constructor(e){super(e),this.existsInAllLayers=!0,this.features=new i}get description(){return this.template.description}get effectiveTimeZone(){return o(this.template.formTimeZone,this.template.layerTimeZone)}get featuresHaveSameCalculatedVisibility(){const e=new Set;for(const t of this.features){if(null==this.template.getExpressionExecutorsForLayer(t.layer)?.visibilityExpression){e.add(!0);continue}const i=this._lookupEvaluatedExpression(t,"visibility");if("success"===i?.status){if(e.add(!0===i.result),e.size>1)return!1}else e.add(!1)}return e.size<=1}get label(){return this.template.label}get layers(){return Array.from(new Set(this.features.map(e=>e.layer).filter(l)))}get visibilityCode(){return this._baseVisibilityCode}get visible(){return a(this.visibilityCode)}get _baseVisibilityCode(){return this.existsInAllLayers?this.featuresHaveSameCalculatedVisibility?!1===this._evaluatedVisibilityExpression?"hidden:visibility-expression:all-features":"visible":"hidden:visibility-expression:some-features":"hidden:not-in-all-layers"}get _evaluatedVisibilityExpression(){let e=!0,t=!0;for(const i of this.features){if(null==this.template.getExpressionExecutorsForLayer(i.layer)?.visibilityExpression){e=e&&!0;continue}t=!1;const s=this._lookupEvaluatedExpression(i,"visibility");"success"===s?.status?e=e&&!0===s.result:e=!1}return t?null:e}_lookupEvaluatedExpression(e,t,i){return this.expressionsManager.evaluatedExpressions.get(e)?.get(n({elementId:this.template.elementId,executorPurpose:t,textExpressionIndex:i}))}};e([s({constructOnly:!0})],p.prototype,"expressionsManager",void 0),e([s()],p.prototype,"description",null),e([s()],p.prototype,"effectiveTimeZone",null),e([s()],p.prototype,"existsInAllLayers",void 0),e([s()],p.prototype,"features",void 0),e([s()],p.prototype,"featuresHaveSameCalculatedVisibility",null),e([s()],p.prototype,"label",null),e([s()],p.prototype,"layers",null),e([s({constructOnly:!0})],p.prototype,"template",void 0),e([s()],p.prototype,"visibilityCode",null),e([s()],p.prototype,"visible",null),e([s()],p.prototype,"_baseVisibilityCode",null),e([s()],p.prototype,"_evaluatedVisibilityExpression",null),p=e([r("esri.widgets.BatchAttributeForm.inputs.InputBase")],p);const u=p;export{u as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{destroyMaybe as t}from"../../../core/maybe.js";import{on as l}from"../../../core/reactiveUtils.js";import{property as r,subclass as i}from"../../../core/accessorSupport/decorators.js";import{isSubtypeGroupLayer as o,getEffectiveLayerCapabilities as s}from"../../../layers/support/layerUtils.js";import{isRelatableFeatureSupportedLayer as a}from"../../../popup/support/featureUtils.js";import n from"./EditableInput.js";import p from"./SingleFeatureInputAdapter.js";import d from"../../Feature/FeatureRelationship/FeatureRelationshipViewModel.js";import{getComputedAttributes as h,parseFormTemplateString as u}from"../../FeatureForm/featureFormUtils.js";let y=class extends n{constructor(e){super(e),this._relationshipVM=new d,this._showAllCategories=!1,this._showAllRelatedRecords=!1,this.group=null,this.map=null,this.single=new p({input:this}),this.type="relationship"}initialize(){this._setRelationshipVMProps(),this.addHandles([l(()=>this.relatedLayer,"edits",()=>this._relationshipVM?.refresh())])}destroy(){t(this._relationshipVM)}get activeCategory(){return this._relationshipVM.activeCategory}get allCategories(){const{relatedLayer:e,_relationshipVM:t}=this;if(!o(e))return;const l=t?.categories,r=(e.subtypes??[]).map(({code:e,name:t})=>{const r=l?.find(e=>e.name===t);return{name:t,count:r?.count??0,value:r?.value??e}});return r.length?r:null}get categories(){return this.showAllEnabled?this.allCategories:this.allCategories?.slice(0,this.displayCount)}get canAddRelatedFeature(){const{editable:e,relatedFeatureCount:t,relationship:l}=this;if(!l||!this.loaded||!this._relatedLayerAllowsAdds)return!1;if(this.allCategories?.length&&!this.activeCategory)return!1;const{cardinality:r,role:i}=l;return!("one-to-one"===r&&t>0)&&("many-to-many"!==r&&(!("one-to-many"===r&&"destination"===i&&t>0)&&e))}get displayCount(){return this.template.displayCount}get displayType(){return this.template.displayType}get editable(){return!!this._relatedLayerAllowsAdds&&(this._evaluatedEditableExpression??!0)}get feature(){return this.single.feature}get relatedFeatureCount(){return this._relationshipVM?.featureCount??0}get label(){return this.activeCategory?.name?this.activeCategory.name:this.template.label}get layer(){return this.single.layer}get loaded(){return"loading"!==this._relationshipVM?.state}get orderByFields(){return this.template.orderByFields}get originHasValidKey(){return!!this.relationship&&null!=this.feature?.getAttribute(this.relationship.keyField)}get relationship(){return this._relationshipVM?.relationship}get relationshipId(){return this.template.relationshipId}get relatedFeatureInfos(){const{_relationshipVM:e,effectiveTimeZone:t}=this;if(!e?.relatedFeatures?.length||!e?.relatedLayer)return[];const{itemDescriptionFieldName:l,relatedFeatures:r,relatedLayer:i}=e,o=i?.formTemplate?.title||void 0;return r.map(e=>{let r;if(l){const o=e.getAttribute(l),s=i.fieldsIndex.get(l);if(s){const e=h({fields:[s],layer:i,values:[o],timeZone:t})[l];null!=e&&(r=e.toString())}}return{feature:e,description:r,title:o?u({attributes:e.attributes,label:o,layer:i,timeZone:t}):void 0}}).toArray()}get relatedLayer(){return this._relationshipVM?.relatedLayer}get relatedLayerIsTable(){return!!this.relatedLayer?.isTable}get showAllEnabled(){return this._relationshipVM.showAllEnabled}get showAllActionVisible(){return!this.showAllEnabled&&this.relatedFeatureCount>0&&this.relatedFeatureCount>this.displayCount}get showAllCategories(){return this._showAllCategories}get showAllCategoriesVisible(){const e=this.allCategories?.length??0;return!this.showAllEnabled&&e>0&&e>this.displayCount}get showAllRelatedRecords(){return this._showAllRelatedRecords}get updating(){return"loading"===this._relationshipVM?.state||"querying"===this._relationshipVM?.state}incrementPage(){this._relationshipVM&&this._relationshipVM.featurePage++}setActiveCategory(e){this._relationshipVM.activeCategory=e,this.setShowAllRelatedRecords(!!e)}setShowAllCategories(e){this._showAllCategories=e,this._showAllRelatedRecords||this._setShowAllEnabled(e)}setShowAllRelatedRecords(e){this._showAllRelatedRecords=e,this._showAllCategories||this._setShowAllEnabled(e)}get _relatedLayerAllowsAdds(){const{relatedLayer:e}=this;if(!e||!this._relatedLayerAllowsEdits)return!1;const t=s(e);return!!t?.operations?.supportsAdd}get _relatedLayerAllowsEdits(){const{relatedLayer:e}=this;if(!e)return!1;const t=s(e);return!!t?.operations?.supportsEditing}_setRelationshipVMProps(){const{displayCount:e,feature:t,layer:l,orderByFields:r,map:i,relationshipId:o,showAllEnabled:s}=this;t&&l&&a(l)&&this._relationshipVM.set({displayCount:e,graphic:t.plainGraphic,layer:l,map:i,orderByFields:r,relationshipId:o,showAllEnabled:s})}_setShowAllEnabled(e){this._relationshipVM.showAllEnabled=e}};e([r()],y.prototype,"_relationshipVM",void 0),e([r()],y.prototype,"_showAllCategories",void 0),e([r()],y.prototype,"_showAllRelatedRecords",void 0),e([r()],y.prototype,"activeCategory",null),e([r()],y.prototype,"allCategories",null),e([r()],y.prototype,"categories",null),e([r()],y.prototype,"canAddRelatedFeature",null),e([r()],y.prototype,"displayCount",null),e([r()],y.prototype,"displayType",null),e([r()],y.prototype,"editable",null),e([r()],y.prototype,"feature",null),e([r()],y.prototype,"group",void 0),e([r()],y.prototype,"label",null),e([r()],y.prototype,"layer",null),e([r()],y.prototype,"loaded",null),e([r()],y.prototype,"map",void 0),e([r()],y.prototype,"orderByFields",null),e([r()],y.prototype,"originHasValidKey",null),e([r()],y.prototype,"relationship",null),e([r()],y.prototype,"relationshipId",null),e([r()],y.prototype,"relatedFeatureInfos",null),e([r()],y.prototype,"relatedLayer",null),e([r()],y.prototype,"relatedLayerIsTable",null),e([r({readOnly:!0})],y.prototype,"single",void 0),e([r()],y.prototype,"showAllEnabled",null),e([r()],y.prototype,"showAllActionVisible",null),e([r()],y.prototype,"showAllCategories",null),e([r()],y.prototype,"showAllCategoriesVisible",null),e([r()],y.prototype,"showAllRelatedRecords",null),e([r({readOnly:!0})],y.prototype,"type",void 0),e([r()],y.prototype,"updating",null),e([r()],y.prototype,"_relatedLayerAllowsAdds",null),e([r()],y.prototype,"_relatedLayerAllowsEdits",null),y=e([i("esri.widgets.BatchAttributeForm.inputs.RelationshipElementInput")],y);const g=y;export{g as default};
2
+ import{__decorate as e}from"tslib";import{destroyMaybe as t}from"../../../core/maybe.js";import{on as l}from"../../../core/reactiveUtils.js";import{property as r,subclass as i}from"../../../core/accessorSupport/decorators.js";import{isSubtypeGroupLayer as o,getEffectiveLayerCapabilities as s}from"../../../layers/support/layerUtils.js";import{isRelatableFeatureSupportedLayer as a}from"../../../popup/support/featureUtils.js";import{getComputedAttributes as n,parseFormTemplateString as p}from"../stringUtils.js";import d from"./EditableInput.js";import h from"./SingleFeatureInputAdapter.js";import u from"../../Feature/FeatureRelationship/FeatureRelationshipViewModel.js";let y=class extends d{constructor(e){super(e),this._relationshipVM=new u,this._showAllCategories=!1,this._showAllRelatedRecords=!1,this.group=null,this.map=null,this.single=new h({input:this}),this.type="relationship"}initialize(){this._setRelationshipVMProps(),this.addHandles([l(()=>this.relatedLayer,"edits",()=>this._relationshipVM?.refresh())])}destroy(){t(this._relationshipVM)}get activeCategory(){return this._relationshipVM.activeCategory}get allCategories(){const{relatedLayer:e,_relationshipVM:t}=this;if(!o(e))return;const l=t?.categories,r=(e.subtypes??[]).map(({code:e,name:t})=>{const r=l?.find(e=>e.name===t);return{name:t,count:r?.count??0,value:r?.value??e}});return r.length?r:null}get categories(){return this.showAllEnabled?this.allCategories:this.allCategories?.slice(0,this.displayCount)}get canAddRelatedFeature(){const{editable:e,relatedFeatureCount:t,relationship:l}=this;if(!l||!this.loaded||!this._relatedLayerAllowsAdds)return!1;if(this.allCategories?.length&&!this.activeCategory)return!1;const{cardinality:r,role:i}=l;return!("one-to-one"===r&&t>0)&&("many-to-many"!==r&&(!("one-to-many"===r&&"destination"===i&&t>0)&&e))}get displayCount(){return this.template.displayCount}get displayType(){return this.template.displayType}get editable(){return!!this._relatedLayerAllowsAdds&&(this._evaluatedEditableExpression??!0)}get feature(){return this.single.feature}get relatedFeatureCount(){return this._relationshipVM?.featureCount??0}get label(){return this.activeCategory?.name?this.activeCategory.name:this.template.label}get layer(){return this.single.layer}get loaded(){return"loading"!==this._relationshipVM?.state}get orderByFields(){return this.template.orderByFields}get originHasValidKey(){return!!this.relationship&&null!=this.feature?.getAttribute(this.relationship.keyField)}get relationship(){return this._relationshipVM?.relationship}get relationshipId(){return this.template.relationshipId}get relatedFeatureInfos(){const{_relationshipVM:e,effectiveTimeZone:t}=this;if(!e?.relatedFeatures?.length||!e?.relatedLayer)return[];const{itemDescriptionFieldName:l,relatedFeatures:r,relatedLayer:i}=e,o=i?.formTemplate?.title||void 0;return r.map(e=>{let r;if(l){const o=e.getAttribute(l),s=i.fieldsIndex.get(l);if(s){const e=n({fields:[s],layer:i,values:[o],timeZone:t})[l];null!=e&&(r=e.toString())}}return{feature:e,description:r,title:o?p({attributes:e.attributes,label:o,layer:i,timeZone:t}):void 0}}).toArray()}get relatedLayer(){return this._relationshipVM?.relatedLayer}get relatedLayerIsTable(){return!!this.relatedLayer?.isTable}get showAllEnabled(){return this._relationshipVM.showAllEnabled}get showAllActionVisible(){return!this.showAllEnabled&&this.relatedFeatureCount>0&&this.relatedFeatureCount>this.displayCount}get showAllCategories(){return this._showAllCategories}get showAllCategoriesVisible(){const e=this.allCategories?.length??0;return!this.showAllEnabled&&e>0&&e>this.displayCount}get showAllRelatedRecords(){return this._showAllRelatedRecords}get updating(){return"loading"===this._relationshipVM?.state||"querying"===this._relationshipVM?.state}incrementPage(){this._relationshipVM&&this._relationshipVM.featurePage++}setActiveCategory(e){this._relationshipVM.activeCategory=e,this.setShowAllRelatedRecords(!!e)}setShowAllCategories(e){this._showAllCategories=e,this._showAllRelatedRecords||this._setShowAllEnabled(e)}setShowAllRelatedRecords(e){this._showAllRelatedRecords=e,this._showAllCategories||this._setShowAllEnabled(e)}get _relatedLayerAllowsAdds(){const{relatedLayer:e}=this;if(!e||!this._relatedLayerAllowsEdits)return!1;const t=s(e);return!!t?.operations?.supportsAdd}get _relatedLayerAllowsEdits(){const{relatedLayer:e}=this;if(!e)return!1;const t=s(e);return!!t?.operations?.supportsEditing}_setRelationshipVMProps(){const{displayCount:e,feature:t,layer:l,orderByFields:r,map:i,relationshipId:o,showAllEnabled:s}=this;t&&l&&a(l)&&this._relationshipVM.set({displayCount:e,graphic:t.plainGraphic,layer:l,map:i,orderByFields:r,relationshipId:o,showAllEnabled:s})}_setShowAllEnabled(e){this._relationshipVM.showAllEnabled=e}};e([r()],y.prototype,"_relationshipVM",void 0),e([r()],y.prototype,"_showAllCategories",void 0),e([r()],y.prototype,"_showAllRelatedRecords",void 0),e([r()],y.prototype,"activeCategory",null),e([r()],y.prototype,"allCategories",null),e([r()],y.prototype,"categories",null),e([r()],y.prototype,"canAddRelatedFeature",null),e([r()],y.prototype,"displayCount",null),e([r()],y.prototype,"displayType",null),e([r()],y.prototype,"editable",null),e([r()],y.prototype,"feature",null),e([r()],y.prototype,"group",void 0),e([r()],y.prototype,"label",null),e([r()],y.prototype,"layer",null),e([r()],y.prototype,"loaded",null),e([r()],y.prototype,"map",void 0),e([r()],y.prototype,"orderByFields",null),e([r()],y.prototype,"originHasValidKey",null),e([r()],y.prototype,"relationship",null),e([r()],y.prototype,"relationshipId",null),e([r()],y.prototype,"relatedFeatureInfos",null),e([r()],y.prototype,"relatedLayer",null),e([r()],y.prototype,"relatedLayerIsTable",null),e([r({readOnly:!0})],y.prototype,"single",void 0),e([r()],y.prototype,"showAllEnabled",null),e([r()],y.prototype,"showAllActionVisible",null),e([r()],y.prototype,"showAllCategories",null),e([r()],y.prototype,"showAllCategoriesVisible",null),e([r()],y.prototype,"showAllRelatedRecords",null),e([r({readOnly:!0})],y.prototype,"type",void 0),e([r()],y.prototype,"updating",null),e([r()],y.prototype,"_relatedLayerAllowsAdds",null),e([r()],y.prototype,"_relatedLayerAllowsEdits",null),y=e([i("esri.widgets.BatchAttributeForm.inputs.RelationshipElementInput")],y);const g=y;export{g as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- const t="esri_BatchAttributeForm_different_values";function n(t){return"visible"===t}function e(t){return"field"===t.type}function r(t){return e(t)&&"multiple-choice"===t.input?.type}function u(t){return"group"===t.type}function o(t){return"relationship"===t.type}function i(t){return"text"===t.type}function c(t){return"attachment"===t.type}function s(t){return e(t)||c(t)||o(t)||f(t)}function f(t){return"utilityNetworkAssociations"===t.type}function p(t){const n=`${t.elementId}:${t.executorPurpose}`;return null!=t.textExpressionIndex?`${n}:${t.textExpressionIndex}`:n}const l=t=>null!=t&&(a(t,"combo-box")||a(t,"radio-buttons"));function a(t,n){return t?.type===n}function y(t,n,e=[]){for(const r of t)n(r)?e.push(r):u(r)&&y(r.inputs,n,e);return e}async function x(t,n,e,r){const u=[];for(const o of e){const n=r(o);o.getAttribute(t)!==n&&(o.setAttribute(t,n),u.push(o))}return u.length>0&&await n.valueChanged(t,u),u}function d(t,n){return t.layers[0]?.getField(n)?.name??n}export{x as applyFieldValueChanges,y as deepFilterInputs,t as differentValuesString,d as getNormalizedFieldName,c as isAttachmentElementInput,s as isEditableInput,e as isFieldInput,l as isFieldInputWithShowNoValueOptionInput,u as isGroupInput,a as isInputWithInputType,r as isMultipleChoiceFieldInput,o as isRelationshipElementInput,i as isTextElementInput,f as isUtilityNetworkAssociationsElementInput,p as makeUseId,n as visibilityCodeToBoolean};
2
+ const t="esri_BatchAttributeForm_different_values";function n(t){return"visible"===t}function e(t){return"field"===t.type}function r(t){return e(t)&&"multiple-choice"===t.input?.type}function u(t){return"group"===t.type}function o(t){return"relationship"===t.type}function i(t){return"text"===t.type}function c(t){return"attachment"===t.type}function f(t){return e(t)||c(t)||o(t)||l(t)}function s(t){return e(t)||c(t)||o(t)||l(t)||i(t)}function p(t){return s(t)&&null!=t.group}function l(t){return"utilityNetworkAssociations"===t.type}function x(t){const n=`${t.elementId}:${t.executorPurpose}`;return null!=t.textExpressionIndex?`${n}:${t.textExpressionIndex}`:n}const y=t=>null!=t&&(a(t,"combo-box")||a(t,"radio-buttons"));function a(t,n){return t?.type===n}function d(t,n,e=[]){for(const r of t)n(r)?e.push(r):u(r)&&d(r.inputs,n,e);return e}function m(t,n){return t.layers[0]?.getField(n)?.name??n}export{d as deepFilterInputs,t as differentValuesString,m as getNormalizedFieldName,c as isAttachmentElementInput,f as isEditableInput,e as isFieldInput,y as isFieldInputWithShowNoValueOptionInput,u as isGroupInput,s as isGroupableInput,p as isGroupedInput,a as isInputWithInputType,r as isMultipleChoiceFieldInput,o as isRelationshipElementInput,i as isTextElementInput,l as isUtilityNetworkAssociationsElementInput,x as makeUseId,n as visibilityCodeToBoolean};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- function e(e){const{messages:n,onclick:a}=e;return[{appearance:"solid",kind:"brand",label:n.footerButtons.add,purpose:"stage-add-attachment",onclick:a??(()=>{})}]}function n(e){const{callback:n,disabled:a,formId:t,messages:c}=e;return[{appearance:"solid",disabled:a,form:t,kind:"brand",label:c.footerButtons.update,purpose:"submit",onclick:()=>n()}]}function a(e){const{label:n,onclick:a}=e;return[{appearance:"outline",icon:"trash",kind:"danger",label:n,purpose:"discard-attachment-changes",onclick:a??(()=>{})}]}function t(e){const{disabled:n,messages:a,onclick:t}=e;return[{appearance:"solid",disabled:n,kind:"brand",label:a.footerButtons.replace,purpose:"stage-replace-attachment",onclick:t??(()=>{})}]}function c(e){const{messages:n,onclick:a}=e;return[{appearance:"outline",icon:"reset",kind:"brand",label:n.footerButtons.reset,purpose:"discard-attachment-name-changes",onclick:a??(()=>{})}]}function o(e){const{deleteDisabled:n,deleteOnclick:a,doneOnclick:t,messages:c}=e;return[{appearance:"outline",kind:"brand",label:c.done,purpose:"stage-update-attachment",onclick:t??(()=>{})},{appearance:"outline",disabled:n,icon:"attachment",kind:"danger",label:c.delete,purpose:"stage-delete-attachment",onclick:a??(()=>{})}]}function s(e){const{messages:n,purpose:a,onclick:t}=e;return[{appearance:"outline",kind:"brand",label:n.cancel,purpose:a,onclick:t??(()=>{})}]}export{e as makeAddAttachmentFooterButtons,s as makeCancelFooterButton,n as makeDefaultFooterButtons,a as makeDiscardAttachmentFooterButtons,t as makeReplaceAttachmentFooterButtons,c as makeResetAttachmentFooterButtons,o as makeViewingAttachmentFooterButtons};
2
+ function e(e){const{messages:n,onclick:a}=e;return[{appearance:"solid",kind:"brand",label:n.footerButtons.add,purpose:"stage-add-attachment",onclick:a??(()=>{})}]}function n(e){const{callback:n,disabled:a,formId:t,messages:c}=e;return[{appearance:"solid",disabled:a,form:t,kind:"brand",label:c.footerButtons.update,purpose:"submit",onclick:()=>n()}]}function a(e){const{label:n,onclick:a}=e;return[{appearance:"outline",icon:"trash",kind:"danger",label:n,purpose:"discard-attachment-changes",onclick:a??(()=>{})}]}function t(e){const{disabled:n,messages:a,onclick:t}=e;return[{appearance:"solid",disabled:n,kind:"brand",label:a.footerButtons.replace,purpose:"stage-replace-attachment",onclick:t??(()=>{})}]}function c(e){const{messages:n,onclick:a}=e;return[{appearance:"outline",icon:"reset",kind:"brand",label:n.footerButtons.reset,purpose:"discard-attachment-name-changes",onclick:a??(()=>{})}]}function o(e){const{deleteDisabled:n,deleteOnclick:a,doneOnclick:t,messages:c}=e;return[{appearance:"solid",kind:"brand",label:c.done,purpose:"stage-update-attachment",onclick:t??(()=>{})},{appearance:"outline",disabled:n,icon:"attachment",kind:"danger",label:c.delete,purpose:"stage-delete-attachment",onclick:a??(()=>{})}]}function s(e){const{messages:n,purpose:a,onclick:t}=e;return[{appearance:"outline",kind:"brand",label:n.cancel,purpose:a,onclick:t??(()=>{})}]}export{e as makeAddAttachmentFooterButtons,s as makeCancelFooterButton,n as makeDefaultFooterButtons,a as makeDiscardAttachmentFooterButtons,t as makeReplaceAttachmentFooterButtons,c as makeResetAttachmentFooterButtons,o as makeViewingAttachmentFooterButtons};
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
+ import{isSome as e}from"../../core/arrayUtils.js";import{templateHasKey as t,replace as r}from"../../core/string.js";import{convertDateTimeFieldFormatToIntlOptions as o}from"../../intl/date.js";import{defaultFieldFormat as i}from"../../layers/support/fieldFormatUtils.js";import{isTimeOnlyField as s}from"../../layers/support/fieldUtils.js";import{supportsFieldConfiguration as n}from"../../layers/support/layerUtils.js";import{isAnyDateField as m}from"../../smartMapping/support/utils.js";import{getLabelForDateFieldValue as a,getIntlOptionsForField as l}from"../support/dateUtils.js";function f(r){const{attributes:o,layer:i,label:s,timeZone:n}=r;if(!o||"object"!=typeof o)return s;const m=Object.keys(o).filter(e=>t(s,e)),a=m.map(e=>o[e]),l=m.map(e=>i.fieldsIndex.get(e)).filter(e);return p(s,u({fields:l,layer:i,timeZone:n,values:a}))}function p(e,t){return r(r(e,e=>`{${e.toLowerCase()}}`),Object.fromEntries(Object.entries(t).map(([e,t])=>[e.toLowerCase(),t])))}function u(e){const{layer:t,values:r}=e,o=e.fields??t.fields??[],i=e.timeZone??void 0,n=o.map((e,o)=>{let n=r[o];if("coded-value"===e.domain?.type){const t=e.domain.codedValues.find(e=>e.code===n);t?.name&&(n=t.name)}return(m(e)||s(e))&&(n=a(e,n,{timeZone:i,...d(t,e)})),[e.name,n]});return Object.fromEntries(n)}function d(e,t){if(n(e)){const r=e.getFieldConfiguration(t.name)?.fieldFormat??i(t);if("date-time"===r?.type)return o(r)}return l(t)}export{u as getComputedAttributes,d as getDateTimeFormatOptions,f as parseFormTemplateString,p as substituteFieldTemplatesInString};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{createArcadeProfile as e,createArcadeExecutor as t}from"../../../../arcade.js";import r from"../../../../core/Error.js";import n from"../../../../core/Logger.js";import{getEffectiveFieldAlias as o}from"../../../../editing/fieldUtils.js";import i from"../../../../form/ExpressionInfo.js";import s from"../../../../form/elements/AttachmentElement.js";import{isMultipleChoiceInput as a}from"../../../../form/elements/inputs/inputUtils.js";import{isAttachmentElement as l,isFieldElement as m,isGroupElement as d,isRelationshipElement as p,isTextElement as c,isUtilityNetworkAssociationsElement as f}from"../../../../form/support/formUtils.js";import{getLowerCaseEditTrackingFields as u,isFieldVisibleByDefault as x}from"../../../../layers/support/fieldUtils.js";import{isSubtypeSublayer as y,isSubtypeGroupLayer as w}from"../../../../layers/support/layerUtils.js";import{isNumber as h}from"../../../../support/guards.js";import{unknown as E}from"../../../../time/constants.js";import{layerSupportsQueryAttachments as b}from"../../batchAttributeFormUtils.js";import{makeExpressionInfosMap as v,makeExecutorSetForFormElement as I}from"../../expressions/expressionUtils.js";import{AttachmentElementTemplate as T}from"../AttachmentElementTemplate.js";import j from"../BatchFormTemplate.js";import{FieldElementTemplate as F}from"../FieldElementTemplate.js";import{GroupElementTemplate as g}from"../GroupElementTemplate.js";import{RelationshipElementTemplate as P}from"../RelationshipElementTemplate.js";import{TextElementTemplate as C}from"../TextElementTemplate.js";import{UtilityNetworkAssociationsElementTemplate as A}from"../UtilityNetworkAssociationsElementTemplate.js";import{compileTextElementMarkdownToHTML as L}from"./textElementTemplateUtils.js";const U="expression/dea57012-47ca4b55a000-8df62742ed0c",Z=e("form-attachment-filename-calculation"),N=()=>n.getLogger("esri.widgets.BatchAttributeForm.templates.templateUtils");async function k(e,t,r=e.formTemplate){return await e.load(),r?.elements&&r.elements.length>0?S(r,e,t):B(e,t)}async function B(e,{arcadeExecutorProvider:t,attachmentsEnabled:r,formTimeZone:n}){const o=new Set(u(e)),i={arcadeExecutorProvider:t,formTimeZone:n,layer:e},s=[];for(const l of e.fields)D(l,e,o)&&s.push(q(l,i));const a=await Promise.all(s);return r&&await R(a,{arcadeExecutorProvider:t,expressionInfos:v(void 0),layer:e}),new j({elements:a,preserveFieldValuesWhenHidden:!0})}function H(e,t){for(const r of e??[])if("group"!==r.type){if("field"===r.type){if(!1===r.editable&&!r.editableExpression)return!0;if(t.subtypeField&&(y(t)||w(t))&&r.fieldName?.toLowerCase()===t.subtypeField.toLowerCase())return!0}}else if(H(r.elements??[],t))return!0;return!1}async function R(e,{arcadeExecutorProvider:t,expressionInfos:r,layer:n}){if(!b(n))return;const o=await V(new s({displayFilename:!0}),{arcadeExecutorProvider:t,expressionInfos:r,layer:n});e.push(o)}async function S(e,t,r){let n=null;H(e.elements??[],t)&&(n=new i({title:"",name:U,expression:"false"}));const o=v(n?[...e.expressionInfos??[],n]:e.expressionInfos),s={description:e.description,elements:new Array,title:e.title,preserveFieldValuesWhenHidden:e.preserveFieldValuesWhenHidden,supportsAttachmentElements:e.supportsAttachmentElements},{elements:a}=e;if(!a)return new j(s);let l=!1;const{arcadeExecutorProvider:m,formTimeZone:d}=r;for(const i of a){const e=await W(i,{arcadeExecutorProvider:m,expressionInfos:o,layer:t,formTimeZone:d});e&&(s.elements.push(e),"attachment"===e.type&&(l=!0))}return e.supportsAttachmentElements||!r.attachmentsEnabled||l||await R(s.elements,{arcadeExecutorProvider:m,expressionInfos:o,layer:t}),new j(s)}async function V(e,{arcadeExecutorProvider:r,expressionInfos:n,layer:o}){const i=n.get(e.filenameExpression),s=i?await t(i.expression,Z):null,a=new T({allowUserRename:e.allowUserRename,attachmentKeyword:e.attachmentKeyword,description:e.description,displayFilename:e.displayFilename,filenameExpressionExecutor:s,input:e.input,label:e.label,maxAttachmentCount:e.maxAttachmentCount,minAttachmentCount:e.minAttachmentCount,useOriginalFilename:e.useOriginalFilename}),l=await I({element:e,expressionInfos:n,provider:r});return a.addLayer(o,l),a}async function W(e,t){return l(e)?V(e,{arcadeExecutorProvider:t.arcadeExecutorProvider,expressionInfos:t.expressionInfos,layer:t.layer}):m(e)?z(e,t):d(e)?K(e,t):p(e)?O(e,t):c(e)?G(e,t):f(e)?$(e,t):null}async function z(e,{arcadeExecutorProvider:t,expressionInfos:n,layer:o,formTimeZone:i}){const{fieldsIndex:s}=o,{description:l,domain:m,fieldName:d,hint:p,input:c,label:f}=e;if(null==d||!s.has(d))return N().warn(new r("batch-attribute-form:invalid-form-element-field",`Field element with label '${f}' does not refer to a valid field`)),null;if(!1!==e.editable||e.editableExpression||((e=e.clone()).editableExpression=U),o.subtypeField&&(y(o)||w(o))&&e.fieldName?.toLowerCase()===o.subtypeField.toLowerCase()&&((e=e.clone()).editableExpression=U),c&&a(c)&&c.otherChoice){const e=c.otherChoice.fieldName,t=s.get(e);t&&t.name!==e&&(c.otherChoice=c.otherChoice.clone(),c.otherChoice.fieldName=t.name)}const u=new F({description:l,domain:m,field:s.get(d),hint:p,input:c,formTimeZone:i,layerTimeZone:J(o),label:f}),x=await I({element:e,expressionInfos:n,provider:t});return u.addLayer(o,x),u}async function K(e,t){const{arcadeExecutorProvider:r,expressionInfos:n,layer:o}=t,{description:i,label:s,initialState:a}=e,l=[];for(const p of e.elements){const e=await W(p,t);e&&l.push(e)}const m=new g({description:i,elements:l,label:s,initialState:a??"expanded"}),d=await I({element:e,expressionInfos:n,provider:r});return m.addLayer(o,d),m}async function O(e,t){const{description:r,label:n,displayCount:o,displayType:i,orderByFields:s,relationshipId:a}=e,{arcadeExecutorProvider:l,expressionInfos:m,layer:d}=t,p=new P({description:r,...h(o)&&{displayCount:o},displayType:i,label:n,orderByFields:s,relationshipId:a}),c=await I({element:e,expressionInfos:m,provider:l});return p.addLayer(d,c),p}async function G(e,{arcadeExecutorProvider:t,expressionInfos:r,layer:n}){const{description:o,label:i,text:s,textFormat:a}=e,{fieldsIndex:l}=n,m=s&&"markdown"===a?await L(s):s,d=new C({compiledText:m,description:o,fieldsIndex:l,label:i}),p=await I({element:e,expressionInfos:r,provider:t}),{expressionParts:c}=d;if(c.length){const e=await Promise.all(c.map(e=>{const n=r.get(e)?.expression??e;return t.getArcadeExecutor(n)}));p.textExpressions=e}return d.addLayer(n,p),d}async function $(e,t){const{associationTypes:r,description:n,label:o}=e,{arcadeExecutorProvider:i,expressionInfos:s,layer:a}=t,l=new A({associationTypes:r,description:n,label:o}),m=await I({element:e,expressionInfos:s,provider:i});return l.addLayer(a,m),l}async function q(e,{arcadeExecutorProvider:t,layer:r,formTimeZone:n}){const i=o(e,r)||e.name,s=new F({field:e,label:i,formTimeZone:n,layerTimeZone:J(r)}),a={},l=(w(r)||y(r))&&r.subtypeField&&r.subtypeField.toLowerCase()===e.name.toLowerCase();return!l&&e.editable&&r.userHasUpdateItemPrivileges&&(a.editableExpression=await t.getArcadeExecutor("true")),l&&(a.editableExpression=await t.getArcadeExecutor("false")),s.addLayer(r,a),s}function D(e,t,r){return!r.has(e.name.toLowerCase())&&x(e,t)}function J(e){return y(e)&&e.parent&&(e=e.parent),e&&"datesInUnknownTimezone"in e&&e.datesInUnknownTimezone?E:e&&"preferredTimeZone"in e&&e.preferredTimeZone?e.preferredTimeZone:null}export{k as createBatchFormTemplate,B as createBatchFormTemplateFromFields};
2
+ import{createArcadeProfile as e,createArcadeExecutor as t}from"../../../../arcade.js";import r from"../../../../core/Error.js";import o from"../../../../core/Logger.js";import{getEffectiveFieldAlias as n}from"../../../../editing/fieldUtils.js";import i from"../../../../form/ExpressionInfo.js";import s from"../../../../form/elements/AttachmentElement.js";import{isMultipleChoiceInput as a}from"../../../../form/elements/inputs/inputUtils.js";import{isAttachmentElement as l,isFieldElement as m,isGroupElement as d,isRelationshipElement as p,isTextElement as c,isUtilityNetworkAssociationsElement as f}from"../../../../form/support/formUtils.js";import{getLowerCaseEditTrackingFields as u,isFieldVisibleByDefault as x}from"../../../../layers/support/fieldUtils.js";import{isSubtypeSublayer as y,isSubtypeGroupLayer as h}from"../../../../layers/support/layerUtils.js";import{isNumber as w}from"../../../../support/guards.js";import{layerSupportsQueryAttachments as E,getLayerTimeZone as b}from"../../batchAttributeFormUtils.js";import{makeExpressionInfosMap as v,makeExecutorSetForFormElement as I}from"../../expressions/expressionUtils.js";import{AttachmentElementTemplate as T}from"../AttachmentElementTemplate.js";import F from"../BatchFormTemplate.js";import{FieldElementTemplate as j}from"../FieldElementTemplate.js";import{GroupElementTemplate as P}from"../GroupElementTemplate.js";import{RelationshipElementTemplate as g}from"../RelationshipElementTemplate.js";import{TextElementTemplate as C}from"../TextElementTemplate.js";import{UtilityNetworkAssociationsElementTemplate as A}from"../UtilityNetworkAssociationsElementTemplate.js";import{isGroupElementTemplate as L}from"./templateUtils.js";import{compileTextElementMarkdownToHTML as U}from"./textElementTemplateUtils.js";const Z="expression/dea57012-47ca4b55a000-8df62742ed0c",N=e("form-attachment-filename-calculation"),B=()=>o.getLogger("esri.widgets.BatchAttributeForm.templates.templateUtils");async function H(e,t,r=e.formTemplate){return await e.load(),r?.elements&&r.elements.length>0?W(r,e,t):R(e,t)}async function R(e,{arcadeExecutorProvider:t,attachmentsEnabled:r,formTimeZone:o}){const n=new Set(u(e)),i={arcadeExecutorProvider:t,formTimeZone:o,layer:e},s=[];for(const l of e.fields)J(l,e,n)&&s.push(D(l,i));const a=await Promise.all(s);return r&&await V(a,{arcadeExecutorProvider:t,expressionInfos:v(void 0),layer:e}),new F({elements:a,title:e.formTemplate?.title,preserveFieldValuesWhenHidden:!0})}function S(e,t){for(const r of e??[])if("group"!==r.type){if("field"===r.type){if(!1===r.editable&&!r.editableExpression)return!0;if(t.subtypeField&&(y(t)||h(t))&&r.fieldName?.toLowerCase()===t.subtypeField.toLowerCase())return!0}}else if(S(r.elements??[],t))return!0;return!1}async function V(e,{arcadeExecutorProvider:t,expressionInfos:r,layer:o}){if(!E(o))return;const n=await k(new s({displayFilename:!0}),{arcadeExecutorProvider:t,expressionInfos:r,layer:o});e.push(n)}async function W(e,t,r){let o=null;S(e.elements??[],t)&&(o=new i({title:"",name:Z,expression:"false"}));const n=v(o?[...e.expressionInfos??[],o]:e.expressionInfos),s={description:e.description,elements:new Array,title:e.title,preserveFieldValuesWhenHidden:e.preserveFieldValuesWhenHidden,supportsAttachmentElements:e.supportsAttachmentElements},{elements:a}=e;if(!a)return new F(s);let l=!1;const{arcadeExecutorProvider:m,formTimeZone:d}=r;for(const i of a){const e=await K(i,{arcadeExecutorProvider:m,expressionInfos:n,layer:t,formTimeZone:d});if(e){if(s.elements.push(e),l)continue;"attachment"===e.type&&(l=!0),L(e)&&e.elements.some(e=>("attachment"===e.type&&(l=!0),l))}}return e.supportsAttachmentElements||!r.attachmentsEnabled||l||await V(s.elements,{arcadeExecutorProvider:m,expressionInfos:n,layer:t}),new F(s)}async function k(e,{arcadeExecutorProvider:r,expressionInfos:o,layer:n}){let i=null;if(e.filenameExpression)try{i=await t(e.filenameExpression,N)}catch(l){B().error("Failed to compile attachment filename expression",l)}const s=new T({allowUserRename:e.allowUserRename,attachmentKeyword:e.attachmentKeyword,description:e.description,displayFilename:e.displayFilename,filenameExpressionExecutor:i,input:e.input,label:e.label,maxAttachmentCount:e.maxAttachmentCount,minAttachmentCount:e.minAttachmentCount,useOriginalFilename:e.useOriginalFilename}),a=await I({element:e,expressionInfos:o,provider:r});return s.addLayer(n,a),s}async function K(e,t){return l(e)?k(e,{arcadeExecutorProvider:t.arcadeExecutorProvider,expressionInfos:t.expressionInfos,layer:t.layer}):m(e)?O(e,t):d(e)?G(e,t):p(e)?$(e,t):c(e)?q(e,t):f(e)?z(e,t):null}async function O(e,{arcadeExecutorProvider:t,expressionInfos:o,layer:n,formTimeZone:i}){const{fieldsIndex:s}=n,{description:l,domain:m,fieldName:d,hint:p,input:c,label:f}=e;if(null==d||!s.has(d))return B().warn(new r("batch-attribute-form:invalid-form-element-field",`Field element with label '${f}' does not refer to a valid field`)),null;if(!1!==e.editable||e.editableExpression||((e=e.clone()).editableExpression=Z),n.subtypeField&&(y(n)||h(n))&&e.fieldName?.toLowerCase()===n.subtypeField.toLowerCase()&&((e=e.clone()).editableExpression=Z),c&&a(c)&&c.otherChoice){const e=c.otherChoice.fieldName,t=s.get(e);t&&t.name!==e&&(c.otherChoice=c.otherChoice.clone(),c.otherChoice.fieldName=t.name)}const u=new j({description:l,domain:m,field:s.get(d),hint:p,input:c,formTimeZone:i,layerTimeZone:b(n),label:f}),x=await I({element:e,expressionInfos:o,provider:t});return u.addLayer(n,x),u}async function G(e,t){const{arcadeExecutorProvider:r,expressionInfos:o,layer:n}=t,{description:i,label:s,initialState:a}=e,l=[];for(const p of e.elements){const e=await K(p,t);e&&l.push(e)}const m=new P({description:i,elements:l,label:s,initialState:a??"expanded"}),d=await I({element:e,expressionInfos:o,provider:r});return m.addLayer(n,d),m}async function $(e,t){const{description:r,label:o,displayCount:n,displayType:i,orderByFields:s,relationshipId:a}=e,{arcadeExecutorProvider:l,expressionInfos:m,layer:d}=t,p=new g({description:r,...w(n)&&{displayCount:n},displayType:i,label:o,orderByFields:s,relationshipId:a}),c=await I({element:e,expressionInfos:m,provider:l});return p.addLayer(d,c),p}async function q(e,{arcadeExecutorProvider:t,expressionInfos:r,layer:o}){const{description:n,label:i,text:s,textFormat:a}=e,{fieldsIndex:l}=o,m=s&&"markdown"===a?await U(s):s,d=new C({compiledText:m,description:n,fieldsIndex:l,label:i}),p=await I({element:e,expressionInfos:r,provider:t}),{expressionParts:c}=d;if(c.length){const e=await Promise.all(c.map(e=>{const o=r.get(e)?.expression??e;return t.getArcadeExecutor(o)}));p.textExpressions=e}return d.addLayer(o,p),d}async function z(e,t){const{associationTypes:r,description:o,label:n}=e,{arcadeExecutorProvider:i,expressionInfos:s,layer:a}=t,l=new A({associationTypes:r,description:o,label:n}),m=await I({element:e,expressionInfos:s,provider:i});return l.addLayer(a,m),l}async function D(e,{arcadeExecutorProvider:t,layer:r,formTimeZone:o}){const i=n(e,r)||e.name,s=new j({field:e,label:i,formTimeZone:o,layerTimeZone:b(r)}),a={},l=(h(r)||y(r))&&r.subtypeField&&r.subtypeField.toLowerCase()===e.name.toLowerCase();return!l&&e.editable&&r.userHasUpdateItemPrivileges&&(a.editableExpression=await t.getArcadeExecutor("true")),l&&(a.editableExpression=await t.getArcadeExecutor("false")),s.addLayer(r,a),s}function J(e,t,r){return!r.has(e.name.toLowerCase())&&x(e,t)}export{H as createBatchFormTemplate,R as createBatchFormTemplateFromFields};
@@ -6,7 +6,8 @@ import type OrientedImageryLayer from "../../layers/OrientedImageryLayer.js";
6
6
  import type SceneLayer from "../../layers/SceneLayer.js";
7
7
  import type KnowledgeGraphSublayer from "../../layers/knowledgeGraph/KnowledgeGraphSublayer.js";
8
8
  import type SubtypeSublayer from "../../layers/support/SubtypeSublayer.js";
9
- import type { AttachmentEdit } from "../../editing/types.js";
9
+ import type AttachmentInfo from "../../rest/query/support/AttachmentInfo.js";
10
+ import type { AttachmentEdit, FeatureIdentifier } from "../../editing/types.js";
10
11
  import type { FieldValue } from "../../layers/support/fieldUtils.js";
11
12
 
12
13
  /**
@@ -97,13 +98,38 @@ export interface PendingAttachmentEdits {
97
98
  *
98
99
  * @since 5.1
99
100
  */
100
- update: AttachmentEdit[];
101
+ update: PendingAttachmentUpdate[];
101
102
  /**
102
- * Attachment globalIds staged to be deleted.
103
+ * Attachments staged to be deleted.
103
104
  *
104
105
  * @since 5.1
105
106
  */
106
- delete: string[];
107
+ delete: AttachmentInfo[];
108
+ }
109
+
110
+ /**
111
+ * Attachment update staged for a single attachment element.
112
+ *
113
+ * @since 5.1
114
+ */
115
+ export interface PendingAttachmentUpdate {
116
+ /**
117
+ * Feature identifier associated with the attachment update.
118
+ *
119
+ * @since 5.1
120
+ */
121
+ feature: FeatureIdentifier;
122
+ /**
123
+ * Attachment update details.
124
+ *
125
+ * @since 5.1
126
+ */
127
+ attachment: {
128
+ info: AttachmentInfo;
129
+ contentType?: string;
130
+ data?: Blob | File | string;
131
+ name?: string;
132
+ };
107
133
  }
108
134
 
109
135
  /** @since 5.0 */
@@ -163,6 +189,8 @@ export interface AttachmentsChangeEvent {
163
189
  */
164
190
  export interface SelectedAttachmentIdentifier {}
165
191
 
192
+ export type ValueChangeActor = "user" | "expression";
193
+
166
194
  /** @since 5.0 */
167
195
  export interface ValueChangeEvent {
168
196
  /**
@@ -204,18 +232,32 @@ export interface ValuesChangeEvent {
204
232
  */
205
233
  data: ValuesChangeData[];
206
234
  /**
207
- * The field whose value was interactively changed.
208
- * Additional field changes caused by expressions are included in [ValuesChangeData](https://developers.arcgis.com/javascript/latest/references/core/widgets/BatchAttributeForm/types/#ValuesChangeData-changes).
235
+ * The field whose value was interactively changed. The
236
+ * [event data](https://developers.arcgis.com/javascript/latest/references/core/widgets/BatchAttributeForm/types/#ValuesChangeData-changes)
237
+ * may include changes to additional fields that were triggered by
238
+ * expressions.
239
+ *
240
+ * For events where the source is expressions, this field will be undefined,
241
+ * no field is interactively changed in these cases.
209
242
  *
210
243
  * @since 5.1
211
244
  */
212
- fieldName: string;
245
+ fieldName?: string;
213
246
  /**
214
247
  * The name of the event.
215
248
  *
216
249
  * @since 5.1
217
250
  */
218
251
  name: "values-change";
252
+ /**
253
+ * Indicates whether the root cause of the values changing.
254
+ *
255
+ * Value | Description
256
+ * ------| -----------
257
+ * "user" | The value changes originated from a user-initiated change. The event may include expression-driven changes that were triggered as a result of the change the user made.
258
+ * "expression" | All value changes are the result of expressions evaluations, and the expressions were evaluated due to some condition other than a user-intiated value change. For example, the expressions were intially evaluated when the form was loaded.
259
+ */
260
+ source: ValueChangeActor;
219
261
  }
220
262
 
221
263
  /**