@arcgis/core 5.2.0-next.15 → 5.2.0-next.17

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 (892) 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 -1
  9. package/assets/esri/core/t9n/Units_ar.json +1 -1
  10. package/assets/esri/core/t9n/Units_bg.json +1 -1
  11. package/assets/esri/core/t9n/Units_bs.json +1 -1
  12. package/assets/esri/core/t9n/Units_ca.json +1 -1
  13. package/assets/esri/core/t9n/Units_cs.json +1 -1
  14. package/assets/esri/core/t9n/Units_da.json +1 -1
  15. package/assets/esri/core/t9n/Units_de.json +1 -1
  16. package/assets/esri/core/t9n/Units_el.json +1 -1
  17. package/assets/esri/core/t9n/Units_es.json +1 -1
  18. package/assets/esri/core/t9n/Units_et.json +1 -1
  19. package/assets/esri/core/t9n/Units_fi.json +1 -1
  20. package/assets/esri/core/t9n/Units_fr.json +1 -1
  21. package/assets/esri/core/t9n/Units_he.json +1 -1
  22. package/assets/esri/core/t9n/Units_hr.json +1 -1
  23. package/assets/esri/core/t9n/Units_hu.json +1 -1
  24. package/assets/esri/core/t9n/Units_id.json +1 -1
  25. package/assets/esri/core/t9n/Units_it.json +1 -1
  26. package/assets/esri/core/t9n/Units_ja.json +1 -1
  27. package/assets/esri/core/t9n/Units_ko.json +1 -1
  28. package/assets/esri/core/t9n/Units_lt.json +1 -1
  29. package/assets/esri/core/t9n/Units_lv.json +1 -1
  30. package/assets/esri/core/t9n/Units_nl.json +1 -1
  31. package/assets/esri/core/t9n/Units_no.json +1 -1
  32. package/assets/esri/core/t9n/Units_pl.json +1 -1
  33. package/assets/esri/core/t9n/Units_pt-BR.json +1 -1
  34. package/assets/esri/core/t9n/Units_pt-PT.json +1 -1
  35. package/assets/esri/core/t9n/Units_ro.json +1 -1
  36. package/assets/esri/core/t9n/Units_ru.json +1 -1
  37. package/assets/esri/core/t9n/Units_sk.json +1 -1
  38. package/assets/esri/core/t9n/Units_sl.json +1 -1
  39. package/assets/esri/core/t9n/Units_sr.json +1 -1
  40. package/assets/esri/core/t9n/Units_sv.json +1 -1
  41. package/assets/esri/core/t9n/Units_th.json +1 -1
  42. package/assets/esri/core/t9n/Units_tr.json +1 -1
  43. package/assets/esri/core/t9n/Units_uk.json +1 -1
  44. package/assets/esri/core/t9n/Units_vi.json +1 -1
  45. package/assets/esri/core/t9n/Units_zh-CN.json +1 -1
  46. package/assets/esri/core/t9n/Units_zh-HK.json +1 -1
  47. package/assets/esri/core/t9n/Units_zh-TW.json +1 -1
  48. package/assets/esri/core/workers/RemoteClient.js +1 -1
  49. package/assets/esri/core/workers/chunks/007485862ce95928717a.js +1 -0
  50. package/assets/esri/core/workers/chunks/00bcb04934972179b9ca.js +1 -0
  51. package/assets/esri/core/workers/chunks/{d9d4754062758789f186.js → 05016e5a1de384994001.js} +2 -2
  52. package/assets/esri/core/workers/chunks/05b6b2c0b76afb100e33.js +1 -0
  53. package/assets/esri/core/workers/chunks/{8927fb4aa68f7e541a39.js → 05d597dd117766beadd8.js} +1 -1
  54. package/assets/esri/core/workers/chunks/073ee52705ea326fecfb.js +1 -0
  55. package/assets/esri/core/workers/chunks/0a52373c4ba652e0ee0f.js +1 -0
  56. package/assets/esri/core/workers/chunks/0b522e05668bef729b1b.js +1 -0
  57. package/assets/esri/core/workers/chunks/0d42322362e76f674d94.js +2 -0
  58. package/assets/esri/core/workers/chunks/{a442534ac0956a68b769.js → 0e81b6aa64d5491870b2.js} +1 -1
  59. package/assets/esri/core/workers/chunks/{81e3bd1a0634ddc2b833.js → 0f10d7d592c36ee2d1ea.js} +1 -1
  60. package/assets/esri/core/workers/chunks/{3526ab3b1f87c24ae6f8.js → 0fb685f385e91d0f0601.js} +1 -1
  61. package/assets/esri/core/workers/chunks/{cdf6ad970dc1893dac58.js → 110135b0562a3b5708b9.js} +1 -1
  62. package/assets/esri/core/workers/chunks/11d1af758e2140095b10.js +1 -0
  63. package/assets/esri/core/workers/chunks/122892f365f5327d290c.js +1 -0
  64. package/assets/esri/core/workers/chunks/1305690054214a9cf48d.js +1 -0
  65. package/assets/esri/core/workers/chunks/168c15cf462f9abcbdd2.js +1 -0
  66. package/assets/esri/core/workers/chunks/169bfafec4d59be2beb0.js +1 -0
  67. package/assets/esri/core/workers/chunks/1d2609ce6220b5af5526.js +1 -0
  68. package/assets/esri/core/workers/chunks/1e109a521ca8772fdf04.js +1 -0
  69. package/assets/esri/core/workers/chunks/1ea840b7ac1ffaa0c389.js +1 -0
  70. package/assets/esri/core/workers/chunks/1f48438b3055afeb710f.js +1 -0
  71. package/assets/esri/core/workers/chunks/2353fbc1ff4481dcfb1f.js +1 -0
  72. package/assets/esri/core/workers/chunks/2509da565e5a2b43ac7f.js +1 -0
  73. package/assets/esri/core/workers/chunks/255c8e937e7a123ebb04.js +1 -0
  74. package/assets/esri/core/workers/chunks/256cc116e3be4feee593.js +1 -0
  75. package/assets/esri/core/workers/chunks/26aa8190ac439f634c5b.js +1 -0
  76. package/assets/esri/core/workers/chunks/29e6f4b19c3da9129439.js +1 -0
  77. package/assets/esri/core/workers/chunks/{45b560ca01fb566ba560.js → 2a8d791aef3123e6a3c4.js} +1 -1
  78. package/assets/esri/core/workers/chunks/2baee42e1797a709fe4b.js +1 -0
  79. package/assets/esri/core/workers/chunks/2c017eae434254610c8e.js +1 -0
  80. package/assets/esri/core/workers/chunks/2d7a4b669804d0c5029b.js +1 -0
  81. package/assets/esri/core/workers/chunks/2f40193d1b2e534c5226.js +1 -0
  82. package/assets/esri/core/workers/chunks/303e723e829ea7088d43.js +1 -0
  83. package/assets/esri/core/workers/chunks/31c4128b23968575feca.js +1 -0
  84. package/assets/esri/core/workers/chunks/35533c8ef541f7643497.js +2 -0
  85. package/assets/esri/core/workers/chunks/35a508a9311689d8df52.js +1 -0
  86. package/assets/esri/core/workers/chunks/36913f0f944a9eb82cd3.js +1 -0
  87. package/assets/esri/core/workers/chunks/3a35779cae6a11cde51b.js +1 -0
  88. package/assets/esri/core/workers/chunks/3a526e1d18490b99332f.js +1 -0
  89. package/assets/esri/core/workers/chunks/{cc62e5095e328bed3e01.js → 3aa0a34d2b7dbf2e2c66.js} +1 -1
  90. package/assets/esri/core/workers/chunks/3d4ad7c728e02aa90551.js +1 -0
  91. package/assets/esri/core/workers/chunks/3e89f487c5851c954d8b.js +1 -0
  92. package/assets/esri/core/workers/chunks/436d51b9f1b1b5abc4bc.js +1 -0
  93. package/assets/esri/core/workers/chunks/43ef6dee2e1d9ed7885e.js +1 -0
  94. package/assets/esri/core/workers/chunks/442424200e7475e9a08f.js +1 -0
  95. package/assets/esri/core/workers/chunks/4b96aa2dc5b88846bb53.js +1 -0
  96. package/assets/esri/core/workers/chunks/4ea325c829d3b82854b1.js +1 -0
  97. package/assets/esri/core/workers/chunks/50c88e2545380800381f.js +1 -0
  98. package/assets/esri/core/workers/chunks/51a53011478e0cf96e0b.js +1 -0
  99. package/assets/esri/core/workers/chunks/51a8a47aac1d8d22ba9d.js +1 -0
  100. package/assets/esri/core/workers/chunks/5481af25fd46914498df.js +1 -0
  101. package/assets/esri/core/workers/chunks/54f54623532f633dc0e2.js +1 -0
  102. package/assets/esri/core/workers/chunks/{bfd1aef8ac795e1ce227.js → 57a6572d440d2c62432b.js} +1 -1
  103. package/assets/esri/core/workers/chunks/5809e70a8e57e9b05959.js +1 -0
  104. package/assets/esri/core/workers/chunks/589b31cc5c663a288942.js +1 -0
  105. package/assets/esri/core/workers/chunks/58ce4bcfb15f378b1b9f.js +1 -0
  106. package/assets/esri/core/workers/chunks/58e0e50b6c3abaa4798f.js +1 -0
  107. package/assets/esri/core/workers/chunks/595bc41ff36c77324d01.js +261 -0
  108. package/assets/esri/core/workers/chunks/599bd80379423c99799d.js +1 -0
  109. package/assets/esri/core/workers/chunks/5bf01e0eff8a78b65e9e.js +1 -0
  110. package/assets/esri/core/workers/chunks/5dfeefee96659832398a.js +1 -0
  111. package/assets/esri/core/workers/chunks/{011a4d4201696fa10408.js → 5ea1113b7bdcf94b2822.js} +1 -1
  112. package/assets/esri/core/workers/chunks/5fab14c5f1febebb75f1.js +1 -0
  113. package/assets/esri/core/workers/chunks/60d4a3f770bb1e01cd10.js +1 -0
  114. package/assets/esri/core/workers/chunks/63858dfcff1177e597e7.js +1 -0
  115. package/assets/esri/core/workers/chunks/6849282c4a5cd733779d.js +1 -0
  116. package/assets/esri/core/workers/chunks/686c1a1b794ebe1a0341.js +1 -0
  117. package/assets/esri/core/workers/chunks/6a21a22b08f968fa8d60.js +1 -0
  118. package/assets/esri/core/workers/chunks/{11c3b1e8ca21ad62fdd1.js → 6db5ee9c589265b23b60.js} +1 -1
  119. package/assets/esri/core/workers/chunks/6dc60afb0c39bbb001a3.js +1 -0
  120. package/assets/esri/core/workers/chunks/{5bfae465872760e7af6d.js → 6f240fe78b299e6c4fcc.js} +1 -1
  121. package/assets/esri/core/workers/chunks/70cb825bb37f1977d2ab.js +1 -0
  122. package/assets/esri/core/workers/chunks/71a593fa116770e58832.js +1 -0
  123. package/assets/esri/core/workers/chunks/71f09e34d56c9fe5c307.js +1 -0
  124. package/assets/esri/core/workers/chunks/{72cfb186e50537bcdd19.js → 75915f81caaf9e5345a9.js} +1 -1
  125. package/assets/esri/core/workers/chunks/7832d94f35b79e27ee51.js +1 -0
  126. package/assets/esri/core/workers/chunks/8104ac2eee69d79ada86.js +1 -0
  127. package/assets/esri/core/workers/chunks/818a481ce579f519de1c.js +1 -0
  128. package/assets/esri/core/workers/chunks/831455798b177678720c.js +1 -0
  129. package/assets/esri/core/workers/chunks/83ce38342796bd6d73ce.js +1 -0
  130. package/assets/esri/core/workers/chunks/84a0bb53fcbd99b5aa0c.js +1 -0
  131. package/assets/esri/core/workers/chunks/87b86375f8557418dbe6.js +1 -0
  132. package/assets/esri/core/workers/chunks/8817d25c7f4cf0e6c6bd.js +1 -0
  133. package/assets/esri/core/workers/chunks/{0b55fc5050e718371e05.js → 888af532ad48fd86f285.js} +1 -1
  134. package/assets/esri/core/workers/chunks/{9331969046f2b277d620.js → 8a39dd585742960d3ca2.js} +1 -1
  135. package/assets/esri/core/workers/chunks/8ade399db21938822a7c.js +1 -0
  136. package/assets/esri/core/workers/chunks/8c62e2dabd1f1e13d244.js +1 -0
  137. package/assets/esri/core/workers/chunks/909e88c27d80777b047c.js +1 -0
  138. package/assets/esri/core/workers/chunks/91c5205d1274c7f190d5.js +1 -0
  139. package/assets/esri/core/workers/chunks/91c543443cd6768ad6ff.js +1 -0
  140. package/assets/esri/core/workers/chunks/9230ad807020fc2bbf8e.js +1 -0
  141. package/assets/esri/core/workers/chunks/92458803531fdfe1557a.js +1 -0
  142. package/assets/esri/core/workers/chunks/{976ab2be6c244768c08a.js → 940ebb13618d38c6b459.js} +1 -1
  143. package/assets/esri/core/workers/chunks/987594539981483a7c5e.js +1 -0
  144. package/assets/esri/core/workers/chunks/99c002015c2127e6cbfc.js +2 -0
  145. package/assets/esri/core/workers/chunks/9d59cc5c0a63a4e41d99.js +1 -0
  146. package/assets/esri/core/workers/chunks/{91c0de3950991d81b7f2.js → 9de673a04c70bd47047e.js} +1 -1
  147. package/assets/esri/core/workers/chunks/a195f569eada3a8736be.js +1 -0
  148. package/assets/esri/core/workers/chunks/a32651777e4f07df5b6a.js +1 -0
  149. package/assets/esri/core/workers/chunks/a3393780655152102c45.js +1 -0
  150. package/assets/esri/core/workers/chunks/a3c5b754a6fa0f4250bf.js +1 -0
  151. package/assets/esri/core/workers/chunks/{52175ff9e8c2c136f90a.js → a3ecde3794a7db3cf283.js} +1 -1
  152. package/assets/esri/core/workers/chunks/a59a1fdcd37a875f179b.js +1 -0
  153. package/assets/esri/core/workers/chunks/a844c4e031e77db11478.js +1 -0
  154. package/assets/esri/core/workers/chunks/a99ce2f12c8204ee542a.js +1 -0
  155. package/assets/esri/core/workers/chunks/aba7a053015a9738d8a0.js +1 -0
  156. package/assets/esri/core/workers/chunks/{c8460bdf60aca749ed05.js → ac16016964be3b684e98.js} +1 -1
  157. package/assets/esri/core/workers/chunks/adce59e4111bae4225f7.js +1 -0
  158. package/assets/esri/core/workers/chunks/aeeee92b86554962711e.js +1 -0
  159. package/assets/esri/core/workers/chunks/af3b060fdfa3b6174340.js +1 -0
  160. package/assets/esri/core/workers/chunks/b0e4af49fc968b0a910f.js +1 -0
  161. package/assets/esri/core/workers/chunks/b289c46ce2dc04d32e81.js +1 -0
  162. package/assets/esri/core/workers/chunks/{c983e5ce0ff952b65d7f.js → b2b342b06d502fc61ea5.js} +1 -1
  163. package/assets/esri/core/workers/chunks/b466af9019f10420115e.js +1 -0
  164. package/assets/esri/core/workers/chunks/{67ebde34377f98d17cda.js → b5571e93bc136dac8ee1.js} +1 -1
  165. package/assets/esri/core/workers/chunks/ba1c4a8794ac55942e35.js +1 -0
  166. package/assets/esri/core/workers/chunks/bb9232d9f63ec0c32447.js +1 -0
  167. package/assets/esri/core/workers/chunks/bbcad2fde838819ffc7b.js +1 -0
  168. package/assets/esri/core/workers/chunks/bd260798b8de09a1eeb2.js +1 -0
  169. package/assets/esri/core/workers/chunks/{44d0ca9d4c5f1722688c.js → bf67e0f6064fb9d94ac8.js} +1 -1
  170. package/assets/esri/core/workers/chunks/bf9eca7dd107bdb06614.js +1 -0
  171. package/assets/esri/core/workers/chunks/c030a974a63155f450e9.js +1 -0
  172. package/assets/esri/core/workers/chunks/c0b7b9d115dccb2924ff.js +1 -0
  173. package/assets/esri/core/workers/chunks/c2db773201adca204f95.js +1 -0
  174. package/assets/esri/core/workers/chunks/c318e6dbb8651433038f.js +2 -0
  175. package/assets/esri/core/workers/chunks/c4a2ec2e5897300163ac.js +1 -0
  176. package/assets/esri/core/workers/chunks/c63b315c6b76b4860fc5.js +1 -0
  177. package/assets/esri/core/workers/chunks/c8091e8fd7ca43a4490a.js +1 -0
  178. package/assets/esri/core/workers/chunks/{2413b383b7f2bdcd4ced.js → c8672a54c98d472aa24d.js} +1 -1
  179. package/assets/esri/core/workers/chunks/cbe8adc100582e746a8c.js +1 -0
  180. package/assets/esri/core/workers/chunks/d0321dd4b5b2d863eecd.js +1 -0
  181. package/assets/esri/core/workers/chunks/d523af1db620b5381c99.js +1 -0
  182. package/assets/esri/core/workers/chunks/d5a0e3a73df827dc7b06.js +1 -0
  183. package/assets/esri/core/workers/chunks/d670e134348954ce465d.js +1 -0
  184. package/assets/esri/core/workers/chunks/{886ae23a1d8fa21e531f.js → d750e4abeb777caa8c36.js} +1 -1
  185. package/assets/esri/core/workers/chunks/{bd36c57dd0cd28dee55f.js → d7acbc2ddff4cee8a465.js} +1 -1
  186. package/assets/esri/core/workers/chunks/{cb8c4d8334fab9bd9a04.js → d90bc34d97bb21c29c40.js} +1 -1
  187. package/assets/esri/core/workers/chunks/d9fcc63df008f687848a.js +1 -0
  188. package/assets/esri/core/workers/chunks/db96a0c66578b2d1b715.js +1 -0
  189. package/assets/esri/core/workers/chunks/{6a1b6f8c868f8edce1d7.js → dd3b0070081eaf805d95.js} +1 -1
  190. package/assets/esri/core/workers/chunks/dd5dddf7e422216d3806.js +1 -0
  191. package/assets/esri/core/workers/chunks/de83c177f8a1234a5b2e.js +1 -0
  192. package/assets/esri/core/workers/chunks/{07ca020796c57cefda62.js → dfb19701b488089874fd.js} +1 -1
  193. package/assets/esri/core/workers/chunks/e2f33945d838183a2192.js +1 -0
  194. package/assets/esri/core/workers/chunks/e3ea4b7217df16592def.js +1 -0
  195. package/assets/esri/core/workers/chunks/{d97c0c18202b8c578f8c.js → e5471373f89fd7cb9844.js} +1 -1
  196. package/assets/esri/core/workers/chunks/e65d291bab13f7f5323b.js +1 -0
  197. package/assets/esri/core/workers/chunks/e95ee94027c1934086d8.js +1 -0
  198. package/assets/esri/core/workers/chunks/ecbf84a1f42e6188faab.js +1 -0
  199. package/assets/esri/core/workers/chunks/efaa1d05705f6b450e8f.js +1 -0
  200. package/assets/esri/core/workers/chunks/efaf998d18479a0380ae.js +1 -0
  201. package/assets/esri/core/workers/chunks/f0573db9a3d3e1499a7e.js +1 -0
  202. package/assets/esri/core/workers/chunks/f07722efd7fa2b75d4dd.js +1 -0
  203. package/assets/esri/core/workers/chunks/{520e0e5307eef27becc6.js → f0924613f818dd165ad9.js} +1 -1
  204. package/assets/esri/core/workers/chunks/{8b0a01ebc86ab226f01f.js → f23351a04643c464be84.js} +1 -1
  205. package/assets/esri/core/workers/chunks/f3d331da3c61af5c5a2f.js +1 -0
  206. package/assets/esri/core/workers/chunks/f3fe865506fd7428eb6d.js +1 -0
  207. package/assets/esri/core/workers/chunks/{3d20c86f1fe877bf884b.js → f59b76fde2cbd17f64b3.js} +1 -1
  208. package/assets/esri/core/workers/chunks/f6afc597eaf2afa9a4a0.js +1 -0
  209. package/assets/esri/core/workers/chunks/{ed2a1c371dfc5d4a744e.js → f7f820483e45c05ab9e4.js} +2 -2
  210. package/assets/esri/core/workers/chunks/f8cfd0045d06aa24beec.js +1 -0
  211. package/assets/esri/core/workers/chunks/f98bb3885bfc7f18f26c.js +1 -0
  212. package/assets/esri/core/workers/chunks/f9b44ff9bb4f7a88ab56.js +1 -0
  213. package/assets/esri/core/workers/chunks/{b102beeeb7a919f68b51.js → fb81705cec1be2431876.js} +1 -1
  214. package/assets/esri/core/workers/chunks/fd53ef66176ae164e221.js +1 -0
  215. package/assets/esri/core/workers/chunks/fd956a58787020d610af.js +1 -0
  216. package/assets/esri/core/workers/chunks/fdec3a2e100688c42e41.js +1 -0
  217. package/assets/esri/core/workers/chunks/fe6385115d76e16e8da0.js +1 -0
  218. package/assets/esri/core/workers/chunks/fedbeb488d5d7c07c7dc.js +1 -0
  219. package/assets/esri/core/workers/chunks/{d9695794cfaa014a55b1.js → ff00ac01f0baaecaa890.js} +1 -1
  220. package/assets/esri/libs/parquet/pkg/bundle_bg.wasm +0 -0
  221. package/assets/esri/themes/base/widgets/_BatchAttributeForm.scss +62 -90
  222. package/assets/esri/themes/base/widgets/_OrientedImageryViewer.scss +0 -2
  223. package/assets/esri/themes/dark/main.css +1 -1
  224. package/assets/esri/themes/light/main.css +1 -1
  225. package/assets/esri/themes/light/view.css +1 -1
  226. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_ar.json +1 -1
  227. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_bg.json +1 -1
  228. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_bs.json +1 -1
  229. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_ca.json +1 -1
  230. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_cs.json +1 -1
  231. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_da.json +1 -1
  232. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_de.json +1 -1
  233. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_el.json +1 -1
  234. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_es.json +1 -1
  235. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_et.json +1 -1
  236. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_fi.json +1 -1
  237. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_fr.json +1 -1
  238. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_he.json +1 -1
  239. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_hr.json +1 -1
  240. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_hu.json +1 -1
  241. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_id.json +1 -1
  242. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_it.json +1 -1
  243. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_ja.json +1 -1
  244. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_ko.json +1 -1
  245. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_lt.json +1 -1
  246. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_lv.json +1 -1
  247. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_nl.json +1 -1
  248. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_no.json +1 -1
  249. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_pl.json +1 -1
  250. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_pt-BR.json +1 -1
  251. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_pt-PT.json +1 -1
  252. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_ro.json +1 -1
  253. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_ru.json +1 -1
  254. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_sk.json +1 -1
  255. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_sl.json +1 -1
  256. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_sr.json +1 -1
  257. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_sv.json +1 -1
  258. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_th.json +1 -1
  259. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_tr.json +1 -1
  260. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_uk.json +1 -1
  261. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_vi.json +1 -1
  262. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_zh-CN.json +1 -1
  263. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_zh-HK.json +1 -1
  264. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_zh-TW.json +1 -1
  265. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_ar.json +1 -1
  266. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_bg.json +1 -1
  267. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_bs.json +1 -1
  268. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_ca.json +1 -1
  269. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_cs.json +1 -1
  270. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_da.json +1 -1
  271. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_de.json +1 -1
  272. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_el.json +1 -1
  273. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_es.json +1 -1
  274. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_et.json +1 -1
  275. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_fi.json +1 -1
  276. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_fr.json +1 -1
  277. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_he.json +1 -1
  278. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_hr.json +1 -1
  279. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_hu.json +1 -1
  280. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_id.json +1 -1
  281. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_it.json +1 -1
  282. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_ja.json +1 -1
  283. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_ko.json +1 -1
  284. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_lt.json +1 -1
  285. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_lv.json +1 -1
  286. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_nl.json +1 -1
  287. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_no.json +1 -1
  288. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_pl.json +1 -1
  289. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_pt-BR.json +1 -1
  290. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_pt-PT.json +1 -1
  291. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_ro.json +1 -1
  292. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_ru.json +1 -1
  293. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_sk.json +1 -1
  294. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_sl.json +1 -1
  295. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_sr.json +1 -1
  296. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_sv.json +1 -1
  297. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_th.json +1 -1
  298. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_tr.json +1 -1
  299. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_uk.json +1 -1
  300. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_vi.json +1 -1
  301. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_zh-CN.json +1 -1
  302. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_zh-HK.json +1 -1
  303. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_zh-TW.json +1 -1
  304. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ar.json +1 -1
  305. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_bg.json +1 -1
  306. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_bs.json +1 -1
  307. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ca.json +1 -1
  308. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_cs.json +1 -1
  309. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_da.json +1 -1
  310. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_de.json +1 -1
  311. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_el.json +1 -1
  312. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_es.json +1 -1
  313. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_et.json +1 -1
  314. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_fi.json +1 -1
  315. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_fr.json +1 -1
  316. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_he.json +1 -1
  317. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_hr.json +1 -1
  318. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_hu.json +1 -1
  319. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_id.json +1 -1
  320. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_it.json +1 -1
  321. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ja.json +1 -1
  322. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ko.json +1 -1
  323. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_lt.json +1 -1
  324. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_lv.json +1 -1
  325. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_nl.json +1 -1
  326. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_no.json +1 -1
  327. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_pl.json +1 -1
  328. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_pt-BR.json +1 -1
  329. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_pt-PT.json +1 -1
  330. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ro.json +1 -1
  331. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ru.json +1 -1
  332. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sk.json +1 -1
  333. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sl.json +1 -1
  334. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sr.json +1 -1
  335. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sv.json +1 -1
  336. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_th.json +1 -1
  337. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_tr.json +1 -1
  338. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_uk.json +1 -1
  339. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_vi.json +1 -1
  340. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_zh-CN.json +1 -1
  341. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_zh-HK.json +1 -1
  342. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_zh-TW.json +1 -1
  343. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ar.json +1 -1
  344. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_bg.json +1 -1
  345. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_bs.json +1 -1
  346. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ca.json +1 -1
  347. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_cs.json +1 -1
  348. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_da.json +1 -1
  349. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_de.json +1 -1
  350. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_el.json +1 -1
  351. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_es.json +1 -1
  352. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_et.json +1 -1
  353. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_fi.json +1 -1
  354. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_fr.json +1 -1
  355. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_he.json +1 -1
  356. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_hr.json +1 -1
  357. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_hu.json +1 -1
  358. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_id.json +1 -1
  359. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_it.json +1 -1
  360. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ja.json +1 -1
  361. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ko.json +1 -1
  362. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_lt.json +1 -1
  363. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_lv.json +1 -1
  364. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_nl.json +1 -1
  365. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_no.json +1 -1
  366. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_pl.json +1 -1
  367. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_pt-BR.json +1 -1
  368. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_pt-PT.json +1 -1
  369. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ro.json +1 -1
  370. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ru.json +1 -1
  371. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sk.json +1 -1
  372. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sl.json +1 -1
  373. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sr.json +1 -1
  374. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sv.json +1 -1
  375. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_th.json +1 -1
  376. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_tr.json +1 -1
  377. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_uk.json +1 -1
  378. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_vi.json +1 -1
  379. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_zh-CN.json +1 -1
  380. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_zh-HK.json +1 -1
  381. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_zh-TW.json +1 -1
  382. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ar.json +1 -1
  383. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_bg.json +1 -1
  384. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_bs.json +1 -1
  385. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ca.json +1 -1
  386. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_cs.json +1 -1
  387. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_da.json +1 -1
  388. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_de.json +1 -1
  389. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_el.json +1 -1
  390. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_es.json +1 -1
  391. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_et.json +1 -1
  392. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_fi.json +1 -1
  393. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_fr.json +1 -1
  394. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_he.json +1 -1
  395. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_hr.json +1 -1
  396. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_hu.json +1 -1
  397. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_id.json +1 -1
  398. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_it.json +1 -1
  399. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ja.json +1 -1
  400. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ko.json +1 -1
  401. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_lt.json +1 -1
  402. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_lv.json +1 -1
  403. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_nl.json +1 -1
  404. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_no.json +1 -1
  405. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pl.json +1 -1
  406. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pt-BR.json +1 -1
  407. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pt-PT.json +1 -1
  408. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ro.json +1 -1
  409. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ru.json +1 -1
  410. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sk.json +1 -1
  411. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sl.json +1 -1
  412. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sr.json +1 -1
  413. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sv.json +1 -1
  414. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_th.json +1 -1
  415. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_tr.json +1 -1
  416. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_uk.json +1 -1
  417. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_vi.json +1 -1
  418. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-CN.json +1 -1
  419. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-HK.json +1 -1
  420. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-TW.json +1 -1
  421. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_ar.json +1 -1
  422. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_bg.json +1 -1
  423. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_bs.json +1 -1
  424. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_ca.json +1 -1
  425. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_cs.json +1 -1
  426. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_da.json +1 -1
  427. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_de.json +1 -1
  428. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_el.json +1 -1
  429. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_es.json +1 -1
  430. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_et.json +1 -1
  431. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_fi.json +1 -1
  432. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_fr.json +1 -1
  433. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_he.json +1 -1
  434. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_hr.json +1 -1
  435. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_hu.json +1 -1
  436. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_id.json +1 -1
  437. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_it.json +1 -1
  438. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_ja.json +1 -1
  439. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_ko.json +1 -1
  440. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_lt.json +1 -1
  441. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_lv.json +1 -1
  442. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_nl.json +1 -1
  443. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_no.json +1 -1
  444. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_pl.json +1 -1
  445. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_pt-BR.json +1 -1
  446. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_pt-PT.json +1 -1
  447. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_ro.json +1 -1
  448. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_ru.json +1 -1
  449. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_sk.json +1 -1
  450. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_sl.json +1 -1
  451. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_sr.json +1 -1
  452. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_sv.json +1 -1
  453. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_th.json +1 -1
  454. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_tr.json +1 -1
  455. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_uk.json +1 -1
  456. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_vi.json +1 -1
  457. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_zh-CN.json +1 -1
  458. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_zh-HK.json +1 -1
  459. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_zh-TW.json +1 -1
  460. package/chunks/Bufferer-CclWhXVb.js +2 -0
  461. package/chunks/Distance2DCalculator-DjIp2uQi.js +2 -0
  462. package/chunks/Envelope.js +1 -1
  463. package/chunks/Envelope2D.js +1 -1
  464. package/chunks/GaussianSplatComposition.glsl.js +1 -1
  465. package/chunks/GeodeticDistanceCalculator-zRp89-dW.js +2 -0
  466. package/chunks/GeodeticUtils.js +1 -1
  467. package/chunks/Geometry.js +1 -1
  468. package/chunks/{GeometryCleaner-BEJM7I4l.js → GeometryCleaner-CIE8Wfmb.js} +1 -1
  469. package/chunks/GlowComposition.glsl.js +1 -1
  470. package/chunks/MultiPathImpl.js +1 -1
  471. package/chunks/OITBlend.glsl.js +1 -1
  472. package/chunks/OITDimOpaque.glsl.js +1 -1
  473. package/chunks/OperatorClip.js +1 -1
  474. package/chunks/OperatorCrosses.js +1 -1
  475. package/chunks/OperatorCut.js +1 -1
  476. package/chunks/OperatorDefinitions.js +1 -1
  477. package/chunks/OperatorDensify.js +1 -1
  478. package/chunks/OperatorGeneralize.js +1 -1
  479. package/chunks/OperatorGeodesicBuffer.js +1 -1
  480. package/chunks/OperatorGeodeticArea.js +1 -1
  481. package/chunks/OperatorGeodeticDensifyByLength.js +1 -1
  482. package/chunks/OperatorGeodeticDistance.js +1 -1
  483. package/chunks/OperatorGeodeticLength.js +1 -1
  484. package/chunks/OperatorGraphicBuffer.js +2 -0
  485. package/chunks/OperatorIntegrate.js +1 -1
  486. package/chunks/OperatorIntersects.js +1 -1
  487. package/chunks/OperatorMultiPartToSinglePart.js +1 -1
  488. package/chunks/OperatorOverlaps.js +1 -1
  489. package/chunks/OperatorProximity.js +1 -1
  490. package/chunks/OperatorProximityGeodesic.js +1 -1
  491. package/chunks/OperatorShapePreservingLength.js +1 -1
  492. package/chunks/OperatorShapePreservingProject.js +1 -1
  493. package/chunks/OperatorSimplifyOGC.js +1 -1
  494. package/chunks/OperatorTouches.js +1 -1
  495. package/chunks/OperatorWithin.js +1 -1
  496. package/chunks/Point2D.js +1 -1
  497. package/chunks/ProjectionTransformation.js +1 -1
  498. package/chunks/{SideCalculator2D-BNwb5gvz.js → SideCalculator2D-DX0718xq.js} +1 -1
  499. package/chunks/SimpleGeometryCursor.js +1 -1
  500. package/chunks/SpatialReference.js +1 -1
  501. package/chunks/Transformation2D.js +1 -1
  502. package/chunks/centroidOperator.js +1 -1
  503. package/chunks/containsOperator.js +1 -1
  504. package/chunks/disjointOperator.js +1 -1
  505. package/chunks/distanceOperator.js +1 -1
  506. package/chunks/equalsOperator.js +1 -1
  507. package/chunks/languageUtils.js +1 -1
  508. package/config.js +1 -1
  509. package/core/has.js +1 -1
  510. package/core/screenUtils.js +1 -1
  511. package/editing/types.d.ts +22 -2
  512. package/form/elements/UtilityNetworkAssociationsElement.d.ts +0 -1
  513. package/geometry/Mesh.d.ts +1 -1
  514. package/geometry/operators/extendOperator.js +1 -1
  515. package/geometry/operators/gx/operatorAffineTransform.js +1 -1
  516. package/geometry/operators/gx/operatorAlphaShape.js +1 -1
  517. package/geometry/operators/gx/operatorAutoComplete.js +1 -1
  518. package/geometry/operators/gx/operatorBoundary.js +1 -1
  519. package/geometry/operators/gx/operatorBuffer.js +1 -1
  520. package/geometry/operators/gx/operatorConvexHull.js +1 -1
  521. package/geometry/operators/gx/operatorDifference.js +1 -1
  522. package/geometry/operators/gx/operatorGraphicBuffer.js +1 -1
  523. package/geometry/operators/gx/operatorIntersection.js +1 -1
  524. package/geometry/operators/gx/operatorLabelPoint.js +1 -1
  525. package/geometry/operators/gx/operatorLinesToPolygons.js +1 -1
  526. package/geometry/operators/gx/operatorLocateBetween.js +1 -1
  527. package/geometry/operators/gx/operatorMinimumBoundingCircle.js +1 -1
  528. package/geometry/operators/gx/operatorOffset.js +1 -1
  529. package/geometry/operators/gx/operatorPolygonOverlay.js +1 -1
  530. package/geometry/operators/gx/operatorPolygonSlicer.js +1 -1
  531. package/geometry/operators/gx/operatorSinglePartToMultiPart.js +1 -1
  532. package/geometry/operators/gx/operatorSymmetricDifference.js +1 -1
  533. package/geometry/operators/gx/operatorUnion.js +1 -1
  534. package/geometry/operators/isNearOperator.js +1 -1
  535. package/geometry/operators/json/containsOperator.js +1 -1
  536. package/geometry/operators/json/disjointOperator.js +1 -1
  537. package/geometry/operators/reshapeOperator.js +1 -1
  538. package/geometry/operators/support/apiConverter.js +1 -1
  539. package/geometry/operators/support/initNoPeFactory.js +1 -1
  540. package/geometry/operators/support/jsonConverter.js +1 -1
  541. package/geometry/support/aaBoundingRect.js +1 -1
  542. package/graphic/AnnotationFeatureGraphicOrigin.d.ts +5 -2
  543. package/graphic/AnnotationFeatureGraphicOrigin.js +1 -1
  544. package/graphic/DimensionFeatureGraphicOrigin.js +1 -1
  545. package/graphic/graphicOrigins.js +1 -1
  546. package/graphic/isAnnotationFeatureGraphicOrigin.d.ts +29 -0
  547. package/graphic/isAnnotationFeatureGraphicOrigin.js +2 -0
  548. package/graphic/isDimensionFeatureGraphicOrigin.d.ts +29 -0
  549. package/graphic/isDimensionFeatureGraphicOrigin.js +2 -0
  550. package/interfaces.d.ts +3 -3
  551. package/kernel.js +1 -1
  552. package/layers/AnnotationFeatureLayer.d.ts +73 -0
  553. package/layers/AnnotationFeatureLayer.js +1 -1
  554. package/layers/FeatureLayer.d.ts +7 -4
  555. package/layers/FeatureLayer.js +1 -1
  556. package/layers/Lyr3DWasmPerSceneView.js +1 -1
  557. package/layers/ParquetLayer.js +1 -1
  558. package/layers/SubtypeGroupLayer.d.ts +7 -4
  559. package/layers/SubtypeGroupLayer.js +1 -1
  560. package/layers/graphics/applyEditsUtils.js +1 -1
  561. package/layers/graphics/data/QueryEngine.js +1 -1
  562. package/layers/graphics/sources/FeatureLayerSource.js +1 -1
  563. package/layers/graphics/sources/MemorySource.js +1 -1
  564. package/layers/graphics/sources/ParquetSource.js +1 -1
  565. package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
  566. package/layers/orientedImagery/core/coverageUtils.js +1 -1
  567. package/layers/orientedImagery/transformations/utils.js +1 -1
  568. package/layers/support/{AnnotationSublayer.d.ts → AnnotationFeatureSublayer.d.ts} +12 -12
  569. package/layers/support/AnnotationFeatureSublayer.js +2 -0
  570. package/layers/support/EditingCapabilities.js +1 -1
  571. package/layers/support/ParquetPortalItemData.js +1 -1
  572. package/layers/support/SubtypeSublayer.d.ts +7 -4
  573. package/layers/support/SubtypeSublayer.js +1 -1
  574. package/layers/support/featureLayerUtils.js +1 -1
  575. package/networks/CircuitManager.d.ts +247 -1
  576. package/networks/UnitIdentifierManager.d.ts +40 -3
  577. package/networks/UtilityNetwork.d.ts +0 -11
  578. package/networks/UtilityNetwork.js +1 -1
  579. package/networks/support/Circuit.d.ts +0 -1
  580. package/networks/support/CircuitLocation.d.ts +0 -1
  581. package/networks/support/CircuitPath.d.ts +0 -1
  582. package/networks/support/CircuitPathConnectivityElement.d.ts +0 -1
  583. package/networks/support/CircuitSection.d.ts +0 -1
  584. package/networks/support/NamedTraceConfiguration.d.ts +1 -7
  585. package/networks/support/Subcircuit.d.ts +0 -1
  586. package/networks/support/UNTraceConfiguration.d.ts +0 -4
  587. package/networks/support/jsonTypes.d.ts +1 -1
  588. package/networks/support/typeUtils.d.ts +10 -1
  589. package/networks/support/typeUtils.js +1 -1
  590. package/package.json +3 -3
  591. package/popup/Feature.d.ts +57 -6
  592. package/popup/Features.d.ts +86 -7
  593. package/popup/content/UtilityNetworkAssociationsContent.d.ts +0 -1
  594. package/popup/support/UtilityNetworkAssociationType.d.ts +0 -1
  595. package/rest/networks/circuits/support/CircuitTraceResult.d.ts +0 -1
  596. package/rest/networks/circuits/support/CircuitVerifyResult.d.ts +0 -1
  597. package/rest/networks/support/TelecomNetworkElement.d.ts +0 -1
  598. package/rest/networks/support/TraceLocation.d.ts +1 -11
  599. package/rest/networks/support/TraceParameters.d.ts +1 -7
  600. package/rest/networks/support/TraceResult.d.ts +0 -2
  601. package/rest/networks/support/TraverseAssociationsParameters.d.ts +69 -0
  602. package/rest/networks/support/TraverseAssociationsParameters.js +2 -0
  603. package/rest/networks/support/TraverseAssociationsResult.d.ts +39 -0
  604. package/rest/networks/support/TraverseAssociationsResult.js +2 -0
  605. package/rest/networks/traverseAssociations.d.ts +21 -0
  606. package/rest/networks/traverseAssociations.js +2 -0
  607. package/rest/networks/unitIdentifiers/support/UnitQueryResult.d.ts +0 -1
  608. package/rest/print.js +1 -1
  609. package/rest/query/operations/query.js +1 -1
  610. package/smartMapping/renderers/location.js +1 -1
  611. package/smartMapping/renderers/opacity.js +1 -1
  612. package/smartMapping/renderers/predominance.js +1 -1
  613. package/smartMapping/renderers/support/regenerateUtils.js +1 -1
  614. package/smartMapping/renderers/support/rendererUtils.d.ts +3 -1
  615. package/smartMapping/renderers/support/rendererUtils.js +1 -1
  616. package/smartMapping/support/adapters/FeatureLayerAdapter.js +1 -1
  617. package/support/revision.js +1 -1
  618. package/symbols/WebStyleSymbol.js +1 -1
  619. package/symbols/cim/effects/EffectOffset.js +1 -1
  620. package/symbols/support/symbolUtils.js +1 -1
  621. package/symbols/support/webStyleSymbolCache.js +2 -0
  622. package/third-party-notices.txt +0 -32
  623. package/undoredo/support/ApplySet.js +1 -1
  624. package/undoredo/support/ApplySetItem.js +1 -1
  625. package/views/2d/analysis/AreaMeasurement/AreaMeasurementTool.js +1 -1
  626. package/views/2d/engine/vectorTiles/VectorTileContainer.js +1 -1
  627. package/views/2d/engine/webgl/shaderGraph/techniques/FeatureInstanceStore.js +1 -1
  628. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AAnimatedShader.js +1 -1
  629. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedMarkerMeshWriter.js +1 -1
  630. package/views/2d/engine/webgl/shaderGraph/techniques/animated/attributes.js +1 -1
  631. package/views/2d/engine/webgl/shaderGraph/techniques/mesh/MeshWriterVertexPack.js +1 -1
  632. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  633. package/views/2d/engine/webgl/util/AnnotationMatcher.js +1 -1
  634. package/views/2d/layers/features/layerAdapters/AnnotationLayerAdapter.js +1 -1
  635. package/views/2d/layers/features/sources/strategies/support/queryAdapters.js +1 -1
  636. package/views/2d/layers/features/support/FeatureMetadata.js +1 -1
  637. package/views/2d/layers/features/support/FeatureSetReader.js +1 -1
  638. package/views/2d/layers/features/support/FeatureSetReaderParquet.js +1 -1
  639. package/views/2d/layers/support/annodime/annotationGraphic.js +1 -1
  640. package/views/2d/layers/support/annodime/cimAnnotations.js +1 -1
  641. package/views/2d/layers/support/annodime/utils.js +1 -1
  642. package/views/2d/support/hitTestUtils.js +1 -1
  643. package/views/2d/unitBezier.js +1 -1
  644. package/views/3d/analysis/LineOfSight/LineOfSightPlacementController.js +2 -0
  645. package/views/3d/analysis/LineOfSight/LineOfSightReshapeTool3D.js +1 -1
  646. package/views/3d/analysis/LineOfSight/LineOfSightTool2.js +1 -1
  647. package/views/3d/analysis/LineOfSight/lineOfSightPlacementUtils.js +2 -0
  648. package/views/3d/analysis/Viewshed/ViewshedDrawToolRenderer.js +1 -1
  649. package/views/3d/analysis/Viewshed/ViewshedPlacementController.js +1 -1
  650. package/views/3d/analysis/Viewshed/ViewshedPlacementPointPlugin.js +1 -1
  651. package/views/3d/analysis/Viewshed/ViewshedPlacementRootPlugin.js +1 -1
  652. package/views/3d/analysis/Viewshed/placementUtils.js +1 -1
  653. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  654. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  655. package/views/3d/layers/graphics/Graphics3DSymbol.js +1 -1
  656. package/views/3d/layers/graphics/SymbolComplexity.js +1 -1
  657. package/views/3d/layers/graphics/defaultSymbolComplexity.js +1 -1
  658. package/views/3d/support/QualityProfile.js +1 -1
  659. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechnique.js +1 -1
  660. package/views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js +1 -1
  661. package/views/3d/webgl-engine/core/shaderLibrary/attributes/PathEvaluate.glsl.js +14 -6
  662. package/views/3d/webgl-engine/core/shaderLibrary/attributes/PathVertexPosition.glsl.js +2 -1
  663. package/views/3d/webgl-engine/core/shaderLibrary/util/EmissionDimming.glsl.js +1 -1
  664. package/views/3d/webgl-engine/effects/blit/Blit.js +1 -1
  665. package/views/3d/webgl-engine/effects/glow/Glow.js +1 -1
  666. package/views/3d/webgl-engine/effects/transparency/OITBlend.js +1 -1
  667. package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
  668. package/views/3d/webgl-engine/lib/OrderIndependentTransparency.js +1 -1
  669. package/views/3d/webgl-engine/lib/PathEvaluator.js +1 -1
  670. package/views/3d/webgl-engine/materials/PathTechnique.js +1 -1
  671. package/views/3d/webgl-engine/materials/PolygonOffset.js +1 -1
  672. package/views/3d/webgl-engine/shaders/HUDMaterialTechnique.js +1 -1
  673. package/views/3d/webgl-engine/shaders/OutputColorHighlightOLID.glsl.js +6 -7
  674. package/views/3d/webgl-engine/shaders/ditherNoise.glsl.js +1 -1
  675. package/views/LinkChartView.d.ts +3 -1
  676. package/views/View2D.d.ts +3 -1
  677. package/views/draw/DrawTool.js +1 -1
  678. package/views/draw/support/editingSessionUtils.js +1 -1
  679. package/views/interactive/snapping/SnappingManager.js +1 -1
  680. package/views/interactive/snapping/candidates/dehydrated/{DehydratedVertexSnappingCandidate.js → DehydratedFeatureSnappingCandidate.js} +1 -1
  681. package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.d.ts +10 -3
  682. package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js +1 -1
  683. package/widgets/BatchAttributeForm/attachmentUtils.d.ts +9 -0
  684. package/widgets/BatchAttributeForm/attachmentUtils.js +1 -1
  685. package/widgets/BatchAttributeForm/batchAttributeFormUtils.js +1 -1
  686. package/widgets/BatchAttributeForm/css.js +1 -1
  687. package/widgets/BatchAttributeForm/inputs/AttachmentElementInput.d.ts +3 -3
  688. package/widgets/BatchAttributeForm/inputs/AttachmentElementInput.js +1 -1
  689. package/widgets/BatchAttributeForm/inputs/BatchFormInputs.js +1 -1
  690. package/widgets/BatchAttributeForm/inputs/FieldInput.js +1 -1
  691. package/widgets/BatchAttributeForm/inputs/GroupInput.js +1 -1
  692. package/widgets/BatchAttributeForm/inputs/InputBase.js +1 -1
  693. package/widgets/BatchAttributeForm/inputs/RelationshipElementInput.js +1 -1
  694. package/widgets/BatchAttributeForm/inputs/support/attachmentValidationCriteriaState.d.ts +1 -1
  695. package/widgets/BatchAttributeForm/inputs/support/createBatchFormInputs.js +1 -1
  696. package/widgets/BatchAttributeForm/interfaceUtils.js +1 -1
  697. package/widgets/BatchAttributeForm/templates/support/createBatchFormTemplate.js +1 -1
  698. package/widgets/BatchAttributeForm/templates/support/hashElementTemplate.js +1 -1
  699. package/widgets/BatchAttributeForm/types.d.ts +92 -7
  700. package/widgets/BatchAttributeForm.js +1 -1
  701. package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
  702. package/widgets/Editor/CreateFeaturesWorkflowData.js +1 -1
  703. package/widgets/Editor/EditorViewModel.d.ts +1 -1
  704. package/widgets/Editor/EditorViewModel.js +1 -1
  705. package/widgets/Editor/Edits.js +1 -1
  706. package/widgets/Editor/MergeFeaturesWorkflow.js +1 -1
  707. package/widgets/Editor/SplitFeatureWorkflow.js +1 -1
  708. package/widgets/Editor/UpdateFeatureWorkflow.js +1 -1
  709. package/widgets/Editor/UpdateFeaturesWorkflow.js +1 -1
  710. package/widgets/Editor/UpdateRecordWorkflow.js +1 -1
  711. package/widgets/Editor/UpdateWorkflow.js +1 -1
  712. package/widgets/Editor/UpdateWorkflowData.js +1 -1
  713. package/widgets/Editor/components/UpdateFeaturePanelContent.js +1 -1
  714. package/widgets/Editor/support/EditorItem.js +1 -1
  715. package/widgets/Editor/support/SketchController.js +1 -1
  716. package/widgets/Editor/support/attachmentUtils.js +2 -0
  717. package/widgets/Editor/workflowUtils.js +1 -1
  718. package/widgets/Editor.js +1 -1
  719. package/widgets/Feature/FeatureViewModel.d.ts +0 -1
  720. package/widgets/FeatureForm/UtilityNetworkAssociationInput.d.ts +0 -1
  721. package/widgets/Features/FeaturesViewModel.d.ts +0 -1
  722. package/widgets/Features/FeaturesViewModel.js +1 -1
  723. package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
  724. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  725. package/widgets/OrientedImageryViewer/adapters/sketch/MeasurementAdapter.js +1 -1
  726. package/widgets/OrientedImageryViewer/components/OrientedImageryVideoViewModel.js +1 -1
  727. package/widgets/OrientedImageryViewer.js +1 -1
  728. package/widgets/Popup.js +1 -1
  729. package/widgets/Sketch/SketchViewModel.d.ts +10 -1
  730. package/widgets/Sketch/SketchViewModel.js +1 -1
  731. package/widgets/Sketch.js +1 -1
  732. package/widgets/UtilityNetworkTrace/UtilityNetworkTraceViewModel.d.ts +3 -2
  733. package/widgets/UtilityNetworkTrace/UtilityNetworkTraceViewModel.js +1 -1
  734. package/widgets/UtilityNetworkTrace/support/GeometryHandler.js +1 -1
  735. package/assets/components/assets/icon/orientedImageryFullSuperimpose16.json +0 -1
  736. package/assets/components/assets/icon/orientedImageryFullSuperimpose24.json +0 -1
  737. package/assets/components/assets/icon/orientedImageryFullSuperimpose32.json +0 -1
  738. package/assets/components/assets/icon/orientedImageryHalfSuperimpose16.json +0 -1
  739. package/assets/components/assets/icon/orientedImageryHalfSuperimpose24.json +0 -1
  740. package/assets/components/assets/icon/orientedImageryHalfSuperimpose32.json +0 -1
  741. package/assets/components/assets/icon/orientedImagerySceneOnly16.json +0 -1
  742. package/assets/components/assets/icon/orientedImagerySceneOnly24.json +0 -1
  743. package/assets/components/assets/icon/orientedImagerySceneOnly32.json +0 -1
  744. package/assets/components/assets/icon/parquetFeatureLayer16.json +0 -1
  745. package/assets/components/assets/icon/parquetFeatureLayer24.json +0 -1
  746. package/assets/components/assets/icon/parquetFeatureLayer32.json +0 -1
  747. package/assets/esri/core/workers/chunks/013708f40f811158d42c.js +0 -1
  748. package/assets/esri/core/workers/chunks/01ba5319cac3e0f14205.js +0 -1
  749. package/assets/esri/core/workers/chunks/03354e9256b2f77fd4f2.js +0 -1
  750. package/assets/esri/core/workers/chunks/0436fe89adc78696251c.js +0 -1
  751. package/assets/esri/core/workers/chunks/079b412d07d02504f1db.js +0 -1
  752. package/assets/esri/core/workers/chunks/0826d36dfbfa28442b70.js +0 -1
  753. package/assets/esri/core/workers/chunks/0bf72e9d0a6deceeb406.js +0 -1
  754. package/assets/esri/core/workers/chunks/0ded58ccb83f624f1460.js +0 -1
  755. package/assets/esri/core/workers/chunks/0ecc1bc1686844cdd60e.js +0 -1
  756. package/assets/esri/core/workers/chunks/152f1c08197955224ad3.js +0 -1
  757. package/assets/esri/core/workers/chunks/174cc2e69e5b5a13d880.js +0 -1
  758. package/assets/esri/core/workers/chunks/181e948d076a9a7aae8a.js +0 -1
  759. package/assets/esri/core/workers/chunks/18e7784f13a57a75585a.js +0 -1
  760. package/assets/esri/core/workers/chunks/1c8436b27a3d3cde5cfc.js +0 -1
  761. package/assets/esri/core/workers/chunks/1d81e667a580c5cdeda1.js +0 -262
  762. package/assets/esri/core/workers/chunks/1dacc0b64bd27ce2de3a.js +0 -1
  763. package/assets/esri/core/workers/chunks/1eeb1edca0ad5db6917c.js +0 -1
  764. package/assets/esri/core/workers/chunks/1effde6a39ef0d4af525.js +0 -1
  765. package/assets/esri/core/workers/chunks/1f289aa69dd6b6be534a.js +0 -1
  766. package/assets/esri/core/workers/chunks/27c6def22c2b0791ce9e.js +0 -1
  767. package/assets/esri/core/workers/chunks/2bc4aff77c830061e16e.js +0 -1
  768. package/assets/esri/core/workers/chunks/2c3fc2805f6de0963789.js +0 -1
  769. package/assets/esri/core/workers/chunks/2d2895f1fdf44d212a4d.js +0 -1
  770. package/assets/esri/core/workers/chunks/2e6382d50bf012064eae.js +0 -1
  771. package/assets/esri/core/workers/chunks/3248001d9dfb9153699e.js +0 -1
  772. package/assets/esri/core/workers/chunks/33b4f5dfe1a16b59b010.js +0 -1
  773. package/assets/esri/core/workers/chunks/36dac6ab51d9dbdd091d.js +0 -1
  774. package/assets/esri/core/workers/chunks/36dd3ad3ef2fbfc15cbd.js +0 -1
  775. package/assets/esri/core/workers/chunks/39974d1e5d3820ef1680.js +0 -1
  776. package/assets/esri/core/workers/chunks/3dc6e9494af16f7b8009.js +0 -1
  777. package/assets/esri/core/workers/chunks/3ecb906322a6a5c8c93b.js +0 -1
  778. package/assets/esri/core/workers/chunks/3f67162456a1f02190fa.js +0 -1
  779. package/assets/esri/core/workers/chunks/42e5e00610f281ca8ffa.js +0 -1
  780. package/assets/esri/core/workers/chunks/4301cb9670fa7c907460.js +0 -1
  781. package/assets/esri/core/workers/chunks/493a0981e90a5799fb5b.js +0 -1
  782. package/assets/esri/core/workers/chunks/4c54cb80c4dc9bbbd395.js +0 -1
  783. package/assets/esri/core/workers/chunks/4cc78493805671708a9b.js +0 -1
  784. package/assets/esri/core/workers/chunks/4e4419282c4bf7ee4678.js +0 -1
  785. package/assets/esri/core/workers/chunks/4e788fc6cb2ea936f676.js +0 -1
  786. package/assets/esri/core/workers/chunks/4efef5fa8bf23aaf34cd.js +0 -1
  787. package/assets/esri/core/workers/chunks/5100b5a6a506c704dfaf.js +0 -1
  788. package/assets/esri/core/workers/chunks/5121768c70f1e03b685c.js +0 -1
  789. package/assets/esri/core/workers/chunks/52afd43bbe23e358efb5.js +0 -1
  790. package/assets/esri/core/workers/chunks/52f354bf80ee5ab0379a.js +0 -1
  791. package/assets/esri/core/workers/chunks/5359ff9492383c5bd9b1.js +0 -1
  792. package/assets/esri/core/workers/chunks/54d7f07e3348ddb6d9a2.js +0 -1
  793. package/assets/esri/core/workers/chunks/57b7e5fde972d3ad7884.js +0 -1
  794. package/assets/esri/core/workers/chunks/597aa39cdb5366ef9a74.js +0 -1
  795. package/assets/esri/core/workers/chunks/5aba23584e0b230c75f5.js +0 -1
  796. package/assets/esri/core/workers/chunks/5cb1b950249d651f3837.js +0 -1
  797. package/assets/esri/core/workers/chunks/5cb274e5759f7ca0d4ed.js +0 -1
  798. package/assets/esri/core/workers/chunks/5d8924fdcdb473d261cd.js +0 -1
  799. package/assets/esri/core/workers/chunks/62de9e83331fb10aac6a.js +0 -2
  800. package/assets/esri/core/workers/chunks/62e77e3c5ca9b4887923.js +0 -2
  801. package/assets/esri/core/workers/chunks/64114a7d2da162987958.js +0 -1
  802. package/assets/esri/core/workers/chunks/641cddee377599916de2.js +0 -2
  803. package/assets/esri/core/workers/chunks/65520a443e3811255bea.js +0 -1
  804. package/assets/esri/core/workers/chunks/65f02eca694cc1c9f5a7.js +0 -1
  805. package/assets/esri/core/workers/chunks/6821462e5c1e9c76010a.js +0 -1
  806. package/assets/esri/core/workers/chunks/6a3d207308b29651f397.js +0 -1
  807. package/assets/esri/core/workers/chunks/6f5a82388a5eb5fcf1b7.js +0 -1
  808. package/assets/esri/core/workers/chunks/6f5d61f734ec40dafabb.js +0 -1
  809. package/assets/esri/core/workers/chunks/737de87bfb9b5f5a9c6c.js +0 -1
  810. package/assets/esri/core/workers/chunks/7748743d4be047094d67.js +0 -1
  811. package/assets/esri/core/workers/chunks/78c53aeb0a408ab3c80c.js +0 -1
  812. package/assets/esri/core/workers/chunks/79f2d4b3af5776ec2045.js +0 -1
  813. package/assets/esri/core/workers/chunks/7a8ed08cd173963b3112.js +0 -1
  814. package/assets/esri/core/workers/chunks/7b5c1030a7cf0f382cc4.js +0 -1
  815. package/assets/esri/core/workers/chunks/7cadb872b9ca96eedca5.js +0 -1
  816. package/assets/esri/core/workers/chunks/7cee81c5aa1e6b7d2452.js +0 -1
  817. package/assets/esri/core/workers/chunks/7ed3d6c72f23c628df3b.js +0 -1
  818. package/assets/esri/core/workers/chunks/80f4f686ce403cb2693f.js +0 -1
  819. package/assets/esri/core/workers/chunks/8351012ceb466f01b8fd.js +0 -1
  820. package/assets/esri/core/workers/chunks/859bc873e7af911a518f.js +0 -1
  821. package/assets/esri/core/workers/chunks/8e99f937fd36cf2cd05f.js +0 -1
  822. package/assets/esri/core/workers/chunks/93bd56396b8cd020f965.js +0 -1
  823. package/assets/esri/core/workers/chunks/94fac056e14caed09682.js +0 -1
  824. package/assets/esri/core/workers/chunks/957f7b8de4aecb6f644e.js +0 -1
  825. package/assets/esri/core/workers/chunks/97d2bdbea39cbcf8fd0f.js +0 -1
  826. package/assets/esri/core/workers/chunks/99101789035f1787c630.js +0 -1
  827. package/assets/esri/core/workers/chunks/9c6d34bb666f630d511f.js +0 -1
  828. package/assets/esri/core/workers/chunks/a0208e35b217808777c4.js +0 -1
  829. package/assets/esri/core/workers/chunks/a320998f18922a35899f.js +0 -1
  830. package/assets/esri/core/workers/chunks/a4e9a17dacbb52444d75.js +0 -1
  831. package/assets/esri/core/workers/chunks/a4f3bcfabd4ad127abf2.js +0 -1
  832. package/assets/esri/core/workers/chunks/a5abba59e738c3240c22.js +0 -1
  833. package/assets/esri/core/workers/chunks/a63bba226de6c5e464b0.js +0 -1
  834. package/assets/esri/core/workers/chunks/a9f29ff36a7ae5bae686.js +0 -1
  835. package/assets/esri/core/workers/chunks/aae0049c2c3e15a813e8.js +0 -1
  836. package/assets/esri/core/workers/chunks/adc32f6b45ea3026fc34.js +0 -1
  837. package/assets/esri/core/workers/chunks/af8ef6701631ed5e5b80.js +0 -1
  838. package/assets/esri/core/workers/chunks/b045bffb4f2eb9203183.js +0 -1
  839. package/assets/esri/core/workers/chunks/b590402170ae289290d7.js +0 -1
  840. package/assets/esri/core/workers/chunks/b666027b9022fa346a79.js +0 -1
  841. package/assets/esri/core/workers/chunks/b73c146d3e550eaf07eb.js +0 -1
  842. package/assets/esri/core/workers/chunks/b803e7b0d489bb628d72.js +0 -1
  843. package/assets/esri/core/workers/chunks/bb24972603fb35dd8dcf.js +0 -1
  844. package/assets/esri/core/workers/chunks/bcc097271f5cdf0a97a7.js +0 -1
  845. package/assets/esri/core/workers/chunks/c0cbc50e5afd68bd485c.js +0 -1
  846. package/assets/esri/core/workers/chunks/c2cd80b712f29e8cbb8d.js +0 -1
  847. package/assets/esri/core/workers/chunks/c3ff2ff0a86a9143d7a5.js +0 -1
  848. package/assets/esri/core/workers/chunks/c6d0b4875b6b8d6bc25a.js +0 -1
  849. package/assets/esri/core/workers/chunks/c9a4601073e1a3eee9d0.js +0 -1
  850. package/assets/esri/core/workers/chunks/cf41a66fb97c1076fb34.js +0 -1
  851. package/assets/esri/core/workers/chunks/cf8ce21dc649021e97f6.js +0 -1
  852. package/assets/esri/core/workers/chunks/d78b7cac322755e87eb8.js +0 -1
  853. package/assets/esri/core/workers/chunks/dddb57ff637643ccfc87.js +0 -1
  854. package/assets/esri/core/workers/chunks/df18b0a653b328d8d052.js +0 -1
  855. package/assets/esri/core/workers/chunks/e1bf87077541da6853c6.js +0 -1
  856. package/assets/esri/core/workers/chunks/e3b713a590cce6245ee2.js +0 -1
  857. package/assets/esri/core/workers/chunks/e4406baf206b9e4c7e4f.js +0 -1
  858. package/assets/esri/core/workers/chunks/e499252cb52f7aed49a0.js +0 -1
  859. package/assets/esri/core/workers/chunks/e4e2f479c0c45ae1b2c3.js +0 -1
  860. package/assets/esri/core/workers/chunks/e5f8c73349407c25956b.js +0 -1
  861. package/assets/esri/core/workers/chunks/e656fd5ecf9ac059a87b.js +0 -1
  862. package/assets/esri/core/workers/chunks/e92698f50089484c4901.js +0 -1
  863. package/assets/esri/core/workers/chunks/e9c5c295b6bf10e942a4.js +0 -1
  864. package/assets/esri/core/workers/chunks/eb91dc957c328674e119.js +0 -1
  865. package/assets/esri/core/workers/chunks/ed3d16a5b4084ef61f8a.js +0 -1
  866. package/assets/esri/core/workers/chunks/edcde00495727d506c46.js +0 -1
  867. package/assets/esri/core/workers/chunks/efb4aa5886730ea377bd.js +0 -1
  868. package/assets/esri/core/workers/chunks/f0832b413612c77a62ca.js +0 -1
  869. package/assets/esri/core/workers/chunks/f116331c6eca937aac8e.js +0 -1
  870. package/assets/esri/core/workers/chunks/f23e995320674b32e142.js +0 -1
  871. package/assets/esri/core/workers/chunks/f334bf192dff5af10a70.js +0 -1
  872. package/assets/esri/core/workers/chunks/f518835b2dc89a48cfb1.js +0 -1
  873. package/assets/esri/core/workers/chunks/f5731ad4cfbbf1cc569a.js +0 -2
  874. package/assets/esri/core/workers/chunks/f76b1fc36f5606cac2c8.js +0 -1
  875. package/assets/esri/core/workers/chunks/f7fca88d120d45bb782a.js +0 -1
  876. package/assets/esri/core/workers/chunks/f819854098d63fe4ccdb.js +0 -1
  877. package/assets/esri/core/workers/chunks/f98118127469449ca145.js +0 -1
  878. package/assets/esri/core/workers/chunks/f9e22cf59e2e2782d70f.js +0 -1
  879. package/assets/esri/core/workers/chunks/fa1336b60278017d2525.js +0 -1
  880. package/assets/esri/core/workers/chunks/fbe7dae0b4bf2d172487.js +0 -1
  881. package/assets/esri/core/workers/chunks/fea3b6bef761ef78630e.js +0 -1
  882. package/chunks/Bufferer-Dw9Qi4T1.js +0 -2
  883. package/chunks/Distance2DCalculator-CXhBP-8I.js +0 -2
  884. package/chunks/GeodeticDistanceCalculator-Ce-woMPw.js +0 -2
  885. package/layers/support/AnnotationSublayer.js +0 -2
  886. package/views/3d/analysis/LineOfSight/LineOfSightPlacementTool.js +0 -2
  887. /package/assets/esri/core/workers/chunks/{d9d4754062758789f186.js.LICENSE.txt → 05016e5a1de384994001.js.LICENSE.txt} +0 -0
  888. /package/assets/esri/core/workers/chunks/{62e77e3c5ca9b4887923.js.LICENSE.txt → 0d42322362e76f674d94.js.LICENSE.txt} +0 -0
  889. /package/assets/esri/core/workers/chunks/{62de9e83331fb10aac6a.js.LICENSE.txt → 35533c8ef541f7643497.js.LICENSE.txt} +0 -0
  890. /package/assets/esri/core/workers/chunks/{641cddee377599916de2.js.LICENSE.txt → 99c002015c2127e6cbfc.js.LICENSE.txt} +0 -0
  891. /package/assets/esri/core/workers/chunks/{f5731ad4cfbbf1cc569a.js.LICENSE.txt → c318e6dbb8651433038f.js.LICENSE.txt} +0 -0
  892. /package/chunks/{Centroid-DZi-eb9F.js → Centroid-CA-TwbbN.js} +0 -0
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as t}from"tslib";import{pushIfSome as e}from"../../core/arrayUtils.js";import{createTask as s}from"../../core/asyncUtils.js";import i from"../../core/Collection.js";import a from"../../core/Error.js";import{EventedAccessor as n}from"../../core/Evented.js";import r from"../../core/Logger.js";import{getOrCreateMapValue as o}from"../../core/MapUtils.js";import{destroyMaybe as l,abortMaybe as c}from"../../core/maybe.js";import{throwIfAborted as h,isAbortError as u}from"../../core/promiseUtils.js";import p from"../../core/ReactiveMap.js";import{on as m,sync as d,watch as g,syncAndInitial as f,initial as v,whenOnce as A}from"../../core/reactiveUtils.js";import{property as y,subclass as _}from"../../core/accessorSupport/decorators.js";import{UpdatingHandles as F}from"../../core/support/UpdatingHandles.js";import I from"../../geometry/SpatialReference.js";import{getGraphicLayer as w}from"../../graphic/graphicOriginUtils.js";import{system as E}from"../../time/constants.js";import{getAttachmentKey as C}from"./attachmentUtils.js";import{getLayerTimeZone as x,getEffectiveTimeZone as M,createReactiveGraphic as b,isAttributeFormSupportedLayerWithAttachments as V,layerSupportsQueryAttachments as k,queryAttachmentsForElements as T}from"./batchAttributeFormUtils.js";import{ReactiveContingentValuesManager as R}from"./ReactiveContingentValuesManager.js";import{parseFormTemplateString as L}from"./stringUtils.js";import{ValueChangeTransaction as S}from"./ValueChangeTransaction.js";import{ArcadeExecutorProvider as H}from"./expressions/ArcadeExecutorProvider.js";import{ExpressionsManager as P}from"./expressions/ExpressionsManager.js";import{ExpressionsModel as j}from"./expressions/ExpressionsModel.js";import B from"./inputs/BatchFormInputs.js";import{createBatchFormInputsFromBatchFormTemplate as O}from"./inputs/support/createBatchFormInputs.js";import{isGroupInput as G,isFieldInput as D}from"./inputs/support/inputUtils.js";import U from"./templates/BatchFormTemplate.js";import{createBatchFormTemplate as N}from"./templates/support/createBatchFormTemplate.js";import{isExcludedFromSharedForm as Z,isGroupElementTemplate as W}from"./templates/support/templateUtils.js";import{ContingentValuesManager as $}from"../support/ContingentValuesManager.js";import{isEmptyValue as z}from"../support/forms/formUtils.js";function K(t,e){return t?.find(t=>t.layer===e)}let q=class extends n{constructor(t){super(t),this._attachmentCache=new p,this.activeFeatureIndex=-1,this.attachmentsEnabled=!1,this.callbacks=null,this.disabled=!1,this.editType="NA",this.features=new i,this._hasAsyncArcadeExpressions=!1,this.highlightHelper=null,this.maximumFeatureCount=2e3,this.maximumFeatureCountWithComplexForms=50,this.map=null,this.pageStack=[],this.readOnly=!1,this.spatialReference=null,this.submitHasBeenAttempted=!1,this.timeZone=null,this.userHasChangedValues=!1,this.layerInfos=null,this._arcadeExecutorProvider=new H,this._activeAssociation=null,this._activeAssociationsInput=null,this._activeRelationshipInput=null,this._ownContingentValuesManager=null,this._activeFormInputsByElementId=new Map,this._emptyForm=new B({inputs:[]}),this._emptyFormTemplate=new U({elements:[]}),this._featureFormMap=new Map,this._prepareTask=null,this._reactiveGraphicLookup=new p,this._updatingHandles=new F,this._submitTask=null,this._layerTemplateMap=new p,this._workingFeatures=new i,this._expressionsManager=new P({arcadeContext:{editType:"NA",spatialReference:null,map:null,timeZone:E}}),this._getExternalErrorForFeature=(t,e)=>this._reactiveContingentValuesManager.getViolationTypeForField(t,e),this._getFieldValueOptionsForFeature=t=>this._reactiveContingentValuesManager.getAndWatchFieldValueOptions(t),this.sharedForm=this._emptyForm,this.sharedFormTemplate=this._emptyFormTemplate}initialize(){this.contingentValuesManager||(this.contingentValuesManager=this._ownContingentValuesManager=new $),this.addHandles([m(()=>this.features,"after-changes",()=>{this.goHome(),this.notifyChange("layers"),this._prepare()},d),g(()=>[this.attachmentsEnabled,this.features,this.map,this.timeZone,this.editType],()=>this._prepare(),d),g(()=>this.activeForm,()=>{this.goHome(),this._activeFormInputsByElementId.clear(),this._syncAttachments()},d),g(()=>this.activeFeature,()=>{this.goHome()},d),g(()=>this.page,t=>{const e=[...this.pageStack];if(e.includes(t))for(;e.length&&e.at(-1)!==t;)e.pop();else e.push(t);this.pageStack=e},f),g(()=>this.contingentValuesManager,t=>{l(this._reactiveContingentValuesManager),this._reactiveContingentValuesManager=new R({manager:t})},v)]),this._prepare()}destroy(){this._prepareTask=c(this._prepareTask),this._workingFeatures.destroyAll(),l(this._expressionsManager),l(this._reactiveContingentValuesManager),this._updatingHandles.destroy(),this._reactiveGraphicLookup=new p,this._emptyForm.destroy(),this._emptyFormTemplate.destroy(),this._ownContingentValuesManager=l(this._ownContingentValuesManager),this.highlightHelper?.removeAll()}get activeFeature(){const t=this.activeFeatureIndex;return t<0?null:this.features.at(t)}get activeForm(){if("batch"===this.mode)return this.sharedForm;const t=this._workingFeatures.at(this.activeFeatureIndex);if(!t)return this._emptyForm;const e=this._featureFormMap.get(t);if(e)return e;const s=this._makeBatchFormInputsForFeature(t);return s!==this._emptyForm&&this._featureFormMap.set(t,s),s}get activeLayer(){const{activeFeature:t}=this;if(!t)return null;return w(t)??null}get activeAssociation(){return this._activeAssociation}get activeAssociationsInput(){return this._activeAssociationsInput}get activeAssociationType(){return this.activeAssociationsInput?.activeAssociationType}get activeRelationshipInput(){return this._activeRelationshipInput}get calculating(){return this._expressionsManager.calculating}get expressionsManager(){return this._expressionsManager}get canGoBack(){return this.pageStack.length>1}get expressionEvaluationFailed(){return this._expressionsManager.expressionEvaluationFailed}get hasNonActiveInvalidFeatures(){if("batch"===this.mode)return!1;const{activeFeature:t}=this;return this.invalidFeatures.some(e=>e!==t)}get hasAsyncArcadeExpressions(){return this._hasAsyncArcadeExpressions}get hasTooManyFeatures(){return this._workingFeatures.length>this.maximumFeatureCount}get hasTooManyComplexFeatures(){return this._workingFeatures.length>this.maximumFeatureCountWithComplexForms&&this.hasAsyncArcadeExpressions}get invalidFeatures(){return this.sharedForm.invalidFeatures}get hasVisibleInputs(){return this.visibleInputs.length>0}get hasLayersWithContingentValues(){const t=this.contingentValuesManager;for(const e of this.layers)if(t.getFieldsWithContingentValues(e).size>0)return!0;return!1}get formDescription(){return this._computeFormHeaderField(this.activeForm?.description)}get formTitle(){return this._computeFormHeaderField(this.activeForm?.title)}get effectiveTimeZone(){const{activeLayer:t,timeZone:e}=this;if(!t)return e??"system";const s=x(t);return M(e,s)}get visibleInputs(){return this.activeForm.inputs.filter(t=>t.visible)}get noVisibleElementsReason(){if(this.hasVisibleInputs)return null;if(0===this.activeForm.inputs.length)return"noElements";const t=new Set;for(const e of this.activeForm.inputs)switch(e.visibilityCode){case"hidden:not-in-all-layers":case"hidden:no-domain-in-common":t.add("noElementsInCommon");break;case"hidden:field-definition":case"hidden:group-visibility-expression:all-features":case"hidden:visibility-expression:all-features":t.add("allElementsHidden");break;case"hidden:group-visibility-expression:some-features":case"hidden:visibility-expression:some-features":return"elementsHiddenInSome"}return t.has("allElementsHidden")?"allElementsHidden":"noElementsInCommon"}get page(){return this.showingSelectedAttachmentReplacePage&&this.selectedAttachmentDetails?"replacing-attachment":this.selectedAttachmentDetails?"viewing-attachment-details":this.selectedAttachmentAddInput?"adding-attachments":this.selectedAttachmentListInput?"viewing-attachments":this.activeAssociationsInput?.associatedLayer?"viewing-associated-features":this.activeAssociationsInput?"viewing-associated-layers":this.activeRelationshipInput?.showAllRelatedRecords?"viewing-related-records":this.activeRelationshipInput?.showAllCategories?"viewing-related-categories":"default"}get status(){const t=this._prepareTask;return null==t?"not-loaded":t.finished?null!=t.error?"failed":"loaded":"loading"}get updating(){return this._updatingHandles.updating||this.calculating}get valid(){return this.sharedForm.valid&&Array.from(this._featureFormMap.values()).every(t=>t.valid)}get layers(){const t=new Set;return this.features.forEach(e=>{const s=w(e);s&&t.add(s)}),Array.from(t)}get mode(){return this.activeFeatureIndex>-1?"single":"batch"}submit(){if(this.submitHasBeenAttempted=!0,this.validateContingentValues(this._workingFeatures),!this._hasPendingAttachmentHydration)return this._emitSubmit(),Promise.resolve();if(this._submitTask)return this._submitTask.promise;const t=s(async()=>{await Promise.all(this._allAttachmentInputs.map(t=>t.waitForPendingAttachmentUpdateData())),this._emitSubmit()});return this._submitTask=t,t.promise.finally(()=>{this._submitTask===t&&(this._submitTask=null)}),t.promise}get selectedAttachment(){return this._get("selectedAttachment")??null}set selectedAttachment(t){this.showingSelectedAttachmentReplacePage=!1,this._set("selectedAttachment",t),null!=t&&(this.selectedAttachmentAddElementId=null)}get selectedAttachmentAddElementId(){return this._get("selectedAttachmentAddElementId")??null}set selectedAttachmentAddElementId(t){this.showingSelectedAttachmentReplacePage=!1,this._set("selectedAttachmentAddElementId",t),null!=t&&(this.selectedAttachment=null,this.selectedAttachmentListElementId=null)}get selectedAttachmentListElementId(){return this._get("selectedAttachmentListElementId")??null}set selectedAttachmentListElementId(t){this._set("selectedAttachmentListElementId",t),null!=t&&(this.selectedAttachment=null,this.selectedAttachmentAddElementId=null)}get selectedAttachmentListInput(){const t=this.selectedAttachmentListElementId,e=this.activeForm;return t&&e&&e.allAttachmentElementInputs.find(e=>e.template.elementId===t)||null}get showingSelectedAttachmentReplacePage(){return this._get("showingSelectedAttachmentReplacePage")??!1}set showingSelectedAttachmentReplacePage(t){this._set("showingSelectedAttachmentReplacePage",t&&null!=this.selectedAttachmentDetails)}get selectedAttachmentAddInput(){const t=this.selectedAttachmentAddElementId,e=this.activeForm;return t&&e&&e.allAttachmentElementInputs.find(e=>e.template.elementId===t)||null}get selectedAttachmentDetails(){const t=this.selectedAttachment,e=this.activeForm;if(!t||!e)return null;const s=e.allAttachmentElementInputs.find(e=>e.template.elementId===t.elementId);if(!s)return null;const i=s.attachments.findIndex(e=>C(e)===t.attachmentKey);if(-1===i)return null;return{attachment:s.attachments[i],input:s}}get _allAttachmentInputs(){const t=[...this.sharedForm.allAttachmentElementInputs];for(const e of this._featureFormMap.values())t.push(...e.allAttachmentElementInputs);return t}get _hasPendingAttachmentHydration(){return this._allAttachmentInputs.some(t=>t.hasPendingAttachmentUpdateData)}findFieldInput(t){if(null==t)return;const e=this._activeFormInputsByElementId;if(e.has(t))return e.get(t);const s=this.activeForm.allFieldInputs.find(e=>e.template.elementId===t);return void 0!==s?(e.set(t,s),s):void 0}getFirstVisibleInvalidFieldInput(){if(this.hasVisibleInputs&&!this.activeForm.valid)for(const t of this.visibleInputs){if(G(t)){const e=t.inputs.find(t=>D(t)&&!t.valid);if(e)return{input:e,groupInput:t}}if(D(t)&&!t.valid)return{input:t}}}getFieldInputValue(t){return this.findFieldInput(t)?.value}getValues(t){const e=this._reactiveGraphicLookup.get(t);if(!e)throw new a("feature-not-found","The given feature is not present in the BatchAttributeForm");return{...e.attributes}}async goBack(){switch(this.page){case"replacing-attachment":return void this.setShowingSelectedAttachmentReplacePage(!1);case"viewing-attachment-details":return void this.setSelectedAttachment(null);case"adding-attachments":return void this.setSelectedAttachmentAddElementId(null);case"viewing-attachments":return void this.setSelectedAttachmentListElementId(null);case"viewing-associated-features":return void this.setActiveAssociationsLayer(null);case"viewing-associated-layers":return void this.setActiveAssociationsInput(null);case"viewing-related-categories":case"viewing-related-records":return void this.clearActiveRelationshipCategoryOrInput();default:return}}async goHome(){this.setShowingSelectedAttachmentReplacePage(!1),this.setSelectedAttachment(null),this.setSelectedAttachmentAddElementId(null),this.setSelectedAttachmentListElementId(null),this.setActiveAssociationsLayer(null),this.setActiveAssociationsInput(null),this.clearAllRelationshipSettings()}notifyGeometriesChanged(t){const e=[];for(const s of t){const t=this._reactiveGraphicLookup.get(s);t&&(e.push(t),t.geometry=s.geometry)}this._updatingHandles.consumePromise(this._valueChangeTransaction(async t=>this._expressionsManager.runGeometryDependentExpressions(e,t),"user"))}async overrideOriginalFeature(t,e){await(this._prepareTask?.promise);const s=this._reactiveGraphicLookup.get(t);s&&(s.original=e,this._updatingHandles.consumePromise(this._valueChangeTransaction(t=>this._expressionsManager.runOriginalFeatureDependentExpressions(s,t),"expression")))}async setFieldInputValue(t,e){const{fieldName:s}=t;await this._updatingHandles.addPromise(this._valueChangeTransaction(async i=>{for(const a of t.features)i.setValue(a,s,e)},"user",t))}async setFieldInputValuePerFeature(t,e){await this._updatingHandles.addPromise(this._valueChangeTransaction(async s=>{for(const[i,a]of e)s.setValue(i,t.fieldName,a);s.hasChanges&&(t.userHasChangedValue=!0)},"user",t))}async setValueForFieldName(t,e,s){await this._updatingHandles.addPromise(this._valueChangeTransaction(async i=>{for(const a of s){const s=this._reactiveGraphicLookup.get(a);s&&i.setValue(s,t,e)}},"user",t))}async setValuePerFeatureForFieldName(t,e){await this._updatingHandles.addPromise(this._valueChangeTransaction(async s=>{for(const[i,a]of e){const e=this._reactiveGraphicLookup.get(i);e&&s.setValue(e,t,a)}},"user",t))}async setFieldValue(t,e){const s=this.activeForm.allFieldInputs.find(e=>e.fieldName===t);if(null==s)throw new a("no-field-input-found",`Cannot set the value of FieldInput with field name: ${t} because none was found in the active form`);await this.setFieldInputValue(s,e)}async setValue(t,e){const s=this.findFieldInput(t);if(null==s)throw new a("no-FieldInput-found",`Cannot set the value of FieldInput with ID: ${t} because none was found in the active form`);await this.setFieldInputValue(s,e)}async stageAddAttachments(t,e){if(0===e.length)return[];const s=this._findAttachmentInput(t);if(!s)return[];const i=await s.stageAddAttachments(e,this._expressionsManager.arcadeContext);return 0===i.length||(this.userHasChangedValues=!0,this._emitAttachmentsChange(s)),i}stageDeleteAttachment(t,e){const s=this._findAttachmentInput(t);if(!s)return;const i=this._findAttachment(s,e);i&&(s.stageDeleteAttachment(i),this.userHasChangedValues=!0,this._emitAttachmentsChange(s))}async stageRenameAttachment(t,e,s){const i=this._findAttachmentInput(t);if(!i)return;const a=this._findAttachment(i,e);a&&0!==s.trim().length&&(i.stageRenameAttachment(a,s.trim()),this.userHasChangedValues=!0,await i.ensureStagedUpdateData(a),this._emitAttachmentsChange(i))}async stageReplaceAttachment(t,e,s){const i=this._findAttachmentInput(t);if(!i)return!1;const a=this._findAttachment(i,e);if(!a)return!1;return!!await i.stageReplaceAttachment(a,s,this._expressionsManager.arcadeContext)&&(this.userHasChangedValues=!0,this._emitAttachmentsChange(i),!0)}clearAttachmentChanges(t){const e=this._findAttachmentInput(t);e&&(e.clearAttachmentChanges(),this._emitAttachmentsChange(e))}setActiveAssociation(t){this._activeAssociation=t}setActiveAssociationsInput(t){this._activeAssociationsInput=t}setActiveAssociationsLayer(t){this._activeAssociationsInput?.setAssociatedLayer(t)}setActiveAssociationType(t){this._activeAssociationsInput?.setActiveAssociationType(t)}setActiveRelationshipInput(t){t||this._activeRelationshipInput?.setActiveCategory(null),this._activeRelationshipInput=t}setActiveRelationshipCategory(t,e){e.setActiveCategory(t),this.setActiveRelationshipInput(e)}clearAllRelationshipSettings(){const t=this.activeRelationshipInput;t&&(t.setActiveCategory(null),t.setShowAllCategories(!1),t.setShowAllRelatedRecords(!1),this._activeRelationshipInput=null)}clearActiveRelationshipCategoryOrInput(){const t=this.activeRelationshipInput;t&&(t.showAllRelatedRecords?t.showAllCategories?t.setActiveCategory(null):this.setActiveRelationshipInput(null):t.showAllCategories&&(t.setShowAllCategories(!1),this.setActiveRelationshipInput(null)))}resetAttachmentChanges(t,e){const s=this._findAttachmentInput(t);if(!s)return;const i=this._findAttachment(s,e);i&&(s.discardStagedEdits(i),this._emitAttachmentsChange(s))}setSelectedAttachment(t){this.selectedAttachment=t??null}setShowingSelectedAttachmentReplacePage(t){this.showingSelectedAttachmentReplacePage=t}setSelectedAttachmentAddElementId(t){this.selectedAttachmentAddElementId=t??null}setSelectedAttachmentListElementId(t){this.selectedAttachmentListElementId=t??null}userChangesHaveMadeFeatureInvalid(t){return!!this._reactiveGraphicLookup.get(t)?.userChangesHaveMadeInvalid}validate(){return!1}validateContingentValues(t,e=!1){if(e&&!this.submitHasBeenAttempted)for(const s of t)this._reactiveContingentValuesManager.validateContingenciesForNonNullFields(s);else for(const s of t)this._reactiveContingentValuesManager.validateContingencyConstraints(s,{includeIncompleteViolations:!0})}_makeBatchFormInputsForFeature(t){const e=this._layerTemplateMap.get(t.layer);return e?O(e,{allFeatures:new i([t]),expressionsManager:this._expressionsManager,getExternalErrorForFeature:this._getExternalErrorForFeature,getFieldValueOptionsForFeature:this._getFieldValueOptionsForFeature,map:this.map}):this._emptyForm}_computeFormHeaderField(t){const{activeFeature:e,activeLayer:s}=this;return t&&s&&e?L({attributes:e?.attributes,label:t,layer:s,timeZone:this.effectiveTimeZone}):null}_makeSubmitResults(){const t=new Map;for(const[s,i]of this._reactiveGraphicLookup){const a=[],n=[],r=this._featureFormMap.get(i)?.allAttachmentElementInputs??[];for(const t of r)e(a,t.toSubmitEdits()),t.valid||n.push(t.template.elementId);t.set(s,{feature:s,values:{...i.attributes},invalidFields:[],attachmentEdits:a,invalidAttachmentElementIds:n})}for(const e of this.sharedForm.allFieldInputs)for(const s of e.invalidFeatures)t.get(s)?.invalidFields.push(e.fieldName);return Array.from(t.values())}_emitSubmit(){this.emit("submit",{name:"submit",results:this._makeSubmitResults(),valid:this.valid})}_findAttachmentInput(t){const e=this.activeForm.allAttachmentElementInputs.find(e=>e.template.elementId===t);return e||r.getLogger(this).error(`Attachment input not found for elementId '${t}'`),e}_findAttachment(t,e){const s=t.findAttachment(e);return s||r.getLogger(this).error(`Attachment '${e}' not found for attachment element '${t.template.elementId}'`),s}_makeAttachmentEdits(t){const s=[];for(const i of t.allAttachmentElementInputs)e(s,i.toSubmitEdits());return s}_emitAttachmentsChange(t){const e=t.single.feature;if(!e)return;const s=this._featureFormMap.get(e);this.emit("attachments-change",{name:"attachments-change",feature:e.source,attachmentEdits:this._makeAttachmentEdits(s??this.activeForm),valid:this.valid})}async _valueChangeTransaction(t,e,s){const i=new S(this,e,"string"==typeof s?s:s?.fieldName);if(await t(i),"user"===e&&await this._expressionsManager.runExpressionsDependentOnChangedFields(i),await i.close(),i.hasChanges&&s){const t="string"==typeof s?this.activeForm.allFieldInputs.find(t=>t.fieldName===s):s;t&&(t.userHasChangedValue=!0)}}_prepare(){this._hasAsyncArcadeExpressions=!1,this._prepareTask=c(this._prepareTask),l(this._expressionsManager),this.userHasChangedValues=!1,this._expressionsManager=new P({arcadeContext:{editType:this.editType,spatialReference:this.spatialReference??I.WebMercator,map:this.map,timeZone:this.timeZone||"system"}});const{attachmentsEnabled:t,layers:e}=this;if(0===e.length)return;const i=s(async s=>{try{h(s),this._updateWorkingFeatures(),this.contingentValuesManager.layers.addMany(e);const i=new Map;await Promise.all(e.map(t=>t.load()));for(const a of e){const e=K(this.layerInfos,a),n=await N(a,{arcadeExecutorProvider:this._arcadeExecutorProvider,formTimeZone:this.timeZone,attachmentsEnabled:t},e?.formTemplate);h(s),this._layerTemplateMap.set(a,n);const r=n.getExpressionExecutorsForLayer(a);if(this._expressionsManager.layerExpressionsModelMap.set(a,new j({preserveFieldValuesWhenHidden:n.preserveFieldValuesWhenHidden,executorMap:r})),!this._hasAsyncArcadeExpressions)for(const t of r.keys()){const e=r.get(t);if(this._hasAsyncArcadeExpressions=!0===(e.editableExpression?.isAsync||e.requiredExpression?.isAsync||e.valueExpression?.isAsync||e.visibilityExpression?.isAsync),this._hasAsyncArcadeExpressions)break}for(const t of n.elements){if(Z(t))continue;const e=t.clone();W(e)&&(e.elements=e.elements.filter(t=>!Z(t)));const{elementId:s}=e;i.has(s)?i.get(s).foldIn(e):i.set(s,e)}}if(this.hasTooManyComplexFeatures)throw new a("too-many-features-with-complex-forms","There are too many features to load into the form with the configured complexity");if(this.hasTooManyFeatures)throw new a("too-many-features","There are too many features to load into the form.");const n=new U({elements:Array.from(i.values())});this.sharedFormTemplate=n,this.sharedForm=O(n,{allFeatures:this._workingFeatures,expressionsManager:this._expressionsManager,getExternalErrorForFeature:this._getExternalErrorForFeature,getFieldValueOptionsForFeature:this._getFieldValueOptionsForFeature,map:this.map}),await this._valueChangeTransaction(async t=>await this._expressionsManager.runAllExpressions(this._workingFeatures.toArray(),t),"expression"),await A(()=>!this.contingentValuesManager.updating)}catch(i){throw u(i)||r.getLogger(this).error("Failed preparing form",i),i}});this._updatingHandles.consumePromise(i.promise),this._prepareTask=i}_updateWorkingFeatures(){this._workingFeatures.destroyAll(),this._reactiveContingentValuesManager.reset();for(const e of this._featureFormMap.values())e.destroy();this._featureFormMap.clear(),this._attachmentCache.clear();const{features:t}=this;if(this._reactiveGraphicLookup=new p,0!==t.length){this._workingFeatures.addMany(t.map(b));for(const t of this._workingFeatures)this._reactiveGraphicLookup.set(t.source,t)}}async _syncAttachments(){const{activeFeature:t,activeLayer:e,activeForm:s}=this;if(!(t&&s&&V(e)&&k(e)))return;const i=t.getObjectId();if(null==i)return;const a=this._attachmentCache.get(e),n=s.allAttachmentElementInputs;if(!n.length)return;let r;if(a){const t=a.get(i);t&&(r=t)}if(!r){r=await T(e,i,n);o(this._attachmentCache,e,()=>new p).set(i,r)}for(const o of n)o.applyFetchedAttachments(Y(o,r))}get test(){return{expressionsManager:this._expressionsManager,reactiveGraphicLookup:this._reactiveGraphicLookup}}};t([y()],q.prototype,"_attachmentCache",void 0),t([y({readOnly:!0})],q.prototype,"activeFeature",null),t([y()],q.prototype,"activeFeatureIndex",void 0),t([y({readOnly:!0})],q.prototype,"activeForm",null),t([y({readOnly:!0})],q.prototype,"activeLayer",null),t([y()],q.prototype,"activeAssociation",null),t([y()],q.prototype,"activeAssociationsInput",null),t([y()],q.prototype,"activeAssociationType",null),t([y()],q.prototype,"activeRelationshipInput",null),t([y()],q.prototype,"attachmentsEnabled",void 0),t([y()],q.prototype,"callbacks",void 0),t([y()],q.prototype,"disabled",void 0),t([y()],q.prototype,"calculating",null),t([y()],q.prototype,"canGoBack",null),t([y()],q.prototype,"contingentValuesManager",void 0),t([y()],q.prototype,"editType",void 0),t([y()],q.prototype,"features",void 0),t([y()],q.prototype,"expressionEvaluationFailed",null),t([y()],q.prototype,"hasNonActiveInvalidFeatures",null),t([y()],q.prototype,"hasAsyncArcadeExpressions",null),t([y()],q.prototype,"_hasAsyncArcadeExpressions",void 0),t([y()],q.prototype,"invalidFeatures",null),t([y()],q.prototype,"hasVisibleInputs",null),t([y()],q.prototype,"hasLayersWithContingentValues",null),t([y()],q.prototype,"formDescription",null),t([y()],q.prototype,"formTitle",null),t([y()],q.prototype,"effectiveTimeZone",null),t([y()],q.prototype,"highlightHelper",void 0),t([y()],q.prototype,"maximumFeatureCount",void 0),t([y()],q.prototype,"maximumFeatureCountWithComplexForms",void 0),t([y()],q.prototype,"visibleInputs",null),t([y()],q.prototype,"map",void 0),t([y()],q.prototype,"noVisibleElementsReason",null),t([y()],q.prototype,"page",null),t([y()],q.prototype,"pageStack",void 0),t([y()],q.prototype,"readOnly",void 0),t([y()],q.prototype,"spatialReference",void 0),t([y()],q.prototype,"submitHasBeenAttempted",void 0),t([y()],q.prototype,"timeZone",void 0),t([y()],q.prototype,"updating",null),t([y()],q.prototype,"valid",null),t([y()],q.prototype,"layers",null),t([y()],q.prototype,"mode",null),t([y()],q.prototype,"sharedForm",void 0),t([y()],q.prototype,"sharedFormTemplate",void 0),t([y()],q.prototype,"selectedAttachment",null),t([y()],q.prototype,"selectedAttachmentAddElementId",null),t([y()],q.prototype,"selectedAttachmentListElementId",null),t([y()],q.prototype,"selectedAttachmentListInput",null),t([y()],q.prototype,"showingSelectedAttachmentReplacePage",null),t([y()],q.prototype,"selectedAttachmentAddInput",null),t([y()],q.prototype,"selectedAttachmentDetails",null),t([y()],q.prototype,"userHasChangedValues",void 0),t([y()],q.prototype,"layerInfos",void 0),t([y()],q.prototype,"_arcadeExecutorProvider",void 0),t([y()],q.prototype,"_activeAssociation",void 0),t([y()],q.prototype,"_activeAssociationsInput",void 0),t([y()],q.prototype,"_activeRelationshipInput",void 0),t([y()],q.prototype,"_prepareTask",void 0),t([y()],q.prototype,"_reactiveGraphicLookup",void 0),t([y()],q.prototype,"_allAttachmentInputs",null),t([y()],q.prototype,"_hasPendingAttachmentHydration",null),t([y()],q.prototype,"_layerTemplateMap",void 0),t([y()],q.prototype,"_workingFeatures",void 0),t([y()],q.prototype,"_expressionsManager",void 0),q=t([_("esri.widgets.BatchAttributeForm.BatchAttributeFormViewModel")],q);const J=q;function Q(t){return null!=t&&t.trim().length>0}function X(t,e){const s=t.keywords;return Q(s)&&s.toLowerCase()===e}function Y(t,e){const s="attachment"===t.input?.type?t.input.attachmentAssociationType:"exact",i=t.attachmentKeyword;if("any"===s)return e;if("exactOrNone"===s){if(z(i))return e.filter(t=>!Q(t.keywords));const t=i.toLowerCase();return e.filter(e=>!Q(e.keywords)||X(e,t))}if(z(i))return e;const a=i.toLowerCase();return e.filter(t=>X(t,a))}export{J as default};
2
+ import{__decorate as e}from"tslib";import{pushIfSome as t}from"../../core/arrayUtils.js";import{createTask as s}from"../../core/asyncUtils.js";import a from"../../core/Collection.js";import i from"../../core/Error.js";import{EventedAccessor as n}from"../../core/Evented.js";import r from"../../core/Logger.js";import{getOrCreateMapValue as o}from"../../core/MapUtils.js";import{destroyMaybe as l,abortMaybe as h}from"../../core/maybe.js";import{throwIfAborted as c,whenOrAbort as p,ignoreAbortErrors as u,isAbortError as d}from"../../core/promiseUtils.js";import m from"../../core/ReactiveMap.js";import{on as g,sync as y,watch as f,syncAndInitial as v,initial as _,whenOnce as A}from"../../core/reactiveUtils.js";import{property as F,subclass as I}from"../../core/accessorSupport/decorators.js";import{UpdatingHandles as w}from"../../core/support/UpdatingHandles.js";import E from"../../geometry/SpatialReference.js";import{getGraphicLayer as x}from"../../graphic/graphicOriginUtils.js";import{isSubtypeGroupLayer as C,isSubtypeSublayer as M,isFeatureLayer as T,getSubtypesFromLayer as b}from"../../layers/support/layerUtils.js";import{system as k}from"../../time/constants.js";import{getAttachmentKey as V}from"./attachmentUtils.js";import{getLayerTimeZone as S,getEffectiveTimeZone as L,createReactiveGraphic as R,isAttributeFormSupportedLayerWithAttachments as H,layerSupportsQueryAttachments as P,queryAttachmentsForElements as j}from"./batchAttributeFormUtils.js";import{ReactiveContingentValuesManager as U}from"./ReactiveContingentValuesManager.js";import{parseFormTemplateString as O}from"./stringUtils.js";import{ValueChangeTransaction as B}from"./ValueChangeTransaction.js";import{ArcadeExecutorProvider as G}from"./expressions/ArcadeExecutorProvider.js";import{ExpressionsManager as D}from"./expressions/ExpressionsManager.js";import{ExpressionsModel as N}from"./expressions/ExpressionsModel.js";import W from"./inputs/BatchFormInputs.js";import{createBatchFormInputsFromBatchFormTemplate as Z,mergeBatchFormInputsFromNewTemplate as $}from"./inputs/support/createBatchFormInputs.js";import{isGroupInput as K,isFieldInput as z}from"./inputs/support/inputUtils.js";import q from"./templates/BatchFormTemplate.js";import{createBatchFormTemplate as J}from"./templates/support/createBatchFormTemplate.js";import{isExcludedFromSharedForm as Q,isGroupElementTemplate as X}from"./templates/support/templateUtils.js";import{ContingentValuesManager as Y,isLayerWithContingentValues as ee}from"../support/ContingentValuesManager.js";import{isEmptyValue as te}from"../support/forms/formUtils.js";function se(e,t){return e?.find(e=>e.layer===t)}let ae=class extends n{constructor(e){super(e),this._attachmentCache=new m,this.activeFeatureIndex=-1,this.attachmentsEnabled=!1,this.callbacks=null,this.disabled=!1,this.editType="NA",this.features=new a,this._hasAsyncArcadeExpressions=!1,this.highlightHelper=null,this.maximumFeatureCount=2e3,this.maximumFeatureCountWithComplexForms=50,this.map=null,this.pageStack=[],this.readOnly=!1,this.pendingSubtypeChoice=null,this.spatialReference=null,this.submitHasBeenAttempted=!1,this.timeZone=null,this.userHasChangedValues=!1,this.layerInfos=null,this._arcadeExecutorProvider=new G,this._activeAssociation=null,this._activeAssociationsInput=null,this._activeRelationshipInput=null,this._ownContingentValuesManager=null,this._activeFormInputsByElementId=new Map,this._emptyForm=new W({inputs:[]}),this._emptyFormTemplate=new q({elements:[]}),this._featureFormMap=new m,this._prepareTask=null,this._layerTemplateUpdateTask=null,this._reactiveGraphicLookup=new m,this._updatingHandles=new w,this._submitTask=null,this._layerTemplateMap=new m,this._workingFeatures=new a,this._expressionsManager=new D({arcadeContext:{editType:"NA",spatialReference:null,map:null,timeZone:k}}),this._getExternalErrorForFeature=(e,t)=>this._reactiveContingentValuesManager.getViolationTypeForField(e,t),this._getFieldValueOptionsForFeature=e=>this._reactiveContingentValuesManager.getAndWatchFieldValueOptions(e),this.sharedForm=this._emptyForm,this.sharedFormTemplate=this._emptyFormTemplate}initialize(){this.contingentValuesManager||(this.contingentValuesManager=this._ownContingentValuesManager=new Y),this.addHandles([g(()=>this.features,"after-changes",()=>{this.goHome(),this.notifyChange("layers"),this._prepare()},y),f(()=>[this.attachmentsEnabled,this.features,this.map,this.timeZone,this.editType],()=>this._prepare(),y),f(()=>this.activeForm,()=>{this.goHome(),this._activeFormInputsByElementId.clear(),this._syncAttachments()},y),f(()=>this.activeFeature,()=>{this.goHome()},y),f(()=>this.page,e=>{const t=[...this.pageStack];if(t.includes(e))for(;t.length&&t.at(-1)!==e;)t.pop();else t.push(e);this.pageStack=t},v),f(()=>this.contingentValuesManager,e=>{l(this._reactiveContingentValuesManager),this._reactiveContingentValuesManager=new U({manager:e})},_)]),this._prepare()}destroy(){this._prepareTask=h(this._prepareTask),this.pendingSubtypeChoice?.reject(),this._layerTemplateUpdateTask=h(this._layerTemplateUpdateTask),this._workingFeatures.destroyAll(),l(this._expressionsManager),l(this._reactiveContingentValuesManager),this._updatingHandles.destroy(),this._reactiveGraphicLookup=new m,this._emptyForm.destroy(),this._emptyFormTemplate.destroy(),this._ownContingentValuesManager=l(this._ownContingentValuesManager),this.highlightHelper?.removeAll()}get activeFeature(){const e=this.activeFeatureIndex;return e<0?null:this.features.at(e)}get activeForm(){if("batch"===this.mode)return this.sharedForm;const e=this._workingFeatures.at(this.activeFeatureIndex);if(!e)return this._emptyForm;const t=this._featureFormMap.get(e);if(t)return t;const s=this._makeBatchFormInputsForFeature(e);return s!==this._emptyForm&&this._featureFormMap.set(e,s),s}get activeLayer(){const{activeFeature:e}=this;if(!e)return null;return x(e)??null}get activeAssociation(){return this._activeAssociation}get activeAssociationsInput(){return this._activeAssociationsInput}get activeAssociationType(){return this.activeAssociationsInput?.activeAssociationType}get activeRelationshipInput(){return this._activeRelationshipInput}get calculating(){return this._expressionsManager.calculating}get expressionsManager(){return this._expressionsManager}get canGoBack(){return this.pageStack.length>1}get expressionEvaluationFailed(){return this._expressionsManager.expressionEvaluationFailed}get hasNonActiveInvalidFeatures(){if("batch"===this.mode)return!1;const{activeFeature:e}=this;return this.invalidFeatures.some(t=>t!==e)}get hasAsyncArcadeExpressions(){return this._hasAsyncArcadeExpressions}get hasTooManyFeatures(){return this._workingFeatures.length>this.maximumFeatureCount}get hasTooManyComplexFeatures(){return this._workingFeatures.length>this.maximumFeatureCountWithComplexForms&&this.hasAsyncArcadeExpressions}get invalidFeatures(){return this.sharedForm.invalidFeatures}get hasVisibleInputs(){return this.visibleInputs.length>0}get hasLayersWithContingentValues(){const e=this.contingentValuesManager;for(const t of this.layers)if(e.getFieldsWithContingentValues(t).size>0)return!0;return!1}get formDescription(){return this._computeFormHeaderField(this.activeForm?.description)}get formTitle(){return this._computeFormHeaderField(this.activeForm?.title)}get effectiveTimeZone(){const{activeLayer:e,timeZone:t}=this;if(!e)return t??"system";const s=S(e);return L(t,s)}get visibleInputs(){return this.activeForm.inputs.filter(e=>e.visible)}get noVisibleElementsReason(){if(this.hasVisibleInputs)return null;if(0===this.activeForm.inputs.length)return"noElements";const e=new Set;for(const t of this.activeForm.inputs)switch(t.visibilityCode){case"hidden:not-in-all-layers":case"hidden:no-domain-in-common":e.add("noElementsInCommon");break;case"hidden:field-definition":case"hidden:group-visibility-expression:all-features":case"hidden:visibility-expression:all-features":e.add("allElementsHidden");break;case"hidden:group-visibility-expression:some-features":case"hidden:visibility-expression:some-features":return"elementsHiddenInSome"}return e.has("allElementsHidden")?"allElementsHidden":"noElementsInCommon"}get page(){return this.showingSelectedAttachmentReplacePage&&this.selectedAttachmentDetails?"replacing-attachment":this.selectedAttachmentDetails?"viewing-attachment-details":this.selectedAttachmentAddInput?"adding-attachments":this.selectedAttachmentListInput?"viewing-attachments":this.activeAssociationsInput?.associatedLayer?"viewing-associated-features":this.activeAssociationsInput?"viewing-associated-layers":this.activeRelationshipInput?.showAllRelatedRecords?"viewing-related-records":this.activeRelationshipInput?.showAllCategories?"viewing-related-categories":"default"}get subtypes(){const e=this.activeLayer;return C(e)||M(e)||T(e)?b(e):[]}get status(){const e=this._prepareTask;return null==e?"not-loaded":e.finished?null!=e.error?"failed":"loaded":"loading"}get updating(){return this._updatingHandles.updating||this.calculating}get valid(){return this.sharedForm.valid&&Array.from(this._featureFormMap.values()).every(e=>e.valid)}get layers(){return Array.from(this._layersSet)}get mode(){return this.activeFeatureIndex>-1?"single":"batch"}submit(){if(this.submitHasBeenAttempted=!0,this.validateContingentValues(this._workingFeatures),!this._hasPendingAttachmentHydration)return this._emitSubmit(),Promise.resolve();if(this._submitTask)return this._submitTask.promise;const e=s(async()=>{await Promise.all(this._allAttachmentInputs.map(e=>e.waitForPendingAttachmentUpdateData())),this._emitSubmit()});return this._submitTask=e,e.promise.finally(()=>{this._submitTask===e&&(this._submitTask=null)}),e.promise}get selectedAttachment(){return this._get("selectedAttachment")??null}set selectedAttachment(e){this.showingSelectedAttachmentReplacePage=!1,this._set("selectedAttachment",e),null!=e&&(this.selectedAttachmentAddElementId=null)}get selectedAttachmentAddElementId(){return this._get("selectedAttachmentAddElementId")??null}set selectedAttachmentAddElementId(e){this.showingSelectedAttachmentReplacePage=!1,this._set("selectedAttachmentAddElementId",e),null!=e&&(this.selectedAttachment=null,this.selectedAttachmentListElementId=null)}get selectedAttachmentListElementId(){return this._get("selectedAttachmentListElementId")??null}set selectedAttachmentListElementId(e){this._set("selectedAttachmentListElementId",e),null!=e&&(this.selectedAttachment=null,this.selectedAttachmentAddElementId=null)}get selectedAttachmentListInput(){const e=this.selectedAttachmentListElementId,t=this.activeForm;return e&&t&&t.allAttachmentElementInputs.find(t=>t.template.elementId===e)||null}get showingSelectedAttachmentReplacePage(){return this._get("showingSelectedAttachmentReplacePage")??!1}set showingSelectedAttachmentReplacePage(e){this._set("showingSelectedAttachmentReplacePage",e&&null!=this.selectedAttachmentDetails)}get selectedAttachmentAddInput(){const e=this.selectedAttachmentAddElementId,t=this.activeForm;return e&&t&&t.allAttachmentElementInputs.find(t=>t.template.elementId===e)||null}get selectedAttachmentDetails(){const e=this.selectedAttachment,t=this.activeForm;if(!e||!t)return null;const s=t.allAttachmentElementInputs.find(t=>t.template.elementId===e.elementId);if(!s)return null;const a=s.attachments.findIndex(t=>V(t)===e.attachmentKey);if(-1===a)return null;return{attachment:s.attachments[a],input:s}}get _allAttachmentInputs(){const e=[...this.sharedForm.allAttachmentElementInputs];for(const t of this._featureFormMap.values())e.push(...t.allAttachmentElementInputs);return e}get _hasPendingAttachmentHydration(){return this._allAttachmentInputs.some(e=>e.hasPendingAttachmentUpdateData)}get _layersSet(){const e=new Set;for(const t of this._workingFeatures){const s=x(t.plainGraphic);s&&e.add(s)}return e}applyStashedAttachmentEdits(e){const t=this._allAttachmentInputs;for(const s of e){const e=t.find(e=>e.label===s.label&&e.attachmentKeyword===s.keywords);e&&e.applyStashedEdits(s)}}findFieldInput(e){if(null==e)return;const t=this._activeFormInputsByElementId;if(t.has(e))return t.get(e);const s=this.activeForm.allFieldInputs.find(t=>t.template.elementId===e);return void 0!==s?(t.set(e,s),s):void 0}getFirstVisibleInvalidFieldInput(){if(this.hasVisibleInputs&&!this.activeForm.valid)for(const e of this.visibleInputs){if(K(e)){const t=e.inputs.find(e=>z(e)&&!e.valid);if(t)return{input:t,groupInput:e}}if(z(e)&&!e.valid)return{input:e}}}getFieldInputValue(e){return this.findFieldInput(e)?.value}getValues(e){const t=this._reactiveGraphicLookup.get(e);if(!t)throw new i("feature-not-found","The given feature is not present in the BatchAttributeForm");return{...t.attributes}}async goBack(){switch(this.page){case"replacing-attachment":return void this.setShowingSelectedAttachmentReplacePage(!1);case"viewing-attachment-details":return void this.setSelectedAttachment(null);case"adding-attachments":return void this.setSelectedAttachmentAddElementId(null);case"viewing-attachments":return void this.setSelectedAttachmentListElementId(null);case"viewing-associated-features":return void this.setActiveAssociationsLayer(null);case"viewing-associated-layers":return void this.setActiveAssociationsInput(null);case"viewing-related-categories":case"viewing-related-records":return void this.clearActiveRelationshipCategoryOrInput();default:return}}async goHome(){this.setShowingSelectedAttachmentReplacePage(!1),this.setSelectedAttachment(null),this.setSelectedAttachmentAddElementId(null),this.setSelectedAttachmentListElementId(null),this.setActiveAssociationsLayer(null),this.setActiveAssociationsInput(null),this.clearAllRelationshipSettings()}notifyGeometriesChanged(e){const t=[];for(const s of e){const e=this._reactiveGraphicLookup.get(s);e&&(t.push(e),e.geometry=s.geometry)}this._updatingHandles.consumePromise(this._valueChangeTransaction(async e=>this._expressionsManager.runGeometryDependentExpressions(t,e),"user"))}async overrideOriginalFeature(e,t){await(this._prepareTask?.promise);const s=this._reactiveGraphicLookup.get(e);s&&(s.original=t,this._updatingHandles.consumePromise(this._valueChangeTransaction(e=>this._expressionsManager.runOriginalFeatureDependentExpressions(s,e),"expression")))}async setFieldInputValue(e,t){const{fieldName:s}=e;await this._updatingHandles.addPromise(this._valueChangeTransaction(async a=>{for(const i of e.features)a.setValue(i,s,t)},"user",e))}async setFieldInputValuePerFeature(e,t){await this._updatingHandles.addPromise(this._valueChangeTransaction(async s=>{for(const[a,i]of t)s.setValue(a,e.fieldName,i);s.hasChanges&&(e.userHasChangedValue=!0)},"user",e))}async setValueForFieldName(e,t,s){await this._updatingHandles.addPromise(this._valueChangeTransaction(async a=>{for(const i of s){const s=this._reactiveGraphicLookup.get(i);s&&a.setValue(s,e,t)}},"user",e))}async setValuePerFeatureForFieldName(e,t){await this._updatingHandles.addPromise(this._valueChangeTransaction(async s=>{for(const[a,i]of t){const t=this._reactiveGraphicLookup.get(a);t&&s.setValue(t,e,i)}},"user",e))}async setFieldValue(e,t){const s=this.activeForm.allFieldInputs.find(t=>t.fieldName===e);if(null==s)throw new i("no-field-input-found",`Cannot set the value of FieldInput with field name: ${e} because none was found in the active form`);await this.setFieldInputValue(s,t)}async setValue(e,t){const s=this.findFieldInput(e);if(null==s)throw new i("no-FieldInput-found",`Cannot set the value of FieldInput with ID: ${e} because none was found in the active form`);await this.setFieldInputValue(s,t)}async applySubtypeDefaults(e){const{defaultValues:t}=e,{allFieldInputs:s}=this.activeForm;await this._updatingHandles.addPromise(this._valueChangeTransaction(async e=>{for(const a of s){const{fieldName:s}=a,i=t[s];if(null!=i)for(const t of a.features)e.setValue(t,s,i)}},"user"))}async handleSubtypeChanged(e){const t=this._workingFeatures.at(e);if(t)return this._updatingHandles.addPromise(this._handleSubtypeChanged(t))}async stageAddAttachments(e,t){if(0===t.length)return[];const s=this._findAttachmentInput(e);if(!s)return[];const a=await this._updatingHandles.addPromise(s.stageAddAttachments(t,this._expressionsManager.arcadeContext));return 0===a.length||(this.userHasChangedValues=!0,this._emitAttachmentsChange(s)),a}stageDeleteAttachment(e,t){const s=this._findAttachmentInput(e);if(!s)return;const a=this._findAttachment(s,t);a&&(s.stageDeleteAttachment(a),this.userHasChangedValues=!0,this._emitAttachmentsChange(s))}async stageRenameAttachment(e,t,s){const a=this._findAttachmentInput(e);if(!a)return;const i=this._findAttachment(a,t);i&&(a.stageRenameAttachment(i,s.trim()),this.userHasChangedValues=!0,await a.ensureStagedUpdateData(i),this._emitAttachmentsChange(a))}async stageReplaceAttachment(e,t,s){const a=this._findAttachmentInput(e);if(!a)return!1;const i=this._findAttachment(a,t);if(!i)return!1;return!!await a.stageReplaceAttachment(i,s,this._expressionsManager.arcadeContext)&&(this.userHasChangedValues=!0,this._emitAttachmentsChange(a),!0)}clearAttachmentChanges(e){const t=this._findAttachmentInput(e);t&&(t.clearAttachmentChanges(),this._emitAttachmentsChange(t))}setActiveAssociation(e){this._activeAssociation=e}setActiveAssociationsInput(e){this._activeAssociationsInput=e}setActiveAssociationsLayer(e){this._activeAssociationsInput?.setAssociatedLayer(e)}setActiveAssociationType(e){this._activeAssociationsInput?.setActiveAssociationType(e)}setActiveRelationshipInput(e){e||this._activeRelationshipInput?.setActiveCategory(null),this._activeRelationshipInput=e}setActiveRelationshipCategory(e,t){t.setActiveCategory(e),this.setActiveRelationshipInput(t)}clearAllRelationshipSettings(){const e=this.activeRelationshipInput;e&&(e.setActiveCategory(null),e.setShowAllCategories(!1),e.setShowAllRelatedRecords(!1),this._activeRelationshipInput=null)}clearActiveRelationshipCategoryOrInput(){const e=this.activeRelationshipInput;e&&(e.showAllRelatedRecords?e.showAllCategories?e.setActiveCategory(null):this.setActiveRelationshipInput(null):e.showAllCategories&&(e.setShowAllCategories(!1),this.setActiveRelationshipInput(null)))}resetAttachmentChanges(e,t){const s=this._findAttachmentInput(e);if(!s)return;const a=this._findAttachment(s,t);a&&(s.discardStagedEdits(a),this._emitAttachmentsChange(s))}setSelectedAttachment(e){this.selectedAttachment=e??null}setShowingSelectedAttachmentReplacePage(e){this.showingSelectedAttachmentReplacePage=e}setSelectedAttachmentAddElementId(e){this.selectedAttachmentAddElementId=e??null}setSelectedAttachmentListElementId(e){this.selectedAttachmentListElementId=e??null}userChangesHaveMadeFeatureInvalid(e){return!!this._reactiveGraphicLookup.get(e)?.userChangesHaveMadeInvalid}validate(){return!1}validateContingentValues(e,t=!1){if(t&&!this.submitHasBeenAttempted)for(const s of e)this._reactiveContingentValuesManager.validateContingenciesForNonNullFields(s);else for(const s of e)this._reactiveContingentValuesManager.validateContingencyConstraints(s,{includeIncompleteViolations:!0})}_makeBatchFormInputsForFeature(e){const t=this._layerTemplateMap.get(e.layer);return t?Z(t,{allFeatures:new a([e]),expressionsManager:this._expressionsManager,getExternalErrorForFeature:this._getExternalErrorForFeature,getFieldValueOptionsForFeature:this._getFieldValueOptionsForFeature,map:this.map}):this._emptyForm}async _ensureLayerTemplate(e,t){const{_layersSet:s,contingentValuesManager:a}=this,i=e.layer;let n=!1;for(const r of this._layerTemplateMap.keys())s.has(r)||(this._layerTemplateMap.delete(r),this._expressionsManager.layerExpressionsModelMap.delete(r),a.resetOptionsForLayer(r),ee(r)&&a.resetViolationsForLayer(r),n=!0);this._layerTemplateMap.has(i)||(await this._prepareLayer(i,t),c(t),a.layers.add(i),n=!0),n&&(this._prepareSharedFormTemplate(),$(this.sharedForm,this.sharedFormTemplate,{allFeatures:this._workingFeatures,expressionsManager:this._expressionsManager,getFieldValueOptionsForFeature:this._getFieldValueOptionsForFeature,map:this.map}),this._recomputeHasAsyncArcadeExpressions(),await A(()=>!a.updating,t))}_recomputeHasAsyncArcadeExpressions(){this._hasAsyncArcadeExpressions=!1;for(const e of this._expressionsManager.layerExpressionsModelMap.values())for(const t of e.arcadeExecutorUses.keys())if(t.isAsync)return void(this._hasAsyncArcadeExpressions=!0)}_computeFormHeaderField(e){const{activeFeature:t,activeLayer:s}=this;return e&&s&&t?O({attributes:t?.attributes,label:e,layer:s,timeZone:this.effectiveTimeZone}):null}_makeSubmitResults(){const e=new Map;for(const[s,a]of this._reactiveGraphicLookup){const i=[],n=[],r=this._featureFormMap.get(a)?.allAttachmentElementInputs??[];for(const e of r)t(i,e.toSubmitEdits()),e.valid||n.push(e.template.elementId);e.set(s,{feature:s,values:{...a.attributes},invalidFields:[],attachmentEdits:i,invalidAttachmentElementIds:n})}for(const t of this.sharedForm.allFieldInputs)for(const s of t.invalidFeatures)e.get(s)?.invalidFields.push(t.fieldName);return Array.from(e.values())}async _handleSubtypeChanged(e){const t=e.layer;if(!M(t))return;const a=t.parent?.findSublayerForFeature(e.plainGraphic);if(!a)return;this._layerTemplateUpdateTask=h(this._layerTemplateUpdateTask);const i=s(async t=>{c(t),e.source.sourceLayer=a,e.source.origin=a.graphicOrigin,await this._ensureLayerTemplate(e,t),c(t),this._featureFormMap.get(e)?.destroy(),this._featureFormMap.set(e,this._makeBatchFormInputsForFeature(e)),await p(this._valueChangeTransaction(t=>this._expressionsManager.runAllExpressions([e],t),"user"),t),c(t)});this._layerTemplateUpdateTask=i,await u(this._updatingHandles.addPromise(i.promise))}_emitSubmit(){this.emit("submit",{name:"submit",results:this._makeSubmitResults(),valid:this.valid})}_findAttachmentInput(e){const t=this.activeForm.allAttachmentElementInputs.find(t=>t.template.elementId===e);return t||r.getLogger(this).error(`Attachment input not found for elementId '${e}'`),t}_findAttachment(e,t){const s=e.findAttachment(t);return s||r.getLogger(this).error(`Attachment '${t}' not found for attachment element '${e.template.elementId}'`),s}_makeAttachmentEdits(e){const s=[];for(const a of e.allAttachmentElementInputs)t(s,a.toSubmitEdits());return s}_emitAttachmentsChange(e){const t=e.single.feature;if(!t)return;const s=this._featureFormMap.get(t);this.emit("attachments-change",{name:"attachments-change",feature:t.source,attachmentEdits:this._makeAttachmentEdits(s??this.activeForm),valid:this.valid})}async _valueChangeTransaction(e,t,s){const a=new B(this,t,"string"==typeof s?s:s?.fieldName);if(await e(a),"user"===t&&await this._expressionsManager.runExpressionsDependentOnChangedFields(a),await a.close(),a.hasChanges&&s){const e="string"==typeof s?this.activeForm.allFieldInputs.find(e=>e.fieldName===s):s;e&&(e.userHasChangedValue=!0)}}_prepare(){this.pendingSubtypeChoice?.reject(),this._hasAsyncArcadeExpressions=!1,this._prepareTask=h(this._prepareTask),this._layerTemplateUpdateTask=h(this._layerTemplateUpdateTask),this._layerTemplateMap.clear(),this._updateWorkingFeatures(),l(this._expressionsManager),this.userHasChangedValues=!1,this._expressionsManager=new D({arcadeContext:{editType:this.editType,spatialReference:this.spatialReference??E.WebMercator,map:this.map,timeZone:this.timeZone||"system"}});const{layers:e}=this;if(0===e.length)return;const t=s(async t=>{try{c(t),this._updateWorkingFeatures(),this.contingentValuesManager.layers.addMany(e),await Promise.all(e.map(e=>e.load()));for(const s of e)await this._prepareLayer(s,t);if(this.hasTooManyComplexFeatures)throw new i("too-many-features-with-complex-forms","There are too many features to load into the form with the configured complexity");if(this.hasTooManyFeatures)throw new i("too-many-features","There are too many features to load into the form.");this._prepareSharedFormTemplate(),this.sharedForm=Z(this.sharedFormTemplate,{allFeatures:this._workingFeatures,expressionsManager:this._expressionsManager,getExternalErrorForFeature:this._getExternalErrorForFeature,getFieldValueOptionsForFeature:this._getFieldValueOptionsForFeature,map:this.map}),await this._valueChangeTransaction(async e=>await this._expressionsManager.runAllExpressions(this._workingFeatures.toArray(),e),"expression"),await A(()=>!this.contingentValuesManager.updating)}catch(s){throw d(s)||r.getLogger(this).error("Failed preparing form",s),s}});this._updatingHandles.consumePromise(t.promise),this._prepareTask=t}async _prepareLayer(e,t){const s=se(this.layerInfos,e),a=await J(e,{arcadeExecutorProvider:this._arcadeExecutorProvider,formTimeZone:this.timeZone,attachmentsEnabled:this.attachmentsEnabled},s?.formTemplate);c(t),this._layerTemplateMap.set(e,a);const i=a.getExpressionExecutorsForLayer(e);if(this._expressionsManager.layerExpressionsModelMap.set(e,new N({preserveFieldValuesWhenHidden:a.preserveFieldValuesWhenHidden,executorMap:i})),!this._hasAsyncArcadeExpressions)for(const n of i.values())if(n&&(this._hasAsyncArcadeExpressions=!0===(n.editableExpression?.isAsync||n.requiredExpression?.isAsync||n.valueExpression?.isAsync||n.visibilityExpression?.isAsync),this._hasAsyncArcadeExpressions))break}_prepareSharedFormTemplate(){const e=new Map;for(const t of this._layerTemplateMap.values())for(const s of t.elements){if(Q(s))continue;const t=s.clone();X(t)&&(t.elements=t.elements.filter(e=>!Q(e)));const{elementId:a}=t;e.has(a)?e.get(a).foldIn(t):e.set(a,t)}this.sharedFormTemplate=new q({elements:Array.from(e.values())})}_updateWorkingFeatures(){this._workingFeatures.destroyAll(),this._reactiveContingentValuesManager.reset();for(const t of this._featureFormMap.values())t.destroy();this._featureFormMap.clear(),this._attachmentCache.clear();const{features:e}=this;if(this._reactiveGraphicLookup=new m,0!==e.length){this._workingFeatures.addMany(e.map(R));for(const e of this._workingFeatures)this._reactiveGraphicLookup.set(e.source,e)}}async _syncAttachments(){const{activeFeature:e,activeLayer:t,activeForm:s}=this;if(!(e&&s&&H(t)&&P(t)))return;const a=e.getObjectId();if(null==a)return;const i=this._attachmentCache.get(t),n=s.allAttachmentElementInputs;if(!n.length)return;let r;if(i){const e=i.get(a);e&&(r=e)}if(!r){r=await j(t,a,n);o(this._attachmentCache,t,()=>new m).set(a,r)}for(const o of n)o.applyFetchedAttachments(oe(o,r))}get test(){return{expressionsManager:this._expressionsManager,reactiveGraphicLookup:this._reactiveGraphicLookup}}};e([F()],ae.prototype,"_attachmentCache",void 0),e([F({readOnly:!0})],ae.prototype,"activeFeature",null),e([F()],ae.prototype,"activeFeatureIndex",void 0),e([F({readOnly:!0})],ae.prototype,"activeForm",null),e([F({readOnly:!0})],ae.prototype,"activeLayer",null),e([F()],ae.prototype,"activeAssociation",null),e([F()],ae.prototype,"activeAssociationsInput",null),e([F()],ae.prototype,"activeAssociationType",null),e([F()],ae.prototype,"activeRelationshipInput",null),e([F()],ae.prototype,"attachmentsEnabled",void 0),e([F()],ae.prototype,"callbacks",void 0),e([F()],ae.prototype,"disabled",void 0),e([F()],ae.prototype,"calculating",null),e([F()],ae.prototype,"canGoBack",null),e([F()],ae.prototype,"contingentValuesManager",void 0),e([F()],ae.prototype,"editType",void 0),e([F()],ae.prototype,"features",void 0),e([F()],ae.prototype,"expressionEvaluationFailed",null),e([F()],ae.prototype,"hasNonActiveInvalidFeatures",null),e([F()],ae.prototype,"hasAsyncArcadeExpressions",null),e([F()],ae.prototype,"_hasAsyncArcadeExpressions",void 0),e([F()],ae.prototype,"invalidFeatures",null),e([F()],ae.prototype,"hasVisibleInputs",null),e([F()],ae.prototype,"hasLayersWithContingentValues",null),e([F()],ae.prototype,"formDescription",null),e([F()],ae.prototype,"formTitle",null),e([F()],ae.prototype,"effectiveTimeZone",null),e([F()],ae.prototype,"highlightHelper",void 0),e([F()],ae.prototype,"maximumFeatureCount",void 0),e([F()],ae.prototype,"maximumFeatureCountWithComplexForms",void 0),e([F()],ae.prototype,"visibleInputs",null),e([F()],ae.prototype,"map",void 0),e([F()],ae.prototype,"noVisibleElementsReason",null),e([F()],ae.prototype,"page",null),e([F()],ae.prototype,"pageStack",void 0),e([F()],ae.prototype,"readOnly",void 0),e([F()],ae.prototype,"pendingSubtypeChoice",void 0),e([F()],ae.prototype,"subtypes",null),e([F()],ae.prototype,"spatialReference",void 0),e([F()],ae.prototype,"submitHasBeenAttempted",void 0),e([F()],ae.prototype,"timeZone",void 0),e([F()],ae.prototype,"updating",null),e([F()],ae.prototype,"valid",null),e([F()],ae.prototype,"layers",null),e([F()],ae.prototype,"mode",null),e([F()],ae.prototype,"sharedForm",void 0),e([F()],ae.prototype,"sharedFormTemplate",void 0),e([F()],ae.prototype,"selectedAttachment",null),e([F()],ae.prototype,"selectedAttachmentAddElementId",null),e([F()],ae.prototype,"selectedAttachmentListElementId",null),e([F()],ae.prototype,"selectedAttachmentListInput",null),e([F()],ae.prototype,"showingSelectedAttachmentReplacePage",null),e([F()],ae.prototype,"selectedAttachmentAddInput",null),e([F()],ae.prototype,"selectedAttachmentDetails",null),e([F()],ae.prototype,"userHasChangedValues",void 0),e([F()],ae.prototype,"layerInfos",void 0),e([F()],ae.prototype,"_arcadeExecutorProvider",void 0),e([F()],ae.prototype,"_activeAssociation",void 0),e([F()],ae.prototype,"_activeAssociationsInput",void 0),e([F()],ae.prototype,"_activeRelationshipInput",void 0),e([F()],ae.prototype,"_prepareTask",void 0),e([F()],ae.prototype,"_reactiveGraphicLookup",void 0),e([F()],ae.prototype,"_allAttachmentInputs",null),e([F()],ae.prototype,"_hasPendingAttachmentHydration",null),e([F()],ae.prototype,"_layerTemplateMap",void 0),e([F()],ae.prototype,"_layersSet",null),e([F()],ae.prototype,"_workingFeatures",void 0),e([F()],ae.prototype,"_expressionsManager",void 0),ae=e([I("esri.widgets.BatchAttributeForm.BatchAttributeFormViewModel")],ae);const ie=ae;function ne(e){return null!=e&&e.trim().length>0}function re(e,t){const s=e.keywords;return ne(s)&&s.toLowerCase()===t}function oe(e,t){const s="attachment"===e.input?.type?e.input.attachmentAssociationType:"exact",a=e.attachmentKeyword;if("any"===s)return t;if("exactOrNone"===s){if(te(a))return t.filter(e=>!ne(e.keywords));const e=a.toLowerCase();return t.filter(t=>!ne(t.keywords)||re(t,e))}if(te(a))return t;const i=a.toLowerCase();return t.filter(e=>re(e,i))}export{ie as default};
@@ -7,6 +7,15 @@ import type { NestableAttachmentInputUnion } from "../../form/elements/inputs/at
7
7
  */
