@arcgis/core 5.0.0-next.83 → 5.0.0-next.85

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 (914) hide show
  1. package/WebDocument2D.d.ts +3 -2
  2. package/WebDocument2D.js +1 -1
  3. package/WebScene.d.ts +3 -2
  4. package/WebScene.js +1 -1
  5. package/applications/Components/applySetUtils.d.ts +237 -0
  6. package/applications/Components/applySetUtils.js +5 -0
  7. package/applications/Components/editUtils.d.ts +92 -0
  8. package/applications/Components/editUtils.js +5 -0
  9. package/applications/Components/symbolUtils.d.ts +37 -0
  10. package/applications/Components/symbolUtils.js +5 -0
  11. package/applications/Components/templateUtils.d.ts +106 -0
  12. package/applications/Components/templateUtils.js +5 -0
  13. package/applications/SceneViewer/layerUtils.d.ts +3 -2
  14. package/applications/SceneViewer/layerUtils.js +1 -1
  15. package/assets/esri/core/workers/RemoteClient.js +1 -1
  16. package/assets/esri/core/workers/chunks/001fd3d30e5bb0d180c6.js +1 -0
  17. package/assets/esri/core/workers/chunks/0057d3a9522188090536.js +1 -0
  18. package/assets/esri/core/workers/chunks/008a555ce169640e2a35.js +2 -0
  19. package/assets/esri/core/workers/chunks/{f25bebd2b6eb0d0f6626.js.LICENSE.txt → 008a555ce169640e2a35.js.LICENSE.txt} +1 -1
  20. package/assets/esri/core/workers/chunks/00e135dc1b4cb024973d.js +1 -0
  21. package/assets/esri/core/workers/chunks/03da31c7635d077e8d99.js +1 -0
  22. package/assets/esri/core/workers/chunks/0402b7996940ba0f8cc8.js +2 -0
  23. package/assets/esri/core/workers/chunks/{73c416ae0ec5a1815591.js.LICENSE.txt → 0402b7996940ba0f8cc8.js.LICENSE.txt} +1 -1
  24. package/assets/esri/core/workers/chunks/04fddd41a8e6a4c1bc57.js +1 -0
  25. package/assets/esri/core/workers/chunks/055aead7135a2f8bca29.js +1 -0
  26. package/assets/esri/core/workers/chunks/05a75878baca3a04fee9.js +1 -0
  27. package/assets/esri/core/workers/chunks/05aa22778a85624cfa55.js +1 -0
  28. package/assets/esri/core/workers/chunks/06493efc57cbfbda050a.js +1 -0
  29. package/assets/esri/core/workers/chunks/0674ae3741bc99325879.js +1 -0
  30. package/assets/esri/core/workers/chunks/07c5a9e8f48b3c806ac7.js +1 -0
  31. package/assets/esri/core/workers/chunks/0889e3d1a034be031c9e.js +2 -0
  32. package/assets/esri/core/workers/chunks/{43e2c1d72cd9c8beed2f.js.LICENSE.txt → 0889e3d1a034be031c9e.js.LICENSE.txt} +1 -1
  33. package/assets/esri/core/workers/chunks/0abb084b8a137f4fcdfc.js +1 -0
  34. package/assets/esri/core/workers/chunks/0b0545538ce355cace52.js +1 -0
  35. package/assets/esri/core/workers/chunks/0c13591347d51d684561.js +1 -0
  36. package/assets/esri/core/workers/chunks/0e7daf348c3e4681dd44.js +1 -0
  37. package/assets/esri/core/workers/chunks/10a5bf887132821beaf0.js +1 -0
  38. package/assets/esri/core/workers/chunks/10b32aff749d3459ddcd.js +1 -0
  39. package/assets/esri/core/workers/chunks/114aecdbd2bd92b24de2.js +1 -0
  40. package/assets/esri/core/workers/chunks/14f8215ab716c6d9d5f8.js +1 -0
  41. package/assets/esri/core/workers/chunks/156c73a948bde11f0d53.js +1 -0
  42. package/assets/esri/core/workers/chunks/165cf8031af160c99d70.js +1 -0
  43. package/assets/esri/core/workers/chunks/1779e6eabc299831fc9f.js +1 -0
  44. package/assets/esri/core/workers/chunks/181fab86394f1f912490.js +1 -0
  45. package/assets/esri/core/workers/chunks/185c97bc63ce546995ce.js +1 -0
  46. package/assets/esri/core/workers/chunks/18cdd268fc921ffd92e2.js +1 -0
  47. package/assets/esri/core/workers/chunks/1a13b472e0cf9f88e8de.js +1 -0
  48. package/assets/esri/core/workers/chunks/1a41c9127ca5a260d5ef.js +1 -0
  49. package/assets/esri/core/workers/chunks/1a62c456e791c82050fe.js +1 -0
  50. package/assets/esri/core/workers/chunks/1c05906d1b5b92441c9b.js +1 -0
  51. package/assets/esri/core/workers/chunks/1cf289446619645487b6.js +1 -0
  52. package/assets/esri/core/workers/chunks/1e318e5cf417c8f13bc7.js +1 -0
  53. package/assets/esri/core/workers/chunks/1eb6f210ae69c317e1f6.js +1 -0
  54. package/assets/esri/core/workers/chunks/1facc1b45345a095b9a7.js +1 -0
  55. package/assets/esri/core/workers/chunks/1fe1a131be1d5e1e23ed.js +1 -0
  56. package/assets/esri/core/workers/chunks/21739c37160061f229ef.js +1 -0
  57. package/assets/esri/core/workers/chunks/22b1543b1a39db9acfc3.js +1 -0
  58. package/assets/esri/core/workers/chunks/249bc4abaa6482aaf288.js +1 -0
  59. package/assets/esri/core/workers/chunks/25a9ae17dc2ef44a4481.js +1 -0
  60. package/assets/esri/core/workers/chunks/25dead73dfc5a4c19285.js +1 -0
  61. package/assets/esri/core/workers/chunks/2767b69085c9f7a1e1af.js +1 -0
  62. package/assets/esri/core/workers/chunks/286a45e9aec0b2bf32ef.js +1 -0
  63. package/assets/esri/core/workers/chunks/289681e94e93dc1d3512.js +1 -0
  64. package/assets/esri/core/workers/chunks/2a81f08de9d642485669.js +1 -0
  65. package/assets/esri/core/workers/chunks/2b2283f1ee4bfc1baa18.js +1 -0
  66. package/assets/esri/core/workers/chunks/2bb82ae3ada57c066fdf.js +1 -0
  67. package/assets/esri/core/workers/chunks/2bdd28b4b5ef2c1e111f.js +1 -0
  68. package/assets/esri/core/workers/chunks/2c8b4d54ecf6ea2fecb1.js +1 -0
  69. package/assets/esri/core/workers/chunks/2ce845c990bb4d701362.js +1 -0
  70. package/assets/esri/core/workers/chunks/2f20cca2c5c058afc9af.js +1 -0
  71. package/assets/esri/core/workers/chunks/301fa6276f4098521106.js +1 -0
  72. package/assets/esri/core/workers/chunks/304ea784c28dc78e5e65.js +1 -0
  73. package/assets/esri/core/workers/chunks/3087910d19959fdc546b.js +1 -0
  74. package/assets/esri/core/workers/chunks/30cfa41017c2d434a89f.js +1 -0
  75. package/assets/esri/core/workers/chunks/33257fbd724ae188e259.js +1 -0
  76. package/assets/esri/core/workers/chunks/338768f94cc49559b209.js +1 -0
  77. package/assets/esri/core/workers/chunks/34073c8e4fc825f060f1.js +1 -0
  78. package/assets/esri/core/workers/chunks/34503f9b26c81e631174.js +1 -0
  79. package/assets/esri/core/workers/chunks/348560f083350ad0bf2e.js +1 -0
  80. package/assets/esri/core/workers/chunks/3606fc5537c4d11b9554.js +1 -0
  81. package/assets/esri/core/workers/chunks/3628e82707e7720c9e4c.js +1 -0
  82. package/assets/esri/core/workers/chunks/36b053decb87c9d32cd2.js +1 -0
  83. package/assets/esri/core/workers/chunks/37f5687dc1147b0a7bc1.js +1 -0
  84. package/assets/esri/core/workers/chunks/380a9b6d75992d6311c3.js +1 -0
  85. package/assets/esri/core/workers/chunks/3849dc35941e569fae5f.js +1 -0
  86. package/assets/esri/core/workers/chunks/388bd41c305d5a11f739.js +1 -0
  87. package/assets/esri/core/workers/chunks/389e2263a540f819d842.js +1 -0
  88. package/assets/esri/core/workers/chunks/38ca539f33e2d977771c.js +1 -0
  89. package/assets/esri/core/workers/chunks/39e1b04444389d2987be.js +1 -0
  90. package/assets/esri/core/workers/chunks/3ad7ec46adecf00ae1c2.js +1 -0
  91. package/assets/esri/core/workers/chunks/3aeb3e8220e7d9869652.js +1 -0
  92. package/assets/esri/core/workers/chunks/3afc221b3a9e209cceea.js +1 -0
  93. package/assets/esri/core/workers/chunks/3b67aa46a60e35469bf8.js +1 -0
  94. package/assets/esri/core/workers/chunks/3b6fc34b6d92eef030e5.js +1 -0
  95. package/assets/esri/core/workers/chunks/3bb28b59614fc36b2c50.js +1 -0
  96. package/assets/esri/core/workers/chunks/3eeaec74871e20b433d2.js +1 -0
  97. package/assets/esri/core/workers/chunks/418a778a4cbbb9dabecd.js +1 -0
  98. package/assets/esri/core/workers/chunks/42444285fd79a8d8e564.js +1 -0
  99. package/assets/esri/core/workers/chunks/428ca5900d882d7be499.js +1 -0
  100. package/assets/esri/core/workers/chunks/436c15ac34a205a13a37.js +1 -0
  101. package/assets/esri/core/workers/chunks/43e9eaedf65921b58eb2.js +1 -0
  102. package/assets/esri/core/workers/chunks/4487cf21fa9f0466450d.js +1 -0
  103. package/assets/esri/core/workers/chunks/45dbdf2ff95f7be1eb88.js +1 -0
  104. package/assets/esri/core/workers/chunks/4756f0dbbda129c760b1.js +1 -0
  105. package/assets/esri/core/workers/chunks/4a0760571ce536fbd8c8.js +1 -0
  106. package/assets/esri/core/workers/chunks/4b09d92c51c4619b548a.js +1 -0
  107. package/assets/esri/core/workers/chunks/4b24f72b56edc28bb15e.js +1 -0
  108. package/assets/esri/core/workers/chunks/4bb0c3b009493ea44632.js +1 -0
  109. package/assets/esri/core/workers/chunks/{f25bebd2b6eb0d0f6626.js → 4c07b2d1a14906371fc5.js} +2 -2
  110. package/assets/esri/core/workers/chunks/{6be530ab81291745485b.js.LICENSE.txt → 4c07b2d1a14906371fc5.js.LICENSE.txt} +1 -1
  111. package/assets/esri/core/workers/chunks/4c0e0beb1534d81ff648.js +1 -0
  112. package/assets/esri/core/workers/chunks/4c54cb80c4dc9bbbd395.js +1 -0
  113. package/assets/esri/core/workers/chunks/4caec60ac0a5851730c6.js +1 -0
  114. package/assets/esri/core/workers/chunks/4db259316b193fcc4541.js +1 -0
  115. package/assets/esri/core/workers/chunks/4f132d758f8b4795c43f.js +1 -0
  116. package/assets/esri/core/workers/chunks/4f4bdf9f5323fa702e6c.js +1 -0
  117. package/assets/esri/core/workers/chunks/4f53071b5eb23d4478c4.js +1 -0
  118. package/assets/esri/core/workers/chunks/4f8895eb57ec6ab4b318.js +1 -0
  119. package/assets/esri/core/workers/chunks/4ff3c03cfbec928c0720.js +1 -0
  120. package/assets/esri/core/workers/chunks/504ab6bf7bfbfd4c4211.js +1 -0
  121. package/assets/esri/core/workers/chunks/5119e3159617b8e1ea13.js +1 -0
  122. package/assets/esri/core/workers/chunks/52684c2abc9e8ce793cf.js +1 -0
  123. package/assets/esri/core/workers/chunks/5298f99c197c8607a690.js +1 -0
  124. package/assets/esri/core/workers/chunks/52ae2073604deef63ea2.js +1 -0
  125. package/assets/esri/core/workers/chunks/532935f420ed5f13c011.js +1 -0
  126. package/assets/esri/core/workers/chunks/5348e4dc55428de9bba7.js +1 -0
  127. package/assets/esri/core/workers/chunks/53a1c6e008287d1f12f0.js +1 -0
  128. package/assets/esri/core/workers/chunks/53d0b870c080236d82d1.js +1 -0
  129. package/assets/esri/core/workers/chunks/5543de9a0435c319f4f9.js +301 -0
  130. package/assets/esri/core/workers/chunks/55bf39611ae6028131a3.js +1 -0
  131. package/assets/esri/core/workers/chunks/5659e221e8805bb81210.js +1 -0
  132. package/assets/esri/core/workers/chunks/568fc92333a9ab1c06e6.js +1 -0
  133. package/assets/esri/core/workers/chunks/56bbd86b804cb2a59031.js +1 -0
  134. package/assets/esri/core/workers/chunks/57a749804da9a2b1fae9.js +1 -0
  135. package/assets/esri/core/workers/chunks/59d3f3fbae775fd7686e.js +1 -0
  136. package/assets/esri/core/workers/chunks/59e7a0215791b2b51180.js +1 -0
  137. package/assets/esri/core/workers/chunks/5a706eecd8a988fae6b7.js +1 -0
  138. package/assets/esri/core/workers/chunks/5b278b9980752ef495a2.js +1 -0
  139. package/assets/esri/core/workers/chunks/5b3bb636e3bec625e515.js +1 -0
  140. package/assets/esri/core/workers/chunks/5ba2bbbb42ef1920579d.js +1 -0
  141. package/assets/esri/core/workers/chunks/5cc731f161012b63c77a.js +1 -0
  142. package/assets/esri/core/workers/chunks/5eee48b02e1683f022df.js +2 -0
  143. package/assets/esri/core/workers/chunks/{0b7bbdc0d71ee6721751.js.LICENSE.txt → 5eee48b02e1683f022df.js.LICENSE.txt} +1 -1
  144. package/assets/esri/core/workers/chunks/5fa8fe6353dbdda0b06a.js +1 -0
  145. package/assets/esri/core/workers/chunks/5fc6cada83bf8462d54c.js +1 -0
  146. package/assets/esri/core/workers/chunks/6107b58457a70c8de9da.js +1 -0
  147. package/assets/esri/core/workers/chunks/63e930e76a181d54786d.js +1 -0
  148. package/assets/esri/core/workers/chunks/63ee7aa1b169dbec1e37.js +1 -0
  149. package/assets/esri/core/workers/chunks/6440d78ed2af2e7265aa.js +1 -0
  150. package/assets/esri/core/workers/chunks/645e086291b04bc036d7.js +1 -0
  151. package/assets/esri/core/workers/chunks/654eef3ad30f34c42e12.js +1 -0
  152. package/assets/esri/core/workers/chunks/681d9a923c0d1ace86e8.js +1 -0
  153. package/assets/esri/core/workers/chunks/68abe4e70ea48e978642.js +1 -0
  154. package/assets/esri/core/workers/chunks/6a083fde0e207625fd0b.js +1 -0
  155. package/assets/esri/core/workers/chunks/6bc7bacf01328ef10ff1.js +1 -0
  156. package/assets/esri/core/workers/chunks/6bcf5d6792e4f09cbc7b.js +1 -0
  157. package/assets/esri/core/workers/chunks/6d7eb784988ee9a33473.js +1 -0
  158. package/assets/esri/core/workers/chunks/6de843d1809cba61ded3.js +1 -0
  159. package/assets/esri/core/workers/chunks/6e04303500a9fbc3f14a.js +1 -0
  160. package/assets/esri/core/workers/chunks/6edcae8ec128c2e86a05.js +1 -0
  161. package/assets/esri/core/workers/chunks/6eeee6e278b5f516d1d2.js +1 -0
  162. package/assets/esri/core/workers/chunks/701775be0dad640a72b4.js +1 -0
  163. package/assets/esri/core/workers/chunks/70df4331ed29d823bf38.js +1 -0
  164. package/assets/esri/core/workers/chunks/7130b09300032d3a5925.js +1 -0
  165. package/assets/esri/core/workers/chunks/72f0e2e5dcddafa2a642.js +1 -0
  166. package/assets/esri/core/workers/chunks/73c87eb9bd8f0f848481.js +1 -0
  167. package/assets/esri/core/workers/chunks/746190bb70aa78ba0bfc.js +1039 -0
  168. package/assets/esri/core/workers/chunks/75d7290c73bb59f2c856.js +1 -0
  169. package/assets/esri/core/workers/chunks/780a1eba9a7f1ca690ce.js +1 -0
  170. package/assets/esri/core/workers/chunks/7815dbf49ef5a06705f3.js +1 -0
  171. package/assets/esri/core/workers/chunks/7892daeed58778453639.js +1 -0
  172. package/assets/esri/core/workers/chunks/7990c828447bc3a29965.js +1 -0
  173. package/assets/esri/core/workers/chunks/799829d0ae17c146196b.js +1 -0
  174. package/assets/esri/core/workers/chunks/7a1ec6ac88d974cc5074.js +1 -0
  175. package/assets/esri/core/workers/chunks/7a31717dafbd820bc2bf.js +1 -0
  176. package/assets/esri/core/workers/chunks/7d76a2245ac973efe1ed.js +1 -0
  177. package/assets/esri/core/workers/chunks/7f76566d9b3801742387.js +1 -0
  178. package/assets/esri/core/workers/chunks/7f7c4ffbdf7b20dc7a54.js +1 -0
  179. package/assets/esri/core/workers/chunks/8008bca4ef04c9424579.js +1 -0
  180. package/assets/esri/core/workers/chunks/815a25a5a8dba7921f8b.js +1 -0
  181. package/assets/esri/core/workers/chunks/8184c34b2c4969f14f3d.js +1 -0
  182. package/assets/esri/core/workers/chunks/81e395a93c67749c6487.js +1 -0
  183. package/assets/esri/core/workers/chunks/8351012ceb466f01b8fd.js +1 -0
  184. package/assets/esri/core/workers/chunks/83ddc0f6bfe68756f26f.js +1 -0
  185. package/assets/esri/core/workers/chunks/841058de8bc6e328fd68.js +1 -0
  186. package/assets/esri/core/workers/chunks/84a4390b1c277c415d44.js +1 -0
  187. package/assets/esri/core/workers/chunks/854adab6a06af861c104.js +1 -0
  188. package/assets/esri/core/workers/chunks/8765fe036d9664c25b1d.js +37 -0
  189. package/assets/esri/core/workers/chunks/88c3b60b403e2454b56e.js +1 -0
  190. package/assets/esri/core/workers/chunks/8a0a13f398ab488dbbe9.js +1 -0
  191. package/assets/esri/core/workers/chunks/8b1fa59d436e2815b2f1.js +2 -0
  192. package/assets/esri/core/workers/chunks/{25f3ee666f545a7a7993.js.LICENSE.txt → 8b1fa59d436e2815b2f1.js.LICENSE.txt} +1 -1
  193. package/assets/esri/core/workers/chunks/8cb13b3776f07536c79f.js +1 -0
  194. package/assets/esri/core/workers/chunks/{51093e552e31344cefa5.js → 8d9ec752136cbc5cb29a.js} +1 -1
  195. package/assets/esri/core/workers/chunks/8deae3a426eceae73186.js +1 -0
  196. package/assets/esri/core/workers/chunks/8f4ca0dfd9635eb10e02.js +1 -0
  197. package/assets/esri/core/workers/chunks/8faa0122d0a6e2e39153.js +1 -0
  198. package/assets/esri/core/workers/chunks/913c417ad278ce1caaf9.js +1 -0
  199. package/assets/esri/core/workers/chunks/9184089e72c24d91d23b.js +1 -0
  200. package/assets/esri/core/workers/chunks/91e307ca0d11804a7a1d.js +2 -0
  201. package/assets/esri/core/workers/chunks/9264cce4699284eae97c.js +2 -0
  202. package/assets/esri/core/workers/chunks/{37002a46f03a9fc5f644.js.LICENSE.txt → 9264cce4699284eae97c.js.LICENSE.txt} +1 -1
  203. package/assets/esri/core/workers/chunks/9279a5361bf6a54784ef.js +1 -0
  204. package/assets/esri/core/workers/chunks/92a42bbb8b9b39f3211c.js +1 -0
  205. package/assets/esri/core/workers/chunks/934ce3f004c54d542d2c.js +1 -0
  206. package/assets/esri/core/workers/chunks/93caf6fb8afab3dd8a46.js +1 -0
  207. package/assets/esri/core/workers/chunks/95e93884b39ca4b312d1.js +2 -0
  208. package/assets/esri/core/workers/chunks/{5b9f2aa3ba1bf12c3240.js.LICENSE.txt → 95e93884b39ca4b312d1.js.LICENSE.txt} +1 -1
  209. package/assets/esri/core/workers/chunks/97148a9966f55e69421e.js +1 -0
  210. package/assets/esri/core/workers/chunks/9748b8c35d56a5ee9c64.js +1 -0
  211. package/assets/esri/core/workers/chunks/97ad3eb25ad003c16148.js +1 -0
  212. package/assets/esri/core/workers/chunks/982e709d2cef971ecd82.js +1 -0
  213. package/assets/esri/core/workers/chunks/98e04c2382fa5ba382fc.js +1 -0
  214. package/assets/esri/core/workers/chunks/9919b3c345785e910c38.js +1 -0
  215. package/assets/esri/core/workers/chunks/9c6d34bb666f630d511f.js +1 -0
  216. package/assets/esri/core/workers/chunks/9cd7205bbc711914d74b.js +1 -0
  217. package/assets/esri/core/workers/chunks/9d17524f5f935b7b60bf.js +1 -0
  218. package/assets/esri/core/workers/chunks/9de8149ae0a0726a4ab2.js +1 -0
  219. package/assets/esri/core/workers/chunks/9fac9eda0a41f7f4c2c6.js +1 -0
  220. package/assets/esri/core/workers/chunks/9ff1e650ce0912afa780.js +1 -0
  221. package/assets/esri/core/workers/chunks/a09099697955eb44bfac.js +1 -0
  222. package/assets/esri/core/workers/chunks/a0d52a819302ed6f401e.js +1 -0
  223. package/assets/esri/core/workers/chunks/a1908b3fa61f02425a94.js +1 -0
  224. package/assets/esri/core/workers/chunks/a2046f85b9964693f053.js +1 -0
  225. package/assets/esri/core/workers/chunks/a24627400b3b9fe8431d.js +1 -0
  226. package/assets/esri/core/workers/chunks/a27c74fd2029583de933.js +1 -0
  227. package/assets/esri/core/workers/chunks/a2c0c1bb5e775abefc90.js +1 -0
  228. package/assets/esri/core/workers/chunks/a3184fb1ac7ce9af1a7e.js +1 -0
  229. package/assets/esri/core/workers/chunks/a4ee92867ad5cde25aed.js +1 -0
  230. package/assets/esri/core/workers/chunks/a56a5e00964d4cd59a66.js +1 -0
  231. package/assets/esri/core/workers/chunks/a774b4fc7df801503bea.js +1 -0
  232. package/assets/esri/core/workers/chunks/a9521578c0e21aaddbc7.js +1 -0
  233. package/assets/esri/core/workers/chunks/a9b30c3b604e314f1706.js +1 -0
  234. package/assets/esri/core/workers/chunks/aa0c648bd37787f62b1f.js +1 -0
  235. package/assets/esri/core/workers/chunks/aa1b8c06bdf8453a02d7.js +1 -0
  236. package/assets/esri/core/workers/chunks/aaac4eee709cd6d24910.js +1 -0
  237. package/assets/esri/core/workers/chunks/aafa33f661462f5afd2b.js +1 -0
  238. package/assets/esri/core/workers/chunks/ab3e457c82fa9bd0203f.js +1 -0
  239. package/assets/esri/core/workers/chunks/ac0949ea3d2cf3eb7383.js +1 -0
  240. package/assets/esri/core/workers/chunks/ac5da65af5da254acb16.js +1 -0
  241. package/assets/esri/core/workers/chunks/adecd31fd64d6753682d.js +1 -0
  242. package/assets/esri/core/workers/chunks/ae5798399607cb043ed2.js +1 -0
  243. package/assets/esri/core/workers/chunks/af3d4eba6fe24db3ceba.js +1 -0
  244. package/assets/esri/core/workers/chunks/b1015e1f25b60c08d2cf.js +1 -0
  245. package/assets/esri/core/workers/chunks/b1085fa91724e2d3b24f.js +1 -0
  246. package/assets/esri/core/workers/chunks/b12dc8fd3f2a2ff8073d.js +1 -0
  247. package/assets/esri/core/workers/chunks/b190a776de4859ac00f8.js +1 -0
  248. package/assets/esri/core/workers/chunks/b1c6a1759febad66927f.js +1 -0
  249. package/assets/esri/core/workers/chunks/b482a24c9567d8926897.js +1 -0
  250. package/assets/esri/core/workers/chunks/b48b0f512a1cd7226bdc.js +1 -0
  251. package/assets/esri/core/workers/chunks/b586d7e608e8ba8b88fe.js +1 -0
  252. package/assets/esri/core/workers/chunks/b599c6d4fa3189ed1762.js +1 -0
  253. package/assets/esri/core/workers/chunks/b6acf67316107902e31d.js +1 -0
  254. package/assets/esri/core/workers/chunks/b7576a5195615c465ea7.js +1 -0
  255. package/assets/esri/core/workers/chunks/b7e40118b4d645e9f8e1.js +1 -0
  256. package/assets/esri/core/workers/chunks/b8005b1996f42dee8237.js +1 -0
  257. package/assets/esri/core/workers/chunks/b91a157fb5f729de6597.js +1 -0
  258. package/assets/esri/core/workers/chunks/b9226dd0342cfd30ece0.js +1 -0
  259. package/assets/esri/core/workers/chunks/b977b9f5f50ae8027443.js +1 -0
  260. package/assets/esri/core/workers/chunks/bab6dee8f4715d05d984.js +1 -0
  261. package/assets/esri/core/workers/chunks/bbb409e54db77bfabdee.js +1 -0
  262. package/assets/esri/core/workers/chunks/bc4f513ea3a8f344c8da.js +1 -0
  263. package/assets/esri/core/workers/chunks/be26f8175a76e7dc8f7a.js +1 -0
  264. package/assets/esri/core/workers/chunks/befedcb6d8d1ff88125f.js +1 -0
  265. package/assets/esri/core/workers/chunks/bf73352b3366de82abbe.js +1 -0
  266. package/assets/esri/core/workers/chunks/c0265669fb616f052b65.js +1 -0
  267. package/assets/esri/core/workers/chunks/c133e57f2201b9bc6cbc.js +1 -0
  268. package/assets/esri/core/workers/chunks/c18a2948ae3cb527d8bb.js +1 -0
  269. package/assets/esri/core/workers/chunks/c2d7b32f0c8eb965fcf7.js +1 -0
  270. package/assets/esri/core/workers/chunks/c45a5bcf26659daf02a1.js +1 -0
  271. package/assets/esri/core/workers/chunks/c46a4681cbba638b58c1.js +1 -0
  272. package/assets/esri/core/workers/chunks/c477b0ce55211339c4cb.js +1 -0
  273. package/assets/esri/core/workers/chunks/c500b59cd7da54fe72ec.js +1 -0
  274. package/assets/esri/core/workers/chunks/c5c1b189b91e199e8b82.js +1 -0
  275. package/assets/esri/core/workers/chunks/c65a138c14a4c540cd3b.js +1 -0
  276. package/assets/esri/core/workers/chunks/c66a9477e1c30a5ca03f.js +1 -0
  277. package/assets/esri/core/workers/chunks/{d79d29b52a65fb6bf94d.js → c71fe727224da0aba6ca.js} +1 -1
  278. package/assets/esri/core/workers/chunks/c741f7bc5693ae7e5019.js +1 -0
  279. package/assets/esri/core/workers/chunks/c75a41a5c8c5bd40ae91.js +1 -0
  280. package/assets/esri/core/workers/chunks/c791e8ebf3ee0805c479.js +1 -0
  281. package/assets/esri/core/workers/chunks/c825ca22894bdb4d01ba.js +1 -0
  282. package/assets/esri/core/workers/chunks/c8f1075c45ecf9fef00f.js +1 -0
  283. package/assets/esri/core/workers/chunks/ca06811e636f1d96f3cb.js +1 -0
  284. package/assets/esri/core/workers/chunks/cb66a74448a6c0c20d5d.js +1 -0
  285. package/assets/esri/core/workers/chunks/cbab45550b06bcc38524.js +1 -0
  286. package/assets/esri/core/workers/chunks/cc2606b8e600eeaf4bc8.js +1 -0
  287. package/assets/esri/core/workers/chunks/cdf711afbaaf345101f0.js +1 -0
  288. package/assets/esri/core/workers/chunks/ce87a6e24e9c64d90da3.js +1 -0
  289. package/assets/esri/core/workers/chunks/ce9467dc1ff695d795e5.js +1 -0
  290. package/assets/esri/core/workers/chunks/d0c831a473642d1bd9d1.js +1 -0
  291. package/assets/esri/core/workers/chunks/d0d6f818851d9a2d7938.js +1 -0
  292. package/assets/esri/core/workers/chunks/d1dd1787b3bf27834a9e.js +1 -0
  293. package/assets/esri/core/workers/chunks/d28169816c768d55aa09.js +1 -0
  294. package/assets/esri/core/workers/chunks/d2d4bce67c711a404b73.js +1 -0
  295. package/assets/esri/core/workers/chunks/d31f62ecbb54bffc54f2.js +1 -0
  296. package/assets/esri/core/workers/chunks/d37f03714c9591fb2b06.js +1 -0
  297. package/assets/esri/core/workers/chunks/d3c69c9cb3d9c3f5c67a.js +1 -0
  298. package/assets/esri/core/workers/chunks/d436e1694f4b5bf05a90.js +1 -0
  299. package/assets/esri/core/workers/chunks/d4770dddfbfdc3845749.js +1 -0
  300. package/assets/esri/core/workers/chunks/d477def8bfd8482596d1.js +1 -0
  301. package/assets/esri/core/workers/chunks/d4c4dad52da5dcf4432c.js +1 -0
  302. package/assets/esri/core/workers/chunks/d4f4c0201d8b641709c0.js +1 -0
  303. package/assets/esri/core/workers/chunks/d525b3fa719a688d4899.js +1 -0
  304. package/assets/esri/core/workers/chunks/d6e11f05db698d14f21d.js +1 -0
  305. package/assets/esri/core/workers/chunks/d7c275717a2405b6ff87.js +1 -0
  306. package/assets/esri/core/workers/chunks/d9d2178d436597b1afaf.js +1 -0
  307. package/assets/esri/core/workers/chunks/da808dfb22c6de29e560.js +1 -0
  308. package/assets/esri/core/workers/chunks/db9a9712038df76e3eda.js +1 -0
  309. package/assets/esri/core/workers/chunks/dd0e65b18c634b64582e.js +1 -0
  310. package/assets/esri/core/workers/chunks/dd30c1f5da0af72becd1.js +1 -0
  311. package/assets/esri/core/workers/chunks/de216922b36267ab4aa1.js +1 -0
  312. package/assets/esri/core/workers/chunks/de6b3f80070abdd61d0f.js +1 -0
  313. package/assets/esri/core/workers/chunks/dea2e8caaf6e53ec56f8.js +1 -0
  314. package/assets/esri/core/workers/chunks/ded589862c22ea12d47a.js +1 -0
  315. package/assets/esri/core/workers/chunks/dedd9d47ccc019ffc484.js +1 -0
  316. package/assets/esri/core/workers/chunks/dfef6e3d7bbf099de498.js +1 -0
  317. package/assets/esri/core/workers/chunks/e1b677a135e164a29605.js +1 -0
  318. package/assets/esri/core/workers/chunks/e201bfe3158c025edc99.js +1 -0
  319. package/assets/esri/core/workers/chunks/e337b8d69d89f597cb58.js +1 -0
  320. package/assets/esri/core/workers/chunks/e370d213c307ad8bfaec.js +1 -0
  321. package/assets/esri/core/workers/chunks/e3a73d9acebccd3ba49b.js +1 -0
  322. package/assets/esri/core/workers/chunks/e43c6058c793d43fa5f3.js +1 -0
  323. package/assets/esri/core/workers/chunks/e462b167841fddaa80b8.js +1 -0
  324. package/assets/esri/core/workers/chunks/e51e35b5cef89b0e0db1.js +1 -0
  325. package/assets/esri/core/workers/chunks/e58ec49a5cd852cb46cb.js +1 -0
  326. package/assets/esri/core/workers/chunks/e7d28ebf684db4ecb8cb.js +1 -0
  327. package/assets/esri/core/workers/chunks/e8f6305744f87bbed961.js +1 -0
  328. package/assets/esri/core/workers/chunks/e9f8115c049f168d3c2b.js +1 -0
  329. package/assets/esri/core/workers/chunks/ea32a8478f3ccb19aced.js +1 -0
  330. package/assets/esri/core/workers/chunks/ea734de7d5271c487171.js +1 -0
  331. package/assets/esri/core/workers/chunks/eb765db525f4e2e2bda2.js +1 -0
  332. package/assets/esri/core/workers/chunks/ebbcd6196ef5c5ab233d.js +1 -0
  333. package/assets/esri/core/workers/chunks/ec00fa313794f177d9d3.js +1 -0
  334. package/assets/esri/core/workers/chunks/ec03d59984782529031a.js +1 -0
  335. package/assets/esri/core/workers/chunks/ec7f4e459c7466805f72.js +1 -0
  336. package/assets/esri/core/workers/chunks/ecf7d34b37ce6f0877af.js +1 -0
  337. package/assets/esri/core/workers/chunks/ed1c92a24a167e57e36e.js +1 -0
  338. package/assets/esri/core/workers/chunks/ed69b19366e3ce5805ac.js +1 -0
  339. package/assets/esri/core/workers/chunks/ee25d1eae52c8be82898.js +1 -0
  340. package/assets/esri/core/workers/chunks/ee905e24320241959965.js +1 -0
  341. package/assets/esri/core/workers/chunks/eea91681bae00819a5e9.js +1 -0
  342. package/assets/esri/core/workers/chunks/eed24607e9b5312b417f.js +1 -0
  343. package/assets/esri/core/workers/chunks/f0eb2bfe5a8607b251f5.js +1 -0
  344. package/assets/esri/core/workers/chunks/f370e60dc81d41368e0c.js +1 -0
  345. package/assets/esri/core/workers/chunks/f3fdf9970b3c7acd071d.js +1 -0
  346. package/assets/esri/core/workers/chunks/f40e413c68d99cf54d42.js +1 -0
  347. package/assets/esri/core/workers/chunks/f5b32bc3f7ee911e3c59.js +1 -0
  348. package/assets/esri/core/workers/chunks/f5dbffd5e8b3c16336a1.js +1 -0
  349. package/assets/esri/core/workers/chunks/f5ed6953a9255f0bed6a.js +2 -0
  350. package/assets/esri/core/workers/chunks/{9ccabf8142fb5de4d3e2.js.LICENSE.txt → f5ed6953a9255f0bed6a.js.LICENSE.txt} +1 -1
  351. package/assets/esri/core/workers/chunks/f627017adc9469144507.js +1 -0
  352. package/assets/esri/core/workers/chunks/f7ad285944e0e5164384.js +1 -0
  353. package/assets/esri/core/workers/chunks/f872d34d4236f8bedbd9.js +1 -0
  354. package/assets/esri/core/workers/chunks/f88adc930506ac2d5c90.js +1 -0
  355. package/assets/esri/core/workers/chunks/f890cfa4932955ecd4e7.js +1 -0
  356. package/assets/esri/core/workers/chunks/fd4bd04f85458cad849c.js +1 -0
  357. package/assets/esri/core/workers/chunks/fe98a068536e904ce257.js +1 -0
  358. package/assets/esri/core/workers/chunks/ffa9cc09e82f2e515993.js +1 -0
  359. package/assets/esri/libs/lyr3d/lyr3DMain.wasm +0 -0
  360. package/assets/esri/themes/base/widgets/_Compass.scss +1 -1
  361. package/assets/esri/themes/base/widgets/_Feature.scss +1 -1
  362. package/assets/esri/themes/base/widgets/_Features.scss +1 -1
  363. package/assets/esri/themes/base/widgets/_OrientedImageryViewer.scss +4 -4
  364. package/assets/esri/themes/base/widgets/_Widget.scss +1 -1
  365. package/assets/esri/themes/dark/main.css +1 -1
  366. package/assets/esri/themes/light/main.css +1 -1
  367. package/assets/esri/themes/light/view.css +1 -1
  368. package/chunks/HUDMaterial.glsl.js +1 -1
  369. package/config.js +1 -1
  370. package/copyright.txt +2 -2
  371. package/core/MultiOriginJSONSupport.d.ts +8 -0
  372. package/core/MultiOriginJSONSupport.js +1 -1
  373. package/core/ReadOnlyMultiOriginJSONSupport.d.ts +40 -0
  374. package/core/ReadOnlyMultiOriginJSONSupport.js +1 -1
  375. package/core/WriteableMultiOriginJSONMixin.js +1 -1
  376. package/core/accessorSupport/decorators/subclass.js +1 -1
  377. package/core/accessorSupport/types.d.ts +2 -0
  378. package/editing/sharedTemplates/templateLoader.js +5 -0
  379. package/editing/templateUtils.js +1 -1
  380. package/interfaces.d.ts +6 -0
  381. package/kernel.js +1 -1
  382. package/layers/BingMapsLayer.d.ts +3 -2
  383. package/layers/BingMapsLayer.js +1 -1
  384. package/layers/BuildingSceneLayer.d.ts +3 -2
  385. package/layers/BuildingSceneLayer.js +1 -1
  386. package/layers/CSVLayer.js +1 -1
  387. package/layers/CatalogLayer.d.ts +3 -2
  388. package/layers/CatalogLayer.js +1 -1
  389. package/layers/DimensionLayer.d.ts +3 -2
  390. package/layers/DimensionLayer.js +1 -1
  391. package/layers/ElevationLayer.d.ts +3 -2
  392. package/layers/ElevationLayer.js +1 -1
  393. package/layers/FeatureLayer.d.ts +3 -2
  394. package/layers/FeatureLayer.js +1 -1
  395. package/layers/GaussianSplatLayer.d.ts +3 -2
  396. package/layers/GaussianSplatLayer.js +1 -1
  397. package/layers/GeoJSONLayer.d.ts +3 -2
  398. package/layers/GeoJSONLayer.js +1 -1
  399. package/layers/GeoRSSLayer.d.ts +3 -2
  400. package/layers/GeoRSSLayer.js +1 -1
  401. package/layers/GroupLayer.d.ts +3 -2
  402. package/layers/GroupLayer.js +1 -1
  403. package/layers/ImageryLayer.d.ts +3 -2
  404. package/layers/ImageryLayer.js +1 -1
  405. package/layers/ImageryTileLayer.d.ts +3 -2
  406. package/layers/ImageryTileLayer.js +1 -1
  407. package/layers/IntegratedMesh3DTilesLayer.d.ts +3 -2
  408. package/layers/IntegratedMesh3DTilesLayer.js +1 -1
  409. package/layers/IntegratedMeshLayer.d.ts +3 -2
  410. package/layers/IntegratedMeshLayer.js +1 -1
  411. package/layers/KMLLayer.d.ts +3 -2
  412. package/layers/KMLLayer.js +1 -1
  413. package/layers/KnowledgeGraphLayer.d.ts +3 -2
  414. package/layers/KnowledgeGraphLayer.js +1 -1
  415. package/layers/LineOfSightLayer.d.ts +3 -2
  416. package/layers/LineOfSightLayer.js +1 -1
  417. package/layers/LinkChartLayer.d.ts +3 -2
  418. package/layers/LinkChartLayer.js +1 -1
  419. package/layers/MapImageLayer.d.ts +3 -2
  420. package/layers/MapImageLayer.js +1 -1
  421. package/layers/MapNotesLayer.d.ts +3 -2
  422. package/layers/MapNotesLayer.js +1 -1
  423. package/layers/MediaLayer.d.ts +3 -2
  424. package/layers/MediaLayer.js +1 -1
  425. package/layers/OGCFeatureLayer.d.ts +3 -2
  426. package/layers/OGCFeatureLayer.js +1 -1
  427. package/layers/ParquetLayer.d.ts +3 -2
  428. package/layers/ParquetLayer.js +1 -1
  429. package/layers/PointCloudLayer.d.ts +3 -2
  430. package/layers/PointCloudLayer.js +1 -1
  431. package/layers/RouteLayer.d.ts +3 -2
  432. package/layers/RouteLayer.js +1 -1
  433. package/layers/SceneLayer.d.ts +6 -2
  434. package/layers/SceneLayer.js +1 -1
  435. package/layers/StreamLayer.d.ts +3 -2
  436. package/layers/StreamLayer.js +1 -1
  437. package/layers/SubtypeGroupLayer.d.ts +3 -2
  438. package/layers/SubtypeGroupLayer.js +1 -1
  439. package/layers/TileLayer.d.ts +3 -2
  440. package/layers/TileLayer.js +1 -1
  441. package/layers/UnknownLayer.d.ts +3 -2
  442. package/layers/UnknownLayer.js +1 -1
  443. package/layers/UnsupportedLayer.d.ts +3 -2
  444. package/layers/UnsupportedLayer.js +1 -1
  445. package/layers/VectorTileLayer.d.ts +3 -2
  446. package/layers/VectorTileLayer.js +1 -1
  447. package/layers/VideoLayer.d.ts +3 -2
  448. package/layers/VideoLayer.js +1 -1
  449. package/layers/ViewshedLayer.d.ts +3 -2
  450. package/layers/ViewshedLayer.js +1 -1
  451. package/layers/VoxelLayer.d.ts +3 -2
  452. package/layers/VoxelLayer.js +1 -1
  453. package/layers/WCSLayer.d.ts +3 -2
  454. package/layers/WCSLayer.js +1 -1
  455. package/layers/WFSLayer.d.ts +3 -2
  456. package/layers/WFSLayer.js +1 -1
  457. package/layers/WMSLayer.d.ts +3 -2
  458. package/layers/WMSLayer.js +1 -1
  459. package/layers/WMTSLayer.d.ts +3 -2
  460. package/layers/WMTSLayer.js +1 -1
  461. package/layers/WebTileLayer.d.ts +3 -2
  462. package/layers/WebTileLayer.js +1 -1
  463. package/layers/buildingSublayers/BuildingSublayer.d.ts +3 -2
  464. package/layers/buildingSublayers/BuildingSublayer.js +1 -1
  465. package/layers/catalog/CatalogDynamicGroupLayer.d.ts +3 -2
  466. package/layers/catalog/CatalogDynamicGroupLayer.js +1 -1
  467. package/layers/catalog/CatalogFootprintLayer.d.ts +3 -2
  468. package/layers/catalog/CatalogFootprintLayer.js +1 -1
  469. package/layers/knowledgeGraph/KnowledgeGraphSublayer.d.ts +3 -2
  470. package/layers/knowledgeGraph/KnowledgeGraphSublayer.js +1 -1
  471. package/layers/media/types.d.ts +31 -5
  472. package/layers/mixins/ImageryTileMixin.js +1 -1
  473. package/layers/raster/datasets/FunctionRaster.js +1 -1
  474. package/layers/raster/functions/BaseRasterFunction.js +1 -1
  475. package/layers/raster/functions/StretchFunction.js +1 -1
  476. package/layers/raster/functions/rasterProjectionHelper.js +1 -1
  477. package/layers/support/ElevationQuery.js +1 -1
  478. package/layers/support/MediaElementBase.d.ts +5 -3
  479. package/layers/support/MediaElementBase.js +1 -1
  480. package/layers/support/RasterJobHandler.js +1 -1
  481. package/layers/support/RasterWorker.js +1 -1
  482. package/layers/support/Sublayer.d.ts +3 -2
  483. package/layers/support/Sublayer.js +1 -1
  484. package/layers/support/SubtypeSublayer.d.ts +3 -2
  485. package/layers/support/SubtypeSublayer.js +1 -1
  486. package/layers/support/WMSSublayer.d.ts +3 -2
  487. package/layers/support/WMSSublayer.js +1 -1
  488. package/layers/support/layerOriginUtils.js +1 -1
  489. package/linkChart/LinkChartProperties.d.ts +5 -3
  490. package/linkChart/LinkChartProperties.js +1 -1
  491. package/networks/CircuitManager.d.ts +1 -1
  492. package/networks/Network.d.ts +4 -2
  493. package/networks/Network.js +1 -1
  494. package/networks/support/NamedTraceConfiguration.d.ts +5 -3
  495. package/networks/support/NamedTraceConfiguration.js +1 -1
  496. package/networks/support/jsonTypes.d.ts +65 -0
  497. package/package.json +3 -3
  498. package/rest/featureService/types.d.ts +42 -5
  499. package/rest/networks/circuits/exportCircuits.js +1 -1
  500. package/rest/networks/circuits/support/ExportCircuitsParameters.d.ts +10 -2
  501. package/rest/networks/circuits/support/ExportCircuitsParameters.js +1 -1
  502. package/rest/support/Query.d.ts +12 -1
  503. package/support/revision.js +1 -1
  504. package/symbols/support/symbolUtils.js +1 -1
  505. package/views/2d/engine/BitmapTileContainer.js +1 -1
  506. package/views/2d/engine/DisplayObject.js +1 -1
  507. package/views/2d/engine/Stage.js +1 -1
  508. package/views/2d/engine/imagery/RasterTileContainer.js +1 -1
  509. package/views/2d/engine/imagery/RasterVFTileContainer.js +1 -1
  510. package/views/2d/engine/vectorTiles/VectorTileContainer.js +1 -1
  511. package/views/2d/engine/vectorTiles/decluttering/SymbolDeclutterer.js +1 -1
  512. package/views/2d/engine/vectorTiles/decluttering/SymbolFader.js +1 -1
  513. package/views/2d/engine/webgl/RenderingDevice.js +1 -1
  514. package/views/2d/engine/webgl/TileContainer.js +1 -1
  515. package/views/2d/engine/webgl/collisions/LabelMetric.js +1 -1
  516. package/views/2d/engine/webgl/shaderGraph/techniques/TechniqueProgramCache.js +1 -1
  517. package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueBackground.js +1 -1
  518. package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueFill.js +1 -1
  519. package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueLine.js +1 -1
  520. package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueSymbol.js +1 -1
  521. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  522. package/views/2d/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiles2D.js +1 -1
  523. package/views/2d/layers/TileLayerView2D.js +1 -1
  524. package/views/2d/layers/WMTSLayerView2D.js +1 -1
  525. package/views/2d/layers/features/FeatureContainer.js +1 -1
  526. package/views/2d/layers/features/Processor.js +1 -1
  527. package/views/2d/layers/features/support/Tile.js +1 -1
  528. package/views/2d/layers/imagery/BaseImageryTileSubView2D.js +1 -1
  529. package/views/2d/layers/imagery/ImageryTileView2D.js +1 -1
  530. package/views/2d/layers/imagery/VectorFieldTileView2D.js +1 -1
  531. package/views/2d/layers/support/imageUtils.js +1 -1
  532. package/views/2d/tiling/TileCache.js +1 -1
  533. package/views/2d/tiling/TileInfoView.js +1 -1
  534. package/views/2d/tiling/TileInfoViewPOT.js +1 -1
  535. package/views/3d/FocusAreasView.js +1 -1
  536. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillVisualization.js +1 -1
  537. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementShiftTool.js +1 -1
  538. package/views/3d/camera/intersectionUtils.js +1 -1
  539. package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
  540. package/views/3d/layers/ImageryTileLayerView3D.js +1 -1
  541. package/views/3d/layers/graphics/ElevationQuery.js +1 -1
  542. package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
  543. package/views/3d/layers/graphics/extrudeUtils.js +5 -0
  544. package/views/3d/support/gaussianSplatting/GaussianSplatDataStore.js +1 -1
  545. package/views/3d/support/gaussianSplatting/GaussianSplatFadeHelper.js +1 -1
  546. package/views/3d/webgl-engine/lib/GPUPointOcclusionQuery.js +1 -1
  547. package/views/interactive/snapping/SelfSnappingEngine.js +1 -1
  548. package/views/interactive/snapping/SnappingContext.js +1 -1
  549. package/widgets/Attribution.d.ts +1 -0
  550. package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.d.ts +18 -0
  551. package/widgets/BatchAttributeForm.d.ts +2 -0
  552. package/widgets/BatchAttributeForm.js +1 -1
  553. package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
  554. package/widgets/Editor/workflowUtils.js +1 -1
  555. package/widgets/Feature/support/featureUtils.js +1 -1
  556. package/widgets/FeatureForm.js +1 -1
  557. package/widgets/FeatureTable/FeatureTableViewModel.d.ts +43 -4
  558. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  559. package/widgets/FeatureTable/FieldColumn.js +1 -1
  560. package/widgets/FeatureTable/Grid/EditorColumn.js +1 -1
  561. package/widgets/FeatureTable/Grid/types.d.ts +7 -1
  562. package/widgets/FeatureTable/support/FeatureStore.js +1 -1
  563. package/widgets/FeatureTable/support/tableUtils.js +1 -1
  564. package/widgets/FeatureTable.d.ts +43 -4
  565. package/widgets/FeatureTable.js +1 -1
  566. package/widgets/Legend/LegendViewModel.d.ts +6 -0
  567. package/widgets/Legend/styles/card/CardView.d.ts +19 -3
  568. package/widgets/Legend/styles/classic/ClassicView.d.ts +1 -0
  569. package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
  570. package/widgets/Legend.d.ts +15 -0
  571. package/widgets/Search/SearchViewModel.d.ts +5 -0
  572. package/widgets/Search/SearchViewModel.js +1 -1
  573. package/widgets/Search/support/layerSearchUtils.js +1 -1
  574. package/widgets/Search.js +1 -1
  575. package/widgets/smartMapping/BinaryColorSizeSlider.js +1 -1
  576. package/widgets/smartMapping/ClassedColorSlider.js +1 -1
  577. package/widgets/smartMapping/ClassedSizeSlider.d.ts +1 -1
  578. package/widgets/smartMapping/ClassedSizeSlider.js +1 -1
  579. package/widgets/smartMapping/ColorSizeSlider.js +1 -1
  580. package/widgets/smartMapping/ColorSlider.js +1 -1
  581. package/widgets/smartMapping/OpacitySlider.js +1 -1
  582. package/widgets/smartMapping/SizeSlider.js +1 -1
  583. package/assets/esri/core/workers/chunks/00c77f03dd511c6dbff2.js +0 -1
  584. package/assets/esri/core/workers/chunks/015492d609c28077d66c.js +0 -1
  585. package/assets/esri/core/workers/chunks/04176244b0a3539c9681.js +0 -1
  586. package/assets/esri/core/workers/chunks/0429ca6ba562ae29897e.js +0 -1
  587. package/assets/esri/core/workers/chunks/04958494022f82dca473.js +0 -1
  588. package/assets/esri/core/workers/chunks/049c125085028ffdd0dd.js +0 -1
  589. package/assets/esri/core/workers/chunks/05e3bfd07a7a227862fd.js +0 -1
  590. package/assets/esri/core/workers/chunks/095c1b88cdcb91ab837e.js +0 -1
  591. package/assets/esri/core/workers/chunks/09b77f82c22530b44daa.js +0 -1
  592. package/assets/esri/core/workers/chunks/0a39c6dc57bd60d5587e.js +0 -1
  593. package/assets/esri/core/workers/chunks/0b679d5a1bfdbd006d6e.js +0 -1
  594. package/assets/esri/core/workers/chunks/0b7bbdc0d71ee6721751.js +0 -2
  595. package/assets/esri/core/workers/chunks/0d9e1ccc3ba8b5ed3287.js +0 -1
  596. package/assets/esri/core/workers/chunks/0f4e9846d074864b39c2.js +0 -1
  597. package/assets/esri/core/workers/chunks/0fc22ad791d3ec0a9c5e.js +0 -1
  598. package/assets/esri/core/workers/chunks/1037b38aade2a847bf24.js +0 -1
  599. package/assets/esri/core/workers/chunks/108a4ab28b6586e281d9.js +0 -1
  600. package/assets/esri/core/workers/chunks/12f9a55253084a910b2e.js +0 -1
  601. package/assets/esri/core/workers/chunks/13137f35b9ab299d07e3.js +0 -1
  602. package/assets/esri/core/workers/chunks/13839d220e5c62404923.js +0 -1
  603. package/assets/esri/core/workers/chunks/1484a7ef4fcbd748b197.js +0 -1
  604. package/assets/esri/core/workers/chunks/14dedd80fb797303f91f.js +0 -1
  605. package/assets/esri/core/workers/chunks/1694b9154df3eccf602e.js +0 -1
  606. package/assets/esri/core/workers/chunks/16a7edb381621085a631.js +0 -1
  607. package/assets/esri/core/workers/chunks/16cfa7031d6dbf5aa09b.js +0 -1
  608. package/assets/esri/core/workers/chunks/18ab5959ebf8689f8fe8.js +0 -1
  609. package/assets/esri/core/workers/chunks/18b0ce0bc2a9737ffb1b.js +0 -1
  610. package/assets/esri/core/workers/chunks/1a6d2f525dd30d08cf9b.js +0 -1
  611. package/assets/esri/core/workers/chunks/1b284a6f32effe28aafc.js +0 -1
  612. package/assets/esri/core/workers/chunks/1c58bd3275c849d44b13.js +0 -1
  613. package/assets/esri/core/workers/chunks/1c742018eb7dfd5d23e3.js +0 -1
  614. package/assets/esri/core/workers/chunks/1dfa949cc4f4c18ed4cf.js +0 -1
  615. package/assets/esri/core/workers/chunks/1e848d9da1c61a27cf18.js +0 -1
  616. package/assets/esri/core/workers/chunks/20f4c6d8b310ecab97be.js +0 -1
  617. package/assets/esri/core/workers/chunks/218b2b767b40d85fb713.js +0 -1
  618. package/assets/esri/core/workers/chunks/22c115ec003351c7d8ee.js +0 -1
  619. package/assets/esri/core/workers/chunks/23545a9adc75564ecf6e.js +0 -1
  620. package/assets/esri/core/workers/chunks/23cf4cbc389d2b50e968.js +0 -1
  621. package/assets/esri/core/workers/chunks/24527b61c8c216becbc4.js +0 -1
  622. package/assets/esri/core/workers/chunks/24dab877047369de13e2.js +0 -1
  623. package/assets/esri/core/workers/chunks/25f3ee666f545a7a7993.js +0 -2
  624. package/assets/esri/core/workers/chunks/29471e0b3f7296dee096.js +0 -1
  625. package/assets/esri/core/workers/chunks/2b27499fa9de22970b7a.js +0 -1
  626. package/assets/esri/core/workers/chunks/2bd59ece927b5c1c9f80.js +0 -1
  627. package/assets/esri/core/workers/chunks/2c7038a7ffaf75344b02.js +0 -1
  628. package/assets/esri/core/workers/chunks/2d8b8880e6bff4414e95.js +0 -1
  629. package/assets/esri/core/workers/chunks/2dfa7abf2d39fa5a3874.js +0 -1
  630. package/assets/esri/core/workers/chunks/2e6ae1ca07df442fc966.js +0 -1
  631. package/assets/esri/core/workers/chunks/2e6bd743b88e83d43137.js +0 -1
  632. package/assets/esri/core/workers/chunks/3001568a99fdd14aada9.js +0 -1
  633. package/assets/esri/core/workers/chunks/30dd4a7c93b33988a270.js +0 -1
  634. package/assets/esri/core/workers/chunks/312b3cc1c91d5b419faf.js +0 -1
  635. package/assets/esri/core/workers/chunks/31fa3dd983e9e73fcb65.js +0 -1
  636. package/assets/esri/core/workers/chunks/33a13e80badd20ed8de2.js +0 -1
  637. package/assets/esri/core/workers/chunks/355c8d0eadfff9f62dfb.js +0 -1
  638. package/assets/esri/core/workers/chunks/35c98ea99000f411175f.js +0 -1
  639. package/assets/esri/core/workers/chunks/35e1d0cfc3c5a484422f.js +0 -1
  640. package/assets/esri/core/workers/chunks/360f263f32aa2342a897.js +0 -1
  641. package/assets/esri/core/workers/chunks/369f37060608342a4262.js +0 -1
  642. package/assets/esri/core/workers/chunks/36ecf951c0c7dad84b69.js +0 -1
  643. package/assets/esri/core/workers/chunks/37002a46f03a9fc5f644.js +0 -2
  644. package/assets/esri/core/workers/chunks/37258b702fe06bbcf748.js +0 -1
  645. package/assets/esri/core/workers/chunks/37a3e91791a18ed8b8da.js +0 -1
  646. package/assets/esri/core/workers/chunks/3a04153ca9d8e4f01185.js +0 -1
  647. package/assets/esri/core/workers/chunks/3b1982bf7b44ff897a35.js +0 -1
  648. package/assets/esri/core/workers/chunks/3b25f5d9c8f78bb6e011.js +0 -1
  649. package/assets/esri/core/workers/chunks/3c5f07ebe1b09dcdc958.js +0 -1
  650. package/assets/esri/core/workers/chunks/3c66dd52ad156711a6a2.js +0 -1
  651. package/assets/esri/core/workers/chunks/3ed317900f0edf635508.js +0 -1
  652. package/assets/esri/core/workers/chunks/3f0959b1abafe516146e.js +0 -1
  653. package/assets/esri/core/workers/chunks/41f487713c6278d389a1.js +0 -1
  654. package/assets/esri/core/workers/chunks/4319b89cfa02894a8cae.js +0 -1
  655. package/assets/esri/core/workers/chunks/43e2c1d72cd9c8beed2f.js +0 -2
  656. package/assets/esri/core/workers/chunks/44c228388a95fa958827.js +0 -1
  657. package/assets/esri/core/workers/chunks/45a9cd722e98dd1548ae.js +0 -1
  658. package/assets/esri/core/workers/chunks/46daa1ff5b412a97edc9.js +0 -1
  659. package/assets/esri/core/workers/chunks/46e547691bca424f2bc9.js +0 -1
  660. package/assets/esri/core/workers/chunks/4750f55a289bc0cf3d77.js +0 -1
  661. package/assets/esri/core/workers/chunks/47d2103b876b01bc26fd.js +0 -1
  662. package/assets/esri/core/workers/chunks/495af366ec1defd89a72.js +0 -1
  663. package/assets/esri/core/workers/chunks/4b14ee37b5ac50a734f9.js +0 -1
  664. package/assets/esri/core/workers/chunks/4bcd74951477e8977ba1.js +0 -1
  665. package/assets/esri/core/workers/chunks/4cbe78d6a5ff617e15d6.js +0 -1
  666. package/assets/esri/core/workers/chunks/4ce28c936eaffe57c448.js +0 -1
  667. package/assets/esri/core/workers/chunks/4d5591c1b4ef37075921.js +0 -1
  668. package/assets/esri/core/workers/chunks/4ef97eb67dc42e0052d6.js +0 -1
  669. package/assets/esri/core/workers/chunks/4fa230dc6e5e87b0dec1.js +0 -1
  670. package/assets/esri/core/workers/chunks/4fcf035582fa6e93d264.js +0 -1
  671. package/assets/esri/core/workers/chunks/509307a2ef990ad1da8f.js +0 -301
  672. package/assets/esri/core/workers/chunks/50eb381b18b84b9c75a3.js +0 -1
  673. package/assets/esri/core/workers/chunks/50f03813fba4b752ca9f.js +0 -1
  674. package/assets/esri/core/workers/chunks/52a14266fe239b95c5ce.js +0 -1
  675. package/assets/esri/core/workers/chunks/52bcfb3ea563c1a301d4.js +0 -1
  676. package/assets/esri/core/workers/chunks/53b5c77832df7df4d4e3.js +0 -1
  677. package/assets/esri/core/workers/chunks/558822b700e8bd844052.js +0 -1
  678. package/assets/esri/core/workers/chunks/55a9ea536c64976c3409.js +0 -1
  679. package/assets/esri/core/workers/chunks/563933a84fc9b0e021f6.js +0 -1
  680. package/assets/esri/core/workers/chunks/56569d0c2cf5c5167651.js +0 -1
  681. package/assets/esri/core/workers/chunks/575a33924ec900f9e537.js +0 -1
  682. package/assets/esri/core/workers/chunks/584c4602d97a008afb83.js +0 -1
  683. package/assets/esri/core/workers/chunks/58b3a776ef129f7f86dc.js +0 -1
  684. package/assets/esri/core/workers/chunks/590a7fd4f5476224ec89.js +0 -1
  685. package/assets/esri/core/workers/chunks/59a45533e96cedf1c480.js +0 -1
  686. package/assets/esri/core/workers/chunks/5a66b7f1f4da75da8e7f.js +0 -1
  687. package/assets/esri/core/workers/chunks/5b9f2aa3ba1bf12c3240.js +0 -2
  688. package/assets/esri/core/workers/chunks/5bbf20135c87a1cc8a18.js +0 -1
  689. package/assets/esri/core/workers/chunks/5cc217f188fd56006158.js +0 -1
  690. package/assets/esri/core/workers/chunks/5dc2f2e28c30386efadf.js +0 -1
  691. package/assets/esri/core/workers/chunks/5df49e1f283e2e83de46.js +0 -1
  692. package/assets/esri/core/workers/chunks/60764ea501a3a1aacc63.js +0 -1
  693. package/assets/esri/core/workers/chunks/6087d5dc40bb62ec48c8.js +0 -1
  694. package/assets/esri/core/workers/chunks/6094bba52ddada48c7ed.js +0 -1
  695. package/assets/esri/core/workers/chunks/60eeeea671a523bb6b15.js +0 -1
  696. package/assets/esri/core/workers/chunks/60f363ee2add089e8f0b.js +0 -1
  697. package/assets/esri/core/workers/chunks/6387308c4add226e5b83.js +0 -1
  698. package/assets/esri/core/workers/chunks/63b8193ad90b2ebe6884.js +0 -1
  699. package/assets/esri/core/workers/chunks/657602e6a84e8b4576fb.js +0 -1
  700. package/assets/esri/core/workers/chunks/65fd971d0574d69cbc26.js +0 -1
  701. package/assets/esri/core/workers/chunks/679cd6424e0e2d7f372b.js +0 -1
  702. package/assets/esri/core/workers/chunks/6800647240b7968be225.js +0 -1
  703. package/assets/esri/core/workers/chunks/68074a484d7f9bc713c0.js +0 -1
  704. package/assets/esri/core/workers/chunks/680f9c29ca96ea8e01da.js +0 -1
  705. package/assets/esri/core/workers/chunks/68cb43f2fa8cc826e99b.js +0 -1
  706. package/assets/esri/core/workers/chunks/69a68a6d6736c4b97a27.js +0 -1
  707. package/assets/esri/core/workers/chunks/6a3d66d7c92f90cc2a17.js +0 -1
  708. package/assets/esri/core/workers/chunks/6a544fb44f7da0e80f43.js +0 -1
  709. package/assets/esri/core/workers/chunks/6a782e8475bff4d56dbc.js +0 -1
  710. package/assets/esri/core/workers/chunks/6b85a8776ec2beff63cb.js +0 -1
  711. package/assets/esri/core/workers/chunks/6be530ab81291745485b.js +0 -2
  712. package/assets/esri/core/workers/chunks/6d3ae7969ea86a2e0b13.js +0 -1
  713. package/assets/esri/core/workers/chunks/6df484faf54e90a6cc77.js +0 -1
  714. package/assets/esri/core/workers/chunks/6ea6ad894ac634aa4391.js +0 -1
  715. package/assets/esri/core/workers/chunks/6ffc1a0400298fca00ee.js +0 -1
  716. package/assets/esri/core/workers/chunks/729c2d26ae23d9c86547.js +0 -1
  717. package/assets/esri/core/workers/chunks/73bee5659414b3687cfc.js +0 -1
  718. package/assets/esri/core/workers/chunks/73c416ae0ec5a1815591.js +0 -2
  719. package/assets/esri/core/workers/chunks/74b825d4f0e7ab567b10.js +0 -1
  720. package/assets/esri/core/workers/chunks/75c66e38bdc1c786c599.js +0 -1
  721. package/assets/esri/core/workers/chunks/75fd2ef1236a9364ca7f.js +0 -1
  722. package/assets/esri/core/workers/chunks/760a759f9697adde6dd4.js +0 -1
  723. package/assets/esri/core/workers/chunks/77509bd20ac5bc190c94.js +0 -1039
  724. package/assets/esri/core/workers/chunks/7763cf4a9a4343c28591.js +0 -1
  725. package/assets/esri/core/workers/chunks/7972954801b82e7afc72.js +0 -1
  726. package/assets/esri/core/workers/chunks/798d227205bd958de6a7.js +0 -1
  727. package/assets/esri/core/workers/chunks/7bc09e80bf45fe137055.js +0 -1
  728. package/assets/esri/core/workers/chunks/7be9bbae23895d1cfa92.js +0 -1
  729. package/assets/esri/core/workers/chunks/7bf30c254228f9b7f224.js +0 -1
  730. package/assets/esri/core/workers/chunks/7bf491b468cd74a4166c.js +0 -1
  731. package/assets/esri/core/workers/chunks/7d631ebf8f79225cf0f6.js +0 -1
  732. package/assets/esri/core/workers/chunks/7d744554d14057d9b2b1.js +0 -1
  733. package/assets/esri/core/workers/chunks/7d8664aeff66e34138bd.js +0 -1
  734. package/assets/esri/core/workers/chunks/7db52d2451494835c160.js +0 -1
  735. package/assets/esri/core/workers/chunks/818b5b8027d6fe8999d6.js +0 -1
  736. package/assets/esri/core/workers/chunks/8195310b4c53db902fc1.js +0 -1
  737. package/assets/esri/core/workers/chunks/82ace0195b63790b22c9.js +0 -1
  738. package/assets/esri/core/workers/chunks/83117d2747bdaf480c7b.js +0 -1
  739. package/assets/esri/core/workers/chunks/83c5dea24e36ac2e3497.js +0 -1
  740. package/assets/esri/core/workers/chunks/84440efe2cc337dab81f.js +0 -1
  741. package/assets/esri/core/workers/chunks/84ec8ea3e40e0864798f.js +0 -1
  742. package/assets/esri/core/workers/chunks/852007720e3bc29532db.js +0 -1
  743. package/assets/esri/core/workers/chunks/85c92726121cb43a2216.js +0 -1
  744. package/assets/esri/core/workers/chunks/86832d94190150c70c11.js +0 -1
  745. package/assets/esri/core/workers/chunks/873008572c1f21cea122.js +0 -2
  746. package/assets/esri/core/workers/chunks/87c6470ee295d736b06d.js +0 -1
  747. package/assets/esri/core/workers/chunks/88379cd8e8e1c7ae3c7c.js +0 -1
  748. package/assets/esri/core/workers/chunks/88cbaa91c495d86f4bb0.js +0 -1
  749. package/assets/esri/core/workers/chunks/89853fccdf2bfcc290c0.js +0 -1
  750. package/assets/esri/core/workers/chunks/8c1f1eb36198ce40ef13.js +0 -1
  751. package/assets/esri/core/workers/chunks/8d58e59ea13ecafdd45c.js +0 -1
  752. package/assets/esri/core/workers/chunks/8db723b8468e408dda46.js +0 -1
  753. package/assets/esri/core/workers/chunks/8dca61f8ba6689379f86.js +0 -1
  754. package/assets/esri/core/workers/chunks/8e354c7b4858db5880a9.js +0 -1
  755. package/assets/esri/core/workers/chunks/8e556ff730ae96290a69.js +0 -1
  756. package/assets/esri/core/workers/chunks/8e62a5fcc4c7e83a903a.js +0 -1
  757. package/assets/esri/core/workers/chunks/9086a4933d3d3d9ffa72.js +0 -1
  758. package/assets/esri/core/workers/chunks/91d9ade78854f40a962d.js +0 -1
  759. package/assets/esri/core/workers/chunks/91fba3bebd78cb956941.js +0 -1
  760. package/assets/esri/core/workers/chunks/920b4def081c78c0d586.js +0 -1
  761. package/assets/esri/core/workers/chunks/92928c56b312e1514600.js +0 -1
  762. package/assets/esri/core/workers/chunks/92a4f56232f81ca457fa.js +0 -1
  763. package/assets/esri/core/workers/chunks/92ef6071ea87b7f940e2.js +0 -1
  764. package/assets/esri/core/workers/chunks/9319d57494482668ab19.js +0 -1
  765. package/assets/esri/core/workers/chunks/9361834d2c3064eb41fc.js +0 -1
  766. package/assets/esri/core/workers/chunks/9382af94bf6bf1b09c8c.js +0 -1
  767. package/assets/esri/core/workers/chunks/942c80c425b1f13cced5.js +0 -1
  768. package/assets/esri/core/workers/chunks/95cb062cae4c31c07124.js +0 -1
  769. package/assets/esri/core/workers/chunks/968335b28b895e19913b.js +0 -1
  770. package/assets/esri/core/workers/chunks/979bc762ccc0d3fc2467.js +0 -1
  771. package/assets/esri/core/workers/chunks/9828b07b5f8fd9f40935.js +0 -1
  772. package/assets/esri/core/workers/chunks/98739414c107ad78e4d8.js +0 -1
  773. package/assets/esri/core/workers/chunks/988f5e003377d734d282.js +0 -1
  774. package/assets/esri/core/workers/chunks/9921c8d4487a0f580b93.js +0 -1
  775. package/assets/esri/core/workers/chunks/9a6bdcedcb7d2798ba30.js +0 -1
  776. package/assets/esri/core/workers/chunks/9afe220b5b60cfa44c95.js +0 -1
  777. package/assets/esri/core/workers/chunks/9ba8a2e1c0fb4e1efc7c.js +0 -1
  778. package/assets/esri/core/workers/chunks/9c93eadbd19bef1191b4.js +0 -1
  779. package/assets/esri/core/workers/chunks/9c9d359caf8354a8ec52.js +0 -1
  780. package/assets/esri/core/workers/chunks/9cc2832d5f625f81c08d.js +0 -1
  781. package/assets/esri/core/workers/chunks/9ccabf8142fb5de4d3e2.js +0 -2
  782. package/assets/esri/core/workers/chunks/9cec9d09f3aa5c21660d.js +0 -37
  783. package/assets/esri/core/workers/chunks/9d258f14199181dee424.js +0 -1
  784. package/assets/esri/core/workers/chunks/9e869fd6450cf874783a.js +0 -1
  785. package/assets/esri/core/workers/chunks/9f34cf024231f574009c.js +0 -1
  786. package/assets/esri/core/workers/chunks/a1594486177015e8a6c3.js +0 -1
  787. package/assets/esri/core/workers/chunks/a16e75ff5cd9b22be197.js +0 -1
  788. package/assets/esri/core/workers/chunks/a1b8722c6acafdf1c2bf.js +0 -1
  789. package/assets/esri/core/workers/chunks/a3407ca77b0ff62c0e75.js +0 -1
  790. package/assets/esri/core/workers/chunks/a41073263af5eba3c16d.js +0 -1
  791. package/assets/esri/core/workers/chunks/a623676c74745e040a2a.js +0 -1
  792. package/assets/esri/core/workers/chunks/a64cd02ca959d511101c.js +0 -1
  793. package/assets/esri/core/workers/chunks/a6742abe3ebe371e85f1.js +0 -1
  794. package/assets/esri/core/workers/chunks/a6d4256c327f07221117.js +0 -1
  795. package/assets/esri/core/workers/chunks/a6f29d1a6356e2de5a79.js +0 -1
  796. package/assets/esri/core/workers/chunks/a79fad422d41019c8232.js +0 -1
  797. package/assets/esri/core/workers/chunks/a8dfd246c797f3b979f5.js +0 -1
  798. package/assets/esri/core/workers/chunks/ab0275669e28e7a34c38.js +0 -1
  799. package/assets/esri/core/workers/chunks/ab5e2f823960c33cefe4.js +0 -1
  800. package/assets/esri/core/workers/chunks/acdbe0299024d58e1421.js +0 -1
  801. package/assets/esri/core/workers/chunks/ad253136c1e12f733d15.js +0 -1
  802. package/assets/esri/core/workers/chunks/adc68e2c6d2698a52bfe.js +0 -1
  803. package/assets/esri/core/workers/chunks/adff1791ae44631ad34a.js +0 -1
  804. package/assets/esri/core/workers/chunks/ae16fe50a54b5c0f9811.js +0 -1
  805. package/assets/esri/core/workers/chunks/ae18de425548bb865702.js +0 -1
  806. package/assets/esri/core/workers/chunks/ae6066ea6cb373dc6db3.js +0 -1
  807. package/assets/esri/core/workers/chunks/aeb524eded012217a865.js +0 -1
  808. package/assets/esri/core/workers/chunks/af00081b78fc30ac556c.js +0 -1
  809. package/assets/esri/core/workers/chunks/b211b53aa7616a093b90.js +0 -1
  810. package/assets/esri/core/workers/chunks/b28e0b89603d8b03f9e1.js +0 -1
  811. package/assets/esri/core/workers/chunks/b4349db7155673329432.js +0 -1
  812. package/assets/esri/core/workers/chunks/b48033645091c91e0d88.js +0 -1
  813. package/assets/esri/core/workers/chunks/b5e4a36784d598ae6679.js +0 -1
  814. package/assets/esri/core/workers/chunks/b64cfd86d9204be743c6.js +0 -1
  815. package/assets/esri/core/workers/chunks/b8988771bfa4e785ebd6.js +0 -1
  816. package/assets/esri/core/workers/chunks/ba6452acee3d6defb37e.js +0 -1
  817. package/assets/esri/core/workers/chunks/bb92a9daa0c5b019561f.js +0 -1
  818. package/assets/esri/core/workers/chunks/bc731ec9d5136f1d9253.js +0 -1
  819. package/assets/esri/core/workers/chunks/bd1d159dce4094694c93.js +0 -1
  820. package/assets/esri/core/workers/chunks/bd2a28b14e5c0a55d783.js +0 -1
  821. package/assets/esri/core/workers/chunks/bdbb5b33f0f49661bf6d.js +0 -1
  822. package/assets/esri/core/workers/chunks/befeca51530bba5e8073.js +0 -1
  823. package/assets/esri/core/workers/chunks/bf05164b7a3e4f31e9db.js +0 -1
  824. package/assets/esri/core/workers/chunks/bf88bd763fd6442a95fd.js +0 -1
  825. package/assets/esri/core/workers/chunks/bfe052b386ec4874f350.js +0 -1
  826. package/assets/esri/core/workers/chunks/c042269586921e337be9.js +0 -1
  827. package/assets/esri/core/workers/chunks/c0b15510a8cab98df77f.js +0 -1
  828. package/assets/esri/core/workers/chunks/c27842a34e73ccb46116.js +0 -1
  829. package/assets/esri/core/workers/chunks/c3272b09bff886b08ce1.js +0 -1
  830. package/assets/esri/core/workers/chunks/c38a07e936226b361b63.js +0 -1
  831. package/assets/esri/core/workers/chunks/c59c1e52acb5ac8f78f9.js +0 -1
  832. package/assets/esri/core/workers/chunks/c5cc0fc652432a9264cc.js +0 -1
  833. package/assets/esri/core/workers/chunks/c605bf7d1e12917ac482.js +0 -1
  834. package/assets/esri/core/workers/chunks/c743e561e7d73a100576.js +0 -1
  835. package/assets/esri/core/workers/chunks/c7838ac0db8570a2d2c1.js +0 -1
  836. package/assets/esri/core/workers/chunks/c8182c2cbb0ead202af6.js +0 -1
  837. package/assets/esri/core/workers/chunks/c91ef3814e7f024043cf.js +0 -1
  838. package/assets/esri/core/workers/chunks/c96083838f919a8f64cd.js +0 -1
  839. package/assets/esri/core/workers/chunks/cad1d7e5ce89f51b3ac9.js +0 -1
  840. package/assets/esri/core/workers/chunks/cade149fa19b4d06dd24.js +0 -1
  841. package/assets/esri/core/workers/chunks/cc50f96321a7c12f300b.js +0 -1
  842. package/assets/esri/core/workers/chunks/ccc743e41854eb225c23.js +0 -1
  843. package/assets/esri/core/workers/chunks/cd788ed111e1e35cf9c8.js +0 -1
  844. package/assets/esri/core/workers/chunks/ce3870db25566cd93d8e.js +0 -1
  845. package/assets/esri/core/workers/chunks/cfbe9993263fa6f69363.js +0 -1
  846. package/assets/esri/core/workers/chunks/d129a5a34e9ad09bd39e.js +0 -1
  847. package/assets/esri/core/workers/chunks/d14e75b160aa432233c6.js +0 -1
  848. package/assets/esri/core/workers/chunks/d21480925a8bc9c7de96.js +0 -1
  849. package/assets/esri/core/workers/chunks/d32aad968798948946e4.js +0 -1
  850. package/assets/esri/core/workers/chunks/d364096493ceeff34c10.js +0 -1
  851. package/assets/esri/core/workers/chunks/d373986588f6b1b8f2d5.js +0 -1
  852. package/assets/esri/core/workers/chunks/d3b1d1c389d70919fb02.js +0 -1
  853. package/assets/esri/core/workers/chunks/d52a0c3a855029c48bd2.js +0 -1
  854. package/assets/esri/core/workers/chunks/d66973e926bc03e2359a.js +0 -1
  855. package/assets/esri/core/workers/chunks/d7cd1d879768df629716.js +0 -1
  856. package/assets/esri/core/workers/chunks/d7df5e4028d502712317.js +0 -1
  857. package/assets/esri/core/workers/chunks/d90564fbafc00df2d56d.js +0 -1
  858. package/assets/esri/core/workers/chunks/d9ca754f51b9812bb179.js +0 -1
  859. package/assets/esri/core/workers/chunks/d9ef0b3341e2744d8f2f.js +0 -1
  860. package/assets/esri/core/workers/chunks/da5ce19ecf3a5e92a2a9.js +0 -1
  861. package/assets/esri/core/workers/chunks/da7685ec2b6eaf00fd2d.js +0 -1
  862. package/assets/esri/core/workers/chunks/dae715b2b0094641e42f.js +0 -1
  863. package/assets/esri/core/workers/chunks/db04b0a30cce9e476551.js +0 -1
  864. package/assets/esri/core/workers/chunks/db28d00171240b4fffac.js +0 -1
  865. package/assets/esri/core/workers/chunks/db4661fd82dc61162115.js +0 -1
  866. package/assets/esri/core/workers/chunks/dbd382546837aa7709e2.js +0 -1
  867. package/assets/esri/core/workers/chunks/dddb6cb44cbe4dc1af97.js +0 -1
  868. package/assets/esri/core/workers/chunks/de60421029fbcebe2950.js +0 -1
  869. package/assets/esri/core/workers/chunks/df33d5a08e1b6dc00f45.js +0 -1
  870. package/assets/esri/core/workers/chunks/e0369ce0d729c9656488.js +0 -1
  871. package/assets/esri/core/workers/chunks/e03c706e327f4989280a.js +0 -1
  872. package/assets/esri/core/workers/chunks/e0648f5aed9d939928dc.js +0 -1
  873. package/assets/esri/core/workers/chunks/e071b912539304564b69.js +0 -1
  874. package/assets/esri/core/workers/chunks/e10d6e511921394474ca.js +0 -1
  875. package/assets/esri/core/workers/chunks/e34b7acc963288ca0f04.js +0 -1
  876. package/assets/esri/core/workers/chunks/e4b6aa8f67c2bd285020.js +0 -1
  877. package/assets/esri/core/workers/chunks/e572ffc1d000e4e6325f.js +0 -1
  878. package/assets/esri/core/workers/chunks/e615a935bbf1168fac43.js +0 -1
  879. package/assets/esri/core/workers/chunks/e8bf362b2631f977b1cb.js +0 -1
  880. package/assets/esri/core/workers/chunks/e8e4d48ab4024e17108d.js +0 -1
  881. package/assets/esri/core/workers/chunks/e97787de88e2992add13.js +0 -1
  882. package/assets/esri/core/workers/chunks/eaadcc43837c465342cc.js +0 -1
  883. package/assets/esri/core/workers/chunks/eb7eb3b3b8800fd73f3e.js +0 -1
  884. package/assets/esri/core/workers/chunks/ecb4c223c0278971cdc9.js +0 -1
  885. package/assets/esri/core/workers/chunks/ed7e353e290b3a272457.js +0 -1
  886. package/assets/esri/core/workers/chunks/ee361690b456c12c30d8.js +0 -1
  887. package/assets/esri/core/workers/chunks/ef639d31c94d2b55b8d4.js +0 -1
  888. package/assets/esri/core/workers/chunks/ef977be20a647aeded0a.js +0 -1
  889. package/assets/esri/core/workers/chunks/efb631371b6bb3f043bb.js +0 -1
  890. package/assets/esri/core/workers/chunks/f0100b34f8b13fb37157.js +0 -1
  891. package/assets/esri/core/workers/chunks/f0914715e90e43466f8c.js +0 -1
  892. package/assets/esri/core/workers/chunks/f0a667d8d33bc51c795d.js +0 -1
  893. package/assets/esri/core/workers/chunks/f1e5d52e550326e49d1e.js +0 -1
  894. package/assets/esri/core/workers/chunks/f2b63597ae956db74eb3.js +0 -1
  895. package/assets/esri/core/workers/chunks/f32d4813b450a3eb4262.js +0 -1
  896. package/assets/esri/core/workers/chunks/f3b2c81f5ad26a58a4bd.js +0 -1
  897. package/assets/esri/core/workers/chunks/f54ec21fa67db6fef5a6.js +0 -1
  898. package/assets/esri/core/workers/chunks/f57b5720ce827f5845cd.js +0 -1
  899. package/assets/esri/core/workers/chunks/f5a695dc51793b138b23.js +0 -1
  900. package/assets/esri/core/workers/chunks/f5f584d325f8f2ea825f.js +0 -1
  901. package/assets/esri/core/workers/chunks/f65d26588d2d80680a26.js +0 -1
  902. package/assets/esri/core/workers/chunks/f65f1798f398bc549463.js +0 -1
  903. package/assets/esri/core/workers/chunks/f72e6c903f55ce95a6c5.js +0 -1
  904. package/assets/esri/core/workers/chunks/f77b93bef06bae03c1c6.js +0 -1
  905. package/assets/esri/core/workers/chunks/f7dfbf24859f4ac2421b.js +0 -1
  906. package/assets/esri/core/workers/chunks/f8438642a9bdd8980b4b.js +0 -1
  907. package/assets/esri/core/workers/chunks/f98689562017583f73ee.js +0 -1
  908. package/assets/esri/core/workers/chunks/fdb5b5d8a7c99a0bf5f9.js +0 -1
  909. package/assets/esri/core/workers/chunks/fdbe16e3b23e01655c0c.js +0 -1
  910. package/assets/esri/core/workers/chunks/fe07390e27f8cd5e93a8.js +0 -1
  911. package/assets/esri/core/workers/chunks/fe33b11ec3f58a0f541a.js +0 -1
  912. package/assets/esri/core/workers/chunks/ff8e2f998169ca3a7a68.js +0 -1
  913. package/assets/esri/core/workers/chunks/ffdba51e7256ebf8ebd3.js +0 -1
  914. /package/assets/esri/core/workers/chunks/{873008572c1f21cea122.js.LICENSE.txt → 91e307ca0d11804a7a1d.js.LICENSE.txt} +0 -0
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import{onLocaleChange as t,substitute as i,fetchMessageBundle as s}from"../../intl.js";import{isSome as l}from"../../core/arrayUtils.js";import n from"../../core/Collection.js";import{referenceSetter as o}from"../../core/collectionUtils.js";import{deprecatedFunction as r}from"../../core/deprecate.js";import a from"../../core/Error.js";import h from"../../core/Handles.js";import d from"../../core/Logger.js";import{abortMaybe as m}from"../../core/maybe.js";import{debounce as c,ignoreAbortErrors as p,after as u,throwIfAborted as g,createResolver as b}from"../../core/promiseUtils.js";import{watch as f,on as y,initial as T}from"../../core/reactiveUtils.js";import{throttle as w}from"../../core/throttle.js";import{property as _,subclass as C}from"../../core/accessorSupport/decorators.js";import{getEffectiveFieldAlias as I}from"../../editing/fieldUtils.js";import{geometryTypes as v}from"../../geometry/support/typeUtils.js";import{getLowerCaseDefaultHiddenFields as E}from"../../layers/support/fieldUtils.js";import{getSubtypesFromLayer as A,isSubtypeGroupLayer as F}from"../../layers/support/layerUtils.js";import{createFieldInfos as S}from"../../support/popupUtils.js";import j from"../../tables/AttributeTableTemplate.js";import R from"../../tables/support/FieldOrder.js";import x from"../../time/TimeExtent.js";import{defaultHighlightName as U,temporaryHighlightName as O}from"../../views/support/HighlightDefaults.js";import{highlightsSupported as V}from"../../views/support/layerViewUtils.js";import{isISelectableLayerWithObjectIds as P}from"../../views/support/selectionUtils.js";import z from"./ActionColumn.js";import W from"./AttachmentsColumn.js";import H from"./FieldColumn.js";import L from"./RelationshipColumn.js";import B from"./Grid/Column.js";import G from"./Grid/Grid.js";import k from"./Grid/GridViewModel.js";import N from"./Grid/GroupColumn.js";import D from"./support/AttachmentsColumnTemplate.js";import M from"./support/AttachmentsViewOptions.js";import{isAttachmentsColumn as $,isFieldColumn as Z,isRelationshipColumn as q}from"./support/columnUtils.js";import{downloadAttachmentInfo as Q,exportToCSV as K}from"./support/exportUtils.js";import J from"./support/FeatureStore.js";import X from"./support/FieldColumnTemplate.js";import Y from"./support/RelationshipColumnTemplate.js";import ee from"./support/TableTemplate.js";import{isIFeatureTableSupportedLayerWithFieldConfigurations as te,isIFeatureTableSupportedLayerWithRelationships as ie,findRelatedLayerInSources as se,findRelationship as le,uniqueColumnNames as ne,hasColumnForField as oe,findField as re,isIFeatureTableSupportedLayerWithAttachments as ae,getTableHighlightKey as he,getRelationshipIdsToShow as de}from"./support/tableUtils.js";import{createAttributeTableElements as me}from"./support/templateUtils.js";import{goTo as ce}from"../support/goToUtils.js";import{messageBundle as pe}from"../support/widget.js";const ue="80px";let ge=class extends k{constructor(e){super(e),this._currentTemporaryHighlight=null,this._highlights=new h,this._refreshDebounced=c(()=>this._refresh()),this._syncTemplateThrottled=w(()=>this._syncAttributeTableTemplate()),this._temporaryHighlightAbortController=null,this.attachmentsViewOptions=new M,this.attributeTableTemplate=null,this.autoRefreshEnabled=!0,this.columns=new n,this.dataProvider=async(e,t)=>{const{layer:i,store:s}=this;if(!t)return;if(!i||!s)return void(t&&t([]));await i.load();const{objectIds:l}=this;if(this.filterBySelectionEnabled&&!this.highlightIds.length||1===l.length&&-1===l.items[0])return void t([]);"loaded"!==s.state&&"loading"!==s.state&&await s.load();const n=this.paginationEnabled?this.pageIndex:e.page,o=await s.fetchItems({...e,page:n});t&&t(o)},this.grid=null,this.highlightEnabled=!0,this.layers=null,this.maxSize=null,this.menuConfig=null,this.messages=null,this.messagesCommon=null,this.messagesUnits=null,this.messagesURIUtils=null,this.prompt=null,this.relatedTables=new n,this.relationshipColumnConfigs=null,this.selectionSource="table",this.showRelatedTableCallback=null,this.store=null,this.syncTemplateOnChangesEnabled=!0,this.tableController=null,this.tableParent=null,this.tableTemplate=null,this.tableTemplateOverride=null,this._onLayerRefresh=this._onLayerRefresh.bind(this),this._onShowPromptCallback=this._onShowPromptCallback.bind(this),this._set("store",new J),this._set("grid",new G({viewModel:this}))}initialize(){const e=async()=>{this.messages=await s("esri/widgets/FeatureTable/t9n/FeatureTable"),this.messagesCommon=await s("esri/t9n/common"),this.messagesUnits=await s("esri/core/t9n/Units"),this.messagesURIUtils=await s("esri/widgets/support/t9n/uriUtils")};e(),this.addHandles([t(()=>{e(),this._generateColumns()}),f(()=>[this.messages,this.messagesCommon,this.messagesURIUtils],()=>{const e=this.messages;this.grid&&(this.grid.messages=e),this.allColumns.forEach(t=>{t.messages=e,t.messagesCommon=this.messagesCommon,t.messagesURIUtils=this.messagesURIUtils}),this.refreshCellContent()},T),y(()=>this.highlightIds,"change",e=>this._onHighlightIdsChange(e),{onListenerAdd:()=>this._syncSelection(),onListenerRemove:()=>this._highlights.removeAll()}),f(()=>this.grid?.temporaryHighlightId,e=>{this._temporaryHighlightAbortController?.abort(),this._temporaryHighlightAbortController=new AbortController,p(this._syncTemporaryHighlight(e,this._temporaryHighlightAbortController.signal))}),f(()=>this.attachmentsEnabled,()=>this.layer?.loaded&&this._generateColumns()),f(()=>this._viewSelection,()=>{this._viewSelectionReady&&(this.highlightIds.items=this._viewSelection)}),f(()=>[this._tableHighlightsReady,this._viewSelectionReady],()=>this._syncSelection()),f(()=>this.layer,async(e,t)=>{const i=this.grid;i&&(i.clearSort(),e&&t&&await this.reset()),this.goToPage(0),this._drainColumns(),this.store.layer=e,e&&(e.loaded?this._onLayerLoad():e.load().catch(()=>{})),t&&null!=this.attachmentsViewOptions.objectId&&(this.attachmentsViewOptions.objectId=null)}),f(()=>this.layer?.loaded,e=>e&&this._onLayerLoad()),f(()=>this.store.state,e=>{"loaded"===e&&(this.scrollToTop(),this.refreshCellContent())}),f(()=>this._effectiveTableTemplate,()=>{this.scrollLeft(),this.layer?.loaded&&this._generateColumns()}),f(()=>this.editingEnabled,()=>this.refreshCellContent()),f(()=>this.timeZone??this.view?.timeZone,()=>this.refreshCellContent()),f(()=>this.store.effectiveWhere,()=>"loaded"===this.store.state&&this.reset()),f(()=>this.layer?.timeExtent,(e,t)=>(e||t)&&!this.timeExtent&&"loaded"===this.store.state&&this.reset()),y(()=>this.layer,"refresh",e=>this._onLayerRefresh(e)),y(()=>this.grid,["cell-click","cell-dblclick","cell-pointerover","cell-pointerout","cell-keydown","column-reorder"],({index:e,item:t,native:i,path:s,type:l})=>{const n=t?.feature,o=n?.getObjectId(),r="cell-keydown"===l&&i&&i instanceof KeyboardEvent&&"Enter"===i.key;this.emit(l,{feature:n,index:e,native:i,type:l,fieldName:s??void 0,objectId:o}),(r||"cell-click"===l)&&this._onCellInteraction(o)}),f(()=>this.actionColumnConfig,e=>{const{actionColumn:t,columns:i}=this;t?e?t.set(e):i.remove(t):e&&i.length&&i.add(this._generateActionColumn(),!1!==e.frozenToEnd?void 0:this._getIndexOfFirstFrozenToEndColumn())}),f(()=>this.relatedRecordsEnabled,()=>this.layer?.loaded&&this._generateColumns()),y(()=>this.objectIds,"change",()=>this._onObjectIdsChange(),{onListenerAdd:()=>this._onObjectIdsChange()}),f(()=>[this.paginationEnabled,this.pageIndex],()=>this.refreshPageCache()),f(()=>this.activeSortOrders,e=>{this.store.sortOrders=e,this._syncTemplateThrottled()}),f(()=>this.allVisibleColumns,()=>this._syncTemplateThrottled()),f(()=>this.pageCount,()=>{this.pageIndex>=this.pageCount&&this.goToPage(0)}),f(()=>this.state,e=>{"disabled"===e&&this.relatedTables.length&&this.drainRelatedTables()}),y(()=>this.tableParent?.highlightIds,"change",({added:e})=>{const{relationshipConfig:t}=this,i=e[0];if(null==i||!t)return;const{relatedLayer:s,relationshipId:l}=t;this.relationshipConfig={objectId:i,relatedLayer:s,relationshipId:l}}),y(()=>this.tableParent,"cell-click",e=>{const{tableParent:t}=this,{objectId:i}=e;t&&null!=i&&t.highlightIds.add(i)}),f(()=>this.attachmentsViewOptions.objectId,(e,t)=>{null!=e?null==t&&this.showAttachmentsView({objectId:e}):this.hideAttachmentsView()}),f(()=>this.layerFieldConfigurations,()=>this.refreshCellContent())])}destroy(){this._drainColumns(),this._highlights.removeAll(),this._highlights.destroy(),this._currentTemporaryHighlight?.handle.remove(),this._temporaryHighlightAbortController=m(this._temporaryHighlightAbortController),this.grid?.destroy(),this.columns.destroyed||this.columns.destroy(),this.layer=null,this.view=null}get _defaultHiddenFields(){return E(this.layer)}get _effectiveTableTemplate(){return this.tableTemplateOverride||this.tableTemplate}get _effectiveAttributeTableTemplate(){return this.attributeTableTemplate||this.layer?.attributeTableTemplate}get _highlightableLayerView(){const e=this.layerView;return V(e)?e:null}get _selectionManager(){const{view:e}=this;return!e||e.destroyed?null:e.selectionManager?.sources?.length?e.selectionManager:null}get _selectableLayer(){const{layer:e}=this;return P(e)&&this._selectionManager?.sources?.includes(e)?e:null}get _subtypes(){return A(this.layer)}get _tableHighlightsReady(){return!("table"!==this.selectionSource||!this.highlightEnabled||!this._highlightableLayerView)}get _viewSelection(){const{_selectableLayer:e}=this;return e?this._selectionManager?.getSelection(e)??[]:[]}get _viewSelectionReady(){return!(!this.layer||"view"!==this.selectionSource||!this._selectionManager)}get actionColumn(){return super.actionColumn}get activeFilters(){const{filterGeometry:e,objectIds:t,filterBySelectionEnabled:i,highlightIds:s}=this,l=new n;return e&&l.push({type:"geometry",geometry:e}),i?l.push({type:"selection",objectIds:s.toArray()}):t.length&&l.push({type:"objectId",objectIds:t.toArray()}),l}get activeSortOrders(){return this.grid?.sortOrders?this.grid.sortOrders.map(({path:e,direction:t})=>({fieldName:e,direction:t})).filter(e=>e.fieldName&&e.direction):[]}get allColumns(){return super.allColumns}get allRelatedTablesVisible(){return!!(this.relatedRecordsEnabled&&this.relatedTables.length&&this.showAllRelatedTables)}get allVisibleColumns(){return super.allVisibleColumns}get attachmentsColumns(){return this.allColumns.filter(e=>$(e))}get attachmentsEnabled(){return this.store.attachmentsEnabled}set attachmentsEnabled(e){this.store.attachmentsEnabled=e}get autoSaveEnabled(){return this.store.autoSaveEnabled}set autoSaveEnabled(e){this.store.autoSaveEnabled=e}get clearPrompt(){return()=>this.prompt=null}set clearPrompt(e){this._overrideIfSome("clearPrompt",e)}get definitionExpression(){return this.store.where}set definitionExpression(e){this.store.where=e}get editingEnabled(){return super.editingEnabled}set editingEnabled(e){super.editingEnabled=e}get effectiveSize(){return super.effectiveSize}get fieldColumns(){return this.allColumns.filter(e=>Z(e))}get filterGeometry(){return this.store.filterGeometry}set filterGeometry(e){this.store.filterGeometry=e}get filterBySelectionEnabled(){return!!this._get("filterBySelectionEnabled")}set filterBySelectionEnabled(e){const{objectIds:t}=this,i=t.length;e?(i&&(t.removeAll(),this._logWarning("Selection filter has been applied with an objectID filter. Object ID filter has been removed.")),this.filterGeometry&&this._logWarning("Selection filter has been applied with a geometry filter. Results may appear inconsistent"),this._syncObjectIdsWithStore(this.highlightIds.toArray())):i||this._syncObjectIdsWithStore(null),this._set("filterBySelectionEnabled",e)}get groupColumns(){return super.groupColumns}get hasContingentValues(){return this.store.hasContingentValues}get hasInvalidPendingEdits(){return this.store.hasInvalidPendingEdits}get hasPendingEdits(){return this.store.hasPendingEdits}get hiddenFields(){return this._get("hiddenFields")??new n}set hiddenFields(e){this._set("hiddenFields",o(e,this._get("hiddenFields"),n))}get highlightIds(){return super.highlightIds}set highlightIds(e){super.highlightIds=e}get initialSize(){return this.store.initialSize}set initialSize(e){this.store.initialSize=e}get isEditing(){return super.isEditing}get isQuerying(){return super.isQuerying}get isSyncing(){return super.isSyncing}get isQueryingOrSyncing(){return this.isQuerying||this.isSyncing||this.relatedTables.some(e=>!!e.isQueryingOrSyncing)}get isSyncingAttachments(){return this.store.isSyncingAttachmentEdits||this.relatedTables.some(e=>!!e.isSyncingAttachments)}get layer(){return this._get("layer")}set layer(e){this._highlights.removeAll(),this.drainRelatedTables(),this._set("layer",e)}get layerFieldConfigurations(){const e=this.layer;return te(e)?e.fieldConfigurations:void 0}get layerView(){return this.store.layerView}get objectIds(){return super.objectIds}set objectIds(e){super.objectIds=e}get outFields(){return this.store.outFields}set outFields(e){this.store.outFields=e}get pageCount(){return super.pageCount}get pageIndex(){return super.pageIndex}set pageIndex(e){super.pageIndex=e}get pageSize(){return super.pageSize}set pageSize(e){super.pageSize=e}get relatedRecordsEnabled(){return this.store.relatedRecordsEnabled}set relatedRecordsEnabled(e){this.store.relatedRecordsEnabled=e}get relatedTable(){return this.relatedTables.at(-1)}get relationship(){const e=this.relationshipConfig?.relationshipId;return null==e?null:this.relationships?.find(({id:t})=>t===e)}get relationshipColumns(){return this.allColumns.filter(e=>q(e))}get relationshipConfig(){return this.store.relationshipConfig}set relationshipConfig(e){this.highlightIds.removeAll(),this.objectIds.removeAll(),this.filterBySelectionEnabled=!1,this.store.relationshipConfig=e}get relationshipInfos(){const{layer:e,layers:t,relationships:i,tableController:s}=this,l=this.store.relationshipInfos;if(l.length||!ie(e)||!i?.length)return l;const n=[],o=s?.layers||t||[];return i.forEach(t=>{const i=se(e,o,t);i&&(i.load(),n.push({layer:e,relatedLayer:i,relationshipId:t.id}))}),n}get relationships(){return this.store.relationships}get returnGeometryEnabled(){return this.store.returnGeometry}set returnGeometryEnabled(e){this.store.returnGeometry=e}get returnMEnabled(){return this.store.returnM}set returnMEnabled(e){this.store.returnM=e}get returnZEnabled(){return this.store.returnZ}set returnZEnabled(e){this.store.returnZ=e}get rowHighlightIds(){return super.rowHighlightIds}set rowHighlightIds(e){super.rowHighlightIds=e}get showAllRelatedTables(){return this._get("showAllRelatedTables")}set showAllRelatedTables(e){const{relatedTable:t}=this;this._set("showAllRelatedTables",e),t&&(e?this._showAllRelatedTables(t):this._hideAllRelatedTables(t))}get showPrompt(){return e=>{this.prompt?.cancel?.(),this.prompt=e}}set showPrompt(e){this._overrideIfSome("showPrompt",e)}get size(){return super.size}get state(){return super.state}get supportsAttachments(){return this.store.supportsAttachments}get supportsAddAttachments(){const{store:{supportsAddAttachments:e,supportsEditing:t}}=this;return this.editingEnabled&&t&&e}get supportsDeleteAttachments(){return this.supportsUpdateAttachments}get supportsResizeAttachments(){return this.store.supportsResizeAttachments}get supportsUpdateAttachments(){const{store:{supportsUpdateAttachments:e,supportsEditing:t}}=this;return this.editingEnabled&&t&&e}get timeExtent(){return this.store.timeExtent}set timeExtent(e){this.store.timeExtent=e}get timeZone(){return this.store.timeZone}set timeZone(e){this.store.timeZone=e}get view(){return this.store.view}set view(e){this.store.view=e,this.fieldColumns.forEach(t=>t.view=e),this.refreshCellContent()}get visibleColumns(){return super.visibleColumns}async addAttachment(e,t){const{attachmentsViewOptions:i,store:s}=this,l=i.objectId===e;await s.addAttachment(e,t).catch(e=>{l&&e&&"object"==typeof e&&"error"in e&&e.error instanceof a&&(this._logWarning(`Unable to add attachment. ${e.error.name} ${e.error.message}`),i.error=e.error)}),l&&!i.error&&(i.onEditComplete(),i.attachmentInfos=await s.getAttachmentsByObjectId(e,!0)),this.refreshCellContent()}cancelPendingEdits(){this.store.cancelPendingEdits()}async deleteAttachments(e,t){const{attachmentsViewOptions:i,store:s}=this,l=i.objectId===e;await s.deleteAttachments(e,t).catch(e=>{l&&e&&"object"==typeof e&&"error"in e&&e.error instanceof a&&(this._logWarning(`Unable to delete attachment(s). ${e.error.name} ${e.error.message}`),i.error=e.error)}),l&&!i.error&&(i.onEditComplete(),i.attachmentInfos=await s.getAttachmentsByObjectId(e,!0)),this.refreshCellContent()}collapseRelatedTable(e,t){const{relatedLayer:i,objectId:s,relationshipId:l}=t,{objectIdField:o}=i,r=le(i,l),a=i.displayField||r?.keyField||o;e.set({highlightIds:new n([s]),multipleSelectionEnabled:!1,tableTemplateOverride:this._getTableTemplateForRelatedTableView(e,a,l)});const h=e.hiddenFields;h.includes(ne.action)||h.add(ne.action),h.includes(ne.attachments)||h.add(ne.attachments),e.scrollLeft()}async deleteSelection(){const e=this.highlightIds.toArray();if(!e?.length)return;const{deleteFeatureResults:t}=await this.store.deleteRowsByObjectId(e),i=t.filter(e=>!e.error).map(e=>e.objectId);i.length&&(this.highlightIds.removeMany(i),await this.refresh())}async downloadAttachmentById(e,t){const i=(await this.store.getAttachmentsByObjectId(e,!0)).find(e=>e.id===t);await Q(i)}drainRelatedTables(){this.relatedTables.drain(e=>e.destroy()),this.set({multipleSelectionEnabled:!0,relationshipColumnConfigs:null,showAllRelatedTables:!1,tableTemplateOverride:null}),this.hiddenFields.removeMany([ne.action,ne.attachments])}drainRelatedTablesAboveIndex(e){const{relatedTables:t}=this,i=t.slice(e+1);t.removeMany(i).forEach(e=>e.destroy());const s=t.at(-1);s&&(s.attachmentsViewOptions.objectId=null,this.allRelatedTablesVisible?this._showAllRelatedTables(s):this._hideAllRelatedTables(s))}async exportSelectionToCSV(e){const{highlightIds:t,layer:i,outFields:s}=this;i&&t.length?await K({layer:i,objectIds:t.toArray(),outFields:s,includeGeometry:e}):this._logWarning("Export failed.")}filterBySelection(){this.filterBySelectionEnabled?this._logWarning("Property 'filterBySelectionEnabled' is already 'true'. This method has no effect."):(r(d.getLogger(this),"`FeatureTable.filterBySelection` is deprecated in favor of 'filterBySelectionEnabled' and 'objectIds'",{replacement:"FeatureTable.filterBySelectionEnabled or FeatureTable.objectIds",version:"4.30",warnOnce:!0}),this.objectIds.addMany(this.highlightIds.toArray()))}async getFeatureTitle(e,t){return this.store.getFeatureTitle(e,t)}getFeatureTitleSync(e){const t=this.layer;if(!t)return`${e}`;const i=`${t.objectIdField}: ${e}`;return null==e?i:this.store.featureTitleMap.get(e)??i}getObjectIdIndex(e){return this.store.getItemIndexByObjectId(e)}getValue(e,t){const i=this.store.getItemByObjectId(e);return i?.feature?.attributes[t]}getVirtualPageIndex(){return this.grid?.getVirtualPageIndex()??0}goToPage(e){if(null==e||!Number.isInteger(e))return void this._logWarning("Invalid 'page' parameter provided to 'goToPage()'. Current page will remain the same.");const{pageCount:t}=this;(e>=t||-1===e)&&(e=t-1),e<-1&&(e=0),e!==this.pageIndex&&(this.pageIndex=e),this.paginationEnabled||this.scrollToIndex(e*this.pageSize)}hideAttachmentsView(){this.attachmentsViewOptions.objectId=null,this.set({relationshipColumnConfigs:null,multipleSelectionEnabled:!0,tableTemplateOverride:null}),this.hiddenFields.remove(ne.action)}nextPage(){const e=this.paginationEnabled?this.pageIndex:this.getVirtualPageIndex();this.goToPage(e+1)}previousPage(){const e=this.paginationEnabled?this.pageIndex:this.getVirtualPageIndex();this.goToPage(e-1)}async refresh(){await Promise.all([...this.relatedTables.map(e=>e.refresh()),p(this._refreshDebounced())])}refreshCellContent(){this.grid?.requestContentUpdate()}refreshPageCache(){this.grid?.refreshPageCache()}async reset(){this.goToPage(0),await(this.grid?.reset())}async savePendingEdits(){await this.store.savePendingEdits(),await this.refresh()}scrollLeft(){this.grid?.scrollLeft(0)}scrollToBottom(){this.grid?.scrollToBottom()}scrollToIndex(e){this.grid?.scrollToIndex(e)}scrollToRow(e){const t=this.store.getItemIndexByObjectId(e);t>-1?this.grid?.scrollToIndex(t):this._logWarning("Row not found. Associated data may not be loaded yet.")}scrollToTop(){this.grid?.scrollToTop()}async saveAttachmentsViewForm(){const{attachmentId:e,form:t,objectId:i}=this.attachmentsViewOptions;null!=i&&t&&(null!=e?await this.updateAttachment(i,e,t):await this.addAttachment(i,t))}async showAttachmentsView({objectId:e}){const{attachmentsViewOptions:t,hiddenFields:i,layer:s}=this;if(!this.attachmentsEnabled||!s)return void this._logWarning("The 'attachmentsEnabled' property is currently false.");await s.load();const l=this._getDefaultLayerDisplayField(s),o=await this.store.getAttachmentsByObjectId(e,!0),r=this.store.getItemIndexByObjectId(e);t.set({attachmentInfos:o,mode:o.length?"list":"file",objectId:e}),this.set({highlightIds:new n([e]),multipleSelectionEnabled:!1,relationshipColumnConfigs:[],tableTemplateOverride:this._getTableTemplateForAttachmentsView(l)}),i.includes(ne.action)||i.add(ne.action),null!=r&&this.scrollToIndex(r)}syncAttributeTableTemplate(){this._syncAttributeTableTemplate(!0)}clearSelectionFilter(){r(d.getLogger(this),"`FeatureTable.clearSelectionFilter` is deprecated in favor of 'filterBySelectionEnabled' and 'objectIds'",{replacement:"FeatureTable.filterBySelectionEnabled or FeatureTable.objectIds",version:"4.30",warnOnce:!0}),this.objectIds.removeAll()}async updateAttachment(e,t,i){const{attachmentsViewOptions:s,store:l}=this,n=s.objectId===e;await l.updateAttachment(e,t,i).catch(e=>{n&&e&&"object"==typeof e&&"error"in e&&e.error instanceof a&&(this._logWarning(`Unable to update attachment. ${e.error.name} ${e.error.message}`),s.error=e.error)}),n&&!s.error&&(s.onEditComplete(),s.attachmentInfos=await l.getAttachmentsByObjectId(e,!0)),this.refreshCellContent()}async zoomToSelection(){const{layer:e,view:t}=this,i=this.highlightIds.toArray();if(!e||!t||!i.length)return;const s=e.createQuery();s.objectIds=i,s.returnGeometry=!0;const l=await e.queryFeatures(s);try{await ce(t,l.features)}catch(n){"AbortError"!==n.name&&console.error(n)}}_syncAttributeTableTemplate(e=!1){const{_effectiveAttributeTableTemplate:t,layer:i,tableTemplateOverride:s,syncTemplateOnChangesEnabled:l}=this;if(!i||!t||!l&&!e||s||this.tableParent||this.relatedTable||null!==this.attachmentsViewOptions.objectId)return;const{activeSortOrders:n,allColumns:o,columns:r}=this,a=[],h=me(r.toArray());n.forEach(({fieldName:e,direction:t})=>{e&&t&&a.push(new R({field:e,order:t}))}),o.forEach(({fieldName:e,direction:t})=>{t&&!a.some(t=>t.field===e)&&a.push(new R({field:e,order:t}))}),t.elements=h,t.orderByFields=a}async _refresh(){await this.store.refresh();const e=this.highlightIds.toArray();if(e.length){(await this.store.verifyFeaturesByObjectId(e)).forEach((t,i)=>{t||this.highlightIds.remove(e[i])})}this.refreshPageCache();const t=this.attachmentsViewOptions;null!=t?.objectId&&(t.attachmentInfos=await this.store.getAttachmentsByObjectId(t.objectId,!0))}async _onLayerLoad(){const{layer:e,pageSize:t}=this;if(!e)return;e.parent&&F(e.parent)&&await e.parent.loadAll();const i=e.capabilities.query?.maxRecordCount,s=i&&i<t,l=s?i:t;s&&(this._logWarning("The value for 'pageSize' has been adjusted due to the provided layer's max record count."),this.pageSize=l),this.grid?.set("pageSize",l),this.store.load(),this._generateColumns()}_onLayerRefresh(e){this.autoRefreshEnabled&&e.dataChanged&&this.refresh()}_generateColumns(){this._drainColumns();const{_effectiveTableTemplate:e,_effectiveAttributeTableTemplate:t}=this,i=e?.columnTemplates,s=this._generateColumnsFromColumnTemplates(i)??this._generateColumnsFromAttributeTableTemplate(t)??this._generateDefaultFieldColumns();s.length&&(this.attachmentsEnabled&&!s.some(e=>$(e))&&s.push(this._generateDefaultAttachmentsColumn()),this.relatedRecordsEnabled&&this.relationshipInfos.length&&!s.some(e=>q(e))&&s.push(...this._generateDefaultRelationshipColumns()),this.actionColumnConfig&&s.push(this._generateActionColumn()),s.sort((e,t)=>e.frozen&&t.frozen||e.frozenToEnd&&t.frozenToEnd?0:e.frozen||t.frozenToEnd?-1:0),this.columns.addMany(s))}_generateColumnsFromAttributeTableTemplate(e){const{layer:t}=this;if(!e||!t)return null;const{elements:i,orderByFields:s}=e,n=S(t),o=[];o.push(...this._generateColumnsFromAttributeTableElements(i,s));const r=n.map(e=>{if(!e.fieldName||oe(e.fieldName,o))return null;const{fieldName:i}=e,l=re(t,i);return l?this._generateDefaultFieldColumn(l,{hidden:!0,orderByFields:s}):(this._logTemplateWarning("A valid 'field' could not be found for the provided template."),null)}).filter(l);return o.push(...r),this.attachmentsEnabled&&ae(t)&&!o.some(e=>$(e))&&o.push(this._generateDefaultAttachmentsColumn({hidden:!0})),this.relatedRecordsEnabled&&ie(t)&&t.relationships?.forEach(({id:e},t)=>{const i=this.relationshipInfos.find(t=>t.relationshipId===e);i&&!o.some(t=>q(t)&&t.relationshipId===e)&&o.push(this._generateDefaultRelationshipColumn({hidden:!0,info:i,index:t}))}),o.length?o:null}_generateColumnsFromAttributeTableElements(e,t){const{layer:i}=this;return i?e?.map((e,i)=>{switch(e.type){case"field":return this._createFieldColumnFromElement({element:e,orderByFields:t});case"group":return this._createGroupColumnFromElement({element:e,orderByFields:t});case"attachment":return this._createAttachmentColumnFromElement({element:e,index:i});case"relationship":return this._createRelationshipColumnFromElement({element:e,index:i})}}).filter(e=>!!e)??[]:[]}_createFieldColumnFromElement(e){const{layer:t}=this;if(!t)return null;const{element:i,orderByFields:s}=e,{fieldName:l}=i;if(null==l)return this._logTemplateWarning("A valid 'fieldName' must be provided."),null;const n=re(t,l);if(!n)return this._logTemplateWarning("A valid 'field' could not be found for the provided template."),null;const{description:o,label:r}=i,a=s?.findIndex(({field:e})=>e&&e===l)??-1,h=a>-1?s?.at(a)?.order:void 0,d=a>-1?a:void 0,{grid:m,messages:c,messagesCommon:p,messagesURIUtils:u,store:g,view:b}=this;return new H({description:o,direction:h,field:n,fieldName:l,grid:m,initialSortPriority:d,label:r,layer:t,messages:c,messagesCommon:p,messagesURIUtils:u,store:g,view:b,onShowPromptCallback:this._onShowPromptCallback})}_createGroupColumnFromElement(e){const{element:t,orderByFields:i}=e,{description:s,label:l}=t;if(!l)return this._logTemplateWarning("Group columns require a label."),null;if(!t.elements.length)return this._logTemplateWarning("Group columns require child columns."),null;const{grid:n,messages:o,messagesCommon:r,messagesURIUtils:a,store:h}=this;return new N({columns:this._generateColumnsFromAttributeTableElements(t.elements,i),description:s,grid:n,label:l,messages:o,messagesCommon:r,messagesURIUtils:a,store:h})}_createAttachmentColumnFromElement(e){if(!this.attachmentsEnabled)return void this._logTemplateWarning("The 'attachmentsEnabled' property is currently false.");const{element:t,index:i}=e,{description:s,label:l}=t,{grid:n,layer:o,messages:r,messagesCommon:a,messagesURIUtils:h,store:d}=this;return new W({description:s,fieldName:`${ne.attachments}-${i}`,grid:n,label:l,layer:o,messages:r,messagesCommon:a,messagesURIUtils:h,store:d,onShowAttachments:e=>this._onShowAttachments(e)})}_createRelationshipColumnFromElement(e){if(!this.relatedRecordsEnabled)return void this._logTemplateWarning("Relationship columns require related records to be enabled on the table.");const{element:t,index:i}=e,{description:s,label:l,relationshipId:n}=t,o=this.relationshipInfos.find(e=>e.relationshipId===n);if(!o)return this._logTemplateWarning("Unable to find valid related layer target based on the provided relationship id."),null;const{grid:r,messages:a,messagesCommon:h,messagesURIUtils:d,store:m}=this;return new L({description:s,fieldName:`${ne.relationship}-${n}-${i}`,grid:r,label:l,messages:a,messagesCommon:h,messagesURIUtils:d,relationshipId:n,store:m,layer:o.relatedLayer,relatedLayer:o.layer,showRelatedTableCallback:e=>this._onShowRelatedTable(e)})}_generateColumnsFromColumnTemplates(e){const{grid:t,layer:i,messages:s,messagesCommon:l,messagesURIUtils:n,store:o,view:r}=this;if(!e?.length||!i)return null;const a=[];return e.forEach((e,h)=>{const{autoWidth:d,description:m,direction:c,flexGrow:p,fieldName:u,formatFunction:g,frozen:b,frozenToEnd:f,icon:y,iconText:T,initialSortPriority:w,invalid:_,label:C,labelTooltipText:I,menuConfig:v,resizable:E,sortable:A,textAlign:F,textWrap:S,timeZone:j,type:R,width:x}=e;if(!R)return void this._logTemplateWarning("Property 'type' is missing from the provided template.");if(b&&f)return void this._logTemplateWarning("Properties 'frozen' and 'frozenToEnd' cannot both be true for the same column.");const U=!1===e.visible;if("group"===R){if(!e.columnTemplates?.length)return void this._logTemplateWarning("Group columns must contain column templates.");if(!e.label)return void this._logTemplateWarning("Group columns require a label.");const i=this._generateColumnsFromColumnTemplates(e.columnTemplates),o=U||this._isFieldHidden(e.label);a.push(new N({autoWidth:d,columns:i,description:m,flexGrow:p,frozen:b,frozenToEnd:f,grid:t,hidden:o,icon:y,iconText:T,invalid:_,label:C,labelTooltipText:I,menuConfig:v,messages:s,messagesCommon:l,messagesURIUtils:n,resizable:E,textAlign:F,textWrap:S,timeZone:j,width:x}))}else if("attachment"===R){if(!this.attachmentsEnabled)return void this._logTemplateWarning("Attachment columns require attachments to be enabled on the table.");a.push(this._generateAttachmentsColumnFromTemplate(e,h))}else if("relationship"===R){if(!this.relatedRecordsEnabled)return void this._logTemplateWarning("Relationship columns require related records to be enabled on the table.");const{relationshipId:t}=e;if(null==t)return void this._logTemplateWarning("Property 'relationshipId' is missing from the provided template.");const i=this.relationshipInfos.find(e=>e.relationshipId===t);if(!i)return void this._logTemplateWarning("Unable to find valid related layer target based on the provided relationship id.");a.push(this._generateRelationshipColumnFromTemplate(i,e,h))}else if(!u)return void this._logTemplateWarning("Value for 'fieldName' property was missing from the provided template.");const O=U||this._isFieldHidden(u);if("column"===R)a.push(new B({autoWidth:d,description:m,direction:c,fieldName:u,flexGrow:p,formatFunction:g,frozen:b,frozenToEnd:f,grid:t,hidden:O,icon:y,iconText:T,initialSortPriority:w,invalid:_,label:C,labelTooltipText:I,menuConfig:v,messages:s,messagesCommon:l,messagesURIUtils:n,resizable:E,sortable:A,textAlign:F,textWrap:S,timeZone:j,width:x}));else if("field"===R){const h=re(i,e.fieldName);if(!h)return void this._logTemplateWarning("A valid 'field' could not be found for the provided template.");const{editable:u,required:R}=e;a.push(new H({autoWidth:d,description:m,direction:c,editable:u,field:h,fieldName:h.name,flexGrow:p,formatFunction:g,frozen:b,frozenToEnd:f,grid:t,hidden:O,icon:y,iconText:T,initialSortPriority:w,invalid:_,label:C,labelTooltipText:I,layer:i,messages:s,messagesCommon:l,messagesURIUtils:n,menuConfig:v,required:R,resizable:E,sortable:A,store:o,template:e,textAlign:F,textWrap:S,timeZone:j,width:x,view:r,onShowPromptCallback:this._onShowPromptCallback}))}}),a.length?a:null}_generateDefaultFieldColumns(){return this.layer?.fields?.map(e=>this._generateDefaultFieldColumn(e)).filter(l)??[]}_generateDefaultFieldColumn(e,t){const{grid:i,layer:s,messages:l,messagesCommon:n,messagesURIUtils:o,store:r,view:a}=this,h=t?.orderByFields;if(!e.visible||"geometry"===e.type)return null;const d=e.name,m=h?.findIndex(({field:e})=>e&&e===d)??-1,c=m>-1?h?.at(m)?.order:void 0,p=m>-1?m:void 0;return new H({direction:c,field:e,fieldName:d,grid:i,hidden:t?.hidden||this._isFieldHidden(d),initialSortPriority:p,layer:s,messages:l,messagesCommon:n,messagesURIUtils:o,store:r,view:a,onShowPromptCallback:this._onShowPromptCallback})}_generateAttachmentsColumnFromTemplate(e,t){const{grid:i,layer:s,messages:l,messagesCommon:n,messagesURIUtils:o,store:r}=this,{attachmentsViewEnabled:a,autoWidth:h,description:d,flexGrow:m,fieldName:c,formatFunction:p,frozen:u,frozenToEnd:g,icon:b,iconText:f,invalid:y,label:T,labelTooltipText:w,menuConfig:_,resizable:C,textAlign:I,textWrap:v,thumbnailAppearance:E,thumbnailCount:A,thumbnailIconScale:F,thumbnailsEnabled:S,timeZone:j,width:R}=e;return new W({attachmentsViewEnabled:a,autoWidth:h,description:d,fieldName:`${ne.attachments}-${t}`,flexGrow:m,formatFunction:p,frozen:u,frozenToEnd:g,grid:i,hidden:!1===e.visible||this._isFieldHidden(T)||this._isFieldHidden(c),icon:b,iconText:f,invalid:y,label:T,labelTooltipText:w,layer:s,menuConfig:_,messages:l,messagesCommon:n,messagesURIUtils:o,resizable:C,store:r,textAlign:I,textWrap:v,thumbnailAppearance:E,thumbnailCount:A,thumbnailIconScale:F,thumbnailsEnabled:S,timeZone:j,width:R,onShowAttachments:e=>this._onShowAttachments(e)})}_generateDefaultAttachmentsColumn(e){const{grid:t,layer:i,messages:s,messagesCommon:l,messagesURIUtils:n,store:o}=this,r=ne.attachments;return new W({fieldName:r,grid:t,hidden:e?.hidden||this._isFieldHidden(r),layer:i,messages:s,messagesCommon:l,messagesURIUtils:n,store:o,onShowAttachments:e=>this._onShowAttachments(e)})}_generateRelationshipColumnFromTemplate(e,t,i){const{grid:s,messages:l,messagesCommon:n,messagesURIUtils:o,store:r}=this,{autoWidth:a,collapsed:h,description:d,flexGrow:m,fieldName:c,formatFunction:p,frozen:u,frozenToEnd:g,icon:b,iconText:f,invalid:y,label:T,labelTooltipText:w,menuConfig:_,relationshipId:C,resizable:I,textAlign:v,textWrap:E,timeZone:A,width:F}=t;return new L({autoWidth:a,collapsed:h,description:d,fieldName:`${ne.relationship}-${C}-${i}`,flexGrow:m,formatFunction:p,frozen:u,frozenToEnd:g,grid:s,hidden:!1===t.visible||this._isFieldHidden(T)||this._isFieldHidden(c),icon:b,iconText:f,invalid:y,label:T,labelTooltipText:w,menuConfig:_,messages:l,messagesCommon:n,messagesURIUtils:o,relationshipId:C,resizable:I,store:r,textAlign:v,textWrap:E,timeZone:A,width:F,layer:e.relatedLayer,relatedLayer:e.layer,showRelatedTableCallback:e=>this._onShowRelatedTable(e)})}_generateDefaultRelationshipColumns(){const{relationshipInfos:e,relationshipColumnConfigs:t}=this,i=[];return e?.length?(t?t.forEach((t,s)=>{const{relationshipId:l}=t,n=e.find(e=>e.relationshipId===l);n&&i.push(this._generateDefaultRelationshipColumn({config:t,index:s,info:n}))}):e.forEach((e,t)=>i.push(this._generateDefaultRelationshipColumn({index:t,info:e}))),i):i}_generateDefaultRelationshipColumn(e){const{config:t,hidden:i,index:s,info:l}=e,{grid:n,messages:o,messagesCommon:r,messagesURIUtils:a}=this,{relationshipId:h}=l;return new L({...t,fieldName:`${ne.relationship}-${h}-${s}`,grid:n,hidden:i,messages:o,messagesCommon:r,messagesURIUtils:a,layer:l.relatedLayer,relatedLayer:l.layer,relationshipId:h,showRelatedTableCallback:e=>this._onShowRelatedTable(e)})}_generateActionColumn(){return new z({hidden:this._isFieldHidden(ne.action),...this.actionColumnConfig})}_isFieldHidden(e){const t=e?.toLowerCase();return(this.hiddenFields??this._defaultHiddenFields).some(e=>e.toLowerCase()===t)}_addTableHighlight(e){if(!this.highlightEnabled)return;const{_highlightableLayerView:t,layer:i}=this;if(t&&i){const s=this.store.getItemByObjectId(e),l=s?.feature??e;this._highlights.add(t.highlight(l,{name:U}),he(i,e))}}_removeTableHighlight(e){const{layer:t}=this;t&&this._highlights.remove(he(t,e))}async _syncTemporaryHighlight(e,t){if(!this.highlightEnabled)return this._currentTemporaryHighlight?.handle.remove(),void(this._currentTemporaryHighlight=null);if(await u(25),g(t),!this._currentTemporaryHighlight&&!e)return;const{id:i}=this._currentTemporaryHighlight??{};if(i===e)return;this._currentTemporaryHighlight?.handle?.remove(),this._currentTemporaryHighlight=null;const{_highlightableLayerView:s,layer:l,highlightEnabled:n}=this;e&&s&&l&&n&&(this._currentTemporaryHighlight={id:e,handle:s.highlight(e,{name:O})})}_syncSelection(){this._highlights.removeAll(),this._tableHighlightsReady?this.highlightIds.forEach(e=>this._addTableHighlight(e)):this._viewSelectionReady&&(this.highlightIds.items=this._viewSelection)}_appendToViewSelection(e){const{_selectableLayer:t}=this;t&&this._selectionManager?.add(t,e)}_removeFromViewSelection(e){const{_selectableLayer:t}=this;t&&this._selectionManager?.remove(t,e)}async _onHighlightIdsChange(e){const{added:t,removed:i}=e,{attachmentsViewOptions:s}=this;if(this._tableHighlightsReady?(i.forEach(e=>this._removeTableHighlight(e)),t.forEach(e=>this._addTableHighlight(e))):this._viewSelectionReady&&(this._removeFromViewSelection(i),this._appendToViewSelection(t)),this.filterBySelectionEnabled&&this._syncObjectIdsWithStore(this.highlightIds.toArray()),null!=s.objectId){const e=this.highlightIds.at(0);if(null!=e){const t=await this.store.getAttachmentsByObjectId(e,!0);s.set({attachmentInfos:t,objectId:e,mode:t.length?"list":"file"}),this.getFeatureTitle(e)}}}_onShowRelatedTable(e){const{highlightIds:t}=this,{objectId:i}=e;t.removeAll(),t.add(i),this.showRelatedTableCallback?this.showRelatedTableCallback(e):this.emit("show-related-table",e)}_onObjectIdsChange(){const e=this.objectIds.toArray();e.length&&this.filterBySelectionEnabled&&(this.filterBySelectionEnabled=!1,this._logWarning("Object ID filter was applied while a selection filter was applied. Selection filter has been removed.")),this._syncObjectIdsWithStore(e)}_syncObjectIdsWithStore(e){this.store.objectIds=e,this.refreshPageCache()}_drainColumns(){this.columns.drain(e=>!e.destroyed&&e.destroy())}_showAllRelatedTables(e){const t=e.layer;if(!t)return;const i=this._getDefaultLayerDisplayField(t);e.set({relationshipColumnConfigs:[],tableTemplateOverride:this._getTableTemplateForShowAllTablesView(e,i)});const s=e.hiddenFields;s.includes(ne.action)||s.add(ne.action),s.includes(ne.attachments)||s.add(ne.attachments)}_hideAllRelatedTables(e){const{layer:t,relationship:i}=e;if(t&&null!=i?.id)if(null!=e.attachmentsViewOptions.objectId){const i=this._getDefaultLayerDisplayField(t);e.set({multipleSelectionEnabled:!1,relationshipColumnConfigs:[],showAllRelatedTables:!1,tableTemplateOverride:this._getTableTemplateForAttachmentsView(i)})}else e.set({multipleSelectionEnabled:!0,relationshipColumnConfigs:de(t,i.id),showAllRelatedTables:!1,tableTemplateOverride:null}),e.hiddenFields.removeMany([ne.action,ne.attachments])}_getTableTemplateForRelatedTableView(e,t,i){return new ee({columnTemplates:[new X({fieldName:t,editable:!1,menuConfig:{selectionMode:"single",icon:"chevron-down",items:this._extractFieldColumnInfosFromTableTemplate(e.viewModel).map(([s,l])=>({selected:s===t,label:l||s,clickFunction:()=>{e.tableTemplateOverride=this._getTableTemplateForRelatedTableView(e,s,i)}}))},resizable:!1}),new Y({autoWidth:!1,collapsed:!0,flexGrow:0,label:"",resizable:!1,relationshipId:i,width:ue})]})}_getTableTemplateForShowAllTablesView(e,t){const i=[new X({fieldName:t,editable:!1,menuConfig:{selectionMode:"single",icon:"chevron-down",items:this._extractFieldColumnInfosFromTableTemplate(e.viewModel).map(([i,s])=>({selected:i===t,label:s||i,clickFunction:()=>{e.tableTemplateOverride=this._getTableTemplateForShowAllTablesView(e,i)}}))},resizable:!1})];return null!=e.attachmentsViewOptions.objectId&&i.push(new D({attachmentsViewEnabled:!1,autoWidth:!1,flexGrow:0,label:"",resizable:!1,thumbnailsEnabled:!1,width:ue})),new ee({columnTemplates:i})}async _onShowPromptCallback(e){const{column:t,objectId:i,oldValue:s,value:l}=e,{_subtypes:n,layer:o}=this;if(!o||!n.length)return void t.cancel();const r=n.find(e=>e.code===l);if(!r)return void t.cancel();const a=b(),h=this._createSubtypeEditPrompt(s,r,a),d=!!o.parent&&this.autoSaveEnabled;try{this.showPrompt(h);const e=await a.promise,s=[{fieldName:t.fieldName,value:l}];switch(e){case"update-fields":for(const[e,t]of Object.entries(r.defaultValues))null!=t&&s.push({fieldName:e,value:t});await t.updateItems({objectId:i,updates:s}),d&&this.refresh();break;case"keep-existing":await t.updateItems({objectId:i,updates:s}),d&&this.refresh();break;case"undo":t.cancel()}}finally{this.clearPrompt()}}_createSubtypeEditPrompt(e,t,s){const{_subtypes:l,messages:n,messagesCommon:o}=this,r=l.find(t=>t.code===e)?.name??`${e}`;let a="update-fields";const h=[{label:n.subtypes.useDefaultValuesOption,value:"update-fields"},{label:n.subtypes.keepCurrentValuesOption,value:"keep-existing"}];return{context:"info",title:n.subtypes.changeWarningTitle,message:i(n.subtypes.changeWarning,{originalType:r,newType:t.name}),radios:h,defaultRadioSelection:"update-fields",onRadioSelection:e=>{a=e},actions:{primary:{label:o.apply,action:()=>s.resolve(a),type:"positive"},secondary:{label:o.cancel,type:"neutral",action:()=>s.resolve("undo")}},cancel:()=>s.reject()}}_onShowAttachments({objectId:e}){this.attachmentsViewOptions.objectId=e}_getTableTemplateForAttachmentsView(e){return new ee({columnTemplates:[new X({fieldName:e,editable:!1,menuConfig:{selectionMode:"single",icon:"chevron-down",items:this._extractFieldColumnInfosFromTableTemplate(this).map(([t,i])=>({selected:t===e,label:i||t,clickFunction:()=>{this.tableTemplateOverride=this._getTableTemplateForAttachmentsView(t)}}))},resizable:!1}),new D({attachmentsViewEnabled:!1,autoWidth:!1,flexGrow:0,label:"",resizable:!1,thumbnailsEnabled:!1,width:ue})]})}_extractFieldColumnInfosFromTableTemplate(e){const t=e??this,{layer:i,tableTemplate:s}=t;return s?s.columnTemplates.filter(({type:e})=>"field"===e||"column"===e).map(({fieldName:e,label:t})=>{if(null!=t&&""!==t)return[e,t];const s=i?.fieldsIndex.get(e);return[e,s&&I(s,i)]}):i?.fields.map(e=>[e.name,I(e,i)])??[]}_getDefaultLayerDisplayField(e){const{displayField:t,objectIdField:i}=e;return t&&""!==t.trim()?t:i||(e.fields.length?e.fields[0].name:"")}_getIndexOfFirstFrozenToEndColumn(){const e=this.columns.findIndex(e=>e.frozenToEnd);return e>-1?e:void 0}_logWarning(e,t){t?d.getLogger(this).warnOnce(e):d.getLogger(this).warn(e)}_logTemplateWarning(e){this._logWarning(`${e} Skipped generating a column using the provided template.`,!0)}_onCellInteraction(e){null!=e&&null!=this.attachmentsViewOptions.objectId&&this.highlightIds.add(e)}};e([_()],ge.prototype,"_defaultHiddenFields",null),e([_()],ge.prototype,"_effectiveTableTemplate",null),e([_()],ge.prototype,"_effectiveAttributeTableTemplate",null),e([_()],ge.prototype,"_highlights",void 0),e([_()],ge.prototype,"_highlightableLayerView",null),e([_()],ge.prototype,"_selectionManager",null),e([_()],ge.prototype,"_selectableLayer",null),e([_()],ge.prototype,"_subtypes",null),e([_()],ge.prototype,"_tableHighlightsReady",null),e([_()],ge.prototype,"_viewSelection",null),e([_()],ge.prototype,"_viewSelectionReady",null),e([_()],ge.prototype,"activeFilters",null),e([_({readOnly:!0})],ge.prototype,"activeSortOrders",null),e([_()],ge.prototype,"allRelatedTablesVisible",null),e([_()],ge.prototype,"attachmentsColumns",null),e([_()],ge.prototype,"attachmentsEnabled",null),e([_()],ge.prototype,"attachmentsViewOptions",void 0),e([_({type:j})],ge.prototype,"attributeTableTemplate",void 0),e([_()],ge.prototype,"autoRefreshEnabled",void 0),e([_()],ge.prototype,"autoSaveEnabled",null),e([_()],ge.prototype,"clearPrompt",null),e([_({readOnly:!0})],ge.prototype,"columns",void 0),e([_()],ge.prototype,"dataProvider",void 0),e([_()],ge.prototype,"definitionExpression",null),e([_()],ge.prototype,"fieldColumns",null),e([_({types:v})],ge.prototype,"filterGeometry",null),e([_()],ge.prototype,"filterBySelectionEnabled",null),e([_({readOnly:!0})],ge.prototype,"grid",void 0),e([_()],ge.prototype,"hasContingentValues",null),e([_()],ge.prototype,"hasInvalidPendingEdits",null),e([_()],ge.prototype,"hasPendingEdits",null),e([_()],ge.prototype,"hiddenFields",null),e([_()],ge.prototype,"highlightEnabled",void 0),e([_()],ge.prototype,"initialSize",null),e([_()],ge.prototype,"isQueryingOrSyncing",null),e([_()],ge.prototype,"isSyncingAttachments",null),e([_()],ge.prototype,"layer",null),e([_()],ge.prototype,"layers",void 0),e([_()],ge.prototype,"layerFieldConfigurations",null),e([_()],ge.prototype,"layerView",null),e([_()],ge.prototype,"menuConfig",void 0),e([_()],ge.prototype,"messages",void 0),e([_(),pe("esri/t9n/common")],ge.prototype,"messagesCommon",void 0),e([_(),pe("esri/core/t9n/Units")],ge.prototype,"messagesUnits",void 0),e([_(),pe("esri/widgets/support/t9n/uriUtils")],ge.prototype,"messagesURIUtils",void 0),e([_()],ge.prototype,"outFields",null),e([_()],ge.prototype,"prompt",void 0),e([_()],ge.prototype,"relatedRecordsEnabled",null),e([_()],ge.prototype,"relatedTable",null),e([_()],ge.prototype,"relatedTables",void 0),e([_()],ge.prototype,"relationship",null),e([_()],ge.prototype,"relationshipColumnConfigs",void 0),e([_()],ge.prototype,"relationshipColumns",null),e([_()],ge.prototype,"relationshipConfig",null),e([_()],ge.prototype,"relationshipInfos",null),e([_()],ge.prototype,"relationships",null),e([_()],ge.prototype,"returnGeometryEnabled",null),e([_()],ge.prototype,"returnMEnabled",null),e([_()],ge.prototype,"returnZEnabled",null),e([_()],ge.prototype,"selectionSource",void 0),e([_()],ge.prototype,"showAllRelatedTables",null),e([_()],ge.prototype,"showPrompt",null),e([_()],ge.prototype,"showRelatedTableCallback",void 0),e([_({readOnly:!0,type:J})],ge.prototype,"store",void 0),e([_()],ge.prototype,"supportsAttachments",null),e([_()],ge.prototype,"supportsAddAttachments",null),e([_()],ge.prototype,"supportsDeleteAttachments",null),e([_()],ge.prototype,"supportsResizeAttachments",null),e([_()],ge.prototype,"supportsUpdateAttachments",null),e([_()],ge.prototype,"syncTemplateOnChangesEnabled",void 0),e([_()],ge.prototype,"tableController",void 0),e([_()],ge.prototype,"tableParent",void 0),e([_({type:ee})],ge.prototype,"tableTemplate",void 0),e([_()],ge.prototype,"tableTemplateOverride",void 0),e([_({type:x})],ge.prototype,"timeExtent",null),e([_()],ge.prototype,"timeZone",null),e([_()],ge.prototype,"view",null),ge=e([C("esri.widgets.FeatureTable.FeatureTableViewModel")],ge);const be=ge;export{be as default};
5
+ import{__decorate as e}from"tslib";import{onLocaleChange as t,substitute as i,fetchMessageBundle as s}from"../../intl.js";import{isSome as l}from"../../core/arrayUtils.js";import n from"../../core/Collection.js";import{referenceSetter as o}from"../../core/collectionUtils.js";import{deprecatedFunction as r}from"../../core/deprecate.js";import a from"../../core/Error.js";import h from"../../core/Handles.js";import d from"../../core/Logger.js";import{abortMaybe as m}from"../../core/maybe.js";import{debounce as c,ignoreAbortErrors as p,after as u,throwIfAborted as g,createResolver as b}from"../../core/promiseUtils.js";import{watch as f,on as y,initial as T}from"../../core/reactiveUtils.js";import{throttle as w}from"../../core/throttle.js";import{property as _,subclass as C}from"../../core/accessorSupport/decorators.js";import{getEffectiveFieldAlias as I}from"../../editing/fieldUtils.js";import{geometryTypes as v}from"../../geometry/support/typeUtils.js";import{getLowerCaseDefaultHiddenFields as E}from"../../layers/support/fieldUtils.js";import{getSubtypesFromLayer as A,isSubtypeGroupLayer as F}from"../../layers/support/layerUtils.js";import{createFieldInfos as S}from"../../support/popupUtils.js";import j from"../../tables/AttributeTableTemplate.js";import R from"../../tables/support/FieldOrder.js";import x from"../../time/TimeExtent.js";import{defaultHighlightName as U,temporaryHighlightName as O}from"../../views/support/HighlightDefaults.js";import{highlightsSupported as V}from"../../views/support/layerViewUtils.js";import{isISelectableLayerWithObjectIds as P}from"../../views/support/selectionUtils.js";import z from"./ActionColumn.js";import W from"./AttachmentsColumn.js";import H from"./FieldColumn.js";import L from"./RelationshipColumn.js";import B from"./Grid/Column.js";import G from"./Grid/Grid.js";import k from"./Grid/GridViewModel.js";import N from"./Grid/GroupColumn.js";import D from"./support/AttachmentsColumnTemplate.js";import M from"./support/AttachmentsViewOptions.js";import{isAttachmentsColumn as $,isFieldColumn as Z,isRelationshipColumn as q}from"./support/columnUtils.js";import{downloadAttachmentInfo as Q,exportToCSV as K}from"./support/exportUtils.js";import J from"./support/FeatureStore.js";import X from"./support/FieldColumnTemplate.js";import Y from"./support/RelationshipColumnTemplate.js";import ee from"./support/TableTemplate.js";import{isIFeatureTableSupportedLayerWithFieldConfigurations as te,isIFeatureTableSupportedLayerWithRelationships as ie,findRelatedLayerInSources as se,findRelationship as le,uniqueColumnNames as ne,hasColumnForField as oe,findField as re,isIFeatureTableSupportedLayerWithAttachments as ae,getTableHighlightKey as he,getRelationshipIdsToShow as de}from"./support/tableUtils.js";import{createAttributeTableElements as me}from"./support/templateUtils.js";import{goTo as ce}from"../support/goToUtils.js";import{messageBundle as pe}from"../support/widget.js";const ue="80px";let ge=class extends k{constructor(e){super(e),this._currentTemporaryHighlight=null,this._highlights=new h,this._refreshDebounced=c(()=>this._refresh()),this._syncTemplateThrottled=w(()=>this._syncAttributeTableTemplate()),this._temporaryHighlightAbortController=null,this.attachmentsViewOptions=new M,this.attributeTableTemplate=null,this.autoRefreshEnabled=!0,this.columns=new n,this.dataProvider=async(e,t)=>{const{layer:i,store:s}=this;if(!t)return;if(!i||!s)return void(t&&t([]));await i.load();const{objectIds:l}=this;if(this.filterBySelectionEnabled&&!this.highlightIds.length||1===l.length&&-1===l.items[0])return void t([]);"loaded"!==s.state&&"loading"!==s.state&&await s.load();const n=this.paginationEnabled?this.pageIndex:e.page,o=await s.fetchItems({...e,page:n});t&&t(o)},this.grid=null,this.highlightEnabled=!0,this.layers=null,this.maxSize=null,this.menuConfig=null,this.messages=null,this.messagesCommon=null,this.messagesUnits=null,this.messagesURIUtils=null,this.prompt=null,this.relatedTables=new n,this.relationshipColumnConfigs=null,this.selectionSource="table",this.showRelatedTableCallback=null,this.store=null,this.syncTemplateOnChangesEnabled=!0,this.tableController=null,this.tableParent=null,this.tableTemplate=null,this.tableTemplateOverride=null,this._onLayerRefresh=this._onLayerRefresh.bind(this),this._onShowPromptCallback=this._onShowPromptCallback.bind(this),this._set("store",new J),this._set("grid",new G({viewModel:this}))}initialize(){const e=async()=>{this.messages=await s("esri/widgets/FeatureTable/t9n/FeatureTable"),this.messagesCommon=await s("esri/t9n/common"),this.messagesUnits=await s("esri/core/t9n/Units"),this.messagesURIUtils=await s("esri/widgets/support/t9n/uriUtils")};e(),this.addHandles([t(()=>{e(),this._generateColumns()}),f(()=>[this.messages,this.messagesCommon,this.messagesURIUtils],()=>{const e=this.messages;this.grid&&(this.grid.messages=e),this.allColumns.forEach(t=>{t.messages=e,t.messagesCommon=this.messagesCommon,t.messagesURIUtils=this.messagesURIUtils}),this.refreshCellContent()},T),y(()=>this.highlightIds,"change",e=>this._onHighlightIdsChange(e),{onListenerAdd:()=>this._syncSelection(),onListenerRemove:()=>this._highlights.removeAll()}),f(()=>this.grid?.temporaryHighlightId,e=>{this._temporaryHighlightAbortController?.abort(),this._temporaryHighlightAbortController=new AbortController,p(this._syncTemporaryHighlight(e,this._temporaryHighlightAbortController.signal))}),f(()=>this.attachmentsEnabled,()=>this.layer?.loaded&&this._generateColumns()),f(()=>this._viewSelection,()=>{this._viewSelectionReady&&(this.highlightIds.items=this._viewSelection)}),f(()=>[this._tableHighlightsReady,this._viewSelectionReady],()=>this._syncSelection()),f(()=>this.layer,async(e,t)=>{const i=this.grid;i&&(i.clearSort(),e&&t&&await this.reset()),this.goToPage(0),this._drainColumns(),this.store.layer=e,e&&(e.loaded?this._onLayerLoad():e.load().catch(()=>{})),t&&null!=this.attachmentsViewOptions.objectId&&(this.attachmentsViewOptions.objectId=null)}),f(()=>this.layer?.loaded,e=>e&&this._onLayerLoad()),f(()=>this.store.state,e=>{"loaded"===e&&(this.scrollToTop(),this.refreshCellContent())}),f(()=>this._effectiveTableTemplate,()=>{this.scrollLeft(),this.layer?.loaded&&this._generateColumns()}),f(()=>this.editingEnabled,()=>this.refreshCellContent()),f(()=>this.timeZone??this.view?.timeZone,()=>this.refreshCellContent()),f(()=>this.store.effectiveWhere,()=>"loaded"===this.store.state&&this.reset()),f(()=>this.layer?.timeExtent,(e,t)=>(e||t)&&!this.timeExtent&&"loaded"===this.store.state&&this.reset()),y(()=>this.layer,"refresh",e=>this._onLayerRefresh(e)),y(()=>this.grid,["cell-click","cell-dblclick","cell-pointerover","cell-pointerout","cell-keydown","column-reorder"],({index:e,item:t,native:i,path:s,type:l})=>{const n=t?.feature,o=n?.getObjectId(),r="cell-keydown"===l&&i&&i instanceof KeyboardEvent&&"Enter"===i.key;this.emit(l,{feature:n,index:e,native:i,type:l,fieldName:s??void 0,objectId:o}),(r||"cell-click"===l)&&this._onCellInteraction(o)}),f(()=>this.actionColumnConfig,e=>{const{actionColumn:t,columns:i}=this;t?e?t.set(e):i.remove(t):e&&i.length&&i.add(this._generateActionColumn(),!1!==e.frozenToEnd?void 0:this._getIndexOfFirstFrozenToEndColumn())}),f(()=>this.relatedRecordsEnabled,()=>this.layer?.loaded&&this._generateColumns()),y(()=>this.objectIds,"change",()=>this._onObjectIdsChange(),{onListenerAdd:()=>this._onObjectIdsChange()}),f(()=>[this.paginationEnabled,this.pageIndex],()=>this.refreshPageCache()),f(()=>this.activeSortOrders,e=>{this.store.sortOrders=e,this._syncTemplateThrottled()}),f(()=>this.allVisibleColumns,()=>this._syncTemplateThrottled()),f(()=>this.pageCount,()=>{this.pageIndex>=this.pageCount&&this.goToPage(0)}),f(()=>this.state,e=>{"disabled"===e&&this.relatedTables.length&&this.drainRelatedTables()}),y(()=>this.tableParent?.highlightIds,"change",({added:e})=>{const{relationshipConfig:t}=this,i=e[0];if(null==i||!t)return;const{relatedLayer:s,relationshipId:l}=t;this.relationshipConfig={objectId:i,relatedLayer:s,relationshipId:l}}),y(()=>this.tableParent,"cell-click",e=>{const{tableParent:t}=this,{objectId:i}=e;t&&null!=i&&t.highlightIds.add(i)}),f(()=>this.attachmentsViewOptions.objectId,(e,t)=>{null!=e?null==t&&this.showAttachmentsView({objectId:e}):this.hideAttachmentsView()}),f(()=>[this.layerFieldConfigurations,this.pendingEditsCount],()=>this.refreshCellContent())])}destroy(){this._drainColumns(),this._highlights.removeAll(),this._highlights.destroy(),this._currentTemporaryHighlight?.handle.remove(),this._temporaryHighlightAbortController=m(this._temporaryHighlightAbortController),this.grid?.destroy(),this.columns.destroyed||this.columns.destroy(),this.layer=null,this.view=null}get _defaultHiddenFields(){return E(this.layer)}get _effectiveTableTemplate(){return this.tableTemplateOverride||this.tableTemplate}get _effectiveAttributeTableTemplate(){return this.attributeTableTemplate||this.layer?.attributeTableTemplate}get _highlightableLayerView(){const e=this.layerView;return V(e)?e:null}get _selectionManager(){const{view:e}=this;return!e||e.destroyed?null:e.selectionManager?.sources?.length?e.selectionManager:null}get _selectableLayer(){const{layer:e}=this;return P(e)&&this._selectionManager?.sources?.includes(e)?e:null}get _subtypes(){return A(this.layer)}get _tableHighlightsReady(){return!("table"!==this.selectionSource||!this.highlightEnabled||!this._highlightableLayerView)}get _viewSelection(){const{_selectableLayer:e}=this;return e?this._selectionManager?.getSelection(e)??[]:[]}get _viewSelectionReady(){return!(!this.layer||"view"!==this.selectionSource||!this._selectionManager)}get actionColumn(){return super.actionColumn}get activeFilters(){const{filterGeometry:e,objectIds:t,filterBySelectionEnabled:i,highlightIds:s}=this,l=new n;return e&&l.push({type:"geometry",geometry:e}),i?l.push({type:"selection",objectIds:s.toArray()}):t.length&&l.push({type:"objectId",objectIds:t.toArray()}),l}get activeSortOrders(){return this.grid?.sortOrders?this.grid.sortOrders.map(({path:e,direction:t})=>({fieldName:e,direction:t})).filter(e=>e.fieldName&&e.direction):[]}get allColumns(){return super.allColumns}get allRelatedTablesVisible(){return!!(this.relatedRecordsEnabled&&this.relatedTables.length&&this.showAllRelatedTables)}get allVisibleColumns(){return super.allVisibleColumns}get attachmentsColumns(){return this.allColumns.filter(e=>$(e))}get attachmentsEnabled(){return this.store.attachmentsEnabled}set attachmentsEnabled(e){this.store.attachmentsEnabled=e}get autoSaveEnabled(){return this.store.autoSaveEnabled}set autoSaveEnabled(e){this.store.autoSaveEnabled=e}get clearPrompt(){return()=>this.prompt=null}set clearPrompt(e){this._overrideIfSome("clearPrompt",e)}get definitionExpression(){return this.store.where}set definitionExpression(e){this.store.where=e}get editingEnabled(){return super.editingEnabled}set editingEnabled(e){super.editingEnabled=e}get effectiveSize(){return super.effectiveSize}get fieldColumns(){return this.allColumns.filter(e=>Z(e))}get filterGeometry(){return this.store.filterGeometry}set filterGeometry(e){this.store.filterGeometry=e}get filterBySelectionEnabled(){return!!this._get("filterBySelectionEnabled")}set filterBySelectionEnabled(e){const{objectIds:t}=this,i=t.length;e?(i&&(t.removeAll(),this._logWarning("Selection filter has been applied with an objectID filter. Object ID filter has been removed.")),this.filterGeometry&&this._logWarning("Selection filter has been applied with a geometry filter. Results may appear inconsistent"),this._syncObjectIdsWithStore(this.highlightIds.toArray())):i||this._syncObjectIdsWithStore(null),this._set("filterBySelectionEnabled",e)}get groupColumns(){return super.groupColumns}get hasContingentValues(){return this.store.hasContingentValues}get hasInvalidPendingEdits(){return this.store.hasInvalidPendingEdits}get hasPendingEdits(){return this.store.hasPendingEdits}get hiddenFields(){return this._get("hiddenFields")??new n}set hiddenFields(e){this._set("hiddenFields",o(e,this._get("hiddenFields"),n))}get highlightIds(){return super.highlightIds}set highlightIds(e){super.highlightIds=e}get initialSize(){return this.store.initialSize}set initialSize(e){this.store.initialSize=e}get isEditing(){return super.isEditing}get isQuerying(){return super.isQuerying}get isSyncing(){return super.isSyncing}get isQueryingOrSyncing(){return this.isQuerying||this.isSyncing||this.relatedTables.some(e=>!!e.isQueryingOrSyncing)}get isSyncingAttachments(){return this.store.isSyncingAttachmentEdits||this.relatedTables.some(e=>!!e.isSyncingAttachments)}get layer(){return this._get("layer")}set layer(e){this._highlights.removeAll(),this.drainRelatedTables(),this._set("layer",e)}get layerFieldConfigurations(){const e=this.layer;return te(e)?e.fieldConfigurations:void 0}get layerView(){return this.store.layerView}get objectIds(){return super.objectIds}set objectIds(e){super.objectIds=e}get outFields(){return this.store.outFields}set outFields(e){this.store.outFields=e}get pageCount(){return super.pageCount}get pageIndex(){return super.pageIndex}set pageIndex(e){super.pageIndex=e}get pageSize(){return super.pageSize}set pageSize(e){super.pageSize=e}get pendingEditsCount(){return this.store.pendingEditsCount}get relatedRecordsEnabled(){return this.store.relatedRecordsEnabled}set relatedRecordsEnabled(e){this.store.relatedRecordsEnabled=e}get relatedTable(){return this.relatedTables.at(-1)}get relationship(){const e=this.relationshipConfig?.relationshipId;return null==e?null:this.relationships?.find(({id:t})=>t===e)}get relationshipColumns(){return this.allColumns.filter(e=>q(e))}get relationshipConfig(){return this.store.relationshipConfig}set relationshipConfig(e){this.highlightIds.removeAll(),this.objectIds.removeAll(),this.filterBySelectionEnabled=!1,this.store.relationshipConfig=e}get relationshipInfos(){const{layer:e,layers:t,relationships:i,tableController:s}=this,l=this.store.relationshipInfos;if(l.length||!ie(e)||!i?.length)return l;const n=[],o=s?.layers||t||[];return i.forEach(t=>{const i=se(e,o,t);i&&(i.load(),n.push({layer:e,relatedLayer:i,relationshipId:t.id}))}),n}get relationships(){return this.store.relationships}get returnGeometryEnabled(){return this.store.returnGeometry}set returnGeometryEnabled(e){this.store.returnGeometry=e}get returnMEnabled(){return this.store.returnM}set returnMEnabled(e){this.store.returnM=e}get returnZEnabled(){return this.store.returnZ}set returnZEnabled(e){this.store.returnZ=e}get rowHighlightIds(){return super.rowHighlightIds}set rowHighlightIds(e){super.rowHighlightIds=e}get showAllRelatedTables(){return this._get("showAllRelatedTables")}set showAllRelatedTables(e){const{relatedTable:t}=this;this._set("showAllRelatedTables",e),t&&(e?this._showAllRelatedTables(t):this._hideAllRelatedTables(t))}get showPrompt(){return e=>{this.prompt?.cancel?.(),this.prompt=e}}set showPrompt(e){this._overrideIfSome("showPrompt",e)}get size(){return super.size}get state(){return super.state}get supportsAttachments(){return this.store.supportsAttachments}get supportsAddAttachments(){const{store:{supportsAddAttachments:e,supportsEditing:t}}=this;return this.editingEnabled&&t&&e}get supportsDeleteAttachments(){return this.supportsUpdateAttachments}get supportsResizeAttachments(){return this.store.supportsResizeAttachments}get supportsUpdateAttachments(){const{store:{supportsUpdateAttachments:e,supportsEditing:t}}=this;return this.editingEnabled&&t&&e}get timeExtent(){return this.store.timeExtent}set timeExtent(e){this.store.timeExtent=e}get timeZone(){return this.store.timeZone}set timeZone(e){this.store.timeZone=e}get view(){return this.store.view}set view(e){this.store.view=e,this.fieldColumns.forEach(t=>t.view=e),this.refreshCellContent()}get visibleColumns(){return super.visibleColumns}async addAttachment(e,t){const{attachmentsViewOptions:i,store:s}=this,l=i.objectId===e;await s.addAttachment(e,t).catch(e=>{l&&e&&"object"==typeof e&&"error"in e&&e.error instanceof a&&(this._logWarning(`Unable to add attachment. ${e.error.name} ${e.error.message}`),i.error=e.error)}),l&&!i.error&&(i.onEditComplete(),i.attachmentInfos=await s.getAttachmentsByObjectId(e,!0)),this.refreshCellContent()}addPendingEdits(e){this.store.addPendingEdits(e)}collapseRelatedTable(e,t){const{relatedLayer:i,objectId:s,relationshipId:l}=t,{objectIdField:o}=i,r=le(i,l),a=i.displayField||r?.keyField||o;e.set({highlightIds:new n([s]),multipleSelectionEnabled:!1,tableTemplateOverride:this._getTableTemplateForRelatedTableView(e,a,l)});const h=e.hiddenFields;h.includes(ne.action)||h.add(ne.action),h.includes(ne.attachments)||h.add(ne.attachments),e.scrollLeft()}async deleteAttachments(e,t){const{attachmentsViewOptions:i,store:s}=this,l=i.objectId===e;await s.deleteAttachments(e,t).catch(e=>{l&&e&&"object"==typeof e&&"error"in e&&e.error instanceof a&&(this._logWarning(`Unable to delete attachment(s). ${e.error.name} ${e.error.message}`),i.error=e.error)}),l&&!i.error&&(i.onEditComplete(),i.attachmentInfos=await s.getAttachmentsByObjectId(e,!0)),this.refreshCellContent()}async deleteSelection(){const e=this.highlightIds.toArray();if(!e?.length)return;const{deleteFeatureResults:t}=await this.store.deleteRowsByObjectId(e),i=t.filter(e=>!e.error).map(e=>e.objectId);i.length&&(this.highlightIds.removeMany(i),await this.refresh())}discardPendingEdits(e){this.store.discardPendingEdits(e)}async downloadAttachmentById(e,t){const i=(await this.store.getAttachmentsByObjectId(e,!0)).find(e=>e.id===t);await Q(i)}drainRelatedTables(){this.relatedTables.drain(e=>e.destroy()),this.set({multipleSelectionEnabled:!0,relationshipColumnConfigs:null,showAllRelatedTables:!1,tableTemplateOverride:null}),this.hiddenFields.removeMany([ne.action,ne.attachments])}drainRelatedTablesAboveIndex(e){const{relatedTables:t}=this,i=t.slice(e+1);t.removeMany(i).forEach(e=>e.destroy());const s=t.at(-1);s&&(s.attachmentsViewOptions.objectId=null,this.allRelatedTablesVisible?this._showAllRelatedTables(s):this._hideAllRelatedTables(s))}async exportSelectionToCSV(e){const{highlightIds:t,layer:i,outFields:s}=this;i&&t.length?await K({layer:i,objectIds:t.toArray(),outFields:s,includeGeometry:e}):this._logWarning("Export failed.")}filterBySelection(){this.filterBySelectionEnabled?this._logWarning("Property 'filterBySelectionEnabled' is already 'true'. This method has no effect."):(r(d.getLogger(this),"`FeatureTable.filterBySelection` is deprecated in favor of 'filterBySelectionEnabled' and 'objectIds'",{replacement:"FeatureTable.filterBySelectionEnabled or FeatureTable.objectIds",version:"4.30",warnOnce:!0}),this.objectIds.addMany(this.highlightIds.toArray()))}async getFeatureTitle(e,t){return this.store.getFeatureTitle(e,t)}getFeatureTitleSync(e){const t=this.layer;if(!t)return`${e}`;const i=`${t.objectIdField}: ${e}`;return null==e?i:this.store.featureTitleMap.get(e)??i}getObjectIdIndex(e){return this.store.getItemIndexByObjectId(e)}getValue(e,t){const i=this.store.getItemByObjectId(e);return i?.feature?.attributes[t]}getVirtualPageIndex(){return this.grid?.getVirtualPageIndex()??0}goToPage(e){if(null==e||!Number.isInteger(e))return void this._logWarning("Invalid 'page' parameter provided to 'goToPage()'. Current page will remain the same.");const{pageCount:t}=this;(e>=t||-1===e)&&(e=t-1),e<-1&&(e=0),e!==this.pageIndex&&(this.pageIndex=e),this.paginationEnabled||this.scrollToIndex(e*this.pageSize)}hideAttachmentsView(){this.attachmentsViewOptions.objectId=null,this.set({relationshipColumnConfigs:null,multipleSelectionEnabled:!0,tableTemplateOverride:null}),this.hiddenFields.remove(ne.action)}nextPage(){const e=this.paginationEnabled?this.pageIndex:this.getVirtualPageIndex();this.goToPage(e+1)}previousPage(){const e=this.paginationEnabled?this.pageIndex:this.getVirtualPageIndex();this.goToPage(e-1)}async refresh(){await Promise.all([...this.relatedTables.map(e=>e.refresh()),p(this._refreshDebounced())])}refreshCellContent(){this.grid?.requestContentUpdate()}refreshPageCache(){this.grid?.refreshPageCache()}async reset(){this.goToPage(0),await(this.grid?.reset())}async savePendingEdits(){await this.store.savePendingEdits(),await this.refresh()}scrollLeft(){this.grid?.scrollLeft(0)}scrollToBottom(){this.grid?.scrollToBottom()}scrollToIndex(e){this.grid?.scrollToIndex(e)}scrollToRow(e){const t=this.store.getItemIndexByObjectId(e);t>-1?this.grid?.scrollToIndex(t):this._logWarning("Row not found. Associated data may not be loaded yet.")}scrollToTop(){this.grid?.scrollToTop()}async saveAttachmentsViewForm(){const{attachmentId:e,form:t,objectId:i}=this.attachmentsViewOptions;null!=i&&t&&(null!=e?await this.updateAttachment(i,e,t):await this.addAttachment(i,t))}async showAttachmentsView({objectId:e}){const{attachmentsViewOptions:t,hiddenFields:i,layer:s}=this;if(!this.attachmentsEnabled||!s)return void this._logWarning("The 'attachmentsEnabled' property is currently false.");await s.load();const l=this._getDefaultLayerDisplayField(s),o=await this.store.getAttachmentsByObjectId(e,!0),r=this.store.getItemIndexByObjectId(e);t.set({attachmentInfos:o,mode:o.length?"list":"file",objectId:e}),this.set({highlightIds:new n([e]),multipleSelectionEnabled:!1,relationshipColumnConfigs:[],tableTemplateOverride:this._getTableTemplateForAttachmentsView(l)}),i.includes(ne.action)||i.add(ne.action),null!=r&&this.scrollToIndex(r)}syncAttributeTableTemplate(){this._syncAttributeTableTemplate(!0)}clearSelectionFilter(){r(d.getLogger(this),"`FeatureTable.clearSelectionFilter` is deprecated in favor of 'filterBySelectionEnabled' and 'objectIds'",{replacement:"FeatureTable.filterBySelectionEnabled or FeatureTable.objectIds",version:"4.30",warnOnce:!0}),this.objectIds.removeAll()}async updateAttachment(e,t,i){const{attachmentsViewOptions:s,store:l}=this,n=s.objectId===e;await l.updateAttachment(e,t,i).catch(e=>{n&&e&&"object"==typeof e&&"error"in e&&e.error instanceof a&&(this._logWarning(`Unable to update attachment. ${e.error.name} ${e.error.message}`),s.error=e.error)}),n&&!s.error&&(s.onEditComplete(),s.attachmentInfos=await l.getAttachmentsByObjectId(e,!0)),this.refreshCellContent()}async zoomToSelection(){const{layer:e,view:t}=this,i=this.highlightIds.toArray();if(!e||!t||!i.length)return;const s=e.createQuery();s.objectIds=i,s.returnGeometry=!0;const l=await e.queryFeatures(s);try{await ce(t,l.features)}catch(n){"AbortError"!==n.name&&console.error(n)}}_syncAttributeTableTemplate(e=!1){const{_effectiveAttributeTableTemplate:t,layer:i,tableTemplateOverride:s,syncTemplateOnChangesEnabled:l}=this;if(!i||!t||!l&&!e||s||this.tableParent||this.relatedTable||null!==this.attachmentsViewOptions.objectId)return;const{activeSortOrders:n,allColumns:o,columns:r}=this,a=[],h=me(r.toArray());n.forEach(({fieldName:e,direction:t})=>{e&&t&&a.push(new R({field:e,order:t}))}),o.forEach(({fieldName:e,direction:t})=>{t&&!a.some(t=>t.field===e)&&a.push(new R({field:e,order:t}))}),t.elements=h,t.orderByFields=a}async _refresh(){await this.store.refresh();const e=this.highlightIds.toArray();if(e.length){(await this.store.verifyFeaturesByObjectId(e)).forEach((t,i)=>{t||this.highlightIds.remove(e[i])})}this.refreshPageCache();const t=this.attachmentsViewOptions;null!=t?.objectId&&(t.attachmentInfos=await this.store.getAttachmentsByObjectId(t.objectId,!0))}async _onLayerLoad(){const{layer:e,pageSize:t}=this;if(!e)return;e.parent&&F(e.parent)&&await e.parent.loadAll();const i=e.capabilities.query?.maxRecordCount,s=i&&i<t,l=s?i:t;s&&(this._logWarning("The value for 'pageSize' has been adjusted due to the provided layer's max record count."),this.pageSize=l),this.grid?.set("pageSize",l),this.store.load(),this._generateColumns()}_onLayerRefresh(e){this.autoRefreshEnabled&&e.dataChanged&&this.refresh()}_generateColumns(){this._drainColumns();const{_effectiveTableTemplate:e,_effectiveAttributeTableTemplate:t}=this,i=e?.columnTemplates,s=this._generateColumnsFromColumnTemplates(i)??this._generateColumnsFromAttributeTableTemplate(t)??this._generateDefaultFieldColumns();s.length&&(this.attachmentsEnabled&&!s.some(e=>$(e))&&s.push(this._generateDefaultAttachmentsColumn()),this.relatedRecordsEnabled&&this.relationshipInfos.length&&!s.some(e=>q(e))&&s.push(...this._generateDefaultRelationshipColumns()),this.actionColumnConfig&&s.push(this._generateActionColumn()),s.sort((e,t)=>e.frozen&&t.frozen||e.frozenToEnd&&t.frozenToEnd?0:e.frozen||t.frozenToEnd?-1:0),this.columns.addMany(s))}_generateColumnsFromAttributeTableTemplate(e){const{layer:t}=this;if(!e||!t)return null;const{elements:i,orderByFields:s}=e,n=S(t),o=[];o.push(...this._generateColumnsFromAttributeTableElements(i,s));const r=n.map(e=>{if(!e.fieldName||oe(e.fieldName,o))return null;const{fieldName:i}=e,l=re(t,i);return l?this._generateDefaultFieldColumn(l,{hidden:!0,orderByFields:s}):(this._logTemplateWarning("A valid 'field' could not be found for the provided template."),null)}).filter(l);return o.push(...r),this.attachmentsEnabled&&ae(t)&&!o.some(e=>$(e))&&o.push(this._generateDefaultAttachmentsColumn({hidden:!0})),this.relatedRecordsEnabled&&ie(t)&&t.relationships?.forEach(({id:e},t)=>{const i=this.relationshipInfos.find(t=>t.relationshipId===e);i&&!o.some(t=>q(t)&&t.relationshipId===e)&&o.push(this._generateDefaultRelationshipColumn({hidden:!0,info:i,index:t}))}),o.length?o:null}_generateColumnsFromAttributeTableElements(e,t){const{layer:i}=this;return i?e?.map((e,i)=>{switch(e.type){case"field":return this._createFieldColumnFromElement({element:e,orderByFields:t});case"group":return this._createGroupColumnFromElement({element:e,orderByFields:t});case"attachment":return this._createAttachmentColumnFromElement({element:e,index:i});case"relationship":return this._createRelationshipColumnFromElement({element:e,index:i})}}).filter(e=>!!e)??[]:[]}_createFieldColumnFromElement(e){const{layer:t}=this;if(!t)return null;const{element:i,orderByFields:s}=e,{fieldName:l}=i;if(null==l)return this._logTemplateWarning("A valid 'fieldName' must be provided."),null;const n=re(t,l);if(!n)return this._logTemplateWarning("A valid 'field' could not be found for the provided template."),null;const{description:o,label:r}=i,a=s?.findIndex(({field:e})=>e&&e===l)??-1,h=a>-1?s?.at(a)?.order:void 0,d=a>-1?a:void 0,{grid:m,messages:c,messagesCommon:p,messagesURIUtils:u,store:g,view:b}=this;return new H({description:o,direction:h,field:n,fieldName:l,grid:m,initialSortPriority:d,label:r,layer:t,messages:c,messagesCommon:p,messagesURIUtils:u,store:g,view:b,onShowPromptCallback:this._onShowPromptCallback})}_createGroupColumnFromElement(e){const{element:t,orderByFields:i}=e,{description:s,label:l}=t;if(!l)return this._logTemplateWarning("Group columns require a label."),null;if(!t.elements.length)return this._logTemplateWarning("Group columns require child columns."),null;const{grid:n,messages:o,messagesCommon:r,messagesURIUtils:a,store:h}=this;return new N({columns:this._generateColumnsFromAttributeTableElements(t.elements,i),description:s,grid:n,label:l,messages:o,messagesCommon:r,messagesURIUtils:a,store:h})}_createAttachmentColumnFromElement(e){if(!this.attachmentsEnabled)return void this._logTemplateWarning("The 'attachmentsEnabled' property is currently false.");const{element:t,index:i}=e,{description:s,label:l}=t,{grid:n,layer:o,messages:r,messagesCommon:a,messagesURIUtils:h,store:d}=this;return new W({description:s,fieldName:`${ne.attachments}-${i}`,grid:n,label:l,layer:o,messages:r,messagesCommon:a,messagesURIUtils:h,store:d,onShowAttachments:e=>this._onShowAttachments(e)})}_createRelationshipColumnFromElement(e){if(!this.relatedRecordsEnabled)return void this._logTemplateWarning("Relationship columns require related records to be enabled on the table.");const{element:t,index:i}=e,{description:s,label:l,relationshipId:n}=t,o=this.relationshipInfos.find(e=>e.relationshipId===n);if(!o)return this._logTemplateWarning("Unable to find valid related layer target based on the provided relationship id."),null;const{grid:r,messages:a,messagesCommon:h,messagesURIUtils:d,store:m}=this;return new L({description:s,fieldName:`${ne.relationship}-${n}-${i}`,grid:r,label:l,messages:a,messagesCommon:h,messagesURIUtils:d,relationshipId:n,store:m,layer:o.relatedLayer,relatedLayer:o.layer,showRelatedTableCallback:e=>this._onShowRelatedTable(e)})}_generateColumnsFromColumnTemplates(e){const{grid:t,layer:i,messages:s,messagesCommon:l,messagesURIUtils:n,store:o,view:r}=this;if(!e?.length||!i)return null;const a=[];return e.forEach((e,h)=>{const{autoWidth:d,description:m,direction:c,flexGrow:p,fieldName:u,formatFunction:g,frozen:b,frozenToEnd:f,icon:y,iconText:T,initialSortPriority:w,invalid:_,label:C,labelTooltipText:I,menuConfig:v,resizable:E,sortable:A,textAlign:F,textWrap:S,timeZone:j,type:R,width:x}=e;if(!R)return void this._logTemplateWarning("Property 'type' is missing from the provided template.");if(b&&f)return void this._logTemplateWarning("Properties 'frozen' and 'frozenToEnd' cannot both be true for the same column.");const U=!1===e.visible;if("group"===R){if(!e.columnTemplates?.length)return void this._logTemplateWarning("Group columns must contain column templates.");if(!e.label)return void this._logTemplateWarning("Group columns require a label.");const i=this._generateColumnsFromColumnTemplates(e.columnTemplates),o=U||this._isFieldHidden(e.label);a.push(new N({autoWidth:d,columns:i,description:m,flexGrow:p,frozen:b,frozenToEnd:f,grid:t,hidden:o,icon:y,iconText:T,invalid:_,label:C,labelTooltipText:I,menuConfig:v,messages:s,messagesCommon:l,messagesURIUtils:n,resizable:E,textAlign:F,textWrap:S,timeZone:j,width:x}))}else if("attachment"===R){if(!this.attachmentsEnabled)return void this._logTemplateWarning("Attachment columns require attachments to be enabled on the table.");a.push(this._generateAttachmentsColumnFromTemplate(e,h))}else if("relationship"===R){if(!this.relatedRecordsEnabled)return void this._logTemplateWarning("Relationship columns require related records to be enabled on the table.");const{relationshipId:t}=e;if(null==t)return void this._logTemplateWarning("Property 'relationshipId' is missing from the provided template.");const i=this.relationshipInfos.find(e=>e.relationshipId===t);if(!i)return void this._logTemplateWarning("Unable to find valid related layer target based on the provided relationship id.");a.push(this._generateRelationshipColumnFromTemplate(i,e,h))}else if(!u)return void this._logTemplateWarning("Value for 'fieldName' property was missing from the provided template.");const O=U||this._isFieldHidden(u);if("column"===R)a.push(new B({autoWidth:d,description:m,direction:c,fieldName:u,flexGrow:p,formatFunction:g,frozen:b,frozenToEnd:f,grid:t,hidden:O,icon:y,iconText:T,initialSortPriority:w,invalid:_,label:C,labelTooltipText:I,menuConfig:v,messages:s,messagesCommon:l,messagesURIUtils:n,resizable:E,sortable:A,textAlign:F,textWrap:S,timeZone:j,width:x}));else if("field"===R){const h=re(i,e.fieldName);if(!h)return void this._logTemplateWarning("A valid 'field' could not be found for the provided template.");const{editable:u,required:R}=e;a.push(new H({autoWidth:d,description:m,direction:c,editable:u,field:h,fieldName:h.name,flexGrow:p,formatFunction:g,frozen:b,frozenToEnd:f,grid:t,hidden:O,icon:y,iconText:T,initialSortPriority:w,invalid:_,label:C,labelTooltipText:I,layer:i,messages:s,messagesCommon:l,messagesURIUtils:n,menuConfig:v,required:R,resizable:E,sortable:A,store:o,template:e,textAlign:F,textWrap:S,timeZone:j,width:x,view:r,onShowPromptCallback:this._onShowPromptCallback}))}}),a.length?a:null}_generateDefaultFieldColumns(){return this.layer?.fields?.map(e=>this._generateDefaultFieldColumn(e)).filter(l)??[]}_generateDefaultFieldColumn(e,t){const{grid:i,layer:s,messages:l,messagesCommon:n,messagesURIUtils:o,store:r,view:a}=this,h=t?.orderByFields;if(!e.visible||"geometry"===e.type)return null;const d=e.name,m=h?.findIndex(({field:e})=>e&&e===d)??-1,c=m>-1?h?.at(m)?.order:void 0,p=m>-1?m:void 0;return new H({direction:c,field:e,fieldName:d,grid:i,hidden:t?.hidden||this._isFieldHidden(d),initialSortPriority:p,layer:s,messages:l,messagesCommon:n,messagesURIUtils:o,store:r,view:a,onShowPromptCallback:this._onShowPromptCallback})}_generateAttachmentsColumnFromTemplate(e,t){const{grid:i,layer:s,messages:l,messagesCommon:n,messagesURIUtils:o,store:r}=this,{attachmentsViewEnabled:a,autoWidth:h,description:d,flexGrow:m,fieldName:c,formatFunction:p,frozen:u,frozenToEnd:g,icon:b,iconText:f,invalid:y,label:T,labelTooltipText:w,menuConfig:_,resizable:C,textAlign:I,textWrap:v,thumbnailAppearance:E,thumbnailCount:A,thumbnailIconScale:F,thumbnailsEnabled:S,timeZone:j,width:R}=e;return new W({attachmentsViewEnabled:a,autoWidth:h,description:d,fieldName:`${ne.attachments}-${t}`,flexGrow:m,formatFunction:p,frozen:u,frozenToEnd:g,grid:i,hidden:!1===e.visible||this._isFieldHidden(T)||this._isFieldHidden(c),icon:b,iconText:f,invalid:y,label:T,labelTooltipText:w,layer:s,menuConfig:_,messages:l,messagesCommon:n,messagesURIUtils:o,resizable:C,store:r,textAlign:I,textWrap:v,thumbnailAppearance:E,thumbnailCount:A,thumbnailIconScale:F,thumbnailsEnabled:S,timeZone:j,width:R,onShowAttachments:e=>this._onShowAttachments(e)})}_generateDefaultAttachmentsColumn(e){const{grid:t,layer:i,messages:s,messagesCommon:l,messagesURIUtils:n,store:o}=this,r=ne.attachments;return new W({fieldName:r,grid:t,hidden:e?.hidden||this._isFieldHidden(r),layer:i,messages:s,messagesCommon:l,messagesURIUtils:n,store:o,onShowAttachments:e=>this._onShowAttachments(e)})}_generateRelationshipColumnFromTemplate(e,t,i){const{grid:s,messages:l,messagesCommon:n,messagesURIUtils:o,store:r}=this,{autoWidth:a,collapsed:h,description:d,flexGrow:m,fieldName:c,formatFunction:p,frozen:u,frozenToEnd:g,icon:b,iconText:f,invalid:y,label:T,labelTooltipText:w,menuConfig:_,relationshipId:C,resizable:I,textAlign:v,textWrap:E,timeZone:A,width:F}=t;return new L({autoWidth:a,collapsed:h,description:d,fieldName:`${ne.relationship}-${C}-${i}`,flexGrow:m,formatFunction:p,frozen:u,frozenToEnd:g,grid:s,hidden:!1===t.visible||this._isFieldHidden(T)||this._isFieldHidden(c),icon:b,iconText:f,invalid:y,label:T,labelTooltipText:w,menuConfig:_,messages:l,messagesCommon:n,messagesURIUtils:o,relationshipId:C,resizable:I,store:r,textAlign:v,textWrap:E,timeZone:A,width:F,layer:e.relatedLayer,relatedLayer:e.layer,showRelatedTableCallback:e=>this._onShowRelatedTable(e)})}_generateDefaultRelationshipColumns(){const{relationshipInfos:e,relationshipColumnConfigs:t}=this,i=[];return e?.length?(t?t.forEach((t,s)=>{const{relationshipId:l}=t,n=e.find(e=>e.relationshipId===l);n&&i.push(this._generateDefaultRelationshipColumn({config:t,index:s,info:n}))}):e.forEach((e,t)=>i.push(this._generateDefaultRelationshipColumn({index:t,info:e}))),i):i}_generateDefaultRelationshipColumn(e){const{config:t,hidden:i,index:s,info:l}=e,{grid:n,messages:o,messagesCommon:r,messagesURIUtils:a}=this,{relationshipId:h}=l;return new L({...t,fieldName:`${ne.relationship}-${h}-${s}`,grid:n,hidden:i,messages:o,messagesCommon:r,messagesURIUtils:a,layer:l.relatedLayer,relatedLayer:l.layer,relationshipId:h,showRelatedTableCallback:e=>this._onShowRelatedTable(e)})}_generateActionColumn(){return new z({hidden:this._isFieldHidden(ne.action),...this.actionColumnConfig})}_isFieldHidden(e){const t=e?.toLowerCase();return(this.hiddenFields??this._defaultHiddenFields).some(e=>e.toLowerCase()===t)}_addTableHighlight(e){if(!this.highlightEnabled)return;const{_highlightableLayerView:t,layer:i}=this;if(t&&i){const s=this.store.getItemByObjectId(e),l=s?.feature??e;this._highlights.add(t.highlight(l,{name:U}),he(i,e))}}_removeTableHighlight(e){const{layer:t}=this;t&&this._highlights.remove(he(t,e))}async _syncTemporaryHighlight(e,t){if(!this.highlightEnabled)return this._currentTemporaryHighlight?.handle.remove(),void(this._currentTemporaryHighlight=null);if(await u(25),g(t),!this._currentTemporaryHighlight&&!e)return;const{id:i}=this._currentTemporaryHighlight??{};if(i===e)return;this._currentTemporaryHighlight?.handle?.remove(),this._currentTemporaryHighlight=null;const{_highlightableLayerView:s,layer:l,highlightEnabled:n}=this;e&&s&&l&&n&&(this._currentTemporaryHighlight={id:e,handle:s.highlight(e,{name:O})})}_syncSelection(){this._highlights.removeAll(),this._tableHighlightsReady?this.highlightIds.forEach(e=>this._addTableHighlight(e)):this._viewSelectionReady&&(this.highlightIds.items=this._viewSelection)}_appendToViewSelection(e){const{_selectableLayer:t}=this;t&&this._selectionManager?.add(t,e)}_removeFromViewSelection(e){const{_selectableLayer:t}=this;t&&this._selectionManager?.remove(t,e)}async _onHighlightIdsChange(e){const{added:t,removed:i}=e,{attachmentsViewOptions:s}=this;if(this._tableHighlightsReady?(i.forEach(e=>this._removeTableHighlight(e)),t.forEach(e=>this._addTableHighlight(e))):this._viewSelectionReady&&(this._removeFromViewSelection(i),this._appendToViewSelection(t)),this.filterBySelectionEnabled&&this._syncObjectIdsWithStore(this.highlightIds.toArray()),null!=s.objectId){const e=this.highlightIds.at(0);if(null!=e){const t=await this.store.getAttachmentsByObjectId(e,!0);s.set({attachmentInfos:t,objectId:e,mode:t.length?"list":"file"}),this.getFeatureTitle(e)}}}_onShowRelatedTable(e){const{highlightIds:t}=this,{objectId:i}=e;t.removeAll(),t.add(i),this.showRelatedTableCallback?this.showRelatedTableCallback(e):this.emit("show-related-table",e)}_onObjectIdsChange(){const e=this.objectIds.toArray();e.length&&this.filterBySelectionEnabled&&(this.filterBySelectionEnabled=!1,this._logWarning("Object ID filter was applied while a selection filter was applied. Selection filter has been removed.")),this._syncObjectIdsWithStore(e)}_syncObjectIdsWithStore(e){this.store.objectIds=e,this.refreshPageCache()}_drainColumns(){this.columns.drain(e=>!e.destroyed&&e.destroy())}_showAllRelatedTables(e){const t=e.layer;if(!t)return;const i=this._getDefaultLayerDisplayField(t);e.set({relationshipColumnConfigs:[],tableTemplateOverride:this._getTableTemplateForShowAllTablesView(e,i)});const s=e.hiddenFields;s.includes(ne.action)||s.add(ne.action),s.includes(ne.attachments)||s.add(ne.attachments)}_hideAllRelatedTables(e){const{layer:t,relationship:i}=e;if(t&&null!=i?.id)if(null!=e.attachmentsViewOptions.objectId){const i=this._getDefaultLayerDisplayField(t);e.set({multipleSelectionEnabled:!1,relationshipColumnConfigs:[],showAllRelatedTables:!1,tableTemplateOverride:this._getTableTemplateForAttachmentsView(i)})}else e.set({multipleSelectionEnabled:!0,relationshipColumnConfigs:de(t,i.id),showAllRelatedTables:!1,tableTemplateOverride:null}),e.hiddenFields.removeMany([ne.action,ne.attachments])}_getTableTemplateForRelatedTableView(e,t,i){return new ee({columnTemplates:[new X({fieldName:t,editable:!1,menuConfig:{selectionMode:"single",icon:"chevron-down",items:this._extractFieldColumnInfosFromTableTemplate(e.viewModel).map(([s,l])=>({selected:s===t,label:l||s,clickFunction:()=>{e.tableTemplateOverride=this._getTableTemplateForRelatedTableView(e,s,i)}}))},resizable:!1}),new Y({autoWidth:!1,collapsed:!0,flexGrow:0,label:"",resizable:!1,relationshipId:i,width:ue})]})}_getTableTemplateForShowAllTablesView(e,t){const i=[new X({fieldName:t,editable:!1,menuConfig:{selectionMode:"single",icon:"chevron-down",items:this._extractFieldColumnInfosFromTableTemplate(e.viewModel).map(([i,s])=>({selected:i===t,label:s||i,clickFunction:()=>{e.tableTemplateOverride=this._getTableTemplateForShowAllTablesView(e,i)}}))},resizable:!1})];return null!=e.attachmentsViewOptions.objectId&&i.push(new D({attachmentsViewEnabled:!1,autoWidth:!1,flexGrow:0,label:"",resizable:!1,thumbnailsEnabled:!1,width:ue})),new ee({columnTemplates:i})}async _onShowPromptCallback(e){const{column:t,objectId:i,oldValue:s,value:l}=e,{_subtypes:n,layer:o}=this;if(!o||!n.length)return void t.cancel();const r=n.find(e=>e.code===l);if(!r)return void t.cancel();const a=b(),h=this._createSubtypeEditPrompt(s,r,a),d=!!o.parent&&this.autoSaveEnabled;try{this.showPrompt(h);const e=await a.promise,s=[{fieldName:t.fieldName,value:l}];switch(e){case"update-fields":for(const[e,t]of Object.entries(r.defaultValues))null!=t&&s.push({fieldName:e,value:t});await t.updateItems({objectId:i,updates:s}),d&&this.refresh();break;case"keep-existing":await t.updateItems({objectId:i,updates:s}),d&&this.refresh();break;case"undo":t.cancel()}}finally{this.clearPrompt()}}_createSubtypeEditPrompt(e,t,s){const{_subtypes:l,messages:n,messagesCommon:o}=this,r=l.find(t=>t.code===e)?.name??`${e}`;let a="update-fields";const h=[{label:n.subtypes.useDefaultValuesOption,value:"update-fields"},{label:n.subtypes.keepCurrentValuesOption,value:"keep-existing"}];return{context:"info",title:n.subtypes.changeWarningTitle,message:i(n.subtypes.changeWarning,{originalType:r,newType:t.name}),radios:h,defaultRadioSelection:"update-fields",onRadioSelection:e=>{a=e},actions:{primary:{label:o.apply,action:()=>s.resolve(a),type:"positive"},secondary:{label:o.cancel,type:"neutral",action:()=>s.resolve("undo")}},cancel:()=>s.reject()}}_onShowAttachments({objectId:e}){this.attachmentsViewOptions.objectId=e}_getTableTemplateForAttachmentsView(e){return new ee({columnTemplates:[new X({fieldName:e,editable:!1,menuConfig:{selectionMode:"single",icon:"chevron-down",items:this._extractFieldColumnInfosFromTableTemplate(this).map(([t,i])=>({selected:t===e,label:i||t,clickFunction:()=>{this.tableTemplateOverride=this._getTableTemplateForAttachmentsView(t)}}))},resizable:!1}),new D({attachmentsViewEnabled:!1,autoWidth:!1,flexGrow:0,label:"",resizable:!1,thumbnailsEnabled:!1,width:ue})]})}_extractFieldColumnInfosFromTableTemplate(e){const t=e??this,{layer:i,tableTemplate:s}=t;return s?s.columnTemplates.filter(({type:e})=>"field"===e||"column"===e).map(({fieldName:e,label:t})=>{if(null!=t&&""!==t)return[e,t];const s=i?.fieldsIndex.get(e);return[e,s&&I(s,i)]}):i?.fields.map(e=>[e.name,I(e,i)])??[]}_getDefaultLayerDisplayField(e){const{displayField:t,objectIdField:i}=e;return t&&""!==t.trim()?t:i||(e.fields.length?e.fields[0].name:"")}_getIndexOfFirstFrozenToEndColumn(){const e=this.columns.findIndex(e=>e.frozenToEnd);return e>-1?e:void 0}_logWarning(e,t){t?d.getLogger(this).warnOnce(e):d.getLogger(this).warn(e)}_logTemplateWarning(e){this._logWarning(`${e} Skipped generating a column using the provided template.`,!0)}_onCellInteraction(e){null!=e&&null!=this.attachmentsViewOptions.objectId&&this.highlightIds.add(e)}};e([_()],ge.prototype,"_defaultHiddenFields",null),e([_()],ge.prototype,"_effectiveTableTemplate",null),e([_()],ge.prototype,"_effectiveAttributeTableTemplate",null),e([_()],ge.prototype,"_highlights",void 0),e([_()],ge.prototype,"_highlightableLayerView",null),e([_()],ge.prototype,"_selectionManager",null),e([_()],ge.prototype,"_selectableLayer",null),e([_()],ge.prototype,"_subtypes",null),e([_()],ge.prototype,"_tableHighlightsReady",null),e([_()],ge.prototype,"_viewSelection",null),e([_()],ge.prototype,"_viewSelectionReady",null),e([_()],ge.prototype,"activeFilters",null),e([_({readOnly:!0})],ge.prototype,"activeSortOrders",null),e([_()],ge.prototype,"allRelatedTablesVisible",null),e([_()],ge.prototype,"attachmentsColumns",null),e([_()],ge.prototype,"attachmentsEnabled",null),e([_()],ge.prototype,"attachmentsViewOptions",void 0),e([_({type:j})],ge.prototype,"attributeTableTemplate",void 0),e([_()],ge.prototype,"autoRefreshEnabled",void 0),e([_()],ge.prototype,"autoSaveEnabled",null),e([_()],ge.prototype,"clearPrompt",null),e([_({readOnly:!0})],ge.prototype,"columns",void 0),e([_()],ge.prototype,"dataProvider",void 0),e([_()],ge.prototype,"definitionExpression",null),e([_()],ge.prototype,"fieldColumns",null),e([_({types:v})],ge.prototype,"filterGeometry",null),e([_()],ge.prototype,"filterBySelectionEnabled",null),e([_({readOnly:!0})],ge.prototype,"grid",void 0),e([_()],ge.prototype,"hasContingentValues",null),e([_()],ge.prototype,"hasInvalidPendingEdits",null),e([_()],ge.prototype,"hasPendingEdits",null),e([_()],ge.prototype,"hiddenFields",null),e([_()],ge.prototype,"highlightEnabled",void 0),e([_()],ge.prototype,"initialSize",null),e([_()],ge.prototype,"isQueryingOrSyncing",null),e([_()],ge.prototype,"isSyncingAttachments",null),e([_()],ge.prototype,"layer",null),e([_()],ge.prototype,"layers",void 0),e([_()],ge.prototype,"layerFieldConfigurations",null),e([_()],ge.prototype,"layerView",null),e([_()],ge.prototype,"menuConfig",void 0),e([_()],ge.prototype,"messages",void 0),e([_(),pe("esri/t9n/common")],ge.prototype,"messagesCommon",void 0),e([_(),pe("esri/core/t9n/Units")],ge.prototype,"messagesUnits",void 0),e([_(),pe("esri/widgets/support/t9n/uriUtils")],ge.prototype,"messagesURIUtils",void 0),e([_()],ge.prototype,"outFields",null),e([_()],ge.prototype,"pendingEditsCount",null),e([_()],ge.prototype,"prompt",void 0),e([_()],ge.prototype,"relatedRecordsEnabled",null),e([_()],ge.prototype,"relatedTable",null),e([_()],ge.prototype,"relatedTables",void 0),e([_()],ge.prototype,"relationship",null),e([_()],ge.prototype,"relationshipColumnConfigs",void 0),e([_()],ge.prototype,"relationshipColumns",null),e([_()],ge.prototype,"relationshipConfig",null),e([_()],ge.prototype,"relationshipInfos",null),e([_()],ge.prototype,"relationships",null),e([_()],ge.prototype,"returnGeometryEnabled",null),e([_()],ge.prototype,"returnMEnabled",null),e([_()],ge.prototype,"returnZEnabled",null),e([_()],ge.prototype,"selectionSource",void 0),e([_()],ge.prototype,"showAllRelatedTables",null),e([_()],ge.prototype,"showPrompt",null),e([_()],ge.prototype,"showRelatedTableCallback",void 0),e([_({readOnly:!0,type:J})],ge.prototype,"store",void 0),e([_()],ge.prototype,"supportsAttachments",null),e([_()],ge.prototype,"supportsAddAttachments",null),e([_()],ge.prototype,"supportsDeleteAttachments",null),e([_()],ge.prototype,"supportsResizeAttachments",null),e([_()],ge.prototype,"supportsUpdateAttachments",null),e([_()],ge.prototype,"syncTemplateOnChangesEnabled",void 0),e([_()],ge.prototype,"tableController",void 0),e([_()],ge.prototype,"tableParent",void 0),e([_({type:ee})],ge.prototype,"tableTemplate",void 0),e([_()],ge.prototype,"tableTemplateOverride",void 0),e([_({type:x})],ge.prototype,"timeExtent",null),e([_()],ge.prototype,"timeZone",null),e([_()],ge.prototype,"view",null),ge=e([C("esri.widgets.FeatureTable.FeatureTableViewModel")],ge);const be=ge;export{be as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import"../../core/has.js";import t from"../../core/Logger.js";import{on as i,sync as n}from"../../core/reactiveUtils.js";import{property as o,subclass as l}from"../../core/accessorSupport/decorators.js";import{getEffectiveFieldAlias as r}from"../../editing/fieldUtils.js";import{convertDateFormatToIntlOptions as a,defaultFormatterOptionsNoTime as s,convertDateTimeFieldFormatToIntlOptions as u,defaultFormatterOptions as p}from"../../intl/date.js";import{formatNumber as d,convertNumberFormatToIntlOptions as m,convertNumberFieldFormatToIntlOptions as c}from"../../intl/number.js";import{isEditableLayer as f}from"../../layers/support/editableLayers.js";import{computeDomainFromTypes as h}from"../../layers/support/featureLayerUtils.js";import y from"../../layers/support/Field.js";import{defaultFieldFormat as g}from"../../layers/support/fieldFormatUtils.js";import{validateFieldValue as v,isDateField as F,isTimeOnlyField as _,isIntegerField as C,isNumericField as b,isStringField as D,isDateOnlyField as I,isTimestampOffsetField as x}from"../../layers/support/fieldUtils.js";import{isAnyDateField as T}from"../../smartMapping/support/utils.js";import{system as O}from"../../time/constants.js";import{getTimeZoneFormattingOptions as w}from"../../time/timeZoneUtils.js";import V from"../FeatureForm/FieldInput.js";import E from"./Grid/EditorColumn.js";import{isIFeatureTableSupportedLayerWithFieldConfigurations as Z,isEmptyStringOrWhitespace as L}from"./support/tableUtils.js";import{valueIsInRange as j,dateTimeIsInRange as R,getUnixFieldValueFromDateComponents as S,getISOFieldValueFromDateComponents as N,normalizeTimeOnlyString as A,getLabelForDateFieldValue as U,prepareISOFieldValueForDateComponents as q,prepareUnixFieldValueForDateComponents as B}from"../support/dateUtils.js";import{setFocus as k}from"../support/widgetUtils.js";const H={cancelEdit:"Escape"},z=Symbol(),P="esri-column",W={input:`${P}__cell-input`,inputContainer:`${P}__cell__input-container`};let M=class extends E{constructor(e){super(e),this._activeFieldInput=null,this.cellValueFormatFunction=({root:e,rowData:t,value:i})=>{const{formatFunction:n}=this;if(n&&t){const{index:o,item:{attachments:l,feature:r,relatedRecords:a}}=t;return n({attachments:l,column:this,feature:r,field:this.field,index:o,relatedRecords:a,value:this.sanitizeContent(i),virtualIndex:this.getVirtualRowIndex(e)})}if(null===i)return"&nbsp;";const o=this._getDomainForFeature(t?.item?.feature),l=this._getComputedDomain(i,o)||i;return this._isAnyDateOrTimeField&&"coded-value"!==o?.type?this._formatDateValueForDisplay(this.field,l):this._isNumericField&&"coded-value"!==o?.type?d(parseFloat(l),this._numberFormatOptions):this.sanitizeContent(l)},this.cellValueValidatorFunction=({oldValue:e,value:i})=>{const{_effectiveRange:n,field:o}=this,{max:l,min:r}=n;if(this.effectiveRequired&&(null==i||""===i))return!1;if(this._isNumericField&&(v(o,i)||!j({max:l,min:r,value:i})))return t.getLogger(this).warn("value-exceeds-valid-range","Field value exceeds valid range. Attempted edit was rejected."),!1;if(this._isAnyDateOrTimeField){const e=o.type;if(!R({type:e,range:n,value:i}))return!1}return e!==i},this.field=null,this.formatFunction=null,this.inputRenderFunction=async({root:e,column:i,rowData:n})=>{if(this.editInfo||!this.effectiveEditable)return;const o=this.getCellValue(n),{field:l}=this;if("big-integer"===l.type&&v(l,o))return void t.getLogger(this).warn("value-exceeds-valid-range","Field value is beyond supported limit. Editing is disabled for this field value.");const r=n?.item.feature;if(!r)return;this._activeFieldInput=this._setUpFieldInput(r,o);const a=document.createElement("div");a.classList.add(W.inputContainer);const s=[],u="coded-value"===this._effectiveDomain?.type;if(this._isAnyDateOrTimeField&&!u){const e=document.createElement("div"),t=this._setUpDateComponents(o),i=this._setUpDateActionBar();t.forEach(t=>e.appendChild(t)),a.appendChild(e),a.appendChild(i),s.push(...t)}else{const e=this.createInputElement({value:o});a.appendChild(e),s.push(e)}this._set("editInfo",{column:i,inputs:s,root:e,rowData:n,oldValue:o}),this.removeCellContent(e),e.appendChild(a),this._syncRowEditingState(e,!0),this.grid?.generateCellPartNames();const p=s[0];await k(p),"selectText"in p&&await p.selectText()},this.layer=null,this.parseInputValueFunction=({inputs:e})=>{const{editInfo:t,field:i,includeTime:n}=this;if(!t||!e.length)return null;const o=e[0];if(this._isAnyDateOrTimeField){if("coded-value"===this._effectiveDomain?.type){if(null==o.value||""===o.value)return null;const e=String(o.value);return F(i)?parseFloat(e):e}const{timeZone:l}=this.effectiveTimeZoneOptions,r=t.oldValue??void 0;switch(i.type){case"date-only":{const e=o.value;return""!==e?e:null}case"time-only":{const e=A(o.value);return""!==e?e:null}case"timestamp-offset":{const t=n?e[1]:void 0,i=e.at(-1);return N({oldValue:r,dateComponent:o,timeComponent:t,timeZoneComponent:i,defaultTimeZone:l})}case"date":{const{max:t,min:i}=this._effectiveRange;return S({oldValue:r,dateComponent:o,timeComponent:e[1],timeZone:l,max:t,min:i})}}return null}const l=o.value,{effectiveRequired:r}=this;return r||null!=l&&""!==l?this._isNumericField?parseFloat(l):this._isStringField?l.trim():l:null},this.sortable=!0,this.store=null,this.template=null,this.view=null}get _effectiveDomain(){const e=this._activeFieldInput?.feature;return e?this._getDomainForFeature(e):null}get _effectiveRange(){return this._activeFieldInput?.range??{max:null,min:null}}get _isAnyDateOrTimeField(){const{field:e}=this;return T(e)||_(e)}get _isIntegerField(){return C(this.field)}get _isNumericField(){return b(this.field)}get _isStringField(){return D(this.field)}get _isSubtypeField(){const{layer:e}=this;if(e?.subtypeField){const{subtypeField:t,fieldsIndex:i}=e;return(i.get(t)?.name??t)===this.fieldName}return!1}get _layerWithFieldConfigurations(){const{layer:e}=this;return Z(e)?e:null}get _dateTimeFormatOptions(){const{layerFieldConfigurationFormat:e,template:t}=this;return t?.format?.dateFormat?a(t.format.dateFormat):t?.input&&"includeTime"in t.input&&!1===t.input.includeTime?s:"date-time"===e?.type?u(e):this._isAnyDateOrTimeField?p:void 0}get _numberFormatOptions(){const{layerFieldConfigurationFormat:e,template:t}=this;return t?.format?m(t.format):"number"===e?.type?c(e):this._isNumericField?{useGrouping:!0,maximumFractionDigits:20}:void 0}get alias(){return r(this.field,this._layerWithFieldConfigurations)}get defaultValue(){return this.field?.defaultValue}get effectiveDescription(){const{description:e,field:t}=this,i=t.description,n=L(e)?L(i)?null:i:e;return null==n?null:this.sanitizeLabel(n)}get effectiveEditable(){const{editable:e,field:t,layer:i,tableEditingEnabled:n}=this;if(!t||!i)return!1;const o=f(i),l=i.effectiveCapabilities??i.capabilities,r=l?.operations?.supportsUpdate;return!!(t.editable&&o&&r&&"oid"!==t.type&&n)&&e}get effectiveLabel(){return this.sanitizeLabel(this.label||this.alias||this.fieldName)}get effectiveRequired(){return!this.nullable||this._isSubtypeField||this._activeFieldInput?.required||this.required}get effectiveSortable(){return!(!this.layer?.capabilities?.query?.supportsOrderBy||!this.sortable)}get effectiveTimeZoneOptions(){const{layer:e,field:t}=this;if(!e||"date"!==t?.type&&"timestamp-offset"!==t?.type)return{timeZone:void 0,timeZoneName:void 0};const{tableTimeZone:i,timeZone:n,view:o}=this;return w(e.preferredTimeZone||null,!!e.datesInUnknownTimezone,n??i??o?.timeZone??O,this._dateTimeFormatOptions??p,t.type)}get includeTime(){const{field:e,template:t}=this;return"time-only"===e.type||"date-only"!==e.type&&(!t?.input||"includeTime"in t.input&&!1!==t.input.includeTime)}get layerFieldConfigurationFormat(){const{_layerWithFieldConfigurations:e}=this;if(e)return e.getFieldConfiguration(this.fieldName)?.fieldFormat??g(this.field)}get maxLength(){const{field:e,template:t}=this,i=e?.length??-1,n=t?.input&&"maxLength"in t.input?t.input.maxLength:null;return null!=n&&!isNaN(n)&&n>=-1&&(-1===i||n<=i)?n:i}get minLength(){const{template:e,maxLength:t}=this,i=e?.input&&"minLength"in e.input?e.input.minLength:null;return t&&i<=t?i:null}get name(){return this.field?.name}get nullable(){return!1!==this.field.nullable}get shouldShowPrompt(){return this._isSubtypeField}createInputElement({value:e}){const{_effectiveDomain:t,maxLength:o,minLength:l,effectiveRequired:r}=this;let a;if("coded-value"===t?.type)a=this.createCalciteSelect(e,t.codedValues.map(({code:e,name:t})=>({value:e,name:t}))),this.addHandles([i(()=>a,"calciteSelectChange",()=>this.onInputBlur(),n)],z);else if(this._isNumericField){const{_effectiveRange:{max:t,min:i}}=this;a=document.createElement("calcite-input"),a.type="number",this._isIntegerField&&(a.step=1),null!=t&&(a.max=t),null!=i&&(a.min=i),a.status=j({max:t,min:i,value:e})?"idle":"invalid"}else a=document.createElement("calcite-input"),this.addHandles([i(()=>a,"calciteInputChange",()=>this.onInputBlur(),n)],z),o>-1&&(a.maxLength=o),l>0&&(a.minLength=l);return a.classList.add(W.input),a.required=r,a.value=null!=e?e.toString():"",this.addHandles([i(()=>a,"keydown",e=>{e.key===H.cancelEdit&&this.onInputBlur(!0)},n),i(()=>a,"blur",()=>this.onInputBlur(),n)],z),a}onInputBlur(e=!1){this.removeHandles(z),super.onInputBlur(e)}onEditComplete(){const e=this.editInfo?.root;e&&this._syncRowEditingState(e,!1),this._activeFieldInput=null,super.onEditComplete()}get test(){}_clearActiveEditValues(){this.editInfo?.inputs?.forEach(e=>e.value="")}_setUpDateActionBar(){const{messagesCommon:e}=this,t=e?.cancel??"",i=e?.clear??"",n=e?.save??"",o=document.createElement("calcite-action-bar");return o.expandDisabled=!0,o.layout="horizontal",o.appendChild(this.createCalciteAction({text:n,icon:"save",onclick:()=>this.submit()})),this.effectiveRequired||o.appendChild(this.createCalciteAction({text:i,icon:"trash",onclick:()=>{this._clearActiveEditValues(),this.submit()}})),o.appendChild(this.createCalciteAction({text:t,icon:"x",onclick:()=>this.cancel()})),o}_formatDateValueForDisplay(e,t){const{timeZone:i,timeZoneName:n}=this.effectiveTimeZoneOptions;return null!=t?U(e,t,{...this._dateTimeFormatOptions,timeZone:i,timeZoneName:n}):null}_setUpDateComponents(e){const{_effectiveRange:{max:t,min:n,rawMax:o,rawMin:l},field:r,effectiveRequired:a}=this,s=this._getDateFieldValuesForComponents(r,e),u=[];if(T(r)){const e=this.createDateComponent(),p=I(r)||x(r)?o:t,d=I(r)||x(r)?l:n,m=this._getDateFieldValuesForComponents(r,p??null),c=this._getDateFieldValuesForComponents(r,d??null);e.value=s.date??"",e.max=m.date??"",e.min=c.date??"",e.required=a,this.addHandles([i(()=>e,"calciteInputDatePickerOpen",()=>this._onDateComponentOpen(e))],z),u.push(e)}if(this.includeTime){const e=this.createTimeComponent();e.value=s.time??"",e.required=a,this.addHandles([i(()=>e,"calciteInputTimePickerOpen",()=>this._onDateComponentOpen(e))],z),u.push(e)}if("timestamp-offset"===r.type){const e=this.createTimeZoneComponent();e.value=s.timeZoneOffset??"0",this.addHandles([i(()=>e,"calciteInputTimeZoneOpen",()=>this._onDateComponentOpen(e))],z),u.push(e)}return u}_onDateComponentOpen(e){this.editInfo?.inputs.forEach(t=>{t!==e&&"open"in t&&(t.open=!1)})}_syncRowEditingState(e,t=!1){const i=this.grid?.getRowContainingNode(e);i&&(t?i.setAttribute("editing","true"):i.removeAttribute("editing"))}_getDateFieldValuesForComponents(e,t){switch(e.type){case"date":return B(t,this.effectiveTimeZoneOptions.timeZone);case"date-only":return{date:t};case"time-only":return{time:t};case"timestamp-offset":return q(t);default:return{}}}_setUpFieldInput(e,t){const{field:i,layer:n,effectiveTimeZoneOptions:{timeZone:o}}=this,l=new V({feature:e,field:i,initialFeature:e.clone(),layer:n,timeZone:o});return l.set("value",t),l}_isDomainCompatible(e){if(!e)return!1;const{_isNumericField:t,_isStringField:i}=this,{type:n}=e;if("coded-value"===n){const n=typeof e.codedValues[0].code;if("string"===n&&i||"number"===n&&t)return!0}return!("range"!==n||!t)}_getDomainForFeature(e){const{fieldName:t,layer:i,template:n}=this;if(!e||!i?.getFieldDomain)return null;if("wfs"===i.type||"geojson"===i.type||"csv"===i.type)return null;if(n?.domain&&this._isDomainCompatible(n.domain))return n.domain;if("feature"!==i.type&&"subtype-group"!==i.type&&null==i.getField(t)?.domain){const e=h(i,t);if(e)return e}return i.getFieldDomain(t,{feature:e})}_getComputedDomain(e,t){if(!t)return null;if("range"===t.type)return e;if("coded-value"===t.type){const i=t.codedValues.filter(t=>t.hasOwnProperty("code")&&t.code===e);return i&&i.length?i[0].name:e}return null}};e([o()],M.prototype,"_effectiveDomain",null),e([o()],M.prototype,"_activeFieldInput",void 0),e([o()],M.prototype,"_effectiveRange",null),e([o()],M.prototype,"_isAnyDateOrTimeField",null),e([o()],M.prototype,"_isIntegerField",null),e([o()],M.prototype,"_isNumericField",null),e([o()],M.prototype,"_isStringField",null),e([o()],M.prototype,"_isSubtypeField",null),e([o()],M.prototype,"_layerWithFieldConfigurations",null),e([o()],M.prototype,"_dateTimeFormatOptions",null),e([o()],M.prototype,"_numberFormatOptions",null),e([o({readOnly:!0})],M.prototype,"alias",null),e([o()],M.prototype,"cellValueFormatFunction",void 0),e([o()],M.prototype,"cellValueValidatorFunction",void 0),e([o({readOnly:!0})],M.prototype,"defaultValue",null),e([o()],M.prototype,"effectiveDescription",null),e([o()],M.prototype,"effectiveEditable",null),e([o()],M.prototype,"effectiveLabel",null),e([o()],M.prototype,"effectiveRequired",null),e([o()],M.prototype,"effectiveSortable",null),e([o()],M.prototype,"effectiveTimeZoneOptions",null),e([o({type:y})],M.prototype,"field",void 0),e([o()],M.prototype,"formatFunction",void 0),e([o()],M.prototype,"includeTime",null),e([o()],M.prototype,"inputRenderFunction",void 0),e([o()],M.prototype,"layer",void 0),e([o()],M.prototype,"layerFieldConfigurationFormat",null),e([o()],M.prototype,"maxLength",null),e([o()],M.prototype,"minLength",null),e([o({readOnly:!0})],M.prototype,"name",null),e([o({readOnly:!0})],M.prototype,"nullable",null),e([o()],M.prototype,"parseInputValueFunction",void 0),e([o()],M.prototype,"shouldShowPrompt",null),e([o()],M.prototype,"sortable",void 0),e([o()],M.prototype,"store",void 0),e([o()],M.prototype,"template",void 0),e([o()],M.prototype,"view",void 0),M=e([l("esri.widgets.FeatureTable.FieldColumn")],M);const G=M;export{G as default};
5
+ import{__decorate as e}from"tslib";import"../../core/has.js";import t from"../../core/Logger.js";import{on as i,sync as n}from"../../core/reactiveUtils.js";import{property as o,subclass as l}from"../../core/accessorSupport/decorators.js";import{getEffectiveFieldAlias as r}from"../../editing/fieldUtils.js";import{convertDateFormatToIntlOptions as a,defaultFormatterOptionsNoTime as s,convertDateTimeFieldFormatToIntlOptions as u,defaultFormatterOptions as p}from"../../intl/date.js";import{formatNumber as d,convertNumberFormatToIntlOptions as m,convertNumberFieldFormatToIntlOptions as c}from"../../intl/number.js";import{isEditableLayer as h}from"../../layers/support/editableLayers.js";import{computeDomainFromTypes as f}from"../../layers/support/featureLayerUtils.js";import g from"../../layers/support/Field.js";import{defaultFieldFormat as y}from"../../layers/support/fieldFormatUtils.js";import{validateFieldValue as v,isDateField as F,isTimeOnlyField as _,isIntegerField as C,isNumericField as b,isStringField as x,isDateOnlyField as D,isTimestampOffsetField as I}from"../../layers/support/fieldUtils.js";import{isAnyDateField as T}from"../../smartMapping/support/utils.js";import{system as V}from"../../time/constants.js";import{getTimeZoneFormattingOptions as O}from"../../time/timeZoneUtils.js";import E from"../FeatureForm/FieldInput.js";import w from"./Grid/EditorColumn.js";import{isIFeatureTableSupportedLayerWithFieldConfigurations as Z,isEmptyStringOrWhitespace as L}from"./support/tableUtils.js";import{valueIsInRange as R,dateTimeIsInRange as j,getUnixFieldValueFromDateComponents as S,getISOFieldValueFromDateComponents as N,normalizeTimeOnlyString as U,getLabelForDateFieldValue as A,prepareISOFieldValueForDateComponents as q,prepareUnixFieldValueForDateComponents as B}from"../support/dateUtils.js";import{setFocus as k}from"../support/widgetUtils.js";const H={cancelEdit:"Escape"},z=Symbol(),G="esri-column",P={input:`${G}__cell-input`,inputContainer:`${G}__cell__input-container`};let W=class extends w{constructor(e){super(e),this._activeFieldInput=null,this.cellValueFormatFunction=({root:e,rowData:t,value:i})=>{const{formatFunction:n}=this;if(n&&t){const{index:o,item:{attachments:l,feature:r,relatedRecords:a}}=t;return n({attachments:l,column:this,feature:r,field:this.field,index:o,relatedRecords:a,value:this.sanitizeContent(i),virtualIndex:this.getVirtualRowIndex(e)})}if(null===i)return"&nbsp;";const o=this._getDomainForFeature(t?.item?.feature),l=this._getComputedDomain(i,o)||i;return this._isAnyDateOrTimeField&&"coded-value"!==o?.type?this._formatDateValueForDisplay(this.field,l):this._isNumericField&&"coded-value"!==o?.type?d(parseFloat(l),this._numberFormatOptions):this.sanitizeContent(l)},this.cellValueValidatorFunction=({oldValue:e,value:i})=>{const{_effectiveRange:n,field:o}=this,{max:l,min:r}=n;if(this.effectiveRequired&&(null==i||""===i))return!1;if(this._isNumericField&&(v(o,i)||!R({max:l,min:r,value:i})))return t.getLogger(this).warn("value-exceeds-valid-range","Field value exceeds valid range. Attempted edit was rejected."),!1;if(this._isAnyDateOrTimeField){const e=o.type;if(!j({type:e,range:n,value:i}))return!1}return e!==i},this.field=null,this.formatFunction=null,this.inputRenderFunction=async({root:e,column:i,rowData:n})=>{if(this.editInfo||!this.effectiveEditable)return;const o=this.getCellValue(n),{field:l}=this;if("big-integer"===l.type&&v(l,o))return void t.getLogger(this).warn("value-exceeds-valid-range","Field value is beyond supported limit. Editing is disabled for this field value.");const r=n?.item.feature;if(!r)return;this._activeFieldInput=this._setUpFieldInput(r,o);const a=document.createElement("div");a.classList.add(P.inputContainer);const s=[],u="coded-value"===this._effectiveDomain?.type;if(this._isAnyDateOrTimeField&&!u){const e=document.createElement("div"),t=this._setUpDateComponents(o),i=this._setUpDateActionBar();t.forEach(t=>e.appendChild(t)),a.appendChild(e),a.appendChild(i),s.push(...t)}else{const e=this.createInputElement({value:o});a.appendChild(e),s.push(e)}this._set("editInfo",{column:i,inputs:s,root:e,rowData:n,oldValue:o}),this.removeCellContent(e),e.appendChild(a),this._syncRowEditingState(e,!0),this.grid?.generateCellPartNames();const p=s[0];await k(p),"selectText"in p&&await p.selectText()},this.layer=null,this.parseInputValueFunction=({inputs:e})=>{const{editInfo:t,field:i,includeTime:n}=this;if(!t||!e.length)return null;const o=e[0];if(this._isAnyDateOrTimeField){if("coded-value"===this._effectiveDomain?.type){if(null==o.value||""===o.value)return null;const e=String(o.value);return F(i)?parseFloat(e):e}const{timeZone:l}=this.effectiveTimeZoneOptions,r=t.oldValue??void 0;switch(i.type){case"date-only":{const e=o.value;return""!==e?e:null}case"time-only":{const e=U(o.value);return""!==e?e:null}case"timestamp-offset":{const t=n?e[1]:void 0,i=e.at(-1);return N({oldValue:r,dateComponent:o,timeComponent:t,timeZoneComponent:i,defaultTimeZone:l})}case"date":{const{max:t,min:i}=this._effectiveRange;return S({oldValue:r,dateComponent:o,timeComponent:e[1],timeZone:l,max:t,min:i})}}return null}const l=o.value,{effectiveRequired:r}=this;return r||null!=l&&""!==l?this._isNumericField?parseFloat(l):this._isStringField?l.trim():l:null},this.sortable=!0,this.store=null,this.template=null,this.view=null}get _effectiveDomain(){const e=this._activeFieldInput?.feature;return e?this._getDomainForFeature(e):null}get _effectiveRange(){return this._activeFieldInput?.range??{max:null,min:null}}get _isAnyDateOrTimeField(){const{field:e}=this;return T(e)||_(e)}get _isIntegerField(){return C(this.field)}get _isNumericField(){return b(this.field)}get _isStringField(){return x(this.field)}get _isSubtypeField(){const{layer:e}=this;if(e?.subtypeField){const{subtypeField:t,fieldsIndex:i}=e;return(i.get(t)?.name??t)===this.fieldName}return!1}get _layerWithFieldConfigurations(){const{layer:e}=this;return Z(e)?e:null}get _dateTimeFormatOptions(){const{layerFieldConfigurationFormat:e,template:t}=this;return t?.format?.dateFormat?a(t.format.dateFormat):t?.input&&"includeTime"in t.input&&!1===t.input.includeTime?s:"date-time"===e?.type?u(e):this._isAnyDateOrTimeField?p:void 0}get _numberFormatOptions(){const{layerFieldConfigurationFormat:e,template:t}=this;return t?.format?m(t.format):"number"===e?.type?c(e):this._isNumericField?{useGrouping:!0,maximumFractionDigits:20}:void 0}get alias(){return r(this.field,this._layerWithFieldConfigurations)}get defaultValue(){return this.field?.defaultValue}get effectiveDescription(){const{description:e,field:t}=this,i=t.description,n=L(e)?L(i)?null:i:e;return null==n?null:this.sanitizeLabel(n)}get effectiveEditable(){const{editable:e,field:t,layer:i,tableEditingEnabled:n}=this;if(!t||!i)return!1;const o=h(i),l=i.effectiveCapabilities??i.capabilities,r=l?.operations?.supportsUpdate;return!!(t.editable&&o&&r&&"oid"!==t.type&&n)&&e}get effectiveLabel(){return this.sanitizeLabel(this.label||this.alias||this.fieldName)}get effectiveRequired(){return!this.nullable||this._isSubtypeField||this._activeFieldInput?.required||this.required}get effectiveSortable(){return!(!this.layer?.capabilities?.query?.supportsOrderBy||!this.sortable)}get effectiveTimeZoneOptions(){const{layer:e,field:t}=this;if(!e||"date"!==t?.type&&"timestamp-offset"!==t?.type)return{timeZone:void 0,timeZoneName:void 0};const{tableTimeZone:i,timeZone:n,view:o}=this;return O(e.preferredTimeZone||null,!!e.datesInUnknownTimezone,n??i??o?.timeZone??V,this._dateTimeFormatOptions??p,t.type)}get includeTime(){const{field:e,template:t}=this;return"time-only"===e.type||"date-only"!==e.type&&(!t?.input||"includeTime"in t.input&&!1!==t.input.includeTime)}get hasContingentValues(){return this.store.fieldsWithContingentValues.has(this.fieldName)}get layerFieldConfigurationFormat(){const{_layerWithFieldConfigurations:e}=this;if(e)return e.getFieldConfiguration(this.fieldName)?.fieldFormat??y(this.field)}get maxLength(){const{field:e,template:t}=this,i=e?.length??-1,n=t?.input&&"maxLength"in t.input?t.input.maxLength:null;return null!=n&&!isNaN(n)&&n>=-1&&(-1===i||n<=i)?n:i}get minLength(){const{template:e,maxLength:t}=this,i=e?.input&&"minLength"in e.input?e.input.minLength:null;return t&&i<=t?i:null}get name(){return this.field?.name}get nullable(){return!1!==this.field.nullable}get shouldShowPrompt(){return this._isSubtypeField}createInputElement({value:e}){const{_effectiveDomain:t,maxLength:o,minLength:l,effectiveRequired:r}=this;let a;if("coded-value"===t?.type){const o=t.codedValues.map(({code:e,name:t})=>({value:e,name:t})),l={recommended:o,other:[],unsupported:[]};this.hasContingentValues?(a=this._setUpComboboxComponent(l,e),this.addHandles([i(()=>a,"calciteComboboxChange",()=>this.onInputBlur(),n),i(()=>a,"pointerdown",e=>e.preventDefault(),n)],z)):(a=this.createCalciteSelect(e,o),this.addHandles(i(()=>a,"calciteSelectChange",()=>this.onInputBlur(),n),z))}else{if(this._isNumericField){const{_effectiveRange:{max:t,min:i}}=this;a=document.createElement("calcite-input"),a.type="number",this._isIntegerField&&(a.step=1),null!=t&&(a.max=t),null!=i&&(a.min=i),a.status=R({max:t,min:i,value:e})?"idle":"invalid"}else a=document.createElement("calcite-input"),o>-1&&(a.maxLength=o),l>0&&(a.minLength=l);this.addHandles(i(()=>a,"calciteInputChange",()=>this.onInputBlur(),n),z),a.value=null!=e?e.toString():""}return a.classList.add(P.input),a.required=r,this.addHandles([i(()=>a,"keydown",e=>{e.key===H.cancelEdit&&this.onInputBlur(!0)},n),i(()=>a,"blur",()=>this.onInputBlur(),n)],z),a}onInputBlur(e=!1){this.removeHandles(z),super.onInputBlur(e)}onEditComplete(){const e=this.editInfo?.root;e&&this._syncRowEditingState(e,!1),this._activeFieldInput=null,super.onEditComplete()}get test(){}_clearActiveEditValues(){this.editInfo?.inputs?.forEach(e=>e.value="")}_setUpDateActionBar(){const{messagesCommon:e}=this,t=e?.cancel??"",i=e?.clear??"",n=e?.save??"",o=document.createElement("calcite-action-bar");return o.expandDisabled=!0,o.layout="horizontal",o.appendChild(this.createCalciteAction({text:n,icon:"save",onclick:()=>this.submit()})),this.effectiveRequired||o.appendChild(this.createCalciteAction({text:i,icon:"trash",onclick:()=>{this._clearActiveEditValues(),this.submit()}})),o.appendChild(this.createCalciteAction({text:t,icon:"x",onclick:()=>this.cancel()})),o}_formatDateValueForDisplay(e,t){const{timeZone:i,timeZoneName:n}=this.effectiveTimeZoneOptions;return null!=t?A(e,t,{...this._dateTimeFormatOptions,timeZone:i,timeZoneName:n}):null}_fieldValueOptionToComboboxItem({disabled:e,name:t,value:i},n){const o=n===i;return this.createCalciteComboboxItem({disabled:e,heading:t,selected:o,value:i})}_setUpComboboxComponent(e,t){const{recommended:i,other:n,unsupported:o}=e,l=this.messages,r=this.createCalciteCombobox({label:this.effectiveLabel,required:this.effectiveRequired}),a=i.map(e=>this._fieldValueOptionToComboboxItem(e,t));if(0===n.length&&0===o.length)return a.forEach(e=>r.appendChild(e)),r;const s=this.createCalciteComboboxItemGroup({label:l.contingentValues.recommended});if(a.forEach(e=>s.appendChild(e)),r.appendChild(s),n.length){const e=this.createCalciteComboboxItemGroup({label:l.contingentValues.other});n.forEach(i=>e.appendChild(this._fieldValueOptionToComboboxItem(i,t))),r.appendChild(e)}if(o.length){const e=this.createCalciteComboboxItemGroup({label:l.subtypes.unsupportedDomainGroupTitle});o.forEach(i=>e.appendChild(this._fieldValueOptionToComboboxItem(i,t))),r.appendChild(e)}return r}_setUpDateComponents(e){const{_effectiveRange:{max:t,min:n,rawMax:o,rawMin:l},field:r,effectiveRequired:a}=this,s=this._getDateFieldValuesForComponents(r,e),u=[];if(T(r)){const e=this.createDateComponent(),p=D(r)||I(r)?o:t,d=D(r)||I(r)?l:n,m=this._getDateFieldValuesForComponents(r,p??null),c=this._getDateFieldValuesForComponents(r,d??null);e.value=s.date??"",e.max=m.date??"",e.min=c.date??"",e.required=a,this.addHandles([i(()=>e,"calciteInputDatePickerOpen",()=>this._onDateComponentOpen(e))],z),u.push(e)}if(this.includeTime){const e=this.createTimeComponent();e.value=s.time??"",e.required=a,this.addHandles([i(()=>e,"calciteInputTimePickerOpen",()=>this._onDateComponentOpen(e))],z),u.push(e)}if("timestamp-offset"===r.type){const e=this.createTimeZoneComponent();e.value=s.timeZoneOffset??"0",this.addHandles([i(()=>e,"calciteInputTimeZoneOpen",()=>this._onDateComponentOpen(e))],z),u.push(e)}return u}_onDateComponentOpen(e){this.editInfo?.inputs.forEach(t=>{t!==e&&"open"in t&&(t.open=!1)})}_syncRowEditingState(e,t=!1){const i=this.grid?.getRowContainingNode(e);i&&(t?i.setAttribute("editing","true"):i.removeAttribute("editing"))}_getDateFieldValuesForComponents(e,t){switch(e.type){case"date":return B(t,this.effectiveTimeZoneOptions.timeZone);case"date-only":return{date:t};case"time-only":return{time:t};case"timestamp-offset":return q(t);default:return{}}}_setUpFieldInput(e,t){const{field:i,layer:n,effectiveTimeZoneOptions:{timeZone:o}}=this,l=new E({feature:e,field:i,initialFeature:e.clone(),layer:n,timeZone:o});return l.set("value",t),l}_isDomainCompatible(e){if(!e)return!1;const{_isNumericField:t,_isStringField:i}=this,{type:n}=e;if("coded-value"===n){const n=typeof e.codedValues[0].code;if("string"===n&&i||"number"===n&&t)return!0}return!("range"!==n||!t)}_getDomainForFeature(e){const{fieldName:t,layer:i,template:n}=this;if(!e||!i?.getFieldDomain)return null;if("wfs"===i.type||"geojson"===i.type||"csv"===i.type)return null;if(n?.domain&&this._isDomainCompatible(n.domain))return n.domain;if("feature"!==i.type&&"subtype-group"!==i.type&&null==i.getField(t)?.domain){const e=f(i,t);if(e)return e}return i.getFieldDomain(t,{feature:e})}_getComputedDomain(e,t){if(!t)return null;if("range"===t.type)return e;if("coded-value"===t.type){const i=t.codedValues.filter(t=>t.hasOwnProperty("code")&&t.code===e);return i&&i.length?i[0].name:e}return null}};e([o()],W.prototype,"_effectiveDomain",null),e([o()],W.prototype,"_activeFieldInput",void 0),e([o()],W.prototype,"_effectiveRange",null),e([o()],W.prototype,"_isAnyDateOrTimeField",null),e([o()],W.prototype,"_isIntegerField",null),e([o()],W.prototype,"_isNumericField",null),e([o()],W.prototype,"_isStringField",null),e([o()],W.prototype,"_isSubtypeField",null),e([o()],W.prototype,"_layerWithFieldConfigurations",null),e([o()],W.prototype,"_dateTimeFormatOptions",null),e([o()],W.prototype,"_numberFormatOptions",null),e([o({readOnly:!0})],W.prototype,"alias",null),e([o()],W.prototype,"cellValueFormatFunction",void 0),e([o()],W.prototype,"cellValueValidatorFunction",void 0),e([o({readOnly:!0})],W.prototype,"defaultValue",null),e([o()],W.prototype,"effectiveDescription",null),e([o()],W.prototype,"effectiveEditable",null),e([o()],W.prototype,"effectiveLabel",null),e([o()],W.prototype,"effectiveRequired",null),e([o()],W.prototype,"effectiveSortable",null),e([o()],W.prototype,"effectiveTimeZoneOptions",null),e([o({type:g})],W.prototype,"field",void 0),e([o()],W.prototype,"formatFunction",void 0),e([o()],W.prototype,"includeTime",null),e([o()],W.prototype,"inputRenderFunction",void 0),e([o()],W.prototype,"hasContingentValues",null),e([o()],W.prototype,"layer",void 0),e([o()],W.prototype,"layerFieldConfigurationFormat",null),e([o()],W.prototype,"maxLength",null),e([o()],W.prototype,"minLength",null),e([o({readOnly:!0})],W.prototype,"name",null),e([o({readOnly:!0})],W.prototype,"nullable",null),e([o()],W.prototype,"parseInputValueFunction",void 0),e([o()],W.prototype,"shouldShowPrompt",null),e([o()],W.prototype,"sortable",void 0),e([o()],W.prototype,"store",void 0),e([o()],W.prototype,"template",void 0),e([o()],W.prototype,"view",void 0),W=e([l("esri.widgets.FeatureTable.FieldColumn")],W);const M=W;export{M as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as t}from"tslib";import{on as e,sync as n}from"../../../core/reactiveUtils.js";import{property as i,subclass as o}from"../../../core/accessorSupport/decorators.js";import l from"./Column.js";import{autoLink as r}from"../../support/uriUtils.js";const a={showInput:"Enter",cancelEdit:"Escape"},s=Symbol();let c=class extends l{constructor(t){super(t),this.editInfo=null,this.cellValueValidatorFunction=({oldValue:t,value:e})=>t!==e,this.editable=!0,this.headerRenderFunction=t=>{const{root:e}=t,n=this.createHeaderContent();this.tableEditingEnabled&&!this.effectiveEditable&&n.prepend(this._lockIconNode),this.removeCellContent(e),e.appendChild(n)},this.inputRenderFunction=({root:t,column:e,rowData:n})=>{if(this.editInfo||!this.effectiveEditable||!n)return;const i=this.getCellValue(n),o=this.createInputElement({value:i});this._set("editInfo",{column:e,inputs:[o],root:t,rowData:n,oldValue:i});const l=document.createElement("div");l.appendChild(o),this.removeCellContent(t),t.appendChild(l),o.focus(),o instanceof HTMLInputElement&&o.select()},this.inputType="text",this.maxLength=null,this.onShowPromptCallback=()=>{},this.parseInputValueFunction=({inputs:t})=>t?.length||1!==t.length||Array.isArray(t[0].value)?null:t[0].value,this.renderFunction=t=>{const{root:e,rowData:n}=t,{editInfo:i}=this;if(i)return;const o=this.getCellValue(n),l=this.cellValueFormatFunction({root:e,rowData:n,value:o});let s=null;e.onclick=()=>e.focus(),e.ondblclick=()=>this.inputRenderFunction(t),e.ontouchend=()=>this.inputRenderFunction(t);const c=this.grid?.getSlotElementByName(e.slot),u=c?.parentElement;u&&!u.onkeydown&&(u.onkeydown=e=>{e.key!==a.showInput||this.editInfo||this.inputRenderFunction(t),e.key===a.cancelEdit&&this.editInfo&&this.cancel()}),null!=o&&null!=l?e.title=l.toString():e.title&&e.removeAttribute("title"),s=l instanceof HTMLElement?l:r(this.messagesURIUtils,l),this.removeCellContent(e),s instanceof HTMLElement?e.appendChild(s):null!=s&&(e.innerHTML=s.toString())},this.required=!1}get _lockIconNode(){return this.createCalciteIcon({icon:"lock",textLabel:this.messages?.editingPreventedColumn})}get effectiveEditable(){return this.tableEditingEnabled&&this.editable}get effectiveRequired(){return this.required}get editing(){return!!this.editInfo}get loadingMessage(){return this.messages?.loading||"..."}get shouldShowPrompt(){return!1}get tableEditingEnabled(){return this.store.editingEnabled}cancel(){this.onEditComplete()}createCalciteOption(t,e,n=!1){const i=document.createElement("calcite-option");return i.label=t,i.value=`${e}`,i.selected=n,i}createCalciteSelect(t,e){const{effectiveRequired:n,messages:i}=this;let o=!1;const l=e.map(({name:e,value:n})=>{const i=n===t;return i&&(o=!0),this.createCalciteOption(e,n,i)});if(null!=t&&""!==t&&!o){const e=t.toString(),n=this.createCalciteOption(e,e);l.unshift(n)}n||l.unshift(this.createCalciteOption(`<${i?.noValue}>`,""));const r=document.createElement("calcite-select");return l.forEach(t=>r.appendChild(t)),r}createInputElement({value:t}){const{effectiveRequired:i,maxLength:o}=this,l=document.createElement("calcite-input");return null!=o&&(l.maxLength=o),l.required=i,l.value=null!=t?t.toString():"",this.addHandles([e(()=>l,"calciteInputChange",()=>this.onInputBlur(),n),e(()=>l,"keydown",t=>{t.key===a.cancelEdit&&this.onInputBlur(!0)},n),e(()=>l,"blur",()=>this.onInputBlur(),n)],s),l}createDateComponent(){const t=document.createElement("calcite-input-date-picker");return t.focusTrapDisabled=!0,t.overlayPositioning="fixed",t}createTimeComponent(){const t=document.createElement("calcite-input-time-picker");return t.overlayPositioning="fixed",t.placement="auto-start",t.step=1,t}createTimeZoneComponent(){const t=document.createElement("calcite-input-time-zone");return t.maxItems=4,t.overlayPositioning="fixed",t}onEditComplete(){this._set("editInfo",null),this.grid?.generateCellPartNames(),this.grid?.requestContentUpdate()}onInputBlur(t=!1){this.removeHandles(s),t?this.cancel():this.submit()}async submit(){const{editInfo:t}=this;if(!t)return void this.cancel();const{inputs:e,rowData:n,oldValue:i}=t,o=this.parseInputValueFunction({inputs:e});if(!this.cellValueValidatorFunction({value:o,oldValue:i}))return void this.cancel();const{root:l}=t,r=n.item.objectId,{fieldName:a}=this;l.textContent=this.loadingMessage,this.shouldShowPrompt?this.onShowPromptCallback({column:this,objectId:r,oldValue:i,value:o}):await this.updateItems({objectId:r,updates:[{fieldName:a,value:o}]})}async updateItems(t){try{await this.store.updateItem(t),this.onEditComplete()}catch{this.cancel()}}};t([i()],c.prototype,"_lockIconNode",null),t([i({readOnly:!0})],c.prototype,"editInfo",void 0),t([i()],c.prototype,"cellValueValidatorFunction",void 0),t([i()],c.prototype,"editable",void 0),t([i()],c.prototype,"effectiveEditable",null),t([i()],c.prototype,"effectiveRequired",null),t([i()],c.prototype,"editing",null),t([i()],c.prototype,"headerRenderFunction",void 0),t([i()],c.prototype,"inputRenderFunction",void 0),t([i()],c.prototype,"loadingMessage",null),t([i()],c.prototype,"inputType",void 0),t([i()],c.prototype,"maxLength",void 0),t([i()],c.prototype,"onShowPromptCallback",void 0),t([i()],c.prototype,"parseInputValueFunction",void 0),t([i()],c.prototype,"renderFunction",void 0),t([i()],c.prototype,"required",void 0),t([i()],c.prototype,"shouldShowPrompt",null),t([i()],c.prototype,"tableEditingEnabled",null),c=t([o("esri.widgets.FeatureTable.Grid.EditorColumn")],c);const u=c;export{u as default};
5
+ import{__decorate as e}from"tslib";import{on as t,sync as n}from"../../../core/reactiveUtils.js";import{property as o,subclass as i}from"../../../core/accessorSupport/decorators.js";import l from"./Column.js";import{autoLink as r}from"../../support/uriUtils.js";const a={showInput:"Enter",cancelEdit:"Escape"},c=Symbol();let s=class extends l{constructor(e){super(e),this.editInfo=null,this.cellValueValidatorFunction=({oldValue:e,value:t})=>e!==t,this.editable=!0,this.headerRenderFunction=e=>{const{root:t}=e,n=this.createHeaderContent();this.tableEditingEnabled&&!this.effectiveEditable&&n.prepend(this._lockIconNode),this.removeCellContent(t),t.appendChild(n)},this.inputRenderFunction=({root:e,column:t,rowData:n})=>{if(this.editInfo||!this.effectiveEditable||!n)return;const o=this.getCellValue(n),i=this.createInputElement({value:o});this._set("editInfo",{column:t,inputs:[i],root:e,rowData:n,oldValue:o});const l=document.createElement("div");l.appendChild(i),this.removeCellContent(e),e.appendChild(l),i.focus(),i instanceof HTMLInputElement&&i.select()},this.inputType="text",this.maxLength=null,this.onShowPromptCallback=()=>{},this.parseInputValueFunction=({inputs:e})=>e?.length||1!==e.length||Array.isArray(e[0].value)?null:e[0].value,this.renderFunction=e=>{const{root:t,rowData:n}=e,{editInfo:o}=this;if(o)return;const i=this.getCellValue(n),l=this.cellValueFormatFunction({root:t,rowData:n,value:i});let c=null;t.onclick=()=>t.focus(),t.ondblclick=()=>this.inputRenderFunction(e),t.ontouchend=()=>this.inputRenderFunction(e);const s=this.grid?.getSlotElementByName(t.slot),u=s?.parentElement;u&&!u.onkeydown&&(u.onkeydown=t=>{t.key!==a.showInput||this.editInfo||this.inputRenderFunction(e),t.key===a.cancelEdit&&this.editInfo&&this.cancel()}),null!=i&&null!=l?t.title=l.toString():t.title&&t.removeAttribute("title"),c=l instanceof HTMLElement?l:r(this.messagesURIUtils,l),this.removeCellContent(t),c instanceof HTMLElement?t.appendChild(c):null!=c&&(t.innerHTML=c.toString())},this.required=!1}get _lockIconNode(){return this.createCalciteIcon({icon:"lock",textLabel:this.messages?.editingPreventedColumn})}get effectiveEditable(){return this.tableEditingEnabled&&this.editable}get effectiveRequired(){return this.required}get editing(){return!!this.editInfo}get loadingMessage(){return this.messages?.loading||"..."}get shouldShowPrompt(){return!1}get tableEditingEnabled(){return this.store.editingEnabled}cancel(){this.onEditComplete()}createCalciteCombobox(e){const t=document.createElement("calcite-combobox");return t.clearDisabled=!0,t.overlayPositioning="fixed",t.selectionMode="single",t.required=!!e.required,t}createCalciteComboboxItem(e){const t=document.createElement("calcite-combobox-item");return t.disabled=e.disabled??!1,t.heading=e.heading,t.value=e.value,t.selected=e.selected??!1,t}createCalciteComboboxItemGroup(e){const t=document.createElement("calcite-combobox-item-group");return t.label=e.label,t}createCalciteOption(e,t,n=!1){const o=document.createElement("calcite-option");return o.label=e,o.value=`${t}`,o.selected=n,o}createCalciteSelect(e,t){const{effectiveRequired:n,messages:o}=this;let i=!1;const l=t.map(({name:t,value:n})=>{const o=n===e;return o&&(i=!0),this.createCalciteOption(t,n,o)});if(null!=e&&""!==e&&!i){const t=e.toString(),n=this.createCalciteOption(t,t);l.unshift(n)}n||l.unshift(this.createCalciteOption(`<${o?.noValue}>`,""));const r=document.createElement("calcite-select");return l.forEach(e=>r.appendChild(e)),r}createInputElement({value:e}){const{effectiveRequired:o,maxLength:i}=this,l=document.createElement("calcite-input");return null!=i&&(l.maxLength=i),l.required=o,l.value=null!=e?e.toString():"",this.addHandles([t(()=>l,"calciteInputChange",()=>this.onInputBlur(),n),t(()=>l,"keydown",e=>{e.key===a.cancelEdit&&this.onInputBlur(!0)},n),t(()=>l,"blur",()=>this.onInputBlur(),n)],c),l}createDateComponent(){const e=document.createElement("calcite-input-date-picker");return e.focusTrapDisabled=!0,e.overlayPositioning="fixed",e}createTimeComponent(){const e=document.createElement("calcite-input-time-picker");return e.overlayPositioning="fixed",e.placement="auto-start",e.step=1,e}createTimeZoneComponent(){const e=document.createElement("calcite-input-time-zone");return e.maxItems=4,e.overlayPositioning="fixed",e}onEditComplete(){this._set("editInfo",null),this.grid?.generateCellPartNames(),this.grid?.requestContentUpdate()}onInputBlur(e=!1){this.removeHandles(c),e?this.cancel():this.submit()}async submit(){const{editInfo:e}=this;if(!e)return void this.cancel();const{inputs:t,rowData:n,oldValue:o}=e,i=this.parseInputValueFunction({inputs:t});if(!this.cellValueValidatorFunction({value:i,oldValue:o}))return void this.cancel();const{root:l}=e,r=n.item.objectId,{fieldName:a}=this;l.textContent=this.loadingMessage,this.shouldShowPrompt?this.onShowPromptCallback({column:this,objectId:r,oldValue:o,value:i}):await this.updateItems({objectId:r,updates:[{fieldName:a,value:i}]})}async updateItems(e){try{await this.store.updateItem(e),this.onEditComplete()}catch{this.cancel()}}};e([o()],s.prototype,"_lockIconNode",null),e([o({readOnly:!0})],s.prototype,"editInfo",void 0),e([o()],s.prototype,"cellValueValidatorFunction",void 0),e([o()],s.prototype,"editable",void 0),e([o()],s.prototype,"effectiveEditable",null),e([o()],s.prototype,"effectiveRequired",null),e([o()],s.prototype,"editing",null),e([o()],s.prototype,"headerRenderFunction",void 0),e([o()],s.prototype,"inputRenderFunction",void 0),e([o()],s.prototype,"loadingMessage",null),e([o()],s.prototype,"inputType",void 0),e([o()],s.prototype,"maxLength",void 0),e([o()],s.prototype,"onShowPromptCallback",void 0),e([o()],s.prototype,"parseInputValueFunction",void 0),e([o()],s.prototype,"renderFunction",void 0),e([o()],s.prototype,"required",void 0),e([o()],s.prototype,"shouldShowPrompt",null),e([o()],s.prototype,"tableEditingEnabled",null),s=e([i("esri.widgets.FeatureTable.Grid.EditorColumn")],s);const u=s;export{u as default};
@@ -221,4 +221,10 @@ export type TableMenuItemConfigClickFunction = (event: MouseEvent | KeyboardEven
221
221
  * @returns whether the menu item is hidden.
222
222
  * @since 5.0
223
223
  */
224
- export type TableMenuItemConfigHiddenFunction = () => boolean;
224
+ export type TableMenuItemConfigHiddenFunction = () => boolean;
225
+
226
+ /** @since 5.0 */
227
+ export interface FeatureStoreEdits {}
228
+
229
+ /** @since 5.0 */
230
+ export interface DiscardPendingEditsParameters {}
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import t from"../../../Graphic.js";import r from"../../../core/Accessor.js";import{equals as s,isSome as i}from"../../../core/arrayUtils.js";import a from"../../../core/Collection.js";import n from"../../../core/Error.js";import{clone as o}from"../../../core/lang.js";import u from"../../../core/Logger.js";import{getOrCreateMapValue as p}from"../../../core/MapUtils.js";import l from"../../../core/ReactiveMap.js";import{watch as d,when as h}from"../../../core/reactiveUtils.js";import{property as c,subclass as y}from"../../../core/accessorSupport/decorators.js";import{geometryTypes as g}from"../../../geometry/support/typeUtils.js";import{isSubtypeGroupLayer as _,isSubtypeSublayer as m}from"../../../layers/support/layerUtils.js";import f from"../../../rest/support/AttachmentQuery.js";import b from"../../../rest/support/RelationshipQuery.js";import E from"../../../time/TimeExtent.js";import{isIFeatureTableSupportedLayerWithAttachments as v,isIFeatureTableSupportedLayerWithAttachmentsEditing as I,isIFeatureTableSupportedLayerWithEditing as O,isIFeatureTableSupportedLayerWithRelationships as w,findRelatedLayer as F}from"./tableUtils.js";let A=class extends r{constructor(e){super(e),this._attachmentsOperationQueue=new a,this._defaultOutFields=["*"],this._editOperationQueue=new a,this.featureTitleMap=new l,this._loaded=!1,this._loadError=!1,this._loading=!1,this._objectIdCache=new a,this._pendingEdits=new l,this._queryOperationQueue=new a,this.attachmentsEnabled=!1,this.autoSaveEnabled=!0,this.count=0,this.editingEnabled=!1,this.failures=new a,this.filterGeometry=null,this.initialSize=null,this.layer=null,this.objectIds=null,this.outFields=null,this.pageCache=new l,this.pageSize=50,this.relationshipConfig=null,this.relatedRecordsEnabled=!1,this.returnGeometry=!1,this.returnZ=!1,this.returnM=!1,this.sortOrders=[],this.timeExtent=null,this.timeZone=null,this.view=null,this.where=null}initialize(){this.addHandles([d(()=>[this.filterGeometry,this.layer,this.objectIds,this.outFields,this.pageSize,this.relationshipConfig,this.returnGeometry,this.returnM,this.returnZ,this.timeExtent,this.where],()=>this._reset()),d(()=>this.orderByFields,()=>this._clearCaches(),{equals:s}),h(()=>this.attachmentsEnabled,()=>this._reset()),h(()=>this.relatedRecordsEnabled,()=>this._reset())])}destroy(){this.layer=null,this.itemCache?.destroy(),this.failures?.destroy()}get _capabilities(){const{layer:e}=this;return e?.effectiveCapabilities??e?.capabilities}get _canSavePendingEdits(){return this.supportsEditing&&this.hasPendingEdits&&!this.hasInvalidPendingEdits}get _effectiveReturnZ(){return this.returnZ&&this.supportsZ}get _effectiveReturnM(){return this.returnM&&this.supportsM}get _layerWithAttachments(){const{layer:e}=this;return e&&this._capabilities&&this.attachmentsEnabled&&this.supportsAttachments&&v(e)?e:null}get _layerWithAttachmentsEditing(){const{_layerWithAttachments:e}=this;return e&&I(e)&&this.supportsEditing?e:null}get _layerWithEditing(){const e=this.layer;return O(e)&&this.supportsEditing?e:null}get _layerWithRelationships(){const e=this.layer;return w(e)&&this.supportsQueryRelated?e:null}get _pendingEditsAreInvalid(){return!1}get _relatedLayer(){return this.relationshipConfig?.relatedLayer}get _relatedLayerCapabilities(){const{_relatedLayer:e}=this;return e?.effectiveCapabilities??e?.capabilities}get _relatedLayerSupportsCacheHint(){return!!this._relatedLayerCapabilities?.queryRelated?.supportsCacheHint}get _relatedLayerSupportsQuery(){return!!this._relatedLayerCapabilities?.operations.supportsQuery}get _relatedLayerSupportsQueryRelated(){const{_relatedLayerCapabilities:e}=this;return!!e?.queryRelated?.supportsCount&&!!e?.queryRelated?.supportsPagination}get _sortedFieldNames(){return this.sortOrders.map(({fieldName:e})=>e)}get _subtypeCode(){return this.layer?.subtypeCode??null}get _subtypeField(){const{layer:e}=this;return _(e?.parent)?e.subtypeField:null}get _canUseRelatedLayer(){return!(!this._relatedLayerSupportsQuery||!this._relatedLayerSupportsQueryRelated)}get canAddRelatedFeature(){const{state:e,relationship:t,supportsAdd:r,supportsEditing:s}=this;if("loaded"!==e||!t||!r||!s)return!1;const{count:i}=this,{cardinality:a,role:n}=t,o=i>0;return("one-to-one"!==a||!o)&&("one-to-many"!==a||"origin"!==n||!o)}get effectiveOutFields(){const{layer:e,outFields:t}=this;if(!e||!t?.length)return this._defaultOutFields;const r=[];t.forEach(t=>{const s=e.fieldsIndex.normalizeFieldName(t);s&&r.push(s)});const{objectIdField:s}=e,i=e.fieldsIndex.normalizeFieldName(s)??s;return i&&!r.includes(i)&&r.unshift(i),r}get effectiveTimeExtent(){const{layer:e,timeExtent:t}=this;return t||e&&"timeExtent"in e&&e.timeExtent||null}get effectiveWhere(){const{layer:e,where:t}=this;return null!=t&&""!==t?t:m(e)&&e.parent?.definitionExpression?e.parent.definitionExpression:e?.definitionExpression||"1=1"}get fieldsWithContingentValues(){return new Set}get hasContingentValues(){return this.fieldsWithContingentValues.size>0}get hasInvalidPendingEdits(){return this.hasPendingEdits&&this._pendingEditsAreInvalid}get hasPendingEdits(){return this._pendingEdits.size>0}get isQuerying(){return this._queryOperationQueue.length>0}get isSyncing(){return this.isSyncingFeatureEdits||this.isSyncingAttachmentEdits}get isSyncingAttachmentEdits(){return this._attachmentsOperationQueue.length>0}get isSyncingFeatureEdits(){return this._editOperationQueue.length>0}get itemCache(){return new a({items:[...this.pageCache.values()].flat()})}get layerView(){const{layer:e,view:t}=this;if(!e||!t)return null;const r="sublayer"===e.type||m(e)?e.parent:e;return t.allLayerViews.find(e=>e.layer===r)}get orderByFields(){const{_sortedFieldNames:e,layer:t,sortOrders:r}=this,s=r.filter(({fieldName:t,direction:r},s)=>e.indexOf(t)===s&&null!=r).map(({fieldName:e,direction:t})=>`${e} ${t?.toUpperCase()}`);if(t&&!s.length&&!t.objectIdField&&t.fields?.length){const e=t.fields.find(e=>e.name);if(e){const r=t.fieldsIndex.normalizeFieldName(e.name);r&&s.push(`${r} ASC`)}}return s}get relationship(){const{relationshipConfig:e}=this;return null==e?.relationshipId?null:this.relationships?.find(t=>t.id===e.relationshipId)}get relationshipIds(){return this.relationships?.map(e=>e.id)??[]}get relationshipInfos(){const{_layerWithRelationships:e,relatedRecordsEnabled:t,relationships:r,view:s}=this,i=[];return t&&e?.loaded&&s?.map&&r?.length?(r.forEach(t=>{const r=F(e,s,t);r&&(r.load(),i.push({layer:e,relatedLayer:r,relationshipId:t.id}))}),i):i}get relationships(){return this._layerWithRelationships?.relationships}get state(){const{layer:e,_loaded:t,_loadError:r,_loading:s}=this;return!e||e.destroyed?"disabled":r||e.loadError?"error":"loaded"===e.loadStatus&&t?"loaded":s?"loading":"ready"}get supportsAdd(){return!!this._capabilities?.operations.supportsAdd}get supportsAddAttachments(){return!(!this._layerWithAttachmentsEditing||!this.supportsAdd&&!this.supportsUpdate)}get supportsAttachments(){const{_capabilities:e}=this;return!(!e?.data?.supportsAttachment||!e?.operations.supportsQueryAttachments)}get supportsCacheHint(){return!!this._capabilities?.query?.supportsCacheHint}get supportsCacheHintQueryRelated(){return!!this._capabilities?.queryRelated?.supportsCacheHint}get supportsDelete(){return!!this._capabilities?.operations.supportsDelete}get supportsEditing(){return!!this._capabilities?.operations.supportsEditing}get supportsM(){return!!this.layer?.hasM&&!!this._capabilities?.data?.supportsM}get supportsOrderBy(){return!!this._capabilities?.query?.supportsOrderBy}get supportsPagination(){return!!this._capabilities?.query?.supportsPagination}get supportsQuery(){return!!this._capabilities?.operations.supportsQuery}get supportsQueryRelated(){const{_capabilities:e}=this;return!!e?.queryRelated?.supportsCount&&!!e?.queryRelated?.supportsPagination}get supportsResizeAttachments(){const{_capabilities:e}=this;return!(!this.supportsAttachments||!e?.attachment?.supportsResize)}get supportsUpdate(){return!!this._capabilities?.operations.supportsUpdate}get supportsUpdateAttachments(){return!(!this._layerWithAttachmentsEditing||!this.supportsAdd&&!this.supportsUpdate)}get supportsZ(){return!!this.layer?.hasZ&&!!this._capabilities?.data?.supportsZ}async addAttachment(e,t){const{_layerWithAttachmentsEditing:r}=this;if(!r||!this.supportsAddAttachments)return{};const s=await this._queueAttachmentsOperation(e,()=>r.addAttachment(this._createBaseGraphic(r,e),t));return this._ensureArrayContent(s)}cancelPendingEdits(){for(const[e,{originalFeature:t}]of this._pendingEdits){const r=this.getItemByObjectId(e);r&&(r.feature=t)}this._pendingEdits.clear()}async deleteAttachments(e,t){const{_layerWithAttachmentsEditing:r}=this;if(!r||!this.supportsUpdateAttachments||!t.length)return[];const s=await this._queueAttachmentsOperation(e,()=>r.deleteAttachments(this._createBaseGraphic(r,e),t));return this._ensureArray(s)}async deleteRowsByObjectId(e){const{_layerWithEditing:t}=this;if(!this.supportsDelete||!t)throw new n("store:delete-error","Delete is not supported.");const r=e.map(e=>this.getItemByObjectId(e)?.feature).filter(i),s=this._queueEditOperation(()=>t.applyEdits({deleteFeatures:r}));return e.forEach(e=>this.featureTitleMap.delete(e)),s}itemHasPendingEdits(e,t){const r=this._pendingEdits.get(e);return!!r&&(!t||r.changes.has(t))}async fetchItems(e){const{page:t}=e,{pageSize:r}=this,s=t*r,i=s+r,{layer:a,state:n}=this;return a&&"loaded"===n?this._query({layer:a,start:s,num:i,page:t,pageSize:r}):[]}async getAttachmentsByObjectId(e,t){const r=this.getItemByObjectId(e)?.attachments??[];if(!r.length&&t){return(await this._queryAttachments([e]))[e]??[]}return r}async getFeatureTitle(e,r=!1){const{layer:s}=this,i=this.featureTitleMap.get(e),a=`${e}`;if(!s)return i||a;if(i&&!r)return i;if(!("getFeatureTitle"in s)||!s.getFeatureTitle)return a;const n=this.getItemByObjectId(e);let o=n?.feature;o||(o=new t({attributes:{[s.objectIdField]:e},origin:s.graphicOrigin}));const u=await s.getFeatureTitle(o,{fetchMissingFields:!0,removeHTML:!0});return u?(this.featureTitleMap.set(e,u),u):a}getItemByObjectId(e){for(const t of this.pageCache.values())for(const r of t)if(r.objectId===e)return r}getItemIndexByObjectId(e){const{pageCache:t,pageSize:r}=this,s=t.entries();let i=-1;for(const[a,n]of s)if(n.some((t,s)=>{const n=t.objectId===e;return n&&(i=a*r+s),n}),i>-1)break;return i}async load(){const{layer:e}=this;if(!this._loading&&!this._loaded&&e){this._reset(),this._loading=!0;try{await e.load(),e.parent&&_(e.parent)&&await e.parent.loadAll(),await e.when();const t=this.initialSize;this.initialSize=null,await this.refresh(t),this._loaded=!0,this._loading=!1}catch(t){throw this._reset(),this._loadError=!0,this._logError("store:load-error","An error occurred."),t}}}async query(e){const{state:t}=this;return this.supportsQuery&&"loaded"===t?this._query(e):[]}async refresh(e){this._clearCaches(),await this._syncCount(e),await this._syncObjectIdCache()}reset(){this._reset()}async savePendingEdits(){if(!this.hasPendingEdits)return;if(!this._canSavePendingEdits)return void this._logError("store:update-error","An error occurred. Unable to save pending edits.");const e=[];for(const[t]of this._pendingEdits){const r=this.getItemByObjectId(t);r?.feature&&e.push(r.feature)}await this._savePendingEdits(e)}async updateAttachment(e,t,r){const{_layerWithAttachmentsEditing:s}=this;if(!s||!this.supportsUpdateAttachments)return{};const i=await this._queueAttachmentsOperation(e,()=>s.updateAttachment(this._createBaseGraphic(s,e),t,r));return this._ensureArrayContent(i)}async updateItem(e){if(!this.autoSaveEnabled)return void this._stashPendingEdits(e);const{_sortedFieldNames:t}=this,r=e.updates.map(({fieldName:e})=>e);!(await this._update(e)).updateFeatureResults.find(e=>e.error)&&r.some(e=>t.includes(e))&&this._clearCaches()}async verifyFeaturesByObjectId(e){const{layer:t,state:r}=this;if(!t||"loaded"!==r)return[];const{objectIdField:s}=t,i=await this._queryFeaturesByObjectId(e);return e.map(e=>i.some(t=>{const r=t.getObjectId()??t.attributes[s];return e===r}))}_clearCaches(){this.pageCache.clear(),this._objectIdCache.removeAll()}_createBaseGraphic(e,r){const s=new t({attributes:{[e.objectIdField]:r}});return this._subtypeField&&null!=this._subtypeCode&&(s.attributes[this._subtypeField]=this._subtypeCode),s}_ensureArray(e){return Array.isArray(e)?e:[e]}_ensureArrayContent(e){return Array.isArray(e)?e[0]:e}_getObjectIdsForPage(e,t){const r=this._objectIdCache.toArray();return r.length>=e+t?r.slice(e,e+t):r.slice(e)}_logError(e,t){u.getLogger(this).error(e,t)}_reset(){this._clearCaches(),this._pendingEdits.clear(),this.failures.removeAll(),this._attachmentsOperationQueue.removeAll(),this._editOperationQueue.removeAll(),this._queryOperationQueue.removeAll(),this.featureTitleMap.clear(),this._loading=!1,this._loaded=!1,this._loadError=!1,this._set("count",0)}async _syncCount(e){null==e?await this._queryCount().then(e=>this._set("count",e)):this._set("count",e)}async _syncObjectIdCache(){if(this.supportsPagination)return;const e=await this._queryObjectIds();this._objectIdCache.removeAll(),this._objectIdCache.addMany(e)}async _queryFeaturesByObjectId(e){const{layer:t}=this;if(!t||!this.supportsQuery)throw new n("store:query-error","Layer does not support query operation.");const{effectiveTimeExtent:r,effectiveWhere:s,orderByFields:i,supportsCacheHint:a,supportsOrderBy:o}=this,u=t.createQuery();u.where=s,u.timeExtent=r,u.returnGeometry=!1,u.objectIds=e.length?e:void 0,u.outFields=[t.objectIdField],o&&(u.orderByFields=i),a&&(u.cacheHint=!0);return(await t.queryFeatures(u)).features}_stashPendingEdits({objectId:e,updates:t}){const r=this.getItemByObjectId(e);if(!r)throw new n("store:update-error","Feature with provided 'objectId' not found.");const s=r.feature,i=s.clone(),a=p(this._pendingEdits,e,()=>({originalFeature:i,changes:new Map}));t.forEach(({fieldName:e,value:t})=>{a.changes.set(e,t),s.attributes[e]=t}),this._pendingEdits.set(e,a)}async _update(e){const{objectId:r,updates:s}=e,{_layerWithEditing:i}=this;if(!this.supportsUpdate||!i)throw new n("store:update-error","Update is not supported.");const a=this.getItemByObjectId(r)?.feature;if(!a)throw new n("store:update-error","Feature with provided 'objectId' not found.");const u=o(a.attributes);s.forEach(({fieldName:e,value:t})=>u[e]=t);const p=new t({attributes:u});p.sourceLayer=a.sourceLayer;const l=i.applyEdits({updateFeatures:[p]}).then(e=>{const{updateFeatureResults:t}=e,s=t.find(e=>!!e.error);if(s)throw s.error;return t.length&&(a.attributes=u,this.featureTitleMap.has(r)&&this.getFeatureTitle(r,!0)),e});return this._queueEditOperation(()=>l)}async _savePendingEdits(e){const{_layerWithEditing:t}=this;if(!this.supportsUpdate||!t)throw new n("store:update-error","Update is not supported.");const r=t.applyEdits({updateFeatures:e}).then(e=>{const{updateFeatureResults:t}=e,r=t.filter(e=>!!e.error);if(r.length)throw this.cancelPendingEdits(),r[0].error;return e});return this._queueEditOperation(()=>r)}_prepareFeatureData(e){const{attachments:t,features:r,layer:s,relatedRecords:i}=e,a=s.objectIdField;return r.map(e=>{const r=e.getObjectId()??e.attributes[a],n=[];e.layer||e.sourceLayer||(e.layer=s,e.sourceLayer=s);const o=this._pendingEdits.get(r);if(o){const t=e.clone(),r=o.changes;for(const[s,i]of r)e.attributes[s]=i;o.originalFeature=t}return i.forEach((e,t)=>{n.push({relationshipId:t,count:e[r]??0})}),{objectId:r,feature:e,attachments:t[r]??null,relatedRecords:n}})}async _query(e){const{page:t,refresh:r}=e;!0===r&&await this.refresh();const s=this.pageCache.get(t);if(s)return s;const i=await this._queryPage(e);return this.pageCache.set(t,i),i}_queryAttachments(e){const{_layerWithAttachments:t,effectiveWhere:r}=this;return t?e.some(e=>"number"!=typeof e)?Promise.reject(new n("invalid-object-id","Only numeric object ids are valid to query attachments")):t.queryAttachments(new f({objectIds:e,where:r,returnMetadata:!0})):Promise.resolve({})}async _queryCount(){const{_relatedLayerSupportsCacheHint:e,layer:t,relationshipConfig:r,supportsCacheHint:s}=this;if(!t)return 0;if(r&&this._canUseRelatedLayer){const{objectId:t,relatedLayer:s,relationshipId:i}=r;return(await s.queryRelatedFeaturesCount(new b({cacheHint:e,relationshipId:i,objectIds:[t]})))[t]??0}const{effectiveTimeExtent:i,effectiveWhere:a,filterGeometry:n,objectIds:o}=this,u=t.createQuery();return u.geometry=n,u.returnGeometry=!1,u.where=a,u.timeExtent=i,u.objectIds=o?.length?o:void 0,s&&(u.cacheHint=!0),t.queryFeatureCount(u)}async _queryFeatures(e){const{relationshipConfig:t}=this;if(t&&this._canUseRelatedLayer)return this._queryRelatedFeatures(e,t);const{_effectiveReturnM:r,_effectiveReturnZ:s,effectiveOutFields:i,effectiveTimeExtent:a,effectiveWhere:n,filterGeometry:o,objectIds:u,orderByFields:p,pageSize:l,returnGeometry:d,supportsCacheHint:h,supportsOrderBy:c,supportsPagination:y}=this,{layer:g,start:_}=e,m=u?.length,f=g.createQuery();f.returnGeometry=d,f.outFields=i,f.returnM=r,f.returnZ=s,y?(f.start=_,f.num=l,f.where=n,f.timeExtent=a,f.objectIds=m?u:void 0):f.objectIds=m?u:this._getObjectIdsForPage(_,l??0),c&&(f.orderByFields=p),o&&(f.geometry=o),h&&(f.cacheHint=!0);return(await g.queryFeatures(f)).features}_queryObjectIds(){const{effectiveTimeExtent:e,effectiveWhere:t,filterGeometry:r,layer:s,objectIds:i,orderByFields:a,supportsCacheHint:n,supportsOrderBy:o}=this;if(!s)return Promise.resolve([]);const u=s.createQuery();return u.geometry=r,u.outFields=[s.objectIdField],u.returnGeometry=!1,u.where=t,u.timeExtent=e,u.objectIds=i?.length?i:void 0,o&&(u.orderByFields=a),n&&(u.cacheHint=!0),s.queryObjectIds(u)}async _queryPage(e){const{layer:t}=e;return this._queueQueryOperation(async()=>{const r=await this._queryFeatures(e),s=r.map(e=>e.getObjectId()??e.attributes[t.objectIdField]),i=await this._queryAttachments(s),a=await this._queryRelatedCounts(s);return this._prepareFeatureData({layer:t,features:r,attachments:i,relatedRecords:a})||[]})}async _queryRelatedCounts(e){const{_layerWithRelationships:t,relationshipIds:r,supportsCacheHintQueryRelated:s}=this,i=new Map;return t&&e?.length&&r.length?(await Promise.allSettled(r.map(async r=>{const a=await t.queryRelatedFeaturesCount(new b({cacheHint:s,relationshipId:r,objectIds:e}));i.set(r,a)})),i):i}async _queryRelatedFeatures(e,t){const{_defaultOutFields:r,_effectiveReturnM:s,_effectiveReturnZ:i,orderByFields:a,pageSize:n,returnGeometry:o,supportsCacheHint:u}=this,{layer:p,start:l}=e,{objectId:d,relatedLayer:h,relationshipId:c}=t,y=p.createQuery(),g=new b({cacheHint:u,num:n,objectIds:[d],orderByFields:a,outFields:r,relationshipId:c,returnGeometry:o,returnM:s,returnZ:i,start:l,where:y.where??void 0}),_=await h.queryRelatedFeatures(g);return _[d]?.features||[]}_queueAttachmentsOperation(e,t){return this._attachmentsOperationQueue.push(t),t().then(async r=>{this._attachmentsOperationQueue.remove(t);const s=this._ensureArray(r),i=s.some(e=>e.error),a=this.getItemByObjectId(e);if(a&&(!i||s.length>1)){const t=await this._queryAttachments([e]);a.attachments=t[e]}return r}).catch(async r=>{this._logError("store:attachment-error","An error occurred.");const s={error:r,retry:()=>{this.failures.remove(s),this._queueAttachmentsOperation(e,t)},cancel:()=>this.failures.remove(s)};throw this.failures.add(s),this._attachmentsOperationQueue.remove(t),r})}_queueEditOperation(e){return this._editOperationQueue.push(e),e().then(t=>(this._editOperationQueue.remove(e),this._pendingEdits.clear(),t)).catch(t=>{this._logError("store:edit-error","An error occurred.");const r={error:t,retry:()=>{this.failures.remove(r),this._queueEditOperation(e)},cancel:()=>this.failures.remove(r)};throw this.failures.add(r),this._editOperationQueue.remove(e),this._pendingEdits.clear(),t})}_queueQueryOperation(e){return this._queryOperationQueue.push(e),e().then(t=>this._queryOperationQueue.includes(e)?t:[]).catch(t=>{this._logError("store:query-error","An error occurred.");const r={error:t,retry:()=>{this.failures.remove(r),this._queueQueryOperation(e)},cancel:()=>this.failures.remove(r)};return this.failures.add(r),[]}).then(t=>(this._queryOperationQueue.remove(e),t))}};e([c()],A.prototype,"_attachmentsOperationQueue",void 0),e([c({readOnly:!0})],A.prototype,"_capabilities",null),e([c()],A.prototype,"_defaultOutFields",void 0),e([c()],A.prototype,"_editOperationQueue",void 0),e([c()],A.prototype,"_effectiveReturnZ",null),e([c()],A.prototype,"_effectiveReturnM",null),e([c()],A.prototype,"featureTitleMap",void 0),e([c({readOnly:!0})],A.prototype,"_layerWithAttachments",null),e([c({readOnly:!0})],A.prototype,"_layerWithAttachmentsEditing",null),e([c({readOnly:!0})],A.prototype,"_layerWithEditing",null),e([c({readOnly:!0})],A.prototype,"_layerWithRelationships",null),e([c()],A.prototype,"_loaded",void 0),e([c()],A.prototype,"_loadError",void 0),e([c()],A.prototype,"_loading",void 0),e([c()],A.prototype,"_objectIdCache",void 0),e([c()],A.prototype,"_pendingEdits",void 0),e([c()],A.prototype,"_pendingEditsAreInvalid",null),e([c()],A.prototype,"_queryOperationQueue",void 0),e([c({readOnly:!0})],A.prototype,"_relatedLayer",null),e([c({readOnly:!0})],A.prototype,"_relatedLayerCapabilities",null),e([c({readOnly:!0})],A.prototype,"_relatedLayerSupportsCacheHint",null),e([c()],A.prototype,"_relatedLayerSupportsQuery",null),e([c()],A.prototype,"_relatedLayerSupportsQueryRelated",null),e([c()],A.prototype,"_sortedFieldNames",null),e([c()],A.prototype,"_subtypeCode",null),e([c()],A.prototype,"_subtypeField",null),e([c()],A.prototype,"_canUseRelatedLayer",null),e([c()],A.prototype,"attachmentsEnabled",void 0),e([c()],A.prototype,"autoSaveEnabled",void 0),e([c()],A.prototype,"canAddRelatedFeature",null),e([c({readOnly:!0})],A.prototype,"count",void 0),e([c()],A.prototype,"editingEnabled",void 0),e([c()],A.prototype,"effectiveOutFields",null),e([c()],A.prototype,"effectiveTimeExtent",null),e([c()],A.prototype,"effectiveWhere",null),e([c({readOnly:!0})],A.prototype,"failures",void 0),e([c()],A.prototype,"fieldsWithContingentValues",null),e([c({types:g})],A.prototype,"filterGeometry",void 0),e([c()],A.prototype,"hasContingentValues",null),e([c()],A.prototype,"hasInvalidPendingEdits",null),e([c()],A.prototype,"hasPendingEdits",null),e([c()],A.prototype,"initialSize",void 0),e([c({readOnly:!0})],A.prototype,"isQuerying",null),e([c({readOnly:!0})],A.prototype,"isSyncing",null),e([c({readOnly:!0})],A.prototype,"isSyncingAttachmentEdits",null),e([c({readOnly:!0})],A.prototype,"isSyncingFeatureEdits",null),e([c({readOnly:!0})],A.prototype,"itemCache",null),e([c()],A.prototype,"layer",void 0),e([c()],A.prototype,"layerView",null),e([c()],A.prototype,"objectIds",void 0),e([c()],A.prototype,"orderByFields",null),e([c()],A.prototype,"outFields",void 0),e([c({readOnly:!0})],A.prototype,"pageCache",void 0),e([c()],A.prototype,"pageSize",void 0),e([c()],A.prototype,"relationship",null),e([c()],A.prototype,"relationshipConfig",void 0),e([c()],A.prototype,"relationshipIds",null),e([c()],A.prototype,"relationshipInfos",null),e([c()],A.prototype,"relationships",null),e([c()],A.prototype,"relatedRecordsEnabled",void 0),e([c()],A.prototype,"returnGeometry",void 0),e([c()],A.prototype,"returnZ",void 0),e([c()],A.prototype,"returnM",void 0),e([c()],A.prototype,"sortOrders",void 0),e([c({readOnly:!0})],A.prototype,"state",null),e([c()],A.prototype,"supportsAdd",null),e([c()],A.prototype,"supportsAddAttachments",null),e([c()],A.prototype,"supportsAttachments",null),e([c()],A.prototype,"supportsCacheHint",null),e([c()],A.prototype,"supportsCacheHintQueryRelated",null),e([c()],A.prototype,"supportsDelete",null),e([c()],A.prototype,"supportsEditing",null),e([c()],A.prototype,"supportsM",null),e([c()],A.prototype,"supportsOrderBy",null),e([c()],A.prototype,"supportsPagination",null),e([c()],A.prototype,"supportsQuery",null),e([c()],A.prototype,"supportsQueryRelated",null),e([c()],A.prototype,"supportsResizeAttachments",null),e([c()],A.prototype,"supportsUpdate",null),e([c()],A.prototype,"supportsUpdateAttachments",null),e([c()],A.prototype,"supportsZ",null),e([c({type:E})],A.prototype,"timeExtent",void 0),e([c()],A.prototype,"timeZone",void 0),e([c()],A.prototype,"view",void 0),e([c()],A.prototype,"where",void 0),A=e([y("esri.widgets.FeatureTable.support.FeatureStore")],A);const j=A;export{j as default};
5
+ import{__decorate as e}from"tslib";import t from"../../../Graphic.js";import r from"../../../core/Accessor.js";import{equals as i,isSome as s}from"../../../core/arrayUtils.js";import a from"../../../core/Collection.js";import n from"../../../core/Error.js";import{clone as o}from"../../../core/lang.js";import u from"../../../core/Logger.js";import{getOrCreateMapValue as d}from"../../../core/MapUtils.js";import l from"../../../core/ReactiveMap.js";import{watch as p,when as h}from"../../../core/reactiveUtils.js";import{property as c,subclass as y}from"../../../core/accessorSupport/decorators.js";import{geometryTypes as g}from"../../../geometry/support/typeUtils.js";import{isSubtypeGroupLayer as _,isSubtypeSublayer as f}from"../../../layers/support/layerUtils.js";import m from"../../../rest/support/AttachmentQuery.js";import b from"../../../rest/support/RelationshipQuery.js";import E from"../../../time/TimeExtent.js";import{isIFeatureTableSupportedLayerWithAttachments as v,isIFeatureTableSupportedLayerWithAttachmentsEditing as I,isIFeatureTableSupportedLayerWithEditing as C,isIFeatureTableSupportedLayerWithRelationships as O,findRelatedLayer as w}from"./tableUtils.js";let F=class extends r{constructor(e){super(e),this._attachmentsOperationQueue=new a,this._defaultOutFields=["*"],this._editOperationQueue=new a,this.featureTitleMap=new l,this._loaded=!1,this._loadError=!1,this._loading=!1,this._objectIdCache=new a,this._pendingEditsCache=new l,this._queryOperationQueue=new a,this.attachmentsEnabled=!1,this.autoSaveEnabled=!0,this.count=0,this.editingEnabled=!1,this.failures=new a,this.filterGeometry=null,this.initialSize=null,this.layer=null,this.objectIds=null,this.outFields=null,this.pageCache=new l,this.pageSize=50,this.relationshipConfig=null,this.relatedRecordsEnabled=!1,this.returnGeometry=!1,this.returnZ=!1,this.returnM=!1,this.sortOrders=[],this.timeExtent=null,this.timeZone=null,this.view=null,this.where=null}initialize(){this.addHandles([p(()=>[this.filterGeometry,this.layer,this.objectIds,this.outFields,this.pageSize,this.relationshipConfig,this.returnGeometry,this.returnM,this.returnZ,this.timeExtent,this.where],()=>this._reset()),p(()=>this.orderByFields,()=>this._clearCaches(),{equals:i}),h(()=>this.attachmentsEnabled,()=>this._reset()),h(()=>this.relatedRecordsEnabled,()=>this._reset())])}destroy(){this.layer=null,this.itemCache?.destroy(),this.failures?.destroy()}get _capabilities(){const{layer:e}=this;return e?.effectiveCapabilities??e?.capabilities}get _canSavePendingEdits(){return this.supportsEditing&&this.hasPendingEdits&&!this.hasInvalidPendingEdits}get _effectiveReturnZ(){return this.returnZ&&this.supportsZ}get _effectiveReturnM(){return this.returnM&&this.supportsM}get _layerWithAttachments(){const{layer:e}=this;return e&&this._capabilities&&this.attachmentsEnabled&&this.supportsAttachments&&v(e)?e:null}get _layerWithAttachmentsEditing(){const{_layerWithAttachments:e}=this;return e&&I(e)&&this.supportsEditing?e:null}get _layerWithEditing(){const e=this.layer;return C(e)&&this.supportsEditing?e:null}get _layerWithRelationships(){const e=this.layer;return O(e)&&this.supportsQueryRelated?e:null}get _pendingEditsAreInvalid(){return!1}get _relatedLayer(){return this.relationshipConfig?.relatedLayer}get _relatedLayerCapabilities(){const{_relatedLayer:e}=this;return e?.effectiveCapabilities??e?.capabilities}get _relatedLayerSupportsCacheHint(){return!!this._relatedLayerCapabilities?.queryRelated?.supportsCacheHint}get _relatedLayerSupportsQuery(){return!!this._relatedLayerCapabilities?.operations.supportsQuery}get _relatedLayerSupportsQueryRelated(){const{_relatedLayerCapabilities:e}=this;return!!e?.queryRelated?.supportsCount&&!!e?.queryRelated?.supportsPagination}get _sortedFieldNames(){return this.sortOrders.map(({fieldName:e})=>e)}get _subtypeCode(){return this.layer?.subtypeCode??null}get _subtypeField(){const{layer:e}=this;return _(e?.parent)?e.subtypeField:null}get _canUseRelatedLayer(){return!(!this._relatedLayerSupportsQuery||!this._relatedLayerSupportsQueryRelated)}get canAddRelatedFeature(){const{state:e,relationship:t,supportsAdd:r,supportsEditing:i}=this;if("loaded"!==e||!t||!r||!i)return!1;const{count:s}=this,{cardinality:a,role:n}=t,o=s>0;return("one-to-one"!==a||!o)&&("one-to-many"!==a||"origin"!==n||!o)}get effectiveOutFields(){const{layer:e,outFields:t}=this;if(!e||!t?.length)return this._defaultOutFields;const r=[];t.forEach(t=>{const i=e.fieldsIndex.normalizeFieldName(t);i&&r.push(i)});const{objectIdField:i}=e,s=e.fieldsIndex.normalizeFieldName(i)??i;return s&&!r.includes(s)&&r.unshift(s),r}get effectiveTimeExtent(){const{layer:e,timeExtent:t}=this;return t||e&&"timeExtent"in e&&e.timeExtent||null}get effectiveWhere(){const{layer:e,where:t}=this;return null!=t&&""!==t?t:f(e)&&e.parent?.definitionExpression?e.parent.definitionExpression:e?.definitionExpression||"1=1"}get fieldsWithContingentValues(){return new Set}get hasContingentValues(){return this.fieldsWithContingentValues.size>0}get hasInvalidPendingEdits(){return this.hasPendingEdits&&this._pendingEditsAreInvalid}get hasPendingEdits(){return this.pendingEditsCount>0}get isQuerying(){return this._queryOperationQueue.length>0}get isSyncing(){return this.isSyncingFeatureEdits||this.isSyncingAttachmentEdits}get isSyncingAttachmentEdits(){return this._attachmentsOperationQueue.length>0}get isSyncingFeatureEdits(){return this._editOperationQueue.length>0}get itemCache(){return new a({items:[...this.pageCache.values()].flat()})}get layerView(){const{layer:e,view:t}=this;if(!e||!t)return null;const r="sublayer"===e.type||f(e)?e.parent:e;return t.allLayerViews.find(e=>e.layer===r)}get orderByFields(){const{_sortedFieldNames:e,layer:t,sortOrders:r}=this,i=r.filter(({fieldName:t,direction:r},i)=>e.indexOf(t)===i&&null!=r).map(({fieldName:e,direction:t})=>`${e} ${t?.toUpperCase()}`);if(t&&!i.length&&!t.objectIdField&&t.fields?.length){const e=t.fields.find(e=>e.name);if(e){const r=t.fieldsIndex.normalizeFieldName(e.name);r&&i.push(`${r} ASC`)}}return i}get pendingEditsCount(){let e=0;return this._pendingEditsCache.forEach(t=>e+=t.changes.size),e}get relationship(){const{relationshipConfig:e}=this;return null==e?.relationshipId?null:this.relationships?.find(t=>t.id===e.relationshipId)}get relationshipIds(){return this.relationships?.map(e=>e.id)??[]}get relationshipInfos(){const{_layerWithRelationships:e,relatedRecordsEnabled:t,relationships:r,view:i}=this,s=[];return t&&e?.loaded&&i?.map&&r?.length?(r.forEach(t=>{const r=w(e,i,t);r&&(r.load(),s.push({layer:e,relatedLayer:r,relationshipId:t.id}))}),s):s}get relationships(){return this._layerWithRelationships?.relationships}get state(){const{layer:e,_loaded:t,_loadError:r,_loading:i}=this;return!e||e.destroyed?"disabled":r||e.loadError?"error":"loaded"===e.loadStatus&&t?"loaded":i?"loading":"ready"}get supportsAdd(){return!!this._capabilities?.operations.supportsAdd}get supportsAddAttachments(){return!(!this._layerWithAttachmentsEditing||!this.supportsAdd&&!this.supportsUpdate)}get supportsAttachments(){const{_capabilities:e}=this;return!(!e?.data?.supportsAttachment||!e?.operations.supportsQueryAttachments)}get supportsCacheHint(){return!!this._capabilities?.query?.supportsCacheHint}get supportsCacheHintQueryRelated(){return!!this._capabilities?.queryRelated?.supportsCacheHint}get supportsDelete(){return!!this._capabilities?.operations.supportsDelete}get supportsEditing(){return!!this._capabilities?.operations.supportsEditing}get supportsM(){return!!this.layer?.hasM&&!!this._capabilities?.data?.supportsM}get supportsOrderBy(){return!!this._capabilities?.query?.supportsOrderBy}get supportsPagination(){return!!this._capabilities?.query?.supportsPagination}get supportsQuery(){return!!this._capabilities?.operations.supportsQuery}get supportsQueryRelated(){const{_capabilities:e}=this;return!!e?.queryRelated?.supportsCount&&!!e?.queryRelated?.supportsPagination}get supportsResizeAttachments(){const{_capabilities:e}=this;return!(!this.supportsAttachments||!e?.attachment?.supportsResize)}get supportsUpdate(){return!!this._capabilities?.operations.supportsUpdate}get supportsUpdateAttachments(){return!(!this._layerWithAttachmentsEditing||!this.supportsAdd&&!this.supportsUpdate)}get supportsZ(){return!!this.layer?.hasZ&&!!this._capabilities?.data?.supportsZ}async addAttachment(e,t){const{_layerWithAttachmentsEditing:r}=this;if(!r||!this.supportsAddAttachments)return{};const i=await this._queueAttachmentsOperation(e,()=>r.addAttachment(this._createBaseGraphic(r,e),t));return this._ensureArrayContent(i)}addPendingEdits(e){const t=this._ensureLayerAndUpdateSupport();this.autoSaveEnabled&&this._logWarning("store:pending-edit","Edit will be cached, but 'autoSaveEnabled' is true.",!0),this._stashPendingEdits(t,e)}async deleteAttachments(e,t){const{_layerWithAttachmentsEditing:r}=this;if(!r||!this.supportsUpdateAttachments||!t.length)return[];const i=await this._queueAttachmentsOperation(e,()=>r.deleteAttachments(this._createBaseGraphic(r,e),t));return this._ensureArray(i)}async deleteRowsByObjectId(e){const{_layerWithEditing:t}=this;if(!this.supportsDelete||!t)throw new n("store:delete-error","Delete is not supported.");const r=e.map(e=>this.getItemByObjectId(e)?.feature).filter(s),i=this._queueEditOperation(()=>t.applyEdits({deleteFeatures:r}));return e.forEach(e=>this.featureTitleMap.delete(e)),i}discardPendingEdits(e){if(e?.length)e.forEach(e=>this._discardPendingEdit(e));else{for(const[e,{originalFeature:t}]of this._pendingEditsCache){const r=this.getItemByObjectId(e);r&&(r.feature=t)}this._pendingEditsCache.clear()}}itemHasPendingEdits(e,t){const r=this._pendingEditsCache.get(e);return!!r&&(!t||r.changes.has(t))}async fetchItems(e){const{page:t}=e,{pageSize:r}=this,i=t*r,s=i+r,{layer:a,state:n}=this;return a&&"loaded"===n?this._query({layer:a,start:i,num:s,page:t,pageSize:r}):[]}async getAttachmentsByObjectId(e,t){const r=this.getItemByObjectId(e)?.attachments??[];if(!r.length&&t){return(await this._queryAttachments([e]))[e]??[]}return r}async getFeatureTitle(e,r=!1){const{layer:i}=this,s=this.featureTitleMap.get(e),a=`${e}`;if(!i)return s||a;if(s&&!r)return s;if(!("getFeatureTitle"in i)||!i.getFeatureTitle)return a;const n=this.getItemByObjectId(e);let o=n?.feature;o||(o=new t({attributes:{[i.objectIdField]:e},origin:i.graphicOrigin}));const u=await i.getFeatureTitle(o,{fetchMissingFields:!0,removeHTML:!0});return u?(this.featureTitleMap.set(e,u),u):a}getItemByObjectId(e){for(const t of this.pageCache.values())for(const r of t)if(r.objectId===e)return r}getItemIndexByObjectId(e){const{pageCache:t,pageSize:r}=this,i=t.entries();let s=-1;for(const[a,n]of i)if(n.some((t,i)=>{const n=t.objectId===e;return n&&(s=a*r+i),n}),s>-1)break;return s}async load(){const{layer:e}=this;if(!this._loading&&!this._loaded&&e){this._reset(),this._loading=!0;try{await e.load(),e.parent&&_(e.parent)&&await e.parent.loadAll(),await e.when();const t=this.initialSize;this.initialSize=null,await this.refresh(t),this._loaded=!0,this._loading=!1}catch(t){throw this._reset(),this._loadError=!0,this._logError("store:load-error","An error occurred."),t}}}async query(e){const{state:t}=this;return this.supportsQuery&&"loaded"===t?this._query(e):[]}async refresh(e){this._clearCaches(),await this._syncCount(e),await this._syncObjectIdCache()}reset(){this._reset()}async savePendingEdits(){if(!this.hasPendingEdits)return;if(!this._canSavePendingEdits)return void this._logError("store:update-error","An error occurred. Unable to save pending edits.");const e=[];for(const[t]of this._pendingEditsCache){const r=this.getItemByObjectId(t);r?.feature&&e.push(r.feature)}await this._savePendingEdits(e)}async updateAttachment(e,t,r){const{_layerWithAttachmentsEditing:i}=this;if(!i||!this.supportsUpdateAttachments)return{};const s=await this._queueAttachmentsOperation(e,()=>i.updateAttachment(this._createBaseGraphic(i,e),t,r));return this._ensureArrayContent(s)}async updateItem(e){const t=this._ensureLayerAndUpdateSupport();if(!this.autoSaveEnabled)return void this._stashPendingEdits(t,[e]);const{_sortedFieldNames:r}=this,i=e.updates.map(({fieldName:e})=>e);!(await this._update(t,e)).updateFeatureResults.find(e=>e.error)&&i.some(e=>r.includes(e))&&this._clearCaches()}async verifyFeaturesByObjectId(e){const{layer:t,state:r}=this;if(!t||"loaded"!==r)return[];const{objectIdField:i}=t,s=await this._queryFeaturesByObjectId(e);return e.map(e=>s.some(t=>{const r=t.getObjectId()??t.attributes[i];return e===r}))}_clearCaches(){this.pageCache.clear(),this._objectIdCache.removeAll()}_createBaseGraphic(e,r){const i=new t({attributes:{[e.objectIdField]:r}});return this._subtypeField&&null!=this._subtypeCode&&(i.attributes[this._subtypeField]=this._subtypeCode),i}_ensureArray(e){return Array.isArray(e)?e:[e]}_ensureArrayContent(e){return Array.isArray(e)?e[0]:e}_getObjectIdsForPage(e,t){const r=this._objectIdCache.toArray();return r.length>=e+t?r.slice(e,e+t):r.slice(e)}_logError(e,t){u.getLogger(this).error(e,t)}_logWarning(e,t,r=!1){r?u.getLogger(this).warnOnce(e,t):u.getLogger(this).warn(e,t)}_reset(){this._clearCaches(),this._pendingEditsCache.clear(),this.failures.removeAll(),this._attachmentsOperationQueue.removeAll(),this._editOperationQueue.removeAll(),this._queryOperationQueue.removeAll(),this.featureTitleMap.clear(),this._loading=!1,this._loaded=!1,this._loadError=!1,this._set("count",0)}async _syncCount(e){null==e?await this._queryCount().then(e=>this._set("count",e)):this._set("count",e)}async _syncObjectIdCache(){if(this.supportsPagination)return;const e=await this._queryObjectIds();this._objectIdCache.removeAll(),this._objectIdCache.addMany(e)}async _queryFeaturesByObjectId(e){const{layer:t}=this;if(!t||!this.supportsQuery)throw new n("store:query-error","Layer does not support query operation.");const{effectiveTimeExtent:r,effectiveWhere:i,orderByFields:s,supportsCacheHint:a,supportsOrderBy:o}=this,u=t.createQuery();u.where=i,u.timeExtent=r,u.returnGeometry=!1,u.objectIds=e.length?e:void 0,u.outFields=[t.objectIdField],o&&(u.orderByFields=s),a&&(u.cacheHint=!0);return(await t.queryFeatures(u)).features}_ensureLayerAndUpdateSupport(){const e=this._layerWithEditing;if(!this.supportsUpdate||!e)throw new n("store:update-error","Update is not supported.");return e}_stashPendingEdits(e,t){t.forEach(({objectId:t,updates:r})=>{const i=this.getItemByObjectId(t);if(!i)throw new n("store:update-error","Feature with provided 'objectId' not found.");const s=i.feature,a=s.clone(),o=d(this._pendingEditsCache,t,()=>({originalFeature:a,changes:new l}));r.forEach(({fieldName:t,value:r})=>{const i=e.getField(t);i?(o.changes.set(i.name,r),s.attributes[i.name]=r):this._logWarning("store:pending-edit-unknown-field","The provided field does not belong to this layer.")}),o.changes.size>0&&this._pendingEditsCache.set(t,o)})}_discardPendingEdit({objectId:e,fieldName:t}){const r=this._pendingEditsCache.get(e);if(!r)return void this._logWarning("store:pending-edit-not-found","Could not find a pending edit with the given information");const i=this.getItemByObjectId(e);t?(i&&(i.feature.attributes[t]=r.originalFeature.attributes[t]),r.changes.delete(t),0===r.changes.size&&this._pendingEditsCache.delete(e)):(i&&(i.feature=r.originalFeature),this._pendingEditsCache.delete(e))}async _update(e,r){const{objectId:i,updates:s}=r,a=this.getItemByObjectId(i)?.feature;if(!a)throw new n("store:update-error","Feature with provided 'objectId' not found.");const u=o(a.attributes);s.forEach(({fieldName:e,value:t})=>u[e]=t);const d=new t({attributes:u,sourceLayer:a.sourceLayer}),l=e.applyEdits({updateFeatures:[d]}).then(e=>{const{updateFeatureResults:t}=e,r=t.find(e=>!!e.error);if(r)throw r.error;return t.length&&(a.attributes=u,this.featureTitleMap.has(i)&&this.getFeatureTitle(i,!0)),e});return this._queueEditOperation(()=>l)}async _savePendingEdits(e){const{_layerWithEditing:t}=this;if(!this.supportsUpdate||!t)throw new n("store:update-error","Update is not supported.");const r=t.applyEdits({updateFeatures:e}).then(e=>{const{updateFeatureResults:t}=e,r=t.filter(e=>!!e.error);if(r.length)throw this.discardPendingEdits(),r[0].error;return e});return this._queueEditOperation(()=>r,!0)}_prepareFeatureData(e){const{attachments:t,features:r,layer:i,relatedRecords:s}=e,a=i.objectIdField;return r.map(e=>{const r=e.getObjectId()??e.attributes[a],n=[];e.layer||e.sourceLayer||(e.layer=i,e.sourceLayer=i);const o=this._pendingEditsCache.get(r);if(o){const t=e.clone(),r=o.changes;for(const[i,s]of r)e.attributes[i]=s;o.originalFeature=t}return s.forEach((e,t)=>{n.push({relationshipId:t,count:e[r]??0})}),{objectId:r,feature:e,attachments:t[r]??null,relatedRecords:n}})}async _query(e){const{page:t,refresh:r}=e;!0===r&&await this.refresh();const i=this.pageCache.get(t);if(i)return i;const s=await this._queryPage(e);return this.pageCache.set(t,s),s}_queryAttachments(e){const{_layerWithAttachments:t,effectiveWhere:r}=this;return t?e.some(e=>"number"!=typeof e)?Promise.reject(new n("invalid-object-id","Only numeric object ids are valid to query attachments")):t.queryAttachments(new m({objectIds:e,where:r,returnMetadata:!0})):Promise.resolve({})}async _queryCount(){const{_relatedLayerSupportsCacheHint:e,layer:t,relationshipConfig:r,supportsCacheHint:i}=this;if(!t)return 0;if(r&&this._canUseRelatedLayer){const{objectId:t,relatedLayer:i,relationshipId:s}=r;return(await i.queryRelatedFeaturesCount(new b({cacheHint:e,relationshipId:s,objectIds:[t]})))[t]??0}const{effectiveTimeExtent:s,effectiveWhere:a,filterGeometry:n,objectIds:o}=this,u=t.createQuery();return u.geometry=n,u.returnGeometry=!1,u.where=a,u.timeExtent=s,u.objectIds=o?.length?o:void 0,i&&(u.cacheHint=!0),t.queryFeatureCount(u)}async _queryFeatures(e){const{relationshipConfig:t}=this;if(t&&this._canUseRelatedLayer)return this._queryRelatedFeatures(e,t);const{_effectiveReturnM:r,_effectiveReturnZ:i,effectiveOutFields:s,effectiveTimeExtent:a,effectiveWhere:n,filterGeometry:o,objectIds:u,orderByFields:d,pageSize:l,returnGeometry:p,supportsCacheHint:h,supportsOrderBy:c,supportsPagination:y}=this,{layer:g,start:_}=e,f=u?.length,m=g.createQuery();m.returnGeometry=p,m.outFields=s,m.returnM=r,m.returnZ=i,y?(m.start=_,m.num=l,m.where=n,m.timeExtent=a,m.objectIds=f?u:void 0):m.objectIds=f?u:this._getObjectIdsForPage(_,l??0),c&&(m.orderByFields=d),o&&(m.geometry=o),h&&(m.cacheHint=!0);return(await g.queryFeatures(m)).features}_queryObjectIds(){const{effectiveTimeExtent:e,effectiveWhere:t,filterGeometry:r,layer:i,objectIds:s,orderByFields:a,supportsCacheHint:n,supportsOrderBy:o}=this;if(!i)return Promise.resolve([]);const u=i.createQuery();return u.geometry=r,u.outFields=[i.objectIdField],u.returnGeometry=!1,u.where=t,u.timeExtent=e,u.objectIds=s?.length?s:void 0,o&&(u.orderByFields=a),n&&(u.cacheHint=!0),i.queryObjectIds(u)}async _queryPage(e){const{layer:t}=e;return this._queueQueryOperation(async()=>{const r=await this._queryFeatures(e),i=r.map(e=>e.getObjectId()??e.attributes[t.objectIdField]),s=await this._queryAttachments(i),a=await this._queryRelatedCounts(i);return this._prepareFeatureData({layer:t,features:r,attachments:s,relatedRecords:a})||[]})}async _queryRelatedCounts(e){const{_layerWithRelationships:t,relationshipIds:r,supportsCacheHintQueryRelated:i}=this,s=new Map;return t&&e?.length&&r.length?(await Promise.allSettled(r.map(async r=>{const a=await t.queryRelatedFeaturesCount(new b({cacheHint:i,relationshipId:r,objectIds:e}));s.set(r,a)})),s):s}async _queryRelatedFeatures(e,t){const{_defaultOutFields:r,_effectiveReturnM:i,_effectiveReturnZ:s,orderByFields:a,pageSize:n,returnGeometry:o,supportsCacheHint:u}=this,{layer:d,start:l}=e,{objectId:p,relatedLayer:h,relationshipId:c}=t,y=d.createQuery(),g=new b({cacheHint:u,num:n,objectIds:[p],orderByFields:a,outFields:r,relationshipId:c,returnGeometry:o,returnM:i,returnZ:s,start:l,where:y.where??void 0}),_=await h.queryRelatedFeatures(g);return _[p]?.features||[]}_queueAttachmentsOperation(e,t){return this._attachmentsOperationQueue.push(t),t().then(async r=>{this._attachmentsOperationQueue.remove(t);const i=this._ensureArray(r),s=i.some(e=>e.error),a=this.getItemByObjectId(e);if(a&&(!s||i.length>1)){const t=await this._queryAttachments([e]);a.attachments=t[e]}return r}).catch(async r=>{this._logError("store:attachment-error","An error occurred.");const i={error:r,retry:()=>{this.failures.remove(i),this._queueAttachmentsOperation(e,t)},cancel:()=>this.failures.remove(i)};throw this.failures.add(i),this._attachmentsOperationQueue.remove(t),r})}_queueEditOperation(e,t=!1){return this._editOperationQueue.push(e),e().then(r=>(this._editOperationQueue.remove(e),t&&this._pendingEditsCache.clear(),r)).catch(t=>{this._logError("store:edit-error","An error occurred.");const r={error:t,retry:()=>{this.failures.remove(r),this._queueEditOperation(e)},cancel:()=>this.failures.remove(r)};throw this.failures.add(r),this._editOperationQueue.remove(e),t})}_queueQueryOperation(e){return this._queryOperationQueue.push(e),e().then(t=>this._queryOperationQueue.includes(e)?t:[]).catch(t=>{this._logError("store:query-error","An error occurred.");const r={error:t,retry:()=>{this.failures.remove(r),this._queueQueryOperation(e)},cancel:()=>this.failures.remove(r)};return this.failures.add(r),[]}).then(t=>(this._queryOperationQueue.remove(e),t))}};e([c()],F.prototype,"_attachmentsOperationQueue",void 0),e([c({readOnly:!0})],F.prototype,"_capabilities",null),e([c()],F.prototype,"_defaultOutFields",void 0),e([c()],F.prototype,"_editOperationQueue",void 0),e([c()],F.prototype,"_effectiveReturnZ",null),e([c()],F.prototype,"_effectiveReturnM",null),e([c()],F.prototype,"featureTitleMap",void 0),e([c({readOnly:!0})],F.prototype,"_layerWithAttachments",null),e([c({readOnly:!0})],F.prototype,"_layerWithAttachmentsEditing",null),e([c({readOnly:!0})],F.prototype,"_layerWithEditing",null),e([c({readOnly:!0})],F.prototype,"_layerWithRelationships",null),e([c()],F.prototype,"_loaded",void 0),e([c()],F.prototype,"_loadError",void 0),e([c()],F.prototype,"_loading",void 0),e([c()],F.prototype,"_objectIdCache",void 0),e([c()],F.prototype,"_pendingEditsCache",void 0),e([c()],F.prototype,"_pendingEditsAreInvalid",null),e([c()],F.prototype,"_queryOperationQueue",void 0),e([c({readOnly:!0})],F.prototype,"_relatedLayer",null),e([c({readOnly:!0})],F.prototype,"_relatedLayerCapabilities",null),e([c({readOnly:!0})],F.prototype,"_relatedLayerSupportsCacheHint",null),e([c()],F.prototype,"_relatedLayerSupportsQuery",null),e([c()],F.prototype,"_relatedLayerSupportsQueryRelated",null),e([c()],F.prototype,"_sortedFieldNames",null),e([c()],F.prototype,"_subtypeCode",null),e([c()],F.prototype,"_subtypeField",null),e([c()],F.prototype,"_canUseRelatedLayer",null),e([c()],F.prototype,"attachmentsEnabled",void 0),e([c()],F.prototype,"autoSaveEnabled",void 0),e([c()],F.prototype,"canAddRelatedFeature",null),e([c({readOnly:!0})],F.prototype,"count",void 0),e([c()],F.prototype,"editingEnabled",void 0),e([c()],F.prototype,"effectiveOutFields",null),e([c()],F.prototype,"effectiveTimeExtent",null),e([c()],F.prototype,"effectiveWhere",null),e([c({readOnly:!0})],F.prototype,"failures",void 0),e([c()],F.prototype,"fieldsWithContingentValues",null),e([c({types:g})],F.prototype,"filterGeometry",void 0),e([c()],F.prototype,"hasContingentValues",null),e([c()],F.prototype,"hasInvalidPendingEdits",null),e([c()],F.prototype,"hasPendingEdits",null),e([c()],F.prototype,"initialSize",void 0),e([c({readOnly:!0})],F.prototype,"isQuerying",null),e([c({readOnly:!0})],F.prototype,"isSyncing",null),e([c({readOnly:!0})],F.prototype,"isSyncingAttachmentEdits",null),e([c({readOnly:!0})],F.prototype,"isSyncingFeatureEdits",null),e([c({readOnly:!0})],F.prototype,"itemCache",null),e([c()],F.prototype,"layer",void 0),e([c()],F.prototype,"layerView",null),e([c()],F.prototype,"objectIds",void 0),e([c()],F.prototype,"orderByFields",null),e([c()],F.prototype,"outFields",void 0),e([c({readOnly:!0})],F.prototype,"pageCache",void 0),e([c()],F.prototype,"pageSize",void 0),e([c()],F.prototype,"pendingEditsCount",null),e([c()],F.prototype,"relationship",null),e([c()],F.prototype,"relationshipConfig",void 0),e([c()],F.prototype,"relationshipIds",null),e([c()],F.prototype,"relationshipInfos",null),e([c()],F.prototype,"relationships",null),e([c()],F.prototype,"relatedRecordsEnabled",void 0),e([c()],F.prototype,"returnGeometry",void 0),e([c()],F.prototype,"returnZ",void 0),e([c()],F.prototype,"returnM",void 0),e([c()],F.prototype,"sortOrders",void 0),e([c({readOnly:!0})],F.prototype,"state",null),e([c()],F.prototype,"supportsAdd",null),e([c()],F.prototype,"supportsAddAttachments",null),e([c()],F.prototype,"supportsAttachments",null),e([c()],F.prototype,"supportsCacheHint",null),e([c()],F.prototype,"supportsCacheHintQueryRelated",null),e([c()],F.prototype,"supportsDelete",null),e([c()],F.prototype,"supportsEditing",null),e([c()],F.prototype,"supportsM",null),e([c()],F.prototype,"supportsOrderBy",null),e([c()],F.prototype,"supportsPagination",null),e([c()],F.prototype,"supportsQuery",null),e([c()],F.prototype,"supportsQueryRelated",null),e([c()],F.prototype,"supportsResizeAttachments",null),e([c()],F.prototype,"supportsUpdate",null),e([c()],F.prototype,"supportsUpdateAttachments",null),e([c()],F.prototype,"supportsZ",null),e([c({type:E})],F.prototype,"timeExtent",void 0),e([c()],F.prototype,"timeZone",void 0),e([c()],F.prototype,"view",void 0),e([c()],F.prototype,"where",void 0),F=e([y("esri.widgets.FeatureTable.support.FeatureStore")],F);const A=F;export{A as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{supportsFieldConfiguration as t,isMapImageLayer as e}from"../../../layers/support/layerUtils.js";import{isGroupColumn as n}from"./columnUtils.js";import{loadCalciteComponents as i}from"../../support/componentsUtils.js";const o={action:"EsriFeatureTableActionColumn",attachments:"EsriFeatureTableAttachmentsColumn",relationship:"EsriFeatureTableRelationshipColumn"},r=()=>i({action:()=>import("@esri/calcite-components/dist/components/calcite-action"),button:()=>import("@esri/calcite-components/dist/components/calcite-button"),dropdown:()=>import("@esri/calcite-components/dist/components/calcite-dropdown"),"dropdown-item":()=>import("@esri/calcite-components/dist/components/calcite-dropdown-item"),"dropdown-group":()=>import("@esri/calcite-components/dist/components/calcite-dropdown-group"),icon:()=>import("@esri/calcite-components/dist/components/calcite-icon")}),c=()=>Promise.all([i({input:()=>import("@esri/calcite-components/dist/components/calcite-input"),option:()=>import("@esri/calcite-components/dist/components/calcite-option"),select:()=>import("@esri/calcite-components/dist/components/calcite-select"),"input-date-picker":()=>import("@esri/calcite-components/dist/components/calcite-input-date-picker"),"input-time-picker":()=>import("@esri/calcite-components/dist/components/calcite-input-time-picker")}),r()]),s=()=>Promise.all([i({"action-bar":()=>import("@esri/calcite-components/dist/components/calcite-action-bar")}),c()]);function a(t){return null!=t&&"object"==typeof t&&"createQuery"in t&&"getField"in t&&"queryFeatureCount"in t&&"queryFeatures"in t&&"queryObjectIds"in t&&"capabilities"in t&&"fields"in t&&"fieldsIndex"in t&&"id"in t&&"load"in t&&"objectIdField"in t&&"type"in t&&"when"in t}function l(t){return a(t)&&"queryAttachments"in t}function u(e){return a(e)&&t(e)&&"fieldConfigurations"in e&&"getFieldConfiguration"in e}function p(t){return l(t)&&"addAttachment"in t&&"deleteAttachments"in t&&"updateAttachment"in t}function m(t){return a(t)&&"editingEnabled"in t&&"applyEdits"in t}function d(t){return a(t)&&"relationships"in t&&"queryRelatedFeatures"in t&&"queryRelatedFeaturesCount"in t}function f(t,e,n){if(e?.map)return y(t,[...e.map.allLayers,...e.map.allTables],n)}function y(t,n,{relatedTableId:i}){const o="scene"===t.type&&t.associatedLayer?t.associatedLayer.url:t.url,r=e=>!(!d(e)||e===t)&&("sublayer"===e.type&&e.layer?.url===t.url?e.id===i:o===e.url&&e.layerId===i);if("sublayer"===t.type&&"layer"in t&&e(t.layer)){const e=e=>d(e)&&e!==t&&e.id===i,n=t.layer,o=n.allSublayers?.find(e)||n.subtables?.find(e);if(d(o))return o}let c=null;for(const s of n)if(e(s)){const t=s.allSublayers?.find(r)||s.subtables?.find(r);if(t){c=t;break}}else if(r(s)){c=s;break}if(d(c))return c}function b(t,e){return null!=t&&Number.isInteger(t)&&t>-1&&t<e}function h(t){return null==t||0===t.trim().length}function g(t,e){return(t.relationships??[]).filter(t=>!(t.id===e&&"one-to-one"===t.cardinality)).map(({id:t})=>({relationshipId:t}))}function F(t,e){return t.relationships?.find(({id:t})=>t===e)}function w(t,e){return null==e?null:t?.fields?.find(t=>e.toLowerCase()===t.name?.toLowerCase())}function C(t,e){return e.some(e=>!("group"!==e.type||!C(t,e.columnTemplates))||e.fieldName===t)}function I(t,e){return e?.some(e=>!(!n(e)||!I(t,e.columns))||e.fieldName===t)??!1}function j(t,e){return`${t.id}-${e}`}export{w as findField,f as findRelatedLayer,y as findRelatedLayerInSources,F as findRelationship,g as getRelationshipIdsToShow,j as getTableHighlightKey,I as hasColumnForField,C as hasTemplateForField,h as isEmptyStringOrWhitespace,a as isIFeatureTableSupportedLayer,l as isIFeatureTableSupportedLayerWithAttachments,p as isIFeatureTableSupportedLayerWithAttachmentsEditing,m as isIFeatureTableSupportedLayerWithEditing,u as isIFeatureTableSupportedLayerWithFieldConfigurations,d as isIFeatureTableSupportedLayerWithRelationships,b as isPageIndexValid,r as loadColumnComponents,c as loadEditorColumnComponents,s as loadFieldColumnComponents,o as uniqueColumnNames};
5
+ import{supportsFieldConfiguration as t,isMapImageLayer as e}from"../../../layers/support/layerUtils.js";import{isGroupColumn as i}from"./columnUtils.js";import{loadCalciteComponents as n}from"../../support/componentsUtils.js";const o={action:"EsriFeatureTableActionColumn",attachments:"EsriFeatureTableAttachmentsColumn",relationship:"EsriFeatureTableRelationshipColumn"},c=()=>n({action:()=>import("@esri/calcite-components/dist/components/calcite-action"),button:()=>import("@esri/calcite-components/dist/components/calcite-button"),dropdown:()=>import("@esri/calcite-components/dist/components/calcite-dropdown"),"dropdown-item":()=>import("@esri/calcite-components/dist/components/calcite-dropdown-item"),"dropdown-group":()=>import("@esri/calcite-components/dist/components/calcite-dropdown-group"),icon:()=>import("@esri/calcite-components/dist/components/calcite-icon")}),r=()=>Promise.all([n({input:()=>import("@esri/calcite-components/dist/components/calcite-input"),option:()=>import("@esri/calcite-components/dist/components/calcite-option"),select:()=>import("@esri/calcite-components/dist/components/calcite-select"),"input-date-picker":()=>import("@esri/calcite-components/dist/components/calcite-input-date-picker"),"input-time-picker":()=>import("@esri/calcite-components/dist/components/calcite-input-time-picker")}),c()]),s=()=>Promise.all([n({"action-bar":()=>import("@esri/calcite-components/dist/components/calcite-action-bar"),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")}),r()]);function a(t){return null!=t&&"object"==typeof t&&"createQuery"in t&&"getField"in t&&"queryFeatureCount"in t&&"queryFeatures"in t&&"queryObjectIds"in t&&"capabilities"in t&&"fields"in t&&"fieldsIndex"in t&&"id"in t&&"load"in t&&"objectIdField"in t&&"type"in t&&"when"in t}function l(t){return a(t)&&"queryAttachments"in t}function p(e){return a(e)&&t(e)&&"fieldConfigurations"in e&&"getFieldConfiguration"in e}function m(t){return l(t)&&"addAttachment"in t&&"deleteAttachments"in t&&"updateAttachment"in t}function u(t){return a(t)&&"editingEnabled"in t&&"applyEdits"in t}function d(t){return a(t)&&"relationships"in t&&"queryRelatedFeatures"in t&&"queryRelatedFeaturesCount"in t}function f(t,e,i){if(e?.map)return b(t,[...e.map.allLayers,...e.map.allTables],i)}function b(t,i,{relatedTableId:n}){const o="scene"===t.type&&t.associatedLayer?t.associatedLayer.url:t.url,c=e=>!(!d(e)||e===t)&&("sublayer"===e.type&&e.layer?.url===t.url?e.id===n:o===e.url&&e.layerId===n);if("sublayer"===t.type&&"layer"in t&&e(t.layer)){const e=e=>d(e)&&e!==t&&e.id===n,i=t.layer,o=i.allSublayers?.find(e)||i.subtables?.find(e);if(d(o))return o}let r=null;for(const s of i)if(e(s)){const t=s.allSublayers?.find(c)||s.subtables?.find(c);if(t){r=t;break}}else if(c(s)){r=s;break}if(d(r))return r}function y(t,e){return null!=t&&Number.isInteger(t)&&t>-1&&t<e}function h(t){return null==t||0===t.trim().length}function g(t,e){return(t.relationships??[]).filter(t=>!(t.id===e&&"one-to-one"===t.cardinality)).map(({id:t})=>({relationshipId:t}))}function F(t,e){return t.relationships?.find(({id:t})=>t===e)}function w(t,e){return null==e?null:t?.fields?.find(t=>e.toLowerCase()===t.name?.toLowerCase())}function C(t,e){return e.some(e=>!("group"!==e.type||!C(t,e.columnTemplates))||e.fieldName===t)}function x(t,e){return e?.some(e=>!(!i(e)||!x(t,e.columns))||e.fieldName===t)??!1}function I(t,e){return`${t.id}-${e}`}export{w as findField,f as findRelatedLayer,b as findRelatedLayerInSources,F as findRelationship,g as getRelationshipIdsToShow,I as getTableHighlightKey,x as hasColumnForField,C as hasTemplateForField,h as isEmptyStringOrWhitespace,a as isIFeatureTableSupportedLayer,l as isIFeatureTableSupportedLayerWithAttachments,m as isIFeatureTableSupportedLayerWithAttachmentsEditing,u as isIFeatureTableSupportedLayerWithEditing,p as isIFeatureTableSupportedLayerWithFieldConfigurations,d as isIFeatureTableSupportedLayerWithRelationships,y as isPageIndexValid,c as loadColumnComponents,r as loadEditorColumnComponents,s as loadFieldColumnComponents,o as uniqueColumnNames};