@arcgis/core 5.1.0-next.64 → 5.1.0-next.66

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 (802) hide show
  1. package/Camera.d.ts +1 -1
  2. package/Ground.d.ts +7 -7
  3. package/PopupTemplate.d.ts +8 -8
  4. package/WebDocument2D.js +1 -1
  5. package/WebScene.d.ts +1 -1
  6. package/WebScene.js +1 -1
  7. package/analysis/AreaMeasurementAnalysis.d.ts +1 -1
  8. package/analysis/DirectLineMeasurementAnalysis.d.ts +1 -1
  9. package/analysis/LengthDimension.d.ts +4 -4
  10. package/analysis/ShadowCastAnalysis.d.ts +3 -3
  11. package/analysis/SliceAnalysis.d.ts +1 -1
  12. package/analysis/SlicePlane.d.ts +1 -1
  13. package/applications/Components/featureUtils.d.ts +24 -0
  14. package/applications/Components/featureUtils.js +1 -1
  15. package/applications/KnowledgeStudio/generalSdkInternalAccess.d.ts +11 -1
  16. package/applications/KnowledgeStudio/generalSdkInternalAccess.js +1 -1
  17. package/applications/WebEditor/drawToolZSnapping.d.ts +17 -0
  18. package/applications/WebEditor/drawToolZSnapping.js +2 -0
  19. package/arcade/Dictionary.js +1 -1
  20. package/arcade/Feature.js +1 -1
  21. package/arcade/Pixel.js +1 -1
  22. package/arcade/Voxel.js +1 -1
  23. package/arcade/geometry/wkt.js +1 -1
  24. package/assets/esri/core/workers/RemoteClient.js +1 -1
  25. package/assets/esri/core/workers/chunks/01be1315c60810651783.js +1 -0
  26. package/assets/esri/core/workers/chunks/02e8fc598ee09cf1b678.js +1 -0
  27. package/assets/esri/core/workers/chunks/0d650b0d090a425c9c18.js +1 -0
  28. package/assets/esri/core/workers/chunks/0e90e9ea1ad587eb3495.js +1 -0
  29. package/assets/esri/core/workers/chunks/0f196ec93925dfefc69a.js +1 -0
  30. package/assets/esri/core/workers/chunks/12294f8c32c34788b6de.js +1 -0
  31. package/assets/esri/core/workers/chunks/13a8346abe5509167578.js +1 -0
  32. package/assets/esri/core/workers/chunks/1515824f11ef5ab95378.js +1 -0
  33. package/assets/esri/core/workers/chunks/151c2766a4cacc6adbd6.js +1 -0
  34. package/assets/esri/core/workers/chunks/155f57fe9886ef322e2a.js +1 -0
  35. package/assets/esri/core/workers/chunks/170f4d83555d238e365b.js +1 -0
  36. package/assets/esri/core/workers/chunks/171cca726a763c770469.js +1 -0
  37. package/assets/esri/core/workers/chunks/17445fd8048966617d49.js +1 -0
  38. package/assets/esri/core/workers/chunks/1761dc5799850ca7b66c.js +1 -0
  39. package/assets/esri/core/workers/chunks/17d54e77001ccb48a258.js +1 -0
  40. package/assets/esri/core/workers/chunks/19afacc9a741038e4bfb.js +1 -0
  41. package/assets/esri/core/workers/chunks/1d8777266fb1c5cfca55.js +1 -0
  42. package/assets/esri/core/workers/chunks/1f16bc8c02d8c4b2f693.js +1 -0
  43. package/assets/esri/core/workers/chunks/1f76c06af4682c85bc21.js +1 -0
  44. package/assets/esri/core/workers/chunks/{9eef3cd5f519c8ae88c0.js → 205e957ffd7e95f530f7.js} +1 -1
  45. package/assets/esri/core/workers/chunks/{fa6e1ad099b43a6f5501.js → 21a8e2a11ffacc226e2b.js} +1 -1
  46. package/assets/esri/core/workers/chunks/{811b378fa5bf8a4d3d66.js → 224461c1d9755966d0b6.js} +1 -1
  47. package/assets/esri/core/workers/chunks/27262083d37fe623ca9c.js +1 -0
  48. package/assets/esri/core/workers/chunks/2a3145a595d19391bb8a.js +1 -0
  49. package/assets/esri/core/workers/chunks/2a65bbe6c63c384cbf5f.js +1 -0
  50. package/assets/esri/core/workers/chunks/2fa69ca3ba8c442dd7d6.js +1 -0
  51. package/assets/esri/core/workers/chunks/314140e2e9b813191907.js +1 -0
  52. package/assets/esri/core/workers/chunks/32e22d6eee9fed1f70b0.js +1 -0
  53. package/assets/esri/core/workers/chunks/{af40e2e6eaf3d2226812.js → 3464a38e758c687a28d4.js} +1 -1
  54. package/assets/esri/core/workers/chunks/38816f95e801f1c5bbad.js +1 -0
  55. package/assets/esri/core/workers/chunks/3f8e8f83ebda07d29ca8.js +1 -0
  56. package/assets/esri/core/workers/chunks/41396724040180d2537f.js +1 -0
  57. package/assets/esri/core/workers/chunks/{66baacbef23291eab853.js → 413d2fa54508e6f42c74.js} +1 -1
  58. package/assets/esri/core/workers/chunks/{32e9e92bbbd000fbbaf7.js → 4141a3a93732996601e8.js} +2 -2
  59. package/assets/esri/core/workers/chunks/41e59d75ccb51a238739.js +1 -0
  60. package/assets/esri/core/workers/chunks/44016e1176629c36bc11.js +1 -0
  61. package/assets/esri/core/workers/chunks/468c70e5fdb61dfaad80.js +1 -0
  62. package/assets/esri/core/workers/chunks/4d069a0ebadb9c53b550.js +1 -0
  63. package/assets/esri/core/workers/chunks/4e7b084f7104deea1ddb.js +1 -0
  64. package/assets/esri/core/workers/chunks/{9c72127de7afcbaafbaf.js → 51852ef71ac04954fdae.js} +1 -1
  65. package/assets/esri/core/workers/chunks/549a51dedcc49f366e53.js +1 -0
  66. package/assets/esri/core/workers/chunks/{42e084704dea6e4135b6.js → 54c0306082d30d59cba2.js} +1 -1
  67. package/assets/esri/core/workers/chunks/56036327e721f9c42b33.js +1 -0
  68. package/assets/esri/core/workers/chunks/57cdd5d4ae073d5ca725.js +1 -0
  69. package/assets/esri/core/workers/chunks/5b9257c5359fa05f4f28.js +1 -0
  70. package/assets/esri/core/workers/chunks/5d574079f0e96e883aab.js +1 -0
  71. package/assets/esri/core/workers/chunks/5d967bcf71c05ddb1ab6.js +1 -0
  72. package/assets/esri/core/workers/chunks/5fccb372b4d5ee2f64cc.js +1 -0
  73. package/assets/esri/core/workers/chunks/61778185d702da468b00.js +1 -0
  74. package/assets/esri/core/workers/chunks/61794a861a9209b72622.js +1 -0
  75. package/assets/esri/core/workers/chunks/61b49cdaf288f36f9288.js +1 -0
  76. package/assets/esri/core/workers/chunks/{8ea67b502f9355dab7e9.js → 621ea864e2774f160d1c.js} +1 -1
  77. package/assets/esri/core/workers/chunks/{9d289cee96e7c7fe1029.js → 62a2da0ffc67f98445c1.js} +1 -1
  78. package/assets/esri/core/workers/chunks/{254898b41cabe313b6ce.js → 62d96b012c2d6f601863.js} +1 -1
  79. package/assets/esri/core/workers/chunks/644dd906bee3ef465ec0.js +1 -0
  80. package/assets/esri/core/workers/chunks/66692d6edc1bd96645e2.js +1 -0
  81. package/assets/esri/core/workers/chunks/679086351352756b33c9.js +1 -0
  82. package/assets/esri/core/workers/chunks/681e97ebbf9c69c410c6.js +1 -0
  83. package/assets/esri/core/workers/chunks/69520cad347947b09f21.js +1 -0
  84. package/assets/esri/core/workers/chunks/{c86b15f6a18880f921cd.js → 6a567755b67c06d16f21.js} +1 -1
  85. package/assets/esri/core/workers/chunks/{fdf4c1f202cfddf0f226.js → 6d11ec355e5474b2968b.js} +1 -1
  86. package/assets/esri/core/workers/chunks/6e7bb6d3e739527116a4.js +1 -0
  87. package/assets/esri/core/workers/chunks/751f3cfb000045ac78bb.js +1 -0
  88. package/assets/esri/core/workers/chunks/{64ad6130de549083caba.js → 789357e0f79823f145dd.js} +1 -1
  89. package/assets/esri/core/workers/chunks/{b6d94cbd1c5adad2f247.js → 78fbfc03d9b827c3f767.js} +1 -1
  90. package/assets/esri/core/workers/chunks/79df97e3f5975b42dc4d.js +1 -0
  91. package/assets/esri/core/workers/chunks/{25e4568a3ff76f48ac5e.js → 7a56c836c89a8b978800.js} +1 -1
  92. package/assets/esri/core/workers/chunks/7e97684e851274efd11f.js +1 -0
  93. package/assets/esri/core/workers/chunks/7e9b790fe01b89acdf6d.js +1 -0
  94. package/assets/esri/core/workers/chunks/7fb9a5bc22d7581f1d20.js +1 -0
  95. package/assets/esri/core/workers/chunks/{5c1abb46b9937a050c32.js → 7ffcd308087c35adda04.js} +1 -1
  96. package/assets/esri/core/workers/chunks/84eb889b9cce35dac2e5.js +1 -0
  97. package/assets/esri/core/workers/chunks/891d97d0da6361d63679.js +1 -0
  98. package/assets/esri/core/workers/chunks/8a0f254d45d00b293479.js +1 -0
  99. package/assets/esri/core/workers/chunks/8ede12f54b215c52cf3c.js +1 -0
  100. package/assets/esri/core/workers/chunks/8fed6becd107d2ed9bbd.js +1 -0
  101. package/assets/esri/core/workers/chunks/90cef6f96df7dc27db39.js +1 -0
  102. package/assets/esri/core/workers/chunks/921c30b7f4dfc3e018d9.js +1 -0
  103. package/assets/esri/core/workers/chunks/927773ed23b1fc245bf7.js +1 -0
  104. package/assets/esri/core/workers/chunks/{b056b4c79bcd542dd1d2.js → 9622a83b29acb768fcb5.js} +1 -1
  105. package/assets/esri/core/workers/chunks/97062996e1e4196cfa7c.js +1 -0
  106. package/assets/esri/core/workers/chunks/97210bcb5e3cf3ac961b.js +1 -0
  107. package/assets/esri/core/workers/chunks/{f550fc8c078ebd47d7a3.js → 97e15e66e55d9149fd48.js} +1 -1
  108. package/assets/esri/core/workers/chunks/9c819ebdc98ed8b6afcf.js +1 -0
  109. package/assets/esri/core/workers/chunks/9dfd00972c12a4adc15d.js +1 -0
  110. package/assets/esri/core/workers/chunks/9fab410b9fa668dc498b.js +1 -0
  111. package/assets/esri/core/workers/chunks/a118de5a163ae42bee60.js +1 -0
  112. package/assets/esri/core/workers/chunks/a4b6fdbc995be03d2afb.js +1 -0
  113. package/assets/esri/core/workers/chunks/a59db907ec1e31002100.js +1 -0
  114. package/assets/esri/core/workers/chunks/a5b395e518e4c5fc95d0.js +1414 -0
  115. package/assets/esri/core/workers/chunks/a5d9dbb1fef8c4465943.js +1 -0
  116. package/assets/esri/core/workers/chunks/{62c2757f5dc4aaca2df8.js → a73e8b80760dc88f926f.js} +1 -1
  117. package/assets/esri/core/workers/chunks/a96692514dcaa50340dd.js +1 -0
  118. package/assets/esri/core/workers/chunks/b4fb4484fa39eede1f62.js +1 -0
  119. package/assets/esri/core/workers/chunks/b50a42a9f96515beb929.js +1 -0
  120. package/assets/esri/core/workers/chunks/b8acb6c2538053c01cc6.js +1 -0
  121. package/assets/esri/core/workers/chunks/b8bf3e8b8b870f69f231.js +1 -0
  122. package/assets/esri/core/workers/chunks/b8e85b7d5eed6e7c79b5.js +1 -0
  123. package/assets/esri/core/workers/chunks/{fd629a3ab558adf52617.js → bc2c7cb99e227ddbd3a6.js} +1 -1
  124. package/assets/esri/core/workers/chunks/bc85bb82cfcbc216fa31.js +1 -0
  125. package/assets/esri/core/workers/chunks/{354351ab3fc79dedf9a8.js → bcb8a25438c66815e37a.js} +1 -1
  126. package/assets/esri/core/workers/chunks/be1e4c3ec53fc92a26f1.js +1 -0
  127. package/assets/esri/core/workers/chunks/be4d13088a557b7de4b1.js +1 -0
  128. package/assets/esri/core/workers/chunks/bf758d57091fa534c1f8.js +1 -0
  129. package/assets/esri/core/workers/chunks/bfd516c37fb717e14d71.js +1 -0
  130. package/assets/esri/core/workers/chunks/c22945637a40355fbe61.js +1 -0
  131. package/assets/esri/core/workers/chunks/c25a58d9f94aaa96957d.js +1 -0
  132. package/assets/esri/core/workers/chunks/c4e936879c6cb25cf586.js +1 -0
  133. package/assets/esri/core/workers/chunks/c6a43f748dbf8bac4bb5.js +1 -0
  134. package/assets/esri/core/workers/chunks/cb9185ed31109781fe59.js +1 -0
  135. package/assets/esri/core/workers/chunks/d21fdd67477800101f3b.js +1 -0
  136. package/assets/esri/core/workers/chunks/d264aed5dbe09e34040f.js +1 -0
  137. package/assets/esri/core/workers/chunks/d315098b038a96084ff5.js +1 -0
  138. package/assets/esri/core/workers/chunks/d4465fd3319d0b6a26cc.js +1 -0
  139. package/assets/esri/core/workers/chunks/{13eb0162d95b4d27389c.js → d598d08dbf2796742e8c.js} +1 -1
  140. package/assets/esri/core/workers/chunks/d5c7ebfd5c2ca635a7a8.js +1 -0
  141. package/assets/esri/core/workers/chunks/{d4368e281c12fa7c17c5.js → d635f97b7b82a37482d6.js} +1 -1
  142. package/assets/esri/core/workers/chunks/d7b92bd9198dd3b27eb5.js +1 -0
  143. package/assets/esri/core/workers/chunks/d83ac66478a419e08af6.js +1 -0
  144. package/assets/esri/core/workers/chunks/d8dde0d1759e009b8373.js +1 -0
  145. package/assets/esri/core/workers/chunks/d94dfb2ce31e59b3306b.js +1 -0
  146. package/assets/esri/core/workers/chunks/{8166ad6bbd7d7a8f91cf.js → deddf6ae4498a3d0d0e5.js} +1 -1
  147. package/assets/esri/core/workers/chunks/{45f1e682668cffc00b44.js → e0df7554b1679168663d.js} +1 -1
  148. package/assets/esri/core/workers/chunks/e0fcb5fa0e9f21fde2b6.js +1 -0
  149. package/assets/esri/core/workers/chunks/e305ced975d885c28e7e.js +1 -0
  150. package/assets/esri/core/workers/chunks/e3c60b7df2740e600066.js +1 -0
  151. package/assets/esri/core/workers/chunks/e611cd03eee4fae7c413.js +1 -0
  152. package/assets/esri/core/workers/chunks/e64a92b6f4075616f40f.js +1 -0
  153. package/assets/esri/core/workers/chunks/e78b442417f6a903b9b1.js +1 -0
  154. package/assets/esri/core/workers/chunks/{ba72989749543122a6fe.js → e9f2b573f482718306e6.js} +1 -1
  155. package/assets/esri/core/workers/chunks/ea6d3b7c7d720aa7bc94.js +1 -0
  156. package/assets/esri/core/workers/chunks/eab1b45ab5a802e29f8c.js +1 -0
  157. package/assets/esri/core/workers/chunks/eb7392799a01c2a8497a.js +1 -0
  158. package/assets/esri/core/workers/chunks/{c17c3453d014dc73fe0b.js → ef013a77950c1902de11.js} +1 -1
  159. package/assets/esri/core/workers/chunks/ef0fe4e1a9e960a74c60.js +1 -0
  160. package/assets/esri/core/workers/chunks/efbbcf467b2a27a92b85.js +1 -0
  161. package/assets/esri/core/workers/chunks/f201edf9b68717a6106d.js +1 -0
  162. package/assets/esri/core/workers/chunks/f43a63094190d2074cd0.js +1 -0
  163. package/assets/esri/core/workers/chunks/f59f1db572be1f19887f.js +1 -0
  164. package/assets/esri/core/workers/chunks/{dc07dc1cd30edc0c4193.js → f62e42659b406435573d.js} +1 -1
  165. package/assets/esri/core/workers/chunks/fa160a2a5dc9f5a7c34b.js +1 -0
  166. package/assets/esri/core/workers/chunks/fa7ae035472540999721.js +1 -0
  167. package/assets/esri/core/workers/chunks/fe3b42eadcdd9ba54f05.js +1 -0
  168. package/assets/esri/core/workers/chunks/fee31d9297648219375d.js +1 -0
  169. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_ar.json +1 -1
  170. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_bg.json +1 -1
  171. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_bs.json +1 -1
  172. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_ca.json +1 -1
  173. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_cs.json +1 -1
  174. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_da.json +1 -1
  175. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_de.json +1 -1
  176. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_el.json +1 -1
  177. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_es.json +1 -1
  178. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_et.json +1 -1
  179. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_fi.json +1 -1
  180. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_fr.json +1 -1
  181. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_he.json +1 -1
  182. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_hr.json +1 -1
  183. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_hu.json +1 -1
  184. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_id.json +1 -1
  185. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_it.json +1 -1
  186. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_ja.json +1 -1
  187. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_ko.json +1 -1
  188. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_lt.json +1 -1
  189. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_lv.json +1 -1
  190. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_nl.json +1 -1
  191. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_no.json +1 -1
  192. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_pl.json +1 -1
  193. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_pt-BR.json +1 -1
  194. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_pt-PT.json +1 -1
  195. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_ro.json +1 -1
  196. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_ru.json +1 -1
  197. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_sk.json +1 -1
  198. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_sl.json +1 -1
  199. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_sr.json +1 -1
  200. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_sv.json +1 -1
  201. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_th.json +1 -1
  202. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_tr.json +1 -1
  203. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_uk.json +1 -1
  204. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_vi.json +1 -1
  205. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_zh-CN.json +1 -1
  206. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_zh-HK.json +1 -1
  207. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_zh-TW.json +1 -1
  208. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ar.json +1 -1
  209. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_bg.json +1 -1
  210. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_bs.json +1 -1
  211. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ca.json +1 -1
  212. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_cs.json +1 -1
  213. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_da.json +1 -1
  214. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_de.json +1 -1
  215. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_el.json +1 -1
  216. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_es.json +1 -1
  217. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_et.json +1 -1
  218. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_fi.json +1 -1
  219. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_fr.json +1 -1
  220. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_he.json +1 -1
  221. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_hr.json +1 -1
  222. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_hu.json +1 -1
  223. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_id.json +1 -1
  224. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_it.json +1 -1
  225. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ja.json +1 -1
  226. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ko.json +1 -1
  227. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_lt.json +1 -1
  228. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_lv.json +1 -1
  229. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_nl.json +1 -1
  230. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_no.json +1 -1
  231. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_pl.json +1 -1
  232. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_pt-BR.json +1 -1
  233. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_pt-PT.json +1 -1
  234. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ro.json +1 -1
  235. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ru.json +1 -1
  236. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sk.json +1 -1
  237. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sl.json +1 -1
  238. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sr.json +1 -1
  239. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sv.json +1 -1
  240. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_th.json +1 -1
  241. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_tr.json +1 -1
  242. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_uk.json +1 -1
  243. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_vi.json +1 -1
  244. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_zh-CN.json +1 -1
  245. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_zh-HK.json +1 -1
  246. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_zh-TW.json +1 -1
  247. package/chunks/ComponentShader.glsl.js +1 -1
  248. package/chunks/DefaultMaterial.glsl.js +1 -1
  249. package/chunks/GaussianSplat.glsl.js +14 -2
  250. package/chunks/OITDim.glsl.js +3 -2
  251. package/chunks/Path.glsl.js +1 -1
  252. package/chunks/RealisticTree.glsl.js +1 -1
  253. package/chunks/ShadowCastAccumulate.glsl.js +2 -2
  254. package/chunks/ShadowHighlight.glsl.js +3 -3
  255. package/chunks/ShadowHighlightBuffer.glsl.js +1 -1
  256. package/chunks/Terrain.glsl.js +1 -1
  257. package/chunks/Water.glsl.js +1 -1
  258. package/config.js +1 -1
  259. package/core/timeUtils.js +1 -1
  260. package/core/workers/Connection.js +1 -1
  261. package/effects/FocusAreas.d.ts +1 -1
  262. package/form/elements/FieldElement.d.ts +3 -3
  263. package/form/elements/GroupElement.d.ts +1 -1
  264. package/form/elements/TextElement.d.ts +1 -1
  265. package/form/elements/inputs/ComboBoxInput.d.ts +1 -1
  266. package/form/elements/inputs/DateTimeOffsetPickerInput.d.ts +1 -1
  267. package/form/elements/inputs/DateTimeOffsetPickerInput.js +1 -1
  268. package/form/elements/inputs/Input.d.ts +1 -1
  269. package/form/elements/inputs/RadioButtonsInput.d.ts +1 -1
  270. package/form/elements/inputs/SwitchInput.d.ts +1 -1
  271. package/form/elements/inputs/inputUtils.js +1 -1
  272. package/form/elements/inputs.js +1 -1
  273. package/geometry/Mesh.d.ts +7 -7
  274. package/geometry/operators/alphaShapeOperator.d.ts +1 -1
  275. package/geometry/operators/areaOperator.d.ts +1 -1
  276. package/geometry/operators/bufferOperator.d.ts +1 -1
  277. package/geometry/operators/centroidOperator.d.ts +1 -1
  278. package/geometry/operators/clipOperator.d.ts +1 -1
  279. package/geometry/operators/containsOperator.d.ts +1 -1
  280. package/geometry/operators/convexHullOperator.d.ts +1 -1
  281. package/geometry/operators/crossesOperator.d.ts +1 -1
  282. package/geometry/operators/cutOperator.d.ts +1 -1
  283. package/geometry/operators/densifyOperator.d.ts +1 -1
  284. package/geometry/operators/differenceOperator.d.ts +1 -1
  285. package/geometry/operators/disjointOperator.d.ts +1 -1
  286. package/geometry/operators/distanceOperator.d.ts +1 -1
  287. package/geometry/operators/generalizeOperator.d.ts +1 -1
  288. package/geometry/operators/geodesicProximityOperator.d.ts +1 -1
  289. package/geometry/operators/geodeticDistanceOperator.d.ts +1 -1
  290. package/geometry/operators/geodeticUtilsOperator.d.ts +2 -2
  291. package/geometry/operators/graphicBufferOperator.d.ts +1 -1
  292. package/geometry/operators/intersectionOperator.d.ts +1 -1
  293. package/geometry/operators/intersectsOperator.d.ts +1 -1
  294. package/geometry/operators/isNearOperator.d.ts +1 -1
  295. package/geometry/operators/lengthOperator.d.ts +1 -1
  296. package/geometry/operators/locateBetweenOperator.d.ts +1 -1
  297. package/geometry/operators/multiPartToSinglePartOperator.d.ts +1 -1
  298. package/geometry/operators/offsetOperator.d.ts +5 -5
  299. package/geometry/operators/overlapsOperator.d.ts +1 -1
  300. package/geometry/operators/proximityOperator.d.ts +1 -1
  301. package/geometry/operators/simplifyOGCOperator.d.ts +1 -1
  302. package/geometry/operators/simplifyOperator.d.ts +1 -1
  303. package/geometry/operators/support/Transformation.d.ts +6 -6
  304. package/geometry/operators/symmetricDifferenceOperator.d.ts +1 -1
  305. package/geometry/operators/touchesOperator.d.ts +1 -1
  306. package/geometry/operators/unionOperator.d.ts +1 -1
  307. package/geometry/operators/withinOperator.d.ts +1 -1
  308. package/geometry/support/MeshMaterialMetallicRoughness.d.ts +1 -1
  309. package/geometry/support/spatialReferenceUtils.js +1 -1
  310. package/geometry/support/vcsData.js +2 -0
  311. package/geometry/support/vcsLookup.js +2 -0
  312. package/interfaces.d.ts +4 -2
  313. package/intl.js +1 -1
  314. package/kernel.js +1 -1
  315. package/layers/BuildingSceneLayer.d.ts +4 -4
  316. package/layers/CSVLayer.d.ts +2 -2
  317. package/layers/CatalogLayer.d.ts +2 -2
  318. package/layers/ElevationLayer.d.ts +1 -1
  319. package/layers/FeatureLayer.d.ts +9 -2
  320. package/layers/FeatureLayer.js +1 -1
  321. package/layers/GeoJSONLayer.d.ts +2 -2
  322. package/layers/GeoRSSLayer.d.ts +1 -1
  323. package/layers/GraphicsLayer.d.ts +2 -2
  324. package/layers/ImageryLayer.d.ts +3 -3
  325. package/layers/ImageryTileLayer.d.ts +2 -2
  326. package/layers/IntegratedMesh3DTilesLayer.d.ts +6 -6
  327. package/layers/IntegratedMeshLayer.d.ts +7 -7
  328. package/layers/MapImageLayer.d.ts +1 -1
  329. package/layers/MediaLayer.d.ts +1 -1
  330. package/layers/OGCFeatureLayer.d.ts +2 -2
  331. package/layers/PointCloudLayer.d.ts +1 -1
  332. package/layers/SceneLayer.d.ts +9 -9
  333. package/layers/StreamLayer.d.ts +2 -2
  334. package/layers/SubtypeGroupLayer.js +1 -1
  335. package/layers/VectorTileLayer.d.ts +2 -2
  336. package/layers/VideoLayer.d.ts +1 -1
  337. package/layers/VoxelLayer.d.ts +8 -8
  338. package/layers/VoxelWasmPerSceneView.js +1 -1
  339. package/layers/WFSLayer.d.ts +6 -6
  340. package/layers/catalog/CatalogFootprintLayer.d.ts +1 -1
  341. package/layers/graphics/data/AttributesBuilder.js +1 -1
  342. package/layers/graphics/sources/geojson/GeoJSONSourceWorker.js +1 -1
  343. package/layers/graphics/sources/support/MemorySourceWorker.js +1 -1
  344. package/layers/mixins/ArcGISImageService.js +1 -1
  345. package/layers/mixins/BlendLayer.d.ts +6 -6
  346. package/layers/pointCloudFilters/PointCloudReturnFilter.d.ts +1 -1
  347. package/layers/pointCloudFilters/PointCloudValueFilter.d.ts +1 -1
  348. package/layers/support/DimensionalDefinition.d.ts +2 -2
  349. package/layers/support/FeatureEffect.d.ts +4 -4
  350. package/layers/support/FeatureFilter.d.ts +17 -17
  351. package/layers/support/FeatureReductionBinning.d.ts +1 -1
  352. package/layers/support/FeatureReductionCluster.d.ts +9 -9
  353. package/layers/support/FeatureReductionSelection.d.ts +1 -1
  354. package/layers/support/LabelClass.d.ts +2 -2
  355. package/layers/support/RasterFunction.d.ts +1 -1
  356. package/layers/support/SceneFilter.d.ts +2 -2
  357. package/layers/support/SceneModification.d.ts +3 -3
  358. package/layers/support/SymbolLayerDrawing.d.ts +15 -0
  359. package/layers/support/SymbolLayerDrawing.js +2 -0
  360. package/layers/support/capabilities.js +1 -1
  361. package/layers/support/featureLayerUtils.js +1 -1
  362. package/layers/support/serviceCapabilitiesUtils.js +1 -1
  363. package/layers/types.d.ts +6 -0
  364. package/networks/support/jsonTypes.d.ts +36 -11
  365. package/package.json +4 -4
  366. package/popup/Feature.d.ts +20 -10
  367. package/popup/Feature.js +1 -1
  368. package/popup/Features.d.ts +82 -227
  369. package/popup/Features.js +1 -1
  370. package/popup/content/AttachmentsContent.d.ts +1 -1
  371. package/popup/content/BarChartMediaInfo.d.ts +1 -1
  372. package/popup/content/ColumnChartMediaInfo.d.ts +1 -1
  373. package/popup/content/FieldsContent.d.ts +1 -1
  374. package/popup/content/ImageMediaInfo.d.ts +1 -1
  375. package/popup/content/LineChartMediaInfo.d.ts +1 -1
  376. package/popup/content/MediaContent.d.ts +1 -1
  377. package/popup/content/PieChartMediaInfo.d.ts +1 -1
  378. package/popup/content/RelationshipContent.d.ts +1 -1
  379. package/popup/content/TextContent.d.ts +1 -1
  380. package/popup/support/FeatureAbilities.d.ts +45 -9
  381. package/popup/support/featureUtils.js +1 -1
  382. package/popup/types.d.ts +126 -8
  383. package/portal/schemas/definitions.js +1 -1
  384. package/renderers/ClassBreaksRenderer.d.ts +1 -1
  385. package/renderers/DictionaryRenderer.d.ts +1 -1
  386. package/renderers/DotDensityRenderer.d.ts +3 -3
  387. package/renderers/FlowRenderer.d.ts +5 -5
  388. package/renderers/HeatmapRenderer.d.ts +3 -3
  389. package/renderers/PieChartRenderer.d.ts +1 -1
  390. package/renderers/RasterShadedReliefRenderer.d.ts +1 -1
  391. package/renderers/Renderer.d.ts +4 -4
  392. package/renderers/SimpleRenderer.d.ts +2 -2
  393. package/renderers/UniqueValueRenderer.d.ts +2 -2
  394. package/renderers/VectorFieldRenderer.d.ts +1 -1
  395. package/renderers/mixins/VisualVariablesMixin.d.ts +12 -12
  396. package/renderers/visualVariables/ColorVariable.d.ts +1 -1
  397. package/renderers/visualVariables/OpacityVariable.d.ts +1 -1
  398. package/renderers/visualVariables/RotationVariable.d.ts +1 -1
  399. package/renderers/visualVariables/SizeVariable.d.ts +1 -1
  400. package/renderers/visualVariables/VisualVariable.d.ts +1 -1
  401. package/rest/query/support/AttachmentInfo.d.ts +1 -1
  402. package/rest/support/AttributeBinsQuery.d.ts +8 -8
  403. package/rest/support/AutoIntervalBinParameters.d.ts +1 -1
  404. package/rest/support/DateBinParameters.d.ts +1 -1
  405. package/rest/support/FixedBoundariesBinParameters.d.ts +1 -1
  406. package/rest/support/FixedIntervalBinParameters.d.ts +1 -1
  407. package/rest/support/Query.d.ts +8 -8
  408. package/rest/support/TopFeaturesQuery.d.ts +8 -8
  409. package/smartMapping/labels/clusters.d.ts +1 -1
  410. package/smartMapping/popup/clusters.d.ts +2 -2
  411. package/smartMapping/popup/templates.d.ts +1 -1
  412. package/smartMapping/raster/renderers/flow.d.ts +2 -2
  413. package/smartMapping/renderers/color.d.ts +12 -12
  414. package/smartMapping/renderers/predominance.d.ts +3 -3
  415. package/smartMapping/renderers/relationship.d.ts +15 -15
  416. package/smartMapping/renderers/univariateColorSize.d.ts +4 -4
  417. package/smartMapping/statistics/support/utils.js +1 -1
  418. package/smartMapping/support/adapters/support/utils.js +1 -1
  419. package/smartMapping/symbology/color.d.ts +4 -4
  420. package/smartMapping/symbology/flow.d.ts +2 -2
  421. package/smartMapping/symbology/types.d.ts +18 -18
  422. package/support/actions/ActionButton.d.ts +1 -1
  423. package/support/basemapDefinitions.js +1 -1
  424. package/support/revision.js +1 -1
  425. package/symbols/CIMSymbol.d.ts +1 -1
  426. package/symbols/ExtrudeSymbol3DLayer.d.ts +1 -1
  427. package/symbols/FillSymbol3DLayer.d.ts +3 -3
  428. package/symbols/IconSymbol3DLayer.d.ts +1 -1
  429. package/symbols/LabelSymbol3D.d.ts +2 -2
  430. package/symbols/LineStyleMarker3D.d.ts +7 -7
  431. package/symbols/LineSymbol3D.d.ts +2 -2
  432. package/symbols/LineSymbol3DLayer.d.ts +7 -7
  433. package/symbols/LineSymbolMarker.d.ts +6 -6
  434. package/symbols/MarkerSymbol.d.ts +1 -1
  435. package/symbols/MeshSymbol3D.d.ts +2 -2
  436. package/symbols/ObjectSymbol3DLayer.d.ts +1 -1
  437. package/symbols/PathSymbol3DLayer.d.ts +14 -14
  438. package/symbols/PictureFillSymbol.d.ts +1 -1
  439. package/symbols/PictureMarkerSymbol.d.ts +1 -1
  440. package/symbols/PointSymbol3D.d.ts +3 -3
  441. package/symbols/PolygonSymbol3D.d.ts +5 -5
  442. package/symbols/SimpleFillSymbol.d.ts +8 -8
  443. package/symbols/SimpleLineSymbol.d.ts +20 -20
  444. package/symbols/SimpleMarkerSymbol.d.ts +7 -7
  445. package/symbols/Symbol3DLayer.d.ts +16 -16
  446. package/symbols/TextSymbol.d.ts +1 -1
  447. package/symbols/TextSymbol3DLayer.d.ts +1 -1
  448. package/symbols/WaterSymbol3DLayer.d.ts +3 -3
  449. package/symbols/WebStyleSymbol.d.ts +12 -12
  450. package/symbols/callouts/Callout3D.d.ts +1 -1
  451. package/symbols/callouts/LineCallout3D.d.ts +3 -3
  452. package/symbols/cim/cimAnalyzer.js +1 -1
  453. package/symbols/cim/types.d.ts +29 -23
  454. package/symbols/edges/Edges3D.d.ts +1 -1
  455. package/symbols/edges/SolidEdges3D.d.ts +1 -1
  456. package/symbols/patterns/LineStylePattern3D.d.ts +11 -11
  457. package/symbols/patterns/StylePattern3D.d.ts +8 -8
  458. package/symbols/support/ElevationInfo.d.ts +2 -2
  459. package/symbols/support/IconSymbol3DLayerResource.d.ts +6 -6
  460. package/symbols/support/ObjectSymbol3DLayerResource.d.ts +7 -7
  461. package/symbols/support/Symbol3DEmissive.d.ts +2 -2
  462. package/symbols/support/Symbol3DVerticalOffset.d.ts +2 -2
  463. package/views/2d/engine/Stage.js +1 -1
  464. package/views/2d/engine/flow/FlowStrategy.js +1 -1
  465. package/views/2d/engine/flow/styles/Imagery.js +1 -1
  466. package/views/2d/engine/flow/styles/Particles.js +1 -1
  467. package/views/2d/engine/flow/styles/Stack.js +1 -1
  468. package/views/2d/engine/flow/styles/Streamlines.js +1 -1
  469. package/views/2d/engine/vectorTiles/VTLPainter3D.js +1 -1
  470. package/views/2d/engine/vectorTiles/style/StyleLayer.js +1 -1
  471. package/views/2d/engine/webgl/AttributeStoreView.js +1 -1
  472. package/views/2d/engine/webgl/FeatureDisplayList.js +1 -1
  473. package/views/2d/engine/webgl/Painter.js +1 -1
  474. package/views/2d/engine/webgl/VideoScreenRenderer.js +1 -1
  475. package/views/2d/engine/webgl/effects/FeatureEffect.js +1 -1
  476. package/views/2d/engine/webgl/effects/HighlightEffect.js +1 -1
  477. package/views/2d/engine/webgl/effects/highlight/HighlightSurfaces.js +1 -1
  478. package/views/2d/engine/webgl/shaderGraph/techniques/FeatureInstanceStore.js +1 -1
  479. package/views/2d/engine/webgl/shaderGraph/techniques/GraphicInstanceStore.js +1 -1
  480. package/views/2d/engine/webgl/shaderGraph/techniques/TextureStatisticsTechnique.js +1 -1
  481. package/views/2d/engine/webgl/shaderGraph/techniques/blend/BlendTechnique.js +1 -1
  482. package/views/2d/engine/webgl/shaderGraph/techniques/bloom/BloomTechnique.js +1 -1
  483. package/views/2d/engine/webgl/shaderGraph/techniques/blur/BlurTechnique.js +1 -1
  484. package/views/2d/engine/webgl/shaderGraph/techniques/dotDensity/DotDensityResources.js +1 -1
  485. package/views/2d/engine/webgl/shaderGraph/techniques/dotDensity/DotDensityTechnique.js +1 -1
  486. package/views/2d/engine/webgl/shaderGraph/techniques/drop-shadow/DropShadowTechnique.js +1 -1
  487. package/views/2d/engine/webgl/shaderGraph/techniques/heatmap/HeatmapResources.js +1 -1
  488. package/views/2d/engine/webgl/shaderGraph/techniques/heatmap/HeatmapTechnique.js +1 -1
  489. package/views/2d/engine/webgl/shaderGraph/techniques/raster/RasterColorizerTechnique.js +1 -1
  490. package/views/2d/engine/webgl/shaderGraph/techniques/raster/RasterHighlightTechnique.js +1 -1
  491. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/BaseRasterProcessorTechnique.js +1 -1
  492. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/textureUtils.js +1 -1
  493. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  494. package/views/2d/layers/BaseLayerViewGL2D.d.ts +2 -2
  495. package/views/2d/layers/BaseLayerViewGL2D.js +1 -1
  496. package/views/2d/layers/ImageryTileLayerView2D.js +1 -1
  497. package/views/2d/layers/features/FeatureContainer.js +1 -1
  498. package/views/2d/layers/features/layerAdapters/FeatureLayerAdapter.js +1 -1
  499. package/views/2d/layers/features/layerAdapters/SubtypeGroupLayerAdapter.js +1 -1
  500. package/views/2d/layers/features/schema/processor/SimpleProcessorSchema.js +1 -1
  501. package/views/2d/layers/features/schema/processor/symbols/ComplexSymbolSchema.js +1 -1
  502. package/views/2d/layers/imagery/BaseImageryTileSubView2D.js +1 -1
  503. package/views/2d/layers/support/DisplayGL.js +1 -1
  504. package/views/2d/types.d.ts +3 -3
  505. package/views/3d/FocusAreasView.js +1 -1
  506. package/views/3d/analysis/Slice/sliceToolUtils.js +1 -1
  507. package/views/3d/analysis/Viewshed/ViewshedSubTool.js +1 -1
  508. package/views/3d/analysis/Viewshed/ViewshedTool.js +1 -1
  509. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillController.js +1 -1
  510. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillVisualization.js +1 -1
  511. package/views/3d/environment/CloudyWeather.d.ts +1 -1
  512. package/views/3d/environment/Environment.d.ts +4 -4
  513. package/views/3d/environment/FoggyWeather.d.ts +1 -1
  514. package/views/3d/environment/RainyWeather.d.ts +1 -1
  515. package/views/3d/environment/SnowyWeather.d.ts +1 -1
  516. package/views/3d/environment/SunLighting.d.ts +1 -1
  517. package/views/3d/environment/SunnyWeather.d.ts +1 -1
  518. package/views/3d/environment/VirtualLighting.d.ts +1 -1
  519. package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
  520. package/views/3d/layers/graphics/extrudeUtils.js +1 -1
  521. package/views/3d/support/gaussianSplatting/GaussianSplatIntersectionHandler.js +1 -1
  522. package/views/3d/support/gaussianSplatting/GaussianSplatTextureAtlas.js +1 -1
  523. package/views/3d/support/gaussianSplatting/GaussianTile.js +1 -1
  524. package/views/3d/support/renderInfoUtils/polygon.js +1 -1
  525. package/views/3d/terrain/support/MultiSizeFramebuffer.js +1 -1
  526. package/views/3d/webgl/ManagedFBO.js +1 -1
  527. package/views/3d/webgl/RenderNode.d.ts +2 -2
  528. package/views/3d/webgl-engine/core/FBOCache.js +1 -1
  529. package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
  530. package/views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js +18 -5
  531. package/views/3d/webgl-engine/core/shaderLibrary/shading/ShadowmapFiltering.glsl.js +2 -2
  532. package/views/3d/webgl-engine/core/shaderLibrary/shading/calculateUVZShadow.glsl.js +2 -2
  533. package/views/3d/webgl-engine/core/shaderLibrary/shading/calculateUVZShadowFromDepth.glsl.js +1 -1
  534. package/views/3d/webgl-engine/effects/RenderPluginManager.js +1 -1
  535. package/views/3d/webgl-engine/effects/clouds/CloudsRenderer.js +1 -1
  536. package/views/3d/webgl-engine/effects/clouds/NoiseTextureAtlas.js +1 -1
  537. package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizerNode.js +1 -1
  538. package/views/3d/webgl-engine/effects/focusArea/FocusAreaMaskNode.js +1 -1
  539. package/views/3d/webgl-engine/effects/highlight/Highlight.js +1 -1
  540. package/views/3d/webgl-engine/effects/transparency/OITBlend.js +1 -1
  541. package/views/3d/webgl-engine/effects/transparency/OITDim.glsl.js +1 -1
  542. package/views/3d/webgl-engine/effects/transparency/OITDimTechniqueConfiguration.js +2 -0
  543. package/views/3d/webgl-engine/lib/CutFillComputationRenderNode.js +1 -1
  544. package/views/3d/webgl-engine/lib/CutFillVisualizationRenderNode.js +1 -1
  545. package/views/3d/webgl-engine/lib/DrapedHeatmapRenderer.js +1 -1
  546. package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
  547. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  548. package/views/3d/webgl-engine/materials/PolygonOffset.js +1 -1
  549. package/views/3d/webgl-engine/shaders/GaussianSplat.glsl.js +1 -1
  550. package/views/3d/webgl-engine/shaders/GaussianSplatTechniqueConfiguration.js +1 -1
  551. package/views/3d/webgl-engine/shaders/ShadowCastAccumulate.glsl.js +1 -1
  552. package/views/3d/webgl.d.ts +1 -1
  553. package/views/Magnifier.d.ts +3 -3
  554. package/views/MapView.d.ts +7 -7
  555. package/views/SceneView.d.ts +16 -16
  556. package/views/View.d.ts +17 -3
  557. package/views/View.js +1 -1
  558. package/views/draw/DrawTool.js +1 -1
  559. package/views/draw/support/InteractiveHandle.js +1 -1
  560. package/views/draw/support/Reshape.js +1 -1
  561. package/views/draw/support/drawUtils.js +1 -1
  562. package/views/draw/support/reshapeTooltipUtils.js +1 -1
  563. package/views/draw/support/types.d.ts +9 -1
  564. package/views/interactive/sketch/SketchLabelOptions.d.ts +1 -1
  565. package/views/interactive/sketch/SketchTooltipOptions.d.ts +1 -1
  566. package/views/interactive/snapping/SnappingOptions.d.ts +7 -7
  567. package/views/layers/FeatureLikeLayerView.js +1 -1
  568. package/views/layers/LineOfSightLayerView.d.ts +3 -2
  569. package/views/support/HighlightOptions.d.ts +1 -1
  570. package/views/support/imageReprojection.js +1 -1
  571. package/views/types.d.ts +59 -2
  572. package/views/ui/DefaultUI.d.ts +2 -2
  573. package/views/webgl/FramebufferObject.js +1 -1
  574. package/views/webgl/RenderingContext.js +1 -1
  575. package/views/webgl/Texture.js +1 -1
  576. package/views/webgl/testFloatBufferBlend.js +1 -1
  577. package/views/webgl/testSVGPremultipliedAlpha.js +1 -1
  578. package/webscene/Environment.d.ts +10 -10
  579. package/webscene/Glow.d.ts +1 -1
  580. package/webscene/background/ColorBackground.d.ts +1 -1
  581. package/widgets/AreaMeasurement2D.d.ts +1 -1
  582. package/widgets/AreaMeasurement3D.d.ts +2 -2
  583. package/widgets/Attachments.d.ts +1 -1
  584. package/widgets/Attribution.d.ts +1 -1
  585. package/widgets/BasemapGallery.d.ts +1 -1
  586. package/widgets/BasemapLayerList.d.ts +3 -3
  587. package/widgets/BasemapToggle.d.ts +1 -1
  588. package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js +1 -1
  589. package/widgets/BatchAttributeForm/expressions/ExpressionsManager.js +1 -1
  590. package/widgets/BatchAttributeForm/inputs/FieldInput.js +1 -1
  591. package/widgets/Bookmarks/BookmarksVisibleElements.d.ts +1 -1
  592. package/widgets/Bookmarks.d.ts +2 -2
  593. package/widgets/BuildingExplorer.d.ts +1 -1
  594. package/widgets/CatalogLayerList.d.ts +3 -3
  595. package/widgets/Compass.d.ts +2 -2
  596. package/widgets/CoordinateConversion.d.ts +1 -1
  597. package/widgets/Daylight.d.ts +5 -5
  598. package/widgets/DirectLineMeasurement3D.d.ts +2 -2
  599. package/widgets/Directions.d.ts +4 -4
  600. package/widgets/DistanceMeasurement2D.d.ts +1 -1
  601. package/widgets/Editor/CreateFeaturesWorkflow.d.ts +1 -1
  602. package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
  603. package/widgets/Editor/UpdateFeatureWorkflow.js +1 -1
  604. package/widgets/Editor/UpdateFeaturesWorkflow.js +1 -1
  605. package/widgets/Editor/UpdateWorkflow.js +1 -1
  606. package/widgets/Editor/Workflow.js +1 -1
  607. package/widgets/Editor.d.ts +8 -8
  608. package/widgets/ElevationProfile/ElevationProfileLineGround.d.ts +1 -1
  609. package/widgets/ElevationProfile/ElevationProfileLineInput.d.ts +1 -1
  610. package/widgets/ElevationProfile/ElevationProfileLineView.d.ts +1 -1
  611. package/widgets/ElevationProfile.d.ts +3 -3
  612. package/widgets/Expand.d.ts +1 -1
  613. package/widgets/Feature/FeatureViewModel.d.ts +14 -4
  614. package/widgets/Feature/FeatureViewModel.js +1 -1
  615. package/widgets/FeatureForm/FieldInput.js +1 -1
  616. package/widgets/FeatureForm.d.ts +1 -1
  617. package/widgets/FeatureTable/ActionColumn.d.ts +2 -2
  618. package/widgets/FeatureTable/AttachmentsColumn.d.ts +1 -1
  619. package/widgets/FeatureTable/FeatureTableViewModel.d.ts +3 -3
  620. package/widgets/FeatureTable/Grid/GroupColumn.d.ts +1 -1
  621. package/widgets/FeatureTable/RelationshipColumn.d.ts +1 -1
  622. package/widgets/FeatureTable/VisibleElements.d.ts +1 -1
  623. package/widgets/FeatureTable.d.ts +10 -10
  624. package/widgets/FeatureTemplates/FeatureTemplatesViewModel.d.ts +5 -5
  625. package/widgets/FeatureTemplates.d.ts +8 -8
  626. package/widgets/Features/FeaturesViewModel.d.ts +18 -7
  627. package/widgets/Features/FeaturesViewModel.js +1 -1
  628. package/widgets/Features/FeaturesVisibleElements.d.ts +2 -2
  629. package/widgets/Features.d.ts +1 -1
  630. package/widgets/Features.js +1 -1
  631. package/widgets/FloorFilter/FloorFilterViewModel.js +1 -1
  632. package/widgets/FloorFilter.d.ts +2 -2
  633. package/widgets/Histogram.d.ts +2 -2
  634. package/widgets/HistogramRangeSlider.d.ts +1 -1
  635. package/widgets/Home.d.ts +1 -1
  636. package/widgets/LayerList/ListItemPanel.d.ts +1 -1
  637. package/widgets/LayerList.d.ts +4 -4
  638. package/widgets/Legend.d.ts +8 -8
  639. package/widgets/LineOfSight.d.ts +1 -1
  640. package/widgets/Locate.d.ts +2 -2
  641. package/widgets/Measurement.d.ts +1 -1
  642. package/widgets/NavigationToggle/NavigationToggleViewModel.d.ts +1 -1
  643. package/widgets/NavigationToggle.d.ts +3 -3
  644. package/widgets/Popup/PopupViewModel.d.ts +2 -1
  645. package/widgets/Popup/PopupViewModel.js +1 -1
  646. package/widgets/Popup/PopupVisibleElements.d.ts +2 -2
  647. package/widgets/Popup.d.ts +18 -9
  648. package/widgets/Popup.js +1 -1
  649. package/widgets/Print/CustomTemplate.d.ts +1 -1
  650. package/widgets/Print/TemplateOptions.d.ts +4 -4
  651. package/widgets/ScaleRangeSlider.d.ts +1 -1
  652. package/widgets/Search/SearchViewModel.d.ts +4 -4
  653. package/widgets/Search.d.ts +5 -5
  654. package/widgets/ShadowCast.d.ts +3 -3
  655. package/widgets/Sketch/SketchViewModel.d.ts +39 -39
  656. package/widgets/Sketch.d.ts +43 -43
  657. package/widgets/Slice.d.ts +2 -2
  658. package/widgets/Slider/SliderViewModel.d.ts +2 -2
  659. package/widgets/Slider.d.ts +9 -9
  660. package/widgets/Swipe/SwipeViewModel.d.ts +1 -1
  661. package/widgets/Swipe.d.ts +2 -2
  662. package/widgets/TableList/ListItemPanel.d.ts +1 -1
  663. package/widgets/TableList.d.ts +1 -1
  664. package/widgets/TimeSlider/TimeSliderViewModel.d.ts +10 -10
  665. package/widgets/TimeSlider/TimeSliderViewModel.js +1 -1
  666. package/widgets/TimeSlider/types.d.ts +1 -1
  667. package/widgets/TimeSlider.d.ts +13 -13
  668. package/widgets/Track.d.ts +2 -2
  669. package/widgets/UtilityNetworkAssociations.d.ts +3 -3
  670. package/widgets/UtilityNetworkTrace/UtilityNetworkTraceFeature.js +1 -1
  671. package/widgets/UtilityNetworkTrace.d.ts +4 -4
  672. package/widgets/UtilityNetworkValidateTopology.d.ts +1 -1
  673. package/widgets/ValuePicker.d.ts +5 -5
  674. package/widgets/VideoPlayer.d.ts +1 -1
  675. package/widgets/smartMapping/ClassedColorSlider.d.ts +1 -1
  676. package/widgets/smartMapping/ClassedSizeSlider.d.ts +1 -1
  677. package/widgets/smartMapping/ColorSizeSlider.d.ts +2 -2
  678. package/widgets/smartMapping/ColorSlider.d.ts +1 -1
  679. package/widgets/smartMapping/HeatmapSlider.d.ts +1 -1
  680. package/widgets/smartMapping/OpacitySlider.d.ts +1 -1
  681. package/widgets/smartMapping/SizeSlider.d.ts +1 -1
  682. package/widgets/smartMapping/SmartMappingSliderBase.d.ts +4 -4
  683. package/widgets/smartMapping/SmartMappingSliderViewModel.d.ts +6 -6
  684. package/widgets/support/GridControls.d.ts +1 -1
  685. package/widgets/support/SnappingControls/VisibleElements.d.ts +1 -1
  686. package/widgets/support/SnappingControls.d.ts +6 -6
  687. package/assets/esri/core/workers/chunks/02aaeaa988e9e7d65a7f.js +0 -1
  688. package/assets/esri/core/workers/chunks/05c8d2c0362af4511d86.js +0 -1
  689. package/assets/esri/core/workers/chunks/06868e4f52de9d918255.js +0 -1
  690. package/assets/esri/core/workers/chunks/06c0b93e276cfc1fb7ac.js +0 -1
  691. package/assets/esri/core/workers/chunks/0888baa99c9007ad63bc.js +0 -1
  692. package/assets/esri/core/workers/chunks/0de66f13e84830a654fb.js +0 -1
  693. package/assets/esri/core/workers/chunks/0f597c690e5c60fe944b.js +0 -1
  694. package/assets/esri/core/workers/chunks/0f8736242544f9e9a57a.js +0 -1
  695. package/assets/esri/core/workers/chunks/0ff12fe9e358100668d9.js +0 -1
  696. package/assets/esri/core/workers/chunks/11a8541f3909f9ffb000.js +0 -1
  697. package/assets/esri/core/workers/chunks/13a009229c96ecb7b04f.js +0 -1
  698. package/assets/esri/core/workers/chunks/185f59f90070d5d6ac94.js +0 -1
  699. package/assets/esri/core/workers/chunks/190bc75254bc0542a6be.js +0 -1
  700. package/assets/esri/core/workers/chunks/1af247c86d1c4ae8fef3.js +0 -1
  701. package/assets/esri/core/workers/chunks/2339465190c9d5ede25f.js +0 -1
  702. package/assets/esri/core/workers/chunks/23eb204d3cb818adea32.js +0 -1
  703. package/assets/esri/core/workers/chunks/241ef4a1bea20b49d812.js +0 -1
  704. package/assets/esri/core/workers/chunks/2669a7195f1de21a9cf3.js +0 -1
  705. package/assets/esri/core/workers/chunks/2a2d5f9ea42cb2eee9c6.js +0 -1
  706. package/assets/esri/core/workers/chunks/2a7e7a497823e9f05aa3.js +0 -1
  707. package/assets/esri/core/workers/chunks/2aaeaf022af8493281dc.js +0 -1
  708. package/assets/esri/core/workers/chunks/2d92ba11781a3cfc3a78.js +0 -1
  709. package/assets/esri/core/workers/chunks/31e0bfc2cab055aebf9a.js +0 -1
  710. package/assets/esri/core/workers/chunks/32360a55d1836b2a737e.js +0 -1
  711. package/assets/esri/core/workers/chunks/330da3828eefd8d72d3f.js +0 -1
  712. package/assets/esri/core/workers/chunks/34acecd7a314fed12335.js +0 -1
  713. package/assets/esri/core/workers/chunks/34fe4570eef9e73839b8.js +0 -1
  714. package/assets/esri/core/workers/chunks/368b4c0a5eecbb06feac.js +0 -1
  715. package/assets/esri/core/workers/chunks/37729578a7c4cf15eded.js +0 -1
  716. package/assets/esri/core/workers/chunks/3af1e2f0b3d30c58d0c2.js +0 -1
  717. package/assets/esri/core/workers/chunks/3c155efd5768003a91eb.js +0 -1
  718. package/assets/esri/core/workers/chunks/3d4bb59ab2f644f4d675.js +0 -1
  719. package/assets/esri/core/workers/chunks/3f0d9fdd8c37605dd85d.js +0 -1
  720. package/assets/esri/core/workers/chunks/48eca6f51112ba80bd3b.js +0 -1
  721. package/assets/esri/core/workers/chunks/4b5737021a149aa786af.js +0 -1
  722. package/assets/esri/core/workers/chunks/55214e1d9f3d98fa7ed9.js +0 -1
  723. package/assets/esri/core/workers/chunks/55a0b69cf034ac32fc25.js +0 -1
  724. package/assets/esri/core/workers/chunks/576a1784e93c5406e657.js +0 -1
  725. package/assets/esri/core/workers/chunks/59289867cce97da74e39.js +0 -1
  726. package/assets/esri/core/workers/chunks/5a6d6082c5bcb1a80eda.js +0 -1
  727. package/assets/esri/core/workers/chunks/5a9620cb66c8e64e4668.js +0 -1
  728. package/assets/esri/core/workers/chunks/5c6e5f22450dd0583074.js +0 -1
  729. package/assets/esri/core/workers/chunks/5eeb6d3a7b815d41621e.js +0 -1
  730. package/assets/esri/core/workers/chunks/5f06a57b4f7d7de16bbf.js +0 -1
  731. package/assets/esri/core/workers/chunks/5f2e246ffcbdedea4de5.js +0 -1
  732. package/assets/esri/core/workers/chunks/5ff41f43e57be0557541.js +0 -1414
  733. package/assets/esri/core/workers/chunks/6b32b3f98872771ff81e.js +0 -1
  734. package/assets/esri/core/workers/chunks/6be9d00839002f24fafd.js +0 -1
  735. package/assets/esri/core/workers/chunks/6c72dbd5275bffde1583.js +0 -1
  736. package/assets/esri/core/workers/chunks/6c886f19875291d02407.js +0 -1
  737. package/assets/esri/core/workers/chunks/75f7c1f600c4051bc905.js +0 -1
  738. package/assets/esri/core/workers/chunks/77f6659e400064d38130.js +0 -1
  739. package/assets/esri/core/workers/chunks/78c7eace6ec3fa5c7413.js +0 -1
  740. package/assets/esri/core/workers/chunks/7cee28575fd57430cf02.js +0 -1
  741. package/assets/esri/core/workers/chunks/82e0691995d821137d5f.js +0 -1
  742. package/assets/esri/core/workers/chunks/8435b6bf356959009b76.js +0 -1
  743. package/assets/esri/core/workers/chunks/8677865189081e0b83bc.js +0 -1
  744. package/assets/esri/core/workers/chunks/86f70bd786d6d57fde69.js +0 -1
  745. package/assets/esri/core/workers/chunks/8878ab87ef7961fafae8.js +0 -1
  746. package/assets/esri/core/workers/chunks/8a893f23827769d42092.js +0 -1
  747. package/assets/esri/core/workers/chunks/8d1d0c3f0532aa98487d.js +0 -1
  748. package/assets/esri/core/workers/chunks/8e68b4628e9616356c34.js +0 -1
  749. package/assets/esri/core/workers/chunks/8edae79554843dd77ada.js +0 -1
  750. package/assets/esri/core/workers/chunks/9032c040b214b5af775b.js +0 -1
  751. package/assets/esri/core/workers/chunks/909ef35fa33be2b6da41.js +0 -1
  752. package/assets/esri/core/workers/chunks/90b7acc70adba193b215.js +0 -1
  753. package/assets/esri/core/workers/chunks/91718795fc4ca6516ac7.js +0 -1
  754. package/assets/esri/core/workers/chunks/92d4e962284e13ba2fc5.js +0 -1
  755. package/assets/esri/core/workers/chunks/94f80c46ccf5e19038b8.js +0 -1
  756. package/assets/esri/core/workers/chunks/979c2f52b6d6e1e8241b.js +0 -1
  757. package/assets/esri/core/workers/chunks/97f10efb0fe05bedcebd.js +0 -1
  758. package/assets/esri/core/workers/chunks/98f5bf1b91f3696b2fce.js +0 -1
  759. package/assets/esri/core/workers/chunks/9c52d4b54dfdb69dee29.js +0 -1
  760. package/assets/esri/core/workers/chunks/9de8149ae0a0726a4ab2.js +0 -1
  761. package/assets/esri/core/workers/chunks/9def5d17b94e5db71883.js +0 -1
  762. package/assets/esri/core/workers/chunks/9f272445c285ee9abb7b.js +0 -1
  763. package/assets/esri/core/workers/chunks/a10be7eb05a007fff1ed.js +0 -1
  764. package/assets/esri/core/workers/chunks/a32c87b89567a9fd1efc.js +0 -1
  765. package/assets/esri/core/workers/chunks/a3b29eca5807978fb2a3.js +0 -1
  766. package/assets/esri/core/workers/chunks/a446dff865332268625a.js +0 -1
  767. package/assets/esri/core/workers/chunks/a5bf2718c02a0e645013.js +0 -1
  768. package/assets/esri/core/workers/chunks/a6d166058e3025bb280e.js +0 -1
  769. package/assets/esri/core/workers/chunks/a8e111a5cfd6151d5dbb.js +0 -1
  770. package/assets/esri/core/workers/chunks/aed45f7e7eee154a21b8.js +0 -1
  771. package/assets/esri/core/workers/chunks/af3bd661b355eed3da21.js +0 -1
  772. package/assets/esri/core/workers/chunks/b0f2ce61d3cad413898e.js +0 -1
  773. package/assets/esri/core/workers/chunks/b2b77598048818c957b7.js +0 -1
  774. package/assets/esri/core/workers/chunks/b744b950999b92393e37.js +0 -1
  775. package/assets/esri/core/workers/chunks/b75165880704efccc47c.js +0 -1
  776. package/assets/esri/core/workers/chunks/ba9e107edc2027238be3.js +0 -1
  777. package/assets/esri/core/workers/chunks/bc3b22dc08c147b8d425.js +0 -1
  778. package/assets/esri/core/workers/chunks/c08e9914deb1dc62bc0f.js +0 -1
  779. package/assets/esri/core/workers/chunks/c0bb53d8d58ad18334d3.js +0 -1
  780. package/assets/esri/core/workers/chunks/c0d453f93af2d4a6ce64.js +0 -1
  781. package/assets/esri/core/workers/chunks/c9a42d86185a0ad35dd1.js +0 -1
  782. package/assets/esri/core/workers/chunks/cbb50415f7de8746ee1a.js +0 -1
  783. package/assets/esri/core/workers/chunks/d23dd7da45a7aa341540.js +0 -1
  784. package/assets/esri/core/workers/chunks/d2801df3fa44dee15ec8.js +0 -1
  785. package/assets/esri/core/workers/chunks/d53b31c9056f82831bc0.js +0 -1
  786. package/assets/esri/core/workers/chunks/d626e08d23330d84413b.js +0 -1
  787. package/assets/esri/core/workers/chunks/db6e03fe8dd316f5005f.js +0 -1
  788. package/assets/esri/core/workers/chunks/de79645e559a2d1ffa67.js +0 -1
  789. package/assets/esri/core/workers/chunks/e2779965db231fb666a5.js +0 -1
  790. package/assets/esri/core/workers/chunks/e4e2f059c52674dcae5b.js +0 -1
  791. package/assets/esri/core/workers/chunks/ec21311584e4fb13e510.js +0 -1
  792. package/assets/esri/core/workers/chunks/eca45cd479f7fd28ca6e.js +0 -1
  793. package/assets/esri/core/workers/chunks/ee8cd91c27e9cdfc3b2e.js +0 -1
  794. package/assets/esri/core/workers/chunks/efdd75896ca53eb6242f.js +0 -1
  795. package/assets/esri/core/workers/chunks/f1c348cf2a1e35da9b20.js +0 -1
  796. package/assets/esri/core/workers/chunks/f4053e4e2d6e678db48a.js +0 -1
  797. package/assets/esri/core/workers/chunks/f4d577ff61da7964e08a.js +0 -1
  798. package/assets/esri/core/workers/chunks/f7da652f8dab57677cc3.js +0 -1
  799. package/assets/esri/core/workers/chunks/fe92f54e45fd21ccd75f.js +0 -1
  800. package/assets/esri/core/workers/chunks/fee1d873127dca02459f.js +0 -1
  801. package/assets/esri/core/workers/chunks/ff31936236dd9b1acb24.js +0 -1
  802. /package/assets/esri/core/workers/chunks/{32e9e92bbbd000fbbaf7.js.LICENSE.txt → 4141a3a93732996601e8.js.LICENSE.txt} +0 -0
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{createTask as t}from"../../core/asyncUtils.js";import s from"../../core/Collection.js";import r from"../../core/Error.js";import{EventedAccessor as i}from"../../core/Evented.js";import a from"../../core/Logger.js";import{abortMaybe as o}from"../../core/maybe.js";import{throwIfAborted as n,isAbortError as p}from"../../core/promiseUtils.js";import l from"../../core/ReactiveMap.js";import{on as u,watch as h,sync as m,whenOnce as d}from"../../core/reactiveUtils.js";import{property as c,subclass as f}from"../../core/accessorSupport/decorators.js";import{UpdatingHandles as y}from"../../core/support/UpdatingHandles.js";import v from"../../geometry/SpatialReference.js";import{system as g}from"../../time/constants.js";import{createReactiveGraphic as F}from"./batchAttributeFormUtils.js";import{ArcadeExecutorProvider as _}from"./expressions/ArcadeExecutorProvider.js";import{ExpressionsManager as x}from"./expressions/ExpressionsManager.js";import{ExpressionsModel as w}from"./expressions/ExpressionsModel.js";import I from"./inputs/BatchFormInputs.js";import{createBatchFormInputsFromBatchFormTemplate as b}from"./inputs/support/createBatchFormInputs.js";import{isGroupInput as M,isFieldInput as A}from"./inputs/support/inputUtils.js";import E from"./templates/BatchFormTemplate.js";import{getLayerContingentValuesMetaData as k}from"./templates/support/contingentValuesUtils.js";import{createBatchFormTemplate as T}from"./templates/support/createBatchFormTemplate.js";import{isExcludedFromSharedForm as C,isGroupElementTemplate as V}from"./templates/support/templateUtils.js";function j(e,t){return e?.find(e=>e.layer===t)}let H=class extends i{constructor(e){super(e),this.activeFeatureIndex=-1,this.disabled=!1,this.editType="NA",this.features=new s,this._hasAsyncArcadeExpressions=!1,this.maximumFeatureCount=2e3,this.maximumFeatureCountWithComplexForms=50,this.map=null,this.readOnly=!1,this.spatialReference=null,this.submitHasBeenAttempted=!1,this.timeZone=null,this.userHasChangedValues=!1,this.layerInfos=null,this._arcadeExecutorProvider=new _,this._activeFormInputsByElementId=new Map,this._emptyForm=new I({inputs:[]}),this._emptyFormTemplate=new E({elements:[]}),this._featureFormMap=new Map,this._prepareTask=null,this._reactiveGraphicLookup=new l,this._updatingHandles=new y,this._layerTemplateMap=new l,this._layerContingentValuesMap=new l,this._workingFeatures=new s,this._expressionsManager=new x({arcadeContext:{editType:"NA",spatialReference:null,map:null,timeZone:g}}),this.sharedForm=this._emptyForm,this.sharedFormTemplate=this._emptyFormTemplate}initialize(){this.addHandles([u(()=>this.features,"after-changes",()=>this._prepare(),{sync:!0}),h(()=>[this.features,this.map,this.timeZone,this.editType],()=>this._prepare(),m),h(()=>this.activeForm,()=>this._activeFormInputsByElementId.clear(),m)]),this._prepare()}destroy(){this._prepareTask=o(this._prepareTask),this._workingFeatures.destroyAll(),this._expressionsManager&&this._expressionsManager.abort(),this._updatingHandles.destroy(),this._reactiveGraphicLookup=new l,this._emptyForm.destroy(),this._emptyFormTemplate.destroy()}get _effectiveTimeZone(){return this.timeZone??"system"}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 calculating(){return this._expressionsManager.calculating}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(){for(const e of this.layers){const t=this._layerContingentValuesMap.get(e);if(t&&t.size>0)return!0}return!1}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 status(){const e=this._prepareTask;return null==e?"not-loaded":e.finished?null!=e.error?"failed":"loaded":"loading"}get submittable(){return this.valid,!0}get updating(){return this._updatingHandles.updating||this.calculating}get valid(){return this.sharedForm.valid}get layers(){const e=new Set;return this.features.forEach(t=>{const s=t.sourceLayer??t.layer;e.add(s)}),Array.from(e)}get mode(){return this.activeFeatureIndex>-1?"single":"batch"}submit(){this.submitHasBeenAttempted=!0,this.emit("submit",{name:"submit",results:this._makeSubmitResults(),valid:this.valid})}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(M(e)){const t=e.inputs.find(e=>A(e)&&!e.valid);if(t)return{input:t,groupInput:e}}if(A(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 r("feature-not-found","The given feature is not present in the BatchAttributeForm");return{...t.attributes}}notifyGeometriesChanged(e){const t=[];for(const s of e){const e=this._reactiveGraphicLookup.get(s);e&&(t.push(e),e.geometry=s.geometry)}this._expressionsManager.runGeometryDependentExpressions(t)}async setFieldInputValue(e,t){const s=new Set(this.invalidFeatures);await e.setValueFromUser(t),this.userHasChangedValues=!0,this._trackValidityChange(s),this.emit("value-change",{features:e.features.toArray().map(e=>e.source),fieldName:e.fieldName,name:"value-change",value:t})}async setValue(e,t){const s=this.findFieldInput(e);if(null==s)throw new r("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)}userChangesHaveMadeFeatureInvalid(e){return!!this._reactiveGraphicLookup.get(e)?.userChangesHaveMadeInvalid}async _trackValidityChange(e){await d(()=>!1===this.calculating);const t=this.invalidFeatures;for(const s of t)!1===e.has(s)&&this._reactiveGraphicLookup.has(s)&&(this._reactiveGraphicLookup.get(s).userChangesHaveMadeInvalid=!0)}validate(){return!1}_makeBatchFormInputsForFeature(e){const t=this._layerTemplateMap.get(e.layer);return t?b(t,new s([e]),this._expressionsManager):this._emptyForm}_makeSubmitResults(){const e=new Map;for(const[t,s]of this._reactiveGraphicLookup)e.set(t,{feature:t,values:{...s.attributes},invalidFields:[]});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())}_prepare(){this._hasAsyncArcadeExpressions=!1,this._prepareTask=o(this._prepareTask),this._updateWorkingFeatures(),o(this._expressionsManager),this.userHasChangedValues=!1,this._expressionsManager=new x({arcadeContext:{editType:this.editType,spatialReference:this.spatialReference??v.WebMercator,map:this.map,timeZone:this._effectiveTimeZone}});const{layers:e}=this;if(0===e.length)return;const s=t(async t=>{try{n(t);const s=new Map;for(const r of e){const e=await k(r);if(n(t),e){const t=e.fieldGroups.flatMap(e=>e.fields);this._layerContingentValuesMap.set(r,new Set(t))}else this._layerContingentValuesMap.set(r,new Set);const i=j(this.layerInfos,r),a=await T(r,{arcadeExecutorProvider:this._arcadeExecutorProvider,formTimeZone:this._effectiveTimeZone},i?.formTemplate);n(t),this._layerTemplateMap.set(r,a);const o=a.getExpressionExecutorsForLayer(r);if(this._expressionsManager.layerExpressionsModelMap.set(r,new w({preserveFieldValuesWhenHidden:a.preserveFieldValuesWhenHidden,executorMap:o})),!this._hasAsyncArcadeExpressions)for(const t of o.keys()){const e=o.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 a.elements){if(C(t))continue;const e=t.clone();V(e)&&(e.elements=e.elements.filter(e=>!C(e)));const{elementId:r}=e;s.has(r)?s.get(r).foldIn(e):s.set(r,e)}}if(this.hasTooManyComplexFeatures)throw new r("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 r("too-many-features","There are too many features to load into the form.");const i=new E({elements:Array.from(s.values())});this.sharedFormTemplate=i,this.sharedForm=b(i,this._workingFeatures,this._expressionsManager),await this._expressionsManager.runAllExpressions(this._workingFeatures.toArray())}catch(s){throw p(s)||a.getLogger(this).error("Failed preparing form",s),s}});this._updatingHandles.consumePromise(s.promise),this._prepareTask=s}_updateWorkingFeatures(){this._workingFeatures.destroyAll();const{features:e}=this;if(this._reactiveGraphicLookup=new l,0!==e.length){this._workingFeatures.addMany(e.map(F));for(const e of this._workingFeatures)this._reactiveGraphicLookup.set(e.source,e)}}};e([c()],H.prototype,"_effectiveTimeZone",null),e([c({readOnly:!0})],H.prototype,"activeFeature",null),e([c()],H.prototype,"activeFeatureIndex",void 0),e([c({readOnly:!0})],H.prototype,"activeForm",null),e([c()],H.prototype,"disabled",void 0),e([c()],H.prototype,"calculating",null),e([c()],H.prototype,"editType",void 0),e([c()],H.prototype,"features",void 0),e([c()],H.prototype,"expressionEvaluationFailed",null),e([c()],H.prototype,"hasNonActiveInvalidFeatures",null),e([c()],H.prototype,"hasAsyncArcadeExpressions",null),e([c()],H.prototype,"_hasAsyncArcadeExpressions",void 0),e([c()],H.prototype,"invalidFeatures",null),e([c()],H.prototype,"hasVisibleInputs",null),e([c()],H.prototype,"hasLayersWithContingentValues",null),e([c()],H.prototype,"maximumFeatureCount",void 0),e([c()],H.prototype,"maximumFeatureCountWithComplexForms",void 0),e([c()],H.prototype,"visibleInputs",null),e([c()],H.prototype,"map",void 0),e([c()],H.prototype,"noVisibleElementsReason",null),e([c()],H.prototype,"readOnly",void 0),e([c()],H.prototype,"spatialReference",void 0),e([c()],H.prototype,"submitHasBeenAttempted",void 0),e([c()],H.prototype,"timeZone",void 0),e([c()],H.prototype,"updating",null),e([c()],H.prototype,"valid",null),e([c()],H.prototype,"layers",null),e([c()],H.prototype,"mode",null),e([c()],H.prototype,"sharedForm",void 0),e([c()],H.prototype,"sharedFormTemplate",void 0),e([c()],H.prototype,"userHasChangedValues",void 0),e([c()],H.prototype,"layerInfos",void 0),e([c()],H.prototype,"_arcadeExecutorProvider",void 0),e([c()],H.prototype,"_prepareTask",void 0),e([c()],H.prototype,"_reactiveGraphicLookup",void 0),e([c()],H.prototype,"_layerTemplateMap",void 0),e([c()],H.prototype,"_layerContingentValuesMap",void 0),e([c()],H.prototype,"_workingFeatures",void 0),e([c()],H.prototype,"_expressionsManager",void 0),H=e([f("esri.widgets.BatchAttributeForm.BatchAttributeFormViewModel")],H);const L=H;export{L as default};
2
+ import{__decorate as e}from"tslib";import{createTask as t}from"../../core/asyncUtils.js";import s from"../../core/Collection.js";import r from"../../core/Error.js";import{EventedAccessor as i}from"../../core/Evented.js";import a from"../../core/Logger.js";import{abortMaybe as o,destroyMaybe as n}from"../../core/maybe.js";import{throwIfAborted as p,isAbortError as l}from"../../core/promiseUtils.js";import u from"../../core/ReactiveMap.js";import{on as h,sync as m,watch as d,whenOnce as c}from"../../core/reactiveUtils.js";import{property as f,subclass as y}from"../../core/accessorSupport/decorators.js";import{UpdatingHandles as v}from"../../core/support/UpdatingHandles.js";import g from"../../geometry/SpatialReference.js";import{system as F}from"../../time/constants.js";import{createReactiveGraphic as _}from"./batchAttributeFormUtils.js";import{ArcadeExecutorProvider as x}from"./expressions/ArcadeExecutorProvider.js";import{ExpressionsManager as w}from"./expressions/ExpressionsManager.js";import{ExpressionsModel as I}from"./expressions/ExpressionsModel.js";import b from"./inputs/BatchFormInputs.js";import{createBatchFormInputsFromBatchFormTemplate as M}from"./inputs/support/createBatchFormInputs.js";import{isGroupInput as A,isFieldInput as E}from"./inputs/support/inputUtils.js";import k from"./templates/BatchFormTemplate.js";import{getLayerContingentValuesMetaData as T}from"./templates/support/contingentValuesUtils.js";import{createBatchFormTemplate as C}from"./templates/support/createBatchFormTemplate.js";import{isExcludedFromSharedForm as V,isGroupElementTemplate as j}from"./templates/support/templateUtils.js";function H(e,t){return e?.find(e=>e.layer===t)}let L=class extends i{constructor(e){super(e),this.activeFeatureIndex=-1,this.disabled=!1,this.editType="NA",this.features=new s,this._hasAsyncArcadeExpressions=!1,this.maximumFeatureCount=2e3,this.maximumFeatureCountWithComplexForms=50,this.map=null,this.readOnly=!1,this.spatialReference=null,this.submitHasBeenAttempted=!1,this.timeZone=null,this.userHasChangedValues=!1,this.layerInfos=null,this._arcadeExecutorProvider=new x,this._activeFormInputsByElementId=new Map,this._emptyForm=new b({inputs:[]}),this._emptyFormTemplate=new k({elements:[]}),this._featureFormMap=new Map,this._prepareTask=null,this._reactiveGraphicLookup=new u,this._updatingHandles=new v,this._layerTemplateMap=new u,this._layerContingentValuesMap=new u,this._workingFeatures=new s,this._expressionsManager=new w({arcadeContext:{editType:"NA",spatialReference:null,map:null,timeZone:F}}),this.sharedForm=this._emptyForm,this.sharedFormTemplate=this._emptyFormTemplate}initialize(){this.addHandles([h(()=>this.features,"after-changes",()=>{this.notifyChange("layers"),this._prepare()},m),d(()=>[this.features,this.map,this.timeZone,this.editType],()=>this._prepare(),m),d(()=>this.activeForm,()=>this._activeFormInputsByElementId.clear(),m)]),this._prepare()}destroy(){this._prepareTask=o(this._prepareTask),this._workingFeatures.destroyAll(),n(this._expressionsManager),this._updatingHandles.destroy(),this._reactiveGraphicLookup=new u,this._emptyForm.destroy(),this._emptyFormTemplate.destroy()}get _effectiveTimeZone(){return this.timeZone??"system"}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 calculating(){return this._expressionsManager.calculating}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(){for(const e of this.layers){const t=this._layerContingentValuesMap.get(e);if(t&&t.size>0)return!0}return!1}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 status(){const e=this._prepareTask;return null==e?"not-loaded":e.finished?null!=e.error?"failed":"loaded":"loading"}get submittable(){return this.valid,!0}get updating(){return this._updatingHandles.updating||this.calculating}get valid(){return this.sharedForm.valid}get layers(){const e=new Set;return this.features.forEach(t=>{const s=t.sourceLayer??t.layer;e.add(s)}),Array.from(e)}get mode(){return this.activeFeatureIndex>-1?"single":"batch"}submit(){this.submitHasBeenAttempted=!0,this.emit("submit",{name:"submit",results:this._makeSubmitResults(),valid:this.valid})}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(A(e)){const t=e.inputs.find(e=>E(e)&&!e.valid);if(t)return{input:t,groupInput:e}}if(E(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 r("feature-not-found","The given feature is not present in the BatchAttributeForm");return{...t.attributes}}notifyGeometriesChanged(e){const t=[];for(const s of e){const e=this._reactiveGraphicLookup.get(s);e&&(t.push(e),e.geometry=s.geometry)}this._expressionsManager.runGeometryDependentExpressions(t)}async setFieldInputValue(e,t){const s=new Set(this.invalidFeatures);await e.setValueFromUser(t),this.userHasChangedValues=!0,this._trackValidityChange(s),this.emit("value-change",{features:e.features.toArray().map(e=>e.source),fieldName:e.fieldName,name:"value-change",value:t})}async setValue(e,t){const s=this.findFieldInput(e);if(null==s)throw new r("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)}userChangesHaveMadeFeatureInvalid(e){return!!this._reactiveGraphicLookup.get(e)?.userChangesHaveMadeInvalid}async _trackValidityChange(e){await c(()=>!1===this.calculating);const t=this.invalidFeatures;for(const s of t)!1===e.has(s)&&this._reactiveGraphicLookup.has(s)&&(this._reactiveGraphicLookup.get(s).userChangesHaveMadeInvalid=!0)}validate(){return!1}_makeBatchFormInputsForFeature(e){const t=this._layerTemplateMap.get(e.layer);return t?M(t,new s([e]),this._expressionsManager):this._emptyForm}_makeSubmitResults(){const e=new Map;for(const[t,s]of this._reactiveGraphicLookup)e.set(t,{feature:t,values:{...s.attributes},invalidFields:[]});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())}_prepare(){this._hasAsyncArcadeExpressions=!1,this._prepareTask=o(this._prepareTask),this._updateWorkingFeatures(),n(this._expressionsManager),this.userHasChangedValues=!1,this._expressionsManager=new w({arcadeContext:{editType:this.editType,spatialReference:this.spatialReference??g.WebMercator,map:this.map,timeZone:this._effectiveTimeZone}});const{layers:e}=this;if(0===e.length)return;const s=t(async t=>{try{p(t);const s=new Map;for(const r of e){const e=await T(r);if(p(t),e){const t=e.fieldGroups.flatMap(e=>e.fields);this._layerContingentValuesMap.set(r,new Set(t))}else this._layerContingentValuesMap.set(r,new Set);const i=H(this.layerInfos,r),a=await C(r,{arcadeExecutorProvider:this._arcadeExecutorProvider,formTimeZone:this._effectiveTimeZone},i?.formTemplate);p(t),this._layerTemplateMap.set(r,a);const o=a.getExpressionExecutorsForLayer(r);if(this._expressionsManager.layerExpressionsModelMap.set(r,new I({preserveFieldValuesWhenHidden:a.preserveFieldValuesWhenHidden,executorMap:o})),!this._hasAsyncArcadeExpressions)for(const t of o.keys()){const e=o.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 a.elements){if(V(t))continue;const e=t.clone();j(e)&&(e.elements=e.elements.filter(e=>!V(e)));const{elementId:r}=e;s.has(r)?s.get(r).foldIn(e):s.set(r,e)}}if(this.hasTooManyComplexFeatures)throw new r("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 r("too-many-features","There are too many features to load into the form.");const i=new k({elements:Array.from(s.values())});this.sharedFormTemplate=i,this.sharedForm=M(i,this._workingFeatures,this._expressionsManager),await this._expressionsManager.runAllExpressions(this._workingFeatures.toArray())}catch(s){throw l(s)||a.getLogger(this).error("Failed preparing form",s),s}});this._updatingHandles.consumePromise(s.promise),this._prepareTask=s}_updateWorkingFeatures(){this._workingFeatures.destroyAll();const{features:e}=this;if(this._reactiveGraphicLookup=new u,0!==e.length){this._workingFeatures.addMany(e.map(_));for(const e of this._workingFeatures)this._reactiveGraphicLookup.set(e.source,e)}}};e([f()],L.prototype,"_effectiveTimeZone",null),e([f({readOnly:!0})],L.prototype,"activeFeature",null),e([f()],L.prototype,"activeFeatureIndex",void 0),e([f({readOnly:!0})],L.prototype,"activeForm",null),e([f()],L.prototype,"disabled",void 0),e([f()],L.prototype,"calculating",null),e([f()],L.prototype,"editType",void 0),e([f()],L.prototype,"features",void 0),e([f()],L.prototype,"expressionEvaluationFailed",null),e([f()],L.prototype,"hasNonActiveInvalidFeatures",null),e([f()],L.prototype,"hasAsyncArcadeExpressions",null),e([f()],L.prototype,"_hasAsyncArcadeExpressions",void 0),e([f()],L.prototype,"invalidFeatures",null),e([f()],L.prototype,"hasVisibleInputs",null),e([f()],L.prototype,"hasLayersWithContingentValues",null),e([f()],L.prototype,"maximumFeatureCount",void 0),e([f()],L.prototype,"maximumFeatureCountWithComplexForms",void 0),e([f()],L.prototype,"visibleInputs",null),e([f()],L.prototype,"map",void 0),e([f()],L.prototype,"noVisibleElementsReason",null),e([f()],L.prototype,"readOnly",void 0),e([f()],L.prototype,"spatialReference",void 0),e([f()],L.prototype,"submitHasBeenAttempted",void 0),e([f()],L.prototype,"timeZone",void 0),e([f()],L.prototype,"updating",null),e([f()],L.prototype,"valid",null),e([f()],L.prototype,"layers",null),e([f()],L.prototype,"mode",null),e([f()],L.prototype,"sharedForm",void 0),e([f()],L.prototype,"sharedFormTemplate",void 0),e([f()],L.prototype,"userHasChangedValues",void 0),e([f()],L.prototype,"layerInfos",void 0),e([f()],L.prototype,"_arcadeExecutorProvider",void 0),e([f()],L.prototype,"_prepareTask",void 0),e([f()],L.prototype,"_reactiveGraphicLookup",void 0),e([f()],L.prototype,"_layerTemplateMap",void 0),e([f()],L.prototype,"_layerContingentValuesMap",void 0),e([f()],L.prototype,"_workingFeatures",void 0),e([f()],L.prototype,"_expressionsManager",void 0),L=e([y("esri.widgets.BatchAttributeForm.BatchAttributeFormViewModel")],L);const B=L;export{B as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../../../core/Accessor.js";import r from"../../../core/Error.js";import a from"../../../core/Logger.js";import{getOrCreateMapValue as s}from"../../../core/MapUtils.js";import{whenOrAbort as o}from"../../../core/promiseUtils.js";import i from"../../../core/ReactiveMap.js";import{property as n,subclass as l}from"../../../core/accessorSupport/decorators.js";import{DateOnly as u}from"../../../core/sql/DateOnly.js";import{TimeOnly as c}from"../../../core/sql/TimeOnly.js";import{makeUseId as p}from"../inputs/support/inputUtils.js";import{isGroupElementTemplate as d,isFieldElementTemplate as f}from"../templates/support/templateUtils.js";let h=null,m=class extends t{constructor(e){super(e),this.calculating=!1,this.arcadeContext=null,this._abortController=new AbortController,this.layerExpressionsModelMap=new Map,this.evaluatedExpressions=new i,this.expressionEvaluationFailed=!1}abort(){this._abortController.abort()}async runAllExpressions(e,t=!1){return this._evaluateSpecifiedComponentsForEachFeature(e,v,t)}async runGeometryDependentExpressions(e,t=!1){return this._evaluateSpecifiedComponentsForEachFeature(e,x,t)}async valueChanged(e,t,r=!0){try{this.calculating=!0;const a=t.map(t=>this.evaluateValueChangedForFeature(e,t,r));await Promise.all(a)}catch(s){a.getLogger(this).error(s),this.expressionEvaluationFailed=!0}finally{this.calculating=!1}}async evaluateValueChangedForFeature(e,t,r){if(this._abortController.signal.aborted)return;const a=this.layerExpressionsModelMap.get(t.layer);if(!a||0===a.components.length)return;const s=new Set,o=new Set([e]),i=new Set;for(;o.size>0;){const[e]=o;if(o.delete(e),s.has(e))continue;s.add(e);const n=a.fieldReferencesMap.get(e.toLowerCase());if(!n)continue;for(const t of n)i.has(t)&&n.delete(t);if(0===n.size)continue;const l=new Set;await this.evaluateAffectedComponents([...n],t,a,r,l);for(const t of n)i.add(t);for(const t of l)s.has(t)||o.add(t)}}async evaluateAffectedComponents(e,t,r,a,s){const o=new Map;for(const n of e)o.has(n)||o.set(n,this.createSccEvaluator(n,t,o,r));if(0===o.size)return;const i=[...o.values()].map(e=>e.evaluate(a,s));await Promise.all(i)}createSccEvaluator(e,t,r,a){const o=new g(e,t,this.arcadeContext,a,this.evaluatedExpressions,this._abortController);for(const i of e.adjacencyList)o.dependentEvaluators.push(s(r,i,()=>this.createSccEvaluator(i,t,r,a)));return o}async _evaluateSpecifiedComponentsForEachFeature(e,t,r=!1){this.calculating=!0;try{const a=[];for(const s of e){const e=this.layerExpressionsModelMap.get(s.layer);if(!e||0===e.components.length)continue;const o=new Set;a.push(this.evaluateAffectedComponents(t(e),s,e,r,o))}await o(Promise.all(a),this._abortController)}catch(s){a.getLogger(this).error(s),this.expressionEvaluationFailed=!0}finally{this.calculating=!1}}};e([n()],m.prototype,"calculating",void 0),e([n({constructOnly:!0})],m.prototype,"arcadeContext",void 0),e([n()],m.prototype,"_abortController",void 0),e([n()],m.prototype,"layerExpressionsModelMap",void 0),e([n()],m.prototype,"evaluatedExpressions",void 0),e([n()],m.prototype,"expressionEvaluationFailed",void 0),m=e([l("esri.widgets.BatchAttributeForm.expressions.ExpressionsManager")],m);class g{constructor(e,t,r,a,s,o){this.scc=e,this.feature=t,this.arcadeContextInfo=r,this.expressionsModel=a,this.evaluatedExpressions=s,this._abortController=o,this.dependentEvaluators=[],this._evaluatorPromise=null}get baseContext(){const{editType:e,map:t,spatialReference:r,timeZone:a}=this.arcadeContextInfo,s=this.feature.layer,o="scene"===s?.type&&null!=s.associatedLayer?s.associatedLayer:s;return{variables:{$originalfeature:this.feature.original,$editcontext:{editType:e},$layer:o,$featureset:o,$datastore:o?.url,$feature:this.feature.plainGraphic,$map:t},executeContext:{rawOutput:!0,spatialReference:r??void 0,timeZone:a,abortSignal:this._abortController.signal}}}evaluate(e,t){return null==this._evaluatorPromise&&(this._evaluatorPromise=this._evaluate(e,t)),this._evaluatorPromise}async _evaluate(e,t){null===h&&(h=await import("../../../arcade/languageUtils.js"));const a=this.dependentEvaluators.map(r=>r.evaluate(e,t));await o(Promise.all(a),this._abortController);for(const o of this.scc.executors){const a=this.baseContext;if(this._abortController.signal.aborted)break;const l=this.expressionsModel.arcadeExecutorUses.get(o)??[],u=s(this.evaluatedExpressions,this.feature,()=>new i);let c=null,h=null;try{c=o.isAsync?await o.executeAsync(a.variables,a.executeContext):o.execute(a.variables,a.executeContext),h={result:c,status:"success"}}catch(n){h={error:n,status:"error"}}for(const r of l){const a=this.expressionsModel.elementTemplateMap.get(r.elementId);switch(r.executorPurpose){case"editable":case"required":case"text":u.set(p(r),h);break;case"value":{if("error"===h?.status)continue;const e=a.getExpressionExecutorsForLayer(this.feature.layer);let r=!0;if(e?.editableExpression&&(r=!1===u.get(p({elementId:a.elementId,executorPurpose:"editable"}))?.result),r){const e=this.feature.getAttribute(a.fieldName)??null,r=y(h.result,this.feature,a.fieldName,this.arcadeContextInfo.timeZone);r!==e&&(this.feature.setAttribute(a.fieldName,r),t.add(a.fieldName))}}break;case"visibility":if(u.set(p(r),h),!this.expressionsModel.preserveFieldValuesWhenHidden&&!1===h.result&&e)if(d(a)){for(const e of a.elements)if(f(e)){null!==this.feature.getAttribute(e.fieldName)&&t.add(e.fieldName),this.feature.setAttribute(e.fieldName,null)}}else if(f(a)){null!==this.feature.getAttribute(a.fieldName)&&t.add(a.fieldName),this.feature.setAttribute(a.fieldName,null)}}}if("error"===h?.status){const e=new Set;for(const t of l){const r=this.expressionsModel.elementTemplateMap.get(t.elementId);if(r)switch(t.executorPurpose){case"editable":e.add(r.label+" - Editable expression");break;case"required":e.add(r.label+" - Required expression");break;case"value":e.add(r.label+" - Value expression");break;case"visibility":e.add(r.label+" - Visibility expression")}}if(e.size>0)throw new r("expression-evaluation-failed","Arcade evaluation failed ("+[...e].join(",")+")");throw new r("expression-evaluation-failed","Arcade evaluation failed ")}}}}function y(e,t,a,s){if(null===e)return null;const o=t.layer.fieldsIndex.get(a);if(!o)throw new r("field-not-found","Unable set field value as the field cannot be found. ("+a+")");switch(o.type){case"big-integer":case"integer":case"long":case"oid":case"small-integer":case"single":case"double":return h.toNumber(e);case"global-id":case"guid":case"string":return h.toString(e);case"date":{if(h.isDate(e))return e.getTime();const t=h.toDate(e,s);if(!t)throw new r("unsupported-value-type","Arcade return type is not a supported field type. ("+a+")");return t.getTime()}case"date-only":{if(h.isDateOnly(e))return e.toStorageFormat();if(h.isDate(e))return u.fromDateTime(e.toDateTime()).toStorageFormat();const t=u.fromString(h.toString(e));if(!t)throw new r("unsupported-value-type","Arcade return type is not a supported field type.");return t.toStorageFormat()}case"time-only":{if(h.isTime(e))return e.toStorageString();if(h.isDate(e)){return c.fromDateTime(e.toDateTime()).toStorageString()}const t=c.fromString(h.toString(e));if(!t)throw new r("unsupported-value-type","Arcade return type is not a supported field type.");return t.toStorageString()}case"timestamp-offset":{if(h.isDate(e))return e.toISOString(!1);const t=h.toDate(e,s);if(!t)throw new r("unsupported-value-type","Arcade return type is not a supported field type. ("+a+")");return t.toISOString(!1)}}throw new r("unsupported-value-type","Arcade return type is not a supported field type. ("+a+")")}function v(e){return e.components}function x(e){return Array.from(e.geometryReferences)}export{m as ExpressionsManager};
2
+ import{__decorate as e}from"tslib";import t from"../../../core/Accessor.js";import r from"../../../core/Error.js";import a from"../../../core/Logger.js";import{getOrCreateMapValue as s}from"../../../core/MapUtils.js";import{whenOrAbort as o}from"../../../core/promiseUtils.js";import i from"../../../core/ReactiveMap.js";import{property as n,subclass as l}from"../../../core/accessorSupport/decorators.js";import{DateOnly as u}from"../../../core/sql/DateOnly.js";import{TimeOnly as c}from"../../../core/sql/TimeOnly.js";import{makeUseId as p}from"../inputs/support/inputUtils.js";import{isGroupElementTemplate as d,isFieldElementTemplate as f}from"../templates/support/templateUtils.js";let h=null,m=class extends t{constructor(e){super(e),this.calculating=!1,this.arcadeContext=null,this._abortController=new AbortController,this.layerExpressionsModelMap=new Map,this.evaluatedExpressions=new i,this.expressionEvaluationFailed=!1}destroy(){this.abort()}abort(){this._abortController.abort()}async runAllExpressions(e,t=!1){return this._evaluateSpecifiedComponentsForEachFeature(e,v,t)}async runGeometryDependentExpressions(e,t=!1){return this._evaluateSpecifiedComponentsForEachFeature(e,x,t)}async valueChanged(e,t,r=!0){try{this.calculating=!0;const a=t.map(t=>this.evaluateValueChangedForFeature(e,t,r));await Promise.all(a)}catch(s){a.getLogger(this).error(s),this.expressionEvaluationFailed=!0}finally{this.calculating=!1}}async evaluateValueChangedForFeature(e,t,r){if(this._abortController.signal.aborted)return;const a=this.layerExpressionsModelMap.get(t.layer);if(!a||0===a.components.length)return;const s=new Set,o=new Set([e]),i=new Set;for(;o.size>0;){const[e]=o;if(o.delete(e),s.has(e))continue;s.add(e);const n=a.fieldReferencesMap.get(e.toLowerCase());if(!n)continue;for(const t of n)i.has(t)&&n.delete(t);if(0===n.size)continue;const l=new Set;await this.evaluateAffectedComponents([...n],t,a,r,l);for(const t of n)i.add(t);for(const t of l)s.has(t)||o.add(t)}}async evaluateAffectedComponents(e,t,r,a,s){const o=new Map;for(const n of e)o.has(n)||o.set(n,this.createSccEvaluator(n,t,o,r));if(0===o.size)return;const i=[...o.values()].map(e=>e.evaluate(a,s));await Promise.all(i)}createSccEvaluator(e,t,r,a){const o=new g(e,t,this.arcadeContext,a,this.evaluatedExpressions,this._abortController);for(const i of e.adjacencyList)o.dependentEvaluators.push(s(r,i,()=>this.createSccEvaluator(i,t,r,a)));return o}async _evaluateSpecifiedComponentsForEachFeature(e,t,r=!1){this.calculating=!0;try{const a=[];for(const s of e){const e=this.layerExpressionsModelMap.get(s.layer);if(!e||0===e.components.length)continue;const o=new Set;a.push(this.evaluateAffectedComponents(t(e),s,e,r,o))}await o(Promise.all(a),this._abortController)}catch(s){a.getLogger(this).error(s),this.expressionEvaluationFailed=!0}finally{this.calculating=!1}}};e([n()],m.prototype,"calculating",void 0),e([n({constructOnly:!0})],m.prototype,"arcadeContext",void 0),e([n()],m.prototype,"_abortController",void 0),e([n()],m.prototype,"layerExpressionsModelMap",void 0),e([n()],m.prototype,"evaluatedExpressions",void 0),e([n()],m.prototype,"expressionEvaluationFailed",void 0),m=e([l("esri.widgets.BatchAttributeForm.expressions.ExpressionsManager")],m);class g{constructor(e,t,r,a,s,o){this.scc=e,this.feature=t,this.arcadeContextInfo=r,this.expressionsModel=a,this.evaluatedExpressions=s,this._abortController=o,this.dependentEvaluators=[],this._evaluatorPromise=null}get baseContext(){const{editType:e,map:t,spatialReference:r,timeZone:a}=this.arcadeContextInfo,s=this.feature.layer,o="scene"===s?.type&&null!=s.associatedLayer?s.associatedLayer:s;return{variables:{$originalfeature:this.feature.original,$editcontext:{editType:e},$layer:o,$featureset:o,$datastore:o?.url,$feature:this.feature.plainGraphic,$map:t},executeContext:{rawOutput:!0,spatialReference:r??void 0,timeZone:a,abortSignal:this._abortController.signal}}}evaluate(e,t){return null==this._evaluatorPromise&&(this._evaluatorPromise=this._evaluate(e,t)),this._evaluatorPromise}async _evaluate(e,t){null===h&&(h=await import("../../../arcade/languageUtils.js"));const a=this.dependentEvaluators.map(r=>r.evaluate(e,t));await o(Promise.all(a),this._abortController);for(const o of this.scc.executors){const a=this.baseContext;if(this._abortController.signal.aborted)break;const l=this.expressionsModel.arcadeExecutorUses.get(o)??[],u=s(this.evaluatedExpressions,this.feature,()=>new i);let c=null,h=null;try{c=o.isAsync?await o.executeAsync(a.variables,a.executeContext):o.execute(a.variables,a.executeContext),h={result:c,status:"success"}}catch(n){h={error:n,status:"error"}}for(const r of l){const a=this.expressionsModel.elementTemplateMap.get(r.elementId);switch(r.executorPurpose){case"editable":case"required":case"text":u.set(p(r),h);break;case"value":{if("error"===h?.status)continue;const e=a.getExpressionExecutorsForLayer(this.feature.layer);let r=!0;if(e?.editableExpression&&(r=!1===u.get(p({elementId:a.elementId,executorPurpose:"editable"}))?.result),r){const e=this.feature.getAttribute(a.fieldName)??null,r=y(h.result,this.feature,a.fieldName,this.arcadeContextInfo.timeZone);r!==e&&(this.feature.setAttribute(a.fieldName,r),t.add(a.fieldName))}}break;case"visibility":if(u.set(p(r),h),!this.expressionsModel.preserveFieldValuesWhenHidden&&!1===h.result&&e)if(d(a)){for(const e of a.elements)if(f(e)){null!==this.feature.getAttribute(e.fieldName)&&t.add(e.fieldName),this.feature.setAttribute(e.fieldName,null)}}else if(f(a)){null!==this.feature.getAttribute(a.fieldName)&&t.add(a.fieldName),this.feature.setAttribute(a.fieldName,null)}}}if("error"===h?.status){const e=new Set;for(const t of l){const r=this.expressionsModel.elementTemplateMap.get(t.elementId);if(r)switch(t.executorPurpose){case"editable":e.add(r.label+" - Editable expression");break;case"required":e.add(r.label+" - Required expression");break;case"value":e.add(r.label+" - Value expression");break;case"visibility":e.add(r.label+" - Visibility expression")}}if(e.size>0)throw new r("expression-evaluation-failed","Arcade evaluation failed ("+[...e].join(",")+")");throw new r("expression-evaluation-failed","Arcade evaluation failed ")}}}}function y(e,t,a,s){if(null===e)return null;const o=t.layer.fieldsIndex.get(a);if(!o)throw new r("field-not-found","Unable set field value as the field cannot be found. ("+a+")");switch(o.type){case"big-integer":case"integer":case"long":case"oid":case"small-integer":case"single":case"double":return h.toNumber(e);case"global-id":case"guid":case"string":return h.toString(e);case"date":{if(h.isDate(e))return e.getTime();const t=h.toDate(e,s);if(!t)throw new r("unsupported-value-type","Arcade return type is not a supported field type. ("+a+")");return t.getTime()}case"date-only":{if(h.isDateOnly(e))return e.toStorageFormat();if(h.isDate(e))return u.fromDateTime(e.toDateTime()).toStorageFormat();const t=u.fromString(h.toString(e));if(!t)throw new r("unsupported-value-type","Arcade return type is not a supported field type.");return t.toStorageFormat()}case"time-only":{if(h.isTime(e))return e.toStorageString();if(h.isDate(e)){return c.fromDateTime(e.toDateTime()).toStorageString()}const t=c.fromString(h.toString(e));if(!t)throw new r("unsupported-value-type","Arcade return type is not a supported field type.");return t.toStorageString()}case"timestamp-offset":{if(h.isDate(e))return e.toISOString(!1);const t=h.toDate(e,s);if(!t)throw new r("unsupported-value-type","Arcade return type is not a supported field type. ("+a+")");return t.toISOString(!1)}}throw new r("unsupported-value-type","Arcade return type is not a supported field type. ("+a+")")}function v(e){return e.components}function x(e){return Array.from(e.geometryReferences)}export{m as ExpressionsManager};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{isSome as t}from"../../../core/arrayUtils.js";import{property as i,subclass as r}from"../../../core/accessorSupport/decorators.js";import n from"../../../layers/support/CodedValue.js";import a from"../../../layers/support/CodedValueDomain.js";import{getDomainRange as l,dateTimeFieldValuesToNumericRange as s,isDomainValidForField as o}from"../../../layers/support/domainUtils.js";import{isNumericField as u,isStringField as m,isTimeOnlyField as d,getFieldRange as p,isDateOnlyField as f,isTimestampOffsetField as h}from"../../../layers/support/fieldUtils.js";import{supportsFieldConfiguration as c}from"../../../layers/support/layerUtils.js";import y from"../../../layers/support/RangeDomain.js";import{isAnyDateField as g}from"../../../smartMapping/support/utils.js";import{isNumber as b}from"../../../support/guards.js";import{unknown as x,utc as v}from"../../../time/constants.js";import V from"./EditableInput.js";import{visibilityCodeToBoolean as _,isFieldInputWithShowNoValueOptionInput as F,differentValuesString as w}from"./support/inputUtils.js";import{getMaxLength as E,getMinLength as M,isEmptyValue as D,dateIsValid as T,validateFormValue as N}from"../../support/forms/formUtils.js";let R=class extends V{constructor(e){super(e),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 u(e)?"number":m(e)?"text":g(e)||d(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(c(e)){const i=e.getFieldAlias(t.name);if(null!=i&&""!==i)return i}}return t.alias||t.name}get effectiveVisible(){return _(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 invalidFeatures(){return this.errors.map(e=>e.feature)}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.template;return!this.required&&(!F(e)||!0===e?.showNoValueOption)}get showNoValueLabel(){const{input:e}=this.template;return F(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 e=this.template.input;return!e||"datetimeoffset-picker"===e.type&&e.includeTimeOffset}get maxLength(){return E({dataType:this.dataType,field:this.field,input:this.template.input})}get minLength(){return M({dataType:this.dataType,field:this.field,input:this.template.input})}get range(){if("date"===this.dataType)return this._dateRange;const{domain:e,field:t}=this;if(e){const i=l(t,e);return{max:i?.max,min:i?.min}}const i=this._allDomains.toArray().every(e=>!e)?p(t):null;return{max:i?.max===Number.MAX_VALUE?null:i?.max??null,min:i?.min===-Number.MAX_VALUE?null:i?.min??null}}get required(){if(!this.editable)return!1;if(!this.field.nullable||this.isSubtypeField)return!0;const e=this.visible&&!1!==this.group?.visible,t=this._evaluatedRequiredExpression;return!(!e||null==t)&&t}get submittable(){return(!this.required||!this.distinctValues.some(e=>D(e)))&&!!this.valid}get valid(){return 0===this.errors.length}get value(){return this.featuresHaveSameValue?this.features.at(0)?.getAttribute(this.fieldName)??null:w}get visibilityCode(){return this.field.visible?this._fieldShouldHaveDomain&&null==this.domain?"hidden:no-domain-in-common":this._baseVisibilityCode:"hidden:field-definition"}get effectiveTimeZone(){const e=this.template;let t=e.formTimeZone??"system";return e.layerTimeZone?e.layerTimeZone===x?t=v:e.formTimeZone===x&&(t=e.layerTimeZone):e.formTimeZone===x&&(t=v),t}get codedValueDomainOptions(){return"coded-value"===this.domain?.type?this.domain.codedValues.map(({name:e,code:t})=>({name:e,value:t})):[]}get codedValueOptions(){const e=this.codedValueDomainOptions,{value:t}=this,i=null==t||t===w||e.some(e=>e.value===t)?[]:[{name:`${t}`,value:t}];return[e,i]}get _evaluatedRequiredExpression(){let e=!1,t=!0;const i=this.template;for(const r of this.features){if(null==i.getExpressionExecutorsForLayer(r.layer)?.requiredExpression)continue;t=!1;const n=this._lookupEvaluatedExpression(r,"required");"success"===n?.status?e=e||!0===n.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 e=this.template.input;if(!e)return{};const{type:t}=e;let i={};if("date-picker"!==t&&"time-picker"!==t&&"datetimeoffset-picker"!==t||(i=s(this.field,e.max,e.min)),"datetime-picker"===t){const{max:t,min:r}=e;i={max:null!=t&&T(t)?t.getTime():null,min:null!=r&&T(r)?r.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:r}=this;if("date"!==this.dataType)return{};if(!r)return this._fieldShouldHaveDomain?{}:e;const n=l(i,r);if(!n)return e;const{max:a,min:s,rawMax:o,rawMin:u}=e,{type:m}=t.field;if("date"===m){const{max:e,min:t}=n;return{max:b(a)&&(null===e||null!=e&&a<=e)?a:e??null,min:b(s)&&(null===t||null!=t&&s>=t)?s:t??null}}if("date-only"===m||"time-only"===m||"timestamp-offset"===m){const{max:e,min:t,rawMax:i,rawMin:r}=n,l=b(a)&&o&&(null==e||a<e),m=b(s)&&u&&(null==t||s>t);return{max:l?a:e,min:m?s:t,rawMax:l?o:i,rawMin:m?u:r}}return{}}async setValueFromUser(e){this.userHasChangedValue=!0;const t=[],i=this.fieldName;for(const r of this.features)r.getAttribute(i)!==e&&t.push(r);this._setValue(e),await this.expressionsManager.valueChanged(i,t)}_setValue(e){const{fieldName:t}=this;for(const i of this.features)i.setAttribute(t,e)}_validate(){const{dataType:e,fieldName:t,maxLength:i,minLength:r,range:n}=this,a=[];for(const l of this.features){const{layer:s}=l,o=s.getField(t)??this.field,u=s.getFieldDomain(t,{feature:l.plainGraphic}),m=this.calculateDomain([u]),d=this._requiredForFeature(l),p=l.getAttribute(t),f=N(p,{dataType:e,domain:m,field:o,maxLength:i,minLength:r,range:n,required:d});f&&a.push({error:f,feature:l.source})}return a}_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&&o(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 r=null;switch(t?.type){case"range":r=this._intersectRangeDomains(e);break;case"coded-value":r=this._intersectCodedValueDomains(e)}return r}_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 n of e)for(const[e,i]of t){n.codedValues.some(t=>t.code===e&&t.name===i)||t.delete(e)}let r=t;if(i){r=new Map;for(const[e,n]of i)t.has(e)&&r.set(e,n)}const l=Array.from(r.entries()).map(([e,t])=>new n({code:e,name:t}));return l.length?new a({codedValues:l}):null}_intersectRangeDomains(e){if(!e.length)return null;let t=e[0];for(let r=1;r<e.length;r++){if(!t)return null;t=this._findMinMaxValuesBetweenTwoDomains(t,e[r])}if(t&&!o(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:r}=this;return f(r)||d(r)||h(r)?s(r,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,r=this._getMinMaxFromRangeDomain(e),n=this._getMinMaxFromRangeDomain(t),{field:a}=this,l=this._getValidRangeValue(r.min,-1/0),s=this._getValidRangeValue(r.max,1/0),o=this._getValidRangeValue(n.min,-1/0),u=this._getValidRangeValue(n.max,1/0);return i.minValue=Math.max(l,o),i.maxValue=Math.min(s,u),i.minValue===-1/0||i.maxValue===1/0||i.minValue>i.maxValue?null:((f(a)||d(a)||h(a))&&(i.minValue=Number(r.min)>Number(n.min)?r.rawMin:n.rawMin,i.maxValue=Number(r.max)<Number(n.max)?r.rawMax:n.rawMax),i.name="intersection",i)}_getValidRangeValue(e,t){return b(e)?e:t}};e([i()],R.prototype,"dataType",null),e([i()],R.prototype,"domain",null),e([i()],R.prototype,"distinctValues",null),e([i()],R.prototype,"editable",null),e([i()],R.prototype,"label",null),e([i()],R.prototype,"effectiveVisible",null),e([i()],R.prototype,"effectiveVisibilityCode",null),e([i()],R.prototype,"errors",null),e([i()],R.prototype,"featuresHaveSameValue",null),e([i()],R.prototype,"field",null),e([i()],R.prototype,"fieldName",null),e([i()],R.prototype,"group",void 0),e([i()],R.prototype,"invalidFeatures",null),e([i()],R.prototype,"isSubtypeField",null),e([i()],R.prototype,"showNoValueOptionEnabled",null),e([i()],R.prototype,"showNoValueLabel",null),e([i()],R.prototype,"includeTime",null),e([i()],R.prototype,"includeTimeOffset",null),e([i()],R.prototype,"maxLength",null),e([i()],R.prototype,"minLength",null),e([i()],R.prototype,"range",null),e([i()],R.prototype,"required",null),e([i()],R.prototype,"submittable",null),e([i({readOnly:!0})],R.prototype,"type",void 0),e([i()],R.prototype,"userHasChangedValue",void 0),e([i()],R.prototype,"valid",null),e([i()],R.prototype,"value",null),e([i()],R.prototype,"visibilityCode",null),e([i()],R.prototype,"effectiveTimeZone",null),e([i()],R.prototype,"_evaluatedRequiredExpression",null),e([i()],R.prototype,"_hasIntersectionWithElementFieldDomain",void 0),e([i()],R.prototype,"_allDomains",null),e([i()],R.prototype,"_fieldShouldHaveDomain",null),e([i()],R.prototype,"_dateFormRange",null),e([i()],R.prototype,"_dateRange",null),R=e([r("esri.widgets.BatchAttributeForm.inputs.FieldInput")],R);const A=R;export{A as default};
2
+ import{__decorate as e}from"tslib";import{isSome as t}from"../../../core/arrayUtils.js";import{property as i,subclass as r}from"../../../core/accessorSupport/decorators.js";import n from"../../../layers/support/CodedValue.js";import a from"../../../layers/support/CodedValueDomain.js";import{getDomainRange as l,dateTimeFieldValuesToNumericRange as s,isDomainValidForField as o}from"../../../layers/support/domainUtils.js";import{isNumericField as u,isStringField as m,isTimeOnlyField as p,getFieldRange as d,isDateOnlyField as f,isTimestampOffsetField as h}from"../../../layers/support/fieldUtils.js";import{supportsFieldConfiguration as c}from"../../../layers/support/layerUtils.js";import y from"../../../layers/support/RangeDomain.js";import{isAnyDateField as g}from"../../../smartMapping/support/utils.js";import{isNumber as b}from"../../../support/guards.js";import{unknown as x,utc as v}from"../../../time/constants.js";import V from"./EditableInput.js";import{visibilityCodeToBoolean as _,isFieldInputWithShowNoValueOptionInput as F,differentValuesString as w}from"./support/inputUtils.js";import{getMaxLength as E,getMinLength as M,isEmptyValue as D,dateIsValid as T,validateFormValue as N}from"../../support/forms/formUtils.js";let R=class extends V{constructor(e){super(e),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 u(e)?"number":m(e)?"text":g(e)||p(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(c(e)){const i=e.getFieldAlias(t.name);if(null!=i&&""!==i)return i}}return t.alias||t.name}get effectiveVisible(){return _(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 invalidFeatures(){return this.errors.map(e=>e.feature)}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.template;return!this.required&&(!F(e)||!0===e?.showNoValueOption)}get showNoValueLabel(){const{input:e}=this.template;return F(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 e=this.template.input;return!e||"timestampoffset-picker"===e.type&&e.includeTimeOffset}get maxLength(){return E({dataType:this.dataType,field:this.field,input:this.template.input})}get minLength(){return M({dataType:this.dataType,field:this.field,input:this.template.input})}get range(){if("date"===this.dataType)return this._dateRange;const{domain:e,field:t}=this;if(e){const i=l(t,e);return{max:i?.max,min:i?.min}}const i=this._allDomains.toArray().every(e=>!e)?d(t):null;return{max:i?.max===Number.MAX_VALUE?null:i?.max??null,min:i?.min===-Number.MAX_VALUE?null:i?.min??null}}get required(){if(!this.editable)return!1;if(!this.field.nullable||this.isSubtypeField)return!0;const e=this.visible&&!1!==this.group?.visible,t=this._evaluatedRequiredExpression;return!(!e||null==t)&&t}get submittable(){return(!this.required||!this.distinctValues.some(e=>D(e)))&&!!this.valid}get valid(){return 0===this.errors.length}get value(){return this.featuresHaveSameValue?this.features.at(0)?.getAttribute(this.fieldName)??null:w}get visibilityCode(){return this.field.visible?this._fieldShouldHaveDomain&&null==this.domain?"hidden:no-domain-in-common":this._baseVisibilityCode:"hidden:field-definition"}get effectiveTimeZone(){const e=this.template;let t=e.formTimeZone??"system";return e.layerTimeZone?e.layerTimeZone===x?t=v:e.formTimeZone===x&&(t=e.layerTimeZone):e.formTimeZone===x&&(t=v),t}get codedValueDomainOptions(){return"coded-value"===this.domain?.type?this.domain.codedValues.map(({name:e,code:t})=>({name:e,value:t})):[]}get codedValueOptions(){const e=this.codedValueDomainOptions,{value:t}=this,i=null==t||t===w||e.some(e=>e.value===t)?[]:[{name:`${t}`,value:t}];return[e,i]}get _evaluatedRequiredExpression(){let e=!1,t=!0;const i=this.template;for(const r of this.features){if(null==i.getExpressionExecutorsForLayer(r.layer)?.requiredExpression)continue;t=!1;const n=this._lookupEvaluatedExpression(r,"required");"success"===n?.status?e=e||!0===n.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 e=this.template.input;if(!e)return{};const{type:t}=e;let i={};if("date-picker"!==t&&"time-picker"!==t&&"timestampoffset-picker"!==t||(i=s(this.field,e.max,e.min)),"datetime-picker"===t){const{max:t,min:r}=e;i={max:null!=t&&T(t)?t.getTime():null,min:null!=r&&T(r)?r.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:r}=this;if("date"!==this.dataType)return{};if(!r)return this._fieldShouldHaveDomain?{}:e;const n=l(i,r);if(!n)return e;const{max:a,min:s,rawMax:o,rawMin:u}=e,{type:m}=t.field;if("date"===m){const{max:e,min:t}=n;return{max:b(a)&&(null===e||null!=e&&a<=e)?a:e??null,min:b(s)&&(null===t||null!=t&&s>=t)?s:t??null}}if("date-only"===m||"time-only"===m||"timestamp-offset"===m){const{max:e,min:t,rawMax:i,rawMin:r}=n,l=b(a)&&o&&(null==e||a<e),m=b(s)&&u&&(null==t||s>t);return{max:l?a:e,min:m?s:t,rawMax:l?o:i,rawMin:m?u:r}}return{}}async setValueFromUser(e){this.userHasChangedValue=!0;const t=[],i=this.fieldName;for(const r of this.features)r.getAttribute(i)!==e&&t.push(r);this._setValue(e),await this.expressionsManager.valueChanged(i,t)}_setValue(e){const{fieldName:t}=this;for(const i of this.features)i.setAttribute(t,e)}_validate(){const{dataType:e,fieldName:t,maxLength:i,minLength:r,range:n}=this,a=[];for(const l of this.features){const{layer:s}=l,o=s.getField(t)??this.field,u=s.getFieldDomain(t,{feature:l.plainGraphic}),m=this.calculateDomain([u]),p=this._requiredForFeature(l),d=l.getAttribute(t),f=N(d,{dataType:e,domain:m,field:o,maxLength:i,minLength:r,range:n,required:p});f&&a.push({error:f,feature:l.source})}return a}_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&&o(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 r=null;switch(t?.type){case"range":r=this._intersectRangeDomains(e);break;case"coded-value":r=this._intersectCodedValueDomains(e)}return r}_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 n of e)for(const[e,i]of t){n.codedValues.some(t=>t.code===e&&t.name===i)||t.delete(e)}let r=t;if(i){r=new Map;for(const[e,n]of i)t.has(e)&&r.set(e,n)}const l=Array.from(r.entries()).map(([e,t])=>new n({code:e,name:t}));return l.length?new a({codedValues:l}):null}_intersectRangeDomains(e){if(!e.length)return null;let t=e[0];for(let r=1;r<e.length;r++){if(!t)return null;t=this._findMinMaxValuesBetweenTwoDomains(t,e[r])}if(t&&!o(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:r}=this;return f(r)||p(r)||h(r)?s(r,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,r=this._getMinMaxFromRangeDomain(e),n=this._getMinMaxFromRangeDomain(t),{field:a}=this,l=this._getValidRangeValue(r.min,-1/0),s=this._getValidRangeValue(r.max,1/0),o=this._getValidRangeValue(n.min,-1/0),u=this._getValidRangeValue(n.max,1/0);return i.minValue=Math.max(l,o),i.maxValue=Math.min(s,u),i.minValue===-1/0||i.maxValue===1/0||i.minValue>i.maxValue?null:((f(a)||p(a)||h(a))&&(i.minValue=Number(r.min)>Number(n.min)?r.rawMin:n.rawMin,i.maxValue=Number(r.max)<Number(n.max)?r.rawMax:n.rawMax),i.name="intersection",i)}_getValidRangeValue(e,t){return b(e)?e:t}};e([i()],R.prototype,"dataType",null),e([i()],R.prototype,"domain",null),e([i()],R.prototype,"distinctValues",null),e([i()],R.prototype,"editable",null),e([i()],R.prototype,"label",null),e([i()],R.prototype,"effectiveVisible",null),e([i()],R.prototype,"effectiveVisibilityCode",null),e([i()],R.prototype,"errors",null),e([i()],R.prototype,"featuresHaveSameValue",null),e([i()],R.prototype,"field",null),e([i()],R.prototype,"fieldName",null),e([i()],R.prototype,"group",void 0),e([i()],R.prototype,"invalidFeatures",null),e([i()],R.prototype,"isSubtypeField",null),e([i()],R.prototype,"showNoValueOptionEnabled",null),e([i()],R.prototype,"showNoValueLabel",null),e([i()],R.prototype,"includeTime",null),e([i()],R.prototype,"includeTimeOffset",null),e([i()],R.prototype,"maxLength",null),e([i()],R.prototype,"minLength",null),e([i()],R.prototype,"range",null),e([i()],R.prototype,"required",null),e([i()],R.prototype,"submittable",null),e([i({readOnly:!0})],R.prototype,"type",void 0),e([i()],R.prototype,"userHasChangedValue",void 0),e([i()],R.prototype,"valid",null),e([i()],R.prototype,"value",null),e([i()],R.prototype,"visibilityCode",null),e([i()],R.prototype,"effectiveTimeZone",null),e([i()],R.prototype,"_evaluatedRequiredExpression",null),e([i()],R.prototype,"_hasIntersectionWithElementFieldDomain",void 0),e([i()],R.prototype,"_allDomains",null),e([i()],R.prototype,"_fieldShouldHaveDomain",null),e([i()],R.prototype,"_dateFormRange",null),e([i()],R.prototype,"_dateRange",null),R=e([r("esri.widgets.BatchAttributeForm.inputs.FieldInput")],R);const A=R;export{A as default};
@@ -7,7 +7,7 @@ export interface BookmarksVisibleElementsProperties extends Partial<Pick<Bookmar
7
7
  * The visible elements that are displayed within the widget.
8
8
  * This provides the ability to turn individual elements of the widget's display on/off.
9
9
  *
10
- * ![bookmarks-visibleElements](https://developers.arcgis.com/javascript/latest/assets/references/core/widgets/bookmarks-visibleElements.png)
10
+ * ![bookmarks-visibleElements](https://developers.arcgis.com/javascript/latest/assets/references/core/widgets/bookmarks-visibleElements.avif)
11
11
  *
12
12
  * @since 5.0
13
13
  */
@@ -139,12 +139,12 @@ export interface BookmarksEvents extends BookmarksViewModelEvents {}
139
139
  * It displays a list of [bookmarks](https://developers.arcgis.com/javascript/latest/references/core/webmap/Bookmark/),
140
140
  * which are typically defined inside the [WebMap.bookmarks](https://developers.arcgis.com/javascript/latest/references/core/WebMap/#bookmarks).
141
141
  *
142
- * ![bookmarks](https://developers.arcgis.com/javascript/latest/assets/references/core/widgets/bookmarks.png)
142
+ * ![bookmarks](https://developers.arcgis.com/javascript/latest/assets/references/core/widgets/bookmarks.avif)
143
143
  *
144
144
  * Each bookmark may contain the following properties: `name`, `thumbnail`, `viewpoint` (defines rotation, scale, and target geometry), and `timeExtent`.
145
145
  * If the timeExtent is defined on a bookmark, it will be displayed in the bookmark widget as shown in the following image.
146
146
  *
147
- * ![bookmarks-time](https://developers.arcgis.com/javascript/latest/assets/references/core/widgets/bookmarks-time-enabled.png)
147
+ * ![bookmarks-time](https://developers.arcgis.com/javascript/latest/assets/references/core/widgets/bookmarks-time-enabled.avif)
148
148
  *
149
149
  * When a bookmark with a timeExtent is selected, the [MapView.timeExtent](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/#timeExtent) of the View will be set to the timeExtent of the selected bookmark.
150
150
  * To disable time capability in the Bookmarks widget, set [capabilities.time](https://developers.arcgis.com/javascript/latest/references/core/widgets/Bookmarks/BookmarksViewModel/#capabilities) in the BookmarksViewModel to `false`.
@@ -79,7 +79,7 @@ export interface VisibleElements {
79
79
  * the Level element, the Construction phases element and the Disciplines are Categories list.
80
80
  * The visibility of these elements can be configured using the widget's [visibleElements](https://developers.arcgis.com/javascript/latest/references/core/widgets/BuildingExplorer/#visibleElements).
81
81
  *
82
- * [![building-explorer](https://developers.arcgis.com/javascript/latest/assets/references/core/widgets/building-explorer.png)](https://developers.arcgis.com/javascript/latest/sample-code/building-scene-layer-filter/)
82
+ * [![building-explorer](https://developers.arcgis.com/javascript/latest/assets/references/core/widgets/building-explorer.avif)](https://developers.arcgis.com/javascript/latest/sample-code/building-scene-layer-filter/)
83
83
  *
84
84
  * The [BuildingSceneLayers](https://developers.arcgis.com/javascript/latest/references/core/layers/BuildingSceneLayer/) to be explored
85
85
  * have to be set on the [layers](https://developers.arcgis.com/javascript/latest/references/core/widgets/BuildingExplorer/#layers) property of the widget. When setting multiple layers, the filters set
@@ -74,7 +74,7 @@ export interface CatalogLayerListEvents extends CatalogLayerListViewModelEvents
74
74
  * The [ListItem](https://developers.arcgis.com/javascript/latest/references/core/widgets/LayerList/ListItem/) API provides access to each layer's properties, allows
75
75
  * the developer to configure actions related to the layer, and allows the developer to add content to the item related to the layer.
76
76
  *
77
- * ![CatalogLayerList](https://developers.arcgis.com/javascript/latest/assets/references/core/widgets/catalog-layer-list.png)
77
+ * ![CatalogLayerList](https://developers.arcgis.com/javascript/latest/assets/references/core/widgets/catalog-layer-list.avif)
78
78
  *
79
79
  * @deprecated since version 5.0. Use the [Catalog Layer List](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-catalog-layer-list/) component instead. For information on widget deprecation, read about [Esri's move to web components](https://developers.arcgis.com/javascript/latest/components-transition-plan/).
80
80
  * @since 4.30
@@ -281,8 +281,8 @@ export default class CatalogLayerList extends CatalogLayerListSuperclass {
281
281
  *
282
282
  * | Value | Description | Example |
283
283
  * | ----- | ----------- | ------- |
284
- * | default | Displays view icons on the far side. Icons are hidden except on hover or if they have keyboard focus. See [view-visible](https://developers.arcgis.com/calcite-design-system/icons/?icon=view-visible&library=Calcite%20UI&query=view) and [view-hide](https://developers.arcgis.com/calcite-design-system/icons/?icon=view-hide&library=Calcite%20UI&query=view) calcite icons. | ![visibilityAppearance-default](https://developers.arcgis.com/javascript/latest/assets/references/core/widgets/layer-list/visibilityAppearance-default.png) |
285
- * | checkbox | Displays checkbox icons on the near side. See [check-square-f](https://developers.arcgis.com/calcite-design-system/icons/?icon=check-square-f&library=Calcite%20UI&query=check) and [square](https://developers.arcgis.com/calcite-design-system/icons/?icon=square&library=Calcite%20UI&query=square) calcite icons. | ![visibilityAppearance-checkbox](https://developers.arcgis.com/javascript/latest/assets/references/core/widgets/layer-list/visibilityAppearance-checkbox.png) |
284
+ * | default | Displays view icons on the far side. Icons are hidden except on hover or if they have keyboard focus. See [view-visible](https://developers.arcgis.com/calcite-design-system/icons/?icon=view-visible&library=Calcite%20UI&query=view) and [view-hide](https://developers.arcgis.com/calcite-design-system/icons/?icon=view-hide&library=Calcite%20UI&query=view) calcite icons. | ![visibilityAppearance-default](https://developers.arcgis.com/javascript/latest/assets/references/core/widgets/layer-list/visibilityAppearance-default.avif) |
285
+ * | checkbox | Displays checkbox icons on the near side. See [check-square-f](https://developers.arcgis.com/calcite-design-system/icons/?icon=check-square-f&library=Calcite%20UI&query=check) and [square](https://developers.arcgis.com/calcite-design-system/icons/?icon=square&library=Calcite%20UI&query=square) calcite icons. | ![visibilityAppearance-checkbox](https://developers.arcgis.com/javascript/latest/assets/references/core/widgets/layer-list/visibilityAppearance-checkbox.avif) |
286
286
  *
287
287
  * @default "default"
288
288
  * @example catalogLayerList.visibilityAppearance = "checkbox";
@@ -42,8 +42,8 @@ export interface CompassProperties extends WidgetProperties, Partial<Pick<Compas
42
42
  * For all other spatial references, the icon will be an arrow. For more information, see the
43
43
  * [Reference topic on Spatial references](https://developers.arcgis.com/documentation/spatial-references/).
44
44
  *
45
- * ![Compass for Web Mercator and WGS84](https://developers.arcgis.com/javascript/latest/assets/references/core/widgets/compass.png)
46
- * ![Compass for other spatial references](https://developers.arcgis.com/javascript/latest/assets/references/core/widgets/compass-other-sr.png)
45
+ * ![Compass for Web Mercator and WGS84](https://developers.arcgis.com/javascript/latest/assets/references/core/widgets/compass.avif)
46
+ * ![Compass for other spatial references](https://developers.arcgis.com/javascript/latest/assets/references/core/widgets/compass-other-sr.avif)
47
47
  *
48
48
  * You can use the view's [DefaultUI](https://developers.arcgis.com/javascript/latest/references/core/views/ui/DefaultUI/) to add the compass widget
49
49
  * to a 2D application via the [MapView.ui](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/#ui) property on the view.
@@ -108,7 +108,7 @@ export interface VisibleElements {
108
108
  * as any of several popular coordinate notations. Additionally, the widget provides a way to convert
109
109
  * user input coordinates into a [Point](https://developers.arcgis.com/javascript/latest/references/core/geometry/Point/).
110
110
  *
111
- * [![coordinate-conversion](https://developers.arcgis.com/javascript/latest/assets/references/core/widgets/coordinate-conversion-annotated.png)](https://developers.arcgis.com/javascript/latest/sample-code/widgets-coordinateconversion/)
111
+ * [![coordinate-conversion](https://developers.arcgis.com/javascript/latest/assets/references/core/widgets/coordinate-conversion-annotated.avif)](https://developers.arcgis.com/javascript/latest/sample-code/widgets-coordinateconversion/)
112
112
  *
113
113
  * Several common [formats](https://developers.arcgis.com/javascript/latest/references/core/widgets/CoordinateConversion/support/Format/) are included by default:
114
114
  * * XY - Longitude, Latitude (WGS84)
@@ -71,7 +71,7 @@ export interface DaylightEvents extends DaylightViewModelEvents {}
71
71
  * and the stars get updated accordingly, changing the light and the shadows in the scene. This sets the `date` and `directShadowsEnabled` properties of
72
72
  * [SceneView.environment.lighting](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/#environment).
73
73
  *
74
- * [![daylight-default](https://developers.arcgis.com/javascript/latest/assets/references/core/widgets/daylight/daylight-default.png)](https://developers.arcgis.com/javascript/latest/sample-code/widgets-daylight/)
74
+ * [![daylight-default](https://developers.arcgis.com/javascript/latest/assets/references/core/widgets/daylight/daylight-default.avif)](https://developers.arcgis.com/javascript/latest/sample-code/widgets-daylight/)
75
75
  *
76
76
  * The daytime slider has an option to select the timezone. When the user makes any adjustments here, a new time
77
77
  * in the chosen timezone is calculated and displayed in the slider. The timezone selector can be disabled
@@ -88,7 +88,7 @@ export interface DaylightEvents extends DaylightViewModelEvents {}
88
88
  * });
89
89
  * ```
90
90
  *
91
- * ![daylight-seasons](https://developers.arcgis.com/javascript/latest/assets/references/core/widgets/daylight/daylight-seasons.png)
91
+ * ![daylight-seasons](https://developers.arcgis.com/javascript/latest/assets/references/core/widgets/daylight/daylight-seasons.avif)
92
92
  *
93
93
  * There are two play buttons, one corresponds to the daytime slider and it animates the time as
94
94
  * it cycles through the minutes of the day. The second button corresponds to the date picker
@@ -102,7 +102,7 @@ export interface DaylightEvents extends DaylightViewModelEvents {}
102
102
  * });
103
103
  * ```
104
104
  *
105
- * ![daylight-animation](https://developers.arcgis.com/javascript/latest/assets/references/core/widgets/daylight/daylight-animation.gif)
105
+ * ![daylight-animation](https://developers.arcgis.com/javascript/latest/assets/references/core/widgets/daylight/daylight-animation.webm)
106
106
  *
107
107
  * Except for the daytime slider, all the elements in the daylight widget can be hidden by using the
108
108
  * [visibleElements](https://developers.arcgis.com/javascript/latest/references/core/widgets/Daylight/#visibleElements) property:
@@ -122,11 +122,11 @@ export interface DaylightEvents extends DaylightViewModelEvents {}
122
122
  *
123
123
  * With these settings, the widget looks like this:
124
124
  *
125
- * ![daylight-no-elements](https://developers.arcgis.com/javascript/latest/assets/references/core/widgets/daylight/daylight-no-elements.png)
125
+ * ![daylight-no-elements](https://developers.arcgis.com/javascript/latest/assets/references/core/widgets/daylight/daylight-no-elements.avif)
126
126
  *
127
127
  * Whenever the sun position option is unchecked, the scene applies the **virtual light source** relative to the camera. With this, the widget's time slider and date picker get automatically disabled:
128
128
  *
129
- * ![daylight-virtual](https://developers.arcgis.com/javascript/latest/assets/references/core/widgets/daylight/daylight-virtual.png)
129
+ * ![daylight-virtual](https://developers.arcgis.com/javascript/latest/assets/references/core/widgets/daylight/daylight-virtual.avif)
130
130
  *
131
131
  * > [!WARNING]
132
132
  * >
@@ -81,7 +81,7 @@ export interface DirectLineMeasurement3DProperties extends WidgetProperties, Par
81
81
  * This widget can be used in a [SceneView](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/) to measure the vertical, horizontal,
82
82
  * and direct distance between two points.
83
83
  *
84
- * [![measurement-line-3d](https://developers.arcgis.com/javascript/latest/assets/references/core/widgets/3D_DirectLineMeasurement_widget.png)](https://developers.arcgis.com/javascript/latest/sample-code/widgets-measurement-3d/)
84
+ * [![measurement-line-3d](https://developers.arcgis.com/javascript/latest/assets/references/core/widgets/3D_DirectLineMeasurement_widget.avif)](https://developers.arcgis.com/javascript/latest/sample-code/widgets-measurement-3d/)
85
85
  *
86
86
  * How distances are computed depends on the scene's spatial reference.
87
87
  *
@@ -98,7 +98,7 @@ export interface DirectLineMeasurement3DProperties extends WidgetProperties, Par
98
98
  * the measurement visualization is simplified, and only the horizontal and vertical distances are calculated.
99
99
  * The direct distance option becomes unavailable.
100
100
  *
101
- * ![measurement-line-3d](https://developers.arcgis.com/javascript/latest/assets/references/core/widgets/direct-line-measurement-3d.png)
101
+ * ![measurement-line-3d](https://developers.arcgis.com/javascript/latest/assets/references/core/widgets/direct-line-measurement-3d.avif)
102
102
  *
103
103
  * When the widget is active, a horizontal "laser" line is drawn which indicates the height at the current mouse position.
104
104
  * This line can help in analyzing the heights of objects relative to each other and the terrain.
@@ -98,7 +98,7 @@ export interface DirectionsProperties extends WidgetProperties, Partial<Pick<Dir
98
98
  *
99
99
  * | Directions with RouteLayer |
100
100
  * |------|
101
- * | ![Directions with 3 stops](https://developers.arcgis.com/javascript/latest/assets/references/core/widgets/DW1.png) |
101
+ * | ![Directions with 3 stops](https://developers.arcgis.com/javascript/latest/assets/references/core/widgets/DW1.avif) |
102
102
  *
103
103
  * This routing service requires authentication.
104
104
  * If an API key is specified at the app level (see [Config](https://developers.arcgis.com/javascript/latest/references/core/config/#Config-apiKey)) or widget level (see [apiKey](https://developers.arcgis.com/javascript/latest/references/core/widgets/Directions/#apiKey)) then this key will accompany requests to both the routing service and geocoder/reverse-geocoder.
@@ -106,14 +106,14 @@ export interface DirectionsProperties extends WidgetProperties, Partial<Pick<Dir
106
106
  *
107
107
  * | Pick a location on the map |
108
108
  * |------|
109
- * | ![Directions with saving](https://developers.arcgis.com/javascript/latest/assets/references/core/widgets/Directions-3-PickLocation.png) |
109
+ * | ![Directions with saving](https://developers.arcgis.com/javascript/latest/assets/references/core/widgets/Directions-3-PickLocation.avif) |
110
110
  *
111
111
  * Locations on the map can be reverse geocoded and used as stops in the route.
112
112
  * Click the button with a crosshairs icon to associate a location with a new or existing stop. After clicking the button, click the map once. To cancel this process, press the `escape` key.
113
113
  *
114
114
  * | Route options | Route options |
115
115
  * |------|------|
116
- * | ![Directions with saving](https://developers.arcgis.com/javascript/latest/assets/references/core/widgets/Directions-6-SaveDropdown.png) | ![Directions with saving2](https://developers.arcgis.com/javascript/latest/assets/references/core/widgets/Directions-6-SaveDropdown-2.png) |
116
+ * | ![Directions with saving](https://developers.arcgis.com/javascript/latest/assets/references/core/widgets/Directions-6-SaveDropdown.avif) | ![Directions with saving2](https://developers.arcgis.com/javascript/latest/assets/references/core/widgets/Directions-6-SaveDropdown-2.avif) |
117
117
  *
118
118
  * The resulting driving directions are automatically collapsed and can be optionally saved to a new or existing portal item. This can be achieved programically with [save()](https://developers.arcgis.com/javascript/latest/references/core/widgets/Directions/#save) and [saveAs()](https://developers.arcgis.com/javascript/latest/references/core/widgets/Directions/#saveAs).
119
119
  * The `Clear` button calls the [DirectionsViewModel.reset()](https://developers.arcgis.com/javascript/latest/references/core/widgets/Directions/DirectionsViewModel/#reset)
@@ -121,7 +121,7 @@ export interface DirectionsProperties extends WidgetProperties, Partial<Pick<Dir
121
121
  *
122
122
  * | Editing | Editing |
123
123
  * |------|------|
124
- * | ![Directions edit1](https://developers.arcgis.com/javascript/latest/assets/references/core/widgets/Directions-7-Edit.png) | ![Directions edit2](https://developers.arcgis.com/javascript/latest/assets/references/core/widgets/Directions-8-NoAuto.png) |
124
+ * | ![Directions edit1](https://developers.arcgis.com/javascript/latest/assets/references/core/widgets/Directions-7-Edit.avif) | ![Directions edit2](https://developers.arcgis.com/javascript/latest/assets/references/core/widgets/Directions-8-NoAuto.avif) |
125
125
  *
126
126
  * Selecting the `Edit route` button allows you to add/move/remove stops, add/move/remove/reshape polyline barriers.
127
127
  * By default the route will be automatically resolve at the completion of any editing operation. For more complex routes, it may be advantageous to disable auto-solving and solve as and when needed with the dedicated solve button.
@@ -86,7 +86,7 @@ export interface DistanceMeasurement2DProperties extends WidgetProperties, Parti
86
86
  * * In geographic coordinate systems (GCS) and in Web Mercator, distances are computed geodetically.
87
87
  * * In projected coordinate systems (PCS), apart from Web Mercator, distances are computed in a Euclidean manner (in their respective PCS).
88
88
  *
89
- * [![measurement-line-2d](https://developers.arcgis.com/javascript/latest/assets/references/core/widgets/DistanceMeasurement2D_widget.png)](https://developers.arcgis.com/javascript/latest/sample-code/widgets-measurement-2d/)
89
+ * [![measurement-line-2d](https://developers.arcgis.com/javascript/latest/assets/references/core/widgets/DistanceMeasurement2D_widget.avif)](https://developers.arcgis.com/javascript/latest/sample-code/widgets-measurement-2d/)
90
90
  *
91
91
  * ### Undo / Redo
92
92
  *
@@ -12,7 +12,7 @@ export interface CreateFeaturesWorkflowProperties extends WorkflowProperties {}
12
12
  * the [Editor](https://developers.arcgis.com/javascript/latest/references/core/widgets/Editor/) widget. This workflow provides continuous creation of multiple features of the same type at once. After the initial sketch is created, the attribute form will display with the set field elements. These fields can be updated as the user creates new features. This workflow is designed for both individual and multiple feature creation.
13
13
  *
14
14
  *
15
- * ![create-feature](https://developers.arcgis.com/javascript/latest/assets/references/core/widgets/editor/initial-editor-panel2.png)
15
+ * ![create-feature](https://developers.arcgis.com/javascript/latest/assets/references/core/widgets/editor/initial-editor-panel2.avif)
16
16
  *
17
17
  * > [!WARNING]
18
18
  * >
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../../Graphic.js";import a from"../../core/Error.js";import{makeHandle as i,handlesGroup as r,abortHandle as s}from"../../core/handleUtils.js";import"../../core/has.js";import o from"../../core/Logger.js";import{removeMaybe as n,destroyMaybe as l}from"../../core/maybe.js";import{isPromiseLike as d,debounce as c}from"../../core/promiseUtils.js";import{watch as u,when as p,initial as h,sync as m,whenOnce as f,syncAndInitial as g}from"../../core/reactiveUtils.js";import{generateBracedUUID as w}from"../../core/uuid.js";import{property as y,subclass as v}from"../../core/accessorSupport/decorators.js";import{isSharedTemplateOrMetadata as _,isSharedTemplate as F,getCreationAttributes as b,isStandardFeatureTemplate as M}from"../../editing/templateUtils.js";import{getFullTemplate as I}from"../../editing/sharedTemplates/templateLoader.js";import V from"../../layers/GraphicsLayer.js";import{isSceneLayer as k,isTable as S}from"../../layers/support/layerUtils.js";import{isNumber as C}from"../../support/guards.js";import{getDisplayedSymbol as T}from"../../symbols/support/symbolUtils.js";import{getDrawHelpMessage as A}from"../../views/draw/support/helpMessageUtils.js";import P from"../../views/draw/support/HighlightHelper.js";import E from"../../views/interactive/sketch/SketchOptions.js";import U from"../../views/interactive/snapping/FeatureSnappingLayerSource.js";import{temporaryHighlightName as H}from"../../views/support/HighlightDefaults.js";import L from"./CreateFeaturesWorkflowData.js";import{isModelUpload as O,handleModelUpload as j}from"./modelUploadUtils.js";import x from"./Workflow.js";import{activeSketchToolDrawsUnsupportedCurve as D,createToolFromGeometryType as z,containsUnsupportedCurve as R,findEditorItemForLayer as W,getServiceEditsFromWorkflowData as G,getServiceInfoForLayer as N,orderEditsByRelationshipDependencies as K,getServiceLayersById as Z,startCreatingNewFeature as q,syncUpdateOptions as B,findLayerInfo as J,updateGraphicSymbolWhenRequired as Q,isTerminalUpdateEventType as X,getVisualVariableAttributes as Y,startUpdatingFeatureGeometry as $,createWorkflowSteps as ee,avoidFeatureTemplateSelectionWithOnlyOneItem as te,setUpSketchCreateWatchers as ae,setRelationshipFields as ie,prepareAttachmentsForCreateFeaturesWorkflow as re,showProgressCursor as se,setVisualVariablesAndElevationInfoForUpdate as oe,visualVariableInteractiveUpdate as ne}from"./workflowUtils.js";import le from"../FeatureForm/FeatureFormViewModel.js";import de from"../Sketch/SketchViewModel.js";var ce;const ue=Symbol(),pe=Symbol(),he=Symbol(),me=Symbol(),fe={point:["point"],multipoint:["multipoint"],polygon:["polygon","freehandPolygon","rectangle","circle"],polyline:["polyline","freehandPolyline"],mesh:[],multipatch:[]};let ge=ce=class extends x{constructor(e){super(e),this.type="create-features",this.createFeatureState="create-new",this.data=void 0,this.isNested=!1,this._getDrawMeshHelpMessage=void 0,this._webStyleCache=new Map,this._featureFormHandle=null,this._visualVariableAttributes={rotation:null,size:null},this._formViewModel=new le,this._sketchLayer=null,this._sketchViewModel=null,this._attachmentFileInfos=new Map,this._isActive=!0}initialize(){this.isNested&&(this._isActive=!1),this._initializeSketchViewModel()}destroy(){this._sketchViewModel.destroy()}get allowSave(){return!this.updating}get curveResizeDisabled(){return this.data.curveResizeDisabled}get curveUpdatesDisabled(){return this.data.curveUpdatesDisabled}get formViewModel(){return this._formViewModel}get hasInvalidFormTemplate(){return!!this.data.editorItem?.hasInvalidFormTemplate}get hasPendingEdits(){if(this.pendingFeatures.some(e=>!!this.data.getEditsForPendingFeature(e)?.modified))return!0;const{creationInfo:e,upload:t}=this.data,{activeComponent:a,createGraphic:i}=this._sketchViewModel,r=i?.geometry?.type;return!("polyline"!==r&&"polygon"!==r&&"multipoint"!==r||"draw-2d"!==a?.type&&"draw-3d"!==a?.type)&&a.drawOperation.committedVertices.length>0||(!(!t||"pending"!==t.state&&"success"!==t.state)||!!e?.geometryToPlace)}get hasPreviousStep(){return this._stepIndex>0||"update-pending"===this.createFeatureState&&!!this.data.selectedPendingFeature&&!this.parent&&!O(this.data.creationInfo)}get helpMessage(){const{creationInfo:e,viewModel:t}=this.data;if("creating-features"!==this.stepId||!e)return;const{_sketchViewModel:a}=this,{drawTool:i,isUsingLegacyCreateTools:r}=a;if(!r)return i?.helpMessageKey??"noTool";const s=e.layer.geometryType,o=a.createGraphic;if("mesh"===s){this._getDrawMeshHelpMessage||import("../../views/draw/support/helpMessageUtils3d.js").then(e=>{this._getDrawMeshHelpMessage=e.getDrawMeshHelpMessage});const{view:e}=t;return"3d"===e?.type?this._getDrawMeshHelpMessage?.(o,e):void 0}const{activeCreateToolDrawMode:n,activeTool:l}=a;return A("rectangle"===l||"circle"===l?l:s,o?.geometry,n)}get noticeMessage(){if(D(this._sketchViewModel,this.data.editorItem))return"curveToolDensifyWarning"}get layer(){return this.data.creationInfo?.layer}get numPendingFeatures(){return this.pendingFeatures.length}get numPendingFeaturesExcludingHidden(){return this.pendingFeatures.filter(e=>this.data.isDisplayable(e)).length}get parent(){return this.data.parent}get pendingFeatures(){return this.data.pendingFeatures}get keyboardCancellationEnabled(){return 0===this.numPendingFeatures}get reliesOnOwnerAdminPrivileges(){return this.data.editorItem?.capabilities.create.reliesOnOwnerAdminPrivileges??!1}get saveActionLabel(){return"create"}get shouldShowAttachments(){return(this.data.selectedPendingFeature&&this.data.editorItem?.capabilities.create.attachments.enabled)??!1}get shouldAllowAttachmentEditing(){return this.shouldShowAttachments}get sketchUpdateOptions(){const{editorItem:e}=this.data;return{enableScaling:!this.curveResizeDisabled,multipleSelectionEnabled:!1,reshapeOptions:{enableCreateCurveFromStraightEdge:!k(e?.layer)&&!!e?.capabilities.supportsTrueCurve}}}get sketchViewModel(){return this._sketchViewModel}get test(){}get availableCreateTools(){const e=this.data.creationInfo?.layer.geometryType,t=this.data.viewModel.view;if(!e)return[];if(this.data.creationInfo?.maxFeatures&&this.data.creationInfo.maxFeatures<=this.numPendingFeatures)return[];if(_(this.data.fullTemplate)){const{tool:t}=z(e,this.data.fullTemplate);return[t]}return"2d"!==t?.type&&"multipoint"===e?[]:[...fe[e]]}get _attachmentsActive(){const e=this.data.viewModel.attachmentsViewModel.mode,t=this.stepId;return this.shouldShowAttachments&&("add"===e||"edit"===e||"adding-attachment"===t||"editing-attachment"===t)}async enter(){this._isActive=!0,"awaiting-feature-creation-info"!==this.stepId&&await this._updatingHandles.addPromise(this._setUpCreatingFeaturesStep())}exit(){this._isActive=!1,this.removeHandles([he])}async updatePendingFeature(e){if(e!==this.data.selectedPendingFeature)return this._sketchViewModel.cancel(),this._startUpdating({feature:e})}async start(){return await super.start(),S(this.data.creationInfo?.layer)?null:{enter:async()=>{},exit:async()=>{},viewModel:this._sketchViewModel}}async save(e){const{formViewModel:t}=this;if(t.pendingSubtypeChoice)return;t.submit(),this._stashValidationState();const a=this.data.selectedPendingFeature,i=this._hasValidationErrors(a)?a:this.data.pendingFeatures.find(e=>this._hasValidationErrors(e));if(i)return await this._startUpdating({feature:i}),void t?.submit();const{pendingFeatures:r,editorItem:s}=this.data;if(s&&e&&R(r.toArray(),s)){if(!await e("curveEditingDensifyPrompt"))return this.reset()}return super.save()}back(e){return"update-pending"!==this.createFeatureState||!this.data.selectedPendingFeature||O(this.data.creationInfo)||this._attachmentsActive||this.parent?super.back(e):this._clearSelectedFeature()}previous(e){return"update-pending"!==this.createFeatureState||!this.data.selectedPendingFeature||O(this.data.creationInfo)||this._attachmentsActive?super.previous(e):this._clearSelectedFeature()}cancelFeature(e){this.data.isSharedTemplateWorkflow?o.getLogger(this).warn("Cannot cancel individual features created by shared templates."):(this.data.removePendingFeature(e),this.sketchViewModel.removeGraphic(e))}static create(e){const{addAttachmentsCallback:t,applyEdits:a,applyEditsFeatureService:i,isNested:r,creationInfo:s,parent:o,snappingManager:n,startAt:l,viewModel:d}=e,c=e.sketchOptions??new E,u=s?.layer,p=u?W(d.editorItems,u):void 0,h=new ce({data:new L({creationInfo:s,editorItem:p,parent:o,sketchOptions:c,snappingManager:n,viewModel:d}),isNested:r,onCommit:async e=>{const{creationInfo:r}=e;if(!r)return;h._sketchViewModel.cancel();const s=e.pendingFeatures.toArray(),{layer:o}=r,n=o.capabilities?.editing.supportsGlobalId&&"globalIdField"in o,l=h._attachmentFileInfos,{fullTemplate:c}=e,u=G(h.data),p=F(c)&&u;if(n){if(_e(s),p){let t=be(u,l);const a=await(N(o,d.view)?.load());a&&(t=K({edits:t,serviceInfo:a,view:d.view,findOriginalFeature:t=>e.getEditsForPendingFeature(t)?.initialFeature??t})),await i(c.featureService,t,{globalIdUsed:!0,honorSequenceOfEdits:!0,gdbVersion:c.layer.gdbVersion??void 0})}else{const e=Fe(s,l);await a(o,e,{globalIdUsed:!0})}return}const m=p?await i(c.featureService,u,{gdbVersion:c.layer.gdbVersion??void 0}):[await a(o,{addFeatures:s})];m&&l.size>0&&await Promise.all(m.map(e=>{if(e?.addFeatureResults)return t(o,ve(s,e.addFeatureResults,o,l))}))}});return h._set("steps",this._createWorkflowSteps(h,l)),h}_fadeExistingFeatures(e){if("effect"in e){const t=e.effect;return e.effect="saturate(0.6) opacity(0.8)",i(()=>e.effect=t)}const t=e.opacity;return e.opacity=.7,i(()=>e.opacity=t)}async _initializeFullTemplateAndExecutorInfo(e){const{creationInfo:t}=e,{view:a}=e.viewModel;if(!t||!a)return null;const i=await I(a,t.template);if(e.fullTemplate=i,i&&F(i)){const{createTemplateExecutor:r}=await import("../../editing/sharedTemplates/executor/createTemplateExecutor.js"),s={completionResults:[],executor:await r(i),serviceLayersById:Z(t.layer,a)};e.templateExecutorInfo=s}return i}async _startCreating(){this.removeHandles(pe);const{data:e}=this;if(!e.creationInfo)return;const t=this.data.creationInfo?.maxFeatures;if(t&&this.numPendingFeatures>=t)return this.sketchViewModel.cancel(),void(this.numPendingFeatures&&await this._startUpdating({feature:this.pendingFeatures.at(-1)}));this.createFeatureState="create-new",await q(this._sketchViewModel,this._sketchLayer,e,this._webStyleCache)}async _clearSelectedFeature(){const e=this._formViewModel.pendingSubtypeChoice;e&&(e.resolve("undo"),await e.promise),this._stashValidationState(),this.sketchViewModel.cancel(),this.data.selectedPendingFeature=null,this._featureFormHandle=n(this._featureFormHandle),this._formViewModel.feature=null;const t=this.data.viewModel.attachmentsViewModel;"add"!==t.mode&&"edit"!==t.mode||await(this.data.viewModel.activeWorkflow?.previous())}_stashValidationState(){const e=this._formViewModel.feature,t=e&&this.data.getEditsForPendingFeature(e);t&&(t.submittable=this._formViewModel.submittable)}async _selectFeatureForUpdate({feature:e,initialFeature:t=e}){this._stashValidationState();const{data:a,pendingFeatures:i,_webStyleCache:s}=this;i.includes(e)||a.addPendingFeature(e,t),a.selectedPendingFeature=e;const{_formViewModel:o,_sketchViewModel:l,sketchUpdateOptions:d}=this,{creationInfo:c,viewModel:p}=a,{attachmentsViewModel:h,layerInfos:m,view:f}=p;if(!f||!c)return;B(l,d),n(this._featureFormHandle);const g=e.sourceLayer,w=J(m,g),y=w?.formTemplate,v=f.spatialReference;o.set({editType:"INSERT",feature:e,formTemplate:y,spatialReference:v,map:f.map}),"add"!==h.mode&&"edit"!==h.mode||await(p.activeWorkflow?.previous()),h.graphic=e,h.fileInfos.removeAll(),h.mode="view";(this._attachmentFileInfos.get(e)||[]).forEach(({file:e,form:t})=>h.addFile(e,t)),await Q(e,s,"2d"===f.type?f.scale:null);const _=a.getEditsForPendingFeature(e);this._featureFormHandle=r([o.on("value-change",async({fieldName:t,value:a})=>{if(_?.updateAttributes(o.getValues()),C(a)){const e=this._visualVariableAttributes;e.size&&!e.size.isUpdatingInteractively&&t===e.size.field&&e.size.setInitialValue(a),e.rotation&&!e.rotation.isUpdatingInteractively&&t===e.rotation.field&&e.rotation.setInitialValue(a)}await Q(e,s,"2d"===f.type?f.scale:null)}),l.on(["update","undo","redo"],e=>{("undo"===e.type||"redo"===e.type||"update"===e.type&&null!=e.toolEventInfo&&X(e.toolEventInfo.type))&&o.notifyFeatureGeometryChanged()}),u(()=>o.feature?.sourceLayer,t=>e.sourceLayer=t),u(()=>[o.feature,o.submittable],()=>this._stashValidationState())]),this.createFeatureState="update-pending"}async _startUpdating({feature:e,initialFeature:t=e}){await this._selectFeatureForUpdate({feature:e,initialFeature:t});const{_sketchLayer:a,_sketchViewModel:i,data:r}=this,{creationInfo:s,viewModel:o}=r,{view:n}=o;if(!n||!s)return;const l=e.sourceLayer??s.layer;return S(l)?void 0:(this._visualVariableAttributes=Y(e),$({graphic:e,sketchLayer:a,sketchViewModel:i,sourceLayer:l,updateOptions:this.sketchUpdateOptions,visualVariables:this._visualVariableAttributes,webStyleCache:this._webStyleCache}))}static _createWorkflowSteps(e,t="awaiting-feature-creation-info"){const{data:a}=e,i=ee(["awaiting-feature-creation-info","creating-features","adding-attachment","editing-attachment"],t,{"awaiting-feature-creation-info":()=>({id:"awaiting-feature-creation-info",async setUp(){const{creationInfo:t,viewModel:i}=a,{view:r}=i;r&&(O(t)?e.addHandles(await j({view:r,data:a,next:()=>e.next(),cancel:()=>i.cancelWorkflow({warnIfNoWorkflow:!1})}),this.id):(a.parent&&t&&e.addHandles(i.restrictFeatureTemplatesViewModelToLayer(t.layer),this.id),e.addHandles(i.featureTemplatesViewModel.on("select",({item:t})=>{t&&(a.creationInfo={...a.creationInfo,layer:t.layer,template:t.template},e.next())}),this.id)))},async tearDown(){e.removeHandles(this.id)}}),"creating-features":()=>({id:"creating-features",async setUp(){e._isActive&&await e._setUpCreatingFeaturesStep()},async tearDown(t){const{viewModel:i}=a;t.canceled&&(e.removeHandles([he,ue,pe,me]),i.attachmentsViewModel.fileInfos.removeAll(),e._attachmentFileInfos.clear())}}),"adding-attachment":()=>({id:"adding-attachment",parent:"creating-features",async setUp(){},async tearDown(){const{attachmentsViewModel:t}=a.viewModel,{graphic:i,fileInfos:r}=t;e._attachmentFileInfos.set(i,r.toArray()),t.mode="view"}}),"editing-attachment":()=>({id:"editing-attachment",parent:"creating-features",async setUp(){},async tearDown(){const{attachmentsViewModel:t}=a.viewModel,{graphic:i,fileInfos:r}=t;e._attachmentFileInfos.set(i,r.toArray()),t.mode="view"}})});return te(a,i)}static _configureSketchViewModel(e){const{data:t,_sketchLayer:a,_sketchViewModel:s,_webStyleCache:o}=e,{creationInfo:n,viewModel:l}=t,{view:d}=l,h=[];if(!d)return i();if("2d"===d.type){n&&h.push(e._fadeExistingFeatures(n.layer));const t=c((e,t)=>Promise.all(e.map(e=>Q(e,o,t))));h.push(u(()=>d.scale,e=>t(a.graphics,e)))}const m=b(t.fullTemplate,n?.attributeOverrides,n?.layer),f=u(()=>s.createGraphic&&s.activeComponent,()=>{s.createGraphic&&s.activeComponent&&!e.hasHandles(pe)&&e._updatingHandles.consumePromise(ae({creationAttributes:m,data:t,sketchViewModel:s,view:d,webStyleCache:o}).then(t=>e.addHandles(t,pe)))}),g=async t=>{if("cancel"!==t.state&&"complete"!==t.state||e.removeHandles(pe),"cancel"===t.state&&null!==d.activeTool&&d.activeTool!==e.sketchViewModel.activeComponent&&(await e._waitForActiveToolCleared(),await e._startCreating()),"complete"===t.state&&t.graphic){const a=await e._processEdits(t.graphic,{scale:"2d"===d.type?d.scale:null,useSourceLayer:!0,webStyleCache:e._webStyleCache});a&&(await e._waitForActiveToolCleared(),await e._startUpdating({feature:a}))}},w=async i=>{const{attachmentsViewModel:r}=l,{_formViewModel:o}=e;if(i.graphics.length>1)return void await e._clearSelectedFeature();const c=i.graphics[0];if("complete"===i.state){const{submittable:t}=o;if(e.numPendingFeatures!==n?.maxFeatures&&t||o.submit(),await e._clearSelectedFeature(),"add"!==r.mode&&"edit"!==r.mode||await(l.activeWorkflow?.previous()),!i.aborted&&d.activeTool===e.sketchViewModel.activeComponent&&(await e.sketchViewModel.wait(),"ready"===e.sketchViewModel.state&&"mesh"!==e.data.creationInfo?.layer.geometryType))return e._startCreating()}else{if("start"===i.state)return c.sourceLayer??=t.creationInfo?.layer,await oe({graphic:c,sketchLayer:a,sketchViewModel:s,visualVariables:e._visualVariableAttributes,webStyleCache:e._webStyleCache,sourceLayer:c.sourceLayer}),e._selectFeatureForUpdate({feature:c});if("active"===i.state){await e.updatePendingFeature(c);const t=e._visualVariableAttributes;ne(d,c,i,t)&&await Q(c,e._webStyleCache,"2d"===d.type?d.scale:null);const a=c.attributes,{rotation:r,size:s}=t;if(null!=r){const{field:e}=r;o.setValue(e,a[e])}if(null!=s){const{field:e}=s;o.setValue(e,a[e])}}}},y=async a=>{if(a.graphics.forEach(e=>{t.removePendingFeature(e)}),!O(t.creationInfo))return e._startCreating()},v=async()=>{if(O(t.creationInfo))try{await e.data.viewModel.back()}catch{}return e._startCreating()};h.push(f,s.on("create",t=>e._updatingHandles.addPromise(g(t))),s.on("update",t=>e._updatingHandles.addPromise(w(t))),s.on("delete",t=>e._updatingHandles.addPromise(y(t))),p(()=>!e.numPendingFeatures,()=>e._updatingHandles.addPromise(v())),i(()=>{s.cancel()}),we(s,a,t),...ye(t));const _=r(h);return s.addHandles(_),_}_initializeSketchViewModel(){const{data:e}=this,{view:t}=e.viewModel,a=new V({elevationInfo:e.creationInfo?.layer.elevationInfo,internal:!0,listMode:"hide",title:"createFeaturesWorkflow-internal"}),r=new de({layer:a,creationMode:"single",sketchOptions:e.sketchOptions,snappingManager:e.snappingManager,useLegacyCreateTools:e.viewModel.useLegacyCreateTools,updateOnGraphicClick:!1,defaultUpdateOptions:this.sketchUpdateOptions,view:t});this._sketchLayer=a,this._sketchViewModel=r,t?.map.add(a),this.addHandles([i(()=>{t?.destroyed||t?.map.remove(a),l(a)}),u(()=>this.numPendingFeatures>0,e=>this._sketchViewModel.updateOnGraphicClick=e,h),u(()=>this.sketchUpdateOptions,e=>{r.defaultUpdateOptions=e,B(r,e)},m)])}_hasValidationErrors(e){return!!e&&(!this.data.isSubmittable(e)||!!this._formViewModel.validateContingencyConstraints(e.attributes,{includeIncompleteViolations:!0})?.length)}async _processEdits(e,t){const{data:a,_formViewModel:i,_sketchLayer:r}=this,{layerInfos:s,view:o}=a.viewModel;i.editType="INSERT",i.map=o?.map,i.spatialReference=o?.spatialReference;const{templateExecutorInfo:n}=a;if(!n){const t=e.clone();return t.geometry=null,await this._addAndInitializeEdits(e,t),e}r.remove(e);const{executor:l}=n,c=l(e.geometry,"completion"),u=d(c)?await c:c;n.completionResults.push(u),ie(u.relationships),i.editType="INSERT",i.map=o?.map,i.spatialReference=o?.spatialReference,u.primary&&a.creationInfo?.attributeOverrides&&(u.primary.graphic.attributes={...u.primary.graphic.attributes,...a.creationInfo.attributeOverrides});for(const d of u.edits){let e=null;if(d.addFeatures)for(const a of d.addFeatures){const i=a.clone();i.geometry=null,null!=a.geometry&&(a.symbol=await T(a,t),r.add(a)),a.sourceLayer!==e?.layer&&(e=J(s,a.sourceLayer));const o=!!u.associationGraphics?.has(a);await this._addAndInitializeEdits(a,i,e,o)}}i.feature=null,await f(()=>!i.updating);return u.edits.reduce((e,t)=>e+(t.addFeatures?.length??0),0)>1?null:u.primary?.graphic}async _addAndInitializeEdits(e,t,a,i=!1){const{data:r,_formViewModel:s}=this,{layerInfos:o}=r.viewModel,n=r.addPendingFeature(e,t,{isAssociation:i});a??=J(o,e.sourceLayer),s.feature=e,s.formTemplate=a?.formTemplate,await f(()=>!s.updating),n.updateAttributes(s.getValues()),n.submittable=s.submittable}async _setUpCreatingFeaturesStep(){if(this.hasHandles(he))return;const{data:e,sketchViewModel:s}=this,{creationInfo:o,viewModel:l}=e,{attachmentsViewModel:d,view:c}=l;if(!c||!o?.layer)throw new a("missing-parameters","CreateFeaturesWorkflow requires a view and creationInfo.");const{initialFeature:p,layer:m}=o,f=[],g=[];this._featureFormHandle=n(this._featureFormHandle),this._visualVariableAttributes={rotation:null,size:null},e.editorItem=W(l.editorItems,o.layer),o.template&&(null==e.fullTemplate&&await this._initializeFullTemplateAndExecutorInfo(e),g.push(i(()=>{e.templateExecutorInfo&&(e.templateExecutorInfo.completionResults=[])}))),s.allowDeleteKey=!e.isSharedTemplateWorkflow,re(d),f.push(u(()=>d.mode,e=>{switch(e){case"add":this.go("adding-attachment");break;case"edit":this.go("editing-attachment")}}));const w=se(c);f.push(w);const y=S(o.layer),{template:v}=o,F=!v||M(v)||_(v)&&"feature"===v.type,I=y&&F;try{if(I){const a=p??new t({attributes:b(e.fullTemplate,o.attributeOverrides,m),sourceLayer:m}),i=await this._processEdits(a);i&&await this._startUpdating({feature:i})}else f.push(ce._configureSketchViewModel(this)),p?(O(o)&&o.geometryToPlace&&(p.attributes=b(e.fullTemplate,o.attributeOverrides,m)),s.addGraphic(p),await this._startUpdating({feature:p})):await this._startCreating()}finally{w.remove()}const V=i(()=>{for(const t of e.pendingFeatures)s.removeGraphic(t),e.removePendingFeature(t)}),k=u(()=>c?.timeZone,e=>{this._formViewModel.timeZone=e,this.data.timeZone=e},h),C=i(()=>{O(o)&&l.cancelWorkflow({warnIfNoWorkflow:!1})});this._featureFormHandle&&f.push(this._featureFormHandle),this.addHandles(f,this._handleKeys.beforeCommit),this.addHandles(g,this._handleKeys.afterCommit),this.addHandles([i(()=>d.fileInfos.removeAll()),r(f),r(g),C,V,k],he)}async _waitForActiveToolCleared(){const e=this.data.viewModel.view;if(null==e?.activeTool)return;const t=new AbortController;this.addHandles(s(t),me),await f(()=>null==e?.activeTool,t.signal),t.abort()}};function we(e,t,a){let s=null;const o=()=>e.snappingOptions.featureSources,n=()=>(s=new U({layer:t}),o().add(s),s),d=()=>{null!=s&&(o().remove(s),s=l(s))};return r([u(()=>{const e=a.creationInfo?.layer,t=o().find(t=>t.layer===e);return{hasFeatureLayerSource:!!t,enabled:t?.enabled??!1}},({hasFeatureLayerSource:e,enabled:t})=>{if(!e)return d();s??=n(),s.enabled=t},g),i(d)])}function ye(e){const t=e.viewModel.view;if(!t)return[];const a=[];if("3d"===t.type){const r=new P({view:t});a.push(u(()=>e.selectedPendingFeature,(e,t)=>{r.remove(e),r.add(t)}),i(()=>r.destroy()))}const r=new P({view:t,highlightName:H});return a.push(u(()=>e.temporaryHighlightFeature,e=>{r.removeAll(),r.add(e)}),i(()=>r.destroy())),a}function ve(e,t,a,i){const r=[];return t.forEach((t,s)=>{if(!t.error){const o=e[s],n=i.get(o)||[];o.attributes[a.objectIdField]=t.objectId,n.forEach(({form:e})=>r.push({feature:o,attachment:e}))}}),r}function _e(e){for(const t of e){const{sourceLayer:e}=t;e&&"globalIdField"in e&&null!=e.globalIdField&&(t.attributes[e.globalIdField]??=w())}}function Fe(e,t){const a=[];if(!t||0===t.size)return{addFeatures:e};for(const[i,r]of t)for(const{file:e}of r)a.push({feature:i,attachment:{globalId:w(),data:e}});return a.length?{addFeatures:e,addAttachments:a}:{addFeatures:e}}function be(e,t){return e.map(e=>{const{addFeatures:a}=e;if(!a||0===a.length)return e;const i=[];for(const r of a){const e=t.get(r);if(e)for(const{file:t}of e)i.push({feature:r,attachment:{globalId:w(),data:t}})}return i.length?{...e,addAttachments:i}:e})}e([y()],ge.prototype,"allowSave",null),e([y()],ge.prototype,"createFeatureState",void 0),e([y()],ge.prototype,"curveResizeDisabled",null),e([y()],ge.prototype,"curveUpdatesDisabled",null),e([y()],ge.prototype,"data",void 0),e([y({constructOnly:!0})],ge.prototype,"isNested",void 0),e([y()],ge.prototype,"formViewModel",null),e([y()],ge.prototype,"hasInvalidFormTemplate",null),e([y()],ge.prototype,"hasPendingEdits",null),e([y()],ge.prototype,"hasPreviousStep",null),e([y()],ge.prototype,"_getDrawMeshHelpMessage",void 0),e([y()],ge.prototype,"helpMessage",null),e([y()],ge.prototype,"noticeMessage",null),e([y()],ge.prototype,"layer",null),e([y()],ge.prototype,"parent",null),e([y()],ge.prototype,"keyboardCancellationEnabled",null),e([y()],ge.prototype,"reliesOnOwnerAdminPrivileges",null),e([y()],ge.prototype,"saveActionLabel",null),e([y()],ge.prototype,"shouldShowAttachments",null),e([y()],ge.prototype,"shouldAllowAttachmentEditing",null),e([y()],ge.prototype,"sketchUpdateOptions",null),e([y()],ge.prototype,"sketchViewModel",null),e([y()],ge.prototype,"availableCreateTools",null),e([y()],ge.prototype,"_attachmentsActive",null),ge=ce=e([v("esri.widgets.Editor.CreateFeaturesWorkflow")],ge);const Me=ge;export{Me as default};
2
+ import{__decorate as e}from"tslib";import t from"../../Graphic.js";import a from"../../core/Error.js";import{makeHandle as i,handlesGroup as r,abortHandle as s}from"../../core/handleUtils.js";import"../../core/has.js";import o from"../../core/Logger.js";import{removeMaybe as n,destroyMaybe as l}from"../../core/maybe.js";import{isPromiseLike as d,debounce as c}from"../../core/promiseUtils.js";import{watch as u,when as p,initial as h,sync as m,whenOnce as f,syncAndInitial as g}from"../../core/reactiveUtils.js";import{generateBracedUUID as w}from"../../core/uuid.js";import{property as y,subclass as v}from"../../core/accessorSupport/decorators.js";import{isSharedTemplateOrMetadata as _,isSharedTemplate as F,getCreationAttributes as b,isStandardFeatureTemplate as M}from"../../editing/templateUtils.js";import{getFullTemplate as I}from"../../editing/sharedTemplates/templateLoader.js";import V from"../../layers/GraphicsLayer.js";import{isSceneLayer as k,isTable as S}from"../../layers/support/layerUtils.js";import{isNumber as C}from"../../support/guards.js";import{getDisplayedSymbol as T}from"../../symbols/support/symbolUtils.js";import{getDrawHelpMessage as A}from"../../views/draw/support/helpMessageUtils.js";import P from"../../views/draw/support/HighlightHelper.js";import E from"../../views/interactive/sketch/SketchOptions.js";import U from"../../views/interactive/snapping/FeatureSnappingLayerSource.js";import{temporaryHighlightName as H}from"../../views/support/HighlightDefaults.js";import L from"./CreateFeaturesWorkflowData.js";import{isModelUpload as O,handleModelUpload as j}from"./modelUploadUtils.js";import x from"./Workflow.js";import{activeSketchToolDrawsUnsupportedCurve as D,createToolFromGeometryType as z,containsUnsupportedCurve as R,findEditorItemForLayer as W,getServiceEditsFromWorkflowData as G,getServiceInfoForLayer as N,orderEditsByRelationshipDependencies as K,getServiceLayersById as Z,startCreatingNewFeature as q,syncUpdateOptions as B,findLayerInfo as J,updateGraphicSymbolWhenRequired as Q,isTerminalUpdateEventType as X,getVisualVariableAttributes as Y,startUpdatingFeatureGeometry as $,createWorkflowSteps as ee,avoidFeatureTemplateSelectionWithOnlyOneItem as te,setUpSketchCreateWatchers as ae,setRelationshipFields as ie,prepareAttachmentsForCreateFeaturesWorkflow as re,showProgressCursor as se,setVisualVariablesAndElevationInfoForUpdate as oe,visualVariableInteractiveUpdate as ne}from"./workflowUtils.js";import le from"../FeatureForm/FeatureFormViewModel.js";import de from"../Sketch/SketchViewModel.js";var ce;const ue=Symbol(),pe=Symbol(),he=Symbol(),me=Symbol(),fe={point:["point"],multipoint:["multipoint"],polygon:["polygon","freehandPolygon","rectangle","circle"],polyline:["polyline","freehandPolyline"],mesh:[],multipatch:[]};let ge=ce=class extends x{constructor(e){super(e),this.type="create-features",this.createFeatureState="create-new",this.data=void 0,this.isNested=!1,this._getDrawMeshHelpMessage=void 0,this._webStyleCache=new Map,this._featureFormHandle=null,this._visualVariableAttributes={rotation:null,size:null},this._formViewModel=new le,this._sketchLayer=null,this._sketchViewModel=null,this._attachmentFileInfos=new Map,this._isActive=!0}initialize(){this.isNested&&(this._isActive=!1),this._initializeSketchViewModel()}destroy(){this._sketchViewModel.destroy()}get allowSave(){return!this.updating}get curveResizeDisabled(){return this.data.curveResizeDisabled}get curveUpdatesDisabled(){return this.data.curveUpdatesDisabled}get formViewModel(){return this._formViewModel}get hasInvalidFormTemplate(){return!!this.data.editorItem?.hasInvalidFormTemplate}get hasPendingEdits(){if(this.pendingFeatures.some(e=>!!this.data.getEditsForPendingFeature(e)?.modified))return!0;const{creationInfo:e,upload:t}=this.data,{activeComponent:a,createGraphic:i}=this._sketchViewModel,r=i?.geometry?.type;return!("polyline"!==r&&"polygon"!==r&&"multipoint"!==r||"draw-2d"!==a?.type&&"draw-3d"!==a?.type)&&a.drawOperation.committedVertices.length>0||(!(!t||"pending"!==t.state&&"success"!==t.state)||!!e?.geometryToPlace)}get hasPreviousStep(){return this._stepIndex>0||"update-pending"===this.createFeatureState&&!!this.data.selectedPendingFeature&&!this.parent&&!O(this.data.creationInfo)}get helpMessage(){const{creationInfo:e,viewModel:t}=this.data;if("creating-features"!==this.stepId||!e)return;const{_sketchViewModel:a}=this,{drawTool:i,isUsingLegacyCreateTools:r}=a;if(!r)return i?.helpMessageKey??"noTool";const s=e.layer.geometryType,o=a.createGraphic;if("mesh"===s){this._getDrawMeshHelpMessage||import("../../views/draw/support/helpMessageUtils3d.js").then(e=>{this._getDrawMeshHelpMessage=e.getDrawMeshHelpMessage});const{view:e}=t;return"3d"===e?.type?this._getDrawMeshHelpMessage?.(o,e):void 0}const{activeCreateToolDrawMode:n,activeTool:l}=a;return A("rectangle"===l||"circle"===l?l:s,o?.geometry,n)}get noticeMessage(){if(D(this._sketchViewModel,this.data.editorItem))return"curveToolDensifyWarning"}get layer(){return this.data.creationInfo?.layer}get numPendingFeatures(){return this.pendingFeatures.length}get numPendingFeaturesExcludingHidden(){return this.pendingFeatures.filter(e=>this.data.isDisplayable(e)).length}get parent(){return this.data.parent}get pendingFeatures(){return this.data.pendingFeatures}get keyboardCancellationEnabled(){return 0===this.numPendingFeatures}get reliesOnOwnerAdminPrivileges(){return this.data.editorItem?.capabilities.create.reliesOnOwnerAdminPrivileges??!1}get saveActionLabel(){return"create"}get shouldShowAttachments(){return(this.data.selectedPendingFeature&&this.data.editorItem?.capabilities.create.attachments.enabled)??!1}get shouldAllowAttachmentEditing(){return this.shouldShowAttachments}get sketchUpdateOptions(){const{editorItem:e}=this.data;return{enableScaling:!this.curveResizeDisabled,multipleSelectionEnabled:!1,reshapeOptions:{enableCreateCurveFromStraightEdge:!k(e?.layer)&&!!e?.capabilities.supportsTrueCurve}}}get sketchViewModel(){return this._sketchViewModel}get test(){}get availableCreateTools(){const e=this.data.creationInfo?.layer.geometryType,t=this.data.viewModel.view;if(!e)return[];if(this.data.creationInfo?.maxFeatures&&this.data.creationInfo.maxFeatures<=this.numPendingFeatures)return[];if(_(this.data.fullTemplate)){const{tool:t}=z(e,this.data.fullTemplate);return[t]}return"2d"!==t?.type&&"multipoint"===e?[]:[...fe[e]]}get _attachmentsActive(){const e=this.data.viewModel.attachmentsViewModel.mode,t=this.stepId;return this.shouldShowAttachments&&("add"===e||"edit"===e||"adding-attachment"===t||"editing-attachment"===t)}getUpdating(){return!!this._sketchViewModel?.updating}async enter(){this._isActive=!0,"awaiting-feature-creation-info"!==this.stepId&&await this._updatingHandles.addPromise(this._setUpCreatingFeaturesStep())}exit(){this._isActive=!1,this.removeHandles([he])}async updatePendingFeature(e){if(e!==this.data.selectedPendingFeature)return this._sketchViewModel.cancel(),this._startUpdating({feature:e})}async start(){return await super.start(),S(this.data.creationInfo?.layer)?null:{enter:async()=>{},exit:async()=>{},viewModel:this._sketchViewModel}}async save(e){const{formViewModel:t}=this;if(t.pendingSubtypeChoice)return;t.submit(),this._stashValidationState();const a=this.data.selectedPendingFeature,i=this._hasValidationErrors(a)?a:this.data.pendingFeatures.find(e=>this._hasValidationErrors(e));if(i)return await this._startUpdating({feature:i}),void t?.submit();const{pendingFeatures:r,editorItem:s}=this.data;if(s&&e&&R(r.toArray(),s)){if(!await e("curveEditingDensifyPrompt"))return this.reset()}return super.save()}back(e){return"update-pending"!==this.createFeatureState||!this.data.selectedPendingFeature||O(this.data.creationInfo)||this._attachmentsActive||this.parent?super.back(e):this._clearSelectedFeature()}previous(e){return"update-pending"!==this.createFeatureState||!this.data.selectedPendingFeature||O(this.data.creationInfo)||this._attachmentsActive?super.previous(e):this._clearSelectedFeature()}cancelFeature(e){this.data.isSharedTemplateWorkflow?o.getLogger(this).warn("Cannot cancel individual features created by shared templates."):(this.data.removePendingFeature(e),this.sketchViewModel.removeGraphic(e))}static create(e){const{addAttachmentsCallback:t,applyEdits:a,applyEditsFeatureService:i,isNested:r,creationInfo:s,parent:o,snappingManager:n,startAt:l,viewModel:d}=e,c=e.sketchOptions??new E,u=s?.layer,p=u?W(d.editorItems,u):void 0,h=new ce({data:new L({creationInfo:s,editorItem:p,parent:o,sketchOptions:c,snappingManager:n,viewModel:d}),isNested:r,onCommit:async e=>{const{creationInfo:r}=e;if(!r)return;h._sketchViewModel.cancel();const s=e.pendingFeatures.toArray(),{layer:o}=r,n=o.capabilities?.editing.supportsGlobalId&&"globalIdField"in o,l=h._attachmentFileInfos,{fullTemplate:c}=e,u=G(h.data),p=F(c)&&u;if(n){if(_e(s),p){let t=be(u,l);const a=await(N(o,d.view)?.load());a&&(t=K({edits:t,serviceInfo:a,view:d.view,findOriginalFeature:t=>e.getEditsForPendingFeature(t)?.initialFeature??t})),await i(c.featureService,t,{globalIdUsed:!0,honorSequenceOfEdits:!0,gdbVersion:c.layer.gdbVersion??void 0})}else{const e=Fe(s,l);await a(o,e,{globalIdUsed:!0})}return}const m=p?await i(c.featureService,u,{gdbVersion:c.layer.gdbVersion??void 0}):[await a(o,{addFeatures:s})];m&&l.size>0&&await Promise.all(m.map(e=>{if(e?.addFeatureResults)return t(o,ve(s,e.addFeatureResults,o,l))}))}});return h._set("steps",this._createWorkflowSteps(h,l)),h}_fadeExistingFeatures(e){if("effect"in e){const t=e.effect;return e.effect="saturate(0.6) opacity(0.8)",i(()=>e.effect=t)}const t=e.opacity;return e.opacity=.7,i(()=>e.opacity=t)}async _initializeFullTemplateAndExecutorInfo(e){const{creationInfo:t}=e,{view:a}=e.viewModel;if(!t||!a)return null;const i=await I(a,t.template);if(e.fullTemplate=i,i&&F(i)){const{createTemplateExecutor:r}=await import("../../editing/sharedTemplates/executor/createTemplateExecutor.js"),s={completionResults:[],executor:await r(i),serviceLayersById:Z(t.layer,a)};e.templateExecutorInfo=s}return i}async _startCreating(){this.removeHandles(pe);const{data:e}=this;if(!e.creationInfo)return;const t=this.data.creationInfo?.maxFeatures;if(t&&this.numPendingFeatures>=t)return this.sketchViewModel.cancel(),void(this.numPendingFeatures&&await this._startUpdating({feature:this.pendingFeatures.at(-1)}));this.createFeatureState="create-new",await q(this._sketchViewModel,this._sketchLayer,e,this._webStyleCache)}async _clearSelectedFeature(){const e=this._formViewModel.pendingSubtypeChoice;e&&(e.resolve("undo"),await e.promise),this._stashValidationState(),this.sketchViewModel.cancel(),this.data.selectedPendingFeature=null,this._featureFormHandle=n(this._featureFormHandle),this._formViewModel.feature=null;const t=this.data.viewModel.attachmentsViewModel;"add"!==t.mode&&"edit"!==t.mode||await(this.data.viewModel.activeWorkflow?.previous())}_stashValidationState(){const e=this._formViewModel.feature,t=e&&this.data.getEditsForPendingFeature(e);t&&(t.submittable=this._formViewModel.submittable)}async _selectFeatureForUpdate({feature:e,initialFeature:t=e}){this._stashValidationState();const{data:a,pendingFeatures:i,_webStyleCache:s}=this;i.includes(e)||a.addPendingFeature(e,t),a.selectedPendingFeature=e;const{_formViewModel:o,_sketchViewModel:l,sketchUpdateOptions:d}=this,{creationInfo:c,viewModel:p}=a,{attachmentsViewModel:h,layerInfos:m,view:f}=p;if(!f||!c)return;B(l,d),n(this._featureFormHandle);const g=e.sourceLayer,w=J(m,g),y=w?.formTemplate,v=f.spatialReference;o.set({editType:"INSERT",feature:e,formTemplate:y,spatialReference:v,map:f.map}),"add"!==h.mode&&"edit"!==h.mode||await(p.activeWorkflow?.previous()),h.graphic=e,h.fileInfos.removeAll(),h.mode="view";(this._attachmentFileInfos.get(e)||[]).forEach(({file:e,form:t})=>h.addFile(e,t)),await Q(e,s,"2d"===f.type?f.scale:null);const _=a.getEditsForPendingFeature(e);this._featureFormHandle=r([o.on("value-change",async({fieldName:t,value:a})=>{if(_?.updateAttributes(o.getValues()),C(a)){const e=this._visualVariableAttributes;e.size&&!e.size.isUpdatingInteractively&&t===e.size.field&&e.size.setInitialValue(a),e.rotation&&!e.rotation.isUpdatingInteractively&&t===e.rotation.field&&e.rotation.setInitialValue(a)}await Q(e,s,"2d"===f.type?f.scale:null)}),l.on(["update","undo","redo"],e=>{("undo"===e.type||"redo"===e.type||"update"===e.type&&null!=e.toolEventInfo&&X(e.toolEventInfo.type))&&o.notifyFeatureGeometryChanged()}),u(()=>o.feature?.sourceLayer,t=>e.sourceLayer=t),u(()=>[o.feature,o.submittable],()=>this._stashValidationState())]),this.createFeatureState="update-pending"}async _startUpdating({feature:e,initialFeature:t=e}){await this._selectFeatureForUpdate({feature:e,initialFeature:t});const{_sketchLayer:a,_sketchViewModel:i,data:r}=this,{creationInfo:s,viewModel:o}=r,{view:n}=o;if(!n||!s)return;const l=e.sourceLayer??s.layer;return S(l)?void 0:(this._visualVariableAttributes=Y(e),$({graphic:e,sketchLayer:a,sketchViewModel:i,sourceLayer:l,updateOptions:this.sketchUpdateOptions,visualVariables:this._visualVariableAttributes,webStyleCache:this._webStyleCache}))}static _createWorkflowSteps(e,t="awaiting-feature-creation-info"){const{data:a}=e,i=ee(["awaiting-feature-creation-info","creating-features","adding-attachment","editing-attachment"],t,{"awaiting-feature-creation-info":()=>({id:"awaiting-feature-creation-info",async setUp(){const{creationInfo:t,viewModel:i}=a,{view:r}=i;r&&(O(t)?e.addHandles(await j({view:r,data:a,next:()=>e.next(),cancel:()=>i.cancelWorkflow({warnIfNoWorkflow:!1})}),this.id):(a.parent&&t&&e.addHandles(i.restrictFeatureTemplatesViewModelToLayer(t.layer),this.id),e.addHandles(i.featureTemplatesViewModel.on("select",({item:t})=>{t&&(a.creationInfo={...a.creationInfo,layer:t.layer,template:t.template},e.next())}),this.id)))},async tearDown(){e.removeHandles(this.id)}}),"creating-features":()=>({id:"creating-features",async setUp(){e._isActive&&await e._setUpCreatingFeaturesStep()},async tearDown(t){const{viewModel:i}=a;t.canceled&&(e.removeHandles([he,ue,pe,me]),i.attachmentsViewModel.fileInfos.removeAll(),e._attachmentFileInfos.clear())}}),"adding-attachment":()=>({id:"adding-attachment",parent:"creating-features",async setUp(){},async tearDown(){const{attachmentsViewModel:t}=a.viewModel,{graphic:i,fileInfos:r}=t;e._attachmentFileInfos.set(i,r.toArray()),t.mode="view"}}),"editing-attachment":()=>({id:"editing-attachment",parent:"creating-features",async setUp(){},async tearDown(){const{attachmentsViewModel:t}=a.viewModel,{graphic:i,fileInfos:r}=t;e._attachmentFileInfos.set(i,r.toArray()),t.mode="view"}})});return te(a,i)}static _configureSketchViewModel(e){const{data:t,_sketchLayer:a,_sketchViewModel:s,_webStyleCache:o}=e,{creationInfo:n,viewModel:l}=t,{view:d}=l,h=[];if(!d)return i();if("2d"===d.type){n&&h.push(e._fadeExistingFeatures(n.layer));const t=c((e,t)=>Promise.all(e.map(e=>Q(e,o,t))));h.push(u(()=>d.scale,e=>t(a.graphics,e)))}const m=b(t.fullTemplate,n?.attributeOverrides,n?.layer),f=u(()=>s.createGraphic&&s.activeComponent,()=>{s.createGraphic&&s.activeComponent&&!e.hasHandles(pe)&&e._updatingHandles.consumePromise(ae({creationAttributes:m,data:t,sketchViewModel:s,view:d,webStyleCache:o}).then(t=>e.addHandles(t,pe)))}),g=async t=>{if("cancel"!==t.state&&"complete"!==t.state||e.removeHandles(pe),"cancel"===t.state&&null!==d.activeTool&&d.activeTool!==e.sketchViewModel.activeComponent&&(await e._waitForActiveToolCleared(),await e._startCreating()),"complete"===t.state&&t.graphic){const a=await e._processEdits(t.graphic,{scale:"2d"===d.type?d.scale:null,useSourceLayer:!0,webStyleCache:e._webStyleCache});a&&(await e._waitForActiveToolCleared(),await e._startUpdating({feature:a}))}},w=async i=>{const{attachmentsViewModel:r}=l,{_formViewModel:o}=e;if(i.graphics.length>1)return void await e._clearSelectedFeature();const c=i.graphics[0];if("complete"===i.state){const{submittable:t}=o;if(e.numPendingFeatures!==n?.maxFeatures&&t||o.submit(),await e._clearSelectedFeature(),"add"!==r.mode&&"edit"!==r.mode||await(l.activeWorkflow?.previous()),!i.aborted&&d.activeTool===e.sketchViewModel.activeComponent&&(await e.sketchViewModel.wait(),"ready"===e.sketchViewModel.state&&"mesh"!==e.data.creationInfo?.layer.geometryType))return e._startCreating()}else{if("start"===i.state)return c.sourceLayer??=t.creationInfo?.layer,await oe({graphic:c,sketchLayer:a,sketchViewModel:s,visualVariables:e._visualVariableAttributes,webStyleCache:e._webStyleCache,sourceLayer:c.sourceLayer}),e._selectFeatureForUpdate({feature:c});if("active"===i.state){await e.updatePendingFeature(c);const t=e._visualVariableAttributes;ne(d,c,i,t)&&await Q(c,e._webStyleCache,"2d"===d.type?d.scale:null);const a=c.attributes,{rotation:r,size:s}=t;if(null!=r){const{field:e}=r;o.setValue(e,a[e])}if(null!=s){const{field:e}=s;o.setValue(e,a[e])}}}},y=async a=>{if(a.graphics.forEach(e=>{t.removePendingFeature(e)}),!O(t.creationInfo))return e._startCreating()},v=async()=>{if(O(t.creationInfo))try{await e.data.viewModel.back()}catch{}return e._startCreating()};h.push(f,s.on("create",t=>e._updatingHandles.addPromise(g(t))),s.on("update",t=>e._updatingHandles.addPromise(w(t))),s.on("delete",t=>e._updatingHandles.addPromise(y(t))),p(()=>!e.numPendingFeatures,()=>e._updatingHandles.addPromise(v())),i(()=>{s.cancel()}),we(s,a,t),...ye(t));const _=r(h);return s.addHandles(_),_}_initializeSketchViewModel(){const{data:e}=this,{view:t}=e.viewModel,a=new V({elevationInfo:e.creationInfo?.layer.elevationInfo,internal:!0,listMode:"hide",title:"createFeaturesWorkflow-internal"}),r=new de({layer:a,creationMode:"single",sketchOptions:e.sketchOptions,snappingManager:e.snappingManager,useLegacyCreateTools:e.viewModel.useLegacyCreateTools,updateOnGraphicClick:!1,defaultUpdateOptions:this.sketchUpdateOptions,view:t});this._sketchLayer=a,this._sketchViewModel=r,t?.map.add(a),this.addHandles([i(()=>{t?.destroyed||t?.map.remove(a),l(a)}),u(()=>this.numPendingFeatures>0,e=>this._sketchViewModel.updateOnGraphicClick=e,h),u(()=>this.sketchUpdateOptions,e=>{r.defaultUpdateOptions=e,B(r,e)},m)])}_hasValidationErrors(e){return!!e&&(!this.data.isSubmittable(e)||!!this._formViewModel.validateContingencyConstraints(e.attributes,{includeIncompleteViolations:!0})?.length)}async _processEdits(e,t){const{data:a,_formViewModel:i,_sketchLayer:r}=this,{layerInfos:s,view:o}=a.viewModel;i.editType="INSERT",i.map=o?.map,i.spatialReference=o?.spatialReference;const{templateExecutorInfo:n}=a;if(!n){const t=e.clone();return t.geometry=null,await this._addAndInitializeEdits(e,t),e}r.remove(e);const{executor:l}=n,c=l(e.geometry,"completion"),u=d(c)?await c:c;n.completionResults.push(u),ie(u.relationships),i.editType="INSERT",i.map=o?.map,i.spatialReference=o?.spatialReference,u.primary&&a.creationInfo?.attributeOverrides&&(u.primary.graphic.attributes={...u.primary.graphic.attributes,...a.creationInfo.attributeOverrides});for(const d of u.edits){let e=null;if(d.addFeatures)for(const a of d.addFeatures){const i=a.clone();i.geometry=null,null!=a.geometry&&(a.symbol=await T(a,t),r.add(a)),a.sourceLayer!==e?.layer&&(e=J(s,a.sourceLayer));const o=!!u.associationGraphics?.has(a);await this._addAndInitializeEdits(a,i,e,o)}}i.feature=null,await f(()=>!i.updating);return u.edits.reduce((e,t)=>e+(t.addFeatures?.length??0),0)>1?null:u.primary?.graphic}async _addAndInitializeEdits(e,t,a,i=!1){const{data:r,_formViewModel:s}=this,{layerInfos:o}=r.viewModel,n=r.addPendingFeature(e,t,{isAssociation:i});a??=J(o,e.sourceLayer),s.feature=e,s.formTemplate=a?.formTemplate,await f(()=>!s.updating),n.updateAttributes(s.getValues()),n.submittable=s.submittable}async _setUpCreatingFeaturesStep(){if(this.hasHandles(he))return;const{data:e,sketchViewModel:s}=this,{creationInfo:o,viewModel:l}=e,{attachmentsViewModel:d,view:c}=l;if(!c||!o?.layer)throw new a("missing-parameters","CreateFeaturesWorkflow requires a view and creationInfo.");const{initialFeature:p,layer:m}=o,f=[],g=[];this._featureFormHandle=n(this._featureFormHandle),this._visualVariableAttributes={rotation:null,size:null},e.editorItem=W(l.editorItems,o.layer),o.template&&(null==e.fullTemplate&&await this._initializeFullTemplateAndExecutorInfo(e),g.push(i(()=>{e.templateExecutorInfo&&(e.templateExecutorInfo.completionResults=[])}))),s.allowDeleteKey=!e.isSharedTemplateWorkflow,re(d),f.push(u(()=>d.mode,e=>{switch(e){case"add":this.go("adding-attachment");break;case"edit":this.go("editing-attachment")}}));const w=se(c);f.push(w);const y=S(o.layer),{template:v}=o,F=!v||M(v)||_(v)&&"feature"===v.type,I=y&&F;try{if(I){const a=p??new t({attributes:b(e.fullTemplate,o.attributeOverrides,m),sourceLayer:m}),i=await this._processEdits(a);i&&await this._startUpdating({feature:i})}else f.push(ce._configureSketchViewModel(this)),p?(O(o)&&o.geometryToPlace&&(p.attributes=b(e.fullTemplate,o.attributeOverrides,m)),s.addGraphic(p),await this._startUpdating({feature:p})):await this._startCreating()}finally{w.remove()}const V=i(()=>{for(const t of e.pendingFeatures)s.removeGraphic(t),e.removePendingFeature(t)}),k=u(()=>c?.timeZone,e=>{this._formViewModel.timeZone=e,this.data.timeZone=e},h),C=i(()=>{O(o)&&l.cancelWorkflow({warnIfNoWorkflow:!1})});this._featureFormHandle&&f.push(this._featureFormHandle),this.addHandles(f,this._handleKeys.beforeCommit),this.addHandles(g,this._handleKeys.afterCommit),this.addHandles([i(()=>d.fileInfos.removeAll()),r(f),r(g),C,V,k],he)}async _waitForActiveToolCleared(){const e=this.data.viewModel.view;if(null==e?.activeTool)return;const t=new AbortController;this.addHandles(s(t),me),await f(()=>null==e?.activeTool,t.signal),t.abort()}};function we(e,t,a){let s=null;const o=()=>e.snappingOptions.featureSources,n=()=>(s=new U({layer:t}),o().add(s),s),d=()=>{null!=s&&(o().remove(s),s=l(s))};return r([u(()=>{const e=a.creationInfo?.layer,t=o().find(t=>t.layer===e);return{hasFeatureLayerSource:!!t,enabled:t?.enabled??!1}},({hasFeatureLayerSource:e,enabled:t})=>{if(!e)return d();s??=n(),s.enabled=t},g),i(d)])}function ye(e){const t=e.viewModel.view;if(!t)return[];const a=[];if("3d"===t.type){const r=new P({view:t});a.push(u(()=>e.selectedPendingFeature,(e,t)=>{r.remove(e),r.add(t)}),i(()=>r.destroy()))}const r=new P({view:t,highlightName:H});return a.push(u(()=>e.temporaryHighlightFeature,e=>{r.removeAll(),r.add(e)}),i(()=>r.destroy())),a}function ve(e,t,a,i){const r=[];return t.forEach((t,s)=>{if(!t.error){const o=e[s],n=i.get(o)||[];o.attributes[a.objectIdField]=t.objectId,n.forEach(({form:e})=>r.push({feature:o,attachment:e}))}}),r}function _e(e){for(const t of e){const{sourceLayer:e}=t;e&&"globalIdField"in e&&null!=e.globalIdField&&(t.attributes[e.globalIdField]??=w())}}function Fe(e,t){const a=[];if(!t||0===t.size)return{addFeatures:e};for(const[i,r]of t)for(const{file:e}of r)a.push({feature:i,attachment:{globalId:w(),data:e}});return a.length?{addFeatures:e,addAttachments:a}:{addFeatures:e}}function be(e,t){return e.map(e=>{const{addFeatures:a}=e;if(!a||0===a.length)return e;const i=[];for(const r of a){const e=t.get(r);if(e)for(const{file:t}of e)i.push({feature:r,attachment:{globalId:w(),data:t}})}return i.length?{...e,addAttachments:i}:e})}e([y()],ge.prototype,"allowSave",null),e([y()],ge.prototype,"createFeatureState",void 0),e([y()],ge.prototype,"curveResizeDisabled",null),e([y()],ge.prototype,"curveUpdatesDisabled",null),e([y()],ge.prototype,"data",void 0),e([y({constructOnly:!0})],ge.prototype,"isNested",void 0),e([y()],ge.prototype,"formViewModel",null),e([y()],ge.prototype,"hasInvalidFormTemplate",null),e([y()],ge.prototype,"hasPendingEdits",null),e([y()],ge.prototype,"hasPreviousStep",null),e([y()],ge.prototype,"_getDrawMeshHelpMessage",void 0),e([y()],ge.prototype,"helpMessage",null),e([y()],ge.prototype,"noticeMessage",null),e([y()],ge.prototype,"layer",null),e([y()],ge.prototype,"parent",null),e([y()],ge.prototype,"keyboardCancellationEnabled",null),e([y()],ge.prototype,"reliesOnOwnerAdminPrivileges",null),e([y()],ge.prototype,"saveActionLabel",null),e([y()],ge.prototype,"shouldShowAttachments",null),e([y()],ge.prototype,"shouldAllowAttachmentEditing",null),e([y()],ge.prototype,"sketchUpdateOptions",null),e([y()],ge.prototype,"sketchViewModel",null),e([y()],ge.prototype,"availableCreateTools",null),e([y()],ge.prototype,"_attachmentsActive",null),ge=ce=e([v("esri.widgets.Editor.CreateFeaturesWorkflow")],ge);const Me=ge;export{Me as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../../core/Error.js";import{makeHandle as i}from"../../core/handleUtils.js";import"../../core/has.js";import{destroyMaybe as s}from"../../core/maybe.js";import{watch as a,sync as o}from"../../core/reactiveUtils.js";import{property as r,subclass as l}from"../../core/accessorSupport/decorators.js";import d from"../../layers/GraphicsLayer.js";import{isSceneLayer as h}from"../../layers/support/layerUtils.js";import{highlightsSupported as n}from"../../views/support/layerViewUtils.js";import c from"./UpdateFeatureWorkflowData.js";import{UpdateRecordWorkflow as p,handleKeys as u}from"./UpdateRecordWorkflow.js";import{getVisualVariableAttributes as w,setUpGeometryUpdate as y,syncUpdateOptions as m,updateGraphicSymbolWhenRequired as f,swapForEditingSession as k,cloneGraphicExceptMesh as g,canCreateInteractiveEditSession as _,isTerminalUpdateEventType as v}from"./workflowUtils.js";import V from"../Sketch/SketchViewModel.js";var b;const S={...u,highlights:Symbol(),sketchGraphics:Symbol(),sketchViewModel:Symbol(),waitingForTool:Symbol()};let M=b=class extends p{constructor(e){super(e),this.type="update-feature",this._layerViewEditSession=null,this._sketchGraphicClone=null,this._sketchLayer=null,this._sketchViewModel=null,this._webStyleCache=new Map}destroy(){this._layerViewEditSession?.rollback()}get curveResizeDisabled(){return this.data.curveResizeDisabled}get curveUpdatesDisabled(){return this.data.curveUpdatesDisabled}get sketchUpdateOptions(){const{capabilities:e,layer:t}=this.data.editorItem;return{enableScaling:!this.curveResizeDisabled,multipleSelectionEnabled:!1,reshapeOptions:{enableCreateCurveFromStraightEdge:!h(t)&&e.supportsTrueCurve}}}get supportsSplitFeatureWorkflow(){return this.data.supportsSplitFeatureWorkflow}get viewGraphic(){return this._sketchViewModel?this._sketchGraphicClone:this.data.edits.feature??this.fullFeature}async commit(){this.removeHandles(S.sketchGraphics);try{const e=this.data.edits.stagedForDelete;await super.commit();const t=this._layerViewEditSession;e?t?.rollback():t?.commit()}catch(e){throw await this._configureSketchViewModel(),new t("editor-workflow:failed-to-commit","An error occurred when sending the updates to the service",{error:e})}}async start(){return await super.start(),await this._initializeSketchViewModel()}_initializeFormViewModel(){super._initializeFormViewModel(),this.addHandles([this._formViewModel.on("value-change",e=>{this._layerViewEditSession?.setAttribute(e.fieldName,e.value)}),a(()=>this._formViewModel.feature?.sourceLayer,e=>this._sketchGraphicClone.sourceLayer=e)])}_configureHighlight(){const{edits:e,layerView:t}=this.data;n(t)&&this.addHandles(t.highlight(e.feature),S.highlights)}async _configureSketchViewModel(){const{_sketchLayer:e,_sketchViewModel:t}=this;if(!t||!e)return;const{data:i,_formViewModel:s,_sketchGraphicClone:a}=this,{edits:o,viewModel:r}=i,l=o.feature,{view:d}=r,h=w(l),n=await y({feature:l,featureClone:a,visualVariableAttributes:h,sketchLayer:e,sketchViewModel:t,getUpdateOptions:()=>this.sketchUpdateOptions,view:d,webStyleCache:this._webStyleCache,onUpdate:({geometry:e,attributes:t},i)=>{if(o.updateAttributes(t),o.updateGeometry(e),s.feature&&(s.feature.geometry=e),null!=h.rotation){const{field:e}=h.rotation;s.setValue(e,t[e])}if(null!=h.size){const{field:e}=h.size;s.setValue(e,t[e])}("undo"===i.type||"redo"===i.type||"update"===i.type&&null!=i.toolEventInfo&&v(i.toolEventInfo.type))&&s.notifyFeatureGeometryChanged()},addUpdatingPromise:e=>{this._updatingHandles.consumePromise(e)},addHandle:e=>{this.addHandles(e,S.waitingForTool)}});this.addHandles(n,S.sketchGraphics),t.addHandles(n)}async _initializeSketchViewModel(){const{data:e,_sketchGraphicClone:t}=this,{readOnly:r}=e,l=e.edits.feature,{capabilities:h,layer:n}=e.editorItem,c=e.viewModel.view;if(this.removeHandles([S.highlights,S.sketchGraphics,S.sketchViewModel,S.waitingForTool]),!h.update.geometry||r||this.curveUpdatesDisabled)return{enter:async()=>{this.hasHandles(S.highlights)||this._configureHighlight()},exit:()=>this.removeHandles([S.highlights])};const p=new d({elevationInfo:n.elevationInfo,internal:!0,listMode:"hide",title:"updateFeaturesWorkflow-internal"}),u=new V({allowDeleteKey:!1,layer:p,sketchOptions:e.sketchOptions,snappingManager:e.snappingManager,useLegacyCreateTools:e.viewModel.useLegacyCreateTools,updateOnGraphicClick:!1,defaultUpdateOptions:this.sketchUpdateOptions,view:c});return this._sketchLayer=p,this._sketchViewModel=u,c?.map.add(p),await(c?.whenLayerView(p)),this.addHandles([i(()=>{c?.destroyed||c?.map.remove(p),p.destroyed||p.destroy(),this._sketchViewModel=s(u)}),a(()=>this.sketchUpdateOptions,e=>{u.defaultUpdateOptions=e,m(u,e)},o)],S.sketchViewModel),await f(t,this._webStyleCache,"2d"===c?.type?c.scale:null),this.addHandles([await k(p,c,l,t)]),{enter:async()=>{this.hasHandles(S.sketchGraphics)||await this._configureSketchViewModel()},exit:()=>this.removeHandles([S.sketchGraphics]),viewModel:u}}_onFullFeatureLoaded(e){super._onFullFeatureLoaded(e);const t=this._sketchGraphicClone=g(e),{edits:i,layerView:s}=this.data;i.updateGeometry(e.geometry),i.trackChanges(),_(s)&&(this._layerViewEditSession=s.createInteractiveEditSession(t))}static async create(e){const t=new b({data:await c.create(e),onCommit:this._onCommitFactory(e.applyEdits)});return t._set("steps",this._createWorkflowSteps(t)),t}get test(){}};e([r()],M.prototype,"curveResizeDisabled",null),e([r()],M.prototype,"curveUpdatesDisabled",null),e([r()],M.prototype,"sketchUpdateOptions",null),e([r()],M.prototype,"supportsSplitFeatureWorkflow",null),e([r()],M.prototype,"_layerViewEditSession",void 0),e([r()],M.prototype,"_sketchGraphicClone",void 0),e([r()],M.prototype,"_sketchLayer",void 0),e([r()],M.prototype,"_sketchViewModel",void 0),M=b=e([l("esri.widgets.Editor.UpdateFeatureWorkflow")],M);export{M as UpdateFeatureWorkflow,S as handleKeys};
2
+ import{__decorate as e}from"tslib";import t from"../../core/Error.js";import{makeHandle as i}from"../../core/handleUtils.js";import"../../core/has.js";import{destroyMaybe as s}from"../../core/maybe.js";import{watch as a,sync as o}from"../../core/reactiveUtils.js";import{property as r,subclass as l}from"../../core/accessorSupport/decorators.js";import d from"../../layers/GraphicsLayer.js";import{isSceneLayer as h}from"../../layers/support/layerUtils.js";import{highlightsSupported as n}from"../../views/support/layerViewUtils.js";import c from"./UpdateFeatureWorkflowData.js";import{UpdateRecordWorkflow as p,handleKeys as u}from"./UpdateRecordWorkflow.js";import{getVisualVariableAttributes as w,setUpGeometryUpdate as y,syncUpdateOptions as m,updateGraphicSymbolWhenRequired as f,swapForEditingSession as k,cloneGraphicExceptMesh as g,canCreateInteractiveEditSession as _,isTerminalUpdateEventType as v}from"./workflowUtils.js";import V from"../Sketch/SketchViewModel.js";var b;const M={...u,highlights:Symbol(),sketchGraphics:Symbol(),sketchViewModel:Symbol(),waitingForTool:Symbol()};let S=b=class extends p{constructor(e){super(e),this.type="update-feature",this._layerViewEditSession=null,this._sketchGraphicClone=null,this._sketchLayer=null,this._sketchViewModel=null,this._webStyleCache=new Map}destroy(){this._layerViewEditSession?.rollback()}get curveResizeDisabled(){return this.data.curveResizeDisabled}get curveUpdatesDisabled(){return this.data.curveUpdatesDisabled}get sketchUpdateOptions(){const{capabilities:e,layer:t}=this.data.editorItem;return{enableScaling:!this.curveResizeDisabled,multipleSelectionEnabled:!1,reshapeOptions:{enableCreateCurveFromStraightEdge:!h(t)&&e.supportsTrueCurve}}}get supportsSplitFeatureWorkflow(){return this.data.supportsSplitFeatureWorkflow}get viewGraphic(){return this._sketchViewModel?this._sketchGraphicClone:this.data.edits.feature??this.fullFeature}getUpdating(){return!!this._sketchViewModel?.updating}async commit(){this.removeHandles(M.sketchGraphics);try{const e=this.data.edits.stagedForDelete;await super.commit();const t=this._layerViewEditSession;e?t?.rollback():t?.commit()}catch(e){throw await this._configureSketchViewModel(),new t("editor-workflow:failed-to-commit","An error occurred when sending the updates to the service",{error:e})}}async start(){return await super.start(),await this._initializeSketchViewModel()}_initializeFormViewModel(){super._initializeFormViewModel(),this.addHandles([this._formViewModel.on("value-change",e=>{this._layerViewEditSession?.setAttribute(e.fieldName,e.value)}),a(()=>this._formViewModel.feature?.sourceLayer,e=>this._sketchGraphicClone.sourceLayer=e)])}_configureHighlight(){const{edits:e,layerView:t}=this.data;n(t)&&this.addHandles(t.highlight(e.feature),M.highlights)}async _configureSketchViewModel(){const{_sketchLayer:e,_sketchViewModel:t}=this;if(!t||!e)return;const{data:i,_formViewModel:s,_sketchGraphicClone:a}=this,{edits:o,viewModel:r}=i,l=o.feature,{view:d}=r,h=w(l),n=await y({feature:l,featureClone:a,visualVariableAttributes:h,sketchLayer:e,sketchViewModel:t,getUpdateOptions:()=>this.sketchUpdateOptions,view:d,webStyleCache:this._webStyleCache,onUpdate:({geometry:e,attributes:t},i)=>{if(o.updateAttributes(t),o.updateGeometry(e),s.feature&&(s.feature.geometry=e),null!=h.rotation){const{field:e}=h.rotation;s.setValue(e,t[e])}if(null!=h.size){const{field:e}=h.size;s.setValue(e,t[e])}("undo"===i.type||"redo"===i.type||"update"===i.type&&null!=i.toolEventInfo&&v(i.toolEventInfo.type))&&s.notifyFeatureGeometryChanged()},addUpdatingPromise:e=>{this._updatingHandles.consumePromise(e)},addHandle:e=>{this.addHandles(e,M.waitingForTool)}});this.addHandles(n,M.sketchGraphics),t.addHandles(n)}async _initializeSketchViewModel(){const{data:e,_sketchGraphicClone:t}=this,{readOnly:r}=e,l=e.edits.feature,{capabilities:h,layer:n}=e.editorItem,c=e.viewModel.view;if(this.removeHandles([M.highlights,M.sketchGraphics,M.sketchViewModel,M.waitingForTool]),!h.update.geometry||r||this.curveUpdatesDisabled)return{enter:async()=>{this.hasHandles(M.highlights)||this._configureHighlight()},exit:()=>this.removeHandles([M.highlights])};const p=new d({elevationInfo:n.elevationInfo,internal:!0,listMode:"hide",title:"updateFeaturesWorkflow-internal"}),u=new V({allowDeleteKey:!1,layer:p,sketchOptions:e.sketchOptions,snappingManager:e.snappingManager,useLegacyCreateTools:e.viewModel.useLegacyCreateTools,updateOnGraphicClick:!1,defaultUpdateOptions:this.sketchUpdateOptions,view:c});return this._sketchLayer=p,this._sketchViewModel=u,c?.map.add(p),await(c?.whenLayerView(p)),this.addHandles([i(()=>{c?.destroyed||c?.map.remove(p),p.destroyed||p.destroy(),this._sketchViewModel=s(u)}),a(()=>this.sketchUpdateOptions,e=>{u.defaultUpdateOptions=e,m(u,e)},o)],M.sketchViewModel),await f(t,this._webStyleCache,"2d"===c?.type?c.scale:null),this.addHandles([await k(p,c,l,t)]),{enter:async()=>{this.hasHandles(M.sketchGraphics)||await this._configureSketchViewModel()},exit:()=>this.removeHandles([M.sketchGraphics]),viewModel:u}}_onFullFeatureLoaded(e){super._onFullFeatureLoaded(e);const t=this._sketchGraphicClone=g(e),{edits:i,layerView:s}=this.data;i.updateGeometry(e.geometry),i.trackChanges(),_(s)&&(this._layerViewEditSession=s.createInteractiveEditSession(t))}static async create(e){const t=new b({data:await c.create(e),onCommit:this._onCommitFactory(e.applyEdits)});return t._set("steps",this._createWorkflowSteps(t)),t}get test(){}};e([r()],S.prototype,"curveResizeDisabled",null),e([r()],S.prototype,"curveUpdatesDisabled",null),e([r()],S.prototype,"sketchUpdateOptions",null),e([r()],S.prototype,"supportsSplitFeatureWorkflow",null),e([r()],S.prototype,"_layerViewEditSession",void 0),e([r()],S.prototype,"_sketchGraphicClone",void 0),e([r()],S.prototype,"_sketchLayer",void 0),e([r()],S.prototype,"_sketchViewModel",void 0),S=b=e([l("esri.widgets.Editor.UpdateFeatureWorkflow")],S);export{S as UpdateFeatureWorkflow,M as handleKeys};