8
8
  export function getMediaDurationInSeconds(file: Blob | File, mediaType: "audio" | "video"): Promise<number | null>;
9
9
 
10
+ /**
11
+ * @param file - The Blob or File whose intrinsic dimensions should be read.
12
+ * @internal
13
+ */
14
+ export function getImageDimensionsInPixels(file: Blob | File): Promise<{
15
+ width: number;
16
+ height: number;
17
+ } | null>;
18
+
10
19
  /**
11
20
  * @param inputType - The attachment input type to categorize.
12
21
  * @internal
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{isBlobProtocol as e}from"../../core/urlUtils.js";import{isString as t}from"../../support/guards.js";import{isSupportedImage as n}from"../Attachments/support/attachmentUtils.js";function o(e){return String(e.globalId||e.id||e.name)}function r(e){const n=t(e)?e:"",o=n.lastIndexOf(".");return o<=0||o===n.length-1?{baseName:n,extension:""}:{baseName:n.slice(0,o),extension:n.slice(o)}}function a(e,n){const{extension:o}=r(e);if(!o)return n;const a=n.toLowerCase(),u=o.toLowerCase(),i=a.endsWith(u)&&n.length>o.length?n.slice(0,-o.length):n;return i.trim().length?`${i}${o}`:t(e)?e:n}function u(n,o,r){const{size:a,url:u}=n;if(!t(u)||!u.length)return null;if(e(u))return u;const i=[];return o&&null!=r&&i.push(`w=${r}`),null==a||Number.isNaN(a)||i.push(`s=${a}`),i.length?`${u}${u.includes("?")?"&":"?"}${i.join("&")}`:u}function i(e){return n(e.contentType)}function s(e,t){const{capture:n,recordAudio:o,takePhoto:r,takeVideo:a}=e;return"image"===t?r||n:"video"===t?a||n:"audio"===t&&o||n}async function c(e,t){const n=document.createElement(t),o=URL.createObjectURL(e);return await new Promise(e=>{const t=()=>{n.onloadedmetadata=null,n.onerror=null,n.removeAttribute("src"),n.load(),URL.revokeObjectURL(o)};n.preload="metadata",n.onloadedmetadata=()=>{const o=Number.isFinite(n.duration)?n.duration:null;t(),e(o)},n.onerror=()=>{t(),e(null)},n.src=o})}function l(e){switch(e){case"audio":return"audio";case"document":default:return"document";case"image":case"signature":return"image";case"video":return"video"}}const d={getAttachmentCategoryForInputType:l,getMediaDurationInSeconds:c};export{d as attachmentValidationUtils,l as getAttachmentCategoryForInputType,r as getAttachmentFilenameParts,o as getAttachmentKey,u as getAttachmentUrl,s as getCaptureButtonLabel,c as getMediaDurationInSeconds,i as isImageAttachment,a as preserveAttachmentFilenameExtension};
2
+ import{isBlobProtocol as e}from"../../core/urlUtils.js";import{isString as t}from"../../support/guards.js";import{isSupportedImage as n}from"../Attachments/support/attachmentUtils.js";function r(e){return String(e.globalId||e.id||e.name)}function o(e){const n=t(e)?e:"",r=n.lastIndexOf(".");return r<=0||r===n.length-1?{baseName:n,extension:""}:{baseName:n.slice(0,r),extension:n.slice(r)}}function i(e,t){const{extension:n}=o(e);if(!n)return t;const r=t.toLowerCase(),i=n.toLowerCase(),a=r.endsWith(i)&&t.length>n.length?t.slice(0,-n.length):t;return a.trim().length?`${a}${n}`:t}function a(n,r,o){const{size:i,url:a}=n;if(!t(a)||!a.length)return null;if(e(a))return a;const u=[];return r&&null!=o&&u.push(`w=${o}`),null==i||Number.isNaN(i)||u.push(`s=${i}`),u.length?`${a}${a.includes("?")?"&":"?"}${u.join("&")}`:a}function u(e){return n(e.contentType)}function s(e,t){const{capture:n,recordAudio:r,takePhoto:o,takeVideo:i}=e;return"image"===t?o||n:"video"===t?i||n:"audio"===t&&r||n}async function c(e,t){const n=document.createElement(t),r=URL.createObjectURL(e);return await new Promise(e=>{const t=()=>{n.onloadedmetadata=null,n.onerror=null,n.removeAttribute("src"),n.load(),URL.revokeObjectURL(r)};n.preload="metadata",n.onloadedmetadata=()=>{const r=Number.isFinite(n.duration)?n.duration:null;t(),e(r)},n.onerror=()=>{t(),e(null)},n.src=r})}async function l(e){const t=document.createElement("img"),n=URL.createObjectURL(e);return await new Promise(e=>{const r=()=>{t.onload=null,t.onerror=null,t.removeAttribute("src"),URL.revokeObjectURL(n)};t.onload=()=>{const{naturalWidth:n,naturalHeight:o}=t;r(),e(Number.isFinite(n)&&Number.isFinite(o)?{width:n,height:o}:null)},t.onerror=()=>{r(),e(null)},t.src=n})}function d(e){switch(e){case"audio":return"audio";case"document":default:return"document";case"image":case"signature":return"image";case"video":return"video"}}const m={getAttachmentCategoryForInputType:d,getImageDimensionsInPixels:l,getMediaDurationInSeconds:c};export{m as attachmentValidationUtils,d as getAttachmentCategoryForInputType,o as getAttachmentFilenameParts,r as getAttachmentKey,a as getAttachmentUrl,s as getCaptureButtonLabel,l as getImageDimensionsInPixels,c as getMediaDurationInSeconds,u as isImageAttachment,i as preserveAttachmentFilenameExtension};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{substitute as e}from"../../intl.js";import{isSubtypeSublayer as t}from"../../layers/support/layerUtils.js";import i from"../../rest/support/AttachmentQuery.js";import{unknown as n,utc as r}from"../../time/constants.js";import{ReactiveGraphic as o}from"./ReactiveGraphic.js";import{isMultipleChoiceFieldInput as a,isGroupInput as s}from"./inputs/support/inputUtils.js";import{getIntlOptionsForField as l}from"../support/dateUtils.js";import{isEmptyValue as u,getRangeErrorMessage as c,shouldUseScientificNotation as d,scientificNumberFormatOptions as p,numberFormatOptions as f}from"../support/forms/formUtils.js";const m=(e,t)=>null!=e&&e.input?.type===t;function y(e){return new o({source:e})}function h(t,i,n,r){const{dataType:o,minLength:s}=t,u=n?.validationErrors;if(!u||!i)return null;if("batch-attribute-form-validation::features-have-different-errors"===i)return u.invalidBatchFormType;if("input-validation-error::cannot-be-empty"===i)return u.cannotBeNull;if("domain-validation-error::value-out-of-range"===i||"numeric-range-validation-error::out-of-range"===i){const{field:i,range:n}=t,a={type:"date",intlOptions:{timeZone:"date"===i.type&&r?r:void 0,...l(i)}},s=c(n,u);return e(s,n,{format:{max:"date"===o?a:null!=n.max&&d(n.max)?p:f,min:"date"===o?a:null!=n.min&&d(n.min)?p:f}})}return"domain-validation-error::invalid-coded-value"===i?u.invalidCodedValue:"type-validation-error::invalid-type"===i?u.invalidType:"length-validation-error::too-short"===i?e(u.tooShort,{min:s}):"multiple-choice-validation-error::too-few-selected-choices"===i&&a(t)?e(u.tooFewSelectedChoices,{min:t.input.minimumChoices}):"multiple-choice-validation-error::too-many-selected-choices"===i&&a(t)?e(u.tooManySelectedChoices,{max:t.input.maximumChoices}):"length-validation-error::too-long"===i?null:"contingent-values-validation-error::contingency-violation-warning"===i||"contingent-values-validation-error::contingency-violation-error"===i?u.valuesIncompatible:null}function v(e,t,i){const n=i?.validationErrors;if(!n)return null;let r=null;for(const o of e.invalidHiddenInputs)switch(o.effectiveVisibilityCode){case"hidden:visibility-expression:all-features":case"hidden:group-visibility-expression:all-features":case"hidden:field-definition":return"single"===t?n.nonVisibleError_changeValues:n.nonVisibleError_checkIndividualFeatures;case"hidden:no-domain-in-common":case"hidden:visibility-expression:some-features":case"hidden:group-visibility-expression:some-features":case"hidden:not-in-all-layers":r=n.nonVisibleError_checkIndividualFeatures;break;case"visible":continue;default:o.effectiveVisibilityCode}return r}function b(e){return null!=e&&"object"==typeof e&&"type"in e&&("feature"===e.type||"geojson"===e.type||"knowledge-graph-sublayer"===e.type||"oriented-imagery"===e.type||"scene"===e.type||"subtype-sublayer"===e.type)}function g(e){return!!b(e)||!!(null!=e&&"object"==typeof e&&"type"in e&&e.type&&"id"in e&&e.id&&"fields"in e&&e.fields&&"fieldsIndex"in e&&e.fieldsIndex&&"objectIdField"in e&&e.objectIdField&&"capabilities"in e&&"getField"in e&&e.getField)}function w(e){return g(e)&&"queryAttachments"in e}function j(e){return null!=e&&"object"==typeof e&&"type"in e&&("feature"===e.type||"subtype-sublayer"===e.type)}function x(e){if(!w(e))return!1;const t=e?.effectiveCapabilities??e?.capabilities;return!(!t?.data?.supportsAttachment||!t.operations.supportsQueryAttachments)}async function C(e,t,n){const r=new Set;let o=!1;for(const i of n){if("attachment"===i.input?.type&&("any"===i.input.attachmentAssociationType||"exactOrNone"===i.input.attachmentAssociationType)){o=!0;break}if(u(i.attachmentKeyword)){o=!0;break}r.add(i.attachmentKeyword)}const a=r.size&&!o?Array.from(r):void 0,s=new i({objectIds:[t],where:"1=1",returnMetadata:!0,keywords:a});e.capabilities?.query?.supportsCacheHint&&(s.cacheHint=!0);return(await e.queryAttachments(s))[t]??[]}function I(e,t,i,n){const r=e.get(t)?.get(i)??[];if(!n?.length)return r;const o=new Set(n.map(e=>e.toLowerCase()));return r.filter(e=>o.has(e.keywords.toLowerCase()))}function k(e){return e.reduce((e,t)=>s(t)?[...e,...t.inputs]:[...e,t],[])}function T(e){return t(e)&&e.parent&&(e=e.parent),e&&"datesInUnknownTimezone"in e&&e.datesInUnknownTimezone?n:e&&"preferredTimeZone"in e&&e.preferredTimeZone?e.preferredTimeZone:null}function A(e,t){return e||t?t===n?r:e&&e!==n?e:t??"system":"system"}export{y as createReactiveGraphic,k as flattenInputs,I as getAttachmentsForKeywords,A as getEffectiveTimeZone,v as getHiddenFieldsValidationErrorMessage,T as getLayerTimeZone,h as getVisibleFieldInputValidationErrorMessage,j as isAssociationsLayerUnion,g as isAttributeFormSupportedLayer,b as isAttributeFormSupportedLayerUnion,w as isAttributeFormSupportedLayerWithAttachments,m as isElementTemplateWithInputType,x as layerSupportsQueryAttachments,C as queryAttachmentsForElements};
2
+ import{substitute as e}from"../../intl.js";import{equalsShallow as t}from"../../core/lang.js";import{isSubtypeSublayer as n,getSubtypesFromLayer as i}from"../../layers/support/layerUtils.js";import r from"../../rest/support/AttachmentQuery.js";import{unknown as o,utc as a}from"../../time/constants.js";import{ReactiveGraphic as s}from"./ReactiveGraphic.js";import{isMultipleChoiceFieldInput as l,isGroupInput as u}from"./inputs/support/inputUtils.js";import{getIntlOptionsForField as c}from"../support/dateUtils.js";import{isEmptyValue as d,getRangeErrorMessage as p,shouldUseScientificNotation as f,scientificNumberFormatOptions as m,numberFormatOptions as y}from"../support/forms/formUtils.js";const h=(e,t)=>null!=e&&e.input?.type===t;function v(e){return new s({source:e})}function b(t,n,i,r){const{dataType:o,minLength:a}=t,s=i?.validationErrors;if(!s||!n)return null;if("batch-attribute-form-validation::features-have-different-errors"===n)return s.invalidBatchFormType;if("input-validation-error::cannot-be-empty"===n)return s.cannotBeNull;if("domain-validation-error::value-out-of-range"===n||"numeric-range-validation-error::out-of-range"===n){const{field:n,range:i}=t,a={type:"date",intlOptions:{timeZone:"date"===n.type&&r?r:void 0,...c(n)}},l=p(i,s);return e(l,i,{format:{max:"date"===o?a:null!=i.max&&f(i.max)?m:y,min:"date"===o?a:null!=i.min&&f(i.min)?m:y}})}return"domain-validation-error::invalid-coded-value"===n?s.invalidCodedValue:"type-validation-error::invalid-type"===n?s.invalidType:"length-validation-error::too-short"===n?e(s.tooShort,{min:a}):"multiple-choice-validation-error::too-few-selected-choices"===n&&l(t)?e(s.tooFewSelectedChoices,{min:t.input.minimumChoices}):"multiple-choice-validation-error::too-many-selected-choices"===n&&l(t)?e(s.tooManySelectedChoices,{max:t.input.maximumChoices}):"length-validation-error::too-long"===n?null:"contingent-values-validation-error::contingency-violation-warning"===n||"contingent-values-validation-error::contingency-violation-error"===n?s.valuesIncompatible:null}function g(e,t,n){const i=n?.validationErrors;if(!i)return null;let r=null;for(const o of e.invalidHiddenInputs)switch(o.effectiveVisibilityCode){case"hidden:visibility-expression:all-features":case"hidden:group-visibility-expression:all-features":case"hidden:field-definition":return"single"===t?i.nonVisibleError_changeValues:i.nonVisibleError_checkIndividualFeatures;case"hidden:no-domain-in-common":case"hidden:visibility-expression:some-features":case"hidden:group-visibility-expression:some-features":case"hidden:not-in-all-layers":r=i.nonVisibleError_checkIndividualFeatures;break;case"visible":continue;default:o.effectiveVisibilityCode}return r}function w(e){return null!=e&&"object"==typeof e&&"type"in e&&("feature"===e.type||"geojson"===e.type||"knowledge-graph-sublayer"===e.type||"oriented-imagery"===e.type||"scene"===e.type||"subtype-sublayer"===e.type)}function j(e){return!!w(e)||!!(null!=e&&"object"==typeof e&&"type"in e&&e.type&&"id"in e&&e.id&&"fields"in e&&e.fields&&"fieldsIndex"in e&&e.fieldsIndex&&"objectIdField"in e&&e.objectIdField&&"capabilities"in e&&"getField"in e&&e.getField)}function x(e){return j(e)&&"queryAttachments"in e}function C(e){return null!=e&&"object"==typeof e&&"type"in e&&("feature"===e.type||"subtype-sublayer"===e.type)}function I(e){if(!x(e))return!1;const t=e?.effectiveCapabilities??e?.capabilities;return!(!t?.data?.supportsAttachment||!t.operations.supportsQueryAttachments)}async function k(e,t,n){const i=new Set;let o=!1;for(const r of n){if("attachment"===r.input?.type&&("any"===r.input.attachmentAssociationType||"exactOrNone"===r.input.attachmentAssociationType)){o=!0;break}if(d(r.attachmentKeyword)){o=!0;break}i.add(r.attachmentKeyword)}const a=i.size&&!o?Array.from(i):void 0,s=new r({objectIds:[t],where:"1=1",returnMetadata:!0,keywords:a});e.capabilities?.query?.supportsCacheHint&&(s.cacheHint=!0);return(await e.queryAttachments(s))[t]??[]}function T(e,t,n,i){const r=e.get(t)?.get(n)??[];if(!i?.length)return r;const o=new Set(i.map(e=>e.toLowerCase()));return r.filter(e=>o.has(e.keywords.toLowerCase()))}function V(e,n,r){const o=i(e),a=o?.find(e=>e.code===r);if(!a)return!1;const s=o?.find(e=>e.code===n);return!t(a.defaultValues,s?.defaultValues)&&Object.values(a.defaultValues).some(e=>null!=e)}function A(e){return e.reduce((e,t)=>u(t)?[...e,...t.inputs]:[...e,t],[])}function F(e){return n(e)&&e.parent&&(e=e.parent),e&&"datesInUnknownTimezone"in e&&e.datesInUnknownTimezone?o:e&&"preferredTimeZone"in e&&e.preferredTimeZone?e.preferredTimeZone:null}function U(e,t){return e||t?t===o?a:e&&e!==o?e:t??"system":"system"}export{v as createReactiveGraphic,A as flattenInputs,T as getAttachmentsForKeywords,U as getEffectiveTimeZone,g as getHiddenFieldsValidationErrorMessage,F as getLayerTimeZone,b as getVisibleFieldInputValidationErrorMessage,C as isAssociationsLayerUnion,j as isAttributeFormSupportedLayer,w as isAttributeFormSupportedLayerUnion,x as isAttributeFormSupportedLayerWithAttachments,h as isElementTemplateWithInputType,I as layerSupportsQueryAttachments,k as queryAttachmentsForElements,V as subtypeChangeShouldPrompt};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- const t="esri-batch-attribute-form",e=`${t}__group`,a=`${t}__input`,n=`${t}__attachment-element`,i=`${t}__relationship-element-input`,l=`${t}__multiple-choice-input`,m={base:t,form:`${t}__form`,formHeader:`${t}__form-header`,noticeError:`${t}__notice-error`,disabledNotice:`${t}__disabled-notice`,label:`${t}__label`,labelTextContent:`${t}__label-text-content`,fieldInput:`${a}`,inputRadio:`${a}--radio`,placeholderRadio:`${a}--radio-placeholder`,inputRadioGroup:`${a}--radio-group`,inputRadioLabel:`${a}--radio-label`,inputDisabled:`${a}--disabled`,inputSwitch:`${a}--switch`,dateInputContainer:`${`${t}__date`}-input-container`,textElementInput:`${t}__text-element-input`,attachmentElementInput:`${n}-input`,attachmentElementLabel:`${n}-label`,attachmentElementList:`${n}-list`,attachmentElementListItem:`${n}-list-item`,attachmentElementListItemStart:`${n}-list-item-start`,attachmentElementListItemStagedIndicator:`${n}-list-item-staged-indicator`,attachmentElementListItemThumb:`${n}-list-item-thumb`,attachmentElementListItemIcon:`${n}-list-item-icon`,attachmentElementEmptyState:`${n}-empty-state`,attachmentElementAddActions:`${n}-add-actions`,attachmentElementEmptyAction:`${n}-empty-action`,attachmentElementEmptyActionHint:`${n}-empty-action-hint`,attachmentElementEmptyActionHintValue:`${n}-empty-action-hint-value`,attachmentElementAllPanel:`${n}-all-panel`,attachmentElementAddPanel:`${n}-add-panel`,attachmentElementFileInput:`${n}-file-input`,attachmentElementAddDropzone:`${n}-add-dropzone`,attachmentElementAddDropzoneIcon:`${n}-add-dropzone-icon`,attachmentElementAddDropzoneHeading:`${n}-add-dropzone-heading`,attachmentElementAddDropzoneDetail:`${n}-add-dropzone-detail`,attachmentElementCaptureNotice:`${n}-capture-notice`,attachmentElementValidationCriteria:`${n}-validation-criteria`,attachmentElementDetail:`${n}-detail`,attachmentElementDetailPreview:`${n}-detail-preview`,attachmentElementDetailPreviewImage:`${n}-detail-preview-image`,attachmentElementDetailPreviewIcon:`${n}-detail-preview-icon`,attachmentElementDetailActions:`${n}-detail-actions`,attachmentElementDetailMetadata:`${n}-detail-metadata`,attachmentElementDetailMetadataGroup:`${n}-detail-metadata-group`,attachmentElementDetailFileNameRow:`${n}-detail-file-name-row`,attachmentElementDetailFileNameInput:`${n}-detail-file-name-input`,attachmentElementDetailMetadataLabel:`${n}-detail-metadata-label`,attachmentElementDetailMetadataValue:`${n}-detail-metadata-value`,relationshipElementInput:`${i}`,relationshipElementInputShowingAll:`${i}_showing-all`,relatedRecordsHeader:`${i}_header`,relatedRecordsDescription:`${i}_description`,relatedRecordsList:`${i}_list`,relatedRecordsListObserver:`${i}_list-observer`,relatedRecordsAddButton:`${i}_add-button`,utilityNetworkAssociationsElementInput:`${t}__utility-network-associations-element-input`,centeredButton:`${t}__centered-button`,description:`${t}__description-text`,block:`${t}__block`,group:e,groupSequential:`${e}--sequential`,individualElement:`${e}__individual-element`,multipleChoiceInput:`${l}`,multipleChoiceSelectAll:`${l}__select-all`,multipleChoiceOtherChoice:`${l}__other-choice`,multipleChoiceOtherChoiceWithSelectAll:`${l}__other-choice--with-select-all`};export{m as css};
2
+ const t="esri-batch-attribute-form",e=`${t}__group`,a=`${t}__input`,i=`${t}__attachment-element`,n=`${t}__relationship-element-input`,l=`${t}__multiple-choice-input`,m={base:t,form:`${t}__form`,formHeader:`${t}__form-header`,noticeError:`${t}__notice-error`,disabledNotice:`${t}__disabled-notice`,label:`${t}__label`,labelTextContent:`${t}__label-text-content`,fieldInput:`${a}`,inputRadio:`${a}--radio`,placeholderRadio:`${a}--radio-placeholder`,inputRadioGroup:`${a}--radio-group`,inputRadioLabel:`${a}--radio-label`,inputDisabled:`${a}--disabled`,inputSwitch:`${a}--switch`,dateInputContainer:`${`${t}__date`}-input-container`,textElementInput:`${t}__text-element-input`,attachmentElementInput:`${i}-input`,attachmentElementLabel:`${i}-label`,attachmentElementList:`${i}-list`,attachmentElementListItem:`${i}-list-item`,attachmentElementListItemStart:`${i}-list-item-start`,attachmentElementListItemStagedIndicator:`${i}-list-item-staged-indicator`,attachmentElementListItemThumb:`${i}-list-item-thumb`,attachmentElementListItemIcon:`${i}-list-item-icon`,attachmentElementEmptyState:`${i}-empty-state`,attachmentElementAddActions:`${i}-add-actions`,attachmentElementEmptyActionHint:`${i}-empty-action-hint`,attachmentElementEmptyActionHintValue:`${i}-empty-action-hint-value`,attachmentElementAllPanel:`${i}-all-panel`,attachmentElementAddPanel:`${i}-add-panel`,attachmentElementFileInput:`${i}-file-input`,attachmentElementAddDropzone:`${i}-add-dropzone`,attachmentElementAddDropzoneIcon:`${i}-add-dropzone-icon`,attachmentElementAddDropzoneHeading:`${i}-add-dropzone-heading`,attachmentElementAddDropzoneDetail:`${i}-add-dropzone-detail`,attachmentElementCaptureNotice:`${i}-capture-notice`,attachmentElementValidationCriteria:`${i}-validation-criteria`,attachmentElementDetail:`${i}-detail`,attachmentElementDetailPreview:`${i}-detail-preview`,attachmentElementDetailPreviewImage:`${i}-detail-preview-image`,attachmentElementDetailPreviewIcon:`${i}-detail-preview-icon`,attachmentElementDetailActions:`${i}-detail-actions`,attachmentElementDetailMetadata:`${i}-detail-metadata`,attachmentElementDetailMetadataGroup:`${i}-detail-metadata-group`,attachmentElementDetailFileNameRow:`${i}-detail-file-name-row`,attachmentElementDetailFileNameInput:`${i}-detail-file-name-input`,attachmentElementDetailMetadataLabel:`${i}-detail-metadata-label`,attachmentElementDetailMetadataValue:`${i}-detail-metadata-value`,relationshipElementInput:`${n}`,relationshipElementInputShowingAll:`${n}_showing-all`,relatedRecordsHeader:`${n}_header`,relatedRecordsDescription:`${n}_description`,relatedRecordsList:`${n}_list`,relatedRecordsListObserver:`${n}_list-observer`,relatedRecordsAddButton:`${n}_add-button`,utilityNetworkAssociationsElementInput:`${t}__utility-network-associations-element-input`,centeredButton:`${t}__centered-button`,description:`${t}__description-text`,group:e,groupSequential:`${e}--sequential`,individualElement:`${e}__individual-element`,multipleChoiceInput:`${l}`,multipleChoiceSelectAll:`${l}__select-all`,multipleChoiceOtherChoice:`${l}__other-choice`,multipleChoiceOtherChoiceWithSelectAll:`${l}__other-choice--with-select-all`};export{m as css};
@@ -31,7 +31,7 @@ export default class AttachmentElementInput extends EditableInput<any> {
31
31
  /** Indicates if the input allows users to rename attachments. */
