@arcgis/core 5.1.0-next.101 → 5.1.0-next.103

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 (736) hide show
  1. package/applications/Components/imageryUtils.d.ts +22 -1
  2. package/applications/Components/imageryUtils.js +1 -1
  3. package/arcade/Dictionary.js +1 -1
  4. package/arcade/Feature.js +1 -1
  5. package/arcade/Pixel.js +1 -1
  6. package/arcade/Voxel.js +1 -1
  7. package/arcade/arcade.js +1 -1
  8. package/arcade/arcadeAsyncRuntime.js +1 -1
  9. package/arcade/arcadeCompiler.js +1 -1
  10. package/arcade/arcadeRuntime.js +1 -1
  11. package/arcade/containerUtils.js +1 -1
  12. package/arcade/debug.js +1 -1
  13. package/arcade/deepClone.js +1 -1
  14. package/arcade/featureSetUtils.js +1 -1
  15. package/arcade/featureset/actions/GroupBy.js +1 -1
  16. package/arcade/featureset/actions/OrderBy.js +1 -1
  17. package/arcade/functions/convertdirection.js +1 -1
  18. package/arcade/functions/date.js +1 -1
  19. package/arcade/functions/feature.js +1 -1
  20. package/arcade/functions/featuresetbase.js +1 -1
  21. package/arcade/functions/featuresetgeom.js +1 -1
  22. package/arcade/functions/featuresetstats.js +1 -1
  23. package/arcade/functions/featuresetstring.js +1 -1
  24. package/arcade/functions/fieldStats.js +1 -1
  25. package/arcade/functions/geomasync.js +1 -1
  26. package/arcade/functions/geometry.js +1 -1
  27. package/arcade/functions/geomsync.js +1 -1
  28. package/arcade/functions/knowledgegraph.js +1 -1
  29. package/arcade/functions/maths.js +1 -1
  30. package/arcade/functions/stats.js +1 -1
  31. package/arcade/functions/string.js +1 -1
  32. package/arcade/functions/track.js +1 -1
  33. package/arcade/geometry/constructors.js +1 -1
  34. package/arcade/geometry/functions.js +1 -1
  35. package/arcade/geometry/operators.js +1 -1
  36. package/arcade/languageUtils.js +1 -1
  37. package/arcgisGlobal.d.ts +1449 -0
  38. package/assets/esri/core/workers/RemoteClient.js +1 -1
  39. package/assets/esri/core/workers/chunks/{92e7067960549733f8e6.js → 037b36d415ae27e987f9.js} +1 -1
  40. package/assets/esri/core/workers/chunks/{58579c53be1a44bd08d2.js → 054ae729e7cefa2c7778.js} +1 -1
  41. package/assets/esri/core/workers/chunks/069459519477bb3dc91b.js +1 -0
  42. package/assets/esri/core/workers/chunks/{4301cb9670fa7c907460.js → 0881929a4a457f94f317.js} +1 -1
  43. package/assets/esri/core/workers/chunks/{abdf146b35e179b5b245.js → 0cb8bc6dbbbe3b212712.js} +1 -1
  44. package/assets/esri/core/workers/chunks/{b811d62284be95f4beb6.js → 0cc74bc3772be51cabc1.js} +1 -1
  45. package/assets/esri/core/workers/chunks/{0630ce1975c91ae362d9.js → 0e9804ece1fd2d59751b.js} +1 -1
  46. package/assets/esri/core/workers/chunks/{545c38789267e3487dbd.js → 10491b5b106bc5ad0b2b.js} +1 -1
  47. package/assets/esri/core/workers/chunks/12053c1213465d07d2f6.js +1 -0
  48. package/assets/esri/core/workers/chunks/{ca6c128940ddbebcaaab.js → 14b7b55c42af65ffa024.js} +1 -1
  49. package/assets/esri/core/workers/chunks/{702e8468836863abd81b.js → 15fa8b5b472131aaa68e.js} +1 -1
  50. package/assets/esri/core/workers/chunks/{852f4cd514008fee5a55.js → 176e676879666f784599.js} +1 -1
  51. package/assets/esri/core/workers/chunks/18201119828664373165.js +1 -0
  52. package/assets/esri/core/workers/chunks/1a3426276dc82a8a80f2.js +1 -0
  53. package/assets/esri/core/workers/chunks/{ce3e51c799a80648e46d.js → 1c0e8808d14d8e6dde2c.js} +1 -1
  54. package/assets/esri/core/workers/chunks/{bafe489e54f34d1841e6.js → 1c83e61fd9a4f8fc8372.js} +1 -1
  55. package/assets/esri/core/workers/chunks/1cb0c4fc315bbc2bd00b.js +1 -0
  56. package/assets/esri/core/workers/chunks/{5afee66e182f79a0fc46.js → 1ff61d8a8ea060e78b83.js} +1 -1
  57. package/assets/esri/core/workers/chunks/{19a9a555365a8363d34b.js → 23119a1b1310b7dab2aa.js} +1 -1
  58. package/assets/esri/core/workers/chunks/{031ea31bbdb7f1be791e.js → 276cb6a1cdd26d0e1444.js} +1 -1
  59. package/assets/esri/core/workers/chunks/{fdb7851e98e8d2ba48d3.js → 286bf3be9f524bde9529.js} +1 -1
  60. package/assets/esri/core/workers/chunks/{53bf9b0c2b8da12820ea.js → 29b00d07d3e1d095c590.js} +2 -2
  61. package/assets/esri/core/workers/chunks/{9d8e7839772029d83c93.js → 29bbc0d6d847b065d10e.js} +1 -1
  62. package/assets/esri/core/workers/chunks/{156efa014b6edd9ccce9.js → 2a5f6a8d282f2c391591.js} +1 -1
  63. package/assets/esri/core/workers/chunks/{15a65aa6969c1b383ce2.js → 2f903bd3a2611e7f0946.js} +1 -1
  64. package/assets/esri/core/workers/chunks/{b803e7b0d489bb628d72.js → 2f925a424b60b4a5e8e5.js} +1 -1
  65. package/assets/esri/core/workers/chunks/30e191d36aa95823c018.js +1 -0
  66. package/assets/esri/core/workers/chunks/{4b19acf8bde5b2e80692.js → 313a89b334e3518d30a4.js} +1 -1
  67. package/assets/esri/core/workers/chunks/{390717f079def83a0d9c.js → 31a8bc25aa1441c70caa.js} +1 -1
  68. package/assets/esri/core/workers/chunks/31c01885ee6d70a2bde2.js +1 -0
  69. package/assets/esri/core/workers/chunks/3292b3883f203637b5a7.js +1 -0
  70. package/assets/esri/core/workers/chunks/{9bb2251ba58932f85d13.js → 33329f5d88e60b4ec568.js} +1 -1
  71. package/assets/esri/core/workers/chunks/{8f9117d589de7caaa02d.js → 35bbd63319d8aa9f31cc.js} +1 -1
  72. package/assets/esri/core/workers/chunks/35fdd62277fd06468a29.js +2 -0
  73. package/assets/esri/core/workers/chunks/{3996149146dd1eca7cc5.js → 38d7430d2370b69334d7.js} +1 -1
  74. package/assets/esri/core/workers/chunks/3aebbed6d4fd1b993a35.js +1 -0
  75. package/assets/esri/core/workers/chunks/3f1d533efe4300d19e6a.js +1 -0
  76. package/assets/esri/core/workers/chunks/{7db09c5bf024242becfa.js → 40caf5e09e4382d81104.js} +5 -5
  77. package/assets/esri/core/workers/chunks/4213aa844900fcf95287.js +1 -0
  78. package/assets/esri/core/workers/chunks/{bc6a809a965355eb425f.js → 44636ef119c6a576470b.js} +1 -1
  79. package/assets/esri/core/workers/chunks/453c9e8d438d061e1736.js +1 -0
  80. package/assets/esri/core/workers/chunks/479e34b0abc10499bd3a.js +1 -0
  81. package/assets/esri/core/workers/chunks/{54dad475dc806a38c287.js → 48440a071a37590846ff.js} +1 -1
  82. package/assets/esri/core/workers/chunks/{38b1d2ffcc318ac0119d.js → 48fcc10768d93e95a04e.js} +1 -1
  83. package/assets/esri/core/workers/chunks/{fa9ab152ea785b5e97e0.js → 4a41f98210f1da3b5041.js} +1 -1
  84. package/assets/esri/core/workers/chunks/4a65bc9091d7ea7e80df.js +1 -0
  85. package/assets/esri/core/workers/chunks/4cdf80e2e60501dd4756.js +1 -0
  86. package/assets/esri/core/workers/chunks/51edfe21d4c6ee22c83d.js +1 -0
  87. package/assets/esri/core/workers/chunks/52219561c144e5cb4442.js +1 -0
  88. package/assets/esri/core/workers/chunks/{312036c89a6a09bb06c2.js → 5570d47533efab56c732.js} +1 -1
  89. package/assets/esri/core/workers/chunks/{5abe34bb0110694f7b42.js → 566c36032b456ec5b5d7.js} +1 -1
  90. package/assets/esri/core/workers/chunks/{34207774bc371e95ba3c.js → 56b6b68d9459b1edea43.js} +1 -1
  91. package/assets/esri/core/workers/chunks/593772bd8b19ac664b29.js +1 -0
  92. package/assets/esri/core/workers/chunks/{10ce083b38ccfa88f766.js → 594e1f633527749d92d7.js} +1 -1
  93. package/assets/esri/core/workers/chunks/{ad329226c8b579d0964c.js → 5a6523c903b11dea77d4.js} +1 -1
  94. package/assets/esri/core/workers/chunks/5c44638670e40e092ce3.js +1 -0
  95. package/assets/esri/core/workers/chunks/{af8bc56cf1404afc3028.js → 5d60253ea3d247cdb3d1.js} +1 -1
  96. package/assets/esri/core/workers/chunks/5dc86a3a40d16b576bb5.js +1 -0
  97. package/assets/esri/core/workers/chunks/601edefd8da4eb2eda28.js +1 -0
  98. package/assets/esri/core/workers/chunks/6182d39e2095d4460b88.js +1 -0
  99. package/assets/esri/core/workers/chunks/{c798a40418e7ff38042a.js → 63513e706fe55a1def15.js} +1 -1
  100. package/assets/esri/core/workers/chunks/{d8d338665fe00494c826.js → 660713adb5a845dfa2ef.js} +1 -1
  101. package/assets/esri/core/workers/chunks/694f9571e2723d3d4b02.js +1 -0
  102. package/assets/esri/core/workers/chunks/69ad5930ff6040c6c561.js +1 -0
  103. package/assets/esri/core/workers/chunks/{f563dd6cace047108b3c.js → 6b5d2df9123dfe7e00b3.js} +1 -1
  104. package/assets/esri/core/workers/chunks/{5217d676749bca59d90f.js → 6c79e8e840c1d027fbb2.js} +1 -1
  105. package/assets/esri/core/workers/chunks/{2ce845c990bb4d701362.js → 6ca81e34854ce7ec6f6e.js} +1 -1
  106. package/assets/esri/core/workers/chunks/{11a99ee68409a641810e.js → 6f02681bcaa9bef501fc.js} +1 -1
  107. package/assets/esri/core/workers/chunks/77ac243d4dcd901c2eec.js +1 -0
  108. package/assets/esri/core/workers/chunks/78af4b7a379c40f497a7.js +1 -0
  109. package/assets/esri/core/workers/chunks/{bf706a5d065a357de51b.js → 79b64a52ff57c40c7800.js} +1 -1
  110. package/assets/esri/core/workers/chunks/{475409026288f0981ce2.js → 7b3642195d6d3ea9b830.js} +1 -1
  111. package/assets/esri/core/workers/chunks/{82b2acc6f181927de89c.js → 7bc746ea17f4e336e0b0.js} +1 -1
  112. package/assets/esri/core/workers/chunks/{19fcc74d34cbbaa56a41.js → 7c86099ed17f420b0489.js} +1 -1
  113. package/assets/esri/core/workers/chunks/{00a25dd4b057cc9f2a7e.js → 7d571845292b1b7769c2.js} +1 -1
  114. package/assets/esri/core/workers/chunks/7dafe608c224b9d48ffa.js +1 -0
  115. package/assets/esri/core/workers/chunks/7e203e947846d40f897e.js +1 -0
  116. package/assets/esri/core/workers/chunks/855bf811cd79b97c169a.js +1 -0
  117. package/assets/esri/core/workers/chunks/{7601278ebced0c0c31cf.js → 85bba0db8a7a5fc1be44.js} +1 -1
  118. package/assets/esri/core/workers/chunks/{a318cf6bb900e0ee268c.js → 881234f25c7814de8753.js} +1 -1
  119. package/assets/esri/core/workers/chunks/895114ccd2603830960f.js +1 -0
  120. package/assets/esri/core/workers/chunks/8a68884d40f6f6de1d12.js +1 -0
  121. package/assets/esri/core/workers/chunks/{0d81409721d29d8bc276.js → 8a7682071941c35f05c1.js} +1 -1
  122. package/assets/esri/core/workers/chunks/8aac1155b8ac071cd2ad.js +1 -0
  123. package/assets/esri/core/workers/chunks/{3e2953ea62817e75d840.js → 8cbaaea72f4ca2f023be.js} +1 -1
  124. package/assets/esri/core/workers/chunks/{7bb17d0ab1cc2b89c035.js → 8e986167d4a393ee41ea.js} +1 -1
  125. package/assets/esri/core/workers/chunks/8fdd57e2a0af647f1e3e.js +1 -0
  126. package/assets/esri/core/workers/chunks/92db9a6d273ae2862883.js +1 -0
  127. package/assets/esri/core/workers/chunks/{9b23d999db902d25ba58.js → 9373daa677dc767d7cf0.js} +1 -1
  128. package/assets/esri/core/workers/chunks/{40ffb1aa17cbfae17b23.js → 9542ef3f6c2bc7c14d85.js} +1 -1
  129. package/assets/esri/core/workers/chunks/{657268b3fde6da2dd735.js → 95798e3de3419fdda6ac.js} +1 -1
  130. package/assets/esri/core/workers/chunks/{aad02c7417648d881129.js → 958617c3a9854ea04e06.js} +1 -1
  131. package/assets/esri/core/workers/chunks/{a28124bba6b43efd74cc.js → 95df6d2ebacc43ac5fa3.js} +1 -1
  132. package/assets/esri/core/workers/chunks/{f618ee43581e8de6ad0c.js → 970e91de5dfbbc247afb.js} +1 -1
  133. package/assets/esri/core/workers/chunks/978b7d10054e17161145.js +1 -0
  134. package/assets/esri/core/workers/chunks/{8a48a6760c33ed50b650.js → 98b4408e12684e37b395.js} +1 -1
  135. package/assets/esri/core/workers/chunks/9d70247d820085a2c190.js +1 -0
  136. package/assets/esri/core/workers/chunks/9da2f2b67837b491cfa3.js +1 -0
  137. package/assets/esri/core/workers/chunks/{edee616b6f1b5be8fd39.js → a0296e6d6c37b861c5fb.js} +1 -1
  138. package/assets/esri/core/workers/chunks/{c19e3f6027b6526de359.js → a02ebdcb802d128c8eee.js} +1 -1
  139. package/assets/esri/core/workers/chunks/a0aaf14c8f9a007d88ac.js +1 -0
  140. package/assets/esri/core/workers/chunks/{1523883460874c352e36.js → a29cd1f5c7bb4f6a5a4f.js} +1 -1
  141. package/assets/esri/core/workers/chunks/{cf826787ab8d4b27ad80.js → a53a3e5548fef65a2710.js} +1 -1
  142. package/assets/esri/core/workers/chunks/{91f9e0e3662d4bf9f163.js → a913a1c83a667ed0e711.js} +1 -1
  143. package/assets/esri/core/workers/chunks/{359465b9726edcc70c83.js → a9c9c00432ee41ec91ba.js} +1 -1
  144. package/assets/esri/core/workers/chunks/{a3a28c4887f802e8d96d.js → aa55923ca939a0d4606c.js} +1 -1
  145. package/assets/esri/core/workers/chunks/{d3b086eb9aa8c7d09048.js → aea8e0577fb48d5c9577.js} +1 -1
  146. package/assets/esri/core/workers/chunks/af45110f07e4b5162bae.js +1 -0
  147. package/assets/esri/core/workers/chunks/{76589434d573111a8fb4.js → b09ae8eb5e97fb27382f.js} +1 -1
  148. package/assets/esri/core/workers/chunks/b0c647af49c9d563b852.js +1 -0
  149. package/assets/esri/core/workers/chunks/{a320998f18922a35899f.js → b32a13972cb3de652339.js} +1 -1
  150. package/assets/esri/core/workers/chunks/b432a5a829e309837db6.js +1 -0
  151. package/assets/esri/core/workers/chunks/{9103eb0b9078019d3a26.js → b5d0898406c7d6e6a717.js} +1 -1
  152. package/assets/esri/core/workers/chunks/b640651c7d86cfe654bf.js +1 -0
  153. package/assets/esri/core/workers/chunks/{503439246250d9e1cbd5.js → b75e090a7e935ff870a3.js} +1 -1
  154. package/assets/esri/core/workers/chunks/{c321bcda8e8893577948.js → b8dda9e55caba0e2b4c2.js} +1 -1
  155. package/assets/esri/core/workers/chunks/{59a64d72eed8c40c63cf.js → bacf0c9d5d3e084dea61.js} +1 -1
  156. package/assets/esri/core/workers/chunks/{48a0e7a32ebd44045c8f.js → bb04aff0b4947408592c.js} +1 -1
  157. package/assets/esri/core/workers/chunks/{17de1c251242b692cf45.js → bff0c4094c14cb97b18f.js} +1 -1
  158. package/assets/esri/core/workers/chunks/{47dd2bfecc5c4b5f10f0.js → c0d7e4afbad0b20e2502.js} +1 -1
  159. package/assets/esri/core/workers/chunks/c13c532fe38ddc5d7ca6.js +1 -0
  160. package/assets/esri/core/workers/chunks/{cc62e5095e328bed3e01.js → c1ffb879e0283fb2815f.js} +1 -1
  161. package/assets/esri/core/workers/chunks/{22fa4aa2b76573bafe21.js → c476f4979048e558baa7.js} +89 -76
  162. package/assets/esri/core/workers/chunks/c8b96104641cb4afd4df.js +1 -0
  163. package/assets/esri/core/workers/chunks/{4faaf61d20e20fcf6c18.js → c91d4f1b42cfe474df52.js} +1 -1
  164. package/assets/esri/core/workers/chunks/{6ae2408ac075b974e887.js → cb26966cc205bd338c76.js} +1 -1
  165. package/assets/esri/core/workers/chunks/{c452c74ba9de218c3e57.js → cb3004998eff7c60930e.js} +1 -1
  166. package/assets/esri/core/workers/chunks/cc48354c54358777e996.js +1 -0
  167. package/assets/esri/core/workers/chunks/{b1b8a7c00ec4d998ab84.js → cc8d55d1830d7542c3f5.js} +1 -1
  168. package/assets/esri/core/workers/chunks/ce0c7070eeb723a718e7.js +1 -0
  169. package/assets/esri/core/workers/chunks/ce3b5b83237cf37ff523.js +1 -0
  170. package/assets/esri/core/workers/chunks/cf3c0bee919bb509cd4f.js +1 -0
  171. package/assets/esri/core/workers/chunks/cf9b0ba30a75c030ca92.js +1 -0
  172. package/assets/esri/core/workers/chunks/d00b9c1fd0865bf8f317.js +1 -0
  173. package/assets/esri/core/workers/chunks/{9a29b7f9e6281ee40c37.js → d4749eb8a47869477037.js} +1 -1
  174. package/assets/esri/core/workers/chunks/d5423df247be82fa085a.js +1 -0
  175. package/assets/esri/core/workers/chunks/d610f517fb3c6cb24365.js +1 -0
  176. package/assets/esri/core/workers/chunks/{47656ec12401e53f4bd3.js → d9d716bfd0aab30b6caf.js} +1 -1
  177. package/assets/esri/core/workers/chunks/da4f7d7099ba88f31f45.js +1 -0
  178. package/assets/esri/core/workers/chunks/dbb1ac41fd5da4fd849b.js +1 -0
  179. package/assets/esri/core/workers/chunks/{176dd195f77b98cb0b0f.js → dd58bc675b85b4d90afa.js} +1 -1
  180. package/assets/esri/core/workers/chunks/e2bb95d601789bbda73b.js +1 -0
  181. package/assets/esri/core/workers/chunks/{f018ad451ee072253a1e.js → e4b2120d7ee1c998b1fc.js} +1 -1
  182. package/assets/esri/core/workers/chunks/e4c350dc65aae121171d.js +1 -0
  183. package/assets/esri/core/workers/chunks/e8518bd3596543b387f8.js +1 -0
  184. package/assets/esri/core/workers/chunks/{f948e4a80a7dbda70f2e.js → e973cab79ec2541cb81b.js} +1 -1
  185. package/assets/esri/core/workers/chunks/{7d6299ab7b0db23ab961.js → eb1d6614eeac6d26bb9c.js} +1 -1
  186. package/assets/esri/core/workers/chunks/f1bb426400dac02880f1.js +1 -0
  187. package/assets/esri/core/workers/chunks/{ffcd4fca7f67e1f943f1.js → f239a8ecad8b692d5eaa.js} +1 -1
  188. package/assets/esri/core/workers/chunks/{de11ebcea2b8f9dfe65d.js → f3161c47a572194f6017.js} +1 -1
  189. package/assets/esri/core/workers/chunks/{f66262f8582909157f01.js → f37be7e517f0892014e3.js} +1 -1
  190. package/assets/esri/core/workers/chunks/{99f726f05cf80b0330ed.js → f3a9100518b044e79501.js} +1 -1
  191. package/assets/esri/core/workers/chunks/f3f984c62311c20a9db8.js +1 -0
  192. package/assets/esri/core/workers/chunks/f5bd0a4f82df5e942b70.js +1 -0
  193. package/assets/esri/core/workers/chunks/{85e65ced3312bf9cf162.js → f7e386ece75afb6e4be5.js} +1 -1
  194. package/assets/esri/core/workers/chunks/f8b884b529064df4a30a.js +1 -0
  195. package/assets/esri/themes/base/widgets/_BatchAttributeForm.scss +125 -0
  196. package/assets/esri/themes/base/widgets/_Directions.scss +5 -1
  197. package/assets/esri/themes/dark/main.css +1 -1
  198. package/assets/esri/themes/light/main.css +1 -1
  199. package/assets/esri/themes/light/view.css +1 -1
  200. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm.json +1 -1
  201. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ar.json +1 -1
  202. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_bg.json +1 -1
  203. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_bs.json +1 -1
  204. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ca.json +1 -1
  205. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_cs.json +1 -1
  206. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_da.json +1 -1
  207. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_de.json +1 -1
  208. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_el.json +1 -1
  209. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_en.json +1 -1
  210. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_es.json +1 -1
  211. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_et.json +1 -1
  212. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_fi.json +1 -1
  213. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_fr.json +1 -1
  214. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_he.json +1 -1
  215. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_hr.json +1 -1
  216. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_hu.json +1 -1
  217. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_id.json +1 -1
  218. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_it.json +1 -1
  219. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ja.json +1 -1
  220. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ko.json +1 -1
  221. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_lt.json +1 -1
  222. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_lv.json +1 -1
  223. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_nl.json +1 -1
  224. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_no.json +1 -1
  225. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_pl.json +1 -1
  226. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_pt-BR.json +1 -1
  227. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_pt-PT.json +1 -1
  228. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ro.json +1 -1
  229. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ru.json +1 -1
  230. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sk.json +1 -1
  231. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sl.json +1 -1
  232. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sr.json +1 -1
  233. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sv.json +1 -1
  234. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_th.json +1 -1
  235. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_tr.json +1 -1
  236. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_uk.json +1 -1
  237. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_vi.json +1 -1
  238. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_zh-CN.json +1 -1
  239. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_zh-HK.json +1 -1
  240. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_zh-TW.json +1 -1
  241. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer.json +1 -1
  242. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_en.json +1 -1
  243. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer.json +1 -1
  244. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_ar.json +1 -1
  245. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_bg.json +1 -1
  246. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_bs.json +1 -1
  247. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_ca.json +1 -1
  248. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_cs.json +1 -1
  249. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_da.json +1 -1
  250. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_de.json +1 -1
  251. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_el.json +1 -1
  252. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_es.json +1 -1
  253. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_et.json +1 -1
  254. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_fi.json +1 -1
  255. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_fr.json +1 -1
  256. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_he.json +1 -1
  257. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_hr.json +1 -1
  258. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_hu.json +1 -1
  259. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_id.json +1 -1
  260. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_it.json +1 -1
  261. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_ja.json +1 -1
  262. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_ko.json +1 -1
  263. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_lt.json +1 -1
  264. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_lv.json +1 -1
  265. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_nl.json +1 -1
  266. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_no.json +1 -1
  267. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_pl.json +1 -1
  268. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_pt-BR.json +1 -1
  269. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_pt-PT.json +1 -1
  270. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_ro.json +1 -1
  271. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_ru.json +1 -1
  272. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_sk.json +1 -1
  273. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_sl.json +1 -1
  274. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_sr.json +1 -1
  275. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_sv.json +1 -1
  276. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_th.json +1 -1
  277. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_tr.json +1 -1
  278. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_uk.json +1 -1
  279. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_vi.json +1 -1
  280. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_zh-CN.json +1 -1
  281. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_zh-HK.json +1 -1
  282. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_zh-TW.json +1 -1
  283. package/chunks/AtmosphereCompositing.glsl.js +1 -1
  284. package/chunks/Bufferer-Dw9Qi4T1.js +1 -1
  285. package/chunks/Centroid-DZi-eb9F.js +1 -1
  286. package/chunks/Clouds.glsl.js +1 -1
  287. package/chunks/Compositing.glsl.js +1 -1
  288. package/chunks/CutFillComposition.glsl.js +1 -1
  289. package/chunks/CutFillDepth.glsl.js +1 -1
  290. package/chunks/CutFillMask.glsl.js +1 -1
  291. package/chunks/CutFillReduction.glsl.js +1 -1
  292. package/chunks/CutFillTargetDepth.glsl.js +1 -1
  293. package/chunks/Distance2DCalculator-CXhBP-8I.js +1 -1
  294. package/chunks/Envelope.js +1 -1
  295. package/chunks/Envelope2D.js +1 -1
  296. package/chunks/FlatGeometry.js +1 -1
  297. package/chunks/FocusAreaColor.glsl.js +1 -1
  298. package/chunks/FocusAreaMask.glsl.js +1 -1
  299. package/chunks/Fog.glsl.js +1 -1
  300. package/chunks/GaussianSplat.glsl.js +1 -1
  301. package/chunks/GaussianSplatShadow.glsl.js +1 -1
  302. package/chunks/GeodeticDistanceCalculator-Ce-woMPw.js +1 -1
  303. package/chunks/GeodeticUtils.js +1 -1
  304. package/chunks/Geometry.js +1 -1
  305. package/chunks/GeometryCleaner-BEJM7I4l.js +1 -1
  306. package/chunks/GlobalIllumination.glsl.js +1 -1
  307. package/chunks/GlobalIlluminationBlur.glsl.js +1 -1
  308. package/chunks/GlobalIlluminationUpscale.glsl.js +80 -65
  309. package/chunks/GlowBlur.glsl.js +1 -1
  310. package/chunks/GlowComposition.glsl.js +1 -1
  311. package/chunks/HazeCompositing.glsl.js +1 -1
  312. package/chunks/HighlightBlur.glsl.js +1 -1
  313. package/chunks/HighlightDownsample.glsl.js +1 -1
  314. package/chunks/Magnifier.glsl.js +1 -1
  315. package/chunks/MultiPathImpl.js +1 -1
  316. package/chunks/NoiseTextureAtlas.glsl.js +1 -1
  317. package/chunks/OITBlend.glsl.js +2 -2
  318. package/chunks/OITBlendEmission.glsl.js +1 -1
  319. package/chunks/OITDimOpaque.glsl.js +1 -1
  320. package/chunks/OperatorClip.js +1 -1
  321. package/chunks/OperatorCrosses.js +1 -1
  322. package/chunks/OperatorCut.js +1 -1
  323. package/chunks/OperatorDensify.js +1 -1
  324. package/chunks/OperatorGeneralize.js +1 -1
  325. package/chunks/OperatorGeodesicBuffer.js +1 -1
  326. package/chunks/OperatorGeodeticArea.js +1 -1
  327. package/chunks/OperatorGeodeticDensifyByLength.js +1 -1
  328. package/chunks/OperatorGeodeticDistance.js +1 -1
  329. package/chunks/OperatorGeodeticLength.js +1 -1
  330. package/chunks/OperatorIntegrate.js +1 -1
  331. package/chunks/OperatorIntersects.js +1 -1
  332. package/chunks/OperatorMultiPartToSinglePart.js +1 -1
  333. package/chunks/OperatorOverlaps.js +1 -1
  334. package/chunks/OperatorProject.js +1 -1
  335. package/chunks/OperatorProximity.js +1 -1
  336. package/chunks/OperatorProximityGeodesic.js +1 -1
  337. package/chunks/OperatorShapePreservingDensify.js +1 -1
  338. package/chunks/OperatorShapePreservingLength.js +1 -1
  339. package/chunks/OperatorShapePreservingProject.js +1 -1
  340. package/chunks/OperatorSimplifyOGC.js +1 -1
  341. package/chunks/OperatorTouches.js +1 -1
  342. package/chunks/OperatorWithin.js +1 -1
  343. package/chunks/OverlayCompositing.glsl.js +1 -1
  344. package/chunks/Point2D.js +1 -1
  345. package/chunks/PointRenderer.glsl.js +1 -1
  346. package/chunks/ProjectionTransformation.js +1 -1
  347. package/chunks/RasterColorizer.glsl.js +1 -1
  348. package/chunks/ShadowCastAccumulate.glsl.js +1 -1
  349. package/chunks/ShadowCastVisualize.glsl.js +2 -2
  350. package/chunks/SideCalculator2D-BNwb5gvz.js +1 -1
  351. package/chunks/SimpleAtmosphere.glsl.js +1 -1
  352. package/chunks/SpatialReference.js +1 -1
  353. package/chunks/Terrain.glsl.js +1 -1
  354. package/chunks/Texture.glsl.js +1 -1
  355. package/chunks/Transformation2D.js +1 -1
  356. package/chunks/Viewshed.glsl.js +1 -1
  357. package/chunks/aiServices.js +1 -1
  358. package/chunks/arcade.js +1 -1
  359. package/chunks/array.js +1 -1
  360. package/chunks/boundedPlane.js +1 -1
  361. package/chunks/constants.js +1 -1
  362. package/chunks/containsOperator.js +1 -1
  363. package/chunks/disjointOperator.js +1 -1
  364. package/chunks/distanceOperator.js +1 -1
  365. package/chunks/equalsOperator.js +1 -1
  366. package/chunks/languageUtils.js +1 -1
  367. package/chunks/pe.js +1 -1
  368. package/chunks/persistableUrlUtils.js +1 -1
  369. package/chunks/relateOperator.js +1 -1
  370. package/chunks/symmetricDifferenceOperator.js +1 -1
  371. package/chunks/unionOperator.js +1 -1
  372. package/chunks/vec2.js +1 -1
  373. package/chunks/vec3.js +1 -1
  374. package/chunks/vec4.js +1 -1
  375. package/config.js +1 -1
  376. package/core/accessorSupport/decorators/persistable.js +1 -1
  377. package/effects/FocusArea.js +1 -1
  378. package/form/elements/inputs/MultipleChoiceInput.d.ts +5 -5
  379. package/form/elements/inputs/MultipleChoiceInput.js +1 -1
  380. package/geometry/coordinateFormatter.js +1 -1
  381. package/geometry/operators/extendOperator.js +1 -1
  382. package/geometry/operators/gx/geodeticUtils.js +1 -1
  383. package/geometry/operators/gx/operatorAffineTransform.js +1 -1
  384. package/geometry/operators/gx/operatorAlphaShape.js +1 -1
  385. package/geometry/operators/gx/operatorAutoComplete.js +1 -1
  386. package/geometry/operators/gx/operatorBoundary.js +1 -1
  387. package/geometry/operators/gx/operatorBuffer.js +1 -1
  388. package/geometry/operators/gx/operatorConvexHull.js +1 -1
  389. package/geometry/operators/gx/operatorDifference.js +1 -1
  390. package/geometry/operators/gx/operatorGeodesicBuffer.js +1 -1
  391. package/geometry/operators/gx/operatorGeodeticArea.js +1 -1
  392. package/geometry/operators/gx/operatorGeodeticDensify.js +1 -1
  393. package/geometry/operators/gx/operatorGeodeticDistance.js +1 -1
  394. package/geometry/operators/gx/operatorGeodeticLength.js +1 -1
  395. package/geometry/operators/gx/operatorGraphicBuffer.js +1 -1
  396. package/geometry/operators/gx/operatorIntersection.js +1 -1
  397. package/geometry/operators/gx/operatorLabelPoint.js +1 -1
  398. package/geometry/operators/gx/operatorLinesToPolygons.js +1 -1
  399. package/geometry/operators/gx/operatorLocateBetween.js +1 -1
  400. package/geometry/operators/gx/operatorMinimumBoundingCircle.js +1 -1
  401. package/geometry/operators/gx/operatorOffset.js +1 -1
  402. package/geometry/operators/gx/operatorPolygonOverlay.js +1 -1
  403. package/geometry/operators/gx/operatorPolygonSlicer.js +1 -1
  404. package/geometry/operators/gx/operatorProject.js +1 -1
  405. package/geometry/operators/gx/operatorProximityGeodesic.js +1 -1
  406. package/geometry/operators/gx/operatorShapePreservingProject.js +1 -1
  407. package/geometry/operators/gx/operatorSimplify.js +1 -1
  408. package/geometry/operators/gx/operatorSinglePartToMultiPart.js +1 -1
  409. package/geometry/operators/gx/operatorSymmetricDifference.js +1 -1
  410. package/geometry/operators/gx/operatorUnion.js +1 -1
  411. package/geometry/operators/isNearOperator.js +1 -1
  412. package/geometry/operators/json/containsOperator.js +1 -1
  413. package/geometry/operators/json/disjointOperator.js +1 -1
  414. package/geometry/operators/locateBetweenOperator.js +1 -1
  415. package/geometry/operators/reshapeOperator.js +1 -1
  416. package/geometry/operators/support/apiConverter.js +1 -1
  417. package/geometry/operators/support/geographicTransformationUtils.js +1 -1
  418. package/geometry/operators/support/initNoPeFactory.js +1 -1
  419. package/geometry/operators/support/jsonConverter.js +1 -1
  420. package/geometry/operators/support/projectionTransformation.js +1 -1
  421. package/geometry/operators/symmetricDifferenceOperator.js +1 -1
  422. package/geometry/operators/unionOperator.js +1 -1
  423. package/geometry/pe.js +1 -1
  424. package/geometry/support/MeshTexture.js +1 -1
  425. package/geometry/support/boundedPlane.js +1 -1
  426. package/geometry/support/buffer/math/vec3.js +1 -1
  427. package/geometry/support/buffer/math/vec4.js +1 -1
  428. package/geometry/support/buffer/utils/vec2.js +1 -1
  429. package/geometry/support/coordinateSystem.js +1 -1
  430. package/geometry/support/meshUtils/extent.js +1 -1
  431. package/geometry/support/meshUtils/loadGLTFMesh.js +1 -1
  432. package/geometry/support/meshUtils/projection.js +1 -1
  433. package/geometry/support/meshUtils/vertexSpaceConversion.js +1 -1
  434. package/geometry/support/spatialReferenceUtils.js +1 -1
  435. package/geometry/support/vcsData.js +1 -1
  436. package/interfaces.d.ts +3 -0
  437. package/kernel.js +1 -1
  438. package/layers/FeatureLayer.d.ts +29 -39
  439. package/layers/ImageryTileLayer.js +1 -1
  440. package/layers/IntegratedMesh3DTilesLayer.js +1 -1
  441. package/layers/IntegratedMeshLayer.js +1 -1
  442. package/layers/KnowledgeGraphLayer.js +1 -1
  443. package/layers/Lyr3DWasmPerSceneView.js +1 -1
  444. package/layers/OrientedImageryLayer.d.ts +233 -0
  445. package/layers/OrientedImageryLayer.js +1 -1
  446. package/layers/VideoLayer.d.ts +35 -9
  447. package/layers/VideoLayer.js +1 -1
  448. package/layers/catalog/CatalogFootprintLayer.d.ts +147 -0
  449. package/layers/knowledgeGraph/KnowledgeGraphLayerDataManager.js +1 -1
  450. package/layers/knowledgeGraph/cypherUtils.js +1 -1
  451. package/layers/mixins/ArcGISImageService.js +1 -1
  452. package/layers/mixins/FeatureLayerBase.d.ts +12 -0
  453. package/layers/mixins/FeatureLayerBase.js +1 -1
  454. package/layers/orientedImagery/transformations/utils.js +1 -1
  455. package/layers/raster/datasets/ImageAuxRaster.js +1 -1
  456. package/layers/raster/formats/RasterCodec.js +1 -1
  457. package/layers/raster/functions/rasterProjectionHelper.js +1 -1
  458. package/layers/support/FeatureReductionBinning.d.ts +87 -9
  459. package/layers/support/FeatureReductionCluster.d.ts +87 -9
  460. package/layers/support/FieldConfiguration.d.ts +1 -1
  461. package/layers/support/ImageElement.js +1 -1
  462. package/layers/support/ParquetFilesData.js +1 -1
  463. package/layers/support/SceneFilter.js +1 -1
  464. package/layers/support/Sublayer.d.ts +25 -0
  465. package/layers/support/Sublayer.js +1 -1
  466. package/layers/support/SubtypeSublayer.d.ts +147 -0
  467. package/layers/support/TelemetryData.d.ts +5 -0
  468. package/layers/support/TelemetryData.js +1 -1
  469. package/layers/support/TelemetryDisplay.d.ts +10 -2
  470. package/layers/support/TelemetryDisplay.js +1 -1
  471. package/layers/video/VideoController.js +1 -1
  472. package/layers/video/types.d.ts +8 -1
  473. package/layers/video/videoUtils.js +1 -1
  474. package/linkChart/LinkChartProperties.js +1 -1
  475. package/linkChart/utils.js +1 -1
  476. package/package.json +2 -2
  477. package/portal/PortalItem.js +1 -1
  478. package/portal/jsonTypes.d.ts +7 -0
  479. package/renderers/UniqueValueRenderer.js +1 -1
  480. package/rest/knowledgeGraphService.js +1 -1
  481. package/rest/print.js +1 -1
  482. package/rest/support/PrintParameters.d.ts +8 -1
  483. package/rest/support/PrintParameters.js +1 -1
  484. package/support/arcadeUtils.js +1 -1
  485. package/support/persistableUrlUtils.js +1 -1
  486. package/support/revision.js +1 -1
  487. package/symbols/Symbol3D.js +1 -1
  488. package/symbols/support/IconSymbol3DLayerResource.js +1 -1
  489. package/symbols/support/urlUtils.js +1 -1
  490. package/symbols/support/webStyleSymbolUtils.js +1 -1
  491. package/third-party-notices.txt +188 -0
  492. package/views/2d/ViewStateManager.js +1 -1
  493. package/views/2d/engine/webgl/shaderGraph/graph/GlslGraphWriter.js +1 -1
  494. package/views/2d/engine/webgl/shaderGraph/graph/ShaderGraphContext.js +1 -1
  495. package/views/2d/engine/webgl/shaderGraph/graph/ShaderGraphNode.js +1 -1
  496. package/views/2d/engine/webgl/shaderGraph/graph/glsl.js +1 -1
  497. package/views/2d/engine/webgl/shaderGraph/techniques/dotDensity/DotDensityPolygonShader.js +1 -1
  498. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/BloomShader.js +1 -1
  499. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/AspectShader.js +1 -1
  500. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/CurvatureShader.js +1 -1
  501. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/MaskShader.js +1 -1
  502. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/RemapShader.js +1 -1
  503. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/SlopeShader.js +1 -1
  504. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/math.js +1 -1
  505. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/surface.js +1 -1
  506. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  507. package/views/2d/interactive/editingTools/TransformTool.js +1 -1
  508. package/views/2d/interactive/editingTools/manipulations/ScaleManipulation.js +1 -1
  509. package/views/2d/layers/VideoLayerView2D.js +1 -1
  510. package/views/3d/analysis/ShadowCastAnalysisView3D.js +1 -1
  511. package/views/3d/analysis/Slice/SliceController.js +1 -1
  512. package/views/3d/analysis/Slice/SliceTool.js +1 -1
  513. package/views/3d/analysis/Slice/sliceToolUtils.js +1 -1
  514. package/views/3d/analysis/Viewshed/ViewshedFieldOfViewManipulation.js +1 -1
  515. package/views/3d/analysis/Viewshed/ViewshedScaleOrientManipulation.js +1 -1
  516. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillController.js +1 -1
  517. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillVisualization.js +1 -1
  518. package/views/3d/focusAreaUtils.js +1 -1
  519. package/views/3d/interactive/editingTools/transform/extentTransform/ExtentRotate.js +1 -1
  520. package/views/3d/interactive/editingTools/transform/extentTransform/ExtentScale.js +1 -1
  521. package/views/3d/interactive/editingTools/transform/extentTransform/extentUtils.js +1 -1
  522. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  523. package/views/3d/layers/SceneLayerWorker.js +1 -1
  524. package/views/3d/layers/graphics/Deconflictor.js +1 -1
  525. package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
  526. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  527. package/views/3d/layers/graphics/GraphicsDeconflictor.js +1 -1
  528. package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
  529. package/views/3d/layers/i3s/PointCloudRenderer.js +1 -1
  530. package/views/3d/layers/i3s/meshUtils.js +1 -1
  531. package/views/3d/state/ScreenSizePerspective.js +1 -1
  532. package/views/3d/support/ViewSlice.js +1 -1
  533. package/views/3d/terrain/OverlayRenderer.js +1 -1
  534. package/views/3d/terrain/RasterColorizer.glsl.js +1 -1
  535. package/views/3d/terrain/RasterTile.js +1 -1
  536. package/views/3d/terrain/TerrainRenderer.js +1 -1
  537. package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
  538. package/views/3d/webgl-engine/core/shaderLibrary/shading/GlobalIlluminationWeights.glsl.js +3 -5
  539. package/views/3d/webgl-engine/effects/atmosphere/ChapmanAtmosphere.js +1 -1
  540. package/views/3d/webgl-engine/effects/atmosphere/LocalAtmosphere.js +1 -1
  541. package/views/3d/webgl-engine/effects/atmosphere/MarsAtmosphere.js +1 -1
  542. package/views/3d/webgl-engine/effects/atmosphere/SimpleAtmosphere.glsl.js +1 -1
  543. package/views/3d/webgl-engine/effects/blit/Blit.js +1 -1
  544. package/views/3d/webgl-engine/effects/clouds/Clouds.glsl.js +1 -1
  545. package/views/3d/webgl-engine/effects/clouds/CloudsRenderer.js +1 -1
  546. package/views/3d/webgl-engine/effects/clouds/CloudsTechnique.js +1 -1
  547. package/views/3d/webgl-engine/effects/clouds/NoiseTextureAtlas.glsl.js +1 -1
  548. package/views/3d/webgl-engine/effects/clouds/NoiseTextureAtlas.js +1 -1
  549. package/views/3d/webgl-engine/effects/clouds/NoiseTextureAtlasTechnique.js +1 -1
  550. package/views/3d/webgl-engine/effects/focusArea/FocusAreaColor.glsl.js +1 -1
  551. package/views/3d/webgl-engine/effects/focusArea/FocusAreaColorNode.js +1 -1
  552. package/views/3d/webgl-engine/effects/focusArea/FocusAreaColorTechnique.js +1 -1
  553. package/views/3d/webgl-engine/effects/focusArea/FocusAreaMask.glsl.js +1 -1
  554. package/views/3d/webgl-engine/effects/focusArea/FocusAreaMaskNode.js +1 -1
  555. package/views/3d/webgl-engine/effects/focusArea/FocusAreaMaskTechnique.js +1 -1
  556. package/views/3d/webgl-engine/effects/fog/Fog.glsl.js +1 -1
  557. package/views/3d/webgl-engine/effects/fog/Fog.js +1 -1
  558. package/views/3d/webgl-engine/effects/fog/FogTechnique.js +1 -1
  559. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.glsl.js +1 -1
  560. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.js +1 -1
  561. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationBlur.glsl.js +1 -1
  562. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationBlurTechnique.js +1 -1
  563. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationTechnique.js +1 -1
  564. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationTechniqueConfiguration.js +1 -1
  565. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationUpscale.glsl.js +1 -1
  566. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationUpscaleTechnique.js +1 -1
  567. package/views/3d/webgl-engine/effects/glow/Glow.js +1 -1
  568. package/views/3d/webgl-engine/effects/glow/GlowBlur.glsl.js +1 -1
  569. package/views/3d/webgl-engine/effects/glow/GlowBlurTechnique.js +1 -1
  570. package/views/3d/webgl-engine/effects/glow/GlowComposition.glsl.js +1 -1
  571. package/views/3d/webgl-engine/effects/glow/GlowCompositionTechnique.js +1 -1
  572. package/views/3d/webgl-engine/effects/haze/Haze.js +1 -1
  573. package/views/3d/webgl-engine/effects/haze/HazeCompositing.glsl.js +1 -1
  574. package/views/3d/webgl-engine/effects/haze/HazeCompositingTechnique.js +1 -1
  575. package/views/3d/webgl-engine/effects/highlight/Highlight.js +1 -1
  576. package/views/3d/webgl-engine/effects/highlight/HighlightBlur.glsl.js +1 -1
  577. package/views/3d/webgl-engine/effects/highlight/HighlightBlurTechnique.js +1 -1
  578. package/views/3d/webgl-engine/effects/highlight/HighlightDownsample.glsl.js +1 -1
  579. package/views/3d/webgl-engine/effects/highlight/HighlightDownsampleTechnique.js +1 -1
  580. package/views/3d/webgl-engine/effects/magnifier/Magnifier.glsl.js +1 -1
  581. package/views/3d/webgl-engine/effects/magnifier/Magnifier.js +1 -1
  582. package/views/3d/webgl-engine/effects/magnifier/MagnifierTechnique.js +1 -1
  583. package/views/3d/webgl-engine/effects/transparency/OITBlend.glsl.js +1 -1
  584. package/views/3d/webgl-engine/effects/transparency/OITBlend.js +1 -1
  585. package/views/3d/webgl-engine/effects/transparency/OITBlendTechnique.js +1 -1
  586. package/views/3d/webgl-engine/effects/transparency/OITDimOpaque.glsl.js +1 -1
  587. package/views/3d/webgl-engine/effects/transparency/OITDimOpaqueTechnique.js +1 -1
  588. package/views/3d/webgl-engine/lib/Compositor.js +1 -1
  589. package/views/3d/webgl-engine/lib/CutFillComputationRenderNode.js +1 -1
  590. package/views/3d/webgl-engine/lib/CutFillVisualizationRenderNode.js +1 -1
  591. package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
  592. package/views/3d/webgl-engine/lib/GaussianSplatShadowRenderNode.js +1 -1
  593. package/views/3d/webgl-engine/lib/RayIntersections.js +1 -1
  594. package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
  595. package/views/3d/webgl-engine/lib/ShadowCastRenderer.js +1 -1
  596. package/views/3d/webgl-engine/lib/SliceHelper.js +1 -1
  597. package/views/3d/webgl-engine/lib/Texture.glsl.js +1 -1
  598. package/views/3d/webgl-engine/lib/TextureTechnique.js +1 -1
  599. package/views/3d/webgl-engine/lib/TriangleIntersectionData.js +1 -1
  600. package/views/3d/webgl-engine/lib/Viewshed.js +1 -1
  601. package/views/3d/webgl-engine/lib/intersectorUtils.js +1 -1
  602. package/views/3d/webgl-engine/shaders/AtmosphereCompositing.glsl.js +1 -1
  603. package/views/3d/webgl-engine/shaders/AtmosphereCompositingTechnique.js +1 -1
  604. package/views/3d/webgl-engine/shaders/Compositing.glsl.js +1 -1
  605. package/views/3d/webgl-engine/shaders/CompositingTechnique.js +1 -1
  606. package/views/3d/webgl-engine/shaders/CutFillComposition.glsl.js +1 -1
  607. package/views/3d/webgl-engine/shaders/CutFillCompositionTechnique.js +1 -1
  608. package/views/3d/webgl-engine/shaders/CutFillDepth.glsl.js +1 -1
  609. package/views/3d/webgl-engine/shaders/CutFillDepthTechnique.js +1 -1
  610. package/views/3d/webgl-engine/shaders/CutFillMask.glsl.js +1 -1
  611. package/views/3d/webgl-engine/shaders/CutFillMaskTechnique.js +1 -1
  612. package/views/3d/webgl-engine/shaders/CutFillReduction.glsl.js +1 -1
  613. package/views/3d/webgl-engine/shaders/CutFillReductionTechnique.js +1 -1
  614. package/views/3d/webgl-engine/shaders/CutFillTargetDepth.glsl.js +1 -1
  615. package/views/3d/webgl-engine/shaders/CutFillTargetDepthTechnique.js +1 -1
  616. package/views/3d/webgl-engine/shaders/GaussianSplat.glsl.js +1 -1
  617. package/views/3d/webgl-engine/shaders/GaussianSplatShadow.glsl.js +1 -1
  618. package/views/3d/webgl-engine/shaders/GaussianSplatShadowTechnique.js +1 -1
  619. package/views/3d/webgl-engine/shaders/GaussianSplatTechnique.js +1 -1
  620. package/views/3d/webgl-engine/shaders/OverlayCompositing.glsl.js +1 -1
  621. package/views/3d/webgl-engine/shaders/OverlayCompositingTechnique.js +1 -1
  622. package/views/3d/webgl-engine/shaders/PointRenderer.glsl.js +1 -1
  623. package/views/3d/webgl-engine/shaders/PointRendererTechnique.js +1 -1
  624. package/views/3d/webgl-engine/shaders/ShadowCastAccumulate.glsl.js +1 -1
  625. package/views/3d/webgl-engine/shaders/ShadowCastAccumulateTechnique.js +1 -1
  626. package/views/3d/webgl-engine/shaders/ShadowCastMaskTechnique.js +1 -1
  627. package/views/3d/webgl-engine/shaders/ShadowCastVisualize.glsl.js +1 -1
  628. package/views/3d/webgl-engine/shaders/ShadowCastVisualizeTechnique.js +1 -1
  629. package/views/3d/webgl-engine/shaders/Terrain.glsl.js +1 -1
  630. package/views/3d/webgl-engine/shaders/TerrainTechnique.js +1 -1
  631. package/views/3d/webgl-engine/shaders/Viewshed.glsl.js +1 -1
  632. package/views/3d/webgl-engine/shaders/ViewshedTechnique.js +1 -1
  633. package/views/Viewport2DBaseMixin.js +1 -1
  634. package/views/interactive/editGeometry/support/editPlaneUtils.js +1 -1
  635. package/views/interactive/snapping/featureSources/featureServiceSource/tileUtils.js +1 -1
  636. package/webdoc/support/webdocSaveUtils.js +1 -1
  637. package/widgets/Attachments/support/attachmentUtils.js +1 -1
  638. package/widgets/Attachments.d.ts +0 -1
  639. package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.d.ts +8 -1
  640. package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js +1 -1
  641. package/widgets/BatchAttributeForm/attachmentUtils.js +2 -0
  642. package/widgets/BatchAttributeForm/css.js +1 -1
  643. package/widgets/BatchAttributeForm/inputs/AttachmentElementInput.js +1 -1
  644. package/widgets/BatchAttributeForm/templates/RelationshipElementTemplate.js +1 -1
  645. package/widgets/BatchAttributeForm/templates/support/createBatchFormTemplate.js +1 -1
  646. package/widgets/BatchAttributeForm/templates/support/hashElementTemplate.js +1 -1
  647. package/widgets/BatchAttributeForm/types.d.ts +7 -0
  648. package/widgets/BatchAttributeForm.js +1 -1
  649. package/widgets/BuildingExplorer/BuildingLevelPicker/BuildingLevelPicker.js +1 -1
  650. package/widgets/BuildingExplorer/BuildingLevelPicker/constants.js +1 -1
  651. package/widgets/FeatureForm/RelationshipInput.d.ts +1 -1
  652. package/widgets/FeatureTable.js +1 -1
  653. package/widgets/Features.d.ts +1 -1
  654. package/widgets/LayerList/LayerListItem.js +1 -1
  655. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  656. package/widgets/OrientedImageryViewer/components/OrientedImageryVideoViewModel.js +1 -1
  657. package/widgets/OrientedImageryViewer/constants.js +1 -1
  658. package/widgets/OrientedImageryViewer/services/SuperimposeService.js +1 -1
  659. package/widgets/OrientedImageryViewer/support/superimposeUtils.js +1 -1
  660. package/widgets/OrientedImageryViewer/types.js +1 -1
  661. package/widgets/OrientedImageryViewer/videoViewerUtils.js +1 -1
  662. package/widgets/OrientedImageryViewer.js +1 -1
  663. package/widgets/PanoramicViewer/PanoramicVideoViewerViewModel.js +1 -1
  664. package/widgets/Popup.d.ts +2 -24
  665. package/widgets/ShadowCast/ShadowCastViewModel.js +1 -1
  666. package/widgets/TableList/support/tableListUtils.js +1 -1
  667. package/widgets/TableList.js +1 -1
  668. package/widgets/VideoPlayer/VideoPlayerViewModel.d.ts +9 -0
  669. package/widgets/VideoPlayer/VideoPlayerViewModel.js +1 -1
  670. package/widgets/VideoPlayer/components/PlayerControlsGroup.js +1 -1
  671. package/widgets/support/ContingentValuesManager.js +1 -1
  672. package/widgets/support/forms/formUtils.js +1 -1
  673. package/assets/esri/core/workers/chunks/09630888267cde87654f.js +0 -1
  674. package/assets/esri/core/workers/chunks/0d9d33f29124d464a4cb.js +0 -1
  675. package/assets/esri/core/workers/chunks/0e333f1bce992508b68a.js +0 -1
  676. package/assets/esri/core/workers/chunks/0fa207c68dfd7ddee160.js +0 -1
  677. package/assets/esri/core/workers/chunks/13838b6c045425e73cf8.js +0 -1
  678. package/assets/esri/core/workers/chunks/177472a6a9beb1590934.js +0 -1
  679. package/assets/esri/core/workers/chunks/1d0f9f147bfa00b38d48.js +0 -1
  680. package/assets/esri/core/workers/chunks/1d54b71c43d9d6a5f713.js +0 -1
  681. package/assets/esri/core/workers/chunks/1f6b7626f333809837ef.js +0 -1
  682. package/assets/esri/core/workers/chunks/24646a1176ce34039155.js +0 -1
  683. package/assets/esri/core/workers/chunks/268ed861c882740c805b.js +0 -1
  684. package/assets/esri/core/workers/chunks/2b52c1c01cf568ba01fb.js +0 -1
  685. package/assets/esri/core/workers/chunks/3116a1c2b67a296ba86e.js +0 -1
  686. package/assets/esri/core/workers/chunks/32c17c299c7622ae0d71.js +0 -1
  687. package/assets/esri/core/workers/chunks/34f79355145c8e4c59dd.js +0 -1
  688. package/assets/esri/core/workers/chunks/3be111488365768fd917.js +0 -1
  689. package/assets/esri/core/workers/chunks/3f0483cbcd893acf240c.js +0 -1
  690. package/assets/esri/core/workers/chunks/40d251b6b42a41d68bd2.js +0 -1
  691. package/assets/esri/core/workers/chunks/43cc82373be791b7cb4c.js +0 -1
  692. package/assets/esri/core/workers/chunks/4a23b27bfbcfa08fd9a7.js +0 -1
  693. package/assets/esri/core/workers/chunks/4c54cb80c4dc9bbbd395.js +0 -1
  694. package/assets/esri/core/workers/chunks/598271956c46e21e5c09.js +0 -1
  695. package/assets/esri/core/workers/chunks/5b07f3253403fe25ce5b.js +0 -1
  696. package/assets/esri/core/workers/chunks/5b6f2bfdcdd207d8ae42.js +0 -1
  697. package/assets/esri/core/workers/chunks/5c7ba4b8a9ec2e2e02b5.js +0 -1
  698. package/assets/esri/core/workers/chunks/60915a3708a34da1977e.js +0 -1
  699. package/assets/esri/core/workers/chunks/61c523dd9d8027922465.js +0 -1
  700. package/assets/esri/core/workers/chunks/65520a443e3811255bea.js +0 -1
  701. package/assets/esri/core/workers/chunks/671826fe25105aedcce4.js +0 -1
  702. package/assets/esri/core/workers/chunks/6b79c254897ece95b7a3.js +0 -1
  703. package/assets/esri/core/workers/chunks/6c35583707f5c339ee99.js +0 -1
  704. package/assets/esri/core/workers/chunks/6cb467a9517f024be72f.js +0 -1
  705. package/assets/esri/core/workers/chunks/71119398ec91f1b209d7.js +0 -1
  706. package/assets/esri/core/workers/chunks/8ac8ef856ed9592c433b.js +0 -1
  707. package/assets/esri/core/workers/chunks/8fedb32055ac7f771419.js +0 -1
  708. package/assets/esri/core/workers/chunks/9482a6d7baa24bbf5693.js +0 -1
  709. package/assets/esri/core/workers/chunks/9c11e1fe785e1385fdb1.js +0 -1
  710. package/assets/esri/core/workers/chunks/a567d001fcfa1f1cdeea.js +0 -1
  711. package/assets/esri/core/workers/chunks/a58662698c69190a12d8.js +0 -2
  712. package/assets/esri/core/workers/chunks/afdc6fc453157528cf9b.js +0 -1
  713. package/assets/esri/core/workers/chunks/b5ced451d331ca1ffb68.js +0 -1
  714. package/assets/esri/core/workers/chunks/b7f5d51ac26f37837b3b.js +0 -1
  715. package/assets/esri/core/workers/chunks/ba7fe21a78ea37a02b7c.js +0 -1
  716. package/assets/esri/core/workers/chunks/bb3ab2453ccde2f2611c.js +0 -1
  717. package/assets/esri/core/workers/chunks/beba9f2213d8a850ddb6.js +0 -1
  718. package/assets/esri/core/workers/chunks/c1189316d24fb4cdb2a0.js +0 -1
  719. package/assets/esri/core/workers/chunks/c9461568e1002ebac534.js +0 -1
  720. package/assets/esri/core/workers/chunks/d30790c69724258dab2b.js +0 -1
  721. package/assets/esri/core/workers/chunks/d35c475f004367e333eb.js +0 -1
  722. package/assets/esri/core/workers/chunks/d8c4fb66c733ab2f66d3.js +0 -1
  723. package/assets/esri/core/workers/chunks/d95ffd990b3a7df69e1e.js +0 -1
  724. package/assets/esri/core/workers/chunks/dd6efa0afe879bd11a2e.js +0 -1
  725. package/assets/esri/core/workers/chunks/dec51409372764e7093d.js +0 -1
  726. package/assets/esri/core/workers/chunks/e133840540abf20262a4.js +0 -1
  727. package/assets/esri/core/workers/chunks/e63e24101e7e92c62d98.js +0 -1
  728. package/assets/esri/core/workers/chunks/e785f76c1a75cb1d1e1f.js +0 -1
  729. package/assets/esri/core/workers/chunks/f27397379c6c88bc6ef4.js +0 -1
  730. package/assets/esri/core/workers/chunks/f53805c7a84203305b2c.js +0 -1
  731. package/assets/esri/core/workers/chunks/f60292d97bcdbf19165b.js +0 -1
  732. package/assets/esri/core/workers/chunks/f6ebec8d2248c719b89f.js +0 -1
  733. package/assets/esri/core/workers/chunks/fd2afff07aaac8203c18.js +0 -1
  734. package/assets/esri/core/workers/chunks/ff7708aaa2de720e3a47.js +0 -1
  735. /package/assets/esri/core/workers/chunks/{53bf9b0c2b8da12820ea.js.LICENSE.txt → 29b00d07d3e1d095c590.js.LICENSE.txt} +0 -0
  736. /package/assets/esri/core/workers/chunks/{a58662698c69190a12d8.js.LICENSE.txt → 35fdd62277fd06468a29.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{substitute as t}from"../intl.js";import{deprecateWidget as i}from"../core/deprecate.js";import n from"../core/Logger.js";import{getOrCreateMapValue as o}from"../core/MapUtils.js";import{watch as a,on as s}from"../core/reactiveUtils.js";import{property as r,subclass as l}from"../core/accessorSupport/decorators.js";import{isIntegerField as d}from"../layers/support/fieldUtils.js";import{isString as p}from"../support/guards.js";import u from"./Widget.js";import{getHiddenFieldsValidationErrorMessage as m,getVisibleFieldInputValidationErrorMessage as c,isElementTemplateWithInputType as h}from"./BatchAttributeForm/batchAttributeFormUtils.js";import v from"./BatchAttributeForm/BatchAttributeFormViewModel.js";import{css as b}from"./BatchAttributeForm/css.js";import f from"./BatchAttributeForm/VisibleElements.js";import{isGroupInput as C,isFieldInput as g,isTextElementInput as _,isRelationshipElementInput as y,isUtilityNetworkAssociationsElementInput as F,differentValuesString as I}from"./BatchAttributeForm/inputs/support/inputUtils.js";import{loadCalciteComponents as w}from"./support/componentsUtils.js";import{getLabelForDateFieldValue as x,getIntlOptionsForField as M,prepareISOFieldValueForDateComponents as k,prepareUnixFieldValueForDateComponents as O,normalizeTimeOnlyString as D,getISOFieldValueFromDateComponents as T,getUnixFieldValueFromDateComponents as V}from"./support/dateUtils.js";import{globalCss as E}from"./support/globalCss.js";import{messageBundle as L,vmEvent as U,tsx as R}from"./support/widget.js";import{setFocus as S}from"./support/widgetUtils.js";import{isEmptyValue as B}from"./support/forms/formUtils.js";const N="data-element-id";let A=class extends u{constructor(e,t){super(e,t),this.headingLevel=2,this.messagesCommon=null,this.messages=null,this.featureFormMessages=null,this.viewModel=new v,this.visibleElements=new f,this.groupDisplay="all",this._attemptFocusOnNextRender=!1,this._dateComponentMap=new Map,this._touchedInputs=new Set,this._focusedFieldInput=null,this._batchSwitchInputInitialValues=new Map,this._saveInput=this._saveInput.bind(this),this._onFormSubmit=this._onFormSubmit.bind(this),this._onComponentFocus=this._onComponentFocus.bind(this),this._onComponentBlur=this._onComponentBlur.bind(this),this._afterComponentCreateOrUpdate=this._afterComponentCreateOrUpdate.bind(this),this._afterDateComponentCreate=this._afterDateComponentCreate.bind(this),this._afterRadioGroupCreateOrUpdate=this._afterRadioGroupCreateOrUpdate.bind(this),e?.suppressDeprecationWarning||(this.announceDeprecation=()=>{i(n.getLogger(this),"Editor","arcgis-editor",{version:"5.0"})})}normalizeCtorArgs(e={}){const{suppressDeprecationWarning:t,...i}=e;return i}initialize(){this.addHandles([a(()=>this.features,()=>{this._dateComponentMap.clear()}),a(()=>this.viewModel.activeForm,()=>{this._batchSwitchInputInitialValues.clear()}),s(()=>this.viewModel,"submit",()=>{this.valid||this.goToFirstError()})])}loadDependencies(){return w({input:()=>import("@esri/calcite-components/dist/components/calcite-input"),block:()=>import("@esri/calcite-components/dist/components/calcite-block"),button:()=>import("@esri/calcite-components/dist/components/calcite-button"),combobox:()=>import("@esri/calcite-components/dist/components/calcite-combobox"),"combobox-item":()=>import("@esri/calcite-components/dist/components/calcite-combobox-item"),"combobox-item-group":()=>import("@esri/calcite-components/dist/components/calcite-combobox-item-group"),dropdown:()=>import("@esri/calcite-components/dist/components/calcite-dropdown"),"dropdown-group":()=>import("@esri/calcite-components/dist/components/calcite-dropdown-group"),"dropdown-item":()=>import("@esri/calcite-components/dist/components/calcite-dropdown-item"),"input-date-picker":()=>import("@esri/calcite-components/dist/components/calcite-input-date-picker"),"input-number":()=>import("@esri/calcite-components/dist/components/calcite-input-number"),"input-time-picker":()=>import("@esri/calcite-components/dist/components/calcite-input-time-picker"),"input-time-zone":()=>import("@esri/calcite-components/dist/components/calcite-input-time-zone"),label:()=>import("@esri/calcite-components/dist/components/calcite-label"),"input-message":()=>import("@esri/calcite-components/dist/components/calcite-input-message"),loader:()=>import("@esri/calcite-components/dist/components/calcite-loader"),notice:()=>import("@esri/calcite-components/dist/components/calcite-notice"),switch:()=>import("@esri/calcite-components/dist/components/calcite-switch"),"text-area":()=>import("@esri/calcite-components/dist/components/calcite-text-area"),"radio-button":()=>import("@esri/calcite-components/dist/components/calcite-radio-button"),"radio-button-group":()=>import("@esri/calcite-components/dist/components/calcite-radio-button-group")})}get activeFeatureIndex(){return this.viewModel.activeFeatureIndex}set activeFeatureIndex(e){this.viewModel.activeFeatureIndex=e}get disabled(){return this.viewModel.disabled}set disabled(e){this.viewModel.disabled=e}get _effectiveDisabled(){return this.disabled||this.viewModel.updating}get features(){return this.viewModel.features}set features(e){this.viewModel.features=e}get map(){return this.viewModel.map}set map(e){this.viewModel.map=e}get maximumFeatureCount(){return this.viewModel.maximumFeatureCount}set maximumFeatureCount(e){this.viewModel.maximumFeatureCount=e}get maximumFeatureCountWithComplexForms(){return this.viewModel.maximumFeatureCountWithComplexForms}set maximumFeatureCountWithComplexForms(e){this.viewModel.maximumFeatureCountWithComplexForms=e}get spatialReference(){return this.viewModel.spatialReference}set spatialReference(e){this.viewModel.spatialReference=e}get layerInfos(){return this.viewModel.layerInfos}set layerInfos(e){this.viewModel.layerInfos=e}get timeZone(){return this.viewModel.timeZone}set timeZone(e){this.viewModel.timeZone=e}get icon(){return"edit-attributes"}set icon(e){this._overrideIfSome("icon",e)}get readOnly(){return this.viewModel.readOnly}set readOnly(e){this.viewModel.readOnly=e}get valid(){return this.viewModel.valid}goToFirstError(){const e=this.viewModel.getFirstVisibleInvalidFieldInput();if(!e)return;const{groupInput:t}=e;t&&(t.open||(t.open=!0)),this._focusedFieldInput=e.input,this._attemptFocusOnNextRender=!0,this.scheduleRender()}render(){const{status:e}=this.viewModel;return"failed"===e?this.viewModel.hasTooManyComplexFeatures?this._renderErrorNotice(t(this.messages.formFailedToLoadTooManyComplexFeatures,{num:this.viewModel.maximumFeatureCountWithComplexForms})):this.viewModel.hasTooManyFeatures?this._renderErrorNotice(t(this.messages.formFailedToLoadTooManyFeatures,{num:this.viewModel.maximumFeatureCount})):this._renderErrorNotice(this.messages.formFailedToLoad):this.viewModel.expressionEvaluationFailed?this._renderErrorNotice(this.messages.expressionEvaluationFailed):this.viewModel.hasLayersWithContingentValues?this._renderErrorNotice(this.messages.unsupportedContingentValues):R("div",{class:this.classes(b.base,E.widget,E.panel)},"loaded"===e?this._renderForm():"loading"===e&&this.visibleElements.loadingIndicator?R("calcite-loader",{key:"loader",label:this.messagesCommon?.loading}):null)}submit(){this.viewModel.submit()}_setDateTimeTimeZoneMap(e){const{datePart:t,elementId:i}=e.dataset,n=o(this._dateComponentMap,`${i}`,()=>({}));switch(t){case"date":n.date=e;break;case"time":n.time=e;break;case"timeZone":n.timeZone=e}}_renderErrorNotice(e){return R("div",{class:this.classes(b.base,E.widget,E.panel)},R("calcite-notice",{class:b.noticeError,icon:!0,kind:"warning",open:!0},R("div",{slot:"message"},e)))}_renderForm(){return R("form",{class:b.form,onsubmit:this._onFormSubmit},this._renderInvisibleFieldsError(),this._renderContent())}_renderInvisibleFieldsError(){const{viewModel:e}=this,{hasNonActiveInvalidFeatures:t,activeForm:i}=e;let n;if(!e.submitHasBeenAttempted)return null;if(i.invalidHiddenInputs.length>0)if(n=m(i,e.mode,this.messages),"batch"===this.viewModel.mode){const e=i.invalidHiddenInputs.filter(e=>"hidden:group-visibility-expression:all-features"===e.effectiveVisibilityCode||"hidden:visibility-expression:all-features"===e.visibilityCode);e.length>0?n+=` (${e.map(e=>e.label).join(", ")})`:n=null}else n+=` (${i.invalidHiddenInputs.map(e=>e.label).join(", ")})`;else if(t)return null;return n?R("calcite-notice",{class:b.noticeError,icon:!0,kind:"danger",open:!0},R("div",{slot:"message"},n)):null}_renderContent(){if(!this.viewModel.hasVisibleInputs)return[R("calcite-notice",{class:b.noticeError,icon:!0,kind:"warning",open:!0},R("div",{slot:"message"},this.messages.noVisibleFields[this.viewModel.noVisibleElementsReason]))];const{inputs:e}=this.viewModel.activeForm;return e.filter(e=>e.visible).map(e=>this._renderInput(e))}_renderInput(e){return C(e)?this._renderGroupInput(e):g(e)?this._renderLabeledField(e):_(e)?this._renderTextComponent(e):y(e)?this._renderRelationshipElementInput(e):F(e)?this._renderUtilityNetworkAssociationsElementInput(e):void 0}_renderGroupInput(e){const{inputs:t,template:i,open:n}=e,o=t.filter(e=>e.visible),a=i.label??"";return R("calcite-block",{class:this.classes(b.group,"sequential"===this.groupDisplay?b.groupSequential:null,this.disabled?b.inputDisabled:null),collapsible:!0,description:i.description??void 0,disabled:this._effectiveDisabled,expanded:n,heading:a,headingLevel:this.headingLevel,key:`{${i.elementId}-key}`,label:a,onCalciteBlockClose:()=>{e.open=!1},onCalciteBlockOpen:()=>{e.open=!0}},o.map(e=>this._renderInput(e)))}_renderLabeledField(e){const{elementId:i}=e.template,{label:n,required:o,dataType:a}=e,s=o?t(this.messages.requiredFieldLabel,{name:n}):n;return R("calcite-label",{"aria-label":s,class:b.label,key:`field--${i}`},R("div",{class:b.labelTextContent,key:"labelTextContainer"},n,o?R("span",{"aria-hidden":"true",title:this.messagesCommon.required},"*"):void 0),"unsupported"!==a?this._renderFieldInput(e):this._renderReadOnlyComponent(e),this._renderAuxiliaryText(e))}_renderFieldInput(e){const t=this.getCommonInputProps(e),{dataType:i}=e;return"date"===i?this._renderDateComponents(e,t):"coded-value"===e.domain?.type?this._renderCodedInputs({input:e,props:t}):"number"===i?this._renderNumberComponent(e,t):this._renderStringComponent(e,t)}_renderAuxiliaryText(e){const{compositeError:t,description:i,submittable:n}=e,o=!n&&t&&(this.viewModel.submitHasBeenAttempted||this._touchedInputs.has(e.template.elementId))?c(e,t,this.messages):null;return o?R("calcite-input-message",{icon:!0,status:"invalid"},o):i?R("calcite-input-message",{class:b.description,icon:!1,status:"idle"},i):null}_renderCodedInputs({input:e,props:t}){const i=e.template.input?.type??null,n=e.codedValueOptions;switch(i){case"switch":return this._renderSwitchField({input:e,props:t});case"radio-buttons":return this._renderRadioButtonGroupComponent({input:e,options:n.flat(),props:t});default:return this._renderComboBoxComponent({options:n,props:t,input:e})}}_renderSwitchField({input:e,props:t}){if((this._batchSwitchInputInitialValues.get(e)===I||e.value===I)&&"batch"===this.viewModel.mode){const i={dropdown:{afterCreate:this._afterComponentCreateOrUpdate,afterUpdate:this._afterComponentCreateOrUpdate,disabled:t.readOnly,open:!1,[N]:t[N]},trigger:{appearance:"transparent",iconEnd:"chevron-down",kind:"neutral",slot:"trigger",label:t.label},group:{mode:"single"}};return this._renderDropdownComponent({buttonValue:e.value,dropdownProps:i,options:[{name:this.messages.differentValuesPlaceholder,value:I,disabled:!0},...e.codedValueDomainOptions]})}return this._renderSwitchComponent({input:e,props:t})}_renderSwitchComponent({input:e,props:t}){return R("calcite-switch",{...t,checked:!!h(e.template,"switch")&&e.value===e.template.input.onValue,class:b.inputSwitch,disabled:t.readOnly,onblur:()=>{this._focusedFieldInput=null},onCalciteSwitchChange:({currentTarget:e})=>this._saveInput(e)})}_renderDropdownComponent({buttonValue:e,options:t,dropdownProps:i}){const{trigger:n,dropdown:o,group:a}=i;return R("calcite-dropdown",{...o,onblur:()=>{this._focusedFieldInput=null},onfocus:this._onComponentFocus,topLayerDisabled:this.topLayerDisabled,onCalciteDropdownSelect:({currentTarget:e})=>this._saveInput(e)},R("calcite-button",{...n},e===I?this.messages.differentValuesPlaceholder:e),R("calcite-dropdown-group",{selectionMode:a.mode},t.map(t=>R("calcite-dropdown-item",{disabled:t.disabled,label:String(t.name),selected:e===t.value},t.name))))}_renderComboBoxComponent({input:e,options:t,props:i}){const n="INSERT"===this.viewModel.editType,o=this._touchedInputs.has(e?.template?.elementId),a=n&&e.showNoValueOptionEnabled&&!o?()=>{}:i.onblur,s={...i,onblur:a};return R("calcite-combobox",{...s,selectionMode:"single",topLayerDisabled:this.topLayerDisabled,value:i.placeholder===this.messages.differentValuesPlaceholder?I:String(i.value),onCalciteComboboxChange:({currentTarget:e})=>{e.value!==I&&this._saveInput(e)}},this.renderComboboxOptionsList({input:e,options:t,props:i}))}renderComboboxOptionsList({input:e,options:t,props:i}){const[n,o]=t.map(e=>e.map(({name:e,value:t})=>R("calcite-combobox-item",{heading:e,key:`#${t}`,selected:i.value===t,value:`${t}`}))),a=[...n];o.length>0&&a.push(R("calcite-combobox-item-group",{key:"unsupported",label:this.featureFormMessages.subtypes.unsupportedDomainGroupTitle},o));const s=i.placeholder===this.messages.differentValuesPlaceholder,r=!s&&B(i.value);return e.showNoValueOptionEnabled&&a.unshift(R("calcite-combobox-item",{heading:e.showNoValueLabel||this.messages.empty,key:"empty-option",selected:r,value:""})),s&&a.unshift(R("calcite-combobox-item",{heading:this.messages.differentValuesPlaceholder,key:I,selected:!0,value:I})),a}_renderRadioButtonGroupComponent({input:e,options:t,props:i}){const n=t.map(({name:t,value:n})=>this._renderRadioButtons({label:t,value:n,selected:n===e.value,props:i}));if(e.showNoValueOptionEnabled){const t="",o=e.showNoValueLabel||this.messages.empty,a=B(e.value);n.unshift(this._renderRadioButtons({label:o,value:t,selected:a,props:i}))}return R("calcite-radio-button-group",{afterCreate:this._afterRadioGroupCreateOrUpdate,afterUpdate:this._afterRadioGroupCreateOrUpdate,class:b.inputRadioGroup,disabled:i.readOnly,key:`${i.key}-radio-group`,layout:"vertical",name:i.name,required:i.required},n,i.placeholder===this.messages.differentValuesPlaceholder?R("calcite-label",{class:b.placeholderRadio,key:i.label,layout:"inline"},R("calcite-radio-button",{checked:!0,class:b.inputRadio,disabled:!0,name:i.placeholder,value:i.placeholder}),i.placeholder):null)}_renderRadioButtons({value:e,selected:t,label:i,props:n}){return R("calcite-label",{class:b.inputRadioLabel,key:n.label,layout:"inline"},R("calcite-radio-button",{...n,afterCreate:void 0,afterUpdate:void 0,checked:t,class:b.inputRadio,disabled:n.readOnly,name:n.label,onblur:()=>{this._focusedFieldInput=null},value:e,onCalciteRadioButtonChange:({currentTarget:e})=>{e.checked&&this._saveInput(e)}}),i)}_renderStringComponent(e,t){const{template:i}=e;return!i.field.editable||this.readOnly?this._renderReadOnlyComponent(e):"text-area"===i.input?.type?R("calcite-text-area",{...t,class:this.classes(b.individualElement),resize:"vertical",value:t.value?String(t.value):"",onCalciteTextAreaInput:({currentTarget:e})=>this._saveInput(e)}):R("calcite-input",{...t,class:this.classes(b.individualElement),type:"text",value:t.value?String(t.value):"",onCalciteInputInput:({currentTarget:e})=>this._saveInput(e)})}_renderNumberComponent(e,t){const i=d(e.field);return R("calcite-input-number",{...t,integer:i,type:"number",value:i&&""!==t.value?Math.round(parseFloat(String(t.value))).toString():String(t.value),onCalciteInputNumberInput:({currentTarget:e})=>this._saveInput(e)})}_renderReadOnlyComponent(e,t){const i=this.getCommonInputProps(e);return R("calcite-input",{...i,class:this.classes(b.fieldInput,b.inputDisabled,b.individualElement),readOnly:!0,type:"text",value:String(t??i.value??"")})}_renderDateComponents(e,t){const{field:i}=e;let n;switch(i.type){case"date":n=this._renderDateFieldComponents(e,t);break;case"date-only":n=this._renderDateOnlyFieldComponent(e,t);break;case"time-only":n=this._renderTimeOnlyFieldComponent(e,t);break;case"timestamp-offset":n=this._renderTimestampOffsetFieldComponents(e,t);break;default:n=this._renderReadOnlyComponent(e,x(i,t.value,{timeZone:e.effectiveTimeZone,...M(e.template.field)}))}return e.value===I?[n,R("calcite-input-message",{icon:"information",key:"diff-values-message",status:"idle"},this.messages.differentValues)]:n}_renderDateOnlyFieldComponent(e,t){const{class:i,key:n,readOnly:o}=t,{rawMax:a,rawMin:s}=e.range;return R("calcite-input-date-picker",{afterCreate:this._afterDateComponentCreate,afterUpdate:this._afterComponentCreateOrUpdate,class:i,"data-date-part":"date","data-element-id":t[N],key:`${n}-date-input`,max:p(a)?a:void 0,min:p(s)?s:void 0,onblur:()=>{this._focusedFieldInput=null},onfocus:this._onComponentFocus,overlayPositioning:"fixed",readOnly:o,topLayerDisabled:this.topLayerDisabled,value:e.value===I?"":e.value?String(e.value):"",onCalciteInputDatePickerChange:t=>this._saveValueFromDateComponent(e,t.currentTarget)})}_renderTimeOnlyFieldComponent(e,t){const{class:i,key:n,readOnly:o}=t;return R("calcite-input-time-picker",{afterCreate:this._afterDateComponentCreate,afterUpdate:this._afterComponentCreateOrUpdate,class:i,"data-date-part":"time","data-element-id":t[N],key:`${n}-time-input`,onblur:()=>{this._focusedFieldInput=null},onfocus:this._onComponentFocus,overlayPositioning:"fixed",readOnly:o,value:e.value===I?"":e.value?String(e.value):"",onCalciteInputTimePickerChange:t=>this._saveValueFromDateComponent(e,t.currentTarget)})}_renderTimestampOffsetFieldComponents(e,t){const{class:i,key:n,readOnly:o}=t,{rawMax:a,rawMin:s}=e.range,r=k(a),l=k(s),d=k(e.value===I?"":e.value),p=e.includeTimeOffset,u={afterCreate:this._afterDateComponentCreate,afterUpdate:this._afterComponentCreateOrUpdate,overlayPositioning:"fixed",readOnly:o,[N]:t[N],onfocus:this._onComponentFocus};return R("div",{class:b.dateInputContainer,key:`${n}-date-time-container`},R("calcite-input-date-picker",{...u,class:i,"data-date-part":"date",key:`${n}-date-input`,max:r?.date??void 0,min:l?.date??void 0,onblur:()=>{this._focusedFieldInput=null},topLayerDisabled:this.topLayerDisabled,value:d.date??"",onCalciteInputDatePickerChange:t=>this._saveValueFromDateComponent(e,t.target)}),R("calcite-input-time-picker",{...u,class:i,"data-date-part":"time",key:`${n}-time-input`,onblur:()=>{this._focusedFieldInput=null},value:d.time??"",onCalciteInputTimePickerChange:t=>this._saveValueFromDateComponent(e,t.target)}),p?R("calcite-input-time-zone",{...u,class:i,clearable:e.value===I||null==e.value,"data-date-part":"timeZone",key:`${n}-timezone-input`,onblur:()=>{this._focusedFieldInput=null},value:d.timeZoneOffset||"",onCalciteInputTimeZoneChange:t=>this._saveValueFromDateComponent(e,t.target)}):null)}_renderDateFieldComponents(e,t){const{class:i,key:n,readOnly:o,min:a,max:s}=t,r=e.effectiveTimeZone,l=O(e.value===I?"":e.value,r),d=O(s,r),p=O(a,r),u=e.includeTime,m={afterCreate:this._afterDateComponentCreate,afterUpdate:this._afterComponentCreateOrUpdate,overlayPositioning:"fixed",readOnly:o,[N]:t[N],onfocus:this._onComponentFocus};return R("div",{class:b.dateInputContainer,key:`${n}-date-time-container`},R("calcite-input-date-picker",{...m,class:i,"data-date-part":"date",key:`${n}-date-input`,max:d?.date??void 0,min:p?.date??void 0,onblur:()=>{this._focusedFieldInput=null},topLayerDisabled:this.topLayerDisabled,value:l.date??"",onCalciteInputDatePickerChange:t=>this._saveValueFromDateComponent(e,t.target)}),u?R("calcite-input-time-picker",{...m,"data-date-part":"time",key:`${n}-time-input`,onblur:()=>{this._focusedFieldInput=null},step:1,value:l.time??"",onCalciteInputTimePickerChange:t=>{this._saveValueFromDateComponent(e,t.target)}}):null)}_renderRelationshipElementInput(e){const{elementId:t}=e.template;return R("div",{class:b.relationshipElementInput,"data-testid":`relationship-element-${t}`,key:`relationship-element-${t}`})}_renderTextComponent(e){const{elementId:t}=e.template;return R("div",{class:b.textElementInput,"data-testid":`text-element-${t}`,innerHTML:e.text,key:`text-element-${t}`})}_renderUtilityNetworkAssociationsElementInput(e){const{elementId:t}=e.template;return R("div",{class:b.utilityNetworkAssociationsElementInput,"data-testid":t,key:t})}getCommonInputProps(e){const{template:t,valid:i,value:n,minLength:o,maxLength:a,required:s,fieldName:r,editable:l,userHasChangedValue:d,range:{max:p,min:u}}=e,m=!l||this.readOnly,c=!m&&this._effectiveDisabled;let h=t.hint??void 0,v=!1;return n===I&&(h=this.messages.differentValuesPlaceholder,v=!0),{afterCreate:this._afterComponentCreateOrUpdate,afterUpdate:this._afterComponentCreateOrUpdate,"aria-invalid":i?"false":"true",class:this.classes(b.fieldInput,m?b.inputDisabled:null),status:!d&&!this.viewModel.submitHasBeenAttempted||i?"idle":"invalid",maxLength:a&&a>-1?a:void 0,minLength:o&&o>-1?o:void 0,key:t.elementId,label:r,name:r,max:null!=p?p:void 0,min:null!=u?u:void 0,disabled:c,readOnly:m,onblur:this._onComponentBlur,required:s,placeholder:h,value:v?"":n??"",[N]:t.elementId,onfocus:this._onComponentFocus}}_onFormSubmit(e){e.preventDefault()}_getFieldInputFromHTMLElement(e){return this.viewModel.findFieldInput(e.getAttribute(N))}_afterRadioGroupCreateOrUpdate(e){const t=e.selectedItem,i=e.querySelector("calcite-radio-button"),n=t||i;n&&this._afterComponentCreateOrUpdate(n)}_onComponentFocus(e){const t=e.target,i=this._getFieldInputFromHTMLElement(t);this._touchedInputs.add(i.template.elementId),this._focusedFieldInput=i}_afterComponentCreateOrUpdate(e){const t=this._getFieldInputFromHTMLElement(e),i=this._focusedFieldInput;this._attemptFocusOnNextRender&&i===t&&(this._attemptFocusOnNextRender=!1,S(e))}_onComponentBlur(){this._focusedFieldInput=null}_parseValue(e,t){if(h(t.template,"switch")){if("calcite-dropdown"===e.localName&&t.domain)for(const i of t.domain.codedValues)if(i.name===e.selectedItems[0].textContent)return i.code;return e.checked?t.template.input.onValue:t.template.input.offValue}const i=e.value;return null==i||""===i?null:"number"===t.dataType?"-0"===i||"-0."===i||"-0,"===i?i:parseFloat(i):"date"===t.field.type?parseFloat(i):i}_saveInput(e){const t=this._getFieldInputFromHTMLElement(e),{elementId:i}=t.template;if(!t)return;const n=t?.value;if(h(t.template,"switch")&&"single"!==this.viewModel.mode){const e=o(this._batchSwitchInputInitialValues,t,()=>t.value);this._batchSwitchInputInitialValues.set(t,null===e?n:e)}const a=this._parseValue(e,t);a!==n&&this.viewModel.setValue(i,a)}_afterDateComponentCreate(e){this._setDateTimeTimeZoneMap(e),this._afterComponentCreateOrUpdate(e)}_saveValueFromDateComponent(e,t){const{elementId:i}=e.template,n=e.field.type,o=this._dateComponentMap.get(`${i}`);if(!o)return;const a=e.effectiveTimeZone;let s=e.value===I?void 0:e.value,r=null;"date-only"===n?r=Array.isArray(t.value)?t.value[0]:t.value:"time-only"===n?(s=D(s),r=D(t.value)):r="timestamp-offset"===n?null!=t.value?T({dateComponent:o.date,timeComponent:o.time,oldValue:s,timeZoneComponent:o.timeZone,defaultTimeZone:a}):null:null!=t.value?V({oldValue:s,dateComponent:o.date,timeZone:a,timeComponent:o.time?.value===I?void 0:o.time}):null,s!==r&&(null!==r&&t.value?this.viewModel.setValue(`${i}`,r):this.viewModel.setValue(`${i}`,null))}};e([r()],A.prototype,"activeFeatureIndex",null),e([r()],A.prototype,"disabled",null),e([r()],A.prototype,"_effectiveDisabled",null),e([r()],A.prototype,"features",null),e([r()],A.prototype,"map",null),e([r()],A.prototype,"maximumFeatureCount",null),e([r()],A.prototype,"maximumFeatureCountWithComplexForms",null),e([r()],A.prototype,"spatialReference",null),e([r()],A.prototype,"layerInfos",null),e([r()],A.prototype,"timeZone",null),e([r()],A.prototype,"headingLevel",void 0),e([r()],A.prototype,"icon",null),e([r(),L("esri/t9n/common")],A.prototype,"messagesCommon",void 0),e([r(),L("esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm")],A.prototype,"messages",void 0),e([r(),L("esri/widgets/FeatureForm/t9n/FeatureForm")],A.prototype,"featureFormMessages",void 0),e([r()],A.prototype,"readOnly",null),e([r()],A.prototype,"valid",null),e([r({type:v}),U(["value-change","submit"])],A.prototype,"viewModel",void 0),e([r({type:f,nonNullable:!0})],A.prototype,"visibleElements",void 0),e([r()],A.prototype,"groupDisplay",void 0),A=e([l("esri.widgets.BatchAttributeForm")],A);const $=A;export{$ as default};
2
+ import{__decorate as e}from"tslib";import{substitute as t}from"../intl.js";import{deprecateWidget as i}from"../core/deprecate.js";import n from"../core/Logger.js";import{getOrCreateMapValue as a}from"../core/MapUtils.js";import{watch as s,on as o}from"../core/reactiveUtils.js";import{formatFileSize as l}from"../core/unitFormatUtils.js";import{property as r,subclass as c}from"../core/accessorSupport/decorators.js";import{isIntegerField as m}from"../layers/support/fieldUtils.js";import{isString as d}from"../support/guards.js";import p from"./Widget.js";import{getAttachmentTypeCategory as u,getCalciteIconForAttachment as h}from"./Attachments/support/attachmentUtils.js";import{getAttachmentKey as v,getAttachmentUrl as b,isImageAttachment as f}from"./BatchAttributeForm/attachmentUtils.js";import{getHiddenFieldsValidationErrorMessage as g,getVisibleFieldInputValidationErrorMessage as _,isElementTemplateWithInputType as C}from"./BatchAttributeForm/batchAttributeFormUtils.js";import y from"./BatchAttributeForm/BatchAttributeFormViewModel.js";import{css as I}from"./BatchAttributeForm/css.js";import F from"./BatchAttributeForm/VisibleElements.js";import{isGroupInput as w,isFieldInput as x,isTextElementInput as k,isRelationshipElementInput as M,isAttachmentElementInput as D,isUtilityNetworkAssociationsElementInput as E,differentValuesString as T}from"./BatchAttributeForm/inputs/support/inputUtils.js";import{downloadAttachmentInfo as A}from"./FeatureTable/support/exportUtils.js";import{loadCalciteComponents as O}from"./support/componentsUtils.js";import{getLabelForDateFieldValue as V,getIntlOptionsForField as L,prepareISOFieldValueForDateComponents as S,prepareUnixFieldValueForDateComponents as U,normalizeTimeOnlyString as R,getISOFieldValueFromDateComponents as P,getUnixFieldValueFromDateComponents as $}from"./support/dateUtils.js";import{globalCss as N}from"./support/globalCss.js";import{messageBundle as B,vmEvent as j,tsx as z}from"./support/widget.js";import{setFocus as Z}from"./support/widgetUtils.js";import{isEmptyValue as H}from"./support/forms/formUtils.js";const G="data-element-id";let q=class extends p{constructor(e,t){super(e,t),this.headingLevel=2,this.messagesCommon=null,this.messages=null,this.messagesUnits=null,this.viewModel=new y,this.visibleElements=new F,this.groupDisplay="all",this._attemptFocusOnNextRender=!1,this._dateComponentMap=new Map,this._touchedInputs=new Set,this._focusedFieldInput=null,this._batchSwitchInputInitialValues=new Map,this._attachmentDialogInfo=null,this._maximizeSelectedAttachment=()=>{this._attachmentDialogInfo=this._selectedAttachmentDetails},this._closeAttachmentDialog=()=>{this._attachmentDialogInfo=null},this._saveInput=this._saveInput.bind(this),this._onFormSubmit=this._onFormSubmit.bind(this),this._onComponentFocus=this._onComponentFocus.bind(this),this._onComponentBlur=this._onComponentBlur.bind(this),this._afterComponentCreateOrUpdate=this._afterComponentCreateOrUpdate.bind(this),this._afterDateComponentCreate=this._afterDateComponentCreate.bind(this),this._afterRadioGroupCreateOrUpdate=this._afterRadioGroupCreateOrUpdate.bind(this),e?.suppressDeprecationWarning||(this.announceDeprecation=()=>{i(n.getLogger(this),"Editor","arcgis-editor",{version:"5.0"})})}normalizeCtorArgs(e={}){const{suppressDeprecationWarning:t,...i}=e;return i}initialize(){this.addHandles([s(()=>this.features,()=>{this._dateComponentMap.clear(),this._resetTransientFormState()}),s(()=>this.viewModel.activeForm,()=>{this._batchSwitchInputInitialValues.clear(),this._resetTransientFormState()}),o(()=>this.viewModel,"submit",()=>{this.valid||this.goToFirstError()})])}loadDependencies(){return O({block:()=>import("@esri/calcite-components/dist/components/calcite-block"),button:()=>import("@esri/calcite-components/dist/components/calcite-button"),combobox:()=>import("@esri/calcite-components/dist/components/calcite-combobox"),"combobox-item":()=>import("@esri/calcite-components/dist/components/calcite-combobox-item"),"combobox-item-group":()=>import("@esri/calcite-components/dist/components/calcite-combobox-item-group"),dialog:()=>import("@esri/calcite-components/dist/components/calcite-dialog"),dropdown:()=>import("@esri/calcite-components/dist/components/calcite-dropdown"),"dropdown-group":()=>import("@esri/calcite-components/dist/components/calcite-dropdown-group"),"dropdown-item":()=>import("@esri/calcite-components/dist/components/calcite-dropdown-item"),icon:()=>import("@esri/calcite-components/dist/components/calcite-icon"),input:()=>import("@esri/calcite-components/dist/components/calcite-input"),"input-date-picker":()=>import("@esri/calcite-components/dist/components/calcite-input-date-picker"),"input-number":()=>import("@esri/calcite-components/dist/components/calcite-input-number"),"input-time-picker":()=>import("@esri/calcite-components/dist/components/calcite-input-time-picker"),"input-time-zone":()=>import("@esri/calcite-components/dist/components/calcite-input-time-zone"),label:()=>import("@esri/calcite-components/dist/components/calcite-label"),"input-message":()=>import("@esri/calcite-components/dist/components/calcite-input-message"),loader:()=>import("@esri/calcite-components/dist/components/calcite-loader"),list:()=>import("@esri/calcite-components/dist/components/calcite-list"),"list-item":()=>import("@esri/calcite-components/dist/components/calcite-list-item"),notice:()=>import("@esri/calcite-components/dist/components/calcite-notice"),switch:()=>import("@esri/calcite-components/dist/components/calcite-switch"),"text-area":()=>import("@esri/calcite-components/dist/components/calcite-text-area"),"radio-button":()=>import("@esri/calcite-components/dist/components/calcite-radio-button"),"radio-button-group":()=>import("@esri/calcite-components/dist/components/calcite-radio-button-group")})}get activeFeatureIndex(){return this.viewModel.activeFeatureIndex}set activeFeatureIndex(e){this.viewModel.activeFeatureIndex=e}get disabled(){return this.viewModel.disabled}set disabled(e){this.viewModel.disabled=e}get _effectiveDisabled(){return this.disabled||this.viewModel.updating}get features(){return this.viewModel.features}set features(e){this.viewModel.features=e}get map(){return this.viewModel.map}set map(e){this.viewModel.map=e}get maximumFeatureCount(){return this.viewModel.maximumFeatureCount}set maximumFeatureCount(e){this.viewModel.maximumFeatureCount=e}get maximumFeatureCountWithComplexForms(){return this.viewModel.maximumFeatureCountWithComplexForms}set maximumFeatureCountWithComplexForms(e){this.viewModel.maximumFeatureCountWithComplexForms=e}get spatialReference(){return this.viewModel.spatialReference}set spatialReference(e){this.viewModel.spatialReference=e}get layerInfos(){return this.viewModel.layerInfos}set layerInfos(e){this.viewModel.layerInfos=e}get timeZone(){return this.viewModel.timeZone}set timeZone(e){this.viewModel.timeZone=e}get icon(){return"edit-attributes"}set icon(e){this._overrideIfSome("icon",e)}get readOnly(){return this.viewModel.readOnly}set readOnly(e){this.viewModel.readOnly=e}get valid(){return this.viewModel.valid}goToFirstError(){const e=this.viewModel.getFirstVisibleInvalidFieldInput();if(!e)return;const{groupInput:t}=e;t&&(t.open||(t.open=!0)),this._focusedFieldInput=e.input,this._attemptFocusOnNextRender=!0,this.scheduleRender()}render(){const{status:e}=this.viewModel;return"failed"===e?this.viewModel.hasTooManyComplexFeatures?this._renderErrorNotice(t(this.messages.formFailedToLoadTooManyComplexFeatures,{num:this.viewModel.maximumFeatureCountWithComplexForms})):this.viewModel.hasTooManyFeatures?this._renderErrorNotice(t(this.messages.formFailedToLoadTooManyFeatures,{num:this.viewModel.maximumFeatureCount})):this._renderErrorNotice(this.messages.formFailedToLoad):this.viewModel.expressionEvaluationFailed?this._renderErrorNotice(this.messages.expressionEvaluationFailed):this.viewModel.hasLayersWithContingentValues?this._renderErrorNotice(this.messages.unsupportedContingentValues):z("div",{class:this.classes(I.base,N.widget,N.panel)},"loaded"===e?this._renderForm():"loading"===e&&this.visibleElements.loadingIndicator?z("calcite-loader",{key:"loader",label:this.messagesCommon?.loading}):null,this._renderAttachmentDialog())}submit(){this.viewModel.submit()}_setDateTimeTimeZoneMap(e){const{datePart:t,elementId:i}=e.dataset,n=a(this._dateComponentMap,`${i}`,()=>({}));switch(t){case"date":n.date=e;break;case"time":n.time=e;break;case"timeZone":n.timeZone=e}}_renderErrorNotice(e){return z("div",{class:this.classes(I.base,N.widget,N.panel)},z("calcite-notice",{class:I.noticeError,icon:!0,kind:"warning",open:!0},z("div",{slot:"message"},e)))}_renderForm(){const e=this._selectedAttachmentDetails;return z("form",{class:I.form,onsubmit:this._onFormSubmit},this._renderInvisibleFieldsError(),e?this._renderAttachmentDetailPanelContent(e):this._renderContent())}_renderInvisibleFieldsError(){const{viewModel:e}=this,{hasNonActiveInvalidFeatures:t,activeForm:i}=e;let n;if(!e.submitHasBeenAttempted)return null;if(i.invalidHiddenInputs.length>0)if(n=g(i,e.mode,this.messages),"batch"===this.viewModel.mode){const e=i.invalidHiddenInputs.filter(e=>"hidden:group-visibility-expression:all-features"===e.effectiveVisibilityCode||"hidden:visibility-expression:all-features"===e.visibilityCode);e.length>0?n+=` (${e.map(e=>e.label).join(", ")})`:n=null}else n+=` (${i.invalidHiddenInputs.map(e=>e.label).join(", ")})`;else if(t)return null;return n?z("calcite-notice",{class:I.noticeError,icon:!0,kind:"danger",open:!0},z("div",{slot:"message"},n)):null}_renderContent(){if(!this.viewModel.hasVisibleInputs)return[z("calcite-notice",{class:I.noticeError,icon:!0,kind:"warning",open:!0},z("div",{slot:"message"},this.messages.noVisibleFields[this.viewModel.noVisibleElementsReason]))];const{inputs:e}=this.viewModel.activeForm;return e.filter(e=>e.visible).map(e=>this._renderInput(e))}_renderInput(e){return w(e)?this._renderGroupInput(e):x(e)?this._renderLabeledField(e):k(e)?this._renderTextComponent(e):M(e)?this._renderRelationshipElementInput(e):D(e)?this._renderAttachmentElementInput(e):E(e)?this._renderUtilityNetworkAssociationsElementInput(e):void 0}_renderGroupInput(e){const{inputs:t,template:i,open:n}=e,a=t.filter(e=>e.visible),s=i.label??"";return z("calcite-block",{class:this.classes(I.group,"sequential"===this.groupDisplay?I.groupSequential:null,this.disabled?I.inputDisabled:null),collapsible:!0,description:i.description??void 0,disabled:this._effectiveDisabled,expanded:n,heading:s,headingLevel:this.headingLevel,key:`{${i.elementId}-key}`,label:s,onCalciteBlockClose:()=>{e.open=!1},onCalciteBlockOpen:()=>{e.open=!0}},a.map(e=>this._renderInput(e)))}_renderLabeledField(e){const{elementId:i}=e.template,{label:n,required:a,dataType:s}=e,o=a?t(this.messages.requiredFieldLabel,{name:n}):n;return z("calcite-label",{"aria-label":o,class:I.label,key:`field--${i}`},z("div",{class:I.labelTextContent,key:"labelTextContainer"},n,a?z("span",{"aria-hidden":"true",title:this.messagesCommon.required},"*"):void 0),"unsupported"!==s?this._renderFieldInput(e):this._renderReadOnlyComponent(e),this._renderAuxiliaryText(e))}_renderFieldInput(e){const t=this.getCommonInputProps(e),{dataType:i}=e;return"date"===i?this._renderDateComponents(e,t):"coded-value"===e.domain?.type?this._renderCodedInputs({input:e,props:t}):"number"===i?this._renderNumberComponent(e,t):this._renderStringComponent(e,t)}_renderAuxiliaryText(e){const{compositeError:t,description:i,submittable:n}=e,a=!n&&t&&(this.viewModel.submitHasBeenAttempted||this._touchedInputs.has(e.template.elementId))?_(e,t,this.messages):null;return a?z("calcite-input-message",{icon:!0,status:"invalid"},a):i?z("calcite-input-message",{class:I.description,icon:!1,status:"idle"},i):null}_renderCodedInputs({input:e,props:t}){const i=e.template.input?.type??null,n=e.codedValueOptions;switch(i){case"switch":return this._renderSwitchField({input:e,props:t});case"radio-buttons":return this._renderRadioButtonGroupComponent({input:e,options:n.flat(),props:t});default:return this._renderComboBoxComponent({options:n,props:t,input:e})}}_renderSwitchField({input:e,props:t}){if((this._batchSwitchInputInitialValues.get(e)===T||e.value===T)&&"batch"===this.viewModel.mode){const i={dropdown:{afterCreate:this._afterComponentCreateOrUpdate,afterUpdate:this._afterComponentCreateOrUpdate,disabled:t.readOnly,open:!1,[G]:t[G]},trigger:{appearance:"transparent",iconEnd:"chevron-down",kind:"neutral",slot:"trigger",label:t.label},group:{mode:"single"}};return this._renderDropdownComponent({buttonValue:e.value,dropdownProps:i,options:[{name:this.messages.differentValuesPlaceholder,value:T,disabled:!0},...e.codedValueDomainOptions]})}return this._renderSwitchComponent({input:e,props:t})}_renderSwitchComponent({input:e,props:t}){return z("calcite-switch",{...t,checked:!!C(e.template,"switch")&&e.value===e.template.input.onValue,class:I.inputSwitch,disabled:t.readOnly,onblur:()=>{this._focusedFieldInput=null},onCalciteSwitchChange:({currentTarget:e})=>this._saveInput(e)})}_renderDropdownComponent({buttonValue:e,options:t,dropdownProps:i}){const{trigger:n,dropdown:a,group:s}=i;return z("calcite-dropdown",{...a,onblur:()=>{this._focusedFieldInput=null},onfocus:this._onComponentFocus,topLayerDisabled:this.topLayerDisabled,onCalciteDropdownSelect:({currentTarget:e})=>this._saveInput(e)},z("calcite-button",{...n},e===T?this.messages.differentValuesPlaceholder:e),z("calcite-dropdown-group",{selectionMode:s.mode},t.map(t=>z("calcite-dropdown-item",{disabled:t.disabled,label:String(t.name),selected:e===t.value},t.name))))}_renderComboBoxComponent({input:e,options:t,props:i}){const n="INSERT"===this.viewModel.editType,a=this._touchedInputs.has(e?.template?.elementId),s=n&&e.showNoValueOptionEnabled&&!a?()=>{}:i.onblur,o={...i,onblur:s};return z("calcite-combobox",{...o,selectionMode:"single",topLayerDisabled:this.topLayerDisabled,value:i.placeholder===this.messages.differentValuesPlaceholder?T:String(i.value),onCalciteComboboxChange:({currentTarget:e})=>{e.value!==T&&this._saveInput(e)}},this.renderComboboxOptionsList({input:e,options:t,props:i}))}renderComboboxOptionsList({input:e,options:t,props:i}){const[n,a]=t.map(e=>e.map(({name:e,value:t})=>z("calcite-combobox-item",{heading:e,key:`#${t}`,selected:i.value===t,value:`${t}`}))),s=[...n];a.length>0&&s.push(z("calcite-combobox-item-group",{key:"unsupported",label:this.messages.unsupportedDomainGroupTitle},a));const o=i.placeholder===this.messages.differentValuesPlaceholder,l=!o&&H(i.value);return e.showNoValueOptionEnabled&&s.unshift(z("calcite-combobox-item",{heading:e.showNoValueLabel||this.messages.empty,key:"empty-option",selected:l,value:""})),o&&s.unshift(z("calcite-combobox-item",{heading:this.messages.differentValuesPlaceholder,key:T,selected:!0,value:T})),s}_renderRadioButtonGroupComponent({input:e,options:t,props:i}){const n=t.map(({name:t,value:n})=>this._renderRadioButtons({label:t,value:n,selected:n===e.value,props:i}));if(e.showNoValueOptionEnabled){const t="",a=e.showNoValueLabel||this.messages.empty,s=H(e.value);n.unshift(this._renderRadioButtons({label:a,value:t,selected:s,props:i}))}return z("calcite-radio-button-group",{afterCreate:this._afterRadioGroupCreateOrUpdate,afterUpdate:this._afterRadioGroupCreateOrUpdate,class:I.inputRadioGroup,disabled:i.readOnly,key:`${i.key}-radio-group`,layout:"vertical",name:i.name,required:i.required},n,i.placeholder===this.messages.differentValuesPlaceholder?z("calcite-label",{class:I.placeholderRadio,key:i.label,layout:"inline"},z("calcite-radio-button",{checked:!0,class:I.inputRadio,disabled:!0,name:i.placeholder,value:i.placeholder}),i.placeholder):null)}_renderRadioButtons({value:e,selected:t,label:i,props:n}){return z("calcite-label",{class:I.inputRadioLabel,key:n.label,layout:"inline"},z("calcite-radio-button",{...n,afterCreate:void 0,afterUpdate:void 0,checked:t,class:I.inputRadio,disabled:n.readOnly,name:n.label,onblur:()=>{this._focusedFieldInput=null},value:e,onCalciteRadioButtonChange:({currentTarget:e})=>{e.checked&&this._saveInput(e)}}),i)}_renderStringComponent(e,t){const{template:i}=e;return!i.field.editable||this.readOnly?this._renderReadOnlyComponent(e):"text-area"===i.input?.type?z("calcite-text-area",{...t,class:this.classes(I.individualElement),resize:"vertical",value:t.value?String(t.value):"",onCalciteTextAreaInput:({currentTarget:e})=>this._saveInput(e)}):z("calcite-input",{...t,class:this.classes(I.individualElement),type:"text",value:t.value?String(t.value):"",onCalciteInputInput:({currentTarget:e})=>this._saveInput(e)})}_renderNumberComponent(e,t){const i=m(e.field);return z("calcite-input-number",{...t,integer:i,type:"number",value:i&&""!==t.value?Math.round(parseFloat(String(t.value))).toString():String(t.value),onCalciteInputNumberInput:({currentTarget:e})=>this._saveInput(e)})}_renderReadOnlyComponent(e,t){const i=this.getCommonInputProps(e);return z("calcite-input",{...i,class:this.classes(I.fieldInput,I.inputDisabled,I.individualElement),readOnly:!0,type:"text",value:String(t??i.value??"")})}_renderDateComponents(e,t){const{field:i}=e;let n;switch(i.type){case"date":n=this._renderDateFieldComponents(e,t);break;case"date-only":n=this._renderDateOnlyFieldComponent(e,t);break;case"time-only":n=this._renderTimeOnlyFieldComponent(e,t);break;case"timestamp-offset":n=this._renderTimestampOffsetFieldComponents(e,t);break;default:n=this._renderReadOnlyComponent(e,V(i,t.value,{timeZone:e.effectiveTimeZone,...L(e.template.field)}))}return e.value===T?[n,z("calcite-input-message",{icon:"information",key:"diff-values-message",status:"idle"},this.messages.differentValues)]:n}_renderDateOnlyFieldComponent(e,t){const{class:i,key:n,readOnly:a}=t,{rawMax:s,rawMin:o}=e.range;return z("calcite-input-date-picker",{afterCreate:this._afterDateComponentCreate,afterUpdate:this._afterComponentCreateOrUpdate,class:i,"data-date-part":"date","data-element-id":t[G],key:`${n}-date-input`,max:d(s)?s:void 0,min:d(o)?o:void 0,onblur:()=>{this._focusedFieldInput=null},onfocus:this._onComponentFocus,overlayPositioning:"fixed",readOnly:a,topLayerDisabled:this.topLayerDisabled,value:e.value===T?"":e.value?String(e.value):"",onCalciteInputDatePickerChange:t=>this._saveValueFromDateComponent(e,t.currentTarget)})}_renderTimeOnlyFieldComponent(e,t){const{class:i,key:n,readOnly:a}=t;return z("calcite-input-time-picker",{afterCreate:this._afterDateComponentCreate,afterUpdate:this._afterComponentCreateOrUpdate,class:i,"data-date-part":"time","data-element-id":t[G],key:`${n}-time-input`,onblur:()=>{this._focusedFieldInput=null},onfocus:this._onComponentFocus,overlayPositioning:"fixed",readOnly:a,value:e.value===T?"":e.value?String(e.value):"",onCalciteInputTimePickerChange:t=>this._saveValueFromDateComponent(e,t.currentTarget)})}_renderTimestampOffsetFieldComponents(e,t){const{class:i,key:n,readOnly:a}=t,{rawMax:s,rawMin:o}=e.range,l=S(s),r=S(o),c=S(e.value===T?"":e.value),m=e.includeTimeOffset,d={afterCreate:this._afterDateComponentCreate,afterUpdate:this._afterComponentCreateOrUpdate,overlayPositioning:"fixed",readOnly:a,[G]:t[G],onfocus:this._onComponentFocus};return z("div",{class:I.dateInputContainer,key:`${n}-date-time-container`},z("calcite-input-date-picker",{...d,class:i,"data-date-part":"date",key:`${n}-date-input`,max:l?.date??void 0,min:r?.date??void 0,onblur:()=>{this._focusedFieldInput=null},topLayerDisabled:this.topLayerDisabled,value:c.date??"",onCalciteInputDatePickerChange:t=>this._saveValueFromDateComponent(e,t.target)}),z("calcite-input-time-picker",{...d,class:i,"data-date-part":"time",key:`${n}-time-input`,onblur:()=>{this._focusedFieldInput=null},value:c.time??"",onCalciteInputTimePickerChange:t=>this._saveValueFromDateComponent(e,t.target)}),m?z("calcite-input-time-zone",{...d,class:i,clearable:e.value===T||null==e.value,"data-date-part":"timeZone",key:`${n}-timezone-input`,onblur:()=>{this._focusedFieldInput=null},value:c.timeZoneOffset||"",onCalciteInputTimeZoneChange:t=>this._saveValueFromDateComponent(e,t.target)}):null)}_renderDateFieldComponents(e,t){const{class:i,key:n,readOnly:a,min:s,max:o}=t,l=e.effectiveTimeZone,r=U(e.value===T?"":e.value,l),c=U(o,l),m=U(s,l),d=e.includeTime,p={afterCreate:this._afterDateComponentCreate,afterUpdate:this._afterComponentCreateOrUpdate,overlayPositioning:"fixed",readOnly:a,[G]:t[G],onfocus:this._onComponentFocus};return z("div",{class:I.dateInputContainer,key:`${n}-date-time-container`},z("calcite-input-date-picker",{...p,class:i,"data-date-part":"date",key:`${n}-date-input`,max:c?.date??void 0,min:m?.date??void 0,onblur:()=>{this._focusedFieldInput=null},topLayerDisabled:this.topLayerDisabled,value:r.date??"",onCalciteInputDatePickerChange:t=>this._saveValueFromDateComponent(e,t.target)}),d?z("calcite-input-time-picker",{...p,"data-date-part":"time",key:`${n}-time-input`,onblur:()=>{this._focusedFieldInput=null},step:1,value:r.time??"",onCalciteInputTimePickerChange:t=>{this._saveValueFromDateComponent(e,t.target)}}):null)}_renderRelationshipElementInput(e){const{elementId:t}=e.template;return z("div",{class:I.relationshipElementInput,"data-testid":`relationship-element-${t}`,key:`relationship-element-${t}`})}_renderAttachmentElementInput(e){const{attachments:t,template:{description:i,elementId:n,label:a}}=e;return z("div",{class:I.attachmentElementInput,"data-testid":`attachment-element-${n}`,key:`attachment-element-${n}`},a?z("div",{class:I.attachmentElementLabel,key:`attachment-element-label-${n}`},a):null,i?z("div",{class:I.description,key:`attachment-element-description-${n}`},i):null,t.length?z("calcite-list",{class:I.attachmentElementList,key:`attachment-element-list-${n}`,label:a||this.messagesCommon.details,selectionAppearance:"border",selectionMode:"none"},t.map((t,i)=>{const a=this._formatAttachmentSize(t.size),s=this._getAttachmentLabel(t,i,a,e.displayFilename),o=s===a?void 0:a,l=v(t);return z("calcite-list-item",{class:I.attachmentElementListItem,description:o,key:`attachment-item-${l}`,label:s,onCalciteListItemSelect:()=>this._setSelectedAttachment({attachmentKey:l,elementId:n})},z("div",{class:I.attachmentElementListItemStart,slot:"content-start"},this._renderAttachmentPreviewThumbnail(t,s,e.supportsResize)),z("calcite-icon",{icon:"chevron-right",scale:"s",slot:"actions-end"}))})):z("div",{class:I.attachmentElementEmptyState,key:`attachment-element-empty-state-${n}`},this.messages.attachments.noAttachments),z("div",{class:I.attachmentElementEmptyAction,key:`attachment-element-empty-action-${n}`},z("calcite-button",{appearance:"outline",iconStart:"attachment",kind:"neutral",onclick:()=>{},round:!0},this.messages.attachments.attach)))}_renderAttachmentDetailPanelContent(e){const{attachment:t,input:i}=e,n=v(t),a=!!b(t,i.supportsResize);return z("div",{class:I.attachmentElementDetail,key:`attachment-detail-panel-${i.template.elementId}-${n}`},z("div",{class:I.attachmentElementDetailPreview},this._renderAttachmentPreviewImage(t,i.supportsResize)),z("div",{class:I.attachmentElementDetailActions},z("calcite-button",{appearance:"outline",disabled:!a,iconStart:"download-to",kind:"neutral",onclick:()=>{this._downloadAttachment(t)},scale:"s"},this.messages.attachments.download),f(t)?z("calcite-button",{appearance:"outline",disabled:!a,iconStart:"expand",kind:"neutral",onclick:this._maximizeSelectedAttachment,scale:"s"},this.messages.attachments.maximize):null,z("calcite-button",{appearance:"outline",disabled:!0,iconStart:"refresh",kind:"neutral",scale:"s"},this.messages.attachments.replace)),z("div",{class:I.attachmentElementDetailMetadata},z("span",{class:I.attachmentElementDetailMetadataLabel},this.messages.attachments.fileName),z("span",{class:I.attachmentElementDetailMetadataValue},t.name),z("span",{class:I.attachmentElementDetailMetadataLabel},this.messages.attachments.size),z("span",{class:I.attachmentElementDetailMetadataValue},this._formatAttachmentSize(t.size)),z("span",{class:I.attachmentElementDetailMetadataLabel},this.messages.attachments.type),z("span",{class:I.attachmentElementDetailMetadataValue},this._getLabelForAttachmentType(t))))}_renderAttachmentDialog(){const e=this._attachmentDialogInfo;if(!e)return null;const{attachment:t,input:i}=e;return z("calcite-dialog",{heading:t.name||this.messagesCommon.details,key:"attachment-preview-dialog",modal:!0,open:!0,placement:"cover",width:"l",onCalciteDialogClose:this._closeAttachmentDialog},z("div",{class:I.attachmentElementDetailPreview},this._renderAttachmentPreviewImage(t,i.supportsResize)))}_setSelectedAttachment(e){this.viewModel.setSelectedAttachment(e)}get _selectedAttachmentDetails(){const e=this.viewModel.selectedAttachment,t=this.viewModel.activeForm;if(!e||!t)return null;const i=t.allAttachmentElementInputs.find(t=>t.template.elementId===e.elementId);if(!i)return null;const n=i.attachments.findIndex(t=>v(t)===e.attachmentKey);if(-1===n)return null;return{attachment:i.attachments[n],input:i}}_getAttachmentLabel(e,i,n,a){return!1!==a&&d(e.name)&&e.name.length>0?e.name:n!==this.messagesCommon.notApplicable?n:t(this.messages.attachments.attachmentNumberedLabel,{index:i+1})}_formatAttachmentSize(e){return null==e||Number.isNaN(e)?this.messagesCommon.notApplicable:l(this.messagesUnits,e)}_getLabelForAttachmentType({contentType:e}){if(!e)return this.messagesCommon.notApplicable;const t=this.messages.attachments.attachmentTypes,i=u(e);return t?.[i]||e}_renderAttachmentPreviewThumbnail(e,t,i){const n=b(e,i,64);return n&&f(e)?z("img",{alt:t,class:I.attachmentElementListItemThumb,src:n}):z("calcite-icon",{class:I.attachmentElementListItemIcon,icon:h(e.contentType),scale:"s"})}_renderAttachmentPreviewImage(e,t){const i=b(e,t),n=e.name||this.messagesCommon.details;return i&&f(e)?z("img",{alt:n,class:I.attachmentElementDetailPreviewImage,src:i,title:n}):[z("calcite-icon",{class:I.attachmentElementDetailPreviewIcon,icon:h(e.contentType),scale:"l",textLabel:n,title:n}),this.messages.attachments.noPreviewAvailable]}async _downloadAttachment(e){await A(e)}_renderTextComponent(e){const{elementId:t}=e.template;return z("div",{class:I.textElementInput,"data-testid":`text-element-${t}`,innerHTML:e.text,key:`text-element-${t}`})}_renderUtilityNetworkAssociationsElementInput(e){const{elementId:t}=e.template;return z("div",{class:I.utilityNetworkAssociationsElementInput,"data-testid":t,key:t})}getCommonInputProps(e){const{template:t,valid:i,value:n,minLength:a,maxLength:s,required:o,fieldName:l,editable:r,userHasChangedValue:c,range:{max:m,min:d}}=e,p=!r||this.readOnly,u=!p&&this._effectiveDisabled;let h=t.hint??void 0,v=!1;return n===T&&(h=this.messages.differentValuesPlaceholder,v=!0),{afterCreate:this._afterComponentCreateOrUpdate,afterUpdate:this._afterComponentCreateOrUpdate,"aria-invalid":i?"false":"true",class:this.classes(I.fieldInput,p?I.inputDisabled:null),status:!c&&!this.viewModel.submitHasBeenAttempted||i?"idle":"invalid",maxLength:s&&s>-1?s:void 0,minLength:a&&a>-1?a:void 0,key:t.elementId,label:l,name:l,max:null!=m?m:void 0,min:null!=d?d:void 0,disabled:u,readOnly:p,onblur:this._onComponentBlur,required:o,placeholder:h,value:v?"":n??"",[G]:t.elementId,onfocus:this._onComponentFocus}}_onFormSubmit(e){e.preventDefault()}_getFieldInputFromHTMLElement(e){return this.viewModel.findFieldInput(e.getAttribute(G))}_afterRadioGroupCreateOrUpdate(e){const t=e.selectedItem,i=e.querySelector("calcite-radio-button"),n=t||i;n&&this._afterComponentCreateOrUpdate(n)}_onComponentFocus(e){const t=e.target,i=this._getFieldInputFromHTMLElement(t);this._touchedInputs.add(i.template.elementId),this._focusedFieldInput=i}_afterComponentCreateOrUpdate(e){const t=this._getFieldInputFromHTMLElement(e),i=this._focusedFieldInput;this._attemptFocusOnNextRender&&i===t&&(this._attemptFocusOnNextRender=!1,Z(e))}_onComponentBlur(){this._focusedFieldInput=null}_resetTransientFormState(){this._attemptFocusOnNextRender=!1,this._focusedFieldInput=null,this._attachmentDialogInfo=null}_parseValue(e,t){if(C(t.template,"switch")){if("calcite-dropdown"===e.localName&&t.domain)for(const i of t.domain.codedValues)if(i.name===e.selectedItems[0].textContent)return i.code;return e.checked?t.template.input.onValue:t.template.input.offValue}const i=e.value;return null==i||""===i?null:"number"===t.dataType?"-0"===i||"-0."===i||"-0,"===i?i:parseFloat(i):"date"===t.field.type?parseFloat(i):i}_saveInput(e){const t=this._getFieldInputFromHTMLElement(e),{elementId:i}=t.template;if(!t)return;const n=t?.value;if(C(t.template,"switch")&&"single"!==this.viewModel.mode){const e=a(this._batchSwitchInputInitialValues,t,()=>t.value);this._batchSwitchInputInitialValues.set(t,null===e?n:e)}const s=this._parseValue(e,t);s!==n&&this.viewModel.setValue(i,s)}_afterDateComponentCreate(e){this._setDateTimeTimeZoneMap(e),this._afterComponentCreateOrUpdate(e)}_saveValueFromDateComponent(e,t){const{elementId:i}=e.template,n=e.field.type,a=this._dateComponentMap.get(`${i}`);if(!a)return;const s=e.effectiveTimeZone;let o=e.value===T?void 0:e.value,l=null;"date-only"===n?l=Array.isArray(t.value)?t.value[0]:t.value:"time-only"===n?(o=R(o),l=R(t.value)):l="timestamp-offset"===n?null!=t.value?P({dateComponent:a.date,timeComponent:a.time,oldValue:o,timeZoneComponent:a.timeZone,defaultTimeZone:s}):null:null!=t.value?$({oldValue:o,dateComponent:a.date,timeZone:s,timeComponent:a.time?.value===T?void 0:a.time}):null,o!==l&&(null!==l&&t.value?this.viewModel.setValue(`${i}`,l):this.viewModel.setValue(`${i}`,null))}};e([r()],q.prototype,"activeFeatureIndex",null),e([r()],q.prototype,"disabled",null),e([r()],q.prototype,"_effectiveDisabled",null),e([r()],q.prototype,"features",null),e([r()],q.prototype,"map",null),e([r()],q.prototype,"maximumFeatureCount",null),e([r()],q.prototype,"maximumFeatureCountWithComplexForms",null),e([r()],q.prototype,"spatialReference",null),e([r()],q.prototype,"layerInfos",null),e([r()],q.prototype,"timeZone",null),e([r()],q.prototype,"headingLevel",void 0),e([r()],q.prototype,"icon",null),e([r(),B("esri/t9n/common")],q.prototype,"messagesCommon",void 0),e([r(),B("esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm")],q.prototype,"messages",void 0),e([r(),B("esri/core/t9n/Units")],q.prototype,"messagesUnits",void 0),e([r()],q.prototype,"readOnly",null),e([r()],q.prototype,"valid",null),e([r({type:y}),j(["value-change","submit"])],q.prototype,"viewModel",void 0),e([r({type:F,nonNullable:!0})],q.prototype,"visibleElements",void 0),e([r()],q.prototype,"groupDisplay",void 0),e([r()],q.prototype,"_attemptFocusOnNextRender",void 0),e([r()],q.prototype,"_focusedFieldInput",void 0),e([r()],q.prototype,"_attachmentDialogInfo",void 0),q=e([c("esri.widgets.BatchAttributeForm")],q);const W=q;export{W 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{on as t}from"../../../core/events.js";import{clamp as i}from"../../../core/mathUtils.js";import{watch as s,initial as l}from"../../../core/reactiveUtils.js";import{property as o,subclass as n}from"../../../core/accessorSupport/decorators.js";import r from"../../Widget.js";import{l as h,a,b as v,c as d,d as _,e as c,f as g,g as p,h as u,i as m,j as L}from"../../../chunks/constants.js";import{css as y}from"./css.js";import{Label as P}from"./Label.js";import{LevelItem as C}from"./LevelItem.js";import{loadCalciteComponents as f}from"../../support/componentsUtils.js";import{globalCss as w}from"../../support/globalCss.js";import{tsx as x}from"../../support/widget.js";const b={selectLevel:"selectLevel",clearLevel:"clearLevel",nextLevel:"nextLevel",previousLevel:"previousLevel",currentLevel:"{{value}}"};let W=class extends r{constructor(e,t){super(e,t),this._levelHandlesKey="levelHandles",this._levelEventHandlesKey="levelEventHandles",this._levelWidgets=[],this._labelWidget=new P({onClear:()=>this.vm.clear()}),this._hoveredLevel=null,this._expandedLevelsHeight=void 0,this._normalizedPointerPosition=0,this._hovering=!1,this._containerPosTop=null,this._levelsContainer=null,this._onKeyDown=e=>{switch(e.key){case"ArrowDown":case"ArrowLeft":e.preventDefault(),e.stopPropagation(),this.vm.previous(),this._focusCurrentLevel();break;case"ArrowUp":case"ArrowRight":e.preventDefault(),e.stopPropagation(),this.vm.next(),this._focusCurrentLevel()}},this._onFocus=()=>{this._hoveredLevel=this._levels.length>0?this._levels[0]:null},this._onArrowUpClick=()=>{this.vm.next()},this._onArrowDownClick=()=>{this.vm.previous()},this._onPointerUp=()=>{if(window.getSelection()?.removeAllRanges(),null==this._hoveredLevel)return;const{vm:e}=this;e.enabled&&this._hoveredLevel===e.value?e.clear():e.select(this._hoveredLevel)},this._onPointerEnter=()=>{this._hovering||null==this._levelsContainer||(this._hovering=!0,this._containerPosTop=this._levelsContainer.getBoundingClientRect().top??0)},this._onPointerLeave=()=>{this._hovering&&(this._normalizedPointerPosition=0,this._hoveredLevel=null,this._hovering=!1)},this._onPointerMove=e=>{if(!this._hovering)return!1;if(window.getSelection()?.removeAllRanges(),null!=this._containerPosTop){const t=this._containerPosTop,i=c*L,s=this._expandedLevelsMargin;let l=this._levelsHeight,o=t+i+s;const n=this._levelHeight/2;o+=n,l-=n;let r=(e.clientY-o)/l;r+=u,this._normalizedPointerPosition=r}return!1}}loadDependencies(){return f({action:()=>import("@esri/calcite-components/dist/components/calcite-action")})}postInitialize(){this.addHandles([s(()=>this._levelsContainer,()=>this._onContainerChange(),l),s(()=>this._levels,()=>this._createLevelWidgets(),l),s(()=>this.messages,()=>{this._labelWidget.messages=this.messages??b},l)])}destroy(){this._levelWidgets.forEach(e=>e.destroy()),this._labelWidget.destroy()}get _levels(){return this.vm.allowedValues}get _numLevels(){return this._levels.length}get _levelsHeight(){return Math.round(this._levelHeight*this._numLevels)}get _expandedLevelsMargin(){return Math.round(((this._expandedLevelsHeight??0)-this._levelsHeight)/2)}get _levelWidth(){const{levelWidthNominator:e,levelWidthConstant:t}=m,s=e/Math.sqrt(this._numLevels)+t;return Math.round(i(s,a,h))}get _levelHeight(){const e=v,t=2*e/Math.sqrt(this._numLevels);return Math.round(i(t,2,e))}get _gaussianFactor(){const e=this._numLevels;return e/Math.log(d*e)*_}get _levelClosestToPointer(){if(!this._hovering)return null;const e=this._numLevels-1,t=this._normalizedPointerPosition;return e>=0&&null!=t?this._levels[Math.round((1-t)*e)]:null}render(){const e=this._levelWidgets.length,t=e>1?this._levelWidgets.map(e=>e.render()):null,i=c*L,s=-i/L,l=this._levelsHeight,o=l+2*i;return x("div",{class:this.classes(w.widget,y.container,{[y.animateLevel]:!this._hovering,[y.noLevel]:e<2}),key:this,onkeydown:this._onKeyDown},this._renderLabelContainer(),x("div",{afterCreate:e=>this._levelsContainer=e,class:y.levelsContainer,"data-node-ref":"",onfocus:this._onFocus,styles:{height:`${o}px`,marginBlockStart:`${s}px`,marginBlockEnd:`${s}px`}},x("div",{class:y.innerLevelsContainer,styles:{height:`${l}px`,margin:"0",marginBlockStart:c-this._expandedLevelsMargin+"px"}},t)))}_renderLabelContainer(){const{hasPrevious:e,hasNext:t}=this.vm,i=this.messages??b,s=i.previousLevel,l=i.nextLevel;return x("div",{class:y.labelContainer,tabIndex:0},H({className:y.arrowUp,disabled:!t,icon:"chevron-up",onClick:this._onArrowUpClick,text:l}),this._labelWidget.render(),H({className:y.arrowDown,disabled:!e,icon:"chevron-down",onClick:this._onArrowDownClick,text:s}))}_updateComponents(){const e=this.messages??b,t=this.vm.enabled?this.vm.value:null,i=null!=this._hoveredLevel?this._hoveredLevel:t;this._levelWidgets.forEach(i=>{const s=this.vm.getValueLabel(i.level);i.label=null!=s?s:e.currentLevel?.replace("{{level}}",String(i.level)),i.active=i.level===t,i.hovering=i.level===this._hoveredLevel}),this._labelWidget.level=i,this._labelWidget.active=i===t,this._labelWidget.hovering=null!=this._hoveredLevel}_createLevelWidgets(){this._levelWidgets.forEach(e=>e.destroy()),this._levelWidgets=this._levels.map(e=>new C({level:e,onSelect:()=>this._onLevelToggle(e)})),this.removeHandles(this._levelHandlesKey),this.addHandles([s(()=>{const{vm:e}=this;return[this.messages,e?.value,e?.enabled,this._hoveredLevel,this._hovering]},()=>this._updateComponents(),l),s(()=>[this._normalizedPointerPosition,this._hovering],()=>this._onPointerPositionChange(),l),s(()=>this._levelWidth,e=>this._levelWidgets.forEach(t=>t.width=e),l)],this._levelHandlesKey)}_onContainerChange(){const e=this._levelsContainer;null!=e&&(this.removeHandles(this._levelEventHandlesKey),this.addHandles([t(e,"pointerenter",this._onPointerEnter),t(e,"pointerover",this._onPointerEnter),t(e,"pointerleave",this._onPointerLeave),t(e,"pointerup",this._onPointerUp),t(e,"pointermove",this._onPointerMove)],this._levelEventHandlesKey))}_focusCurrentLevel(){const e=this._levelWidgets.find(e=>e.level===this.vm.value);e?.focus()}_onLevelToggle(e){const{vm:t}=this;t.enabled&&t.value===e?t.clear():t.select(e)}_onPointerPositionChange(){let e=0;this._levelWidgets.forEach((t,i)=>{const{width:s,height:l}=this._getLevelWidgetSize(i);t.height=l,t.width=s,e+=l}),this._hoveredLevel=this._levelClosestToPointer;const t=this._expandedLevelsHeight;(null==t||Math.abs(t-e)>30)&&(this._expandedLevelsHeight=e)}_getLevelWidgetSize(e){const t={width:this._levelWidth,height:this._levelHeight};if(this._hovering){const i=this._getGaussianFactor(e,this._normalizedPointerPosition);t.width+=g*i,t.height+=p*i}return t}_getGaussianFactor(e,t){const i=this._numLevels-1,s=(i-e)/i,l=this._gaussianFactor*(s-t);return Math.exp(-(l**2))}};function H(e){return x("calcite-action",{class:e.className,disabled:e.disabled,icon:e.icon,key:e.className,onclick:e.onClick,text:e.text,textEnabled:!1,title:e.text})}e([o()],W.prototype,"vm",void 0),e([o()],W.prototype,"messages",void 0),e([o()],W.prototype,"_levelWidgets",void 0),e([o()],W.prototype,"_labelWidget",void 0),e([o()],W.prototype,"_hoveredLevel",void 0),e([o()],W.prototype,"_levels",null),e([o()],W.prototype,"_numLevels",null),e([o({readOnly:!0})],W.prototype,"_levelsHeight",null),e([o()],W.prototype,"_expandedLevelsHeight",void 0),e([o({readOnly:!0})],W.prototype,"_expandedLevelsMargin",null),e([o({readOnly:!0})],W.prototype,"_levelWidth",null),e([o({readOnly:!0})],W.prototype,"_levelHeight",null),e([o({readOnly:!0})],W.prototype,"_gaussianFactor",null),e([o({readOnly:!0})],W.prototype,"_levelClosestToPointer",null),e([o({type:Number,range:{min:0,max:1}})],W.prototype,"_normalizedPointerPosition",void 0),e([o()],W.prototype,"_hovering",void 0),e([o()],W.prototype,"_containerPosTop",void 0),e([o()],W.prototype,"_levelsContainer",void 0),W=e([n("esri.widgets.BuildingExplorer.BuildingLevelPicker.BuildingLevelPicker")],W);const k=W;export{k as default};
2
+ import{__decorate as e}from"tslib";import{on as t}from"../../../core/events.js";import{clamp as i}from"../../../core/mathUtils.js";import{watch as s,initial as l}from"../../../core/reactiveUtils.js";import{property as o,subclass as n}from"../../../core/accessorSupport/decorators.js";import r from"../../Widget.js";import{g as h,h as a,l as v,a as d,b as _,k as c,e as g,d as p,m as u,c as m,j as L}from"../../../chunks/constants.js";import{css as y}from"./css.js";import{Label as P}from"./Label.js";import{LevelItem as C}from"./LevelItem.js";import{loadCalciteComponents as f}from"../../support/componentsUtils.js";import{globalCss as w}from"../../support/globalCss.js";import{tsx as x}from"../../support/widget.js";const b={selectLevel:"selectLevel",clearLevel:"clearLevel",nextLevel:"nextLevel",previousLevel:"previousLevel",currentLevel:"{{value}}"};let W=class extends r{constructor(e,t){super(e,t),this._levelHandlesKey="levelHandles",this._levelEventHandlesKey="levelEventHandles",this._levelWidgets=[],this._labelWidget=new P({onClear:()=>this.vm.clear()}),this._hoveredLevel=null,this._expandedLevelsHeight=void 0,this._normalizedPointerPosition=0,this._hovering=!1,this._containerPosTop=null,this._levelsContainer=null,this._onKeyDown=e=>{switch(e.key){case"ArrowDown":case"ArrowLeft":e.preventDefault(),e.stopPropagation(),this.vm.previous(),this._focusCurrentLevel();break;case"ArrowUp":case"ArrowRight":e.preventDefault(),e.stopPropagation(),this.vm.next(),this._focusCurrentLevel()}},this._onFocus=()=>{this._hoveredLevel=this._levels.length>0?this._levels[0]:null},this._onArrowUpClick=()=>{this.vm.next()},this._onArrowDownClick=()=>{this.vm.previous()},this._onPointerUp=()=>{if(window.getSelection()?.removeAllRanges(),null==this._hoveredLevel)return;const{vm:e}=this;e.enabled&&this._hoveredLevel===e.value?e.clear():e.select(this._hoveredLevel)},this._onPointerEnter=()=>{this._hovering||null==this._levelsContainer||(this._hovering=!0,this._containerPosTop=this._levelsContainer.getBoundingClientRect().top??0)},this._onPointerLeave=()=>{this._hovering&&(this._normalizedPointerPosition=0,this._hoveredLevel=null,this._hovering=!1)},this._onPointerMove=e=>{if(!this._hovering)return!1;if(window.getSelection()?.removeAllRanges(),null!=this._containerPosTop){const t=this._containerPosTop,i=c*L,s=this._expandedLevelsMargin;let l=this._levelsHeight,o=t+i+s;const n=this._levelHeight/2;o+=n,l-=n;let r=(e.clientY-o)/l;r+=u,this._normalizedPointerPosition=r}return!1}}loadDependencies(){return f({action:()=>import("@esri/calcite-components/dist/components/calcite-action")})}postInitialize(){this.addHandles([s(()=>this._levelsContainer,()=>this._onContainerChange(),l),s(()=>this._levels,()=>this._createLevelWidgets(),l),s(()=>this.messages,()=>{this._labelWidget.messages=this.messages??b},l)])}destroy(){this._levelWidgets.forEach(e=>e.destroy()),this._labelWidget.destroy()}get _levels(){return this.vm.allowedValues}get _numLevels(){return this._levels.length}get _levelsHeight(){return Math.round(this._levelHeight*this._numLevels)}get _expandedLevelsMargin(){return Math.round(((this._expandedLevelsHeight??0)-this._levelsHeight)/2)}get _levelWidth(){const{levelWidthNominator:e,levelWidthConstant:t}=m,s=e/Math.sqrt(this._numLevels)+t;return Math.round(i(s,a,h))}get _levelHeight(){const e=v,t=2*e/Math.sqrt(this._numLevels);return Math.round(i(t,2,e))}get _gaussianFactor(){const e=this._numLevels;return e/Math.log(d*e)*_}get _levelClosestToPointer(){if(!this._hovering)return null;const e=this._numLevels-1,t=this._normalizedPointerPosition;return e>=0&&null!=t?this._levels[Math.round((1-t)*e)]:null}render(){const e=this._levelWidgets.length,t=e>1?this._levelWidgets.map(e=>e.render()):null,i=c*L,s=-i/L,l=this._levelsHeight,o=l+2*i;return x("div",{class:this.classes(w.widget,y.container,{[y.animateLevel]:!this._hovering,[y.noLevel]:e<2}),key:this,onkeydown:this._onKeyDown},this._renderLabelContainer(),x("div",{afterCreate:e=>this._levelsContainer=e,class:y.levelsContainer,"data-node-ref":"",onfocus:this._onFocus,styles:{height:`${o}px`,marginBlockStart:`${s}px`,marginBlockEnd:`${s}px`}},x("div",{class:y.innerLevelsContainer,styles:{height:`${l}px`,margin:"0",marginBlockStart:c-this._expandedLevelsMargin+"px"}},t)))}_renderLabelContainer(){const{hasPrevious:e,hasNext:t}=this.vm,i=this.messages??b,s=i.previousLevel,l=i.nextLevel;return x("div",{class:y.labelContainer,tabIndex:0},H({className:y.arrowUp,disabled:!t,icon:"chevron-up",onClick:this._onArrowUpClick,text:l}),this._labelWidget.render(),H({className:y.arrowDown,disabled:!e,icon:"chevron-down",onClick:this._onArrowDownClick,text:s}))}_updateComponents(){const e=this.messages??b,t=this.vm.enabled?this.vm.value:null,i=null!=this._hoveredLevel?this._hoveredLevel:t;this._levelWidgets.forEach(i=>{const s=this.vm.getValueLabel(i.level);i.label=null!=s?s:e.currentLevel?.replace("{{level}}",String(i.level)),i.active=i.level===t,i.hovering=i.level===this._hoveredLevel}),this._labelWidget.level=i,this._labelWidget.active=i===t,this._labelWidget.hovering=null!=this._hoveredLevel}_createLevelWidgets(){this._levelWidgets.forEach(e=>e.destroy()),this._levelWidgets=this._levels.map(e=>new C({level:e,onSelect:()=>this._onLevelToggle(e)})),this.removeHandles(this._levelHandlesKey),this.addHandles([s(()=>{const{vm:e}=this;return[this.messages,e?.value,e?.enabled,this._hoveredLevel,this._hovering]},()=>this._updateComponents(),l),s(()=>[this._normalizedPointerPosition,this._hovering],()=>this._onPointerPositionChange(),l),s(()=>this._levelWidth,e=>this._levelWidgets.forEach(t=>t.width=e),l)],this._levelHandlesKey)}_onContainerChange(){const e=this._levelsContainer;null!=e&&(this.removeHandles(this._levelEventHandlesKey),this.addHandles([t(e,"pointerenter",this._onPointerEnter),t(e,"pointerover",this._onPointerEnter),t(e,"pointerleave",this._onPointerLeave),t(e,"pointerup",this._onPointerUp),t(e,"pointermove",this._onPointerMove)],this._levelEventHandlesKey))}_focusCurrentLevel(){const e=this._levelWidgets.find(e=>e.level===this.vm.value);e?.focus()}_onLevelToggle(e){const{vm:t}=this;t.enabled&&t.value===e?t.clear():t.select(e)}_onPointerPositionChange(){let e=0;this._levelWidgets.forEach((t,i)=>{const{width:s,height:l}=this._getLevelWidgetSize(i);t.height=l,t.width=s,e+=l}),this._hoveredLevel=this._levelClosestToPointer;const t=this._expandedLevelsHeight;(null==t||Math.abs(t-e)>30)&&(this._expandedLevelsHeight=e)}_getLevelWidgetSize(e){const t={width:this._levelWidth,height:this._levelHeight};if(this._hovering){const i=this._getGaussianFactor(e,this._normalizedPointerPosition);t.width+=g*i,t.height+=p*i}return t}_getGaussianFactor(e,t){const i=this._numLevels-1,s=(i-e)/i,l=this._gaussianFactor*(s-t);return Math.exp(-(l**2))}};function H(e){return x("calcite-action",{class:e.className,disabled:e.disabled,icon:e.icon,key:e.className,onclick:e.onClick,text:e.text,textEnabled:!1,title:e.text})}e([o()],W.prototype,"vm",void 0),e([o()],W.prototype,"messages",void 0),e([o()],W.prototype,"_levelWidgets",void 0),e([o()],W.prototype,"_labelWidget",void 0),e([o()],W.prototype,"_hoveredLevel",void 0),e([o()],W.prototype,"_levels",null),e([o()],W.prototype,"_numLevels",null),e([o({readOnly:!0})],W.prototype,"_levelsHeight",null),e([o()],W.prototype,"_expandedLevelsHeight",void 0),e([o({readOnly:!0})],W.prototype,"_expandedLevelsMargin",null),e([o({readOnly:!0})],W.prototype,"_levelWidth",null),e([o({readOnly:!0})],W.prototype,"_levelHeight",null),e([o({readOnly:!0})],W.prototype,"_gaussianFactor",null),e([o({readOnly:!0})],W.prototype,"_levelClosestToPointer",null),e([o({type:Number,range:{min:0,max:1}})],W.prototype,"_normalizedPointerPosition",void 0),e([o()],W.prototype,"_hovering",void 0),e([o()],W.prototype,"_containerPosTop",void 0),e([o()],W.prototype,"_levelsContainer",void 0),W=e([n("esri.widgets.BuildingExplorer.BuildingLevelPicker.BuildingLevelPicker")],W);const k=W;export{k as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- export{c as alphaLevelDependencyFactor,d as alphaSpreadFactor,b as levelHeightDefault,g as levelHoveredExtraHeight,f as levelHoveredExtraWidth,k as levelWidthConstant,l as levelWidthMax,a as levelWidthMin,m as levelWidthNominator,j as levelsMarginFactor,e as levelsPadding,h as levelsPointerAdjustment}from"../../../chunks/constants.js";
2
+ export{a as alphaLevelDependencyFactor,b as alphaSpreadFactor,l as levelHeightDefault,d as levelHoveredExtraHeight,e as levelHoveredExtraWidth,f as levelWidthConstant,g as levelWidthMax,h as levelWidthMin,i as levelWidthNominator,j as levelsMarginFactor,k as levelsPadding,m as levelsPointerAdjustment}from"../../../chunks/constants.js";
@@ -29,7 +29,7 @@ export default class RelationshipInput extends EditableInput<RelationshipElement
29
29
  /**
30
30
  * A string value indicating how to display related records within the relationship content. Currently, `list` is the only supported value.
31
31
  *
32
- * | Value | Description |
32
+ * | Value | Description |
33
33
  * | ------ | ----------- |
34
34
  * | list | Shows a list of related records from the specified relationship. |
35
35
  *
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{substitute as t}from"../intl.js";import{isSome as i}from"../core/arrayUtils.js";import{deprecateWidget as s}from"../core/deprecate.js";import n from"../core/Logger.js";import{watch as l,sync as o,syncAndInitial as a,initial as r,on as c}from"../core/reactiveUtils.js";import{renderingSanitizer as d}from"../core/sanitizerUtils.js";import{formatFileSize as h}from"../core/unitFormatUtils.js";import{property as m,subclass as p}from"../core/accessorSupport/decorators.js";import{geometryTypes as u}from"../geometry/support/typeUtils.js";import{isLayerFromCatalog as g}from"../layers/catalog/catalogUtils.js";import{isKnowledgeGraphLayer as w,isMapImageLayer as b,isSubtypeGroupLayer as v}from"../layers/support/layerUtils.js";import y from"../tables/AttributeTableTemplate.js";import f from"../time/TimeExtent.js";import _ from"./Widget.js";import{isSupportedImage as M,getCalciteIconForAttachment as V}from"./Attachments/support/attachmentUtils.js";import{loadPromptComponents as C,Prompt as A}from"./Editor/components/Prompt.js";import E from"./FeatureTable/ColumnMenuVisibleElements.js";import S from"./FeatureTable/FeatureTableViewModel.js";import T from"./FeatureTable/VisibleElements.js";import{isGroupColumn as I,isFieldColumn as D}from"./FeatureTable/support/columnUtils.js";import R from"./FeatureTable/support/TableTemplate.js";import{loadFieldColumnComponents as P,isIFeatureTableSupportedLayer as k,isIFeatureTableSupportedLayerWithAttachments as x,getRelationshipIdsToShow as L}from"./FeatureTable/support/tableUtils.js";import{loadCalciteComponents as O}from"./support/componentsUtils.js";import{globalCss as F}from"./support/globalCss.js";import{getIconForLayer as j}from"./support/iconUtils.js";import{messageBundle as z,vmEvent as $,tsx as U,tsxFragment as N}from"./support/widget.js";import{storeNode as H,discardNode as B}from"./support/widgetUtils.js";var Z;const G="esri-feature-table",W=`${G}__dialog`,Q=`${G}__attachments-view`,K={base:G,content:`${G}__content`,menuPopover:`${G}__menu-popover`,layerDropdownMenu:`${G}__layer-switcher-menu`,tableContainer:`${G}__table-container`,tableContainerWithAttachments:`${G}__table-container--attachments`,tableNavigation:`${G}__table-navigation`,attachmentsView:Q,attachmentsViewContent:`${Q}__content`,attachmentsViewDetails:`${Q}__details`,attachmentsViewDropArea:`${Q}__drop-area`,attachmentsViewDropAreaLabel:`${Q}__drop-area__label`,attachmentsViewDropAreaMessage:`${Q}__drop-area__message`,attachmentsViewIcon:`${Q}__icon`,attachmentsViewInformation:`${Q}__information`,attachmentsViewInformationData:`${Q}__information__data`,attachmentsViewInformationLabel:`${Q}__information__label`,attachmentsViewList:`${Q}__list`,attachmentsViewListFileSize:`${Q}__list__filesize`,attachmentsViewListThumbnail:`${Q}__list__thumbnail`,expanded:`${G}__expanded`,collapsed:`${G}__collapsed`,dialog:`${W}`,dialogContent:`${W}__content`,dialogHeader:`${W}__header`,footerMessage:`${G}__footer__message`,footerIconDanger:`${G}__footer__icon--danger`,footerIconSuccess:`${G}__footer__icon--success`},q={checkCircle:"check-circle",chevronRight:"chevron-right",clearSelection:"clear-selection",downloadTo:"download-to",exclamationMarkTriangle:"exclamation-mark-triangle",expand:"expand",exportToCSV:"file-csv",folderOpen:"folder-open",delete:"trash",layers:"layers",moveUp:"move-up",plus:"plus",refresh:"refresh",reset:"reset",save:"save",showAll:"selection-x",showColumn:"show-column",showSelected:"selection-filter",table:"table",upload:"upload",zoomToSelection:"zoom-to-object"};let J=Z=class extends _{constructor(e,t){super(e,t),this._attachmentsDialogPreviewLoading=!1,this._attachmentsInput=null,this._columnVisibilityActions=new Map,this._columnVisibilityList=null,this.attachmentsList=null,this.closed=!1,this.collapsed=!1,this.description=null,this.disabled=!1,this.messagesEditor=null,this.navigationScale="m",this.title=null,this.viewModel=new S,this.visibleElements=new T,this.announceDeprecation=()=>{s(n.getLogger(this),"Feature Table","arcgis-feature-table",{version:"5.0"})},this._showDeleteSelectionPrompt=this._showDeleteSelectionPrompt.bind(this),this._showDiscardEditsPrompt=this._showDiscardEditsPrompt.bind(this),this._resetNestedViews=this._resetNestedViews.bind(this)}initialize(){this.addHandles([l(()=>[this.isQueryingOrSyncing,this.editingEnabled],()=>this.scheduleRender()),l(()=>[this._effectiveVisibleElements,this._effectiveVisibleElements.columnDescriptions,this._effectiveVisibleElements.columnMenus,this._effectiveVisibleElements.columnMenuItems,this.columns.length],()=>{this.columns.forEach(e=>e.visibleElements=this._effectiveVisibleElements),this.refreshCellContent()},o),l(()=>[this.topLayerDisabled,this.columns],()=>this.columns.forEach(e=>e.topLayerDisabled=this.topLayerDisabled),a),l(()=>this._effectiveVisibleElements.selectionColumn,e=>{this.grid&&(this.grid.selectionColumnEnabled=e)},r),c(()=>this.viewModel,"show-related-table",e=>this._onShowRelatedTable(e)),l(()=>this.editingEnabled,()=>{const{attachmentsViewOptions:e}=this;this.clearPrompt(),e&&(e.form?.reset(),e.candidates=null)})])}loadDependencies(){return Promise.all([O({action:()=>import("@esri/calcite-components/dist/components/calcite-action"),alert:()=>import("@esri/calcite-components/dist/components/calcite-alert"),button:()=>import("@esri/calcite-components/dist/components/calcite-button"),chip:()=>import("@esri/calcite-components/dist/components/calcite-chip"),dialog:()=>import("@esri/calcite-components/dist/components/calcite-dialog"),dropdown:()=>import("@esri/calcite-components/dist/components/calcite-dropdown"),"dropdown-group":()=>import("@esri/calcite-components/dist/components/calcite-dropdown-group"),"dropdown-item":()=>import("@esri/calcite-components/dist/components/calcite-dropdown-item"),icon:()=>import("@esri/calcite-components/dist/components/calcite-icon"),label:()=>import("@esri/calcite-components/dist/components/calcite-label"),list:()=>import("@esri/calcite-components/dist/components/calcite-list"),"list-item":()=>import("@esri/calcite-components/dist/components/calcite-list-item"),notice:()=>import("@esri/calcite-components/dist/components/calcite-notice"),pagination:()=>import("@esri/calcite-components/dist/components/calcite-pagination"),panel:()=>import("@esri/calcite-components/dist/components/calcite-panel"),popover:()=>import("@esri/calcite-components/dist/components/calcite-popover"),progress:()=>import("@esri/calcite-components/dist/components/calcite-progress"),switch:()=>import("@esri/calcite-components/dist/components/calcite-switch"),tooltip:()=>import("@esri/calcite-components/dist/components/calcite-tooltip")}),C(),P()])}destroy(){this.drainRelatedTables(),this.clearPrompt()}get _attachmentsViewIsVisible(){return!(null==this.attachmentsViewOptions.objectId&&!this.relatedTables.some(e=>null!=e.attachmentsViewOptions.objectId))}get _columnVisibilityActionDisabled(){const e=this.effectiveTable;return e.menuConfig?.disabled??0===e.columns.length}get _dialogIsOpen(){return!!this.attachmentsViewOptions.dialogInfo}get _effectiveDescription(){const{description:e}=this;return null!=e?d.sanitize("function"==typeof e?e():e):void 0}get _effectiveLayers(){const{layer:e,layers:t}=this,i=t?.length?t.filter(k):[],s=i.length?i:[...this._viewLayers];return e&&!s.includes(e)&&s.push(e),s}get _effectiveTitle(){const{layer:e,messages:i,state:s,highlightIds:n,title:l,size:o}=this;if(l)return d.sanitize("function"==typeof l?l():l);if(!i)return"";if(!e)return i.noLayer;switch(s){case"disabled":return i.errorLayer;case"ready":case"loading":return i.loading;case"error":return i.errorData}return t(i.header,{title:d.sanitize(e.title),count:o,selected:n.length})}get _effectiveVisibleElements(){return this.visibleElementsOverride??this.visibleElements}get _filteredTables(){const e=this.relatedTables.toArray(),t=1===e.length;return this.allRelatedTablesVisible?e:t?[e[0]]:this._attachmentsViewIsVisible?e.slice(-1):e.slice(-2)}get _hasAttachmentsViewError(){return null!=this.attachmentsViewOptions.error}get _hasCustomMenuItems(){return!!this.menuConfig?.items?.length}get _hasDefaultMenuItems(){return!!(this._showClearSelectionAction||this._showDeleteSelectionAction||this._showExportSelectionToCSVAction||this._showRefreshDataAction||this._showZoomToSelectionAction||this._showSelectedRecordsShowSelectedAction||this._showSelectedRecordsShowAllAction||this._showColumnVisibilityAction)}get _shouldShowGrid(){return this.allRelatedTablesVisible||1===this.relatedTables.length&&!this._attachmentsViewIsVisible}get _shouldShowMenu(){const{header:e,menu:t}=this._effectiveVisibleElements;return!(!e||!t||!this._hasDefaultMenuItems&&!this._hasCustomMenuItems)}get _showClearSelectionAction(){return!(!this.highlightIds.length||!this._effectiveVisibleElements.menuItems?.clearSelection||this.relatedTables.length||this._attachmentsViewIsVisible)}get _showColumnVisibilityAction(){const{columnVisibilityMenu:e,header:t,menu:i,menuItems:s}=this._effectiveVisibleElements;return!(!(t&&i&&e&&!1!==s?.toggleColumns)||this.showRelatedTableCallback||this.allRelatedTablesVisible||this._attachmentsViewIsVisible)}get _showDeleteSelectionAction(){return!(!(this.editingEnabled&&this.highlightIds.length&&this._effectiveVisibleElements.menuItems?.deleteSelection&&this.layer?.capabilities?.operations?.supportsDelete)||this.relatedTables.length||this._attachmentsViewIsVisible)}get _showExportSelectionToCSVAction(){return!(!(this._effectiveVisibleElements.menuItems.exportSelectionToCSV&&this.layer&&this.highlightIds.length)||this.relatedTables.length)}get _showLayerDropdown(){return!(!this._effectiveLayers.length||!this._effectiveVisibleElements.layerDropdown)}get _shouldShowNavigationBar(){const e=!!this.relatedTable||this._attachmentsViewIsVisible;return!this.tableParent&&e}get _showRefreshDataAction(){return!!this._effectiveVisibleElements.menuItems?.refreshData}get _showSelectedRecordsShowSelectedAction(){const e=this.objectIds.length,t=this.highlightIds.length;return!(!t||!this._effectiveVisibleElements.menuItems?.selectedRecordsShowSelectedToggle||e&&t===e||this.relatedTables.length||this._attachmentsViewIsVisible)}get _showSelectedRecordsShowAllAction(){return!(!this._effectiveVisibleElements.menuItems?.selectedRecordsShowAllToggle||!this.objectIds.length||this.relatedTables.length)}get _showZoomToSelectionAction(){return!(!this.view||!this.highlightIds.length||this.effectiveTable.layer?.isTable||!this._effectiveVisibleElements.menuItems?.zoomToSelection)}get _viewLayers(){const e=this.view?.map;if(!e)return[];const t=new Set,i=e=>{!k(e)||v(e)||t.has(e)||"sublayer"===e.type&&!e.capabilities?.operations?.supportsQuery||(e.load(),t.add(e))},s=e=>{g(e)||"catalog-footprint"===e.type||(w(e)?(e.load(),e.layers?.forEach(i),e.tables?.forEach(i)):b(e)?(e.loadAll(),e.allSublayers?.forEach(i),e.subtables?.forEach(i)):v(e)?(e.loadAll(),e.sublayers?.forEach(i)):i(e))};return e.allLayers.forEach(s),e.allTables.forEach(s),[...t.values()]}get grid(){return this.viewModel.grid}get actionColumn(){return this.viewModel.actionColumn}get actionColumnConfig(){return this.viewModel.actionColumnConfig}set actionColumnConfig(e){this.viewModel.actionColumnConfig=e}get activeFilters(){return this.viewModel.activeFilters}get activeSortOrders(){return this.viewModel.activeSortOrders}get allColumns(){return this.viewModel.allColumns}get allColumnsVisible(){return this.viewModel.allColumnsVisible}get allRelatedTablesVisible(){return this.viewModel.allRelatedTablesVisible}get allVisibleColumns(){return this.viewModel.allVisibleColumns}get attachmentsColumns(){return this.viewModel.attachmentsColumns}get attachmentsEnabled(){return this.viewModel.attachmentsEnabled}set attachmentsEnabled(e){this.viewModel.attachmentsEnabled=e}get attachmentsViewOptions(){return this.viewModel.attachmentsViewOptions}set attachmentsViewOptions(e){this.viewModel.attachmentsViewOptions=e}get attributeTableTemplate(){return this.viewModel.attributeTableTemplate}set attributeTableTemplate(e){this.viewModel.attributeTableTemplate=e}get autoRefreshEnabled(){return this.viewModel.autoRefreshEnabled}set autoRefreshEnabled(e){this.viewModel.autoRefreshEnabled=e}get autoSaveEnabled(){return this.viewModel.autoSaveEnabled}set autoSaveEnabled(e){this.viewModel.autoSaveEnabled=e}get canAddRelatedFeature(){return this.viewModel.canAddRelatedFeature}get clearPrompt(){return this.viewModel.clearPrompt}set clearPrompt(e){this.viewModel.clearPrompt=e}get columnPerformanceModeEnabled(){return this.viewModel.columnPerformanceModeEnabled}set columnPerformanceModeEnabled(e){this.viewModel.columnPerformanceModeEnabled=e}get columnReorderingEnabled(){return this.viewModel.columnReorderingEnabled}set columnReorderingEnabled(e){this.viewModel.columnReorderingEnabled=e}get columns(){return this.viewModel.columns}get defaultSelectionManager(){return this.viewModel.defaultSelectionManager}get definitionExpression(){return this.viewModel.definitionExpression}set definitionExpression(e){this.viewModel.definitionExpression=e}get container(){return super.container}set container(e){super.container=e}get editingEnabled(){return this.viewModel.editingEnabled}set editingEnabled(e){this.viewModel.editingEnabled=e}get effectiveSelectionManager(){return this.viewModel.effectiveSelectionManager}get effectiveSize(){return this.viewModel.effectiveSize}get effectiveTable(){return this.relatedTable||this}get fieldColumns(){return this.viewModel.fieldColumns}get filterGeometry(){return this.viewModel.filterGeometry}set filterGeometry(e){this.viewModel.filterGeometry=e}get filterBySelectionEnabled(){return this.viewModel.filterBySelectionEnabled}set filterBySelectionEnabled(e){this.viewModel.filterBySelectionEnabled=e}get filterByViewExtent(){return this.viewModel.filterByViewExtent}set filterByViewExtent(e){this.viewModel.filterByViewExtent=e}get groupColumns(){return this.viewModel.groupColumns}get hasContingentValues(){return this.viewModel.hasContingentValues}get hasInvalidPendingEdits(){return this.viewModel.hasInvalidPendingEdits}get hasPendingEdits(){return this.viewModel.hasPendingEdits}get hiddenFields(){return this.viewModel.hiddenFields}set hiddenFields(e){this.viewModel.hiddenFields=e}get highlightEnabled(){return this.viewModel.highlightEnabled}set highlightEnabled(e){this.viewModel.highlightEnabled=e}get highlightIds(){return this.viewModel.highlightIds}set highlightIds(e){this.viewModel.highlightIds=e}get icon(){return q.table}set icon(e){this._overrideIfSome("icon",e)}get initialSize(){return this.viewModel.initialSize}set initialSize(e){this.viewModel.initialSize=e}get isQueryingOrSyncing(){return this.viewModel.isQueryingOrSyncing}get isSyncing(){return this.viewModel.isSyncing}get isSyncingAttachments(){return this.viewModel.isSyncingAttachments}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get layer(){return this.viewModel.layer}set layer(e){this.viewModel.layer=e}get layers(){return this.viewModel.layers}set layers(e){this.viewModel.layers=e}get layerView(){return this.viewModel.layerView}get maxSize(){return this.viewModel.maxSize}set maxSize(e){this.viewModel.maxSize=e}get messages(){return this.viewModel.messages}set messages(e){this.viewModel.messages=e}get messagesCommon(){return this.viewModel.messagesCommon}set messagesCommon(e){this.viewModel.messagesCommon=e}get messagesUnits(){return this.viewModel.messagesUnits}set messagesUnits(e){this.viewModel.messagesUnits=e}get messagesURIUtils(){return this.viewModel.messagesURIUtils}set messagesURIUtils(e){this.viewModel.messagesURIUtils=e}get menuConfig(){return this.viewModel.menuConfig}set menuConfig(e){this.viewModel.menuConfig=e}get multipleSelectionEnabled(){return this.viewModel.multipleSelectionEnabled}set multipleSelectionEnabled(e){this.viewModel.multipleSelectionEnabled=e}get multipleSelectionEnabledOverride(){return this.viewModel.multipleSelectionEnabledOverride}set multipleSelectionEnabledOverride(e){this.viewModel.multipleSelectionEnabledOverride=e}get multiSortEnabled(){return this.viewModel.multiSortEnabled}set multiSortEnabled(e){this.viewModel.multiSortEnabled=e}get multipleSortPriority(){return this.viewModel.multipleSortPriority}set multipleSortPriority(e){this.viewModel.multipleSortPriority=e}get noDataMessage(){return this.viewModel.noDataMessage}set noDataMessage(e){this.viewModel.noDataMessage=e}get objectIds(){return this.viewModel.objectIds}set objectIds(e){this.viewModel.objectIds=e}get outFields(){return this.viewModel.outFields}set outFields(e){this.viewModel.outFields=e}get pageCount(){return this.viewModel.pageCount}get pageIndex(){return this.viewModel.pageIndex}set pageIndex(e){this.viewModel.pageIndex=e}get pageSize(){return this.viewModel.pageSize}set pageSize(e){this.viewModel.pageSize=e}get paginationEnabled(){return this.viewModel.paginationEnabled}set paginationEnabled(e){this.viewModel.paginationEnabled=e}get pendingEditsCount(){return this.viewModel.pendingEditsCount}get prompt(){return this.viewModel.prompt}set prompt(e){this.viewModel.prompt=e}get relatedRecordsEnabled(){return this.viewModel.relatedRecordsEnabled}set relatedRecordsEnabled(e){this.viewModel.relatedRecordsEnabled=e}get relatedTable(){return this.viewModel.relatedTable}get relatedTableHasContingentValues(){return this.viewModel.relatedTableHasContingentValues}get relatedTableHasInvalidPendingEdits(){return this.viewModel.relatedTableHasInvalidPendingEdits}get relatedTableHasPendingEdits(){return this.viewModel.relatedTableHasPendingEdits}get relatedTables(){return this.viewModel.relatedTables}get relationship(){return this.viewModel.relationship}get relationshipColumnConfigs(){return this.viewModel.relationshipColumnConfigs}set relationshipColumnConfigs(e){this.viewModel.relationshipColumnConfigs=e}get relationshipColumns(){return this.viewModel.relationshipColumns}get relationshipConfig(){return this.viewModel.relationshipConfig}set relationshipConfig(e){this.viewModel.relationshipConfig=e}get relationshipInfos(){return this.viewModel.relationshipInfos}get returnGeometryEnabled(){return this.viewModel.returnGeometryEnabled}set returnGeometryEnabled(e){this.viewModel.returnGeometryEnabled=e}get returnMEnabled(){return this.viewModel.returnMEnabled}set returnMEnabled(e){this.viewModel.returnMEnabled=e}get returnZEnabled(){return this.viewModel.returnZEnabled}set returnZEnabled(e){this.viewModel.returnZEnabled=e}get rowHighlightIds(){return this.viewModel.rowHighlightIds}set rowHighlightIds(e){this.viewModel.rowHighlightIds=e}get selectionManager(){return this.viewModel.selectionManager}set selectionManager(e){this.viewModel.selectionManager=e}get selectionSource(){return this.viewModel.selectionSource}set selectionSource(e){this.viewModel.selectionSource=e}get showAllRelatedTables(){return this.viewModel.showAllRelatedTables}set showAllRelatedTables(e){this.viewModel.showAllRelatedTables=e}get showPrompt(){return this.viewModel.showPrompt}set showPrompt(e){this.viewModel.showPrompt=e}get showRelatedTableCallback(){return this.viewModel.showRelatedTableCallback}set showRelatedTableCallback(e){this.viewModel.showRelatedTableCallback=e}get size(){return this.viewModel.size}get state(){return this.viewModel.state}get supportsAddAttachments(){return this.viewModel.supportsAddAttachments}get supportsAttachments(){return this.viewModel.supportsAttachments}get supportsDeleteAttachments(){return this.viewModel.supportsDeleteAttachments}get supportsResizeAttachments(){return this.viewModel.supportsResizeAttachments}get supportsUpdateAttachments(){return this.viewModel.supportsUpdateAttachments}get syncTemplateOnChangesEnabled(){return this.viewModel.syncTemplateOnChangesEnabled}set syncTemplateOnChangesEnabled(e){this.viewModel.syncTemplateOnChangesEnabled=e}get syncViewSelection(){return this.viewModel.syncViewSelection}set syncViewSelection(e){this.viewModel.syncViewSelection=e}get syncWithViewSelectionManager(){return this.syncViewSelection}set syncWithViewSelectionManager(e){this.syncViewSelection=e}get tableController(){return this.viewModel.tableController}set tableController(e){this.viewModel.tableController=e}get tableParent(){return this.viewModel.tableParent}set tableParent(e){this.viewModel.tableParent=e}get tableTemplate(){return this.viewModel.tableTemplate}set tableTemplate(e){this.viewModel.tableTemplate=e}get tableTemplateOverride(){return this.viewModel.tableTemplateOverride}set tableTemplateOverride(e){this.viewModel.tableTemplateOverride=e}get timeExtent(){return this.viewModel.timeExtent}set timeExtent(e){this.viewModel.timeExtent=e}get timeZone(){return this.viewModel.timeZone}set timeZone(e){this.viewModel.timeZone=e}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}get visibleColumns(){return this.viewModel.visibleColumns}get visibleElementsOverride(){const{attachmentsViewOptions:e,relatedTable:t,tableController:i,visibleElements:s}=this,{columnDescriptions:n,columnMenus:l,tooltips:o}=s,a=null!=e.objectId;if(t)return new T({columnDescriptions:n,columnMenus:l,tooltips:o,close:s.close,header:s.header,layerDropdown:s.layerDropdown,layerDropdownIcons:s.layerDropdownIcons,menu:s.menu,menuItems:s.menuItems,progress:s.progress,selectionColumn:!1,columnMenuItems:new E({sortAscending:!1,sortDescending:!1})});if(i){const e=i.relatedTable===this,t=i.allRelatedTablesVisible,r=e&&s.selectionColumn&&!t&&!a,c=e&&!t&&!a;return new T({columnDescriptions:n,columnMenus:l,tooltips:o,selectionColumn:r,close:!1,header:!1,layerDropdown:!1,menu:!1,pendingEditsFooter:!1,progress:!1,columnMenuItems:new E({sortAscending:c,sortDescending:c})})}return a?new T({columnDescriptions:n,columnMenus:l,tooltips:o,close:s.close,header:s.header,layerDropdown:s.layerDropdown,layerDropdownIcons:s.layerDropdownIcons,menu:s.menu,menuItems:s.menuItems,progress:s.progress,selectionColumn:!1,columnMenuItems:new E({sortAscending:!1,sortDescending:!1})}):null}addPendingEdits(e){this.viewModel.addPendingEdits(e)}async deleteAttachments(e,t,i){null!=e&&t?.length&&(i?this._showDeleteAttachmentPrompt(e,t):await this.viewModel.deleteAttachments(e,t))}async deleteSelection(e){this.highlightIds.length&&(e?this._showDeleteSelectionPrompt():await this.viewModel.deleteSelection())}async discardPendingEdits(e,t){return t?this._showDiscardEditsPrompt(e):this.viewModel.discardPendingEdits(e)}async downloadAttachmentById(e,t){return this.viewModel.downloadAttachmentById(e,t)}drainRelatedTables(){this.viewModel.drainRelatedTables()}async exportSelectionToCSV(e){return this.viewModel.exportSelectionToCSV(e)}findColumn(e){return this.viewModel.findColumn(e)}getFeatureStoreItemByObjectId(e){return this.viewModel.getFeatureStoreItemByObjectId(e)}goToPage(e){this.viewModel.goToPage(e)}hideAllColumns(){this.viewModel.hideAllColumns()}hideColumn(e){this.grid?.hideColumn(e)}nextPage(){this.viewModel.nextPage()}previousPage(){this.viewModel.previousPage()}async refresh(){await this.viewModel.refresh()}refreshCellContent(){this.viewModel.refreshCellContent()}async saveAttachmentsViewForm(){await this.viewModel.saveAttachmentsViewForm()}async savePendingEdits(){await this.viewModel.savePendingEdits()}showAllColumns(){this.viewModel.showAllColumns()}showColumn(e){this.grid?.showColumn(e)}sortColumn(e,t){this.viewModel.sortColumn(e,t)}scrollLeft(){this.viewModel.scrollLeft()}scrollToBottom(){this.viewModel.scrollToBottom()}scrollToIndex(e){this.viewModel.scrollToIndex(e)}scrollToRow(e){this.viewModel.scrollToRow(e)}scrollToTop(){this.viewModel.scrollToTop()}toggleColumnVisibility(e){this.viewModel.toggleColumnVisibility(e)}async zoomToSelection(){return this.effectiveTable.viewModel.zoomToSelection()}render(){const{_effectiveVisibleElements:e,isQueryingOrSyncing:t,menuConfig:i,state:s}=this;return U("div",{bind:this,class:this.classes(K.base,F.widget)},U("calcite-panel",{bind:this,class:K.content,closable:e.close,closed:this.closed,collapsed:this.collapsed,collapsible:e.collapse,description:this._effectiveDescription,disabled:this.disabled||"disabled"===s&&!this._effectiveLayers?.length,heading:e.header?this._effectiveTitle:void 0,key:"table-content",loading:"loading"===s,menuOpen:!!i?.open,overlayPositioning:"fixed",onCalcitePanelClose:()=>{this.closed=!0,this.emit("close")},onCalcitePanelToggle:e=>{this.collapsed=e.target.collapsed,this.emit("toggle")}},e.progress?U("calcite-progress",{type:t?"indeterminate":"determinate"}):null,this._showLayerDropdown?this._renderLayerDropdown():null,this._renderColumnVisibilityAction(),this._renderHeaderMenuActions(),this._renderNavigationBar(),this._renderTables(),this._renderError(),this._renderFooterContent()),this._renderColumnVisibilityPopover(),this._renderPrompt(),this._renderDialog())}_renderTables(){const{grid:e,relatedTables:t}=this,i=this.classes(K.tableContainer);if(t.length){const s=this.classes(K.base,this.allRelatedTablesVisible?K.expanded:K.collapsed,this._attachmentsViewIsVisible?K.tableContainerWithAttachments:void 0);return U("div",{class:i},U("calcite-panel",{overlayPositioning:"fixed"},U("div",null,[this._shouldShowGrid?U("div",{class:s},e?.render(),this._renderPagination()):void 0,...this._filteredTables.map(e=>{const i=t.indexOf(e);return U("div",{class:s,key:`related-${i}`},e.render())}),,])))}return null!=this.attachmentsViewOptions.objectId?U("div",{class:i},U("calcite-panel",{overlayPositioning:"fixed"},U("div",null,[U("div",{class:this.classes(K.base,K.collapsed)},e?.render(),this._renderPagination()),this._renderAttachmentsView()]))):[U("div",{class:i},e?.render()),this._renderPagination()]}_renderPagination(){if(this.paginationEnabled)return U("calcite-pagination",{pageSize:1,startItem:this.pageIndex+1,totalItems:this.pageCount,onCalcitePaginationChange:e=>{this._attachmentsDialogPreviewLoading=!1,this.goToPage(e.currentTarget.startItem-1)}})}_renderError(){const{messages:e}=this;return U("calcite-alert",{autoClose:!0,autoCloseDuration:"fast",icon:q.exclamationMarkTriangle,kind:"danger",label:e.errorOccured,open:this._hasAttachmentsViewError,slot:"alerts",topLayerDisabled:this.topLayerDisabled,onCalciteAlertClose:()=>{this.attachmentsViewOptions.error=null}},U("span",{slot:"message"},e.errorOccured))}_renderFooterContent(){if(!this.hasPendingEdits||!this._effectiveVisibleElements.pendingEditsFooter)return;const{hasInvalidPendingEdits:e,isQueryingOrSyncing:t,messages:i,messagesCommon:s}=this,n=e||t,l=this.hasContingentValues,o=[U("calcite-button",{appearance:"outline",disabled:t,iconStart:q.reset,key:"footer-reset-button",onclick:()=>{this.discardPendingEdits()},slot:"footer-end",width:"auto"},s.reset),U("calcite-button",{disabled:n,iconStart:q.save,key:"footer-save-button",loading:this.isSyncing,onclick:()=>{this.savePendingEdits()},slot:"footer-end",width:"auto"},s.save)];if(l){const t=e?i.contingentValues.hasInvalidValues:i.contingentValues.hasValidValues,s=e?q.exclamationMarkTriangle:q.checkCircle,n=e?K.footerIconDanger:K.footerIconSuccess;o.push(U("div",{class:K.footerMessage,key:"footer-message",slot:"footer-start"},U("calcite-icon",{class:n,icon:s,scale:"s",slot:"footer-start"}),t))}return o}_renderPrompt(){return this.prompt?U(A,{...this.prompt,headingLevel:2}):void 0}_showDeleteSelectionPrompt(){const{messages:e,messagesCommon:i}=this,s=t(e.deleteSelectionCount,{count:this.highlightIds.length});this.showPrompt({title:s,message:e.deleteRecordsRemoved,context:"danger",actions:{primary:{label:i.delete,action:async()=>{try{await this.viewModel.deleteSelection()}finally{this.clearPrompt()}}},secondary:{label:e.keepRecords,action:()=>this.clearPrompt()}}})}_showDeleteAttachmentPrompt(e,i){const{messages:s,messagesCommon:n}=this,l=t(s.deleteAttachmentCount,{count:i.length});this.showPrompt({title:l,message:s.deleteAttachmentConfirmation,context:"danger",actions:{primary:{label:n.delete,action:async()=>{try{await this.deleteAttachments(e,i,!1)}finally{this.clearPrompt()}}},secondary:{label:n.cancel,action:()=>this.clearPrompt()}}})}async _showDiscardEditsPrompt(e){const t=Promise.withResolvers(),{messagesEditor:i}=this;return this.showPrompt({title:i.cancelEditTitle,message:i.cancelEditWarningMessage,context:"danger",actions:{primary:{label:i.discardEdits,action:async()=>{try{await this.discardPendingEdits(e)}finally{t.resolve(!0)}}},secondary:{label:i.continueEditing,action:()=>t.resolve(!1)}}}),t.promise.finally(()=>this.clearPrompt())}_onTableViewChange(e){this.hasPendingEdits?this._showDiscardEditsPrompt().then(t=>t&&e()):e()}_resetNestedViews(){this.relatedTable&&this.drainRelatedTables(),this.effectiveTable.attachmentsViewOptions.objectId=null}_renderDialog(){const{attachmentsViewOptions:e,messages:t}=this,{objectId:i}=e;return U("calcite-dialog",{class:K.dialog,description:this.viewModel.getFeatureTitleSync(i),heading:t.attachments,modal:!0,open:this._dialogIsOpen,placement:"cover",width:"l",onCalciteDialogClose:()=>this._onDialogClose()},this._renderDialogContent())}_renderDialogContent(){const e=this.attachmentsViewOptions.dialogInfo;if(e)return this._renderAttachmentsDialogContent(e)}_renderAttachmentsDialogContent(e){const{attachmentsViewOptions:t,messages:i}=this,{attachmentInfos:s}=t,n=s.indexOf(e);return U(N,null,U("div",{class:K.dialogHeader,key:"header",slot:"content-top"},U("span",null,e.name),U("calcite-button",{appearance:"outline",onclick:()=>{t.attachmentId=e.id,t.dialogId=null}},i.viewDetails)),U("calcite-progress",{type:this._attachmentsDialogPreviewLoading?"indeterminate":"determinate"}),U("div",{class:K.dialogContent,key:"content"},this._renderAttachmentsViewDetailsImage(e)),U("calcite-pagination",{pageSize:1,slot:"footer",startItem:n+1,totalItems:s.length,onCalcitePaginationChange:e=>{const i=e.currentTarget.startItem-1,n=s[i]?.id;t.dialogId=n}}))}_onDialogClose(){const e=this.attachmentsViewOptions;null!=e.dialogId&&(e.dialogId=null),this._attachmentsDialogPreviewLoading=!1}_renderHeaderMenuAction(e){const{disabled:t,hidden:i,icon:s,text:n,clickFunction:l}=e;if(!i)return U("calcite-action",{disabled:t??this.menuConfig?.disabled,icon:s??void 0,key:n,onclick:()=>l(),slot:"header-menu-actions",text:n,textEnabled:!0,title:n})}_renderHeaderMenuActions(){return this._shouldShowMenu?[this._renderDefaultHeaderMenuActions(),this._renderCustomHeaderMenuActions()]:[]}_renderDefaultHeaderMenuActions(){if(!this._hasDefaultMenuItems)return[];const{messages:e}=this;return[this._showRefreshDataAction&&{icon:q.refresh,text:e.refreshData,clickFunction:()=>this.refresh()},this._showDeleteSelectionAction&&{icon:q.delete,text:e.deleteSelection,clickFunction:()=>this.deleteSelection(!0)},this._showClearSelectionAction&&{icon:q.clearSelection,text:e.clearSelection,clickFunction:()=>this.highlightIds?.removeAll()},this._showZoomToSelectionAction&&{icon:q.zoomToSelection,text:e.zoomToSelection,clickFunction:()=>this.zoomToSelection()},this._showSelectedRecordsShowSelectedAction&&{icon:q.showSelected,text:e.showSelected,clickFunction:()=>{const{objectIds:e}=this;e.removeAll(),e.addMany(this.highlightIds.toArray())}},this._showSelectedRecordsShowAllAction&&{icon:q.showAll,text:e.showAllRecords,clickFunction:()=>this.objectIds.removeAll()},this._showExportSelectionToCSVAction&&{icon:q.exportToCSV,text:e.exportSelectionCSV,clickFunction:()=>this.exportSelectionToCSV()}].filter(i).map(e=>e&&this._renderHeaderMenuAction(e))}_renderCustomHeaderMenuActions(){return this.menuConfig?.items?.map(({disabled:e,hidden:t,icon:i,label:s,clickFunction:n})=>this._renderHeaderMenuAction({hidden:"function"==typeof t?t():t,icon:i,text:s,disabled:e,clickFunction:e=>n(e)}))??[]}_renderColumnVisibilityAction(){if(!this._showColumnVisibilityAction)return[];const{_columnVisibilityActions:e,id:t}=this,i=this.messages.menuText.columnVisibility;return U("calcite-action",{afterCreate:i=>e.set(t,i),afterRemoved:()=>e.delete(t),bind:this,disabled:this._columnVisibilityActionDisabled,icon:q.showColumn,id:`${t}__toggle-columns-action`,slot:"header-actions-end",text:i},this._effectiveVisibleElements.tooltips?U("calcite-tooltip",{closeOnClick:!0,overlayPositioning:"fixed",placement:"bottom-end",referenceElement:e.get(t),topLayerDisabled:this.topLayerDisabled},i):null)}_renderColumnVisibilityPopover(){if(!this._showColumnVisibilityAction||this._columnVisibilityActionDisabled)return;const e=this.visibleElements.columnVisibilityMenuItems.header,t=this.messages.menuText.columnVisibility;return U("calcite-popover",{autoClose:!0,class:K.menuPopover,closable:e,heading:e?t:void 0,label:t,overlayPositioning:"fixed",referenceElement:this._columnVisibilityActions.get(this.id),topLayerDisabled:this.topLayerDisabled},this._renderColumnVisibilityList())}_renderColumnVisibilityList(){const{effectiveTable:e,messages:{menuText:t}}=this;if(0!==e.columns.length)return U("calcite-list",{afterCreate:H,afterRemoved:B.bind(this),afterUpdate:H,bind:this,"data-node-ref":"_columnVisibilityList",displayMode:"nested",filterEnabled:this.visibleElements.columnVisibilityMenuItems.filter,filterPlaceholder:t.searchFields,label:t.fieldVisibility,selectionMode:"multiple",onCalciteListFilter:()=>this.scheduleRender()},this._renderColumnToggleAll(),e.columns.toArray().map(t=>{const i=I(t)?t.columns?.map(t=>this._renderColumnListItem({column:t,table:e,ignoreSelect:!0})):void 0;return this._renderColumnListItem({column:t,table:e,items:i})}),U("calcite-notice",{appearance:"transparent",kind:"neutral",open:!0,slot:"filter-no-results"},U("div",{slot:"message"},t.noMatchesFound)))}_renderColumnToggleAll(){if(!this.visibleElements.columnVisibilityMenuItems.toggleAll)return;const{_columnVisibilityList:e}=this;return e&&e.filteredItems?.length?U("calcite-button",{appearance:"transparent",onclick:()=>this._toggleAllColumns(),width:"full"},this._getColumnToggleAllText()):void 0}_getColumnToggleAllText(){const{_columnVisibilityList:e,effectiveTable:t,messages:{menuText:i}}=this;return e?""===e.filterText?t.allColumnsVisible?i.deselectAll:i.selectAll:this._allColumnsAreVisible(e.filteredItems.map(e=>e.value))?i.deselectAll:i.selectAll:""}_renderColumnListItem(e){const{column:t,table:i,items:s,ignoreSelect:n}=e,{effectiveLabel:l,fieldName:o,hidden:a}=t;return U("calcite-list-item",{expanded:!(!s?.length||a)||void 0,key:`toggle-columns__item-${o}`,label:l,metadata:{description:t.effectiveDescription,type:D(t)?t.field.type:void 0},selected:!a,value:o,onCalciteListItemSelect:e=>{n&&e.stopPropagation(),i.toggleColumnVisibility(e.currentTarget.value)}},s)}_renderLayerDropdown(){const e=this.messages.selectALayer;return U("div",{class:K.layerDropdownMenu,key:`${this.id}-layerDropdown`,slot:"header-actions-start"},U("calcite-dropdown",{bind:this,maxItems:5,overlayPositioning:"fixed",placement:"bottom-start",topLayerDisabled:this.topLayerDisabled},U("calcite-action",{icon:q.layers,slot:"trigger",text:e,title:e}),U("calcite-dropdown-group",{selectionMode:"single"},this._effectiveLayers.map((e,t)=>this._renderLayerDropdownItem(e,t))??null)))}_renderLayerDropdownItem(e,t){const i=this.visibleElements.layerDropdownIcons;return U("calcite-dropdown-item",{iconStart:i?j(e):void 0,key:`dropdown-item-${t}`,label:e.title??"",selected:e===this.layer,value:e.id,onCalciteDropdownItemSelect:()=>this._onTableViewChange(()=>this.layer=e)},e.title)}_onRelatedNavigationItemClick(e){this.viewModel.drainRelatedTablesAboveIndex(e)}_collapseRelatedTable(e){this.viewModel.collapseRelatedTable(this.effectiveTable,e)}_onShowRelatedTable(e){this.showRelatedTableCallback||this.hasPendingEdits||(this._collapseRelatedTable(e),this._createRelatedTable(e))}async _createRelatedTable(e){const{autoRefreshEnabled:t,autoSaveEnabled:i,editingEnabled:s,effectiveTable:n,multipleSelectionEnabled:l,paginationEnabled:o,pageSize:a,view:r,viewModel:c}=this,{layer:d,objectId:h,relatedLayer:m,relationshipId:p}=e;await d.load();const u=this.attachmentsEnabled&&x(d),g=new Z({layer:d,autoRefreshEnabled:t,autoSaveEnabled:i,attachmentsEnabled:u,editingEnabled:s,multipleSelectionEnabled:l,paginationEnabled:o,pageSize:a,relatedRecordsEnabled:!0,relationshipConfig:{objectId:h,relatedLayer:m,relationshipId:p},relationshipColumnConfigs:L(d,p),tableController:this,tableParent:n,view:r,showRelatedTableCallback:e=>c.emit("show-related-table",e)});this.relatedTables.add(g),this.scheduleRender()}_renderAttachmentsView(){switch(this.attachmentsViewOptions.effectiveMode){case"list":return this._renderAttachmentsViewList();case"details":return this._renderAttachmentsViewDetails();case"file":return this._renderAttachmentsViewFile()}}_renderAttachmentsViewFile(){const e=this.attachmentsViewOptions,{objectId:t}=e;if(null!=t)return[U("div",{class:K.attachmentsView,key:"attachments-view"},this._renderAttachmentsViewInformation(),U("div",{class:K.attachmentsViewContent,key:"attachments-view-content"},U("div",{bind:this,class:K.attachmentsViewDropArea,ondragover:e=>e.preventDefault(),ondrop:this._onAttachmentsViewDrop},U("calcite-icon",{class:K.attachmentsViewIcon,icon:q.upload,scale:"l"}),this._renderAttachmentsViewFileLabelNode(),this._renderAttachmentsViewFileMessageNode(),U("form",{afterCreate:t=>e.form=t,afterRemoved:()=>e.form=null,bind:this,key:"attachments-form"},U("fieldset",null,this._renderAttachmentsViewFileNameNode(),U("input",{afterCreate:H,afterRemoved:B,afterUpdate:H,bind:this,"data-node-ref":"_attachmentsInput",files:e.candidates,hidden:!0,name:"attachment",onchange:e=>this._onAttachmentsViewCandidateChange(e),type:"file"}),this._renderAttachmentsViewFileSelectNode(),this._renderAttachmentsViewFileSaveNode(),this._renderAttachmentsViewFileCancelNode())))))]}_renderAttachmentsViewFileLabelNode(){if("replace"===this.attachmentsViewOptions.fileMode)return U("span",{class:K.attachmentsViewDropAreaLabel,key:"replace-file-node"},this.messages.replaceFile)}_renderAttachmentsViewFileMessageNode(){const e=this.attachmentsViewOptions;if(e.hasCandidates)return;const{messages:t}=this,i=this.supportsAddAttachments?null==e.objectId?t.noFeature:t.dragAndDropToUpload:t.editingRestricted;return U("span",{class:K.attachmentsViewDropAreaMessage,key:"message-node"},i)}_renderAttachmentsViewFileNameNode(){const e=this.attachmentsViewOptions.candidates,t=Array.from(e??[]).at(-1);if(t)return U("span",{class:K.attachmentsViewDropAreaMessage,key:"filename-node"},t.name)}_renderAttachmentsViewFileSelectNode(){if(this.supportsAddAttachments)return U("calcite-button",{appearance:"outline-fill",disabled:this.isSyncingAttachments,iconStart:q.folderOpen,key:"select-node",onclick:()=>{this._resetAttachmentsInput(),this._attachmentsInput?.click()}},this.messages.selectFile)}_renderAttachmentsViewFileSaveNode(){const{isSyncingAttachments:e,messages:t}=this,{attachmentInfo:i,hasCandidates:s}=this.attachmentsViewOptions;if(this.supportsAddAttachments&&s)return U("calcite-button",{appearance:"solid",disabled:e,iconStart:q.save,key:"save-node",loading:e,onclick:()=>{this.saveAttachmentsViewForm()}},i?t.updateAttachment:t.addAttachment)}_renderAttachmentsViewFileCancelNode(){const{hasAttachments:e,hasCandidates:t}=this.attachmentsViewOptions;if(e||t)return U("calcite-button",{appearance:"transparent",bind:this,disabled:this.isSyncingAttachments,key:"cancel-node",onclick:()=>{this._resetAttachmentsInput(),this.attachmentsViewOptions.cancel()}},this.messagesCommon.cancel)}_renderAttachmentsViewDetails(){const{attachmentInfo:e}=this.attachmentsViewOptions;if(e)return[U("div",{class:K.attachmentsView,key:"attachments-view"},this._renderAttachmentsViewInformation(),U("div",{class:K.attachmentsViewContent,key:"attachments-view-content"},U("div",{class:K.attachmentsViewDetails},this._renderAttachmentsViewDetailsPreview(e))))]}_renderAttachmentsViewDetailsPreview(e){const t=[this._renderAttachmentsViewDetailsImage(e)];if(M(e.contentType)){const i=this.messages.maximize;t.push(U("calcite-action",{icon:q.expand,label:i,onclick:t=>{t.preventDefault(),this.attachmentsViewOptions.dialogId=e.id},text:i,textEnabled:!0,title:i}))}return t}_renderAttachmentsViewDetailsImage(e){const{contentType:t,name:i,size:s,url:n}=e,{messages:l}=this;return M(t)?U("img",{afterCreate:()=>this._attachmentsDialogPreviewLoading=!0,alt:i,key:`thumbnail-image-${i}`,onerror:()=>this._attachmentsDialogPreviewLoading=!1,onload:()=>this._attachmentsDialogPreviewLoading=!1,src:`${n}${n?.includes("?")?"&":"?"}s=${s}`,title:i}):[U("calcite-icon",{icon:V(t),key:`thumbnail-icon-${i}`,scale:"l",textLabel:i,title:i}),l.noPreviewAvailable]}_renderAttachmentsViewInformation(){const{attachmentsViewOptions:e,messages:t,messagesUnits:i}=this,{attachmentInfo:s,objectId:n}=e;if(s&&null!=n)return U("div",{class:K.attachmentsViewInformation,key:"information"},this._renderAttachmentViewInformationButtons(s,n),U("span",{class:K.attachmentsViewInformationLabel,key:"file-label"},t.fileName),U("span",{class:K.attachmentsViewInformationData,key:"file-value"},s.name),U("span",{class:K.attachmentsViewInformationLabel,key:"type-label"},t.attachmentType),U("span",{class:K.attachmentsViewInformationData,key:"type-value"},this._getLabelForAttachmentType(s)),this._renderAttachmentKeywordDetails(s),U("span",{class:K.attachmentsViewInformationLabel,key:"size-label"},t.size),U("span",{class:K.attachmentsViewInformationData,key:"size-span"},h(i,s.size??0)))}_renderAttachmentViewInformationButtons(e,t){const{attachmentsViewOptions:i,messages:s,messagesCommon:n}=this,l="details"!==i.effectiveMode,o=e.id,a=[U("calcite-button",{appearance:"outline",disabled:l,key:"download-button",onclick:e=>{e.preventDefault(),this.downloadAttachmentById(t,o)},width:"full"},s.download)];return this.supportsUpdateAttachments&&a.push(U("calcite-button",{appearance:"outline",disabled:l,key:"replace-button",onclick:()=>{i.mode="file",i.attachmentId=o},width:"full"},s.replace)),this.supportsDeleteAttachments&&a.push(U("calcite-button",{appearance:"outline",disabled:l,key:"delete-button",onclick:()=>{this.deleteAttachments(t,[o],!0)},width:"full"},n.delete)),a}_renderAttachmentKeywordDetails({keywords:e}){if(e&&""!==e)return[U("span",{class:K.attachmentsViewInformationLabel,key:"keyword-label"},this.messages.keyword),U("span",{class:K.attachmentsViewInformationData,key:"keyword-value"},e)]}_renderAttachmentsViewList(){const{attachmentsViewOptions:e,isSyncingAttachments:t,messages:i,messagesUnits:s}=this,{attachmentInfos:n,objectId:l}=e;return U("calcite-list",{afterCreate:H,afterRemoved:B,afterUpdate:H,bind:this,class:K.attachmentsViewList,"data-node-ref":"attachmentsList",key:`attachments-list-${l}`,label:i?.attachments,loading:t,ondragover:e=>e.preventDefault(),ondrop:this._onAttachmentsViewDrop,selectionMode:this.supportsDeleteAttachments?"multiple":"none",onCalciteListChange:()=>this.scheduleRender()},...n?.map(t=>{const{id:n,name:o,size:a}=t,r=h(s,a??0);return U("calcite-list-item",{afterRemoved:()=>this.scheduleRender(),key:`attachment-${n}`,label:o,value:n},this._renderAttachmentsViewListPreview(t),U("span",{class:K.attachmentsViewListFileSize,slot:"actions-end",title:r},r),U("calcite-action",{icon:q.downloadTo,key:"download",label:o,onclick:e=>{e.preventDefault(),this.downloadAttachmentById(l??-1,n)},slot:"actions-end",text:i.downloadAttachment,title:i.downloadAttachment}),U("calcite-action",{icon:q.chevronRight,iconFlipRtl:!0,key:"details",label:o,onclick:()=>{e.mode="details",e.attachmentId=n},slot:"actions-end",text:i.viewAttachment,title:i.viewAttachment}))}))}_renderAttachmentsViewListPreview(e){return U("div",{class:K.attachmentsViewListThumbnail,slot:"content-start"},U("span",null,this._renderAttachmentsViewListImage(e)))}_renderAttachmentsViewListImage(e,t=64){const{contentType:i,name:s,size:n,url:l}=e,o=`${l}${l?.includes("?")?"&":"?"}w=${t}&s=${n}`;return this.supportsResizeAttachments&&M(i)?U("img",{alt:s,key:`thumbnail-image-${s}`,src:o,title:s}):U("calcite-icon",{icon:V(i),key:`thumbnail-icon-${s}`,scale:"l",textLabel:s,title:s})}_onAttachmentsViewCandidateChange({target:e}){this.attachmentsViewOptions.candidates=e?.files}_onAttachmentsViewDrop(e){e.preventDefault(),(this.supportsAddAttachments||this.supportsUpdateAttachments)&&(this.attachmentsViewOptions.mode="file",this.attachmentsViewOptions.candidates=e.dataTransfer?.files)}_resetAttachmentsInput(){this._attachmentsInput&&(this._attachmentsInput.value="")}_getLabelForAttachmentType({contentType:e}){const t=this.messages;return e.startsWith("image/")?t.attachmentTypes.image:e.startsWith("audio/")?t.attachmentTypes.audio:e.startsWith("video/")?t.attachmentTypes.video:e.startsWith("text/")||e.startsWith("application/")||e.startsWith("model/")?t.attachmentTypes.document:t.attachmentTypes.unknown}_renderNavigationBar(){const{effectiveTable:e,messages:i,messagesCommon:s,navigationScale:n,relatedTable:l,relatedTables:o}=this;if(!this._shouldShowNavigationBar)return;const{attachmentsList:a,attachmentsViewOptions:r,layer:c,supportsAddAttachments:d,supportsDeleteAttachments:h}=e;if(!c)return;const{attachmentInfos:m,objectId:p}=r,u=null!=p,g=m.length,w=a?.selectedItems?.length??0,b=`${c.objectIdField}: ${p}`,v=t(i.selectedCount,{count:w}),y=t(i.attachmentsCount,{count:g}),f=u?U("calcite-action",{bind:this,icon:q.chevronRight,iconFlipRtl:!0,key:"navigation-feature",onclick:()=>e.scrollToRow(p),scale:n,text:b,textEnabled:!0,title:b}):void 0,_=u?U("calcite-action",{icon:q.chevronRight,iconFlipRtl:!0,key:"navigation-attachments-label",label:y,onclick:()=>{g>0&&(r.mode="list")},scale:n,text:y,textEnabled:!0,title:y}):void 0,M=u?U("calcite-chip",{closable:!0,closed:0===w,key:"navigation-chip",kind:"inverse",label:v,scale:"s",selected:!0,title:v,value:"selected",onCalciteChipClose:()=>a?.selectedItems?.forEach(e=>e.selected=!1)},v):void 0,V=l?U("calcite-label",{layout:"inline",scale:n},i.showAllTables,U("calcite-switch",{checked:this.allRelatedTablesVisible,scale:n,onCalciteSwitchChange:e=>this.showAllRelatedTables=!!e.currentTarget.checked})):void 0,C=u&&"list"===r.effectiveMode&&null!=p&&w&&h?U("calcite-action",{icon:q.delete,iconFlipRtl:!0,key:"attachments-trash-all",onclick:()=>{e.deleteAttachments(p,a?.selectedItems?.map(e=>e.value)??[],!0)},scale:n,text:s.delete,textEnabled:!0,title:t(i.deleteAttachmentCount,{count:w})}):void 0,A=u&&"list"===r.effectiveMode&&d?U("calcite-action",{bind:this,icon:q.plus,iconFlipRtl:!0,key:"attachments-add",onclick:()=>{r.objectId=p,r.attachmentId=null,r.mode="file"},scale:n,text:i.addAttachment,textEnabled:!0,title:i.addAttachment}):void 0;return U("div",{class:K.tableNavigation,key:"table-nav"},U("calcite-action",{icon:q.moveUp,iconFlipRtl:!0,key:"go-back",onclick:()=>this._onTableViewChange(this._resetNestedViews),scale:n,text:this.layer?.title??"",textEnabled:!1,title:l?i.exitRelatedRecords:i.exitAttachments}),o.toArray().map((e,t)=>this._renderRelatedTableNavigationAction(e,t)),f,_,U("div",null,M,V,C,A))}_renderRelatedTableNavigationAction(e,t){const i=this._getLabelForRelatedTableNavigationAction(e);return U("calcite-action",{icon:q.chevronRight,iconFlipRtl:!0,key:t,onclick:()=>{(t!==this.relatedTables.length-1||this._attachmentsViewIsVisible)&&this._onTableViewChange(()=>this._onRelatedNavigationItemClick(t))},scale:this.navigationScale,text:i,textEnabled:!0,title:e.layer?.title||""})}_getLabelForRelatedTableNavigationAction(e){const t=e.layer?.title;if(!t)return"";const{relatedTables:i}=this;if(i.length<=1)return t;return i.indexOf(e)!==i.length-1&&t.length>20?`${t.slice(0,20)}...`:t}_allColumnsAreVisible(e){return e.every(e=>!1===this.findColumn(e)?.hidden)}_toggleAllColumns(){const{_columnVisibilityList:e,effectiveTable:t}=this,i=e?.filteredItems.map(e=>e.value);""!==e?.filterText&&i?.length?this._allColumnsAreVisible(i)?i.forEach(e=>this.hideColumn(e)):i.forEach(e=>this.showColumn(e)):t.allColumnsVisible?t.hideAllColumns():t.showAllColumns()}};e([m()],J.prototype,"_attachmentsDialogPreviewLoading",void 0),e([m()],J.prototype,"_attachmentsInput",void 0),e([m()],J.prototype,"_attachmentsViewIsVisible",null),e([m()],J.prototype,"_columnVisibilityActions",void 0),e([m()],J.prototype,"_columnVisibilityActionDisabled",null),e([m()],J.prototype,"_columnVisibilityList",void 0),e([m()],J.prototype,"_dialogIsOpen",null),e([m()],J.prototype,"_effectiveDescription",null),e([m()],J.prototype,"_effectiveLayers",null),e([m()],J.prototype,"_effectiveTitle",null),e([m()],J.prototype,"_effectiveVisibleElements",null),e([m()],J.prototype,"_filteredTables",null),e([m()],J.prototype,"_hasAttachmentsViewError",null),e([m()],J.prototype,"_hasCustomMenuItems",null),e([m()],J.prototype,"_hasDefaultMenuItems",null),e([m()],J.prototype,"_shouldShowGrid",null),e([m()],J.prototype,"_shouldShowMenu",null),e([m()],J.prototype,"_showClearSelectionAction",null),e([m()],J.prototype,"_showColumnVisibilityAction",null),e([m()],J.prototype,"_showDeleteSelectionAction",null),e([m()],J.prototype,"_showExportSelectionToCSVAction",null),e([m()],J.prototype,"_showLayerDropdown",null),e([m()],J.prototype,"_shouldShowNavigationBar",null),e([m()],J.prototype,"_showRefreshDataAction",null),e([m()],J.prototype,"_showSelectedRecordsShowSelectedAction",null),e([m()],J.prototype,"_showSelectedRecordsShowAllAction",null),e([m()],J.prototype,"_showZoomToSelectionAction",null),e([m()],J.prototype,"_viewLayers",null),e([m()],J.prototype,"attachmentsList",void 0),e([m({readOnly:!0})],J.prototype,"grid",null),e([m()],J.prototype,"actionColumn",null),e([m()],J.prototype,"actionColumnConfig",null),e([m({readOnly:!0})],J.prototype,"activeFilters",null),e([m({readOnly:!0})],J.prototype,"activeSortOrders",null),e([m()],J.prototype,"allColumns",null),e([m()],J.prototype,"allColumnsVisible",null),e([m({readOnly:!0})],J.prototype,"allRelatedTablesVisible",null),e([m()],J.prototype,"allVisibleColumns",null),e([m()],J.prototype,"attachmentsColumns",null),e([m()],J.prototype,"attachmentsEnabled",null),e([m()],J.prototype,"attachmentsViewOptions",null),e([m({type:y})],J.prototype,"attributeTableTemplate",null),e([m()],J.prototype,"autoRefreshEnabled",null),e([m()],J.prototype,"autoSaveEnabled",null),e([m()],J.prototype,"canAddRelatedFeature",null),e([m()],J.prototype,"clearPrompt",null),e([m()],J.prototype,"closed",void 0),e([m()],J.prototype,"collapsed",void 0),e([m()],J.prototype,"columnPerformanceModeEnabled",null),e([m()],J.prototype,"columnReorderingEnabled",null),e([m({readOnly:!0})],J.prototype,"columns",null),e([m()],J.prototype,"defaultSelectionManager",null),e([m()],J.prototype,"definitionExpression",null),e([m()],J.prototype,"description",void 0),e([m()],J.prototype,"disabled",void 0),e([m()],J.prototype,"editingEnabled",null),e([m()],J.prototype,"effectiveSelectionManager",null),e([m()],J.prototype,"effectiveSize",null),e([m()],J.prototype,"effectiveTable",null),e([m()],J.prototype,"fieldColumns",null),e([m({types:u})],J.prototype,"filterGeometry",null),e([m()],J.prototype,"filterBySelectionEnabled",null),e([m()],J.prototype,"filterByViewExtent",null),e([m()],J.prototype,"groupColumns",null),e([m()],J.prototype,"hasContingentValues",null),e([m()],J.prototype,"hasInvalidPendingEdits",null),e([m()],J.prototype,"hasPendingEdits",null),e([m()],J.prototype,"hiddenFields",null),e([m()],J.prototype,"highlightEnabled",null),e([m()],J.prototype,"highlightIds",null),e([m()],J.prototype,"icon",null),e([m()],J.prototype,"initialSize",null),e([m()],J.prototype,"isQueryingOrSyncing",null),e([m()],J.prototype,"isSyncing",null),e([m()],J.prototype,"isSyncingAttachments",null),e([m()],J.prototype,"label",null),e([m()],J.prototype,"layer",null),e([m()],J.prototype,"layers",null),e([m()],J.prototype,"layerView",null),e([m()],J.prototype,"maxSize",null),e([m(),z("esri/widgets/FeatureTable/t9n/FeatureTable")],J.prototype,"messages",null),e([m(),z("esri/t9n/common")],J.prototype,"messagesCommon",null),e([m(),z("esri/widgets/Editor/t9n/Editor")],J.prototype,"messagesEditor",void 0),e([m(),z("esri/core/t9n/Units")],J.prototype,"messagesUnits",null),e([m(),z("esri/widgets/support/t9n/uriUtils")],J.prototype,"messagesURIUtils",null),e([m()],J.prototype,"menuConfig",null),e([m()],J.prototype,"multipleSelectionEnabled",null),e([m()],J.prototype,"multipleSelectionEnabledOverride",null),e([m()],J.prototype,"multiSortEnabled",null),e([m()],J.prototype,"multipleSortPriority",null),e([m()],J.prototype,"navigationScale",void 0),e([m()],J.prototype,"noDataMessage",null),e([m()],J.prototype,"objectIds",null),e([m()],J.prototype,"outFields",null),e([m()],J.prototype,"pageCount",null),e([m()],J.prototype,"pageIndex",null),e([m()],J.prototype,"pageSize",null),e([m()],J.prototype,"paginationEnabled",null),e([m()],J.prototype,"pendingEditsCount",null),e([m()],J.prototype,"prompt",null),e([m()],J.prototype,"relatedRecordsEnabled",null),e([m()],J.prototype,"relatedTable",null),e([m()],J.prototype,"relatedTableHasContingentValues",null),e([m()],J.prototype,"relatedTableHasInvalidPendingEdits",null),e([m()],J.prototype,"relatedTableHasPendingEdits",null),e([m()],J.prototype,"relatedTables",null),e([m()],J.prototype,"relationship",null),e([m()],J.prototype,"relationshipColumnConfigs",null),e([m()],J.prototype,"relationshipColumns",null),e([m()],J.prototype,"relationshipConfig",null),e([m()],J.prototype,"relationshipInfos",null),e([m()],J.prototype,"returnGeometryEnabled",null),e([m()],J.prototype,"returnMEnabled",null),e([m()],J.prototype,"returnZEnabled",null),e([m()],J.prototype,"rowHighlightIds",null),e([m()],J.prototype,"selectionManager",null),e([m()],J.prototype,"selectionSource",null),e([m()],J.prototype,"showAllRelatedTables",null),e([m()],J.prototype,"showPrompt",null),e([m()],J.prototype,"showRelatedTableCallback",null),e([m()],J.prototype,"size",null),e([m({readOnly:!0})],J.prototype,"state",null),e([m()],J.prototype,"supportsAddAttachments",null),e([m()],J.prototype,"supportsAttachments",null),e([m()],J.prototype,"supportsDeleteAttachments",null),e([m()],J.prototype,"supportsResizeAttachments",null),e([m()],J.prototype,"supportsUpdateAttachments",null),e([m()],J.prototype,"syncTemplateOnChangesEnabled",null),e([m()],J.prototype,"syncViewSelection",null),e([m()],J.prototype,"syncWithViewSelectionManager",null),e([m({constructOnly:!0})],J.prototype,"tableController",null),e([m({constructOnly:!0})],J.prototype,"tableParent",null),e([m({type:R})],J.prototype,"tableTemplate",null),e([m()],J.prototype,"tableTemplateOverride",null),e([m()],J.prototype,"title",void 0),e([m({type:f})],J.prototype,"timeExtent",null),e([m()],J.prototype,"timeZone",null),e([m()],J.prototype,"view",null),e([m({type:S}),$(["cell-click","cell-dblclick","cell-pointerover","cell-pointerout","cell-keydown","column-reorder","show-related-table"])],J.prototype,"viewModel",void 0),e([m()],J.prototype,"visibleColumns",null),e([m({type:T,nonNullable:!0})],J.prototype,"visibleElements",void 0),e([m({type:T})],J.prototype,"visibleElementsOverride",null),J=Z=e([p("esri.widgets.FeatureTable")],J);const X=J;export{X as default};
2
+ import{__decorate as e}from"tslib";import{substitute as t}from"../intl.js";import{isSome as i}from"../core/arrayUtils.js";import{deprecateWidget as s}from"../core/deprecate.js";import l from"../core/Logger.js";import{watch as n,sync as o,syncAndInitial as a,initial as r,on as c}from"../core/reactiveUtils.js";import{renderingSanitizer as d}from"../core/sanitizerUtils.js";import{formatFileSize as h}from"../core/unitFormatUtils.js";import{property as m,subclass as p}from"../core/accessorSupport/decorators.js";import{geometryTypes as u}from"../geometry/support/typeUtils.js";import{isLayerFromCatalog as g}from"../layers/catalog/catalogUtils.js";import{isKnowledgeGraphLayer as w,isMapImageLayer as b,isSubtypeGroupLayer as v}from"../layers/support/layerUtils.js";import y from"../tables/AttributeTableTemplate.js";import f from"../time/TimeExtent.js";import _ from"./Widget.js";import{isSupportedImage as M,getCalciteIconForAttachment as V,getAttachmentTypeCategory as C}from"./Attachments/support/attachmentUtils.js";import{loadPromptComponents as A,Prompt as E}from"./Editor/components/Prompt.js";import S from"./FeatureTable/ColumnMenuVisibleElements.js";import T from"./FeatureTable/FeatureTableViewModel.js";import I from"./FeatureTable/VisibleElements.js";import{isGroupColumn as D,isFieldColumn as R}from"./FeatureTable/support/columnUtils.js";import P from"./FeatureTable/support/TableTemplate.js";import{loadFieldColumnComponents as k,isIFeatureTableSupportedLayer as x,isIFeatureTableSupportedLayerWithAttachments as L,getRelationshipIdsToShow as O}from"./FeatureTable/support/tableUtils.js";import{loadCalciteComponents as F}from"./support/componentsUtils.js";import{globalCss as j}from"./support/globalCss.js";import{getIconForLayer as z}from"./support/iconUtils.js";import{messageBundle as $,vmEvent as U,tsx as N,tsxFragment as H}from"./support/widget.js";import{storeNode as B,discardNode as Z}from"./support/widgetUtils.js";var G;const Q="esri-feature-table",W=`${Q}__dialog`,K=`${Q}__attachments-view`,q={base:Q,content:`${Q}__content`,menuPopover:`${Q}__menu-popover`,layerDropdownMenu:`${Q}__layer-switcher-menu`,tableContainer:`${Q}__table-container`,tableContainerWithAttachments:`${Q}__table-container--attachments`,tableNavigation:`${Q}__table-navigation`,attachmentsView:K,attachmentsViewContent:`${K}__content`,attachmentsViewDetails:`${K}__details`,attachmentsViewDropArea:`${K}__drop-area`,attachmentsViewDropAreaLabel:`${K}__drop-area__label`,attachmentsViewDropAreaMessage:`${K}__drop-area__message`,attachmentsViewIcon:`${K}__icon`,attachmentsViewInformation:`${K}__information`,attachmentsViewInformationData:`${K}__information__data`,attachmentsViewInformationLabel:`${K}__information__label`,attachmentsViewList:`${K}__list`,attachmentsViewListFileSize:`${K}__list__filesize`,attachmentsViewListThumbnail:`${K}__list__thumbnail`,expanded:`${Q}__expanded`,collapsed:`${Q}__collapsed`,dialog:`${W}`,dialogContent:`${W}__content`,dialogHeader:`${W}__header`,footerMessage:`${Q}__footer__message`,footerIconDanger:`${Q}__footer__icon--danger`,footerIconSuccess:`${Q}__footer__icon--success`},J={checkCircle:"check-circle",chevronRight:"chevron-right",clearSelection:"clear-selection",downloadTo:"download-to",exclamationMarkTriangle:"exclamation-mark-triangle",expand:"expand",exportToCSV:"file-csv",folderOpen:"folder-open",delete:"trash",layers:"layers",moveUp:"move-up",plus:"plus",refresh:"refresh",reset:"reset",save:"save",showAll:"selection-x",showColumn:"show-column",showSelected:"selection-filter",table:"table",upload:"upload",zoomToSelection:"zoom-to-object"};let X=G=class extends _{constructor(e,t){super(e,t),this._attachmentsDialogPreviewLoading=!1,this._attachmentsInput=null,this._columnVisibilityActions=new Map,this._columnVisibilityList=null,this.attachmentsList=null,this.closed=!1,this.collapsed=!1,this.description=null,this.disabled=!1,this.messagesEditor=null,this.navigationScale="m",this.title=null,this.viewModel=new T,this.visibleElements=new I,this.announceDeprecation=()=>{s(l.getLogger(this),"Feature Table","arcgis-feature-table",{version:"5.0"})},this._showDeleteSelectionPrompt=this._showDeleteSelectionPrompt.bind(this),this._showDiscardEditsPrompt=this._showDiscardEditsPrompt.bind(this),this._resetNestedViews=this._resetNestedViews.bind(this)}initialize(){this.addHandles([n(()=>[this.isQueryingOrSyncing,this.editingEnabled],()=>this.scheduleRender()),n(()=>[this._effectiveVisibleElements,this._effectiveVisibleElements.columnDescriptions,this._effectiveVisibleElements.columnMenus,this._effectiveVisibleElements.columnMenuItems,this.columns.length],()=>{this.columns.forEach(e=>e.visibleElements=this._effectiveVisibleElements),this.refreshCellContent()},o),n(()=>[this.topLayerDisabled,this.columns],()=>this.columns.forEach(e=>e.topLayerDisabled=this.topLayerDisabled),a),n(()=>this._effectiveVisibleElements.selectionColumn,e=>{this.grid&&(this.grid.selectionColumnEnabled=e)},r),c(()=>this.viewModel,"show-related-table",e=>this._onShowRelatedTable(e)),n(()=>this.editingEnabled,()=>{const{attachmentsViewOptions:e}=this;this.clearPrompt(),e&&(e.form?.reset(),e.candidates=null)})])}loadDependencies(){return Promise.all([F({action:()=>import("@esri/calcite-components/dist/components/calcite-action"),alert:()=>import("@esri/calcite-components/dist/components/calcite-alert"),button:()=>import("@esri/calcite-components/dist/components/calcite-button"),chip:()=>import("@esri/calcite-components/dist/components/calcite-chip"),dialog:()=>import("@esri/calcite-components/dist/components/calcite-dialog"),dropdown:()=>import("@esri/calcite-components/dist/components/calcite-dropdown"),"dropdown-group":()=>import("@esri/calcite-components/dist/components/calcite-dropdown-group"),"dropdown-item":()=>import("@esri/calcite-components/dist/components/calcite-dropdown-item"),icon:()=>import("@esri/calcite-components/dist/components/calcite-icon"),label:()=>import("@esri/calcite-components/dist/components/calcite-label"),list:()=>import("@esri/calcite-components/dist/components/calcite-list"),"list-item":()=>import("@esri/calcite-components/dist/components/calcite-list-item"),notice:()=>import("@esri/calcite-components/dist/components/calcite-notice"),pagination:()=>import("@esri/calcite-components/dist/components/calcite-pagination"),panel:()=>import("@esri/calcite-components/dist/components/calcite-panel"),popover:()=>import("@esri/calcite-components/dist/components/calcite-popover"),progress:()=>import("@esri/calcite-components/dist/components/calcite-progress"),switch:()=>import("@esri/calcite-components/dist/components/calcite-switch"),tooltip:()=>import("@esri/calcite-components/dist/components/calcite-tooltip")}),A(),k()])}destroy(){this.drainRelatedTables(),this.clearPrompt()}get _attachmentsViewIsVisible(){return!(null==this.attachmentsViewOptions.objectId&&!this.relatedTables.some(e=>null!=e.attachmentsViewOptions.objectId))}get _columnVisibilityActionDisabled(){const e=this.effectiveTable;return e.menuConfig?.disabled??0===e.columns.length}get _dialogIsOpen(){return!!this.attachmentsViewOptions.dialogInfo}get _effectiveDescription(){const{description:e}=this;return null!=e?d.sanitize("function"==typeof e?e():e):void 0}get _effectiveLayers(){const{layer:e,layers:t}=this,i=t?.length?t.filter(x):[],s=i.length?i:[...this._viewLayers];return e&&!s.includes(e)&&s.push(e),s}get _effectiveTitle(){const{layer:e,messages:i,state:s,highlightIds:l,title:n,size:o}=this;if(n)return d.sanitize("function"==typeof n?n():n);if(!i)return"";if(!e)return i.noLayer;switch(s){case"disabled":return i.errorLayer;case"ready":case"loading":return i.loading;case"error":return i.errorData}return t(i.header,{title:d.sanitize(e.title),count:o,selected:l.length})}get _effectiveVisibleElements(){return this.visibleElementsOverride??this.visibleElements}get _filteredTables(){const e=this.relatedTables.toArray(),t=1===e.length;return this.allRelatedTablesVisible?e:t?[e[0]]:this._attachmentsViewIsVisible?e.slice(-1):e.slice(-2)}get _hasAttachmentsViewError(){return null!=this.attachmentsViewOptions.error}get _hasCustomMenuItems(){return!!this.menuConfig?.items?.length}get _hasDefaultMenuItems(){return!!(this._showClearSelectionAction||this._showDeleteSelectionAction||this._showExportSelectionToCSVAction||this._showRefreshDataAction||this._showZoomToSelectionAction||this._showSelectedRecordsShowSelectedAction||this._showSelectedRecordsShowAllAction||this._showColumnVisibilityAction)}get _shouldShowGrid(){return this.allRelatedTablesVisible||1===this.relatedTables.length&&!this._attachmentsViewIsVisible}get _shouldShowMenu(){const{header:e,menu:t}=this._effectiveVisibleElements;return!(!e||!t||!this._hasDefaultMenuItems&&!this._hasCustomMenuItems)}get _showClearSelectionAction(){return!(!this.highlightIds.length||!this._effectiveVisibleElements.menuItems?.clearSelection||this.relatedTables.length||this._attachmentsViewIsVisible)}get _showColumnVisibilityAction(){const{columnVisibilityMenu:e,header:t,menu:i,menuItems:s}=this._effectiveVisibleElements;return!(!(t&&i&&e&&!1!==s?.toggleColumns)||this.showRelatedTableCallback||this.allRelatedTablesVisible||this._attachmentsViewIsVisible)}get _showDeleteSelectionAction(){return!(!(this.editingEnabled&&this.highlightIds.length&&this._effectiveVisibleElements.menuItems?.deleteSelection&&this.layer?.capabilities?.operations?.supportsDelete)||this.relatedTables.length||this._attachmentsViewIsVisible)}get _showExportSelectionToCSVAction(){return!(!(this._effectiveVisibleElements.menuItems.exportSelectionToCSV&&this.layer&&this.highlightIds.length)||this.relatedTables.length)}get _showLayerDropdown(){return!(!this._effectiveLayers.length||!this._effectiveVisibleElements.layerDropdown)}get _shouldShowNavigationBar(){const e=!!this.relatedTable||this._attachmentsViewIsVisible;return!this.tableParent&&e}get _showRefreshDataAction(){return!!this._effectiveVisibleElements.menuItems?.refreshData}get _showSelectedRecordsShowSelectedAction(){const e=this.objectIds.length,t=this.highlightIds.length;return!(!t||!this._effectiveVisibleElements.menuItems?.selectedRecordsShowSelectedToggle||e&&t===e||this.relatedTables.length||this._attachmentsViewIsVisible)}get _showSelectedRecordsShowAllAction(){return!(!this._effectiveVisibleElements.menuItems?.selectedRecordsShowAllToggle||!this.objectIds.length||this.relatedTables.length)}get _showZoomToSelectionAction(){return!(!this.view||!this.highlightIds.length||this.effectiveTable.layer?.isTable||!this._effectiveVisibleElements.menuItems?.zoomToSelection)}get _viewLayers(){const e=this.view?.map;if(!e)return[];const t=new Set,i=e=>{!x(e)||v(e)||t.has(e)||"sublayer"===e.type&&!e.capabilities?.operations?.supportsQuery||(e.load(),t.add(e))},s=e=>{g(e)||"catalog-footprint"===e.type||(w(e)?(e.load(),e.layers?.forEach(i),e.tables?.forEach(i)):b(e)?(e.loadAll(),e.allSublayers?.forEach(i),e.subtables?.forEach(i)):v(e)?(e.loadAll(),e.sublayers?.forEach(i)):i(e))};return e.allLayers.forEach(s),e.allTables.forEach(s),[...t.values()]}get grid(){return this.viewModel.grid}get actionColumn(){return this.viewModel.actionColumn}get actionColumnConfig(){return this.viewModel.actionColumnConfig}set actionColumnConfig(e){this.viewModel.actionColumnConfig=e}get activeFilters(){return this.viewModel.activeFilters}get activeSortOrders(){return this.viewModel.activeSortOrders}get allColumns(){return this.viewModel.allColumns}get allColumnsVisible(){return this.viewModel.allColumnsVisible}get allRelatedTablesVisible(){return this.viewModel.allRelatedTablesVisible}get allVisibleColumns(){return this.viewModel.allVisibleColumns}get attachmentsColumns(){return this.viewModel.attachmentsColumns}get attachmentsEnabled(){return this.viewModel.attachmentsEnabled}set attachmentsEnabled(e){this.viewModel.attachmentsEnabled=e}get attachmentsViewOptions(){return this.viewModel.attachmentsViewOptions}set attachmentsViewOptions(e){this.viewModel.attachmentsViewOptions=e}get attributeTableTemplate(){return this.viewModel.attributeTableTemplate}set attributeTableTemplate(e){this.viewModel.attributeTableTemplate=e}get autoRefreshEnabled(){return this.viewModel.autoRefreshEnabled}set autoRefreshEnabled(e){this.viewModel.autoRefreshEnabled=e}get autoSaveEnabled(){return this.viewModel.autoSaveEnabled}set autoSaveEnabled(e){this.viewModel.autoSaveEnabled=e}get canAddRelatedFeature(){return this.viewModel.canAddRelatedFeature}get clearPrompt(){return this.viewModel.clearPrompt}set clearPrompt(e){this.viewModel.clearPrompt=e}get columnPerformanceModeEnabled(){return this.viewModel.columnPerformanceModeEnabled}set columnPerformanceModeEnabled(e){this.viewModel.columnPerformanceModeEnabled=e}get columnReorderingEnabled(){return this.viewModel.columnReorderingEnabled}set columnReorderingEnabled(e){this.viewModel.columnReorderingEnabled=e}get columns(){return this.viewModel.columns}get defaultSelectionManager(){return this.viewModel.defaultSelectionManager}get definitionExpression(){return this.viewModel.definitionExpression}set definitionExpression(e){this.viewModel.definitionExpression=e}get container(){return super.container}set container(e){super.container=e}get editingEnabled(){return this.viewModel.editingEnabled}set editingEnabled(e){this.viewModel.editingEnabled=e}get effectiveSelectionManager(){return this.viewModel.effectiveSelectionManager}get effectiveSize(){return this.viewModel.effectiveSize}get effectiveTable(){return this.relatedTable||this}get fieldColumns(){return this.viewModel.fieldColumns}get filterGeometry(){return this.viewModel.filterGeometry}set filterGeometry(e){this.viewModel.filterGeometry=e}get filterBySelectionEnabled(){return this.viewModel.filterBySelectionEnabled}set filterBySelectionEnabled(e){this.viewModel.filterBySelectionEnabled=e}get filterByViewExtent(){return this.viewModel.filterByViewExtent}set filterByViewExtent(e){this.viewModel.filterByViewExtent=e}get groupColumns(){return this.viewModel.groupColumns}get hasContingentValues(){return this.viewModel.hasContingentValues}get hasInvalidPendingEdits(){return this.viewModel.hasInvalidPendingEdits}get hasPendingEdits(){return this.viewModel.hasPendingEdits}get hiddenFields(){return this.viewModel.hiddenFields}set hiddenFields(e){this.viewModel.hiddenFields=e}get highlightEnabled(){return this.viewModel.highlightEnabled}set highlightEnabled(e){this.viewModel.highlightEnabled=e}get highlightIds(){return this.viewModel.highlightIds}set highlightIds(e){this.viewModel.highlightIds=e}get icon(){return J.table}set icon(e){this._overrideIfSome("icon",e)}get initialSize(){return this.viewModel.initialSize}set initialSize(e){this.viewModel.initialSize=e}get isQueryingOrSyncing(){return this.viewModel.isQueryingOrSyncing}get isSyncing(){return this.viewModel.isSyncing}get isSyncingAttachments(){return this.viewModel.isSyncingAttachments}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get layer(){return this.viewModel.layer}set layer(e){this.viewModel.layer=e}get layers(){return this.viewModel.layers}set layers(e){this.viewModel.layers=e}get layerView(){return this.viewModel.layerView}get maxSize(){return this.viewModel.maxSize}set maxSize(e){this.viewModel.maxSize=e}get messages(){return this.viewModel.messages}set messages(e){this.viewModel.messages=e}get messagesCommon(){return this.viewModel.messagesCommon}set messagesCommon(e){this.viewModel.messagesCommon=e}get messagesUnits(){return this.viewModel.messagesUnits}set messagesUnits(e){this.viewModel.messagesUnits=e}get messagesURIUtils(){return this.viewModel.messagesURIUtils}set messagesURIUtils(e){this.viewModel.messagesURIUtils=e}get menuConfig(){return this.viewModel.menuConfig}set menuConfig(e){this.viewModel.menuConfig=e}get multipleSelectionEnabled(){return this.viewModel.multipleSelectionEnabled}set multipleSelectionEnabled(e){this.viewModel.multipleSelectionEnabled=e}get multipleSelectionEnabledOverride(){return this.viewModel.multipleSelectionEnabledOverride}set multipleSelectionEnabledOverride(e){this.viewModel.multipleSelectionEnabledOverride=e}get multiSortEnabled(){return this.viewModel.multiSortEnabled}set multiSortEnabled(e){this.viewModel.multiSortEnabled=e}get multipleSortPriority(){return this.viewModel.multipleSortPriority}set multipleSortPriority(e){this.viewModel.multipleSortPriority=e}get noDataMessage(){return this.viewModel.noDataMessage}set noDataMessage(e){this.viewModel.noDataMessage=e}get objectIds(){return this.viewModel.objectIds}set objectIds(e){this.viewModel.objectIds=e}get outFields(){return this.viewModel.outFields}set outFields(e){this.viewModel.outFields=e}get pageCount(){return this.viewModel.pageCount}get pageIndex(){return this.viewModel.pageIndex}set pageIndex(e){this.viewModel.pageIndex=e}get pageSize(){return this.viewModel.pageSize}set pageSize(e){this.viewModel.pageSize=e}get paginationEnabled(){return this.viewModel.paginationEnabled}set paginationEnabled(e){this.viewModel.paginationEnabled=e}get pendingEditsCount(){return this.viewModel.pendingEditsCount}get prompt(){return this.viewModel.prompt}set prompt(e){this.viewModel.prompt=e}get relatedRecordsEnabled(){return this.viewModel.relatedRecordsEnabled}set relatedRecordsEnabled(e){this.viewModel.relatedRecordsEnabled=e}get relatedTable(){return this.viewModel.relatedTable}get relatedTableHasContingentValues(){return this.viewModel.relatedTableHasContingentValues}get relatedTableHasInvalidPendingEdits(){return this.viewModel.relatedTableHasInvalidPendingEdits}get relatedTableHasPendingEdits(){return this.viewModel.relatedTableHasPendingEdits}get relatedTables(){return this.viewModel.relatedTables}get relationship(){return this.viewModel.relationship}get relationshipColumnConfigs(){return this.viewModel.relationshipColumnConfigs}set relationshipColumnConfigs(e){this.viewModel.relationshipColumnConfigs=e}get relationshipColumns(){return this.viewModel.relationshipColumns}get relationshipConfig(){return this.viewModel.relationshipConfig}set relationshipConfig(e){this.viewModel.relationshipConfig=e}get relationshipInfos(){return this.viewModel.relationshipInfos}get returnGeometryEnabled(){return this.viewModel.returnGeometryEnabled}set returnGeometryEnabled(e){this.viewModel.returnGeometryEnabled=e}get returnMEnabled(){return this.viewModel.returnMEnabled}set returnMEnabled(e){this.viewModel.returnMEnabled=e}get returnZEnabled(){return this.viewModel.returnZEnabled}set returnZEnabled(e){this.viewModel.returnZEnabled=e}get rowHighlightIds(){return this.viewModel.rowHighlightIds}set rowHighlightIds(e){this.viewModel.rowHighlightIds=e}get selectionManager(){return this.viewModel.selectionManager}set selectionManager(e){this.viewModel.selectionManager=e}get selectionSource(){return this.viewModel.selectionSource}set selectionSource(e){this.viewModel.selectionSource=e}get showAllRelatedTables(){return this.viewModel.showAllRelatedTables}set showAllRelatedTables(e){this.viewModel.showAllRelatedTables=e}get showPrompt(){return this.viewModel.showPrompt}set showPrompt(e){this.viewModel.showPrompt=e}get showRelatedTableCallback(){return this.viewModel.showRelatedTableCallback}set showRelatedTableCallback(e){this.viewModel.showRelatedTableCallback=e}get size(){return this.viewModel.size}get state(){return this.viewModel.state}get supportsAddAttachments(){return this.viewModel.supportsAddAttachments}get supportsAttachments(){return this.viewModel.supportsAttachments}get supportsDeleteAttachments(){return this.viewModel.supportsDeleteAttachments}get supportsResizeAttachments(){return this.viewModel.supportsResizeAttachments}get supportsUpdateAttachments(){return this.viewModel.supportsUpdateAttachments}get syncTemplateOnChangesEnabled(){return this.viewModel.syncTemplateOnChangesEnabled}set syncTemplateOnChangesEnabled(e){this.viewModel.syncTemplateOnChangesEnabled=e}get syncViewSelection(){return this.viewModel.syncViewSelection}set syncViewSelection(e){this.viewModel.syncViewSelection=e}get syncWithViewSelectionManager(){return this.syncViewSelection}set syncWithViewSelectionManager(e){this.syncViewSelection=e}get tableController(){return this.viewModel.tableController}set tableController(e){this.viewModel.tableController=e}get tableParent(){return this.viewModel.tableParent}set tableParent(e){this.viewModel.tableParent=e}get tableTemplate(){return this.viewModel.tableTemplate}set tableTemplate(e){this.viewModel.tableTemplate=e}get tableTemplateOverride(){return this.viewModel.tableTemplateOverride}set tableTemplateOverride(e){this.viewModel.tableTemplateOverride=e}get timeExtent(){return this.viewModel.timeExtent}set timeExtent(e){this.viewModel.timeExtent=e}get timeZone(){return this.viewModel.timeZone}set timeZone(e){this.viewModel.timeZone=e}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}get visibleColumns(){return this.viewModel.visibleColumns}get visibleElementsOverride(){const{attachmentsViewOptions:e,relatedTable:t,tableController:i,visibleElements:s}=this,{columnDescriptions:l,columnMenus:n,tooltips:o}=s,a=null!=e.objectId;if(t)return new I({columnDescriptions:l,columnMenus:n,tooltips:o,close:s.close,header:s.header,layerDropdown:s.layerDropdown,layerDropdownIcons:s.layerDropdownIcons,menu:s.menu,menuItems:s.menuItems,progress:s.progress,selectionColumn:!1,columnMenuItems:new S({sortAscending:!1,sortDescending:!1})});if(i){const e=i.relatedTable===this,t=i.allRelatedTablesVisible,r=e&&s.selectionColumn&&!t&&!a,c=e&&!t&&!a;return new I({columnDescriptions:l,columnMenus:n,tooltips:o,selectionColumn:r,close:!1,header:!1,layerDropdown:!1,menu:!1,pendingEditsFooter:!1,progress:!1,columnMenuItems:new S({sortAscending:c,sortDescending:c})})}return a?new I({columnDescriptions:l,columnMenus:n,tooltips:o,close:s.close,header:s.header,layerDropdown:s.layerDropdown,layerDropdownIcons:s.layerDropdownIcons,menu:s.menu,menuItems:s.menuItems,progress:s.progress,selectionColumn:!1,columnMenuItems:new S({sortAscending:!1,sortDescending:!1})}):null}addPendingEdits(e){this.viewModel.addPendingEdits(e)}async deleteAttachments(e,t,i){null!=e&&t?.length&&(i?this._showDeleteAttachmentPrompt(e,t):await this.viewModel.deleteAttachments(e,t))}async deleteSelection(e){this.highlightIds.length&&(e?this._showDeleteSelectionPrompt():await this.viewModel.deleteSelection())}async discardPendingEdits(e,t){return t?this._showDiscardEditsPrompt(e):this.viewModel.discardPendingEdits(e)}async downloadAttachmentById(e,t){return this.viewModel.downloadAttachmentById(e,t)}drainRelatedTables(){this.viewModel.drainRelatedTables()}async exportSelectionToCSV(e){return this.viewModel.exportSelectionToCSV(e)}findColumn(e){return this.viewModel.findColumn(e)}getFeatureStoreItemByObjectId(e){return this.viewModel.getFeatureStoreItemByObjectId(e)}goToPage(e){this.viewModel.goToPage(e)}hideAllColumns(){this.viewModel.hideAllColumns()}hideColumn(e){this.grid?.hideColumn(e)}nextPage(){this.viewModel.nextPage()}previousPage(){this.viewModel.previousPage()}async refresh(){await this.viewModel.refresh()}refreshCellContent(){this.viewModel.refreshCellContent()}async saveAttachmentsViewForm(){await this.viewModel.saveAttachmentsViewForm()}async savePendingEdits(){await this.viewModel.savePendingEdits()}showAllColumns(){this.viewModel.showAllColumns()}showColumn(e){this.grid?.showColumn(e)}sortColumn(e,t){this.viewModel.sortColumn(e,t)}scrollLeft(){this.viewModel.scrollLeft()}scrollToBottom(){this.viewModel.scrollToBottom()}scrollToIndex(e){this.viewModel.scrollToIndex(e)}scrollToRow(e){this.viewModel.scrollToRow(e)}scrollToTop(){this.viewModel.scrollToTop()}toggleColumnVisibility(e){this.viewModel.toggleColumnVisibility(e)}async zoomToSelection(){return this.effectiveTable.viewModel.zoomToSelection()}render(){const{_effectiveVisibleElements:e,isQueryingOrSyncing:t,menuConfig:i,state:s}=this;return N("div",{bind:this,class:this.classes(q.base,j.widget)},N("calcite-panel",{bind:this,class:q.content,closable:e.close,closed:this.closed,collapsed:this.collapsed,collapsible:e.collapse,description:this._effectiveDescription,disabled:this.disabled||"disabled"===s&&!this._effectiveLayers?.length,heading:e.header?this._effectiveTitle:void 0,key:"table-content",loading:"loading"===s,menuOpen:!!i?.open,overlayPositioning:"fixed",onCalcitePanelClose:()=>{this.closed=!0,this.emit("close")},onCalcitePanelToggle:e=>{this.collapsed=e.target.collapsed,this.emit("toggle")}},e.progress?N("calcite-progress",{type:t?"indeterminate":"determinate"}):null,this._showLayerDropdown?this._renderLayerDropdown():null,this._renderColumnVisibilityAction(),this._renderHeaderMenuActions(),this._renderNavigationBar(),this._renderTables(),this._renderError(),this._renderFooterContent()),this._renderColumnVisibilityPopover(),this._renderPrompt(),this._renderDialog())}_renderTables(){const{grid:e,relatedTables:t}=this,i=this.classes(q.tableContainer);if(t.length){const s=this.classes(q.base,this.allRelatedTablesVisible?q.expanded:q.collapsed,this._attachmentsViewIsVisible?q.tableContainerWithAttachments:void 0);return N("div",{class:i},N("calcite-panel",{overlayPositioning:"fixed"},N("div",null,[this._shouldShowGrid?N("div",{class:s},e?.render(),this._renderPagination()):void 0,...this._filteredTables.map(e=>{const i=t.indexOf(e);return N("div",{class:s,key:`related-${i}`},e.render())}),,])))}return null!=this.attachmentsViewOptions.objectId?N("div",{class:i},N("calcite-panel",{overlayPositioning:"fixed"},N("div",null,[N("div",{class:this.classes(q.base,q.collapsed)},e?.render(),this._renderPagination()),this._renderAttachmentsView()]))):[N("div",{class:i},e?.render()),this._renderPagination()]}_renderPagination(){if(this.paginationEnabled)return N("calcite-pagination",{pageSize:1,startItem:this.pageIndex+1,totalItems:this.pageCount,onCalcitePaginationChange:e=>{this._attachmentsDialogPreviewLoading=!1,this.goToPage(e.currentTarget.startItem-1)}})}_renderError(){const{messages:e}=this;return N("calcite-alert",{autoClose:!0,autoCloseDuration:"fast",icon:J.exclamationMarkTriangle,kind:"danger",label:e.errorOccured,open:this._hasAttachmentsViewError,slot:"alerts",topLayerDisabled:this.topLayerDisabled,onCalciteAlertClose:()=>{this.attachmentsViewOptions.error=null}},N("span",{slot:"message"},e.errorOccured))}_renderFooterContent(){if(!this.hasPendingEdits||!this._effectiveVisibleElements.pendingEditsFooter)return;const{hasInvalidPendingEdits:e,isQueryingOrSyncing:t,messages:i,messagesCommon:s}=this,l=e||t,n=this.hasContingentValues,o=[N("calcite-button",{appearance:"outline",disabled:t,iconStart:J.reset,key:"footer-reset-button",onclick:()=>{this.discardPendingEdits()},slot:"footer-end",width:"auto"},s.reset),N("calcite-button",{disabled:l,iconStart:J.save,key:"footer-save-button",loading:this.isSyncing,onclick:()=>{this.savePendingEdits()},slot:"footer-end",width:"auto"},s.save)];if(n){const t=e?i.contingentValues.hasInvalidValues:i.contingentValues.hasValidValues,s=e?J.exclamationMarkTriangle:J.checkCircle,l=e?q.footerIconDanger:q.footerIconSuccess;o.push(N("div",{class:q.footerMessage,key:"footer-message",slot:"footer-start"},N("calcite-icon",{class:l,icon:s,scale:"s",slot:"footer-start"}),t))}return o}_renderPrompt(){return this.prompt?N(E,{...this.prompt,headingLevel:2}):void 0}_showDeleteSelectionPrompt(){const{messages:e,messagesCommon:i}=this,s=t(e.deleteSelectionCount,{count:this.highlightIds.length});this.showPrompt({title:s,message:e.deleteRecordsRemoved,context:"danger",actions:{primary:{label:i.delete,action:async()=>{try{await this.viewModel.deleteSelection()}finally{this.clearPrompt()}}},secondary:{label:e.keepRecords,action:()=>this.clearPrompt()}}})}_showDeleteAttachmentPrompt(e,i){const{messages:s,messagesCommon:l}=this,n=t(s.deleteAttachmentCount,{count:i.length});this.showPrompt({title:n,message:s.deleteAttachmentConfirmation,context:"danger",actions:{primary:{label:l.delete,action:async()=>{try{await this.deleteAttachments(e,i,!1)}finally{this.clearPrompt()}}},secondary:{label:l.cancel,action:()=>this.clearPrompt()}}})}async _showDiscardEditsPrompt(e){const t=Promise.withResolvers(),{messagesEditor:i}=this;return this.showPrompt({title:i.cancelEditTitle,message:i.cancelEditWarningMessage,context:"danger",actions:{primary:{label:i.discardEdits,action:async()=>{try{await this.discardPendingEdits(e)}finally{t.resolve(!0)}}},secondary:{label:i.continueEditing,action:()=>t.resolve(!1)}}}),t.promise.finally(()=>this.clearPrompt())}_onTableViewChange(e){this.hasPendingEdits?this._showDiscardEditsPrompt().then(t=>t&&e()):e()}_resetNestedViews(){this.relatedTable&&this.drainRelatedTables(),this.effectiveTable.attachmentsViewOptions.objectId=null}_renderDialog(){const{attachmentsViewOptions:e,messages:t}=this,{objectId:i}=e;return N("calcite-dialog",{class:q.dialog,description:this.viewModel.getFeatureTitleSync(i),heading:t.attachments,modal:!0,open:this._dialogIsOpen,placement:"cover",width:"l",onCalciteDialogClose:()=>this._onDialogClose()},this._renderDialogContent())}_renderDialogContent(){const e=this.attachmentsViewOptions.dialogInfo;if(e)return this._renderAttachmentsDialogContent(e)}_renderAttachmentsDialogContent(e){const{attachmentsViewOptions:t,messages:i}=this,{attachmentInfos:s}=t,l=s.indexOf(e);return N(H,null,N("div",{class:q.dialogHeader,key:"header",slot:"content-top"},N("span",null,e.name),N("calcite-button",{appearance:"outline",onclick:()=>{t.attachmentId=e.id,t.dialogId=null}},i.viewDetails)),N("calcite-progress",{type:this._attachmentsDialogPreviewLoading?"indeterminate":"determinate"}),N("div",{class:q.dialogContent,key:"content"},this._renderAttachmentsViewDetailsImage(e)),N("calcite-pagination",{pageSize:1,slot:"footer",startItem:l+1,totalItems:s.length,onCalcitePaginationChange:e=>{const i=e.currentTarget.startItem-1,l=s[i]?.id;t.dialogId=l}}))}_onDialogClose(){const e=this.attachmentsViewOptions;null!=e.dialogId&&(e.dialogId=null),this._attachmentsDialogPreviewLoading=!1}_renderHeaderMenuAction(e){const{disabled:t,hidden:i,icon:s,text:l,clickFunction:n}=e;if(!i)return N("calcite-action",{disabled:t??this.menuConfig?.disabled,icon:s??void 0,key:l,onclick:()=>n(),slot:"header-menu-actions",text:l,textEnabled:!0,title:l})}_renderHeaderMenuActions(){return this._shouldShowMenu?[this._renderDefaultHeaderMenuActions(),this._renderCustomHeaderMenuActions()]:[]}_renderDefaultHeaderMenuActions(){if(!this._hasDefaultMenuItems)return[];const{messages:e}=this;return[this._showRefreshDataAction&&{icon:J.refresh,text:e.refreshData,clickFunction:()=>this.refresh()},this._showDeleteSelectionAction&&{icon:J.delete,text:e.deleteSelection,clickFunction:()=>this.deleteSelection(!0)},this._showClearSelectionAction&&{icon:J.clearSelection,text:e.clearSelection,clickFunction:()=>this.highlightIds?.removeAll()},this._showZoomToSelectionAction&&{icon:J.zoomToSelection,text:e.zoomToSelection,clickFunction:()=>this.zoomToSelection()},this._showSelectedRecordsShowSelectedAction&&{icon:J.showSelected,text:e.showSelected,clickFunction:()=>{const{objectIds:e}=this;e.removeAll(),e.addMany(this.highlightIds.toArray())}},this._showSelectedRecordsShowAllAction&&{icon:J.showAll,text:e.showAllRecords,clickFunction:()=>this.objectIds.removeAll()},this._showExportSelectionToCSVAction&&{icon:J.exportToCSV,text:e.exportSelectionCSV,clickFunction:()=>this.exportSelectionToCSV()}].filter(i).map(e=>e&&this._renderHeaderMenuAction(e))}_renderCustomHeaderMenuActions(){return this.menuConfig?.items?.map(({disabled:e,hidden:t,icon:i,label:s,clickFunction:l})=>this._renderHeaderMenuAction({hidden:"function"==typeof t?t():t,icon:i,text:s,disabled:e,clickFunction:e=>l(e)}))??[]}_renderColumnVisibilityAction(){if(!this._showColumnVisibilityAction)return[];const{_columnVisibilityActions:e,id:t}=this,i=this.messages.menuText.columnVisibility;return N("calcite-action",{afterCreate:i=>e.set(t,i),afterRemoved:()=>e.delete(t),bind:this,disabled:this._columnVisibilityActionDisabled,icon:J.showColumn,id:`${t}__toggle-columns-action`,slot:"header-actions-end",text:i},this._effectiveVisibleElements.tooltips?N("calcite-tooltip",{closeOnClick:!0,overlayPositioning:"fixed",placement:"bottom-end",referenceElement:e.get(t),topLayerDisabled:this.topLayerDisabled},i):null)}_renderColumnVisibilityPopover(){if(!this._showColumnVisibilityAction||this._columnVisibilityActionDisabled)return;const e=this.visibleElements.columnVisibilityMenuItems.header,t=this.messages.menuText.columnVisibility;return N("calcite-popover",{autoClose:!0,class:q.menuPopover,closable:e,heading:e?t:void 0,label:t,overlayPositioning:"fixed",referenceElement:this._columnVisibilityActions.get(this.id),topLayerDisabled:this.topLayerDisabled},this._renderColumnVisibilityList())}_renderColumnVisibilityList(){const{effectiveTable:e,messages:{menuText:t}}=this;if(0!==e.columns.length)return N("calcite-list",{afterCreate:B,afterRemoved:Z.bind(this),afterUpdate:B,bind:this,"data-node-ref":"_columnVisibilityList",displayMode:"nested",filterEnabled:this.visibleElements.columnVisibilityMenuItems.filter,filterPlaceholder:t.searchFields,label:t.fieldVisibility,selectionMode:"multiple",onCalciteListFilter:()=>this.scheduleRender()},this._renderColumnToggleAll(),e.columns.toArray().map(t=>{const i=D(t)?t.columns?.map(t=>this._renderColumnListItem({column:t,table:e,ignoreSelect:!0})):void 0;return this._renderColumnListItem({column:t,table:e,items:i})}),N("calcite-notice",{appearance:"transparent",kind:"neutral",open:!0,slot:"filter-no-results"},N("div",{slot:"message"},t.noMatchesFound)))}_renderColumnToggleAll(){if(!this.visibleElements.columnVisibilityMenuItems.toggleAll)return;const{_columnVisibilityList:e}=this;return e&&e.filteredItems?.length?N("calcite-button",{appearance:"transparent",onclick:()=>this._toggleAllColumns(),width:"full"},this._getColumnToggleAllText()):void 0}_getColumnToggleAllText(){const{_columnVisibilityList:e,effectiveTable:t,messages:{menuText:i}}=this;return e?""===e.filterText?t.allColumnsVisible?i.deselectAll:i.selectAll:this._allColumnsAreVisible(e.filteredItems.map(e=>e.value))?i.deselectAll:i.selectAll:""}_renderColumnListItem(e){const{column:t,table:i,items:s,ignoreSelect:l}=e,{effectiveLabel:n,fieldName:o,hidden:a}=t;return N("calcite-list-item",{expanded:!(!s?.length||a)||void 0,key:`toggle-columns__item-${o}`,label:n,metadata:{description:t.effectiveDescription,type:R(t)?t.field.type:void 0},selected:!a,value:o,onCalciteListItemSelect:e=>{l&&e.stopPropagation(),i.toggleColumnVisibility(e.currentTarget.value)}},s)}_renderLayerDropdown(){const e=this.messages.selectALayer;return N("div",{class:q.layerDropdownMenu,key:`${this.id}-layerDropdown`,slot:"header-actions-start"},N("calcite-dropdown",{bind:this,maxItems:5,overlayPositioning:"fixed",placement:"bottom-start",topLayerDisabled:this.topLayerDisabled},N("calcite-action",{icon:J.layers,slot:"trigger",text:e,title:e}),N("calcite-dropdown-group",{selectionMode:"single"},this._effectiveLayers.map((e,t)=>this._renderLayerDropdownItem(e,t))??null)))}_renderLayerDropdownItem(e,t){const i=this.visibleElements.layerDropdownIcons;return N("calcite-dropdown-item",{iconStart:i?z(e):void 0,key:`dropdown-item-${t}`,label:e.title??"",selected:e===this.layer,value:e.id,onCalciteDropdownItemSelect:()=>this._onTableViewChange(()=>this.layer=e)},e.title)}_onRelatedNavigationItemClick(e){this.viewModel.drainRelatedTablesAboveIndex(e)}_collapseRelatedTable(e){this.viewModel.collapseRelatedTable(this.effectiveTable,e)}_onShowRelatedTable(e){this.showRelatedTableCallback||this.hasPendingEdits||(this._collapseRelatedTable(e),this._createRelatedTable(e))}async _createRelatedTable(e){const{autoRefreshEnabled:t,autoSaveEnabled:i,editingEnabled:s,effectiveTable:l,multipleSelectionEnabled:n,paginationEnabled:o,pageSize:a,view:r,viewModel:c}=this,{layer:d,objectId:h,relatedLayer:m,relationshipId:p}=e;await d.load();const u=this.attachmentsEnabled&&L(d),g=new G({layer:d,autoRefreshEnabled:t,autoSaveEnabled:i,attachmentsEnabled:u,editingEnabled:s,multipleSelectionEnabled:n,paginationEnabled:o,pageSize:a,relatedRecordsEnabled:!0,relationshipConfig:{objectId:h,relatedLayer:m,relationshipId:p},relationshipColumnConfigs:O(d,p),tableController:this,tableParent:l,view:r,showRelatedTableCallback:e=>c.emit("show-related-table",e)});this.relatedTables.add(g),this.scheduleRender()}_renderAttachmentsView(){switch(this.attachmentsViewOptions.effectiveMode){case"list":return this._renderAttachmentsViewList();case"details":return this._renderAttachmentsViewDetails();case"file":return this._renderAttachmentsViewFile()}}_renderAttachmentsViewFile(){const e=this.attachmentsViewOptions,{objectId:t}=e;if(null!=t)return[N("div",{class:q.attachmentsView,key:"attachments-view"},this._renderAttachmentsViewInformation(),N("div",{class:q.attachmentsViewContent,key:"attachments-view-content"},N("div",{bind:this,class:q.attachmentsViewDropArea,ondragover:e=>e.preventDefault(),ondrop:this._onAttachmentsViewDrop},N("calcite-icon",{class:q.attachmentsViewIcon,icon:J.upload,scale:"l"}),this._renderAttachmentsViewFileLabelNode(),this._renderAttachmentsViewFileMessageNode(),N("form",{afterCreate:t=>e.form=t,afterRemoved:()=>e.form=null,bind:this,key:"attachments-form"},N("fieldset",null,this._renderAttachmentsViewFileNameNode(),N("input",{afterCreate:B,afterRemoved:Z,afterUpdate:B,bind:this,"data-node-ref":"_attachmentsInput",files:e.candidates,hidden:!0,name:"attachment",onchange:e=>this._onAttachmentsViewCandidateChange(e),type:"file"}),this._renderAttachmentsViewFileSelectNode(),this._renderAttachmentsViewFileSaveNode(),this._renderAttachmentsViewFileCancelNode())))))]}_renderAttachmentsViewFileLabelNode(){if("replace"===this.attachmentsViewOptions.fileMode)return N("span",{class:q.attachmentsViewDropAreaLabel,key:"replace-file-node"},this.messages.replaceFile)}_renderAttachmentsViewFileMessageNode(){const e=this.attachmentsViewOptions;if(e.hasCandidates)return;const{messages:t}=this,i=this.supportsAddAttachments?null==e.objectId?t.noFeature:t.dragAndDropToUpload:t.editingRestricted;return N("span",{class:q.attachmentsViewDropAreaMessage,key:"message-node"},i)}_renderAttachmentsViewFileNameNode(){const e=this.attachmentsViewOptions.candidates,t=Array.from(e??[]).at(-1);if(t)return N("span",{class:q.attachmentsViewDropAreaMessage,key:"filename-node"},t.name)}_renderAttachmentsViewFileSelectNode(){if(this.supportsAddAttachments)return N("calcite-button",{appearance:"outline-fill",disabled:this.isSyncingAttachments,iconStart:J.folderOpen,key:"select-node",onclick:()=>{this._resetAttachmentsInput(),this._attachmentsInput?.click()}},this.messages.selectFile)}_renderAttachmentsViewFileSaveNode(){const{isSyncingAttachments:e,messages:t}=this,{attachmentInfo:i,hasCandidates:s}=this.attachmentsViewOptions;if(this.supportsAddAttachments&&s)return N("calcite-button",{appearance:"solid",disabled:e,iconStart:J.save,key:"save-node",loading:e,onclick:()=>{this.saveAttachmentsViewForm()}},i?t.updateAttachment:t.addAttachment)}_renderAttachmentsViewFileCancelNode(){const{hasAttachments:e,hasCandidates:t}=this.attachmentsViewOptions;if(e||t)return N("calcite-button",{appearance:"transparent",bind:this,disabled:this.isSyncingAttachments,key:"cancel-node",onclick:()=>{this._resetAttachmentsInput(),this.attachmentsViewOptions.cancel()}},this.messagesCommon.cancel)}_renderAttachmentsViewDetails(){const{attachmentInfo:e}=this.attachmentsViewOptions;if(e)return[N("div",{class:q.attachmentsView,key:"attachments-view"},this._renderAttachmentsViewInformation(),N("div",{class:q.attachmentsViewContent,key:"attachments-view-content"},N("div",{class:q.attachmentsViewDetails},this._renderAttachmentsViewDetailsPreview(e))))]}_renderAttachmentsViewDetailsPreview(e){const t=[this._renderAttachmentsViewDetailsImage(e)];if(M(e.contentType)){const i=this.messages.maximize;t.push(N("calcite-action",{icon:J.expand,label:i,onclick:t=>{t.preventDefault(),this.attachmentsViewOptions.dialogId=e.id},text:i,textEnabled:!0,title:i}))}return t}_renderAttachmentsViewDetailsImage(e){const{contentType:t,name:i,size:s,url:l}=e,{messages:n}=this;return M(t)?N("img",{afterCreate:()=>this._attachmentsDialogPreviewLoading=!0,alt:i,key:`thumbnail-image-${i}`,onerror:()=>this._attachmentsDialogPreviewLoading=!1,onload:()=>this._attachmentsDialogPreviewLoading=!1,src:`${l}${l?.includes("?")?"&":"?"}s=${s}`,title:i}):[N("calcite-icon",{icon:V(t),key:`thumbnail-icon-${i}`,scale:"l",textLabel:i,title:i}),n.noPreviewAvailable]}_renderAttachmentsViewInformation(){const{attachmentsViewOptions:e,messages:t,messagesUnits:i}=this,{attachmentInfo:s,objectId:l}=e;if(s&&null!=l)return N("div",{class:q.attachmentsViewInformation,key:"information"},this._renderAttachmentViewInformationButtons(s,l),N("span",{class:q.attachmentsViewInformationLabel,key:"file-label"},t.fileName),N("span",{class:q.attachmentsViewInformationData,key:"file-value"},s.name),N("span",{class:q.attachmentsViewInformationLabel,key:"type-label"},t.attachmentType),N("span",{class:q.attachmentsViewInformationData,key:"type-value"},this._getLabelForAttachmentType(s)),this._renderAttachmentKeywordDetails(s),N("span",{class:q.attachmentsViewInformationLabel,key:"size-label"},t.size),N("span",{class:q.attachmentsViewInformationData,key:"size-span"},h(i,s.size??0)))}_renderAttachmentViewInformationButtons(e,t){const{attachmentsViewOptions:i,messages:s,messagesCommon:l}=this,n="details"!==i.effectiveMode,o=e.id,a=[N("calcite-button",{appearance:"outline",disabled:n,key:"download-button",onclick:e=>{e.preventDefault(),this.downloadAttachmentById(t,o)},width:"full"},s.download)];return this.supportsUpdateAttachments&&a.push(N("calcite-button",{appearance:"outline",disabled:n,key:"replace-button",onclick:()=>{i.mode="file",i.attachmentId=o},width:"full"},s.replace)),this.supportsDeleteAttachments&&a.push(N("calcite-button",{appearance:"outline",disabled:n,key:"delete-button",onclick:()=>{this.deleteAttachments(t,[o],!0)},width:"full"},l.delete)),a}_renderAttachmentKeywordDetails({keywords:e}){if(e&&""!==e)return[N("span",{class:q.attachmentsViewInformationLabel,key:"keyword-label"},this.messages.keyword),N("span",{class:q.attachmentsViewInformationData,key:"keyword-value"},e)]}_renderAttachmentsViewList(){const{attachmentsViewOptions:e,isSyncingAttachments:t,messages:i,messagesUnits:s}=this,{attachmentInfos:l,objectId:n}=e;return N("calcite-list",{afterCreate:B,afterRemoved:Z,afterUpdate:B,bind:this,class:q.attachmentsViewList,"data-node-ref":"attachmentsList",key:`attachments-list-${n}`,label:i?.attachments,loading:t,ondragover:e=>e.preventDefault(),ondrop:this._onAttachmentsViewDrop,selectionMode:this.supportsDeleteAttachments?"multiple":"none",onCalciteListChange:()=>this.scheduleRender()},...l?.map(t=>{const{id:l,name:o,size:a}=t,r=h(s,a??0);return N("calcite-list-item",{afterRemoved:()=>this.scheduleRender(),key:`attachment-${l}`,label:o,value:l},this._renderAttachmentsViewListPreview(t),N("span",{class:q.attachmentsViewListFileSize,slot:"actions-end",title:r},r),N("calcite-action",{icon:J.downloadTo,key:"download",label:o,onclick:e=>{e.preventDefault(),this.downloadAttachmentById(n??-1,l)},slot:"actions-end",text:i.downloadAttachment,title:i.downloadAttachment}),N("calcite-action",{icon:J.chevronRight,iconFlipRtl:!0,key:"details",label:o,onclick:()=>{e.mode="details",e.attachmentId=l},slot:"actions-end",text:i.viewAttachment,title:i.viewAttachment}))}))}_renderAttachmentsViewListPreview(e){return N("div",{class:q.attachmentsViewListThumbnail,slot:"content-start"},N("span",null,this._renderAttachmentsViewListImage(e)))}_renderAttachmentsViewListImage(e,t=64){const{contentType:i,name:s,size:l,url:n}=e,o=`${n}${n?.includes("?")?"&":"?"}w=${t}&s=${l}`;return this.supportsResizeAttachments&&M(i)?N("img",{alt:s,key:`thumbnail-image-${s}`,src:o,title:s}):N("calcite-icon",{icon:V(i),key:`thumbnail-icon-${s}`,scale:"l",textLabel:s,title:s})}_onAttachmentsViewCandidateChange({target:e}){this.attachmentsViewOptions.candidates=e?.files}_onAttachmentsViewDrop(e){e.preventDefault(),(this.supportsAddAttachments||this.supportsUpdateAttachments)&&(this.attachmentsViewOptions.mode="file",this.attachmentsViewOptions.candidates=e.dataTransfer?.files)}_resetAttachmentsInput(){this._attachmentsInput&&(this._attachmentsInput.value="")}_getLabelForAttachmentType({contentType:e}){const t=this.messages,i=C(e);return t.attachmentTypes[i]}_renderNavigationBar(){const{effectiveTable:e,messages:i,messagesCommon:s,navigationScale:l,relatedTable:n,relatedTables:o}=this;if(!this._shouldShowNavigationBar)return;const{attachmentsList:a,attachmentsViewOptions:r,layer:c,supportsAddAttachments:d,supportsDeleteAttachments:h}=e;if(!c)return;const{attachmentInfos:m,objectId:p}=r,u=null!=p,g=m.length,w=a?.selectedItems?.length??0,b=`${c.objectIdField}: ${p}`,v=t(i.selectedCount,{count:w}),y=t(i.attachmentsCount,{count:g}),f=u?N("calcite-action",{bind:this,icon:J.chevronRight,iconFlipRtl:!0,key:"navigation-feature",onclick:()=>e.scrollToRow(p),scale:l,text:b,textEnabled:!0,title:b}):void 0,_=u?N("calcite-action",{icon:J.chevronRight,iconFlipRtl:!0,key:"navigation-attachments-label",label:y,onclick:()=>{g>0&&(r.mode="list")},scale:l,text:y,textEnabled:!0,title:y}):void 0,M=u?N("calcite-chip",{closable:!0,closed:0===w,key:"navigation-chip",kind:"inverse",label:v,scale:"s",selected:!0,title:v,value:"selected",onCalciteChipClose:()=>a?.selectedItems?.forEach(e=>e.selected=!1)},v):void 0,V=n?N("calcite-label",{layout:"inline",scale:l},i.showAllTables,N("calcite-switch",{checked:this.allRelatedTablesVisible,scale:l,onCalciteSwitchChange:e=>this.showAllRelatedTables=!!e.currentTarget.checked})):void 0,C=u&&"list"===r.effectiveMode&&null!=p&&w&&h?N("calcite-action",{icon:J.delete,iconFlipRtl:!0,key:"attachments-trash-all",onclick:()=>{e.deleteAttachments(p,a?.selectedItems?.map(e=>e.value)??[],!0)},scale:l,text:s.delete,textEnabled:!0,title:t(i.deleteAttachmentCount,{count:w})}):void 0,A=u&&"list"===r.effectiveMode&&d?N("calcite-action",{bind:this,icon:J.plus,iconFlipRtl:!0,key:"attachments-add",onclick:()=>{r.objectId=p,r.attachmentId=null,r.mode="file"},scale:l,text:i.addAttachment,textEnabled:!0,title:i.addAttachment}):void 0;return N("div",{class:q.tableNavigation,key:"table-nav"},N("calcite-action",{icon:J.moveUp,iconFlipRtl:!0,key:"go-back",onclick:()=>this._onTableViewChange(this._resetNestedViews),scale:l,text:this.layer?.title??"",textEnabled:!1,title:n?i.exitRelatedRecords:i.exitAttachments}),o.toArray().map((e,t)=>this._renderRelatedTableNavigationAction(e,t)),f,_,N("div",null,M,V,C,A))}_renderRelatedTableNavigationAction(e,t){const i=this._getLabelForRelatedTableNavigationAction(e);return N("calcite-action",{icon:J.chevronRight,iconFlipRtl:!0,key:t,onclick:()=>{(t!==this.relatedTables.length-1||this._attachmentsViewIsVisible)&&this._onTableViewChange(()=>this._onRelatedNavigationItemClick(t))},scale:this.navigationScale,text:i,textEnabled:!0,title:e.layer?.title||""})}_getLabelForRelatedTableNavigationAction(e){const t=e.layer?.title;if(!t)return"";const{relatedTables:i}=this;if(i.length<=1)return t;return i.indexOf(e)!==i.length-1&&t.length>20?`${t.slice(0,20)}...`:t}_allColumnsAreVisible(e){return e.every(e=>!1===this.findColumn(e)?.hidden)}_toggleAllColumns(){const{_columnVisibilityList:e,effectiveTable:t}=this,i=e?.filteredItems.map(e=>e.value);""!==e?.filterText&&i?.length?this._allColumnsAreVisible(i)?i.forEach(e=>this.hideColumn(e)):i.forEach(e=>this.showColumn(e)):t.allColumnsVisible?t.hideAllColumns():t.showAllColumns()}};e([m()],X.prototype,"_attachmentsDialogPreviewLoading",void 0),e([m()],X.prototype,"_attachmentsInput",void 0),e([m()],X.prototype,"_attachmentsViewIsVisible",null),e([m()],X.prototype,"_columnVisibilityActions",void 0),e([m()],X.prototype,"_columnVisibilityActionDisabled",null),e([m()],X.prototype,"_columnVisibilityList",void 0),e([m()],X.prototype,"_dialogIsOpen",null),e([m()],X.prototype,"_effectiveDescription",null),e([m()],X.prototype,"_effectiveLayers",null),e([m()],X.prototype,"_effectiveTitle",null),e([m()],X.prototype,"_effectiveVisibleElements",null),e([m()],X.prototype,"_filteredTables",null),e([m()],X.prototype,"_hasAttachmentsViewError",null),e([m()],X.prototype,"_hasCustomMenuItems",null),e([m()],X.prototype,"_hasDefaultMenuItems",null),e([m()],X.prototype,"_shouldShowGrid",null),e([m()],X.prototype,"_shouldShowMenu",null),e([m()],X.prototype,"_showClearSelectionAction",null),e([m()],X.prototype,"_showColumnVisibilityAction",null),e([m()],X.prototype,"_showDeleteSelectionAction",null),e([m()],X.prototype,"_showExportSelectionToCSVAction",null),e([m()],X.prototype,"_showLayerDropdown",null),e([m()],X.prototype,"_shouldShowNavigationBar",null),e([m()],X.prototype,"_showRefreshDataAction",null),e([m()],X.prototype,"_showSelectedRecordsShowSelectedAction",null),e([m()],X.prototype,"_showSelectedRecordsShowAllAction",null),e([m()],X.prototype,"_showZoomToSelectionAction",null),e([m()],X.prototype,"_viewLayers",null),e([m()],X.prototype,"attachmentsList",void 0),e([m({readOnly:!0})],X.prototype,"grid",null),e([m()],X.prototype,"actionColumn",null),e([m()],X.prototype,"actionColumnConfig",null),e([m({readOnly:!0})],X.prototype,"activeFilters",null),e([m({readOnly:!0})],X.prototype,"activeSortOrders",null),e([m()],X.prototype,"allColumns",null),e([m()],X.prototype,"allColumnsVisible",null),e([m({readOnly:!0})],X.prototype,"allRelatedTablesVisible",null),e([m()],X.prototype,"allVisibleColumns",null),e([m()],X.prototype,"attachmentsColumns",null),e([m()],X.prototype,"attachmentsEnabled",null),e([m()],X.prototype,"attachmentsViewOptions",null),e([m({type:y})],X.prototype,"attributeTableTemplate",null),e([m()],X.prototype,"autoRefreshEnabled",null),e([m()],X.prototype,"autoSaveEnabled",null),e([m()],X.prototype,"canAddRelatedFeature",null),e([m()],X.prototype,"clearPrompt",null),e([m()],X.prototype,"closed",void 0),e([m()],X.prototype,"collapsed",void 0),e([m()],X.prototype,"columnPerformanceModeEnabled",null),e([m()],X.prototype,"columnReorderingEnabled",null),e([m({readOnly:!0})],X.prototype,"columns",null),e([m()],X.prototype,"defaultSelectionManager",null),e([m()],X.prototype,"definitionExpression",null),e([m()],X.prototype,"description",void 0),e([m()],X.prototype,"disabled",void 0),e([m()],X.prototype,"editingEnabled",null),e([m()],X.prototype,"effectiveSelectionManager",null),e([m()],X.prototype,"effectiveSize",null),e([m()],X.prototype,"effectiveTable",null),e([m()],X.prototype,"fieldColumns",null),e([m({types:u})],X.prototype,"filterGeometry",null),e([m()],X.prototype,"filterBySelectionEnabled",null),e([m()],X.prototype,"filterByViewExtent",null),e([m()],X.prototype,"groupColumns",null),e([m()],X.prototype,"hasContingentValues",null),e([m()],X.prototype,"hasInvalidPendingEdits",null),e([m()],X.prototype,"hasPendingEdits",null),e([m()],X.prototype,"hiddenFields",null),e([m()],X.prototype,"highlightEnabled",null),e([m()],X.prototype,"highlightIds",null),e([m()],X.prototype,"icon",null),e([m()],X.prototype,"initialSize",null),e([m()],X.prototype,"isQueryingOrSyncing",null),e([m()],X.prototype,"isSyncing",null),e([m()],X.prototype,"isSyncingAttachments",null),e([m()],X.prototype,"label",null),e([m()],X.prototype,"layer",null),e([m()],X.prototype,"layers",null),e([m()],X.prototype,"layerView",null),e([m()],X.prototype,"maxSize",null),e([m(),$("esri/widgets/FeatureTable/t9n/FeatureTable")],X.prototype,"messages",null),e([m(),$("esri/t9n/common")],X.prototype,"messagesCommon",null),e([m(),$("esri/widgets/Editor/t9n/Editor")],X.prototype,"messagesEditor",void 0),e([m(),$("esri/core/t9n/Units")],X.prototype,"messagesUnits",null),e([m(),$("esri/widgets/support/t9n/uriUtils")],X.prototype,"messagesURIUtils",null),e([m()],X.prototype,"menuConfig",null),e([m()],X.prototype,"multipleSelectionEnabled",null),e([m()],X.prototype,"multipleSelectionEnabledOverride",null),e([m()],X.prototype,"multiSortEnabled",null),e([m()],X.prototype,"multipleSortPriority",null),e([m()],X.prototype,"navigationScale",void 0),e([m()],X.prototype,"noDataMessage",null),e([m()],X.prototype,"objectIds",null),e([m()],X.prototype,"outFields",null),e([m()],X.prototype,"pageCount",null),e([m()],X.prototype,"pageIndex",null),e([m()],X.prototype,"pageSize",null),e([m()],X.prototype,"paginationEnabled",null),e([m()],X.prototype,"pendingEditsCount",null),e([m()],X.prototype,"prompt",null),e([m()],X.prototype,"relatedRecordsEnabled",null),e([m()],X.prototype,"relatedTable",null),e([m()],X.prototype,"relatedTableHasContingentValues",null),e([m()],X.prototype,"relatedTableHasInvalidPendingEdits",null),e([m()],X.prototype,"relatedTableHasPendingEdits",null),e([m()],X.prototype,"relatedTables",null),e([m()],X.prototype,"relationship",null),e([m()],X.prototype,"relationshipColumnConfigs",null),e([m()],X.prototype,"relationshipColumns",null),e([m()],X.prototype,"relationshipConfig",null),e([m()],X.prototype,"relationshipInfos",null),e([m()],X.prototype,"returnGeometryEnabled",null),e([m()],X.prototype,"returnMEnabled",null),e([m()],X.prototype,"returnZEnabled",null),e([m()],X.prototype,"rowHighlightIds",null),e([m()],X.prototype,"selectionManager",null),e([m()],X.prototype,"selectionSource",null),e([m()],X.prototype,"showAllRelatedTables",null),e([m()],X.prototype,"showPrompt",null),e([m()],X.prototype,"showRelatedTableCallback",null),e([m()],X.prototype,"size",null),e([m({readOnly:!0})],X.prototype,"state",null),e([m()],X.prototype,"supportsAddAttachments",null),e([m()],X.prototype,"supportsAttachments",null),e([m()],X.prototype,"supportsDeleteAttachments",null),e([m()],X.prototype,"supportsResizeAttachments",null),e([m()],X.prototype,"supportsUpdateAttachments",null),e([m()],X.prototype,"syncTemplateOnChangesEnabled",null),e([m()],X.prototype,"syncViewSelection",null),e([m()],X.prototype,"syncWithViewSelectionManager",null),e([m({constructOnly:!0})],X.prototype,"tableController",null),e([m({constructOnly:!0})],X.prototype,"tableParent",null),e([m({type:P})],X.prototype,"tableTemplate",null),e([m()],X.prototype,"tableTemplateOverride",null),e([m()],X.prototype,"title",void 0),e([m({type:f})],X.prototype,"timeExtent",null),e([m()],X.prototype,"timeZone",null),e([m()],X.prototype,"view",null),e([m({type:T}),U(["cell-click","cell-dblclick","cell-pointerover","cell-pointerout","cell-keydown","column-reorder","show-related-table"])],X.prototype,"viewModel",void 0),e([m()],X.prototype,"visibleColumns",null),e([m({type:I,nonNullable:!0})],X.prototype,"visibleElements",void 0),e([m({type:I})],X.prototype,"visibleElementsOverride",null),X=G=e([p("esri.widgets.FeatureTable")],X);const Y=X;export{Y as default};
@@ -82,7 +82,7 @@ export interface FeaturesEvents extends FeaturesViewModelEvents {}
82
82
  * a HTML div within a Calcite Design System
83
83
  * [Shell Panel](https://developers.arcgis.com/calcite-design-system/components/shell-panel/).
84
84
  *
85
- * [![features-widget-image](https://developers.arcgis.com/javascript/latest/assets/references/core/widgets/features-widget.avif)](https://developers.arcgis.com/javascript/latest/sample-code/sandbox/?sample=widgets-features)
85
+ * ![features-widget-image](https://developers.arcgis.com/javascript/latest/assets/references/core/widgets/features-widget.avif)
86
86
  *
87
87
  * In the image above, a Calcite shell panel displays the Features widget along with a MapView in a separate div.
88
88
  * A generic `title` and `content` property can be set directly on the Features widget or
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{substitute as t}from"../../intl.js";import{property as i,subclass as n}from"../../core/accessorSupport/decorators.js";import{isLayerFromCatalog as o,isCatalogSublayer as s}from"../../layers/catalog/catalogUtils.js";import{getActionIcon as l,getActionStyles as a}from"../../support/actions/actionUtils.js";import r from"../Widget.js";import{getStatusIcon as c,listItemHasChildren as d,areChildrenHidden as p,canSortSublayers as m,getSingleAction as u,getItem as g,getVisibilityIcon as y}from"./support/layerListUtils.js";import{loadCalciteComponents as h}from"../support/componentsUtils.js";import{tsx as b}from"../support/widget.js";import{setFocus as v}from"../support/widgetUtils.js";var _;let I=class extends r{static{_=this}constructor(e){super(e),this.dragEnabled=!1,this.listModeDisabled=!1,this.parent=null,this.parentTitles=null,this.viewModel=null,this._onActionMenuOpen=e=>{this.item.actionsOpen=e.currentTarget.open},this._setTooltipReference=e=>{this.onTooltipReferenceChange?.(this.item.layer?.uid,e)},this._removeTooltipReference=()=>{this.onTooltipReferenceChange?.(this.item.layer?.uid,null)}}loadDependencies(){return h({"action-group":()=>import("@esri/calcite-components/dist/components/calcite-action-group"),"action-menu":()=>import("@esri/calcite-components/dist/components/calcite-action-menu"),action:()=>import("@esri/calcite-components/dist/components/calcite-action"),icon:()=>import("@esri/calcite-components/dist/components/calcite-icon"),"list-item":()=>import("@esri/calcite-components/dist/components/calcite-list-item"),list:()=>import("@esri/calcite-components/dist/components/calcite-list"),notice:()=>import("@esri/calcite-components/dist/components/calcite-notice")})}static{this.vnodeSelector="calcite-list-item"}render(){const e=this.parentTitles??[],{_title:t,item:i,activeItem:n,selectionMode:o,selectedItems:s,messages:l,parent:a,css:r,dragDisabled:c}=this,d="visibleAtCurrentTimeExtent"in i&&"layerInvisibleAtTime"in l&&!i.visibleAtCurrentTimeExtent?`${t} (${l.layerInvisibleAtTime})`:"visibleAtCurrentScale"in i&&"layerInvisibleAtScale"in l&&!i.visibleAtCurrentScale?`${t} (${l.layerInvisibleAtScale})`:t,p="parent"in i&&"catalog"===i.parent?.layer?.type,{layer:m}=i,u="visibleAtCurrentScale"in i&&!i.visibleAtCurrentScale||"visibleAtCurrentTimeExtent"in i&&!i.visibleAtCurrentTimeExtent;return b("calcite-list-item",{afterCreate:e=>this._focusSelectedDragEl(e,i),afterUpdate:e=>this._focusSelectedDragEl(e,i),class:this.classes(r.item,"itemActive"in r&&{[r.itemActive]:n===i}),"data-item":i,"data-layer-id":m?.id,dragDisabled:!i.sortable||p||c,expanded:"open"in i&&i.open,id:m?.uid,key:`list-item-${m?.uid}`,label:t,metadata:{parentTitles:e,_title:t},selected:"none"!==o&&s.includes(i),title:d,unavailable:u,value:m?.uid,onCalciteListItemSelect:e=>"visible"in i&&this._handleCalciteListItemSelect(e,i,a),onCalciteListItemToggle:e=>"open"in i&&this._handleCalciteListItemToggle(e,i)},this._renderedCatalogFootprintIcon,this._renderedCatalogDynamicIcon,this._renderedItemStatus,this._renderedItemToggle,this._renderedCatalogSelectNode,this._renderedItemTemporaryIcon,this._renderedChildList,this._renderedItemMessage,this._renderedPanel,this._renderedPanelAction,this._renderedActions)}get _title(){const{messages:e}=this;return this.item.title||("untitledTable"in e?e.untitledTable:e.untitledLayer)}get _renderedItemStatus(){const{item:e,parent:t,visibleElements:i,css:n}=this;if(!i.statusIndicators)return null;const{publishing:o}=e,s="updating"in e&&e.updating&&!t,l="connectionStatus"in e?e.connectionStatus:void 0,a=!!l;return b("calcite-icon",{class:this.classes(n.statusIndicator,{[n.publishing]:o},"updating"in n&&{[n.updating]:s},"connectionStatus"in n&&{[n.connectionStatus]:a},"connectionStatusConnected"in n&&{[n.connectionStatusConnected]:a&&"connected"===l}),icon:c({connectionStatus:l,publishing:o}),key:"layer-item-status",scale:"s",slot:"content-end"})}get _renderedItemTemporaryIcon(){const{item:e,visibleElements:t,css:i}=this,{layer:n}=e,s="temporaryLayerIndicators"in t&&t.temporaryLayerIndicators,l="temporaryTableIndicators"in t&&t.temporaryTableIndicators,a=n&&"persistenceEnabled"in n&&(o(n)||!n.persistenceEnabled);return(s||l)&&a?b("calcite-icon",{class:i.itemTemporaryIcon,icon:"temporary",key:"temporary-icon",scale:"s",slot:"content-start",title:this.messages.temporary}):null}get _renderedItemToggle(){const{_title:e,item:i,parent:n,messages:o,visibilityAppearance:s,css:l}=this;if(!("visible"in i&&"layerVisibility"in o&&"showLayer"in o&&"hideLayer"in o&&"visibleToggle"in l&&s))return null;const{visible:a}=i,r=this._getParentVisibilityMode(n);if("inherited"===r)return null;const c=y({visible:a,exclusive:"exclusive"===r,visibilityAppearance:s}),d="checkbox"===s,p=o.layerVisibility,m=t(a?o.hideLayer:o.showLayer,{layerName:e});return b("calcite-action",{class:l.visibleToggle,icon:d?c:void 0,key:"visibility-toggle",label:m,onclick:()=>this._toggleVisibility(i,n),slot:d?"actions-start":"actions-end",text:p,title:m},d?null:b("calcite-icon",{class:this.classes({[l.visibleIcon]:"exclusive"!==r&&a}),icon:c,scale:"s"}))}get _renderedPanel(){const{panel:e}=this.item;return!e?.open||e.disabled||e.flowEnabled?null:b("div",{class:this.css.itemContentBottom,key:`content-panel-${e.uid}`,slot:"content-bottom"},e.render())}get _renderedPanelAction(){const{panel:e}=this.item;if(!e?.visible)return null;const{open:t,title:i,disabled:n}=e;return b("calcite-action",{active:t,disabled:n,icon:l(e),key:`action-${e.uid}`,onclick:()=>this._togglePanel(e),slot:"actions-end",text:i??"",title:i??void 0},this._renderFallbackIcon(e))}get _renderedActions(){switch(this._actionsCount){case 0:return null;case 1:return this._singleAction;default:return this._renderedActionMenu}}get _renderedActionMenu(){const{item:e,messagesCommon:t}=this,i=t.options;return b("calcite-action-menu",{appearance:"transparent",key:"item-action-menu",label:t.menu,open:e.actionsOpen,overlayPositioning:"fixed",placement:"bottom-end",slot:"actions-end",onCalciteActionMenuOpen:this._onActionMenuOpen},b("calcite-action",{icon:"ellipsis",slot:"trigger",text:i,title:i}),this._renderedActionMenuContent)}get _renderedActionMenuContent(){return this._filteredSections.toArray().map(e=>b("calcite-action-group",{key:`action-section-${e.uid}`},e.toArray().map(e=>this._renderAction({action:e,textEnabled:!0}))))}get _renderedCatalogFootprintIcon(){const{css:e}=this,t=this.item.layer,i="catalog-footprint"===t?.type,n="sublayer"===t?.type&&s(t,"footprints");return"itemCatalogIcon"in e&&(i||n)?b("calcite-icon",{class:e.itemCatalogIcon,icon:"footprint",key:"footprint",scale:"s",slot:"content-start"}):null}get _renderedCatalogDynamicIcon(){const{css:e}=this,t=this.item.layer,i="catalog-dynamic-group"===t?.type,n="sublayer"===t?.type&&s(t,"layers-in-view");return"itemCatalogIcon"in e&&(i||n)?b("calcite-icon",{class:e.itemCatalogIcon,icon:"catalog-dataset",key:"catalog-dataset",scale:"s",slot:"content-start"}):null}get _renderedCatalogSelectNode(){const{_title:e,item:t,visibleElements:i}=this;if(!("visible"in t))return;const{layer:n}=t,o="catalog-dynamic-group"===n?.type;return"catalogLayerList"in i&&i.catalogLayerList&&o?b("calcite-action",{disabled:!n.visible,icon:"chevron-right",iconFlipRtl:!0,onclick:()=>this._triggerOnCatalogOpen(t),slot:"actions-end",text:e}):null}get _renderedChildList(){const{dragEnabled:e,item:t,rootGroupUid:i,listModeDisabled:n,selectionMode:o,displayMode:s}=this;if(!("children"in t))return;const l=[...this.parentTitles??[],t.title],{children:a,layer:r}=t,c="catalog-dynamic-group"!==r?.type&&d(t),u=!n&&p(r),g="group"===r?.type,y=!u&&!c&&e&&g,h=!!e&&("childrenSortable"in t&&t.childrenSortable&&m(t));return c||y?b("calcite-list",{canPull:e=>!!this.canMove&&this.canMove(e,"pull"),canPut:e=>!!this.canMove&&this.canMove(e,"put"),"data-item":t,"data-layer-type":i,displayMode:s,dragEnabled:h,group:g?i:`${i}-${r?.uid}`,key:`child-list-${r?.uid}`,label:t.title,selectionAppearance:"border",selectionMode:o},a?.filter(e=>!e.hidden&&(this.visibleElements.errors||!e.error)).toArray().map(e=>this._renderItem(e,t,l)),this._renderedTablesItem):null}get _hasTables(){const{layerTablesEnabled:e}=this,t=this.item.layer;if(!e||!t)return!1;switch(t.type){case"knowledge-graph":return e.includes(t.type)&&"tables"in t&&!!t.tables?.length;case"map-image":case"tile":return e.includes(t.type)&&"subtables"in t&&!!t.subtables?.length;default:return!1}}get _renderedTablesItem(){const{item:e,messages:t,css:i}=this,{layer:n}=e;return"itemTableIcon"in i&&"visible"in e&&"tables"in t&&this._hasTables?b("calcite-list-item",{class:i.item,"data-layer-id":n?.id,dragDisabled:!0,key:`list-item-table-list-tables-${n?.uid}`,label:t.tables,title:t.tables,onCalciteListItemSelect:()=>this._triggerOnTablesOpen(e)},b("calcite-icon",{class:i.itemTableIcon,icon:"table",scale:"s",slot:"content-start"}),b("calcite-icon",{flipRtl:!0,icon:"chevron-right",scale:"s",slot:"content-end"})):null}get _renderedItemMessage(){const{item:e,messages:t,css:i}=this;return e.error?b("div",{class:i.itemMessage,key:"esri-layer-list__error",slot:"content-bottom"},b("calcite-notice",{icon:"exclamation-mark-triangle",kind:"warning",open:!0,scale:"s",width:"full"},b("div",{slot:"message"},"tableError"in t?t.tableError:t.layerError))):"incompatible"in e&&e.incompatible&&"layerIncompatible"in t?b("div",{class:i.itemMessage,key:"esri-layer-list__incompatible",slot:"content-bottom"},b("calcite-notice",{afterCreate:this._setTooltipReference,afterRemoved:this._removeTooltipReference,bind:this,icon:"exclamation-mark-triangle",kind:"warning",open:!0,scale:"s",tabIndex:0,width:"full"},b("div",{slot:"message"},t.layerIncompatible))):null}get _singleAction(){return this._renderAction({action:u(this._filteredSections),textEnabled:!1})}get _filteredSections(){return this.item.actionsSections.map(e=>e.filter(e=>e.visible))}get _actionsCount(){return this.item.actionsSections.reduce((e,t)=>e+t.length,0)}_renderAction(e){const{item:t}=this,{action:i,textEnabled:n}=e;if(!i)return null;const{active:o,disabled:s,title:a,type:r,indicator:c}=i;return b("calcite-action",{active:"toggle"===r&&i.value,"data-action-id":i.id,disabled:s,icon:l(i),indicator:c,key:`action-${i.uid}`,loading:o,onclick:()=>this._triggerAction(t,i),slot:n?void 0:"actions-end",text:a??"",textEnabled:n,title:a??void 0},this._renderFallbackIcon(i))}_renderFallbackIcon(e){const{css:t}=this,{icon:i}=e,n="className"in e?e.className:void 0;if(i)return null;const o="image"in e?e.image:void 0,s={[t.itemActionIcon]:!!n,[t.itemActionImage]:!!o};return n&&(s[n]=!0),o||n?b("span",{"aria-hidden":"true",class:this.classes(t.itemActionIcon,s),key:"icon",styles:a(o)}):null}_renderItem(e,t,i=[]){return b(_,{activeItem:this.activeItem,canMove:this.canMove,css:this.css,displayMode:this.displayMode,dragEnabled:this.dragEnabled,item:e,key:`layerListItem-${e.layer?.uid}`,layerTablesEnabled:this.layerTablesEnabled,listModeDisabled:this.listModeDisabled,messages:this.messages,messagesCommon:this.messagesCommon,parent:t,parentTitles:i,rootGroupUid:this.rootGroupUid,selectedDragItemLayerUid:this.selectedDragItemLayerUid,selectedItems:this.selectedItems,selectionMode:this.selectionMode,visibilityAppearance:this.visibilityAppearance,visibleElements:this.visibleElements,onAction:this.onAction,onCatalogOpen:this.onCatalogOpen,onPanelOpen:this.onPanelOpen,onSelectedDragItemLayerUidChange:this.onSelectedDragItemLayerUidChange,onTablesOpen:this.onTablesOpen,onTooltipReferenceChange:this.onTooltipReferenceChange})}_triggerAction(e,t){t&&e&&("toggle"===t.type&&(t.value=!t.value),this.onAction(t,e))}_triggerOnTablesOpen(e){e&&this.onTablesOpen&&this.onTablesOpen(e)}_triggerOnCatalogOpen(e){e&&this.onCatalogOpen?.(e)}_focusSelectedDragEl(e,t){this.selectedDragItemLayerUid===t.layer?.uid&&(v(e),this.onSelectedDragItemLayerUidChange?.(null))}_handleCalciteListItemToggle(e,t){e.stopPropagation(),t.open=e.target.expanded}_getParentVisibilityMode(e){return e&&"visibilityMode"in e?e.visibilityMode:null}_handleCalciteListItemSelect(e,t,i){if(g(e.target)!==t)return;const n=this._getParentVisibilityMode(i);"none"===this.selectionMode&&"inherited"!==n&&this._toggleVisibility(t,i)}_togglePanel(e){e.open=!e.open,e.open&&this.onPanelOpen()}_toggleVisibility(e,t){if(!e||!("visible"in e))return;"exclusive"===this._getParentVisibilityMode(t)&&e.visible||(e.visible=!e.visible)}};e([i()],I.prototype,"activeItem",void 0),e([i()],I.prototype,"canMove",void 0),e([i()],I.prototype,"css",void 0),e([i()],I.prototype,"displayMode",void 0),e([i()],I.prototype,"dragEnabled",void 0),e([i()],I.prototype,"dragDisabled",void 0),e([i()],I.prototype,"item",void 0),e([i()],I.prototype,"layerTablesEnabled",void 0),e([i()],I.prototype,"listModeDisabled",void 0),e([i()],I.prototype,"messages",void 0),e([i()],I.prototype,"messagesCommon",void 0),e([i()],I.prototype,"onAction",void 0),e([i()],I.prototype,"onPanelOpen",void 0),e([i()],I.prototype,"onCatalogOpen",void 0),e([i()],I.prototype,"onTablesOpen",void 0),e([i()],I.prototype,"onSelectedDragItemLayerUidChange",void 0),e([i()],I.prototype,"onTooltipReferenceChange",void 0),e([i()],I.prototype,"parent",void 0),e([i()],I.prototype,"parentTitles",void 0),e([i()],I.prototype,"rootGroupUid",void 0),e([i()],I.prototype,"selectionMode",void 0),e([i()],I.prototype,"selectedItems",void 0),e([i()],I.prototype,"selectedDragItemLayerUid",void 0),e([i()],I.prototype,"visibleElements",void 0),e([i()],I.prototype,"visibilityAppearance",void 0),e([i()],I.prototype,"_title",null),e([i()],I.prototype,"_renderedItemStatus",null),e([i()],I.prototype,"_renderedItemTemporaryIcon",null),e([i()],I.prototype,"_renderedItemToggle",null),e([i()],I.prototype,"_renderedPanel",null),e([i()],I.prototype,"_renderedPanelAction",null),e([i()],I.prototype,"_renderedActions",null),e([i()],I.prototype,"_renderedActionMenu",null),e([i()],I.prototype,"_renderedActionMenuContent",null),e([i()],I.prototype,"_renderedCatalogFootprintIcon",null),e([i()],I.prototype,"_renderedCatalogDynamicIcon",null),e([i()],I.prototype,"_renderedCatalogSelectNode",null),e([i()],I.prototype,"_renderedChildList",null),e([i()],I.prototype,"_hasTables",null),e([i()],I.prototype,"_renderedTablesItem",null),e([i()],I.prototype,"_renderedItemMessage",null),e([i()],I.prototype,"_singleAction",null),e([i()],I.prototype,"_filteredSections",null),e([i()],I.prototype,"_actionsCount",null),I=_=e([n("esri.widgets.LayerList.LayerListItem")],I);const C=I;export{C as default};
2
+ import{__decorate as e}from"tslib";import{substitute as t}from"../../intl.js";import{property as i,subclass as n}from"../../core/accessorSupport/decorators.js";import{isLayerFromCatalog as o,isCatalogSublayer as s}from"../../layers/catalog/catalogUtils.js";import{getActionIcon as l,getActionStyles as a}from"../../support/actions/actionUtils.js";import r from"../Widget.js";import{getStatusIcon as c,listItemHasChildren as d,areChildrenHidden as p,canSortSublayers as m,getSingleAction as u,getItem as g,getVisibilityIcon as y}from"./support/layerListUtils.js";import{loadCalciteComponents as h}from"../support/componentsUtils.js";import{tsx as b}from"../support/widget.js";import{setFocus as v}from"../support/widgetUtils.js";var _;let I=class extends r{static{_=this}constructor(e){super(e),this.dragEnabled=!1,this.listModeDisabled=!1,this.parent=null,this.parentTitles=null,this.viewModel=null,this._onActionMenuOpen=e=>{this.item.actionsOpen=e.currentTarget.open},this._setTooltipReference=e=>{this.onTooltipReferenceChange?.(this.item.layer?.uid,e)},this._removeTooltipReference=()=>{this.onTooltipReferenceChange?.(this.item.layer?.uid,null)}}loadDependencies(){return h({"action-group":()=>import("@esri/calcite-components/dist/components/calcite-action-group"),"action-menu":()=>import("@esri/calcite-components/dist/components/calcite-action-menu"),action:()=>import("@esri/calcite-components/dist/components/calcite-action"),icon:()=>import("@esri/calcite-components/dist/components/calcite-icon"),"list-item":()=>import("@esri/calcite-components/dist/components/calcite-list-item"),list:()=>import("@esri/calcite-components/dist/components/calcite-list"),notice:()=>import("@esri/calcite-components/dist/components/calcite-notice")})}static{this.vnodeSelector="calcite-list-item"}render(){const e=this.parentTitles??[],{_title:t,item:i,activeItem:n,selectionMode:o,selectedItems:s,messages:l,parent:a,css:r,dragDisabled:c}=this,d="visibleAtCurrentTimeExtent"in i&&"layerInvisibleAtTime"in l&&!i.visibleAtCurrentTimeExtent?`${t} (${l.layerInvisibleAtTime})`:"visibleAtCurrentScale"in i&&"layerInvisibleAtScale"in l&&!i.visibleAtCurrentScale?`${t} (${l.layerInvisibleAtScale})`:t,p="parent"in i&&"catalog"===i.parent?.layer?.type,{layer:m}=i,u="visibleAtCurrentScale"in i&&!i.visibleAtCurrentScale||"visibleAtCurrentTimeExtent"in i&&!i.visibleAtCurrentTimeExtent;return b("calcite-list-item",{afterCreate:e=>this._focusSelectedDragEl(e,i),afterUpdate:e=>this._focusSelectedDragEl(e,i),class:this.classes(r.item,"itemActive"in r&&{[r.itemActive]:n===i}),"data-item":i,"data-layer-id":m?.id,dragDisabled:!i.sortable||p||c,expanded:"open"in i&&i.open,id:m?.uid,key:`list-item-${m?.uid}`,label:t,metadata:{parentTitles:e,_title:t},selected:"none"!==o&&s.includes(i),title:d,unavailable:u,value:m?.uid,onCalciteListItemSelect:e=>"visible"in i&&this._handleCalciteListItemSelect(e,i,a),onCalciteListItemToggle:e=>"open"in i&&this._handleCalciteListItemToggle(e,i)},this._renderedCatalogFootprintIcon,this._renderedCatalogDynamicIcon,this._renderedItemStatus,this._renderedItemToggle,this._renderedCatalogSelectNode,this._renderedItemTemporaryIcon,this._renderedChildList,this._renderedItemMessage,this._renderedPanel,this._renderedPanelAction,this._renderedActions)}get _title(){const{messages:e}=this;return this.item.title||("untitledTable"in e?e.untitledTable:e.untitledLayer)}get _renderedItemStatus(){const{item:e,parent:t,visibleElements:i,css:n}=this;if(!i.statusIndicators)return null;const{publishing:o}=e,s="updating"in e&&e.updating&&!t,l="connectionStatus"in e?e.connectionStatus:void 0,a=!!l;return o||s||a?b("calcite-icon",{class:this.classes(n.statusIndicator,{[n.publishing]:o},"updating"in n&&{[n.updating]:s},"connectionStatus"in n&&{[n.connectionStatus]:a},"connectionStatusConnected"in n&&{[n.connectionStatusConnected]:a&&"connected"===l}),icon:c({connectionStatus:l,publishing:o}),key:"layer-item-status",scale:"s",slot:"content-end"}):null}get _renderedItemTemporaryIcon(){const{item:e,visibleElements:t,css:i}=this,{layer:n}=e,s="temporaryLayerIndicators"in t&&t.temporaryLayerIndicators,l="temporaryTableIndicators"in t&&t.temporaryTableIndicators,a=n&&"persistenceEnabled"in n&&(o(n)||!n.persistenceEnabled);return(s||l)&&a?b("calcite-icon",{class:i.itemTemporaryIcon,icon:"temporary",key:"temporary-icon",scale:"s",slot:"content-start",title:this.messages.temporary}):null}get _renderedItemToggle(){const{_title:e,item:i,parent:n,messages:o,visibilityAppearance:s,css:l}=this;if(!("visible"in i&&"layerVisibility"in o&&"showLayer"in o&&"hideLayer"in o&&"visibleToggle"in l&&s))return null;const{visible:a}=i,r=this._getParentVisibilityMode(n);if("inherited"===r)return null;const c=y({visible:a,exclusive:"exclusive"===r,visibilityAppearance:s}),d="checkbox"===s,p=o.layerVisibility,m=t(a?o.hideLayer:o.showLayer,{layerName:e});return b("calcite-action",{class:l.visibleToggle,icon:d?c:void 0,key:"visibility-toggle",label:m,onclick:()=>this._toggleVisibility(i,n),slot:d?"actions-start":"actions-end",text:p,title:m},d?null:b("calcite-icon",{class:this.classes({[l.visibleIcon]:"exclusive"!==r&&a}),icon:c,scale:"s"}))}get _renderedPanel(){const{panel:e}=this.item;return!e?.open||e.disabled||e.flowEnabled?null:b("div",{class:this.css.itemContentBottom,key:`content-panel-${e.uid}`,slot:"content-bottom"},e.render())}get _renderedPanelAction(){const{panel:e}=this.item;if(!e?.visible)return null;const{open:t,title:i,disabled:n}=e;return b("calcite-action",{active:t,disabled:n,icon:l(e),key:`action-${e.uid}`,onclick:()=>this._togglePanel(e),slot:"actions-end",text:i??"",title:i??void 0},this._renderFallbackIcon(e))}get _renderedActions(){switch(this._actionsCount){case 0:return null;case 1:return this._singleAction;default:return this._renderedActionMenu}}get _renderedActionMenu(){const{item:e,messagesCommon:t}=this,i=t.options;return b("calcite-action-menu",{appearance:"transparent",key:"item-action-menu",label:t.menu,open:e.actionsOpen,overlayPositioning:"fixed",placement:"bottom-end",slot:"actions-end",onCalciteActionMenuOpen:this._onActionMenuOpen},b("calcite-action",{icon:"ellipsis",slot:"trigger",text:i,title:i}),this._renderedActionMenuContent)}get _renderedActionMenuContent(){return this._filteredSections.toArray().map(e=>b("calcite-action-group",{key:`action-section-${e.uid}`},e.toArray().map(e=>this._renderAction({action:e,textEnabled:!0}))))}get _renderedCatalogFootprintIcon(){const{css:e}=this,t=this.item.layer,i="catalog-footprint"===t?.type,n="sublayer"===t?.type&&s(t,"footprints");return"itemCatalogIcon"in e&&(i||n)?b("calcite-icon",{class:e.itemCatalogIcon,icon:"footprint",key:"footprint",scale:"s",slot:"content-start"}):null}get _renderedCatalogDynamicIcon(){const{css:e}=this,t=this.item.layer,i="catalog-dynamic-group"===t?.type,n="sublayer"===t?.type&&s(t,"layers-in-view");return"itemCatalogIcon"in e&&(i||n)?b("calcite-icon",{class:e.itemCatalogIcon,icon:"catalog-dataset",key:"catalog-dataset",scale:"s",slot:"content-start"}):null}get _renderedCatalogSelectNode(){const{_title:e,item:t,visibleElements:i}=this;if(!("visible"in t))return;const{layer:n}=t,o="catalog-dynamic-group"===n?.type;return"catalogLayerList"in i&&i.catalogLayerList&&o?b("calcite-action",{disabled:!n.visible,icon:"chevron-right",iconFlipRtl:!0,onclick:()=>this._triggerOnCatalogOpen(t),slot:"actions-end",text:e}):null}get _renderedChildList(){const{dragEnabled:e,item:t,rootGroupUid:i,listModeDisabled:n,selectionMode:o,displayMode:s}=this;if(!("children"in t))return;const l=[...this.parentTitles??[],t.title],{children:a,layer:r}=t,c="catalog-dynamic-group"!==r?.type&&d(t),u=!n&&p(r),g="group"===r?.type,y=!u&&!c&&e&&g,h=!!e&&("childrenSortable"in t&&t.childrenSortable&&m(t));return c||y?b("calcite-list",{canPull:e=>!!this.canMove&&this.canMove(e,"pull"),canPut:e=>!!this.canMove&&this.canMove(e,"put"),"data-item":t,"data-layer-type":i,displayMode:s,dragEnabled:h,group:g?i:`${i}-${r?.uid}`,key:`child-list-${r?.uid}`,label:t.title,selectionAppearance:"border",selectionMode:o},a?.filter(e=>!e.hidden&&(this.visibleElements.errors||!e.error)).toArray().map(e=>this._renderItem(e,t,l)),this._renderedTablesItem):null}get _hasTables(){const{layerTablesEnabled:e}=this,t=this.item.layer;if(!e||!t)return!1;switch(t.type){case"knowledge-graph":return e.includes(t.type)&&"tables"in t&&!!t.tables?.length;case"map-image":case"tile":return e.includes(t.type)&&"subtables"in t&&!!t.subtables?.length;default:return!1}}get _renderedTablesItem(){const{item:e,messages:t,css:i}=this,{layer:n}=e;return"itemTableIcon"in i&&"visible"in e&&"tables"in t&&this._hasTables?b("calcite-list-item",{class:i.item,"data-layer-id":n?.id,dragDisabled:!0,key:`list-item-table-list-tables-${n?.uid}`,label:t.tables,title:t.tables,onCalciteListItemSelect:()=>this._triggerOnTablesOpen(e)},b("calcite-icon",{class:i.itemTableIcon,icon:"table",scale:"s",slot:"content-start"}),b("calcite-icon",{flipRtl:!0,icon:"chevron-right",scale:"s",slot:"content-end"})):null}get _renderedItemMessage(){const{item:e,messages:t,css:i}=this;return e.error?b("div",{class:i.itemMessage,key:"esri-layer-list__error",slot:"content-bottom"},b("calcite-notice",{icon:"exclamation-mark-triangle",kind:"warning",open:!0,scale:"s",width:"full"},b("div",{slot:"message"},"tableError"in t?t.tableError:t.layerError))):"incompatible"in e&&e.incompatible&&"layerIncompatible"in t?b("div",{class:i.itemMessage,key:"esri-layer-list__incompatible",slot:"content-bottom"},b("calcite-notice",{afterCreate:this._setTooltipReference,afterRemoved:this._removeTooltipReference,bind:this,icon:"exclamation-mark-triangle",kind:"warning",open:!0,scale:"s",tabIndex:0,width:"full"},b("div",{slot:"message"},t.layerIncompatible))):null}get _singleAction(){return this._renderAction({action:u(this._filteredSections),textEnabled:!1})}get _filteredSections(){return this.item.actionsSections.map(e=>e.filter(e=>e.visible))}get _actionsCount(){return this.item.actionsSections.reduce((e,t)=>e+t.length,0)}_renderAction(e){const{item:t}=this,{action:i,textEnabled:n}=e;if(!i)return null;const{active:o,disabled:s,title:a,type:r,indicator:c}=i;return b("calcite-action",{active:"toggle"===r&&i.value,"data-action-id":i.id,disabled:s,icon:l(i),indicator:c,key:`action-${i.uid}`,loading:o,onclick:()=>this._triggerAction(t,i),slot:n?void 0:"actions-end",text:a??"",textEnabled:n,title:a??void 0},this._renderFallbackIcon(i))}_renderFallbackIcon(e){const{css:t}=this,{icon:i}=e,n="className"in e?e.className:void 0;if(i)return null;const o="image"in e?e.image:void 0,s={[t.itemActionIcon]:!!n,[t.itemActionImage]:!!o};return n&&(s[n]=!0),o||n?b("span",{"aria-hidden":"true",class:this.classes(t.itemActionIcon,s),key:"icon",styles:a(o)}):null}_renderItem(e,t,i=[]){return b(_,{activeItem:this.activeItem,canMove:this.canMove,css:this.css,displayMode:this.displayMode,dragEnabled:this.dragEnabled,item:e,key:`layerListItem-${e.layer?.uid}`,layerTablesEnabled:this.layerTablesEnabled,listModeDisabled:this.listModeDisabled,messages:this.messages,messagesCommon:this.messagesCommon,parent:t,parentTitles:i,rootGroupUid:this.rootGroupUid,selectedDragItemLayerUid:this.selectedDragItemLayerUid,selectedItems:this.selectedItems,selectionMode:this.selectionMode,visibilityAppearance:this.visibilityAppearance,visibleElements:this.visibleElements,onAction:this.onAction,onCatalogOpen:this.onCatalogOpen,onPanelOpen:this.onPanelOpen,onSelectedDragItemLayerUidChange:this.onSelectedDragItemLayerUidChange,onTablesOpen:this.onTablesOpen,onTooltipReferenceChange:this.onTooltipReferenceChange})}_triggerAction(e,t){t&&e&&("toggle"===t.type&&(t.value=!t.value),this.onAction(t,e))}_triggerOnTablesOpen(e){e&&this.onTablesOpen&&this.onTablesOpen(e)}_triggerOnCatalogOpen(e){e&&this.onCatalogOpen?.(e)}_focusSelectedDragEl(e,t){this.selectedDragItemLayerUid===t.layer?.uid&&(v(e),this.onSelectedDragItemLayerUidChange?.(null))}_handleCalciteListItemToggle(e,t){e.stopPropagation(),t.open=e.target.expanded}_getParentVisibilityMode(e){return e&&"visibilityMode"in e?e.visibilityMode:null}_handleCalciteListItemSelect(e,t,i){if(g(e.target)!==t)return;const n=this._getParentVisibilityMode(i);"none"===this.selectionMode&&"inherited"!==n&&this._toggleVisibility(t,i)}_togglePanel(e){e.open=!e.open,e.open&&this.onPanelOpen()}_toggleVisibility(e,t){if(!e||!("visible"in e))return;"exclusive"===this._getParentVisibilityMode(t)&&e.visible||(e.visible=!e.visible)}};e([i()],I.prototype,"activeItem",void 0),e([i()],I.prototype,"canMove",void 0),e([i()],I.prototype,"css",void 0),e([i()],I.prototype,"displayMode",void 0),e([i()],I.prototype,"dragEnabled",void 0),e([i()],I.prototype,"dragDisabled",void 0),e([i()],I.prototype,"item",void 0),e([i()],I.prototype,"layerTablesEnabled",void 0),e([i()],I.prototype,"listModeDisabled",void 0),e([i()],I.prototype,"messages",void 0),e([i()],I.prototype,"messagesCommon",void 0),e([i()],I.prototype,"onAction",void 0),e([i()],I.prototype,"onPanelOpen",void 0),e([i()],I.prototype,"onCatalogOpen",void 0),e([i()],I.prototype,"onTablesOpen",void 0),e([i()],I.prototype,"onSelectedDragItemLayerUidChange",void 0),e([i()],I.prototype,"onTooltipReferenceChange",void 0),e([i()],I.prototype,"parent",void 0),e([i()],I.prototype,"parentTitles",void 0),e([i()],I.prototype,"rootGroupUid",void 0),e([i()],I.prototype,"selectionMode",void 0),e([i()],I.prototype,"selectedItems",void 0),e([i()],I.prototype,"selectedDragItemLayerUid",void 0),e([i()],I.prototype,"visibleElements",void 0),e([i()],I.prototype,"visibilityAppearance",void 0),e([i()],I.prototype,"_title",null),e([i()],I.prototype,"_renderedItemStatus",null),e([i()],I.prototype,"_renderedItemTemporaryIcon",null),e([i()],I.prototype,"_renderedItemToggle",null),e([i()],I.prototype,"_renderedPanel",null),e([i()],I.prototype,"_renderedPanelAction",null),e([i()],I.prototype,"_renderedActions",null),e([i()],I.prototype,"_renderedActionMenu",null),e([i()],I.prototype,"_renderedActionMenuContent",null),e([i()],I.prototype,"_renderedCatalogFootprintIcon",null),e([i()],I.prototype,"_renderedCatalogDynamicIcon",null),e([i()],I.prototype,"_renderedCatalogSelectNode",null),e([i()],I.prototype,"_renderedChildList",null),e([i()],I.prototype,"_hasTables",null),e([i()],I.prototype,"_renderedTablesItem",null),e([i()],I.prototype,"_renderedItemMessage",null),e([i()],I.prototype,"_singleAction",null),e([i()],I.prototype,"_filteredSections",null),e([i()],I.prototype,"_actionsCount",null),I=_=e([n("esri.widgets.LayerList.LayerListItem")],I);const C=I;export{C as default};