32
32
  get allowUserRename(): boolean | null | undefined;
33
33
  /** The input's attachment keyword. This is used to filter attachments associated with the active feature. */
34
- get attachmentKeyword(): string | null | undefined;
34
+ get attachmentKeyword(): string | undefined;
35
35
  /** The attachments applicable to this input. */
36
36
  accessor attachments: AttachmentInfo[];
37
37
  /**
@@ -104,10 +104,10 @@ export default class AttachmentElementInput extends EditableInput<any> {
104
104
  */
105
105
  ensureStagedUpdateData(attachment: AttachmentInfo): Promise<boolean>;
106
106
  /**
107
- * @param attachmentGlobalId - Global identifier of the attachment to retrieve.
107
+ * @param attachmentKey - Stable key of the attachment to retrieve.
108
108
  * @internal
109
109
  */
110
- findAttachment(attachmentGlobalId: string): AttachmentInfo | undefined;
110
+ findAttachment(attachmentKey: string): AttachmentInfo | undefined;
111
111
  /**
112
112
  * @param attachment - Attachment whose staged edit state should be resolved.
113
113
  * @returns The current staged edit state for the provided attachment.
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as t}from"tslib";import e from"../../../request.js";import a from"../../../core/Collection.js";import n from"../../../core/Logger.js";import{isAbortError as i}from"../../../core/promiseUtils.js";import s from"../../../core/ReactiveMap.js";import r from"../../../core/ReactiveSet.js";import{generateBracedUUID as o}from"../../../core/uuid.js";import{property as l,subclass as d}from"../../../core/accessorSupport/decorators.js";import{getEffectiveLayerCapabilities as h}from"../../../layers/support/layerUtils.js";import p from"../../../rest/query/support/AttachmentInfo.js";import{getAttachmentCategoryForFile as c,getAttachmentCategoryForAttachment as m}from"../../Attachments/support/attachmentUtils.js";import{getAttachmentUrl as u,preserveAttachmentFilenameExtension as g,attachmentValidationUtils as y}from"../attachmentUtils.js";import{isAttributeFormSupportedLayer as f}from"../batchAttributeFormUtils.js";import _ from"./EditableInput.js";import A from"./SingleFeatureInputAdapter.js";let U=-1;const v=["maximum-audio-length","maximum-file-size","minimum-number-of-files","maximum-number-of-files","maximum-video-length"];let b=class extends _{constructor(t){super(t),this.attachments=[],this.displayCount=3,this.group=null,this.single=new A({input:this}),this.type="attachment",this._initialAttachments=[],this._stagedAdds=new a,this._stagedDeletes=new r,this._stagedUpdates=new s,this._failedStagedUpdateHydrations=new r,this._pendingStagedUpdateHydrations=new s,this._temporaryAttachmentUrls=new s,this._validationCriterionStates=new s,this._hasUnsupportedFileTypeValidationError=!1}get allowUserRename(){return this.template.allowUserRename}get addDisabled(){const t=this.maxAttachmentCount,e=this.effectiveAttachmentCount;return null!=t&&e>=t}get effectiveAttachmentCount(){return this._initialAttachments.length-this._stagedDeletes.size+this._stagedAdds.length}get accept(){const{categories:t}=this;if(!t.size)return;const e=[];return t.has("image")&&e.push("image/*"),t.has("audio")&&e.push("audio/*"),t.has("video")&&e.push("video/*"),t.has("document")&&e.push("text/*","application/*","model/*"),e.length>0?e.join(","):void 0}get categories(){const t=new Set;for(const e of this._nestableInputs)C(t,e.type);return t}get _nestableInputs(){const{input:t}=this;return null==t?[]:"attachment"===t.type?t.inputTypes??[]:[t]}get attachmentKeyword(){return this.template.attachmentKeyword?.trim()}get displayFilename(){return this.template.displayFilename}get allAttachmentsVisibleOnDefaultPage(){return this.defaultPageAttachments.length===this.attachments.length}get canUploadFiles(){const t=this._nestableInputs;return!t.length||t.some(T)}get hasCaptureInputs(){return this._nestableInputs.some(F)}get captureMediaType(){const t=new Set;for(const e of this._nestableInputs)if(F(e))switch(e.type){case"audio":t.add("audio");break;case"video":t.add("video");break;case"image":case"signature":t.add("image")}return 1===t.size?Array.from(t)[0]:null}get isCaptureOnly(){const t=this._nestableInputs;return!!t.length&&t.every(I)}get defaultPageAttachments(){return this.attachments.slice(0,this.displayCount)}get feature(){return this.single.feature}get hasAttachmentChanges(){return this._stagedAdds.length>0||this._stagedUpdates.size>0||this._stagedDeletes.size>0}get attachmentCount(){return this.attachments.length}get hasMinimumAttachmentCountNotMet(){const t=this.minAttachmentCount,e=this.effectiveAttachmentCount;return null!=t&&e<t}get hasReachedAttachmentLimit(){const t=this.maxAttachmentCount,e=this.effectiveAttachmentCount;return null!=t&&e===t}get hasExceededAttachmentLimit(){const t=this.maxAttachmentCount,e=this.effectiveAttachmentCount;return null!=t&&e>t}get hasPendingAttachmentUpdateData(){return this._pendingStagedUpdateHydrations.size>0}get input(){return this.template.input}get layer(){return this.single.layer}get maxAttachmentCount(){return this.template.maxAttachmentCount}get minAttachmentCount(){return this.template.minAttachmentCount}get supportsResize(){const{layer:t}=this;if(!t)return!1;const e=h(t);return!!e&&("attachment"in e&&!!e.attachment?.supportsResize)}get useOriginalFilename(){return this.template.useOriginalFilename}get valid(){const t=this.effectiveAttachmentCount,e=this.minAttachmentCount??-1/0,a=this.maxAttachmentCount??1/0,n=this.hasAttachmentChanges;return!(this._failedStagedUpdateHydrations.size>0)&&(!(t<e||t>a)||!n)}get _expressionLayer(){const t=this.layer;if(t)return"scene"===t.type&&"associatedLayer"in t&&null!=t.associatedLayer?t.associatedLayer:"feature"===t.type?t:void 0}destroy(){this._clearTemporaryAttachmentUrls()}applyFetchedAttachments(t){for(const e of t)this._normalizeAttachmentName(e);this._initialAttachments=t,this._failedStagedUpdateHydrations.clear(),this._recomputeAttachments()}clearAttachmentChanges(){this.clearValidationCriteriaState(),this._clearTemporaryAttachmentUrls(),this._stagedAdds.removeAll(),this._stagedUpdates.clear(),this._stagedDeletes.clear(),this._failedStagedUpdateHydrations.clear(),this._pendingStagedUpdateHydrations.clear(),this._recomputeAttachments()}clearValidationCriteriaState(){this._validationCriterionStates.clear(),this._hasUnsupportedFileTypeValidationError=!1}get hasInvalidValidationCriteria(){for(const t of this._validationCriterionStates.values())if("danger"===t)return!0;return!1}get hasUnsupportedFileTypeValidationError(){return this._hasUnsupportedFileTypeValidationError}get validationCriterionStates(){return this._validationCriterionStates}getValidationCriterionState(t){return this._validationCriterionStates.get(t)??null}stageAddAttachment(t){const{contentType:e,data:a,name:n}=t,i=t.globalId??o(),s=a instanceof Blob?a.size:void 0,r=n.trim(),l=new p({contentType:e??void 0,globalId:i,id:U--,keywords:this.attachmentKeyword??void 0,name:r,size:s});return this._setTemporaryAttachmentUrl(i,a),this._stagedAdds.add({globalId:i,info:l,data:a}),this._recomputeAttachments(),l}async stageAddAttachments(t,e){this.clearValidationCriteriaState();const a=t.filter(t=>this.isFileAllowed(t));if(this._setUnsupportedFileTypeValidationError(a.length!==t.length),0===a.length)return[];const n=[],i=new Map,s=Date.now(),r={},o=this.attachmentCount,l=o+a.length;null!=this.minAttachmentCount&&this.minAttachmentCount>0&&this._setValidationCriterionState(r,"minimum-number-of-files",l>=this.minAttachmentCount?"success":"danger");for(let d=0;d<a.length;d++){const t=a[d];if(!await this._validateAttachmentFile(t,o+n.length+1,r))continue;const l=t instanceof File?t.name:`attachment-${s}_${d+1}`,h=await this._computeAttachmentFilename(l,e),p=this._makeUniqueFilenameForOperation(i,h);n.push(this.stageAddAttachment({contentType:t.type,data:t,name:p}))}return this._setValidationCriteriaState(r),n}findAttachment(t){if(t)return this.attachments.find(e=>e.globalId===t)}getAttachmentEditState(t){const e=t.globalId,a=e?this._getInitialAttachment(e):void 0,n=a?.name??null,i=e?this._stagedUpdates.get(e):void 0,s=i?.name??t.name??null;return{initialName:n,isDeleted:!!e&&this._stagedDeletes.has(e),isRenamed:null!=s&&null!=n&&s!==n,isReplaced:!!i?.data}}getAttachmentPreviewUrl(t,e){return(t.globalId?this._temporaryAttachmentUrls.get(t.globalId):void 0)??u(t,this.supportsResize,e)}async ensureStagedUpdateData(t){const e=t.globalId;if(!e)return!1;const a=this._stagedUpdates.get(e);if(!a||a.data||this._stagedDeletes.has(e))return this._failedStagedUpdateHydrations.delete(e),!1;const n=this._pendingStagedUpdateHydrations.get(e);if(n)return await n;const i=this._hydrateStagedUpdateData(t);this._pendingStagedUpdateHydrations.set(e,i);try{return await i}finally{this._pendingStagedUpdateHydrations.get(e)===i&&this._pendingStagedUpdateHydrations.delete(e)}}async waitForPendingAttachmentUpdateData(){await Promise.allSettled(Array.from(this._pendingStagedUpdateHydrations.values()))}discardStagedEdits(t){const e=t.globalId;if(!e)return;const a=this._stagedAdds.findIndex(t=>t.globalId===e);if(a>-1)return this._clearTemporaryAttachmentUrl(e),this._stagedAdds.removeAt(a),this._failedStagedUpdateHydrations.delete(e),this._pendingStagedUpdateHydrations.delete(e),void this._recomputeAttachments();this._clearTemporaryAttachmentUrl(e),this._stagedDeletes.delete(e),this._stagedUpdates.delete(e),this._failedStagedUpdateHydrations.delete(e),this._pendingStagedUpdateHydrations.delete(e),this._recomputeAttachments()}isFileAllowed(t){const{categories:e}=this;if(!e.size)return!0;const a=c(t);return null!=a&&e.has(a)}isStagedAttachmentAddition(t){return"number"==typeof t.id&&t.id<0}stageDeleteAttachment(t){const e=t.globalId;if(!e)return;const a=this._stagedAdds.findIndex(t=>t.globalId===e);if(a>-1)return this._clearTemporaryAttachmentUrl(e),this._stagedAdds.removeAt(a),this._failedStagedUpdateHydrations.delete(e),this._pendingStagedUpdateHydrations.delete(e),void this._recomputeAttachments();this._clearTemporaryAttachmentUrl(e),this._stagedUpdates.delete(e),this._stagedDeletes.add(e),this._failedStagedUpdateHydrations.delete(e),this._pendingStagedUpdateHydrations.delete(e),this._recomputeAttachments()}stageRenameAttachment(t,e){const a=t.globalId;if(!a)return;const n=g(t.name,e),i=this._stagedAdds.find(t=>t.globalId===a);if(i)return i.info.name=n,void this._recomputeAttachments();const s=this._stagedUpdates.get(a),r=this._getInitialAttachment(a)?.name??null,o=null!=r&&n===r;if(o&&null==s?.data&&null==s?.contentType&&null==s?.size)return this._stagedUpdates.delete(a),this._failedStagedUpdateHydrations.delete(a),this._pendingStagedUpdateHydrations.delete(a),void this._recomputeAttachments();const l={...s,info:t};o?delete l.name:l.name=n,this._stagedUpdates.set(a,l),this._recomputeAttachments(),this.ensureStagedUpdateData(t)}async stageReplaceAttachment(t,e,a){if(this.clearValidationCriteriaState(),!this._isReplacementFileAllowed(t,e))return this._setUnsupportedFileTypeValidationError(!0),!1;const n={},i=await this._validateAttachmentFile(e,void 0,n);if(this._setValidationCriteriaState(n),!i)return!1;const s=e instanceof File?e.name:t.name,r=await this._computeAttachmentFilename(s,a);return this._stageReplaceAttachment(t,e,r),!0}toSubmitEdits(){const t=[],e=[],a=Array.from(this._stagedDeletes);if(0===this._stagedAdds.length&&0===this._stagedUpdates.size&&0===a.length)return null;const i=this._featureIdentifier;if(!i)return n.getLogger(this).error("Unable to build attachment edits without a valid feature and layer."),null;for(const n of this._stagedAdds)t.push({feature:i,attachment:{globalId:n.globalId,contentType:n.info.contentType,data:n.data,name:n.info.name}});for(const[n,s]of this._stagedUpdates)this._canSubmitStagedUpdate(s)&&e.push({feature:i,attachment:{globalId:n,contentType:s.contentType,data:s.data,name:s.name}});return 0===t.length&&0===e.length&&0===a.length?null:{label:this.template.label,attachmentKeyword:this.attachmentKeyword,add:t,delete:a,update:e}}_recomputeAttachments(){const t=[];for(const e of this._stagedAdds)t.push(e.info);for(const e of this._initialAttachments){const a=e.globalId;if(a&&this._stagedUpdates.has(a)){const n=this._stagedUpdates.get(a),i=e.clone();null!=n.name&&(i.name=n.name),null!=n.contentType&&(i.contentType=n.contentType),null!=n.size&&(i.size=n.size),t.push(i);continue}t.push(e)}this.attachments=t}get _featureIdentifier(){const t=this.single.feature,e=this.layer;if(!t||!f(e))return null;const a=e.objectIdField,n="globalIdField"in e?e.globalIdField:null,i=t.getGlobalId()??(n?t.getAttribute(n):void 0);if(i)return{globalId:i};const s=t.getObjectId()??t.getAttribute(a),r=Number(s);return null==s||isNaN(r)?null:{objectId:r}}async _computeAttachmentFilename(t,e){const a=this.template.filenameExpressionExecutor;if(!a)return t;const s=this.single.feature,r=s?.plainGraphic,o=this._expressionLayer,l={$originalfeature:s?.original,$editcontext:{editType:e.editType},$layer:o,$featureset:o,$datastore:o?.url,$feature:r,$map:e.map},d={rawOutput:!0,spatialReference:e.spatialReference,timeZone:e.timeZone};try{const t=a.isAsync?await a.executeAsync(l,d):a.execute(l,d);if("string"==typeof t&&t.trim().length>0)return t.trim()}catch(h){i(h)||n.getLogger(this).error("Failed evaluating attachment filename expression",h)}return t}_setValidationCriteriaState(t){this._validationCriterionStates.clear();for(const e of v){const a=t[e];a&&this._validationCriterionStates.set(e,a)}}_setUnsupportedFileTypeValidationError(t){this._hasUnsupportedFileTypeValidationError!==t&&(this._hasUnsupportedFileTypeValidationError=t)}_setValidationCriterionState(t,e,a){"danger"!==t[e]&&(t[e]=a)}_isReplacementFileAllowed(t,e){const a=c(e);if(!this.isFileAllowed(e))return!1;const n=m(t);return null==n||n===a}async _validateAttachmentFile(t,e,a){let n=!0;const i=c(t);for(const s of this._nestableInputs){const e=y.getAttachmentCategoryForInputType(s.type);if(null==i||e===i){if("document"===s.type&&null!=s.maxFileSize){const e=t.size<=1048576*s.maxFileSize;this._setValidationCriterionState(a,"maximum-file-size",e?"success":"danger"),n=n&&e}if(("audio"===s.type||"video"===s.type)&&null!=s.maxDuration){const e=await y.getMediaDurationInSeconds(t,s.type),i=null!=e&&e<=s.maxDuration;this._setValidationCriterionState(a,"audio"===s.type?"maximum-audio-length":"maximum-video-length",i?"success":"danger"),n=n&&i}}}if(null!=e&&null!=this.maxAttachmentCount){const t=e<=this.maxAttachmentCount;this._setValidationCriterionState(a,"maximum-number-of-files",t?"success":"danger"),n=n&&t}return n}_makeUniqueFilenameForOperation(t,e){const a=e.toLowerCase(),n=t.get(a)??0;if(t.set(a,n+1),0===n)return e;const i=e.lastIndexOf(".");return`${i>0?e.slice(0,i):e}_${n}${i>0?e.slice(i):""}`}_stageReplaceAttachment(t,e,a){const n=t.globalId;if(!n)return;const i=this._stagedAdds.find(t=>t.globalId===n);if(i)return i.data=e,i.info.name=a,i.info.contentType=e.type,i.info.size=e.size,this._setTemporaryAttachmentUrl(n,e),void this._recomputeAttachments();const s=this._stagedUpdates.get(n);this._setTemporaryAttachmentUrl(n,e),this._failedStagedUpdateHydrations.delete(n),this._pendingStagedUpdateHydrations.delete(n),this._stagedUpdates.set(n,{...s,info:t,contentType:e.type||s?.contentType||t.contentType,data:e,name:a,size:e.size}),this._recomputeAttachments()}_getInitialAttachment(t){return this._initialAttachments.find(e=>e.globalId===t)}_canSubmitStagedUpdate(t){return null!=t.data}_normalizeAttachmentName(t){const{name:e}=t;"string"==typeof e&&(t.name=e.trim())}async _hydrateStagedUpdateData(t){const a=t.globalId,s=t.url;if(!a||!s)return!1;try{const{data:n}=await e(s,{responseType:"blob"});this._failedStagedUpdateHydrations.delete(a);const i=this._stagedUpdates.get(a);return!(!i||i.data||this._stagedDeletes.has(a))&&(this._stagedUpdates.set(a,{...i,info:t,contentType:i.contentType??t.contentType??n.type,data:n}),!0)}catch(r){const t=this._stagedUpdates.get(a);return!t||t.data||this._stagedDeletes.has(a)||this._failedStagedUpdateHydrations.add(a),i(r)||n.getLogger(this).error("Failed to fetch attachment data for staged update",r),!1}}_setTemporaryAttachmentUrl(t,e){if(this._clearTemporaryAttachmentUrl(t),!(e instanceof Blob))return;const a=URL.createObjectURL(e);return this._temporaryAttachmentUrls.set(t,a),a}_clearTemporaryAttachmentUrl(t){const e=this._temporaryAttachmentUrls.get(t);e&&(URL.revokeObjectURL(e),this._temporaryAttachmentUrls.delete(t))}_clearTemporaryAttachmentUrls(){for(const t of this._temporaryAttachmentUrls.values())URL.revokeObjectURL(t);this._temporaryAttachmentUrls.clear()}};t([l()],b.prototype,"allowUserRename",null),t([l()],b.prototype,"addDisabled",null),t([l()],b.prototype,"effectiveAttachmentCount",null),t([l()],b.prototype,"accept",null),t([l()],b.prototype,"categories",null),t([l()],b.prototype,"attachmentKeyword",null),t([l()],b.prototype,"attachments",void 0),t([l()],b.prototype,"displayFilename",null),t([l({readOnly:!0})],b.prototype,"allAttachmentsVisibleOnDefaultPage",null),t([l()],b.prototype,"canUploadFiles",null),t([l()],b.prototype,"hasCaptureInputs",null),t([l()],b.prototype,"captureMediaType",null),t([l()],b.prototype,"isCaptureOnly",null),t([l({readOnly:!0})],b.prototype,"defaultPageAttachments",null),t([l()],b.prototype,"displayCount",void 0),t([l()],b.prototype,"feature",null),t([l()],b.prototype,"group",void 0),t([l({readOnly:!0})],b.prototype,"hasAttachmentChanges",null),t([l()],b.prototype,"attachmentCount",null),t([l()],b.prototype,"hasMinimumAttachmentCountNotMet",null),t([l()],b.prototype,"hasReachedAttachmentLimit",null),t([l()],b.prototype,"hasExceededAttachmentLimit",null),t([l({readOnly:!0})],b.prototype,"hasPendingAttachmentUpdateData",null),t([l()],b.prototype,"input",null),t([l()],b.prototype,"layer",null),t([l()],b.prototype,"maxAttachmentCount",null),t([l()],b.prototype,"minAttachmentCount",null),t([l({readOnly:!0})],b.prototype,"single",void 0),t([l({readOnly:!0})],b.prototype,"type",void 0),t([l({readOnly:!0})],b.prototype,"supportsResize",null),t([l()],b.prototype,"useOriginalFilename",null),t([l({readOnly:!0})],b.prototype,"valid",null),t([l()],b.prototype,"_initialAttachments",void 0),t([l()],b.prototype,"_expressionLayer",null),t([l()],b.prototype,"_stagedAdds",void 0),t([l()],b.prototype,"_stagedDeletes",void 0),t([l()],b.prototype,"_stagedUpdates",void 0),t([l()],b.prototype,"_failedStagedUpdateHydrations",void 0),t([l()],b.prototype,"_pendingStagedUpdateHydrations",void 0),t([l()],b.prototype,"_temporaryAttachmentUrls",void 0),t([l()],b.prototype,"_hasUnsupportedFileTypeValidationError",void 0),t([l()],b.prototype,"hasInvalidValidationCriteria",null),t([l()],b.prototype,"hasUnsupportedFileTypeValidationError",null),t([l()],b.prototype,"validationCriterionStates",null),t([l()],b.prototype,"_featureIdentifier",null),b=t([d("esri.widgets.BatchAttributeForm.inputs.AttachmentElementInput")],b);const S=b;function C(t,e){switch(e){case"audio":t.add("audio");break;case"document":t.add("document");break;case"image":case"signature":t.add("image");break;case"video":t.add("video")}}function I(t){return"document"!==t.type&&"capture"===t.inputMethod}function F(t){return I(t)}function T(t){return"document"===t.type||"capture"!==t.inputMethod}export{S as default};
2
+ import{__decorate as t}from"tslib";import e from"../../../request.js";import a from"../../../core/Collection.js";import n from"../../../core/Logger.js";import{isAbortError as i}from"../../../core/promiseUtils.js";import s from"../../../core/ReactiveMap.js";import r from"../../../core/ReactiveSet.js";import{generateBracedUUID as o}from"../../../core/uuid.js";import{property as d,subclass as l}from"../../../core/accessorSupport/decorators.js";import{getEffectiveLayerCapabilities as h}from"../../../layers/support/layerUtils.js";import c from"../../../rest/query/support/AttachmentInfo.js";import{getAttachmentCategoryForFile as m,getAttachmentCategoryForAttachment as p}from"../../Attachments/support/attachmentUtils.js";import{getAttachmentKey as u,getAttachmentUrl as g,preserveAttachmentFilenameExtension as y,attachmentValidationUtils as f}from"../attachmentUtils.js";import _ from"./EditableInput.js";import A from"./SingleFeatureInputAdapter.js";let U=-1;const v=["maximum-audio-length","maximum-file-size","maximum-image-size","minimum-number-of-files","maximum-number-of-files","maximum-video-length"];let S=class extends _{constructor(t){super(t),this.attachments=[],this.displayCount=3,this.group=null,this.single=new A({input:this}),this.type="attachment",this._initialAttachments=[],this._stagedAdds=new a,this._stagedDeletes=new r,this._stagedUpdates=new s,this._failedStagedUpdateHydrations=new r,this._pendingStagedUpdateHydrations=new s,this._temporaryAttachmentUrls=new s,this._validationCriterionStates=new s,this._hasUnsupportedFileTypeValidationError=!1}get allowUserRename(){return this.template.allowUserRename}get addDisabled(){const t=this.maxAttachmentCount,e=this.effectiveAttachmentCount;return null!=t&&e>=t}get effectiveAttachmentCount(){return this._initialAttachments.length-this._stagedDeletes.size+this._stagedAdds.length}get accept(){const{categories:t}=this;if(!t.size)return;const e=[];return t.has("image")&&e.push("image/*"),t.has("audio")&&e.push("audio/*"),t.has("video")&&e.push("video/*"),t.has("document")&&e.push("text/*","application/*","model/*"),e.length>0?e.join(","):void 0}get categories(){const t=new Set;for(const e of this._nestableInputs)T(t,e.type);return t}get _nestableInputs(){const{input:t}=this;return null==t?[]:"attachment"===t.type?t.inputTypes??[]:[t]}get attachmentKeyword(){return this.template.attachmentKeyword?.trim()}get displayFilename(){return this.template.displayFilename}get allAttachmentsVisibleOnDefaultPage(){return this.defaultPageAttachments.length===this.attachments.length}get canUploadFiles(){const t=this._nestableInputs;return!t.length||t.some(x)}get hasCaptureInputs(){return this._nestableInputs.some(b)}get captureMediaType(){const t=new Set;for(const e of this._nestableInputs)if(b(e))switch(e.type){case"audio":t.add("audio");break;case"video":t.add("video");break;case"image":case"signature":t.add("image")}return 1===t.size?Array.from(t)[0]:null}get isCaptureOnly(){const t=this._nestableInputs;return!!t.length&&t.every(w)}get defaultPageAttachments(){return this.attachments.slice(0,this.displayCount)}get feature(){return this.single.feature}get hasAttachmentChanges(){return this._stagedAdds.length>0||this._stagedUpdates.size>0||this._stagedDeletes.size>0}get hasInvalidAttachmentName(){return!!this.allowUserRename&&this.attachments.some(t=>0===t.name.trim().length)}get attachmentCount(){return this.attachments.length}get hasMinimumAttachmentCountNotMet(){const t=this.minAttachmentCount,e=this.effectiveAttachmentCount;return null!=t&&e<t}get hasReachedAttachmentLimit(){const t=this.maxAttachmentCount,e=this.effectiveAttachmentCount;return null!=t&&e===t}get hasExceededAttachmentLimit(){const t=this.maxAttachmentCount,e=this.effectiveAttachmentCount;return null!=t&&e>t}get hasPendingAttachmentUpdateData(){return this._pendingStagedUpdateHydrations.size>0}get input(){return this.template.input}get layer(){return this.single.layer}get maxAttachmentCount(){return this.template.maxAttachmentCount}get minAttachmentCount(){return this.template.minAttachmentCount}get supportsResize(){const{layer:t}=this;if(!t)return!1;const e=h(t);return!!e&&("attachment"in e&&!!e.attachment?.supportsResize)}get useOriginalFilename(){return this.template.useOriginalFilename}get valid(){const t=this.effectiveAttachmentCount,e=this.minAttachmentCount??-1/0,a=this.maxAttachmentCount??1/0,n=this.hasAttachmentChanges;return!(this._failedStagedUpdateHydrations.size>0||this.hasInvalidAttachmentName)&&(!(t<e||t>a)||!n)}get _expressionLayer(){const t=this.layer;if(t)return"scene"===t.type&&"associatedLayer"in t&&null!=t.associatedLayer?t.associatedLayer:"feature"===t.type?t:void 0}destroy(){this._clearTemporaryAttachmentUrls()}applyFetchedAttachments(t){for(const e of t)this._normalizeAttachmentName(e);this._initialAttachments=t,this._failedStagedUpdateHydrations.clear(),this._recomputeAttachments()}applyStashedEdits(t){const{adds:e,deletes:a,updates:n}=t;for(const i of e){const t=this._getAttachmentKey(i.info);this._stagedAdds.add({data:i.data,globalId:i.globalId??o(),info:i.info,key:t}),this._setTemporaryAttachmentUrl(t,i.data)}for(const i of n){const t=this._getAttachmentKey(i.info);this._stagedUpdates.set(t,{contentType:i.contentType,data:i.data,info:i.info,key:t,name:i.name,size:F(i)}),this._setTemporaryAttachmentUrl(t,i.data)}for(const i of a){const t=this._getAttachmentKey(i.info);this._stagedDeletes.add(t)}this._recomputeAttachments()}clearAttachmentChanges(){this.clearValidationCriteriaState(),this._clearTemporaryAttachmentUrls(),this._stagedAdds.removeAll(),this._stagedUpdates.clear(),this._stagedDeletes.clear(),this._failedStagedUpdateHydrations.clear(),this._pendingStagedUpdateHydrations.clear(),this._recomputeAttachments()}clearValidationCriteriaState(){this._validationCriterionStates.clear(),this._hasUnsupportedFileTypeValidationError=!1}get hasInvalidValidationCriteria(){for(const t of this._validationCriterionStates.values())if("danger"===t)return!0;return!1}get hasUnsupportedFileTypeValidationError(){return this._hasUnsupportedFileTypeValidationError}get validationCriterionStates(){return this._validationCriterionStates}getValidationCriterionState(t){return this._validationCriterionStates.get(t)??null}stageAddAttachment(t){const{contentType:e,data:a,name:n}=t,i=t.globalId??o(),s=a instanceof Blob?a.size:void 0,r=n.trim(),d=new c({contentType:e??void 0,globalId:i,id:U--,keywords:this.attachmentKeyword??void 0,name:r,size:s});return this._setTemporaryAttachmentUrl(i,a),this._stagedAdds.add({key:i,globalId:i,info:d,data:a}),this._recomputeAttachments(),d}async stageAddAttachments(t,e){this.clearValidationCriteriaState();const a=t.filter(t=>this.isFileAllowed(t));if(this._setUnsupportedFileTypeValidationError(a.length!==t.length),0===a.length)return[];const n=[],i=new Map,s=Date.now(),r={},o=this.attachmentCount,d=o+a.length;if(null!=this.minAttachmentCount&&this.minAttachmentCount>0&&this._setValidationCriterionState(r,"minimum-number-of-files",d>=this.minAttachmentCount?"success":"danger"),null!=this.maxAttachmentCount){const t=d<=this.maxAttachmentCount;if(this._setValidationCriterionState(r,"maximum-number-of-files",t?"success":"danger"),!t)return this._setValidationCriteriaState(r),[]}for(let l=0;l<a.length;l++){const t=a[l];if(!await this._validateAttachmentFile(t,o+n.length+1,r))continue;const d=t instanceof File?t.name:`attachment-${s}_${l+1}`,h=await this._resolveAttachmentFilename(d,e),c=this._makeUniqueFilenameForOperation(i,h);n.push(this.stageAddAttachment({contentType:t.type,data:t,name:c}))}return this._setValidationCriteriaState(r),n}findAttachment(t){if(t)return this.attachments.find(e=>u(e)===t)}getAttachmentEditState(t){const e=this._getAttachmentKey(t),a=e?this._initialAttachments.find(t=>this._getAttachmentKey(t)===e):void 0,n=a?.name??null,i=e?this._stagedUpdates.get(e):void 0,s=i?.name??t.name??null;return{initialName:n,isDeleted:!!e&&this._stagedDeletes.has(e),isRenamed:null!=s&&null!=n&&s!==n,isReplaced:!0===i?.isReplacement}}getAttachmentPreviewUrl(t,e){const a=this._getAttachmentKey(t);return(a?this._temporaryAttachmentUrls.get(a):void 0)??g(t,this.supportsResize,e)}async ensureStagedUpdateData(t){const e=this._getAttachmentKey(t);if(!e)return!1;const a=this._stagedUpdates.get(e);if(!a||a.data||this._stagedDeletes.has(e))return this._failedStagedUpdateHydrations.delete(e),!1;const n=this._pendingStagedUpdateHydrations.get(e);if(n)return await n;const i=this._hydrateStagedUpdateData(t);this._pendingStagedUpdateHydrations.set(e,i);try{return await i}finally{this._pendingStagedUpdateHydrations.get(e)===i&&this._pendingStagedUpdateHydrations.delete(e)}}async waitForPendingAttachmentUpdateData(){await Promise.allSettled(Array.from(this._pendingStagedUpdateHydrations.values()))}discardStagedEdits(t){const e=this._getAttachmentKey(t);if(!e)return;const a=this._stagedAdds.findIndex(t=>t.key===e);if(a>-1)return this._clearTemporaryAttachmentUrl(e),this._stagedAdds.removeAt(a),this._failedStagedUpdateHydrations.delete(e),this._pendingStagedUpdateHydrations.delete(e),void this._recomputeAttachments();this._clearTemporaryAttachmentUrl(e),this._stagedDeletes.delete(e),this._clearStagedUpdateTracking(e),this._recomputeAttachments()}isFileAllowed(t){const{categories:e}=this;if(!e.size)return!0;const a=m(t);return null!=a&&e.has(a)}isStagedAttachmentAddition(t){return"number"==typeof t.id&&t.id<0}stageDeleteAttachment(t){const e=this._getAttachmentKey(t);if(!e)return;const a=this._stagedAdds.findIndex(t=>t.key===e);if(a>-1)return this._clearTemporaryAttachmentUrl(e),this._stagedAdds.removeAt(a),this._failedStagedUpdateHydrations.delete(e),this._pendingStagedUpdateHydrations.delete(e),void this._recomputeAttachments();this._clearTemporaryAttachmentUrl(e),this._stagedDeletes.add(e),this._clearStagedUpdateTracking(e),this._recomputeAttachments()}stageRenameAttachment(t,e){const a=this._getAttachmentKey(t);if(!a)return;const n=this._stagedAdds.find(t=>t.key===a);if(n){const a=y(t.name,e);return n.info.name=a,void this._recomputeAttachments()}const i=this._stagedUpdates.get(a),s=this._getInitialAttachment(a)?.name??null,r=0===t.name.trim().length?s??t.name:t.name,o=y(r,e),d=null!=s&&o===s;if(d&&!0!==i?.isReplacement)return this._stagedUpdates.delete(a),this._failedStagedUpdateHydrations.delete(a),this._pendingStagedUpdateHydrations.delete(a),void this._recomputeAttachments();const l={key:a,...i,info:t};d?delete l.name:l.name=o,this._stagedUpdates.set(a,l),this._recomputeAttachments(),this.ensureStagedUpdateData(t)}async stageReplaceAttachment(t,e,a){if(this.clearValidationCriteriaState(),!this._isReplacementFileAllowed(t,e))return this._setUnsupportedFileTypeValidationError(!0),!1;const n={},i=await this._validateAttachmentFile(e,void 0,n);if(this._setValidationCriteriaState(n),!i)return!1;const s=e instanceof File?e.name:t.name,r=await this._resolveAttachmentFilename(s,a);return this._stageReplaceAttachment(t,e,r),!0}toSubmitEdits(){const t=[],e=[],a=[],n=this.feature?.plainGraphic;if(!n||0===this._stagedAdds.length&&0===this._stagedUpdates.size&&0===this._stagedDeletes.size)return null;const i=this.attachmentKeyword;for(const s of this._stagedAdds)null!=s.data&&t.push({feature:n,contentType:s.info.contentType,data:s.data,info:s.info,globalId:s.info.globalId,keywords:i,name:s.info.name});for(const s of this._stagedUpdates.values()){const t=null==s.name||s.name.trim().length>0;null!=s.data&&t&&e.push({feature:n,contentType:s.contentType,data:s.data,globalId:s.info.globalId,id:s.info.id,info:s.info,keywords:i,name:s.name})}for(const s of this._stagedDeletes.values()){const t=this._getInitialAttachment(s);t&&a.push({feature:n,contentType:t.contentType,globalId:t.globalId,id:t.id,info:t,keywords:i,name:t.name})}return 0===t.length&&0===e.length&&0===a.length?null:{label:this.template.label,keywords:i,adds:t,deletes:a,updates:e}}_recomputeAttachments(){const t=[];for(const e of this._stagedAdds)t.push(e.info);for(const e of this._initialAttachments){const a=this._getAttachmentKey(e);if(a&&this._stagedUpdates.has(a)){const n=this._stagedUpdates.get(a),i=e.clone();null!=n.name&&(i.name=n.name),null!=n.contentType&&(i.contentType=n.contentType),null!=n.size&&(i.size=n.size),t.push(i);continue}t.push(e)}this.attachments=t}async _computeAttachmentFilename(t,e){const a=this.template.filenameExpressionExecutor;if(!a)return t;const s=this.single.feature,r=s?.plainGraphic,o=this._expressionLayer,{attachmentKeyword:d,description:l,label:h}=this.template,c={$originalfeature:s?.original,$editcontext:{editType:e.editType},$layer:o,$featureset:o,$datastore:o?.url,$feature:r,$map:e.map,$formElement:{attachmentKeyword:d,description:l,label:h}},m={rawOutput:!0,spatialReference:e.spatialReference,timeZone:e.timeZone};try{const e=a.isAsync?await a.executeAsync(c,m):a.execute(c,m);if("string"==typeof e&&e.trim().length>0){const{extension:a}=I(t);return z(e.trim(),a)}}catch(p){i(p)||n.getLogger(this).error("Failed evaluating attachment filename expression",p)}return t}async _resolveAttachmentFilename(t,e){return!1===this.useOriginalFilename?await this._computeAttachmentFilename(t,e):t}_makeUniqueFilenameForOperation(t,e){const a=e.toLowerCase(),n=t.get(a)??0;if(t.set(a,n+1),0===n)return e;const{base:i,extension:s}=I(e);return z(`${i}_${n}`,s)}_setValidationCriteriaState(t){this._validationCriterionStates.clear();for(const e of v){const a=t[e];a&&this._validationCriterionStates.set(e,a)}}_setUnsupportedFileTypeValidationError(t){this._hasUnsupportedFileTypeValidationError!==t&&(this._hasUnsupportedFileTypeValidationError=t)}_setValidationCriterionState(t,e,a){"danger"!==t[e]&&(t[e]=a)}_isReplacementFileAllowed(t,e){const a=m(e);if(!this.isFileAllowed(e))return!1;const n=p(t);return null==n||n===a}async _validateAttachmentFile(t,e,a){let n=!0;const i=m(t);for(const s of this._nestableInputs){const e=f.getAttachmentCategoryForInputType(s.type);if(null==i||e===i){if("document"===s.type&&null!=s.maxFileSize){const e=t.size<=1048576*s.maxFileSize;this._setValidationCriterionState(a,"maximum-file-size",e?"success":"danger"),n=n&&e}if(("audio"===s.type||"video"===s.type)&&null!=s.maxDuration){const e=await f.getMediaDurationInSeconds(t,s.type),i=null!=e&&e<=s.maxDuration;this._setValidationCriterionState(a,"audio"===s.type?"maximum-audio-length":"maximum-video-length",i?"success":"danger"),n=n&&i}if("image"===s.type&&null!=s.maxImageSize){const e=await f.getImageDimensionsInPixels(t),i=e?Math.max(e.width,e.height):null,r=null==i||i<=s.maxImageSize;this._setValidationCriterionState(a,"maximum-image-size",r?"success":"danger"),n=n&&r}}}if(null!=e&&null!=this.maxAttachmentCount){const t=e<=this.maxAttachmentCount;this._setValidationCriterionState(a,"maximum-number-of-files",t?"success":"danger"),n=n&&t}return n}_stageReplaceAttachment(t,e,a){const n=this._getAttachmentKey(t);if(!n)return;const i=this._stagedAdds.find(t=>t.key===n);if(i)return i.data=e,i.info.name=a,i.info.contentType=e.type,i.info.size=e.size,this._setTemporaryAttachmentUrl(n,e),void this._recomputeAttachments();const s=this._stagedUpdates.get(n);this._setTemporaryAttachmentUrl(n,e),this._failedStagedUpdateHydrations.delete(n),this._pendingStagedUpdateHydrations.delete(n),this._stagedUpdates.set(n,{...s,key:n,info:t,isReplacement:!0,contentType:e.type||s?.contentType||t.contentType,data:e,name:a,size:e.size}),this._recomputeAttachments()}_getInitialAttachment(t){return this._initialAttachments.find(e=>this._getAttachmentKey(e)===t)}_normalizeAttachmentName(t){const{name:e}=t;"string"==typeof e&&(t.name=e.trim())}_getAttachmentKey(t){return u(t)}_clearStagedUpdateTracking(t){this._stagedUpdates.delete(t),this._failedStagedUpdateHydrations.delete(t),this._pendingStagedUpdateHydrations.delete(t)}async _hydrateStagedUpdateData(t){const a=this._getAttachmentKey(t),s=t.url;if(!a||!s)return!1;try{const{data:n}=await e(s,{responseType:"blob"});this._failedStagedUpdateHydrations.delete(a);const i=this._stagedUpdates.get(a);return!(!i||i.data||this._stagedDeletes.has(a))&&(this._stagedUpdates.set(a,{...i,info:t,isReplacement:i.isReplacement??!1,contentType:i.contentType??t.contentType??n.type,data:n}),!0)}catch(r){const t=this._stagedUpdates.get(a);return!t||t.data||this._stagedDeletes.has(a)||this._failedStagedUpdateHydrations.add(a),i(r)||n.getLogger(this).error("Failed to fetch attachment data for staged update",r),!1}}_setTemporaryAttachmentUrl(t,e){if(this._clearTemporaryAttachmentUrl(t),!(e instanceof Blob))return;const a=URL.createObjectURL(e);return this._temporaryAttachmentUrls.set(t,a),a}_clearTemporaryAttachmentUrl(t){const e=this._temporaryAttachmentUrls.get(t);e&&(URL.revokeObjectURL(e),this._temporaryAttachmentUrls.delete(t))}_clearTemporaryAttachmentUrls(){for(const t of this._temporaryAttachmentUrls.values())URL.revokeObjectURL(t);this._temporaryAttachmentUrls.clear()}};t([d()],S.prototype,"allowUserRename",null),t([d()],S.prototype,"addDisabled",null),t([d()],S.prototype,"effectiveAttachmentCount",null),t([d()],S.prototype,"accept",null),t([d()],S.prototype,"categories",null),t([d()],S.prototype,"attachmentKeyword",null),t([d()],S.prototype,"attachments",void 0),t([d()],S.prototype,"displayFilename",null),t([d({readOnly:!0})],S.prototype,"allAttachmentsVisibleOnDefaultPage",null),t([d()],S.prototype,"canUploadFiles",null),t([d()],S.prototype,"hasCaptureInputs",null),t([d()],S.prototype,"captureMediaType",null),t([d()],S.prototype,"isCaptureOnly",null),t([d({readOnly:!0})],S.prototype,"defaultPageAttachments",null),t([d()],S.prototype,"displayCount",void 0),t([d()],S.prototype,"feature",null),t([d()],S.prototype,"group",void 0),t([d()],S.prototype,"hasAttachmentChanges",null),t([d()],S.prototype,"hasInvalidAttachmentName",null),t([d()],S.prototype,"attachmentCount",null),t([d()],S.prototype,"hasMinimumAttachmentCountNotMet",null),t([d()],S.prototype,"hasReachedAttachmentLimit",null),t([d()],S.prototype,"hasExceededAttachmentLimit",null),t([d({readOnly:!0})],S.prototype,"hasPendingAttachmentUpdateData",null),t([d()],S.prototype,"input",null),t([d()],S.prototype,"layer",null),t([d()],S.prototype,"maxAttachmentCount",null),t([d()],S.prototype,"minAttachmentCount",null),t([d({readOnly:!0})],S.prototype,"single",void 0),t([d({readOnly:!0})],S.prototype,"type",void 0),t([d({readOnly:!0})],S.prototype,"supportsResize",null),t([d()],S.prototype,"useOriginalFilename",null),t([d({readOnly:!0})],S.prototype,"valid",null),t([d()],S.prototype,"_initialAttachments",void 0),t([d()],S.prototype,"_expressionLayer",null),t([d()],S.prototype,"_stagedAdds",void 0),t([d()],S.prototype,"_stagedDeletes",void 0),t([d()],S.prototype,"_stagedUpdates",void 0),t([d()],S.prototype,"_failedStagedUpdateHydrations",void 0),t([d()],S.prototype,"_pendingStagedUpdateHydrations",void 0),t([d()],S.prototype,"_temporaryAttachmentUrls",void 0),t([d()],S.prototype,"_hasUnsupportedFileTypeValidationError",void 0),t([d()],S.prototype,"hasInvalidValidationCriteria",null),t([d()],S.prototype,"hasUnsupportedFileTypeValidationError",null),t([d()],S.prototype,"validationCriterionStates",null),S=t([l("esri.widgets.BatchAttributeForm.inputs.AttachmentElementInput")],S);const C=S;function T(t,e){switch(e){case"audio":t.add("audio");break;case"document":t.add("document");break;case"image":case"signature":t.add("image");break;case"video":t.add("video")}}function w(t){return"document"!==t.type&&"capture"===t.inputMethod}function b(t){return w(t)}function x(t){return"document"===t.type||"capture"!==t.inputMethod}function F(t){return t.data&&"string"!=typeof t.data?t.data.size:t.info.size}function I(t){const e=t.lastIndexOf(".");return-1===e?{base:t,extension:null}:{base:t.slice(0,e),extension:t.slice(e+1)}}function z(t,e){return e?`${t}.${e}`:t}export{C as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as t}from"tslib";import e from"../../../core/Accessor.js";import{destroyMaybe as l}from"../../../core/maybe.js";import{property as i,subclass as n}from"../../../core/accessorSupport/decorators.js";import{deepFilterInputs as r,isGroupInput as s,isFieldInput as p,isAttachmentElementInput as o,isEditableInput as u,isUtilityNetworkAssociationsElementInput as a}from"./support/inputUtils.js";let d=class extends e{constructor(t){super(t),this.inputs=[],this.template=null}destroy(){this.inputs.forEach(t=>l(t))}get allFieldInputs(){return r(this.inputs,p)}get allAttachmentElementInputs(){return r(this.inputs,o)}get allEditableInputs(){return r(this.inputs,u)}get allGroupInputs(){return this.inputs.filter(s)}get allUtilityNetworkAssociationsElementInputs(){return r(this.inputs,a)}get description(){return this.template?.description??null}get hasInvalidHiddenInputs(){return this.invalidHiddenInputs.length>0}get invalidFeatures(){return Array.from(new Set(this.allFieldInputs.flatMap(t=>t.invalidFeatures)))}get invalidHiddenInputs(){return this.allFieldInputs.filter(t=>!t.valid&&!t.effectiveVisible)}get title(){return this.template?.title??null}get valid(){return this.allEditableInputs.every(t=>t.valid)}};t([i()],d.prototype,"allFieldInputs",null),t([i()],d.prototype,"allAttachmentElementInputs",null),t([i()],d.prototype,"allEditableInputs",null),t([i()],d.prototype,"allGroupInputs",null),t([i()],d.prototype,"allUtilityNetworkAssociationsElementInputs",null),t([i()],d.prototype,"description",null),t([i()],d.prototype,"inputs",void 0),t([i()],d.prototype,"hasInvalidHiddenInputs",null),t([i()],d.prototype,"invalidFeatures",null),t([i()],d.prototype,"invalidHiddenInputs",null),t([i()],d.prototype,"template",void 0),t([i()],d.prototype,"title",null),t([i()],d.prototype,"valid",null),d=t([n("esri.widgets.BatchAttributeForm.inputs.BatchFormInputs")],d);const m=d;export{m as default};
2
+ import{__decorate as t}from"tslib";import e from"../../../core/Accessor.js";import{destroyMaybe as l}from"../../../core/maybe.js";import{property as i,subclass as n}from"../../../core/accessorSupport/decorators.js";import{deepFilterInputs as s,isGroupInput as r,isFieldInput as p,isAttachmentElementInput as o,isEditableInput as u,isUtilityNetworkAssociationsElementInput as a}from"./support/inputUtils.js";let d=class extends e{constructor(t){super(t),this.inputs=[],this.staleInputs=new Map,this.template=null}destroy(){this.inputs.forEach(t=>l(t))}get allFieldInputs(){return s(this.inputs,p)}get allAttachmentElementInputs(){return s(this.inputs,o)}get allEditableInputs(){return s(this.inputs,u)}get allGroupInputs(){return this.inputs.filter(r)}get allUtilityNetworkAssociationsElementInputs(){return s(this.inputs,a)}get description(){return this.template?.description??null}get hasInvalidHiddenInputs(){return this.invalidHiddenInputs.length>0}get invalidFeatures(){return Array.from(new Set(this.allFieldInputs.flatMap(t=>t.invalidFeatures)))}get invalidHiddenInputs(){return this.allFieldInputs.filter(t=>!t.valid&&!t.effectiveVisible)}get title(){return this.template?.title??null}get valid(){return this.allEditableInputs.every(t=>t.valid)}};t([i()],d.prototype,"allFieldInputs",null),t([i()],d.prototype,"allAttachmentElementInputs",null),t([i()],d.prototype,"allEditableInputs",null),t([i()],d.prototype,"allGroupInputs",null),t([i()],d.prototype,"allUtilityNetworkAssociationsElementInputs",null),t([i()],d.prototype,"description",null),t([i()],d.prototype,"inputs",void 0),t([i()],d.prototype,"hasInvalidHiddenInputs",null),t([i()],d.prototype,"invalidFeatures",null),t([i()],d.prototype,"invalidHiddenInputs",null),t([i()],d.prototype,"template",void 0),t([i()],d.prototype,"title",null),t([i()],d.prototype,"valid",null),d=t([n("esri.widgets.BatchAttributeForm.inputs.BatchFormInputs")],d);const m=d;export{m as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/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 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};
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{label:e}=this.template,t=this._computeStringLiteralText(e);if(t)return t;const{field:i,layers:l}=this;if(1===l.length){const e=l[0];if(g(e)){const t=e.getFieldAlias(i.name);if(null!=t&&""!==t)return t}}return i.alias||i.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.2/LICENSE.txt */
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};
2
+ import{__decorate as t}from"tslib";import{destroyMaybe as s}from"../../../core/maybe.js";import{property as e,subclass as i}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.staleInputs=new Map,this.type="group"}initialize(){for(const t of this.inputs)t.group=this}destroy(){this.inputs.forEach(t=>s(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 s=this._lookupEvaluatedExpression(t,"visibility");return"success"===s?.status&&!0===s.result}};t([e()],p.prototype,"inputs",void 0),t([e({readOnly:!0})],p.prototype,"type",void 0),t([e()],p.prototype,"open",null),t([e()],p.prototype,"visible",null),p=t([i("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.2/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{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};
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{parseFormTemplateString as a}from"../stringUtils.js";import{visibilityCodeToBoolean as n,makeUseId as p}from"./support/inputUtils.js";import{isEmptyValue as u}from"../../support/forms/formUtils.js";let y=class extends t{constructor(e){super(e),this.existsInAllLayers=!0,this.features=new i}get description(){return this._computeStringLiteralText(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._computeStringLiteralText(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 n(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}))}_computeStringLiteralText(e){const t=this.features.getItemAt(0);return!t||1!==this.features.length||u(e)?e:a({attributes:t.attributes,label:e,layer:t.layer,timeZone:this.effectiveTimeZone})}};e([s({constructOnly:!0})],y.prototype,"expressionsManager",void 0),e([s()],y.prototype,"description",null),e([s()],y.prototype,"effectiveTimeZone",null),e([s()],y.prototype,"existsInAllLayers",void 0),e([s()],y.prototype,"features",void 0),e([s()],y.prototype,"featuresHaveSameCalculatedVisibility",null),e([s()],y.prototype,"label",null),e([s()],y.prototype,"layers",null),e([s({constructOnly:!0})],y.prototype,"template",void 0),e([s()],y.prototype,"visibilityCode",null),e([s()],y.prototype,"visible",null),e([s()],y.prototype,"_baseVisibilityCode",null),e([s()],y.prototype,"_evaluatedVisibilityExpression",null),y=e([r("esri.widgets.BatchAttributeForm.inputs.InputBase")],y);const m=y;export{m as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/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{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};
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._computeStringLiteralText(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,5 +1,5 @@
1
1
  /** @internal */
2
- export type AttachmentValidationCriterionKey = "maximum-audio-length" | "maximum-file-size" | "minimum-number-of-files" | "maximum-number-of-files" | "maximum-video-length";
2
+ export type AttachmentValidationCriterionKey = "maximum-audio-length" | "maximum-file-size" | "maximum-image-size" | "minimum-number-of-files" | "maximum-number-of-files" | "maximum-video-length";
3
3
 
4
4
  /** @internal */
5
5
  export type AttachmentValidationCriterionState = "danger" | "success";
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import e from"../../../../core/Error.js";import t from"../AttachmentElementInput.js";import r from"../BatchFormInputs.js";import s from"../FieldInput.js";import n from"../GroupInput.js";import o from"../RelationshipElementInput.js";import a from"../TextElementInput.js";import i from"../UtilityNetworkAssociationsElementInput.js";import{isFieldElementTemplate as l,isGroupElementTemplate as p,isRelationshipElementTemplate as m,isTextElementTemplate as u,isAttachmentElementTemplate as f,isUtilityNetworkAssociationsElementTemplate as c}from"../../templates/support/templateUtils.js";function h(e,t){const s=new r({inputs:e.elements.map(e=>F(e,t)),template:e});return x(s),s}function x(e){const t=e.allFieldInputs,r=new Set(t.map(e=>e.fieldName));for(const s of t){const e=s.multipleChoiceOtherChoiceFieldName;if(!e)continue;const t=s.layers[0]?.getField(e)?.name??e;r.has(t)&&(s.shouldShowMultipleChoiceOtherChoice=!1)}}function F(r,h){const{allFeatures:x,expressionsManager:g,getFieldValueOptionsForFeature:I,getExternalErrorForFeature:w,map:d}=h,y=new Set(r.layers),j=x.filter(e=>y.has(e.layer)),E=j.length===x.length;if(l(r))return new s({existsInAllLayers:E,features:j,template:r,expressionsManager:g,getExternalErrorForFeature:w,getFieldValueOptionsForFeature:I});if(p(r)){const e=r.elements.map(e=>F(e,h));return new n({existsInAllLayers:E,features:j,inputs:e,template:r,expressionsManager:g})}if(m(r))return new o({existsInAllLayers:E,features:j,map:d,template:r,expressionsManager:g});if(u(r))return new a({existsInAllLayers:E,features:j,template:r,expressionsManager:g});if(f(r))return new t({existsInAllLayers:E,features:j,template:r,expressionsManager:g});if(c(r))return new i({existsInAllLayers:E,features:j,template:r,expressionsManager:g,map:d});throw new e("batch-attribute-form:unsupported-element-template","The type of form element template provided is not supported")}export{h as createBatchFormInputsFromBatchFormTemplate};
2
+ import e from"../../../../core/Error.js";import t from"../AttachmentElementInput.js";import s from"../BatchFormInputs.js";import r from"../FieldInput.js";import n from"../GroupInput.js";import o from"../RelationshipElementInput.js";import p from"../TextElementInput.js";import a from"../UtilityNetworkAssociationsElementInput.js";import{hashGroupElementTemplateWithoutChildren as i}from"../../templates/support/hashElementTemplate.js";import{isFieldElementTemplate as l,isGroupElementTemplate as u,isRelationshipElementTemplate as m,isTextElementTemplate as f,isAttachmentElementTemplate as c,isUtilityNetworkAssociationsElementTemplate as h}from"../../templates/support/templateUtils.js";function g(e,t){const r=new s({inputs:e.elements.map(e=>w(e,t)),template:e});return F(r),r}function I(e,t,s){const r=g(t,s),{mergedInputs:n}=d(e.inputs,r.inputs,e.staleInputs);e.template=t,e.inputs=n,F(e)}function d(e,t,s){const r=new Set,n=[],o=new Map(e.map(e=>[y(e),e]));for(const p of t){const e=y(p);r.add(e);const t=o.get(e);if(t){x(t,p),n.push(t),p.destroy();continue}const a=s.get(e);a?(x(a,p),n.push(a),s.delete(e),p.destroy()):n.push(p)}for(const p of e){const e=y(p);r.has(e)||s.set(e,p)}return{mergedInputs:n}}function x(e,t){if(e.features=t.features,e.existsInAllLayers=t.existsInAllLayers,"group"!==e.type||"group"!==t.type)return;const{mergedInputs:s}=d(e.inputs,t.inputs,e.staleInputs);e.inputs=s;for(const r of s)r.group=e}function y(e){return"group"===e.type?i(e.template):e.template.elementId}function F(e){const t=e.allFieldInputs,s=new Set(t.map(e=>e.fieldName));for(const r of t){const e=r.multipleChoiceOtherChoiceFieldName;if(!e)continue;const t=r.layers[0]?.getField(e)?.name??e;s.has(t)&&(r.shouldShowMultipleChoiceOtherChoice=!1)}}function w(s,i){const{allFeatures:g,expressionsManager:I,getFieldValueOptionsForFeature:d,getExternalErrorForFeature:x,map:y}=i,F=new Set(s.layers),j=g.filter(e=>F.has(e.layer)),A=j.length===g.length;if(l(s))return new r({existsInAllLayers:A,features:j,template:s,expressionsManager:I,getExternalErrorForFeature:x,getFieldValueOptionsForFeature:d});if(u(s)){const e=s.elements.map(e=>w(e,i));return new n({existsInAllLayers:A,features:j,inputs:e,template:s,expressionsManager:I})}if(m(s))return new o({existsInAllLayers:A,features:j,map:y,template:s,expressionsManager:I});if(f(s))return new p({existsInAllLayers:A,features:j,template:s,expressionsManager:I});if(c(s))return new t({existsInAllLayers:A,features:j,template:s,expressionsManager:I});if(h(s))return new a({existsInAllLayers:A,features:j,template:s,expressionsManager:I,map:y});throw new e("batch-attribute-form:unsupported-element-template","The type of form element template provided is not supported")}export{g as createBatchFormInputsFromBatchFormTemplate,I as mergeBatchFormInputsFromNewTemplate};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/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:"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};
2
+ function e(e){const{callback:n,disabled:a,formId:c,messages:t}=e;return[{appearance:"solid",disabled:a,form:c,kind:"brand",label:t.footerButtons.update,purpose:"submit",onclick:()=>n()}]}function n(e){const{deleteDisabled:n,deleteOnclick:a,doneOnclick:c,messages:t}=e;return[{appearance:"solid",kind:"brand",label:t.done,purpose:"stage-update-attachment",onclick:c??(()=>{})},{appearance:"outline",disabled:n,icon:"attachment",kind:"danger",label:t.delete,purpose:"stage-delete-attachment",onclick:a??(()=>{})}]}function a(e){const{doneOnclick:n,messages:a,resetOnclick:c}=e;return[{appearance:"solid",kind:"brand",label:a.done,purpose:"stage-update-attachment",onclick:n??(()=>{})},{appearance:"outline",icon:"reset",kind:"brand",label:a.reset,purpose:"discard-attachment-changes",onclick:c??(()=>{})}]}function c(e){const{messages:n,purpose:a,onclick:c}=e;return[{appearance:"outline",kind:"brand",label:n.cancel,purpose:a,onclick:c??(()=>{})}]}export{c as makeCancelFooterButton,e as makeDefaultFooterButtons,n as makeViewingAttachmentFooterButtons,a as makeViewingEditedAttachmentFooterButtons};