@arcgis/core 5.1.0-next.106 → 5.1.0-next.108

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 (396) hide show
  1. package/analysis/ShadowCastAnalysis.d.ts +2 -1
  2. package/applications/SceneViewer/sceneViewerUtils.js +1 -1
  3. package/arcgisGlobal.d.ts +5 -0
  4. package/assets/esri/core/workers/RemoteClient.js +1 -1
  5. package/assets/esri/core/workers/chunks/{b7a81fd4994eabba1869.js → 0c8e6ccb5a8174718d62.js} +1 -1
  6. package/assets/esri/core/workers/chunks/{be817be7c81fb630122f.js → 17604cbd4d24158e2c16.js} +1 -1
  7. package/assets/esri/core/workers/chunks/{065dd2fdc834146423c7.js → 33ec193e6d7a0cb9d8dd.js} +1 -1
  8. package/assets/esri/core/workers/chunks/4e13d639419ac64f7563.js +1 -0
  9. package/assets/esri/core/workers/chunks/4f9ea7544b2d0e88a05c.js +1 -0
  10. package/assets/esri/core/workers/chunks/{15920af0c4f46773b06e.js → 502c3da8c49bf885f51d.js} +1 -1
  11. package/assets/esri/core/workers/chunks/518046d2b95a7590a092.js +1 -0
  12. package/assets/esri/core/workers/chunks/{aaad0d3e82ed917d3886.js → 547dc6ccb989bd962661.js} +1 -1
  13. package/assets/esri/core/workers/chunks/{bd59cb5abc67e46f1b2c.js → 55334ad3618899cdbf78.js} +2 -2
  14. package/assets/esri/core/workers/chunks/{d859c046a3ea42530bff.js → 56d9d3f108ff6e719dd4.js} +1 -1
  15. package/assets/esri/core/workers/chunks/{770611659b38066a6228.js → 5a85cbc04c64091d7f46.js} +1 -1
  16. package/assets/esri/core/workers/chunks/75a7de23c05435ec7649.js +1 -0
  17. package/assets/esri/core/workers/chunks/7b66691d133dabd87ce6.js +1 -0
  18. package/assets/esri/core/workers/chunks/91c0de3950991d81b7f2.js +1 -0
  19. package/assets/esri/core/workers/chunks/9234a293d61e134f121f.js +1 -0
  20. package/assets/esri/core/workers/chunks/{a8ae00e06f98e04aee8e.js → ac408c62565e2c8b5975.js} +1 -1
  21. package/assets/esri/core/workers/chunks/{f7fe17a22390a24d6df8.js → b69d1d528e271568cbd8.js} +2 -2
  22. package/assets/esri/core/workers/chunks/{0cc74bc3772be51cabc1.js → bbaf8baa3ca6195467e4.js} +1 -1
  23. package/assets/esri/core/workers/chunks/{7ce60331f94ee0a5d674.js → beff5b4e15edee12bd4c.js} +33 -41
  24. package/assets/esri/core/workers/chunks/{b9850fe7dcdaed0c327c.js → cdb48d198145493f76f3.js} +1 -1
  25. package/assets/esri/core/workers/chunks/{63ea4191d441efd2f146.js → d4014213c476bf8099af.js} +1 -1
  26. package/assets/esri/core/workers/chunks/{740588250eaffb7301fd.js → e1340232962cf576d37e.js} +1 -1
  27. package/assets/esri/geometry/support/pe-wasm.wasm +0 -0
  28. package/assets/esri/libs/lyr3d/lyr3DMain.wasm +0 -0
  29. package/assets/esri/libs/lyr3d/lyr3DWorker.wasm +0 -0
  30. package/assets/esri/themes/base/widgets/_Sketch.scss +1 -24
  31. package/assets/esri/themes/dark/main.css +1 -1
  32. package/assets/esri/themes/light/main.css +1 -1
  33. package/assets/esri/themes/light/view.css +1 -1
  34. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_ar.json +1 -1
  35. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_bg.json +1 -1
  36. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_bs.json +1 -1
  37. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_ca.json +1 -1
  38. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_cs.json +1 -1
  39. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_da.json +1 -1
  40. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_de.json +1 -1
  41. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_el.json +1 -1
  42. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_es.json +1 -1
  43. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_et.json +1 -1
  44. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_fi.json +1 -1
  45. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_fr.json +1 -1
  46. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_he.json +1 -1
  47. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_hr.json +1 -1
  48. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_hu.json +1 -1
  49. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_id.json +1 -1
  50. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_it.json +1 -1
  51. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_ja.json +1 -1
  52. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_ko.json +1 -1
  53. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_lt.json +1 -1
  54. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_lv.json +1 -1
  55. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_nl.json +1 -1
  56. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_no.json +1 -1
  57. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_pl.json +1 -1
  58. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_pt-BR.json +1 -1
  59. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_pt-PT.json +1 -1
  60. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_ro.json +1 -1
  61. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_ru.json +1 -1
  62. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_sk.json +1 -1
  63. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_sl.json +1 -1
  64. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_sr.json +1 -1
  65. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_sv.json +1 -1
  66. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_th.json +1 -1
  67. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_tr.json +1 -1
  68. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_uk.json +1 -1
  69. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_vi.json +1 -1
  70. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_zh-CN.json +1 -1
  71. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_zh-HK.json +1 -1
  72. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_zh-TW.json +1 -1
  73. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_ar.json +1 -1
  74. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_bg.json +1 -1
  75. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_bs.json +1 -1
  76. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_ca.json +1 -1
  77. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_cs.json +1 -1
  78. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_da.json +1 -1
  79. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_de.json +1 -1
  80. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_el.json +1 -1
  81. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_es.json +1 -1
  82. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_et.json +1 -1
  83. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_fi.json +1 -1
  84. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_fr.json +1 -1
  85. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_he.json +1 -1
  86. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_hr.json +1 -1
  87. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_hu.json +1 -1
  88. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_id.json +1 -1
  89. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_it.json +1 -1
  90. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_ja.json +1 -1
  91. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_ko.json +1 -1
  92. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_lt.json +1 -1
  93. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_lv.json +1 -1
  94. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_nl.json +1 -1
  95. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_no.json +1 -1
  96. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_pl.json +1 -1
  97. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_pt-BR.json +1 -1
  98. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_pt-PT.json +1 -1
  99. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_ro.json +1 -1
  100. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_ru.json +1 -1
  101. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_sk.json +1 -1
  102. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_sl.json +1 -1
  103. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_sr.json +1 -1
  104. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_sv.json +1 -1
  105. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_th.json +1 -1
  106. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_tr.json +1 -1
  107. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_uk.json +1 -1
  108. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_vi.json +1 -1
  109. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_zh-CN.json +1 -1
  110. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_zh-HK.json +1 -1
  111. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_zh-TW.json +1 -1
  112. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm.json +1 -1
  113. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ar.json +1 -1
  114. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_bg.json +1 -1
  115. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_bs.json +1 -1
  116. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ca.json +1 -1
  117. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_cs.json +1 -1
  118. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_da.json +1 -1
  119. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_de.json +1 -1
  120. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_el.json +1 -1
  121. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_en.json +1 -1
  122. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_es.json +1 -1
  123. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_et.json +1 -1
  124. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_fi.json +1 -1
  125. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_fr.json +1 -1
  126. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_he.json +1 -1
  127. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_hr.json +1 -1
  128. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_hu.json +1 -1
  129. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_id.json +1 -1
  130. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_it.json +1 -1
  131. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ja.json +1 -1
  132. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ko.json +1 -1
  133. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_lt.json +1 -1
  134. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_lv.json +1 -1
  135. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_nl.json +1 -1
  136. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_no.json +1 -1
  137. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_pl.json +1 -1
  138. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_pt-BR.json +1 -1
  139. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_pt-PT.json +1 -1
  140. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ro.json +1 -1
  141. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ru.json +1 -1
  142. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sk.json +1 -1
  143. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sl.json +1 -1
  144. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sr.json +1 -1
  145. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sv.json +1 -1
  146. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_th.json +1 -1
  147. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_tr.json +1 -1
  148. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_uk.json +1 -1
  149. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_vi.json +1 -1
  150. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_zh-CN.json +1 -1
  151. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_zh-HK.json +1 -1
  152. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_zh-TW.json +1 -1
  153. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable.json +1 -1
  154. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ar.json +1 -1
  155. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_bg.json +1 -1
  156. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_bs.json +1 -1
  157. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ca.json +1 -1
  158. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_cs.json +1 -1
  159. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_da.json +1 -1
  160. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_de.json +1 -1
  161. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_el.json +1 -1
  162. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_en.json +1 -1
  163. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_es.json +1 -1
  164. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_et.json +1 -1
  165. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_fi.json +1 -1
  166. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_fr.json +1 -1
  167. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_he.json +1 -1
  168. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_hr.json +1 -1
  169. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_hu.json +1 -1
  170. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_id.json +1 -1
  171. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_it.json +1 -1
  172. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ja.json +1 -1
  173. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ko.json +1 -1
  174. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_lt.json +1 -1
  175. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_lv.json +1 -1
  176. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_nl.json +1 -1
  177. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_no.json +1 -1
  178. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_pl.json +1 -1
  179. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_pt-BR.json +1 -1
  180. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_pt-PT.json +1 -1
  181. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ro.json +1 -1
  182. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ru.json +1 -1
  183. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sk.json +1 -1
  184. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sl.json +1 -1
  185. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sr.json +1 -1
  186. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sv.json +1 -1
  187. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_th.json +1 -1
  188. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_tr.json +1 -1
  189. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_uk.json +1 -1
  190. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_vi.json +1 -1
  191. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_zh-CN.json +1 -1
  192. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_zh-HK.json +1 -1
  193. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_zh-TW.json +1 -1
  194. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ar.json +1 -1
  195. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_bg.json +1 -1
  196. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_bs.json +1 -1
  197. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ca.json +1 -1
  198. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_cs.json +1 -1
  199. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_da.json +1 -1
  200. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_de.json +1 -1
  201. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_el.json +1 -1
  202. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_es.json +1 -1
  203. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_et.json +1 -1
  204. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_fi.json +1 -1
  205. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_fr.json +1 -1
  206. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_he.json +1 -1
  207. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_hr.json +1 -1
  208. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_hu.json +1 -1
  209. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_id.json +1 -1
  210. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_it.json +1 -1
  211. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ja.json +1 -1
  212. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ko.json +1 -1
  213. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_lt.json +1 -1
  214. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_lv.json +1 -1
  215. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_nl.json +1 -1
  216. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_no.json +1 -1
  217. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pl.json +1 -1
  218. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pt-BR.json +1 -1
  219. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pt-PT.json +1 -1
  220. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ro.json +1 -1
  221. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ru.json +1 -1
  222. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sk.json +1 -1
  223. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sl.json +1 -1
  224. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sr.json +1 -1
  225. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sv.json +1 -1
  226. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_th.json +1 -1
  227. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_tr.json +1 -1
  228. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_uk.json +1 -1
  229. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_vi.json +1 -1
  230. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-CN.json +1 -1
  231. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-HK.json +1 -1
  232. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-TW.json +1 -1
  233. package/assets/esri/widgets/Sketch/t9n/Sketch.json +1 -1
  234. package/assets/esri/widgets/Sketch/t9n/Sketch_ar.json +1 -1
  235. package/assets/esri/widgets/Sketch/t9n/Sketch_bg.json +1 -1
  236. package/assets/esri/widgets/Sketch/t9n/Sketch_bs.json +1 -1
  237. package/assets/esri/widgets/Sketch/t9n/Sketch_ca.json +1 -1
  238. package/assets/esri/widgets/Sketch/t9n/Sketch_cs.json +1 -1
  239. package/assets/esri/widgets/Sketch/t9n/Sketch_da.json +1 -1
  240. package/assets/esri/widgets/Sketch/t9n/Sketch_de.json +1 -1
  241. package/assets/esri/widgets/Sketch/t9n/Sketch_el.json +1 -1
  242. package/assets/esri/widgets/Sketch/t9n/Sketch_en.json +1 -1
  243. package/assets/esri/widgets/Sketch/t9n/Sketch_es.json +1 -1
  244. package/assets/esri/widgets/Sketch/t9n/Sketch_et.json +1 -1
  245. package/assets/esri/widgets/Sketch/t9n/Sketch_fi.json +1 -1
  246. package/assets/esri/widgets/Sketch/t9n/Sketch_fr.json +1 -1
  247. package/assets/esri/widgets/Sketch/t9n/Sketch_he.json +1 -1
  248. package/assets/esri/widgets/Sketch/t9n/Sketch_hr.json +1 -1
  249. package/assets/esri/widgets/Sketch/t9n/Sketch_hu.json +1 -1
  250. package/assets/esri/widgets/Sketch/t9n/Sketch_id.json +1 -1
  251. package/assets/esri/widgets/Sketch/t9n/Sketch_it.json +1 -1
  252. package/assets/esri/widgets/Sketch/t9n/Sketch_ja.json +1 -1
  253. package/assets/esri/widgets/Sketch/t9n/Sketch_ko.json +1 -1
  254. package/assets/esri/widgets/Sketch/t9n/Sketch_lt.json +1 -1
  255. package/assets/esri/widgets/Sketch/t9n/Sketch_lv.json +1 -1
  256. package/assets/esri/widgets/Sketch/t9n/Sketch_nl.json +1 -1
  257. package/assets/esri/widgets/Sketch/t9n/Sketch_no.json +1 -1
  258. package/assets/esri/widgets/Sketch/t9n/Sketch_pl.json +1 -1
  259. package/assets/esri/widgets/Sketch/t9n/Sketch_pt-BR.json +1 -1
  260. package/assets/esri/widgets/Sketch/t9n/Sketch_pt-PT.json +1 -1
  261. package/assets/esri/widgets/Sketch/t9n/Sketch_ro.json +1 -1
  262. package/assets/esri/widgets/Sketch/t9n/Sketch_ru.json +1 -1
  263. package/assets/esri/widgets/Sketch/t9n/Sketch_sk.json +1 -1
  264. package/assets/esri/widgets/Sketch/t9n/Sketch_sl.json +1 -1
  265. package/assets/esri/widgets/Sketch/t9n/Sketch_sr.json +1 -1
  266. package/assets/esri/widgets/Sketch/t9n/Sketch_sv.json +1 -1
  267. package/assets/esri/widgets/Sketch/t9n/Sketch_th.json +1 -1
  268. package/assets/esri/widgets/Sketch/t9n/Sketch_tr.json +1 -1
  269. package/assets/esri/widgets/Sketch/t9n/Sketch_uk.json +1 -1
  270. package/assets/esri/widgets/Sketch/t9n/Sketch_vi.json +1 -1
  271. package/assets/esri/widgets/Sketch/t9n/Sketch_zh-CN.json +1 -1
  272. package/assets/esri/widgets/Sketch/t9n/Sketch_zh-HK.json +1 -1
  273. package/assets/esri/widgets/Sketch/t9n/Sketch_zh-TW.json +1 -1
  274. package/chunks/Fog.glsl.js +3 -3
  275. package/chunks/GlobalIllumination.glsl.js +12 -12
  276. package/chunks/GlowComposition.glsl.js +38 -56
  277. package/chunks/OITBlend.glsl.js +7 -7
  278. package/chunks/OITBlendEmission.glsl.js +4 -4
  279. package/chunks/OITDimOpaque.glsl.js +8 -3
  280. package/chunks/SimpleAtmosphere.glsl.js +3 -3
  281. package/chunks/lyr3DWorker.js +1 -1
  282. package/chunks/pe-wasm.js +1 -1
  283. package/config.js +1 -1
  284. package/core/workers/workers.js +1 -1
  285. package/geometry/support/WKIDUnitConversion.js +1 -1
  286. package/identity/IdentityManagerBase.js +1 -1
  287. package/kernel.js +1 -1
  288. package/layers/Lyr3DWasmPerSceneView.js +1 -1
  289. package/layers/raster/datasets/MRFRaster.js +1 -1
  290. package/layers/video/VideoController.js +1 -1
  291. package/package.json +3 -3
  292. package/rest/networks/circuits/support/CircuitVerifyResult.js +1 -1
  293. package/rest/networks/circuits/support/VerifyCircuitsResult.js +1 -1
  294. package/support/revision.js +1 -1
  295. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  296. package/views/2d/layers/MapImageLayerView2D.js +1 -1
  297. package/views/2d/layers/RouteLayerView2D.js +1 -1
  298. package/views/2d/layers/TileLayerView2D.js +1 -1
  299. package/views/2d/layers/features/sources/strategies/support/queryAdapters.js +1 -1
  300. package/views/2d/layers/features/support/FeatureSetReader.js +1 -1
  301. package/views/3d/analysis/LineOfSight/LineOfSightAuthoringUtils.js +1 -1
  302. package/views/3d/analysis/LineOfSight/LineOfSightIntersectionResult.js +1 -1
  303. package/views/3d/analysis/LineOfSight/LineOfSightRayIntersector.js +1 -1
  304. package/views/3d/analysis/LineOfSight/LineOfSightTool.js +1 -1
  305. package/views/3d/analysis/ShadowCast/ShadowCastTooltip.js +1 -1
  306. package/views/3d/analysis/ShadowCastAnalysisView3D.d.ts +3 -1
  307. package/views/3d/analysis/ShadowCastAnalysisView3D.js +1 -1
  308. package/views/3d/analysis/Viewshed/ViewshedConfiguration.js +1 -1
  309. package/views/3d/analysis/Viewshed/ViewshedEditTool.js +1 -1
  310. package/views/3d/analysis/Viewshed/ViewshedObserverManipulatedObject3D.js +2 -0
  311. package/views/3d/analysis/Viewshed/ViewshedPlacementController.js +1 -1
  312. package/views/3d/analysis/Viewshed/ViewshedTool.js +1 -1
  313. package/views/3d/analysis/Viewshed/viewshedSubToolUtils.js +1 -1
  314. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementShiftTool.js +1 -1
  315. package/views/3d/environment/FoggyWeather.js +1 -1
  316. package/views/3d/layers/BuildingComponentSublayerView3D.js +1 -1
  317. package/views/3d/layers/BuildingSceneLayerView3D.js +1 -1
  318. package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
  319. package/views/3d/layers/I3SMeshView3D.js +1 -1
  320. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  321. package/views/3d/layers/MapImageLayerView3D.js +1 -1
  322. package/views/3d/layers/TileLayerView3D.js +1 -1
  323. package/views/3d/layers/i3s/Intersector.js +1 -1
  324. package/views/3d/layers/support/PopupSceneLayerView.js +1 -1
  325. package/views/3d/layers/support/SublayerPopupHighlightHelper3D.js +1 -1
  326. package/views/3d/support/ResourceController.js +1 -1
  327. package/views/3d/support/gaussianSplatting/GaussianSplatIntersectionHandler.js +1 -1
  328. package/views/3d/support/popupHitTest.js +1 -1
  329. package/views/3d/webgl-engine/collections/Component/ComponentDrawParameters.js +1 -1
  330. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  331. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterialRepository.js +1 -1
  332. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
  333. package/views/3d/webgl-engine/collections/Component/SourceGeometry.js +1 -1
  334. package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexNormal.glsl.js +4 -12
  335. package/views/3d/webgl-engine/effects/blit/Blit.js +1 -1
  336. package/views/3d/webgl-engine/effects/fog/Fog.js +1 -1
  337. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.js +1 -1
  338. package/views/3d/webgl-engine/effects/glow/Glow.js +1 -1
  339. package/views/3d/webgl-engine/effects/glow/GlowCompositionTechniqueConfiguration.js +1 -1
  340. package/views/3d/webgl-engine/effects/transparency/OITBlend.glsl.js +1 -1
  341. package/views/3d/webgl-engine/effects/transparency/OITBlendEmission.glsl.js +1 -1
  342. package/views/3d/webgl-engine/effects/transparency/OITDimOpaque.glsl.js +1 -1
  343. package/views/3d/webgl-engine/lib/RenderFeature.js +1 -1
  344. package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
  345. package/views/3d/webgl-engine/parts/RenderView.js +1 -1
  346. package/views/PopupView.js +1 -1
  347. package/views/SceneView.js +1 -1
  348. package/views/View2D.js +1 -1
  349. package/views/draw/DrawTool.d.ts +77 -0
  350. package/views/draw/support/editingSessionUtils.js +1 -1
  351. package/views/draw/support/managers/PluginLifecycleManager.d.ts +10 -0
  352. package/views/interactive/InteractiveToolBase.d.ts +11 -0
  353. package/views/interactive/editGeometry/interfaces.d.ts +8 -0
  354. package/views/interactive/interfaces.d.ts +20 -0
  355. package/views/layers/FeatureLikeLayerView.js +1 -1
  356. package/views/layers/ImageryLayerView.js +1 -1
  357. package/views/layers/ImageryTileLayerView.js +1 -1
  358. package/views/layers/WMSLayerView.js +1 -1
  359. package/views/layers/support/MapServiceLayerViewHelper.js +1 -1
  360. package/views/webgl/capabilities/load.js +1 -1
  361. package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.d.ts +26 -1
  362. package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js +1 -1
  363. package/widgets/BatchAttributeForm/batchAttributeFormUtils.js +1 -1
  364. package/widgets/BatchAttributeForm/inputs/BatchFormInputs.js +1 -1
  365. package/widgets/BatchAttributeForm/inputs/FieldInput.d.ts +5 -44
  366. package/widgets/BatchAttributeForm/inputs/FieldInput.js +1 -1
  367. package/widgets/BatchAttributeForm/inputs/UtilityNetworkAssociationsElementInput.js +1 -1
  368. package/widgets/BatchAttributeForm/inputs/support/inputUtils.js +1 -1
  369. package/widgets/BatchAttributeForm/inputs/support/multipleChoiceInputUtils.js +2 -0
  370. package/widgets/BatchAttributeForm/types.d.ts +7 -0
  371. package/widgets/BatchAttributeForm.js +1 -1
  372. package/widgets/CoordinateConversion/CoordinateConversionViewModel.d.ts +9 -1
  373. package/widgets/CoordinateConversion/CoordinateConversionViewModel.js +1 -1
  374. package/widgets/FeatureForm.js +1 -1
  375. package/widgets/FeatureTable/Grid/Column.js +1 -1
  376. package/widgets/FeatureTable/Grid/types.d.ts +21 -1
  377. package/widgets/FeatureTable.js +1 -1
  378. package/widgets/Sketch/SketchViewModel.d.ts +67 -2
  379. package/widgets/Sketch/SketchViewModel.js +1 -1
  380. package/widgets/Sketch/VisibleElements.d.ts +19 -1
  381. package/widgets/Sketch/VisibleElements.js +1 -1
  382. package/widgets/Sketch/support/OperationHandle.js +1 -1
  383. package/widgets/Sketch/support/PluginManager.d.ts +12 -0
  384. package/widgets/Sketch/support/PluginManager.js +1 -1
  385. package/widgets/Sketch.js +1 -1
  386. package/widgets/support/SelectionToolbar/SelectionToolbarViewModel.d.ts +81 -0
  387. package/widgets/support/SelectionToolbar/types.d.ts +4 -0
  388. package/assets/esri/core/workers/chunks/2a2e97918524e0f436d7.js +0 -1
  389. package/assets/esri/core/workers/chunks/2b3a8a53cd68f666676b.js +0 -1
  390. package/assets/esri/core/workers/chunks/2ecb21c402cdd8c82533.js +0 -1
  391. package/assets/esri/core/workers/chunks/7e02e5c6979090fe3ea7.js +0 -1
  392. package/assets/esri/core/workers/chunks/dcba6c766eee8b90381a.js +0 -1
  393. package/assets/esri/core/workers/chunks/f9324420f2c6ac240f63.js +0 -1
  394. package/assets/esri/core/workers/chunks/fae2c8f053927559fff0.js +0 -1
  395. /package/assets/esri/core/workers/chunks/{bd59cb5abc67e46f1b2c.js.LICENSE.txt → 55334ad3618899cdbf78.js.LICENSE.txt} +0 -0
  396. /package/assets/esri/core/workers/chunks/{f7fe17a22390a24d6df8.js.LICENSE.txt → b69d1d528e271568cbd8.js.LICENSE.txt} +0 -0
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../../../core/Accessor.js";import{watch as i,when as n,initial as o}from"../../../core/reactiveUtils.js";import{renderingSanitizer as s,stripHTMLSanitizer as l}from"../../../core/sanitizerUtils.js";import{property as r,subclass as a}from"../../../core/accessorSupport/decorators.js";import{css as c}from"./ColumnCSS.js";import{isEmptyStringOrWhitespace as d}from"../support/tableUtils.js";import{autoLink as p}from"../../support/uriUtils.js";import{setFocus as u}from"../../support/widgetUtils.js";const h=/<br\s*\/*>/gi;let m=class extends t{constructor(e){super(e),this._menuIsOpen=!1,this.autoWidth=!1,this.cellValueFormatFunction=({root:e,rowData:t,value:i})=>{const{formatFunction:n}=this,o=this.sanitizeContent(i);if(n&&t){const{index:i,item:{attachments:s,feature:l,relatedRecords:r}}=t;return n({attachments:s,column:this,feature:l,index:i,relatedRecords:r,value:o,virtualIndex:this.getVirtualRowIndex(e),field:void 0})}return o},this.description=null,this.direction=null,this.fieldName=null,this.flexGrow=1,this.footerRenderFunction=null,this.formatFunction=null,this.frozen=!1,this.frozenToEnd=!1,this.grid=null,this.headerRenderFunction=e=>{const{root:t}=e,i=this.createHeaderContent();this.removeCellContent(t),t.appendChild(i)},this.hidden=!1,this.icon=null,this.iconText=null,this.initialSortPriority=null,this.label=null,this.labelTooltipText=null,this.menuConfig=null,this.messages=null,this.messagesCommon=null,this.messagesURIUtils=null,this.renderFunction=({root:e,rowData:t})=>{const i=this.getCellValue(t),n=this.cellValueFormatFunction({root:e,rowData:t,value:i});let o=null;if(o=n instanceof HTMLElement?n:p(this.messagesURIUtils,n),this.removeCellContent(e),o instanceof HTMLElement)e.removeAttribute("title"),e.appendChild(o);else if(null!=o){const t=o.toString();e.innerHTML=t,e.title=t}},this.resizable=!0,this.sortable=!1,this.store=null,this.textAlign="start",this.textWrap=!1,this.timeZone=null,this.topLayerDisabled=!1,this.visibleElements=null,this.width=200}initialize(){const{fieldName:e}=this;this._set("sortElement",this.createSortElement()),this.sortElement.setAttribute("path",e),this.addHandles([i(()=>this.direction,e=>{const{sortElement:t}=this;this.effectiveSortable&&t&&(e?this.sortElement.direction!==e&&t.setAttribute("direction",e):t.removeAttribute("direction"))}),n(()=>this.grid?.isReady&&this.sortElement,()=>{const{direction:e,grid:t,hidden:i,sortElement:n}=this;i&&e&&n&&t&&!t.hasSorter(n)&&t.addSorter(n)},o),i(()=>[this.timeZone,this.icon,this.iconText,this.labelTooltipText],()=>this.grid?.requestContentUpdate()),i(()=>this.hidden,()=>this.closeMenu()),i(()=>this.fieldName,e=>{const{sortElement:t}=this;t&&t.path!==e&&t.setAttribute("path",e)}),i(()=>[this.effectiveLabel,this.labelTooltipText],([e,t])=>{const{sortElement:i}=this;i&&(i.setAttribute("title",t||e),i.textContent=e)})])}get _headerRequiresTextContainer(){return!(!this.effectiveSortable&&""===this.effectiveLabel&&null==this.effectiveDescription)}get customMenuItems(){return this.menuConfig?.items?.map(({disabled:e,hidden:t,icon:i,iconClass:n,label:o,selected:s,clickFunction:l})=>this.createCalciteDropdownItem({disabled:e,hidden:t,iconClass:n,iconStart:i,selected:s,textContent:o,onclick:e=>l(e)}))??[]}get defaultMenuItems(){if(!this.effectiveSortable)return[];const e=this.messages,t=[],i=this.visibleElements?.columnMenuItems;if(!1!==i?.sortAscending){const i=this.createCalciteDropdownItem({iconFlipRtl:"start",iconStart:"sort-ascending-arrow",textContent:e?.sortAsc,onclick:()=>this.direction="asc"});t.push(i)}if(!1!==i?.sortDescending){const i=this.createCalciteDropdownItem({iconFlipRtl:"start",iconStart:"sort-descending-arrow",textContent:e?.sortDesc,onclick:()=>this.direction="desc"});t.push(i)}return t}get effectiveDescription(){const{description:e}=this;return d(e)?null:this.sanitizeLabel(e)}get effectiveLabel(){return this.sanitizeLabel(this.label||this.fieldName)}get effectiveSortable(){return this.sortable}get iconNode(){const{icon:e,iconText:t}=this,i=t?this.sanitizeLabel(t):void 0;return e?this.createCalciteIcon({icon:e,textLabel:i}):null}set invalid(e){this._set("invalid",e),this.grid?.generateCellPartNames()}get invalid(){return this._get("invalid")??!1}get menu(){const{customMenuItems:e,defaultMenuItems:t,menuConfig:i}=this,n=!!i?.open,o=this.createCalciteAction({icon:i?.icon??"ellipsis",text:this.messages?.menu??"",scale:"m",slot:"trigger"}),s=document.createElement("calcite-dropdown");if(s.maxItems=i?.maxItems??4,s.placement="top-end",s.scale=i?.scale??"m",n&&(s.open=n,this._menuIsOpen=!0),s.appendChild(o),s.addEventListener("calciteDropdownOpen",()=>this._menuIsOpen=!0),s.addEventListener("calciteDropdownClose",()=>this._menuIsOpen=!1),s.onkeydown=this._stopPropagationOnSelect,s.addEventListener("mousewheel",e=>{e.stopPropagation()}),t.length){const e=s.appendChild(document.createElement("calcite-dropdown-group"));e.selectionMode="none",e.append(...t)}if(e.length){const t=s.appendChild(document.createElement("calcite-dropdown-group"));t.selectionMode=i?.selectionMode??"none",t.append(...e)}return s}get menuItems(){return[...this.defaultMenuItems,...this.customMenuItems]}get menuIsOpen(){return this._menuIsOpen}get menuIsVisible(){return!(!1===this.visibleElements?.columnMenus||!this.menuItems.length)}get tableHasInvalidPendingEdits(){return this.store.hasInvalidPendingEdits}get tableHasPendingEdits(){return this.store.hasPendingEdits}get tableTimeZone(){return this.store.timeZone}closeMenu(){this.menu.open=!1}createSortElement(){const{effectiveLabel:e,direction:t,fieldName:i,initialSortPriority:n}=this,o=document.createElement("vaadin-grid-sorter");return o.classList.add(c.sorter),o.setAttribute("path",i),o.setAttribute("title",this.labelTooltipText||e),o.textContent=e,t&&o.setAttribute("direction",t),null!=n&&(o._initialOrder=n),o.addEventListener("direction-changed",()=>{this.direction!==o.direction&&this._set("direction",o.direction)}),o}createCalciteAction(e){const t=document.createElement("calcite-action"),{alignment:i,className:n,disabled:o,icon:s,label:l,scale:r,slot:a,text:c,textEnabled:d,onclick:p}=e;return t.alignment=i??"center",t.className=n??"",t.disabled=!!o,s&&(t.icon=s),t.label=l??"",t.scale=r??"s",t.slot=a??"",t.text=t.title=c??"",t.textEnabled=!!d,t.onclick=p??null,t}createCalciteButton(e){const t=document.createElement("calcite-button"),{alignment:i,appearance:n,className:o,disabled:s,iconEnd:l,iconFlipRtl:r,kind:a,loading:c,onclick:d,scale:p,textContent:u,title:h,width:m}=e;return t.alignment=i??"center",t.className=o??"",t.scale=p??"s",t.appearance=n??"transparent",t.disabled=!!s,l&&(t.iconEnd=l),r&&(t.iconFlipRtl=r),t.kind=a??"brand",t.loading=!!c,t.textContent=u??"",h&&(t.title=h),t.width=m??"auto",t.onclick=d??null,t}createCalciteDropdownItem(e){const t=document.createElement("calcite-dropdown-item"),{disabled:i,hidden:n,iconClass:o,iconFlipRtl:s,iconStart:l,textContent:r,onclick:a,selected:d}=e,p=r??"";if(o&&!l){const e=document.createElement("span"),i=document.createElement("span");i.classList.add(c.headerMenuIcon,o),e.textContent=e.title=p,e.insertBefore(i,e.firstChild),t.appendChild(e)}else l&&(t.iconStart=l),t.textContent=t.title=p;return t.disabled=!!i,t.hidden="function"==typeof n?n():!!n,t.selected=!!d,s&&(t.iconFlipRtl=s),a&&(t.addEventListener("calciteDropdownItemSelect",a),t.onkeydown=this._stopPropagationOnSelect),t}createCalciteIcon(e){const{effectiveLabel:t}=this,{icon:i,scale:n,textLabel:o}=e,s=document.createElement("calcite-icon"),l=o??t;return s.icon=i,s.scale=n??"s",s.textLabel=l,s.title=l,s}createHeaderContent(){const{effectiveDescription:e,effectiveLabel:t,iconNode:i}=this,n=document.createElement("div");if(n.classList.add(c.headerContent),i&&n.appendChild(i),!this._headerRequiresTextContainer)return n;const o=n.appendChild(document.createElement("div"));return this.effectiveSortable?o.appendChild(this.sortElement):""!==t&&o.appendChild(this._createHeaderTextElement({label:t,cssClass:c.headerLabel,title:this.labelTooltipText})),null!=e&&!1!==this.visibleElements?.columnDescriptions&&o.appendChild(this._createHeaderTextElement({label:e,cssClass:c.headerDescription})),this.menuIsVisible&&n.appendChild(this.menu),n}getCellValue(e){return e?.item.feature.attributes?.[this.fieldName]}getVirtualRowIndex(e){const t=this.grid?.getRowContainingNode(e);return t?.parentElement?[...t.parentElement.children].indexOf(t):-1}itemHasInvalidPendingEdits(e,t){return this.store.itemHasInvalidPendingEdits(e,t)}itemHasPendingEdits(e,t){return this.store.itemHasPendingEdits(e,t)}openMenu(){this.menuIsVisible&&(this.menu.open=!0,u(this.menuItems[0]))}removeCellContent(e){if(e?.firstChild)try{for(;e?.firstChild;)e.removeChild(e.firstChild)}catch(t){}}sanitizeContent(e){return s.sanitize(e)}sanitizeLabel(e){return null==e||""===e?"":l.sanitize(e.toString()).replaceAll(h," ")}sort(){this.effectiveSortable&&this.sortElement?.click()}_stopPropagationOnSelect(e){"Enter"!==e.key&&" "!==e.key||e.stopPropagation()}_createHeaderTextElement({cssClass:e,label:t,title:i}){const n=document.createElement("span");n.classList.add(e);const o=n.appendChild(document.createElement("span"));return o.textContent=t,o.setAttribute("title",i||t),n}};e([r()],m.prototype,"_headerRequiresTextContainer",null),e([r()],m.prototype,"_menuIsOpen",void 0),e([r()],m.prototype,"autoWidth",void 0),e([r()],m.prototype,"cellValueFormatFunction",void 0),e([r()],m.prototype,"customMenuItems",null),e([r()],m.prototype,"defaultMenuItems",null),e([r()],m.prototype,"description",void 0),e([r()],m.prototype,"direction",void 0),e([r()],m.prototype,"effectiveDescription",null),e([r()],m.prototype,"effectiveLabel",null),e([r()],m.prototype,"effectiveSortable",null),e([r({constructOnly:!0})],m.prototype,"fieldName",void 0),e([r()],m.prototype,"flexGrow",void 0),e([r()],m.prototype,"footerRenderFunction",void 0),e([r()],m.prototype,"formatFunction",void 0),e([r()],m.prototype,"frozen",void 0),e([r()],m.prototype,"frozenToEnd",void 0),e([r()],m.prototype,"grid",void 0),e([r()],m.prototype,"headerRenderFunction",void 0),e([r()],m.prototype,"hidden",void 0),e([r()],m.prototype,"icon",void 0),e([r()],m.prototype,"iconNode",null),e([r()],m.prototype,"iconText",void 0),e([r({constructOnly:!0})],m.prototype,"initialSortPriority",void 0),e([r()],m.prototype,"invalid",null),e([r()],m.prototype,"label",void 0),e([r()],m.prototype,"labelTooltipText",void 0),e([r()],m.prototype,"menu",null),e([r()],m.prototype,"menuItems",null),e([r()],m.prototype,"menuConfig",void 0),e([r()],m.prototype,"menuIsOpen",null),e([r()],m.prototype,"menuIsVisible",null),e([r()],m.prototype,"messages",void 0),e([r()],m.prototype,"messagesCommon",void 0),e([r()],m.prototype,"messagesURIUtils",void 0),e([r()],m.prototype,"renderFunction",void 0),e([r()],m.prototype,"resizable",void 0),e([r()],m.prototype,"sortable",void 0),e([r({readOnly:!0})],m.prototype,"sortElement",void 0),e([r()],m.prototype,"store",void 0),e([r()],m.prototype,"tableHasInvalidPendingEdits",null),e([r()],m.prototype,"tableHasPendingEdits",null),e([r()],m.prototype,"tableTimeZone",null),e([r()],m.prototype,"textAlign",void 0),e([r()],m.prototype,"textWrap",void 0),e([r()],m.prototype,"timeZone",void 0),e([r()],m.prototype,"topLayerDisabled",void 0),e([r()],m.prototype,"visibleElements",void 0),e([r()],m.prototype,"width",void 0),m=e([a("esri.widgets.FeatureTable.Grid.Column")],m);const f=m;export{f as default};
2
+ import{__decorate as e}from"tslib";import t from"../../../core/Accessor.js";import{watch as i,when as n,initial as o}from"../../../core/reactiveUtils.js";import{renderingSanitizer as s,stripHTMLSanitizer as l}from"../../../core/sanitizerUtils.js";import{property as r,subclass as a}from"../../../core/accessorSupport/decorators.js";import{css as c}from"./ColumnCSS.js";import{isEmptyStringOrWhitespace as d}from"../support/tableUtils.js";import{autoLink as p}from"../../support/uriUtils.js";import{setFocus as u}from"../../support/widgetUtils.js";const m=/<br\s*\/*>/gi;let h=class extends t{constructor(e){super(e),this._menuIsOpen=!1,this.autoWidth=!1,this.cellValueFormatFunction=({root:e,rowData:t,value:i})=>{const{formatFunction:n}=this,o=this.sanitizeContent(i);if(n&&t){const{index:i,item:{attachments:s,feature:l,relatedRecords:r}}=t;return n({attachments:s,column:this,feature:l,index:i,relatedRecords:r,value:o,virtualIndex:this.getVirtualRowIndex(e),field:void 0})}return o},this.description=null,this.direction=null,this.fieldName=null,this.flexGrow=1,this.footerRenderFunction=null,this.formatFunction=null,this.frozen=!1,this.frozenToEnd=!1,this.grid=null,this.headerRenderFunction=e=>{const{root:t}=e,i=this.createHeaderContent();this.removeCellContent(t),t.appendChild(i)},this.hidden=!1,this.icon=null,this.iconText=null,this.initialSortPriority=null,this.label=null,this.labelTooltipText=null,this.menuConfig=null,this.messages=null,this.messagesCommon=null,this.messagesURIUtils=null,this.renderFunction=({root:e,rowData:t})=>{const i=this.getCellValue(t),n=this.cellValueFormatFunction({root:e,rowData:t,value:i});let o=null;if(o=n instanceof HTMLElement?n:p(this.messagesURIUtils,n),this.removeCellContent(e),o instanceof HTMLElement)e.removeAttribute("title"),e.appendChild(o);else if(null!=o){const t=o.toString();e.innerHTML=t,e.title=t}},this.resizable=!0,this.sortable=!1,this.store=null,this.textAlign="start",this.textWrap=!1,this.timeZone=null,this.topLayerDisabled=!1,this.visibleElements=null,this.width=200}initialize(){const{fieldName:e}=this;this._set("sortElement",this.createSortElement()),this.sortElement.setAttribute("path",e),this.addHandles([i(()=>this.direction,e=>{const{sortElement:t}=this;this.effectiveSortable&&t&&(e?this.sortElement.direction!==e&&t.setAttribute("direction",e):t.removeAttribute("direction"))}),n(()=>this.grid?.isReady&&this.sortElement,()=>{const{direction:e,grid:t,hidden:i,sortElement:n}=this;i&&e&&n&&t&&!t.hasSorter(n)&&t.addSorter(n)},o),i(()=>[this.timeZone,this.icon,this.iconText,this.labelTooltipText],()=>this.grid?.requestContentUpdate()),i(()=>this.hidden,()=>this.closeMenu()),i(()=>this.fieldName,e=>{const{sortElement:t}=this;t&&t.path!==e&&t.setAttribute("path",e)}),i(()=>[this.effectiveLabel,this.labelTooltipText],([e,t])=>{const{sortElement:i}=this;i&&(i.setAttribute("title",t||e),i.textContent=e)})])}get _headerRequiresTextContainer(){return!(!this.effectiveSortable&&""===this.effectiveLabel&&null==this.effectiveDescription)}get customMenuItems(){return this.menuConfig?.items?.map(({disabled:e,hidden:t,icon:i,iconClass:n,label:o,selected:s,clickFunction:l})=>this.createCalciteDropdownItem({disabled:e,hidden:t,iconClass:n,iconStart:i,selected:s,textContent:o,onclick:e=>l(e)}))??[]}get defaultMenuItems(){if(!this.effectiveSortable)return[];const e=this.messages,t=[],i=this.visibleElements?.columnMenuItems;if(!1!==i?.sortAscending){const i=this.createCalciteDropdownItem({iconFlipRtl:"start",iconStart:"sort-ascending-arrow",textContent:e?.sortAsc,onclick:()=>this.direction="asc"});t.push(i)}if(!1!==i?.sortDescending){const i=this.createCalciteDropdownItem({iconFlipRtl:"start",iconStart:"sort-descending-arrow",textContent:e?.sortDesc,onclick:()=>this.direction="desc"});t.push(i)}return t}get effectiveDescription(){const{description:e}=this;return d(e)?null:this.sanitizeLabel(e)}get effectiveLabel(){return this.sanitizeLabel(this.label||this.fieldName)}get effectiveSortable(){return this.sortable}get iconNode(){const{icon:e,iconText:t}=this,i=t?this.sanitizeLabel(t):void 0;return e?this.createCalciteIcon({icon:e,textLabel:i}):null}set invalid(e){this._set("invalid",e),this.grid?.generateCellPartNames()}get invalid(){return this._get("invalid")??!1}get menu(){const{customMenuItems:e,defaultMenuItems:t,menuConfig:i}=this,n=!!i?.open,o=this.createCalciteAction({icon:i?.icon??"ellipsis",text:this.messages?.menu??"",scale:"m",slot:"trigger"}),s=document.createElement("calcite-dropdown");if(s.maxItems=i?.maxItems??4,s.placement="top-end",s.scale=i?.scale??"m",n&&(s.open=n,this._menuIsOpen=!0),s.appendChild(o),s.addEventListener("calciteDropdownOpen",()=>this._menuIsOpen=!0),s.addEventListener("calciteDropdownClose",()=>this._menuIsOpen=!1),s.onkeydown=this._stopPropagationOnSelect,s.addEventListener("mousewheel",e=>{e.stopPropagation()}),t.length){const e=s.appendChild(document.createElement("calcite-dropdown-group"));e.selectionMode="none",e.append(...t)}if(e?.some(e=>!e.hidden)){const t=s.appendChild(document.createElement("calcite-dropdown-group"));t.selectionMode=i?.selectionMode??"none",t.append(...e)}return s}get menuItems(){return[...this.defaultMenuItems,...this.customMenuItems]}get menuIsOpen(){return this._menuIsOpen}get menuIsVisible(){return!(!1===this.visibleElements?.columnMenus||!this.menuItems.length)}get tableHasInvalidPendingEdits(){return this.store.hasInvalidPendingEdits}get tableHasPendingEdits(){return this.store.hasPendingEdits}get tableTimeZone(){return this.store.timeZone}closeMenu(){this.menu.open=!1}createSortElement(){const{effectiveLabel:e,direction:t,fieldName:i,initialSortPriority:n}=this,o=document.createElement("vaadin-grid-sorter");return o.classList.add(c.sorter),o.setAttribute("path",i),o.setAttribute("title",this.labelTooltipText||e),o.textContent=e,t&&o.setAttribute("direction",t),null!=n&&(o._initialOrder=n),o.addEventListener("direction-changed",()=>{this.direction!==o.direction&&this._set("direction",o.direction)}),o}createCalciteAction(e){const t=document.createElement("calcite-action"),{alignment:i,className:n,disabled:o,icon:s,label:l,scale:r,slot:a,text:c,textEnabled:d,onclick:p}=e;return t.alignment=i??"center",t.className=n??"",t.disabled=!!o,s&&(t.icon=s),t.label=l??"",t.scale=r??"s",t.slot=a??"",t.text=t.title=c??"",t.textEnabled=!!d,t.onclick=p??null,t}createCalciteButton(e){const t=document.createElement("calcite-button"),{alignment:i,appearance:n,className:o,disabled:s,iconEnd:l,iconFlipRtl:r,kind:a,loading:c,onclick:d,scale:p,textContent:u,title:m,width:h}=e;return t.alignment=i??"center",t.className=o??"",t.scale=p??"s",t.appearance=n??"transparent",t.disabled=!!s,l&&(t.iconEnd=l),r&&(t.iconFlipRtl=r),t.kind=a??"brand",t.loading=!!c,t.textContent=u??"",m&&(t.title=m),t.width=h??"auto",t.onclick=d??null,t}createCalciteDropdownItem(e){const t=document.createElement("calcite-dropdown-item"),{disabled:i,hidden:n,iconClass:o,iconFlipRtl:s,iconStart:l,textContent:r,onclick:a,selected:d}=e,p=r??"";if(o&&!l){const e=document.createElement("span"),i=document.createElement("span");i.classList.add(c.headerMenuIcon,o),e.textContent=e.title=p,e.insertBefore(i,e.firstChild),t.appendChild(e)}else l&&(t.iconStart=l),t.textContent=t.title=p;return t.disabled="function"==typeof i?i():!!i,t.hidden="function"==typeof n?n():!!n,t.selected=!!d,s&&(t.iconFlipRtl=s),a&&(t.addEventListener("calciteDropdownItemSelect",a),t.onkeydown=this._stopPropagationOnSelect),t}createCalciteIcon(e){const{effectiveLabel:t}=this,{icon:i,scale:n,textLabel:o}=e,s=document.createElement("calcite-icon"),l=o??t;return s.icon=i,s.scale=n??"s",s.textLabel=l,s.title=l,s}createHeaderContent(){const{effectiveDescription:e,effectiveLabel:t,iconNode:i}=this,n=document.createElement("div");if(n.classList.add(c.headerContent),i&&n.appendChild(i),!this._headerRequiresTextContainer)return n;const o=n.appendChild(document.createElement("div"));return this.effectiveSortable?o.appendChild(this.sortElement):""!==t&&o.appendChild(this._createHeaderTextElement({label:t,cssClass:c.headerLabel,title:this.labelTooltipText})),null!=e&&!1!==this.visibleElements?.columnDescriptions&&o.appendChild(this._createHeaderTextElement({label:e,cssClass:c.headerDescription})),this.menuIsVisible&&n.appendChild(this.menu),n}getCellValue(e){return e?.item.feature.attributes?.[this.fieldName]}getVirtualRowIndex(e){const t=this.grid?.getRowContainingNode(e);return t?.parentElement?[...t.parentElement.children].indexOf(t):-1}itemHasInvalidPendingEdits(e,t){return this.store.itemHasInvalidPendingEdits(e,t)}itemHasPendingEdits(e,t){return this.store.itemHasPendingEdits(e,t)}openMenu(){this.menuIsVisible&&(this.menu.open=!0,u(this.menuItems[0]))}removeCellContent(e){if(e?.firstChild)try{for(;e?.firstChild;)e.removeChild(e.firstChild)}catch(t){}}sanitizeContent(e){return s.sanitize(e)}sanitizeLabel(e){return null==e||""===e?"":l.sanitize(e.toString()).replaceAll(m," ")}sort(){this.effectiveSortable&&this.sortElement?.click()}_stopPropagationOnSelect(e){"Enter"!==e.key&&" "!==e.key||e.stopPropagation()}_createHeaderTextElement({cssClass:e,label:t,title:i}){const n=document.createElement("span");n.classList.add(e);const o=n.appendChild(document.createElement("span"));return o.textContent=t,o.setAttribute("title",i||t),n}};e([r()],h.prototype,"_headerRequiresTextContainer",null),e([r()],h.prototype,"_menuIsOpen",void 0),e([r()],h.prototype,"autoWidth",void 0),e([r()],h.prototype,"cellValueFormatFunction",void 0),e([r()],h.prototype,"customMenuItems",null),e([r()],h.prototype,"defaultMenuItems",null),e([r()],h.prototype,"description",void 0),e([r()],h.prototype,"direction",void 0),e([r()],h.prototype,"effectiveDescription",null),e([r()],h.prototype,"effectiveLabel",null),e([r()],h.prototype,"effectiveSortable",null),e([r({constructOnly:!0})],h.prototype,"fieldName",void 0),e([r()],h.prototype,"flexGrow",void 0),e([r()],h.prototype,"footerRenderFunction",void 0),e([r()],h.prototype,"formatFunction",void 0),e([r()],h.prototype,"frozen",void 0),e([r()],h.prototype,"frozenToEnd",void 0),e([r()],h.prototype,"grid",void 0),e([r()],h.prototype,"headerRenderFunction",void 0),e([r()],h.prototype,"hidden",void 0),e([r()],h.prototype,"icon",void 0),e([r()],h.prototype,"iconNode",null),e([r()],h.prototype,"iconText",void 0),e([r({constructOnly:!0})],h.prototype,"initialSortPriority",void 0),e([r()],h.prototype,"invalid",null),e([r()],h.prototype,"label",void 0),e([r()],h.prototype,"labelTooltipText",void 0),e([r()],h.prototype,"menu",null),e([r()],h.prototype,"menuItems",null),e([r()],h.prototype,"menuConfig",void 0),e([r()],h.prototype,"menuIsOpen",null),e([r()],h.prototype,"menuIsVisible",null),e([r()],h.prototype,"messages",void 0),e([r()],h.prototype,"messagesCommon",void 0),e([r()],h.prototype,"messagesURIUtils",void 0),e([r()],h.prototype,"renderFunction",void 0),e([r()],h.prototype,"resizable",void 0),e([r()],h.prototype,"sortable",void 0),e([r({readOnly:!0})],h.prototype,"sortElement",void 0),e([r()],h.prototype,"store",void 0),e([r()],h.prototype,"tableHasInvalidPendingEdits",null),e([r()],h.prototype,"tableHasPendingEdits",null),e([r()],h.prototype,"tableTimeZone",null),e([r()],h.prototype,"textAlign",void 0),e([r()],h.prototype,"textWrap",void 0),e([r()],h.prototype,"timeZone",void 0),e([r()],h.prototype,"topLayerDisabled",void 0),e([r()],h.prototype,"visibleElements",void 0),e([r()],h.prototype,"width",void 0),h=e([a("esri.widgets.FeatureTable.Grid.Column")],h);const f=h;export{f as default};
@@ -116,6 +116,18 @@ export type Direction = "asc" | "desc" | null | undefined;
116
116
 
117
117
  /** @since 5.0 */
118
118
  export interface ColumnTableMenuConfig extends TableMenuConfig {
119
+ /**
120
+ * The number of items to display in the column menu before displaying a scrollbar. The default is 4.
121
+ *
122
+ * @since 5.1
123
+ */
124
+ maxItems?: number;
125
+ /**
126
+ * The scale of the menu items in the menu. The default is "m".
127
+ *
128
+ * @since 5.1
129
+ */
130
+ scale?: "s" | "m" | "l";
119
131
  /**
120
132
  * The selection mode of the menu items.
121
133
  *
@@ -173,7 +185,7 @@ export interface TableMenuItemConfig {
173
185
  *
174
186
  * @since 5.0
175
187
  */
176
- disabled?: boolean;
188
+ disabled?: TableMenuItemConfigDisabledFunction | boolean;
177
189
  /**
178
190
  * The string value indicating the [Calcite icon](https://developers.arcgis.com/calcite-design-system/icons/) displayed for the menu item.
179
191
  *
@@ -215,6 +227,14 @@ export interface TableMenuItemConfig {
215
227
  */
216
228
  export type TableMenuItemConfigClickFunction = (event: MouseEvent | KeyboardEvent) => void;
217
229
 
230
+ /**
231
+ * A function that determines whether the menu item is hidden.
232
+ *
233
+ * @returns whether the menu item is hidden.
234
+ * @since 5.1
235
+ */
236
+ export type TableMenuItemConfigDisabledFunction = () => boolean;
237
+
218
238
  /**
219
239
  * A function that determines whether the menu item is hidden.
220
240
  *
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{substitute as t}from"../intl.js";import{isSome as i}from"../core/arrayUtils.js";import{deprecateWidget as s}from"../core/deprecate.js";import l from"../core/Logger.js";import{watch as n,sync as o,syncAndInitial as a,initial as r,on as c}from"../core/reactiveUtils.js";import{renderingSanitizer as d}from"../core/sanitizerUtils.js";import{formatFileSize as h}from"../core/unitFormatUtils.js";import{property as m,subclass as p}from"../core/accessorSupport/decorators.js";import{geometryTypes as u}from"../geometry/support/typeUtils.js";import{isLayerFromCatalog as g}from"../layers/catalog/catalogUtils.js";import{isKnowledgeGraphLayer as w,isMapImageLayer as b,isSubtypeGroupLayer as v}from"../layers/support/layerUtils.js";import y from"../tables/AttributeTableTemplate.js";import f from"../time/TimeExtent.js";import _ from"./Widget.js";import{isSupportedImage as M,getCalciteIconForAttachment as V,getAttachmentTypeCategory as C}from"./Attachments/support/attachmentUtils.js";import{loadPromptComponents as A,Prompt as E}from"./Editor/components/Prompt.js";import S from"./FeatureTable/ColumnMenuVisibleElements.js";import T from"./FeatureTable/FeatureTableViewModel.js";import I from"./FeatureTable/VisibleElements.js";import{isGroupColumn as D,isFieldColumn as R}from"./FeatureTable/support/columnUtils.js";import P from"./FeatureTable/support/TableTemplate.js";import{loadFieldColumnComponents as k,isIFeatureTableSupportedLayer as x,isIFeatureTableSupportedLayerWithAttachments as L,getRelationshipIdsToShow as O}from"./FeatureTable/support/tableUtils.js";import{loadCalciteComponents as F}from"./support/componentsUtils.js";import{globalCss as j}from"./support/globalCss.js";import{getIconForLayer as z}from"./support/iconUtils.js";import{messageBundle as $,vmEvent as U,tsx as N,tsxFragment as H}from"./support/widget.js";import{storeNode as B,discardNode as Z}from"./support/widgetUtils.js";var G;const Q="esri-feature-table",W=`${Q}__dialog`,K=`${Q}__attachments-view`,q={base:Q,content:`${Q}__content`,menuPopover:`${Q}__menu-popover`,layerDropdownMenu:`${Q}__layer-switcher-menu`,tableContainer:`${Q}__table-container`,tableContainerWithAttachments:`${Q}__table-container--attachments`,tableNavigation:`${Q}__table-navigation`,attachmentsView:K,attachmentsViewContent:`${K}__content`,attachmentsViewDetails:`${K}__details`,attachmentsViewDropArea:`${K}__drop-area`,attachmentsViewDropAreaLabel:`${K}__drop-area__label`,attachmentsViewDropAreaMessage:`${K}__drop-area__message`,attachmentsViewIcon:`${K}__icon`,attachmentsViewInformation:`${K}__information`,attachmentsViewInformationData:`${K}__information__data`,attachmentsViewInformationLabel:`${K}__information__label`,attachmentsViewList:`${K}__list`,attachmentsViewListFileSize:`${K}__list__filesize`,attachmentsViewListThumbnail:`${K}__list__thumbnail`,expanded:`${Q}__expanded`,collapsed:`${Q}__collapsed`,dialog:`${W}`,dialogContent:`${W}__content`,dialogHeader:`${W}__header`,footerMessage:`${Q}__footer__message`,footerIconDanger:`${Q}__footer__icon--danger`,footerIconSuccess:`${Q}__footer__icon--success`},J={checkCircle:"check-circle",chevronRight:"chevron-right",clearSelection:"clear-selection",downloadTo:"download-to",exclamationMarkTriangle:"exclamation-mark-triangle",expand:"expand",exportToCSV:"file-csv",folderOpen:"folder-open",delete:"trash",layers:"layers",moveUp:"move-up",plus:"plus",refresh:"refresh",reset:"reset",save:"save",showAll:"selection-x",showColumn:"show-column",showSelected:"selection-filter",table:"table",upload:"upload",zoomToSelection:"zoom-to-object"};let X=G=class extends _{constructor(e,t){super(e,t),this._attachmentsDialogPreviewLoading=!1,this._attachmentsInput=null,this._columnVisibilityActions=new Map,this._columnVisibilityList=null,this.attachmentsList=null,this.closed=!1,this.collapsed=!1,this.description=null,this.disabled=!1,this.messagesEditor=null,this.navigationScale="m",this.title=null,this.viewModel=new T,this.visibleElements=new I,this.announceDeprecation=()=>{s(l.getLogger(this),"Feature Table","arcgis-feature-table",{version:"5.0"})},this._showDeleteSelectionPrompt=this._showDeleteSelectionPrompt.bind(this),this._showDiscardEditsPrompt=this._showDiscardEditsPrompt.bind(this),this._resetNestedViews=this._resetNestedViews.bind(this)}initialize(){this.addHandles([n(()=>[this.isQueryingOrSyncing,this.editingEnabled],()=>this.scheduleRender()),n(()=>[this._effectiveVisibleElements,this._effectiveVisibleElements.columnDescriptions,this._effectiveVisibleElements.columnMenus,this._effectiveVisibleElements.columnMenuItems,this.columns.length],()=>{this.columns.forEach(e=>e.visibleElements=this._effectiveVisibleElements),this.refreshCellContent()},o),n(()=>[this.topLayerDisabled,this.columns],()=>this.columns.forEach(e=>e.topLayerDisabled=this.topLayerDisabled),a),n(()=>this._effectiveVisibleElements.selectionColumn,e=>{this.grid&&(this.grid.selectionColumnEnabled=e)},r),c(()=>this.viewModel,"show-related-table",e=>this._onShowRelatedTable(e)),n(()=>this.editingEnabled,()=>{const{attachmentsViewOptions:e}=this;this.clearPrompt(),e&&(e.form?.reset(),e.candidates=null)})])}loadDependencies(){return Promise.all([F({action:()=>import("@esri/calcite-components/dist/components/calcite-action"),alert:()=>import("@esri/calcite-components/dist/components/calcite-alert"),button:()=>import("@esri/calcite-components/dist/components/calcite-button"),chip:()=>import("@esri/calcite-components/dist/components/calcite-chip"),dialog:()=>import("@esri/calcite-components/dist/components/calcite-dialog"),dropdown:()=>import("@esri/calcite-components/dist/components/calcite-dropdown"),"dropdown-group":()=>import("@esri/calcite-components/dist/components/calcite-dropdown-group"),"dropdown-item":()=>import("@esri/calcite-components/dist/components/calcite-dropdown-item"),icon:()=>import("@esri/calcite-components/dist/components/calcite-icon"),label:()=>import("@esri/calcite-components/dist/components/calcite-label"),list:()=>import("@esri/calcite-components/dist/components/calcite-list"),"list-item":()=>import("@esri/calcite-components/dist/components/calcite-list-item"),notice:()=>import("@esri/calcite-components/dist/components/calcite-notice"),pagination:()=>import("@esri/calcite-components/dist/components/calcite-pagination"),panel:()=>import("@esri/calcite-components/dist/components/calcite-panel"),popover:()=>import("@esri/calcite-components/dist/components/calcite-popover"),progress:()=>import("@esri/calcite-components/dist/components/calcite-progress"),switch:()=>import("@esri/calcite-components/dist/components/calcite-switch"),tooltip:()=>import("@esri/calcite-components/dist/components/calcite-tooltip")}),A(),k()])}destroy(){this.drainRelatedTables(),this.clearPrompt()}get _attachmentsViewIsVisible(){return!(null==this.attachmentsViewOptions.objectId&&!this.relatedTables.some(e=>null!=e.attachmentsViewOptions.objectId))}get _columnVisibilityActionDisabled(){const e=this.effectiveTable;return e.menuConfig?.disabled??0===e.columns.length}get _dialogIsOpen(){return!!this.attachmentsViewOptions.dialogInfo}get _effectiveDescription(){const{description:e}=this;return null!=e?d.sanitize("function"==typeof e?e():e):void 0}get _effectiveLayers(){const{layer:e,layers:t}=this,i=t?.length?t.filter(x):[],s=i.length?i:[...this._viewLayers];return e&&!s.includes(e)&&s.push(e),s}get _effectiveTitle(){const{layer:e,messages:i,state:s,highlightIds:l,title:n,size:o}=this;if(n)return d.sanitize("function"==typeof n?n():n);if(!i)return"";if(!e)return i.noLayer;switch(s){case"disabled":return i.errorLayer;case"ready":case"loading":return i.loading;case"error":return i.errorData}return t(i.header,{title:d.sanitize(e.title),count:o,selected:l.length})}get _effectiveVisibleElements(){return this.visibleElementsOverride??this.visibleElements}get _filteredTables(){const e=this.relatedTables.toArray(),t=1===e.length;return this.allRelatedTablesVisible?e:t?[e[0]]:this._attachmentsViewIsVisible?e.slice(-1):e.slice(-2)}get _hasAttachmentsViewError(){return null!=this.attachmentsViewOptions.error}get _hasCustomMenuItems(){return!!this.menuConfig?.items?.length}get _hasDefaultMenuItems(){return!!(this._showClearSelectionAction||this._showDeleteSelectionAction||this._showExportSelectionToCSVAction||this._showRefreshDataAction||this._showZoomToSelectionAction||this._showSelectedRecordsShowSelectedAction||this._showSelectedRecordsShowAllAction||this._showColumnVisibilityAction)}get _shouldShowGrid(){return this.allRelatedTablesVisible||1===this.relatedTables.length&&!this._attachmentsViewIsVisible}get _shouldShowMenu(){const{header:e,menu:t}=this._effectiveVisibleElements;return!(!e||!t||!this._hasDefaultMenuItems&&!this._hasCustomMenuItems)}get _showClearSelectionAction(){return!(!this.highlightIds.length||!this._effectiveVisibleElements.menuItems?.clearSelection||this.relatedTables.length||this._attachmentsViewIsVisible)}get _showColumnVisibilityAction(){const{columnVisibilityMenu:e,header:t,menu:i,menuItems:s}=this._effectiveVisibleElements;return!(!(t&&i&&e&&!1!==s?.toggleColumns)||this.showRelatedTableCallback||this.allRelatedTablesVisible||this._attachmentsViewIsVisible)}get _showDeleteSelectionAction(){return!(!(this.editingEnabled&&this.highlightIds.length&&this._effectiveVisibleElements.menuItems?.deleteSelection&&this.layer?.capabilities?.operations?.supportsDelete)||this.relatedTables.length||this._attachmentsViewIsVisible)}get _showExportSelectionToCSVAction(){return!(!(this._effectiveVisibleElements.menuItems.exportSelectionToCSV&&this.layer&&this.highlightIds.length)||this.relatedTables.length)}get _showLayerDropdown(){return!(!this._effectiveLayers.length||!this._effectiveVisibleElements.layerDropdown)}get _shouldShowNavigationBar(){const e=!!this.relatedTable||this._attachmentsViewIsVisible;return!this.tableParent&&e}get _showRefreshDataAction(){return!!this._effectiveVisibleElements.menuItems?.refreshData}get _showSelectedRecordsShowSelectedAction(){const e=this.objectIds.length,t=this.highlightIds.length;return!(!t||!this._effectiveVisibleElements.menuItems?.selectedRecordsShowSelectedToggle||e&&t===e||this.relatedTables.length||this._attachmentsViewIsVisible)}get _showSelectedRecordsShowAllAction(){return!(!this._effectiveVisibleElements.menuItems?.selectedRecordsShowAllToggle||!this.objectIds.length||this.relatedTables.length)}get _showZoomToSelectionAction(){return!(!this.view||!this.highlightIds.length||this.effectiveTable.layer?.isTable||!this._effectiveVisibleElements.menuItems?.zoomToSelection)}get _viewLayers(){const e=this.view?.map;if(!e)return[];const t=new Set,i=e=>{!x(e)||v(e)||t.has(e)||"sublayer"===e.type&&!e.capabilities?.operations?.supportsQuery||(e.load(),t.add(e))},s=e=>{g(e)||"catalog-footprint"===e.type||(w(e)?(e.load(),e.layers?.forEach(i),e.tables?.forEach(i)):b(e)?(e.loadAll(),e.allSublayers?.forEach(i),e.subtables?.forEach(i)):v(e)?(e.loadAll(),e.sublayers?.forEach(i)):i(e))};return e.allLayers.forEach(s),e.allTables.forEach(s),[...t.values()]}get grid(){return this.viewModel.grid}get actionColumn(){return this.viewModel.actionColumn}get actionColumnConfig(){return this.viewModel.actionColumnConfig}set actionColumnConfig(e){this.viewModel.actionColumnConfig=e}get activeFilters(){return this.viewModel.activeFilters}get activeSortOrders(){return this.viewModel.activeSortOrders}get allColumns(){return this.viewModel.allColumns}get allColumnsVisible(){return this.viewModel.allColumnsVisible}get allRelatedTablesVisible(){return this.viewModel.allRelatedTablesVisible}get allVisibleColumns(){return this.viewModel.allVisibleColumns}get attachmentsColumns(){return this.viewModel.attachmentsColumns}get attachmentsEnabled(){return this.viewModel.attachmentsEnabled}set attachmentsEnabled(e){this.viewModel.attachmentsEnabled=e}get attachmentsViewOptions(){return this.viewModel.attachmentsViewOptions}set attachmentsViewOptions(e){this.viewModel.attachmentsViewOptions=e}get attributeTableTemplate(){return this.viewModel.attributeTableTemplate}set attributeTableTemplate(e){this.viewModel.attributeTableTemplate=e}get autoRefreshEnabled(){return this.viewModel.autoRefreshEnabled}set autoRefreshEnabled(e){this.viewModel.autoRefreshEnabled=e}get autoSaveEnabled(){return this.viewModel.autoSaveEnabled}set autoSaveEnabled(e){this.viewModel.autoSaveEnabled=e}get canAddRelatedFeature(){return this.viewModel.canAddRelatedFeature}get clearPrompt(){return this.viewModel.clearPrompt}set clearPrompt(e){this.viewModel.clearPrompt=e}get columnPerformanceModeEnabled(){return this.viewModel.columnPerformanceModeEnabled}set columnPerformanceModeEnabled(e){this.viewModel.columnPerformanceModeEnabled=e}get columnReorderingEnabled(){return this.viewModel.columnReorderingEnabled}set columnReorderingEnabled(e){this.viewModel.columnReorderingEnabled=e}get columns(){return this.viewModel.columns}get defaultSelectionManager(){return this.viewModel.defaultSelectionManager}get definitionExpression(){return this.viewModel.definitionExpression}set definitionExpression(e){this.viewModel.definitionExpression=e}get container(){return super.container}set container(e){super.container=e}get editingEnabled(){return this.viewModel.editingEnabled}set editingEnabled(e){this.viewModel.editingEnabled=e}get effectiveSelectionManager(){return this.viewModel.effectiveSelectionManager}get effectiveSize(){return this.viewModel.effectiveSize}get effectiveTable(){return this.relatedTable||this}get fieldColumns(){return this.viewModel.fieldColumns}get filterGeometry(){return this.viewModel.filterGeometry}set filterGeometry(e){this.viewModel.filterGeometry=e}get filterBySelectionEnabled(){return this.viewModel.filterBySelectionEnabled}set filterBySelectionEnabled(e){this.viewModel.filterBySelectionEnabled=e}get filterByViewExtent(){return this.viewModel.filterByViewExtent}set filterByViewExtent(e){this.viewModel.filterByViewExtent=e}get groupColumns(){return this.viewModel.groupColumns}get hasContingentValues(){return this.viewModel.hasContingentValues}get hasInvalidPendingEdits(){return this.viewModel.hasInvalidPendingEdits}get hasPendingEdits(){return this.viewModel.hasPendingEdits}get hiddenFields(){return this.viewModel.hiddenFields}set hiddenFields(e){this.viewModel.hiddenFields=e}get highlightEnabled(){return this.viewModel.highlightEnabled}set highlightEnabled(e){this.viewModel.highlightEnabled=e}get highlightIds(){return this.viewModel.highlightIds}set highlightIds(e){this.viewModel.highlightIds=e}get icon(){return J.table}set icon(e){this._overrideIfSome("icon",e)}get initialSize(){return this.viewModel.initialSize}set initialSize(e){this.viewModel.initialSize=e}get isQueryingOrSyncing(){return this.viewModel.isQueryingOrSyncing}get isSyncing(){return this.viewModel.isSyncing}get isSyncingAttachments(){return this.viewModel.isSyncingAttachments}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get layer(){return this.viewModel.layer}set layer(e){this.viewModel.layer=e}get layers(){return this.viewModel.layers}set layers(e){this.viewModel.layers=e}get layerView(){return this.viewModel.layerView}get maxSize(){return this.viewModel.maxSize}set maxSize(e){this.viewModel.maxSize=e}get messages(){return this.viewModel.messages}set messages(e){this.viewModel.messages=e}get messagesCommon(){return this.viewModel.messagesCommon}set messagesCommon(e){this.viewModel.messagesCommon=e}get messagesUnits(){return this.viewModel.messagesUnits}set messagesUnits(e){this.viewModel.messagesUnits=e}get messagesURIUtils(){return this.viewModel.messagesURIUtils}set messagesURIUtils(e){this.viewModel.messagesURIUtils=e}get menuConfig(){return this.viewModel.menuConfig}set menuConfig(e){this.viewModel.menuConfig=e}get multipleSelectionEnabled(){return this.viewModel.multipleSelectionEnabled}set multipleSelectionEnabled(e){this.viewModel.multipleSelectionEnabled=e}get multipleSelectionEnabledOverride(){return this.viewModel.multipleSelectionEnabledOverride}set multipleSelectionEnabledOverride(e){this.viewModel.multipleSelectionEnabledOverride=e}get multiSortEnabled(){return this.viewModel.multiSortEnabled}set multiSortEnabled(e){this.viewModel.multiSortEnabled=e}get multipleSortPriority(){return this.viewModel.multipleSortPriority}set multipleSortPriority(e){this.viewModel.multipleSortPriority=e}get noDataMessage(){return this.viewModel.noDataMessage}set noDataMessage(e){this.viewModel.noDataMessage=e}get objectIds(){return this.viewModel.objectIds}set objectIds(e){this.viewModel.objectIds=e}get outFields(){return this.viewModel.outFields}set outFields(e){this.viewModel.outFields=e}get pageCount(){return this.viewModel.pageCount}get pageIndex(){return this.viewModel.pageIndex}set pageIndex(e){this.viewModel.pageIndex=e}get pageSize(){return this.viewModel.pageSize}set pageSize(e){this.viewModel.pageSize=e}get paginationEnabled(){return this.viewModel.paginationEnabled}set paginationEnabled(e){this.viewModel.paginationEnabled=e}get pendingEditsCount(){return this.viewModel.pendingEditsCount}get prompt(){return this.viewModel.prompt}set prompt(e){this.viewModel.prompt=e}get relatedRecordsEnabled(){return this.viewModel.relatedRecordsEnabled}set relatedRecordsEnabled(e){this.viewModel.relatedRecordsEnabled=e}get relatedTable(){return this.viewModel.relatedTable}get relatedTableHasContingentValues(){return this.viewModel.relatedTableHasContingentValues}get relatedTableHasInvalidPendingEdits(){return this.viewModel.relatedTableHasInvalidPendingEdits}get relatedTableHasPendingEdits(){return this.viewModel.relatedTableHasPendingEdits}get relatedTables(){return this.viewModel.relatedTables}get relationship(){return this.viewModel.relationship}get relationshipColumnConfigs(){return this.viewModel.relationshipColumnConfigs}set relationshipColumnConfigs(e){this.viewModel.relationshipColumnConfigs=e}get relationshipColumns(){return this.viewModel.relationshipColumns}get relationshipConfig(){return this.viewModel.relationshipConfig}set relationshipConfig(e){this.viewModel.relationshipConfig=e}get relationshipInfos(){return this.viewModel.relationshipInfos}get returnGeometryEnabled(){return this.viewModel.returnGeometryEnabled}set returnGeometryEnabled(e){this.viewModel.returnGeometryEnabled=e}get returnMEnabled(){return this.viewModel.returnMEnabled}set returnMEnabled(e){this.viewModel.returnMEnabled=e}get returnZEnabled(){return this.viewModel.returnZEnabled}set returnZEnabled(e){this.viewModel.returnZEnabled=e}get rowHighlightIds(){return this.viewModel.rowHighlightIds}set rowHighlightIds(e){this.viewModel.rowHighlightIds=e}get selectionManager(){return this.viewModel.selectionManager}set selectionManager(e){this.viewModel.selectionManager=e}get selectionSource(){return this.viewModel.selectionSource}set selectionSource(e){this.viewModel.selectionSource=e}get showAllRelatedTables(){return this.viewModel.showAllRelatedTables}set showAllRelatedTables(e){this.viewModel.showAllRelatedTables=e}get showPrompt(){return this.viewModel.showPrompt}set showPrompt(e){this.viewModel.showPrompt=e}get showRelatedTableCallback(){return this.viewModel.showRelatedTableCallback}set showRelatedTableCallback(e){this.viewModel.showRelatedTableCallback=e}get size(){return this.viewModel.size}get state(){return this.viewModel.state}get supportsAddAttachments(){return this.viewModel.supportsAddAttachments}get supportsAttachments(){return this.viewModel.supportsAttachments}get supportsDeleteAttachments(){return this.viewModel.supportsDeleteAttachments}get supportsResizeAttachments(){return this.viewModel.supportsResizeAttachments}get supportsUpdateAttachments(){return this.viewModel.supportsUpdateAttachments}get syncTemplateOnChangesEnabled(){return this.viewModel.syncTemplateOnChangesEnabled}set syncTemplateOnChangesEnabled(e){this.viewModel.syncTemplateOnChangesEnabled=e}get syncViewSelection(){return this.viewModel.syncViewSelection}set syncViewSelection(e){this.viewModel.syncViewSelection=e}get syncWithViewSelectionManager(){return this.syncViewSelection}set syncWithViewSelectionManager(e){this.syncViewSelection=e}get tableController(){return this.viewModel.tableController}set tableController(e){this.viewModel.tableController=e}get tableParent(){return this.viewModel.tableParent}set tableParent(e){this.viewModel.tableParent=e}get tableTemplate(){return this.viewModel.tableTemplate}set tableTemplate(e){this.viewModel.tableTemplate=e}get tableTemplateOverride(){return this.viewModel.tableTemplateOverride}set tableTemplateOverride(e){this.viewModel.tableTemplateOverride=e}get timeExtent(){return this.viewModel.timeExtent}set timeExtent(e){this.viewModel.timeExtent=e}get timeZone(){return this.viewModel.timeZone}set timeZone(e){this.viewModel.timeZone=e}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}get visibleColumns(){return this.viewModel.visibleColumns}get visibleElementsOverride(){const{attachmentsViewOptions:e,relatedTable:t,tableController:i,visibleElements:s}=this,{columnDescriptions:l,columnMenus:n,tooltips:o}=s,a=null!=e.objectId;if(t)return new I({columnDescriptions:l,columnMenus:n,tooltips:o,close:s.close,header:s.header,layerDropdown:s.layerDropdown,layerDropdownIcons:s.layerDropdownIcons,menu:s.menu,menuItems:s.menuItems,progress:s.progress,selectionColumn:!1,columnMenuItems:new S({sortAscending:!1,sortDescending:!1})});if(i){const e=i.relatedTable===this,t=i.allRelatedTablesVisible,r=e&&s.selectionColumn&&!t&&!a,c=e&&!t&&!a;return new I({columnDescriptions:l,columnMenus:n,tooltips:o,selectionColumn:r,close:!1,header:!1,layerDropdown:!1,menu:!1,pendingEditsFooter:!1,progress:!1,columnMenuItems:new S({sortAscending:c,sortDescending:c})})}return a?new I({columnDescriptions:l,columnMenus:n,tooltips:o,close:s.close,header:s.header,layerDropdown:s.layerDropdown,layerDropdownIcons:s.layerDropdownIcons,menu:s.menu,menuItems:s.menuItems,progress:s.progress,selectionColumn:!1,columnMenuItems:new S({sortAscending:!1,sortDescending:!1})}):null}addPendingEdits(e){this.viewModel.addPendingEdits(e)}async deleteAttachments(e,t,i){null!=e&&t?.length&&(i?this._showDeleteAttachmentPrompt(e,t):await this.viewModel.deleteAttachments(e,t))}async deleteSelection(e){this.highlightIds.length&&(e?this._showDeleteSelectionPrompt():await this.viewModel.deleteSelection())}async discardPendingEdits(e,t){return t?this._showDiscardEditsPrompt(e):this.viewModel.discardPendingEdits(e)}async downloadAttachmentById(e,t){return this.viewModel.downloadAttachmentById(e,t)}drainRelatedTables(){this.viewModel.drainRelatedTables()}async exportSelectionToCSV(e){return this.viewModel.exportSelectionToCSV(e)}findColumn(e){return this.viewModel.findColumn(e)}getFeatureStoreItemByObjectId(e){return this.viewModel.getFeatureStoreItemByObjectId(e)}goToPage(e){this.viewModel.goToPage(e)}hideAllColumns(){this.viewModel.hideAllColumns()}hideColumn(e){this.grid?.hideColumn(e)}nextPage(){this.viewModel.nextPage()}previousPage(){this.viewModel.previousPage()}async refresh(){await this.viewModel.refresh()}refreshCellContent(){this.viewModel.refreshCellContent()}async saveAttachmentsViewForm(){await this.viewModel.saveAttachmentsViewForm()}async savePendingEdits(){await this.viewModel.savePendingEdits()}showAllColumns(){this.viewModel.showAllColumns()}showColumn(e){this.grid?.showColumn(e)}sortColumn(e,t){this.viewModel.sortColumn(e,t)}scrollLeft(){this.viewModel.scrollLeft()}scrollToBottom(){this.viewModel.scrollToBottom()}scrollToIndex(e){this.viewModel.scrollToIndex(e)}scrollToRow(e){this.viewModel.scrollToRow(e)}scrollToTop(){this.viewModel.scrollToTop()}toggleColumnVisibility(e){this.viewModel.toggleColumnVisibility(e)}async zoomToSelection(){return this.effectiveTable.viewModel.zoomToSelection()}render(){const{_effectiveVisibleElements:e,isQueryingOrSyncing:t,menuConfig:i,state:s}=this;return N("div",{bind:this,class:this.classes(q.base,j.widget)},N("calcite-panel",{bind:this,class:q.content,closable:e.close,closed:this.closed,collapsed:this.collapsed,collapsible:e.collapse,description:this._effectiveDescription,disabled:this.disabled||"disabled"===s&&!this._effectiveLayers?.length,heading:e.header?this._effectiveTitle:void 0,key:"table-content",loading:"loading"===s,menuOpen:!!i?.open,overlayPositioning:"fixed",onCalcitePanelClose:()=>{this.closed=!0,this.emit("close")},onCalcitePanelToggle:e=>{this.collapsed=e.target.collapsed,this.emit("toggle")}},e.progress?N("calcite-progress",{type:t?"indeterminate":"determinate"}):null,this._showLayerDropdown?this._renderLayerDropdown():null,this._renderColumnVisibilityAction(),this._renderHeaderMenuActions(),this._renderNavigationBar(),this._renderTables(),this._renderError(),this._renderFooterContent()),this._renderColumnVisibilityPopover(),this._renderPrompt(),this._renderDialog())}_renderTables(){const{grid:e,relatedTables:t}=this,i=this.classes(q.tableContainer);if(t.length){const s=this.classes(q.base,this.allRelatedTablesVisible?q.expanded:q.collapsed,this._attachmentsViewIsVisible?q.tableContainerWithAttachments:void 0);return N("div",{class:i},N("calcite-panel",{overlayPositioning:"fixed"},N("div",null,[this._shouldShowGrid?N("div",{class:s},e?.render(),this._renderPagination()):void 0,...this._filteredTables.map(e=>{const i=t.indexOf(e);return N("div",{class:s,key:`related-${i}`},e.render())}),,])))}return null!=this.attachmentsViewOptions.objectId?N("div",{class:i},N("calcite-panel",{overlayPositioning:"fixed"},N("div",null,[N("div",{class:this.classes(q.base,q.collapsed)},e?.render(),this._renderPagination()),this._renderAttachmentsView()]))):[N("div",{class:i},e?.render()),this._renderPagination()]}_renderPagination(){if(this.paginationEnabled)return N("calcite-pagination",{pageSize:1,startItem:this.pageIndex+1,totalItems:this.pageCount,onCalcitePaginationChange:e=>{this._attachmentsDialogPreviewLoading=!1,this.goToPage(e.currentTarget.startItem-1)}})}_renderError(){const{messages:e}=this;return N("calcite-alert",{autoClose:!0,autoCloseDuration:"fast",icon:J.exclamationMarkTriangle,kind:"danger",label:e.errorOccured,open:this._hasAttachmentsViewError,slot:"alerts",topLayerDisabled:this.topLayerDisabled,onCalciteAlertClose:()=>{this.attachmentsViewOptions.error=null}},N("span",{slot:"message"},e.errorOccured))}_renderFooterContent(){if(!this.hasPendingEdits||!this._effectiveVisibleElements.pendingEditsFooter)return;const{hasInvalidPendingEdits:e,isQueryingOrSyncing:t,messages:i,messagesCommon:s}=this,l=e||t,n=this.hasContingentValues,o=[N("calcite-button",{appearance:"outline",disabled:t,iconStart:J.reset,key:"footer-reset-button",onclick:()=>{this.discardPendingEdits()},slot:"footer-end",width:"auto"},s.reset),N("calcite-button",{disabled:l,iconStart:J.save,key:"footer-save-button",loading:this.isSyncing,onclick:()=>{this.savePendingEdits()},slot:"footer-end",width:"auto"},s.save)];if(n){const t=e?i.contingentValues.hasInvalidValues:i.contingentValues.hasValidValues,s=e?J.exclamationMarkTriangle:J.checkCircle,l=e?q.footerIconDanger:q.footerIconSuccess;o.push(N("div",{class:q.footerMessage,key:"footer-message",slot:"footer-start"},N("calcite-icon",{class:l,icon:s,scale:"s",slot:"footer-start"}),t))}return o}_renderPrompt(){return this.prompt?N(E,{...this.prompt,headingLevel:2}):void 0}_showDeleteSelectionPrompt(){const{messages:e,messagesCommon:i}=this,s=t(e.deleteSelectionCount,{count:this.highlightIds.length});this.showPrompt({title:s,message:e.deleteRecordsRemoved,context:"danger",actions:{primary:{label:i.delete,action:async()=>{try{await this.viewModel.deleteSelection()}finally{this.clearPrompt()}}},secondary:{label:e.keepRecords,action:()=>this.clearPrompt()}}})}_showDeleteAttachmentPrompt(e,i){const{messages:s,messagesCommon:l}=this,n=t(s.deleteAttachmentCount,{count:i.length});this.showPrompt({title:n,message:s.deleteAttachmentConfirmation,context:"danger",actions:{primary:{label:l.delete,action:async()=>{try{await this.deleteAttachments(e,i,!1)}finally{this.clearPrompt()}}},secondary:{label:l.cancel,action:()=>this.clearPrompt()}}})}async _showDiscardEditsPrompt(e){const t=Promise.withResolvers(),{messagesEditor:i}=this;return this.showPrompt({title:i.cancelEditTitle,message:i.cancelEditWarningMessage,context:"danger",actions:{primary:{label:i.discardEdits,action:async()=>{try{await this.discardPendingEdits(e)}finally{t.resolve(!0)}}},secondary:{label:i.continueEditing,action:()=>t.resolve(!1)}}}),t.promise.finally(()=>this.clearPrompt())}_onTableViewChange(e){this.hasPendingEdits?this._showDiscardEditsPrompt().then(t=>t&&e()):e()}_resetNestedViews(){this.relatedTable&&this.drainRelatedTables(),this.effectiveTable.attachmentsViewOptions.objectId=null}_renderDialog(){const{attachmentsViewOptions:e,messages:t}=this,{objectId:i}=e;return N("calcite-dialog",{class:q.dialog,description:this.viewModel.getFeatureTitleSync(i),heading:t.attachments,modal:!0,open:this._dialogIsOpen,placement:"cover",width:"l",onCalciteDialogClose:()=>this._onDialogClose()},this._renderDialogContent())}_renderDialogContent(){const e=this.attachmentsViewOptions.dialogInfo;if(e)return this._renderAttachmentsDialogContent(e)}_renderAttachmentsDialogContent(e){const{attachmentsViewOptions:t,messages:i}=this,{attachmentInfos:s}=t,l=s.indexOf(e);return N(H,null,N("div",{class:q.dialogHeader,key:"header",slot:"content-top"},N("span",null,e.name),N("calcite-button",{appearance:"outline",onclick:()=>{t.attachmentId=e.id,t.dialogId=null}},i.viewDetails)),N("calcite-progress",{type:this._attachmentsDialogPreviewLoading?"indeterminate":"determinate"}),N("div",{class:q.dialogContent,key:"content"},this._renderAttachmentsViewDetailsImage(e)),N("calcite-pagination",{pageSize:1,slot:"footer",startItem:l+1,totalItems:s.length,onCalcitePaginationChange:e=>{const i=e.currentTarget.startItem-1,l=s[i]?.id;t.dialogId=l}}))}_onDialogClose(){const e=this.attachmentsViewOptions;null!=e.dialogId&&(e.dialogId=null),this._attachmentsDialogPreviewLoading=!1}_renderHeaderMenuAction(e){const{disabled:t,hidden:i,icon:s,text:l,clickFunction:n}=e;if(!i)return N("calcite-action",{disabled:t??this.menuConfig?.disabled,icon:s??void 0,key:l,onclick:()=>n(),slot:"header-menu-actions",text:l,textEnabled:!0,title:l})}_renderHeaderMenuActions(){return this._shouldShowMenu?[this._renderDefaultHeaderMenuActions(),this._renderCustomHeaderMenuActions()]:[]}_renderDefaultHeaderMenuActions(){if(!this._hasDefaultMenuItems)return[];const{messages:e}=this;return[this._showRefreshDataAction&&{icon:J.refresh,text:e.refreshData,clickFunction:()=>this.refresh()},this._showDeleteSelectionAction&&{icon:J.delete,text:e.deleteSelection,clickFunction:()=>this.deleteSelection(!0)},this._showClearSelectionAction&&{icon:J.clearSelection,text:e.clearSelection,clickFunction:()=>this.highlightIds?.removeAll()},this._showZoomToSelectionAction&&{icon:J.zoomToSelection,text:e.zoomToSelection,clickFunction:()=>this.zoomToSelection()},this._showSelectedRecordsShowSelectedAction&&{icon:J.showSelected,text:e.showSelected,clickFunction:()=>{const{objectIds:e}=this;e.removeAll(),e.addMany(this.highlightIds.toArray())}},this._showSelectedRecordsShowAllAction&&{icon:J.showAll,text:e.showAllRecords,clickFunction:()=>this.objectIds.removeAll()},this._showExportSelectionToCSVAction&&{icon:J.exportToCSV,text:e.exportSelectionCSV,clickFunction:()=>this.exportSelectionToCSV()}].filter(i).map(e=>e&&this._renderHeaderMenuAction(e))}_renderCustomHeaderMenuActions(){return this.menuConfig?.items?.map(({disabled:e,hidden:t,icon:i,label:s,clickFunction:l})=>this._renderHeaderMenuAction({hidden:"function"==typeof t?t():t,icon:i,text:s,disabled:e,clickFunction:e=>l(e)}))??[]}_renderColumnVisibilityAction(){if(!this._showColumnVisibilityAction)return[];const{_columnVisibilityActions:e,id:t}=this,i=this.messages.menuText.columnVisibility;return N("calcite-action",{afterCreate:i=>e.set(t,i),afterRemoved:()=>e.delete(t),bind:this,disabled:this._columnVisibilityActionDisabled,icon:J.showColumn,id:`${t}__toggle-columns-action`,slot:"header-actions-end",text:i},this._effectiveVisibleElements.tooltips?N("calcite-tooltip",{closeOnClick:!0,overlayPositioning:"fixed",placement:"bottom-end",referenceElement:e.get(t),topLayerDisabled:this.topLayerDisabled},i):null)}_renderColumnVisibilityPopover(){if(!this._showColumnVisibilityAction||this._columnVisibilityActionDisabled)return;const e=this.visibleElements.columnVisibilityMenuItems.header,t=this.messages.menuText.columnVisibility;return N("calcite-popover",{autoClose:!0,class:q.menuPopover,closable:e,heading:e?t:void 0,label:t,overlayPositioning:"fixed",referenceElement:this._columnVisibilityActions.get(this.id),topLayerDisabled:this.topLayerDisabled},this._renderColumnVisibilityList())}_renderColumnVisibilityList(){const{effectiveTable:e,messages:{menuText:t}}=this;if(0!==e.columns.length)return N("calcite-list",{afterCreate:B,afterRemoved:Z.bind(this),afterUpdate:B,bind:this,"data-node-ref":"_columnVisibilityList",displayMode:"nested",filterEnabled:this.visibleElements.columnVisibilityMenuItems.filter,filterPlaceholder:t.searchFields,label:t.fieldVisibility,selectionMode:"multiple",onCalciteListFilter:()=>this.scheduleRender()},this._renderColumnToggleAll(),e.columns.toArray().map(t=>{const i=D(t)?t.columns?.map(t=>this._renderColumnListItem({column:t,table:e,ignoreSelect:!0})):void 0;return this._renderColumnListItem({column:t,table:e,items:i})}),N("calcite-notice",{appearance:"transparent",kind:"neutral",open:!0,slot:"filter-no-results"},N("div",{slot:"message"},t.noMatchesFound)))}_renderColumnToggleAll(){if(!this.visibleElements.columnVisibilityMenuItems.toggleAll)return;const{_columnVisibilityList:e}=this;return e&&e.filteredItems?.length?N("calcite-button",{appearance:"transparent",onclick:()=>this._toggleAllColumns(),width:"full"},this._getColumnToggleAllText()):void 0}_getColumnToggleAllText(){const{_columnVisibilityList:e,effectiveTable:t,messages:{menuText:i}}=this;return e?""===e.filterText?t.allColumnsVisible?i.deselectAll:i.selectAll:this._allColumnsAreVisible(e.filteredItems.map(e=>e.value))?i.deselectAll:i.selectAll:""}_renderColumnListItem(e){const{column:t,table:i,items:s,ignoreSelect:l}=e,{effectiveLabel:n,fieldName:o,hidden:a}=t;return N("calcite-list-item",{expanded:!(!s?.length||a)||void 0,key:`toggle-columns__item-${o}`,label:n,metadata:{description:t.effectiveDescription,type:R(t)?t.field.type:void 0},selected:!a,value:o,onCalciteListItemSelect:e=>{l&&e.stopPropagation(),i.toggleColumnVisibility(e.currentTarget.value)}},s)}_renderLayerDropdown(){const e=this.messages.selectALayer;return N("div",{class:q.layerDropdownMenu,key:`${this.id}-layerDropdown`,slot:"header-actions-start"},N("calcite-dropdown",{bind:this,maxItems:5,overlayPositioning:"fixed",placement:"bottom-start",topLayerDisabled:this.topLayerDisabled},N("calcite-action",{icon:J.layers,slot:"trigger",text:e,title:e}),N("calcite-dropdown-group",{selectionMode:"single"},this._effectiveLayers.map((e,t)=>this._renderLayerDropdownItem(e,t))??null)))}_renderLayerDropdownItem(e,t){const i=this.visibleElements.layerDropdownIcons;return N("calcite-dropdown-item",{iconStart:i?z(e):void 0,key:`dropdown-item-${t}`,label:e.title??"",selected:e===this.layer,value:e.id,onCalciteDropdownItemSelect:()=>this._onTableViewChange(()=>this.layer=e)},e.title)}_onRelatedNavigationItemClick(e){this.viewModel.drainRelatedTablesAboveIndex(e)}_collapseRelatedTable(e){this.viewModel.collapseRelatedTable(this.effectiveTable,e)}_onShowRelatedTable(e){this.showRelatedTableCallback||this.hasPendingEdits||(this._collapseRelatedTable(e),this._createRelatedTable(e))}async _createRelatedTable(e){const{autoRefreshEnabled:t,autoSaveEnabled:i,editingEnabled:s,effectiveTable:l,multipleSelectionEnabled:n,paginationEnabled:o,pageSize:a,view:r,viewModel:c}=this,{layer:d,objectId:h,relatedLayer:m,relationshipId:p}=e;await d.load();const u=this.attachmentsEnabled&&L(d),g=new G({layer:d,autoRefreshEnabled:t,autoSaveEnabled:i,attachmentsEnabled:u,editingEnabled:s,multipleSelectionEnabled:n,paginationEnabled:o,pageSize:a,relatedRecordsEnabled:!0,relationshipConfig:{objectId:h,relatedLayer:m,relationshipId:p},relationshipColumnConfigs:O(d,p),tableController:this,tableParent:l,view:r,showRelatedTableCallback:e=>c.emit("show-related-table",e)});this.relatedTables.add(g),this.scheduleRender()}_renderAttachmentsView(){switch(this.attachmentsViewOptions.effectiveMode){case"list":return this._renderAttachmentsViewList();case"details":return this._renderAttachmentsViewDetails();case"file":return this._renderAttachmentsViewFile()}}_renderAttachmentsViewFile(){const e=this.attachmentsViewOptions,{objectId:t}=e;if(null!=t)return[N("div",{class:q.attachmentsView,key:"attachments-view"},this._renderAttachmentsViewInformation(),N("div",{class:q.attachmentsViewContent,key:"attachments-view-content"},N("div",{bind:this,class:q.attachmentsViewDropArea,ondragover:e=>e.preventDefault(),ondrop:this._onAttachmentsViewDrop},N("calcite-icon",{class:q.attachmentsViewIcon,icon:J.upload,scale:"l"}),this._renderAttachmentsViewFileLabelNode(),this._renderAttachmentsViewFileMessageNode(),N("form",{afterCreate:t=>e.form=t,afterRemoved:()=>e.form=null,bind:this,key:"attachments-form"},N("fieldset",null,this._renderAttachmentsViewFileNameNode(),N("input",{afterCreate:B,afterRemoved:Z,afterUpdate:B,bind:this,"data-node-ref":"_attachmentsInput",files:e.candidates,hidden:!0,name:"attachment",onchange:e=>this._onAttachmentsViewCandidateChange(e),type:"file"}),this._renderAttachmentsViewFileSelectNode(),this._renderAttachmentsViewFileSaveNode(),this._renderAttachmentsViewFileCancelNode())))))]}_renderAttachmentsViewFileLabelNode(){if("replace"===this.attachmentsViewOptions.fileMode)return N("span",{class:q.attachmentsViewDropAreaLabel,key:"replace-file-node"},this.messages.replaceFile)}_renderAttachmentsViewFileMessageNode(){const e=this.attachmentsViewOptions;if(e.hasCandidates)return;const{messages:t}=this,i=this.supportsAddAttachments?null==e.objectId?t.noFeature:t.dragAndDropToUpload:t.editingRestricted;return N("span",{class:q.attachmentsViewDropAreaMessage,key:"message-node"},i)}_renderAttachmentsViewFileNameNode(){const e=this.attachmentsViewOptions.candidates,t=Array.from(e??[]).at(-1);if(t)return N("span",{class:q.attachmentsViewDropAreaMessage,key:"filename-node"},t.name)}_renderAttachmentsViewFileSelectNode(){if(this.supportsAddAttachments)return N("calcite-button",{appearance:"outline-fill",disabled:this.isSyncingAttachments,iconStart:J.folderOpen,key:"select-node",onclick:()=>{this._resetAttachmentsInput(),this._attachmentsInput?.click()}},this.messages.selectFile)}_renderAttachmentsViewFileSaveNode(){const{isSyncingAttachments:e,messages:t}=this,{attachmentInfo:i,hasCandidates:s}=this.attachmentsViewOptions;if(this.supportsAddAttachments&&s)return N("calcite-button",{appearance:"solid",disabled:e,iconStart:J.save,key:"save-node",loading:e,onclick:()=>{this.saveAttachmentsViewForm()}},i?t.updateAttachment:t.addAttachment)}_renderAttachmentsViewFileCancelNode(){const{hasAttachments:e,hasCandidates:t}=this.attachmentsViewOptions;if(e||t)return N("calcite-button",{appearance:"transparent",bind:this,disabled:this.isSyncingAttachments,key:"cancel-node",onclick:()=>{this._resetAttachmentsInput(),this.attachmentsViewOptions.cancel()}},this.messagesCommon.cancel)}_renderAttachmentsViewDetails(){const{attachmentInfo:e}=this.attachmentsViewOptions;if(e)return[N("div",{class:q.attachmentsView,key:"attachments-view"},this._renderAttachmentsViewInformation(),N("div",{class:q.attachmentsViewContent,key:"attachments-view-content"},N("div",{class:q.attachmentsViewDetails},this._renderAttachmentsViewDetailsPreview(e))))]}_renderAttachmentsViewDetailsPreview(e){const t=[this._renderAttachmentsViewDetailsImage(e)];if(M(e.contentType)){const i=this.messages.maximize;t.push(N("calcite-action",{icon:J.expand,label:i,onclick:t=>{t.preventDefault(),this.attachmentsViewOptions.dialogId=e.id},text:i,textEnabled:!0,title:i}))}return t}_renderAttachmentsViewDetailsImage(e){const{contentType:t,name:i,size:s,url:l}=e,{messages:n}=this;return M(t)?N("img",{afterCreate:()=>this._attachmentsDialogPreviewLoading=!0,alt:i,key:`thumbnail-image-${i}`,onerror:()=>this._attachmentsDialogPreviewLoading=!1,onload:()=>this._attachmentsDialogPreviewLoading=!1,src:`${l}${l?.includes("?")?"&":"?"}s=${s}`,title:i}):[N("calcite-icon",{icon:V(t),key:`thumbnail-icon-${i}`,scale:"l",textLabel:i,title:i}),n.noPreviewAvailable]}_renderAttachmentsViewInformation(){const{attachmentsViewOptions:e,messages:t,messagesUnits:i}=this,{attachmentInfo:s,objectId:l}=e;if(s&&null!=l)return N("div",{class:q.attachmentsViewInformation,key:"information"},this._renderAttachmentViewInformationButtons(s,l),N("span",{class:q.attachmentsViewInformationLabel,key:"file-label"},t.fileName),N("span",{class:q.attachmentsViewInformationData,key:"file-value"},s.name),N("span",{class:q.attachmentsViewInformationLabel,key:"type-label"},t.attachmentType),N("span",{class:q.attachmentsViewInformationData,key:"type-value"},this._getLabelForAttachmentType(s)),this._renderAttachmentKeywordDetails(s),N("span",{class:q.attachmentsViewInformationLabel,key:"size-label"},t.size),N("span",{class:q.attachmentsViewInformationData,key:"size-span"},h(i,s.size??0)))}_renderAttachmentViewInformationButtons(e,t){const{attachmentsViewOptions:i,messages:s,messagesCommon:l}=this,n="details"!==i.effectiveMode,o=e.id,a=[N("calcite-button",{appearance:"outline",disabled:n,key:"download-button",onclick:e=>{e.preventDefault(),this.downloadAttachmentById(t,o)},width:"full"},s.download)];return this.supportsUpdateAttachments&&a.push(N("calcite-button",{appearance:"outline",disabled:n,key:"replace-button",onclick:()=>{i.mode="file",i.attachmentId=o},width:"full"},s.replace)),this.supportsDeleteAttachments&&a.push(N("calcite-button",{appearance:"outline",disabled:n,key:"delete-button",onclick:()=>{this.deleteAttachments(t,[o],!0)},width:"full"},l.delete)),a}_renderAttachmentKeywordDetails({keywords:e}){if(e&&""!==e)return[N("span",{class:q.attachmentsViewInformationLabel,key:"keyword-label"},this.messages.keyword),N("span",{class:q.attachmentsViewInformationData,key:"keyword-value"},e)]}_renderAttachmentsViewList(){const{attachmentsViewOptions:e,isSyncingAttachments:t,messages:i,messagesUnits:s}=this,{attachmentInfos:l,objectId:n}=e;return N("calcite-list",{afterCreate:B,afterRemoved:Z,afterUpdate:B,bind:this,class:q.attachmentsViewList,"data-node-ref":"attachmentsList",key:`attachments-list-${n}`,label:i?.attachments,loading:t,ondragover:e=>e.preventDefault(),ondrop:this._onAttachmentsViewDrop,selectionMode:this.supportsDeleteAttachments?"multiple":"none",onCalciteListChange:()=>this.scheduleRender()},...l?.map(t=>{const{id:l,name:o,size:a}=t,r=h(s,a??0);return N("calcite-list-item",{afterRemoved:()=>this.scheduleRender(),key:`attachment-${l}`,label:o,value:l},this._renderAttachmentsViewListPreview(t),N("span",{class:q.attachmentsViewListFileSize,slot:"actions-end",title:r},r),N("calcite-action",{icon:J.downloadTo,key:"download",label:o,onclick:e=>{e.preventDefault(),this.downloadAttachmentById(n??-1,l)},slot:"actions-end",text:i.downloadAttachment,title:i.downloadAttachment}),N("calcite-action",{icon:J.chevronRight,iconFlipRtl:!0,key:"details",label:o,onclick:()=>{e.mode="details",e.attachmentId=l},slot:"actions-end",text:i.viewAttachment,title:i.viewAttachment}))}))}_renderAttachmentsViewListPreview(e){return N("div",{class:q.attachmentsViewListThumbnail,slot:"content-start"},N("span",null,this._renderAttachmentsViewListImage(e)))}_renderAttachmentsViewListImage(e,t=64){const{contentType:i,name:s,size:l,url:n}=e,o=`${n}${n?.includes("?")?"&":"?"}w=${t}&s=${l}`;return this.supportsResizeAttachments&&M(i)?N("img",{alt:s,key:`thumbnail-image-${s}`,src:o,title:s}):N("calcite-icon",{icon:V(i),key:`thumbnail-icon-${s}`,scale:"l",textLabel:s,title:s})}_onAttachmentsViewCandidateChange({target:e}){this.attachmentsViewOptions.candidates=e?.files}_onAttachmentsViewDrop(e){e.preventDefault(),(this.supportsAddAttachments||this.supportsUpdateAttachments)&&(this.attachmentsViewOptions.mode="file",this.attachmentsViewOptions.candidates=e.dataTransfer?.files)}_resetAttachmentsInput(){this._attachmentsInput&&(this._attachmentsInput.value="")}_getLabelForAttachmentType({contentType:e}){const t=this.messages,i=C(e);return t.attachmentTypes[i]}_renderNavigationBar(){const{effectiveTable:e,messages:i,messagesCommon:s,navigationScale:l,relatedTable:n,relatedTables:o}=this;if(!this._shouldShowNavigationBar)return;const{attachmentsList:a,attachmentsViewOptions:r,layer:c,supportsAddAttachments:d,supportsDeleteAttachments:h}=e;if(!c)return;const{attachmentInfos:m,objectId:p}=r,u=null!=p,g=m.length,w=a?.selectedItems?.length??0,b=`${c.objectIdField}: ${p}`,v=t(i.selectedCount,{count:w}),y=t(i.attachmentsCount,{count:g}),f=u?N("calcite-action",{bind:this,icon:J.chevronRight,iconFlipRtl:!0,key:"navigation-feature",onclick:()=>e.scrollToRow(p),scale:l,text:b,textEnabled:!0,title:b}):void 0,_=u?N("calcite-action",{icon:J.chevronRight,iconFlipRtl:!0,key:"navigation-attachments-label",label:y,onclick:()=>{g>0&&(r.mode="list")},scale:l,text:y,textEnabled:!0,title:y}):void 0,M=u?N("calcite-chip",{closable:!0,closed:0===w,key:"navigation-chip",kind:"inverse",label:v,scale:"s",selected:!0,title:v,value:"selected",onCalciteChipClose:()=>a?.selectedItems?.forEach(e=>e.selected=!1)},v):void 0,V=n?N("calcite-label",{layout:"inline",scale:l},i.showAllTables,N("calcite-switch",{checked:this.allRelatedTablesVisible,scale:l,onCalciteSwitchChange:e=>this.showAllRelatedTables=!!e.currentTarget.checked})):void 0,C=u&&"list"===r.effectiveMode&&null!=p&&w&&h?N("calcite-action",{icon:J.delete,iconFlipRtl:!0,key:"attachments-trash-all",onclick:()=>{e.deleteAttachments(p,a?.selectedItems?.map(e=>e.value)??[],!0)},scale:l,text:s.delete,textEnabled:!0,title:t(i.deleteAttachmentCount,{count:w})}):void 0,A=u&&"list"===r.effectiveMode&&d?N("calcite-action",{bind:this,icon:J.plus,iconFlipRtl:!0,key:"attachments-add",onclick:()=>{r.objectId=p,r.attachmentId=null,r.mode="file"},scale:l,text:i.addAttachment,textEnabled:!0,title:i.addAttachment}):void 0;return N("div",{class:q.tableNavigation,key:"table-nav"},N("calcite-action",{icon:J.moveUp,iconFlipRtl:!0,key:"go-back",onclick:()=>this._onTableViewChange(this._resetNestedViews),scale:l,text:this.layer?.title??"",textEnabled:!1,title:n?i.exitRelatedRecords:i.exitAttachments}),o.toArray().map((e,t)=>this._renderRelatedTableNavigationAction(e,t)),f,_,N("div",null,M,V,C,A))}_renderRelatedTableNavigationAction(e,t){const i=this._getLabelForRelatedTableNavigationAction(e);return N("calcite-action",{icon:J.chevronRight,iconFlipRtl:!0,key:t,onclick:()=>{(t!==this.relatedTables.length-1||this._attachmentsViewIsVisible)&&this._onTableViewChange(()=>this._onRelatedNavigationItemClick(t))},scale:this.navigationScale,text:i,textEnabled:!0,title:e.layer?.title||""})}_getLabelForRelatedTableNavigationAction(e){const t=e.layer?.title;if(!t)return"";const{relatedTables:i}=this;if(i.length<=1)return t;return i.indexOf(e)!==i.length-1&&t.length>20?`${t.slice(0,20)}...`:t}_allColumnsAreVisible(e){return e.every(e=>!1===this.findColumn(e)?.hidden)}_toggleAllColumns(){const{_columnVisibilityList:e,effectiveTable:t}=this,i=e?.filteredItems.map(e=>e.value);""!==e?.filterText&&i?.length?this._allColumnsAreVisible(i)?i.forEach(e=>this.hideColumn(e)):i.forEach(e=>this.showColumn(e)):t.allColumnsVisible?t.hideAllColumns():t.showAllColumns()}};e([m()],X.prototype,"_attachmentsDialogPreviewLoading",void 0),e([m()],X.prototype,"_attachmentsInput",void 0),e([m()],X.prototype,"_attachmentsViewIsVisible",null),e([m()],X.prototype,"_columnVisibilityActions",void 0),e([m()],X.prototype,"_columnVisibilityActionDisabled",null),e([m()],X.prototype,"_columnVisibilityList",void 0),e([m()],X.prototype,"_dialogIsOpen",null),e([m()],X.prototype,"_effectiveDescription",null),e([m()],X.prototype,"_effectiveLayers",null),e([m()],X.prototype,"_effectiveTitle",null),e([m()],X.prototype,"_effectiveVisibleElements",null),e([m()],X.prototype,"_filteredTables",null),e([m()],X.prototype,"_hasAttachmentsViewError",null),e([m()],X.prototype,"_hasCustomMenuItems",null),e([m()],X.prototype,"_hasDefaultMenuItems",null),e([m()],X.prototype,"_shouldShowGrid",null),e([m()],X.prototype,"_shouldShowMenu",null),e([m()],X.prototype,"_showClearSelectionAction",null),e([m()],X.prototype,"_showColumnVisibilityAction",null),e([m()],X.prototype,"_showDeleteSelectionAction",null),e([m()],X.prototype,"_showExportSelectionToCSVAction",null),e([m()],X.prototype,"_showLayerDropdown",null),e([m()],X.prototype,"_shouldShowNavigationBar",null),e([m()],X.prototype,"_showRefreshDataAction",null),e([m()],X.prototype,"_showSelectedRecordsShowSelectedAction",null),e([m()],X.prototype,"_showSelectedRecordsShowAllAction",null),e([m()],X.prototype,"_showZoomToSelectionAction",null),e([m()],X.prototype,"_viewLayers",null),e([m()],X.prototype,"attachmentsList",void 0),e([m({readOnly:!0})],X.prototype,"grid",null),e([m()],X.prototype,"actionColumn",null),e([m()],X.prototype,"actionColumnConfig",null),e([m({readOnly:!0})],X.prototype,"activeFilters",null),e([m({readOnly:!0})],X.prototype,"activeSortOrders",null),e([m()],X.prototype,"allColumns",null),e([m()],X.prototype,"allColumnsVisible",null),e([m({readOnly:!0})],X.prototype,"allRelatedTablesVisible",null),e([m()],X.prototype,"allVisibleColumns",null),e([m()],X.prototype,"attachmentsColumns",null),e([m()],X.prototype,"attachmentsEnabled",null),e([m()],X.prototype,"attachmentsViewOptions",null),e([m({type:y})],X.prototype,"attributeTableTemplate",null),e([m()],X.prototype,"autoRefreshEnabled",null),e([m()],X.prototype,"autoSaveEnabled",null),e([m()],X.prototype,"canAddRelatedFeature",null),e([m()],X.prototype,"clearPrompt",null),e([m()],X.prototype,"closed",void 0),e([m()],X.prototype,"collapsed",void 0),e([m()],X.prototype,"columnPerformanceModeEnabled",null),e([m()],X.prototype,"columnReorderingEnabled",null),e([m({readOnly:!0})],X.prototype,"columns",null),e([m()],X.prototype,"defaultSelectionManager",null),e([m()],X.prototype,"definitionExpression",null),e([m()],X.prototype,"description",void 0),e([m()],X.prototype,"disabled",void 0),e([m()],X.prototype,"editingEnabled",null),e([m()],X.prototype,"effectiveSelectionManager",null),e([m()],X.prototype,"effectiveSize",null),e([m()],X.prototype,"effectiveTable",null),e([m()],X.prototype,"fieldColumns",null),e([m({types:u})],X.prototype,"filterGeometry",null),e([m()],X.prototype,"filterBySelectionEnabled",null),e([m()],X.prototype,"filterByViewExtent",null),e([m()],X.prototype,"groupColumns",null),e([m()],X.prototype,"hasContingentValues",null),e([m()],X.prototype,"hasInvalidPendingEdits",null),e([m()],X.prototype,"hasPendingEdits",null),e([m()],X.prototype,"hiddenFields",null),e([m()],X.prototype,"highlightEnabled",null),e([m()],X.prototype,"highlightIds",null),e([m()],X.prototype,"icon",null),e([m()],X.prototype,"initialSize",null),e([m()],X.prototype,"isQueryingOrSyncing",null),e([m()],X.prototype,"isSyncing",null),e([m()],X.prototype,"isSyncingAttachments",null),e([m()],X.prototype,"label",null),e([m()],X.prototype,"layer",null),e([m()],X.prototype,"layers",null),e([m()],X.prototype,"layerView",null),e([m()],X.prototype,"maxSize",null),e([m(),$("esri/widgets/FeatureTable/t9n/FeatureTable")],X.prototype,"messages",null),e([m(),$("esri/t9n/common")],X.prototype,"messagesCommon",null),e([m(),$("esri/widgets/Editor/t9n/Editor")],X.prototype,"messagesEditor",void 0),e([m(),$("esri/core/t9n/Units")],X.prototype,"messagesUnits",null),e([m(),$("esri/widgets/support/t9n/uriUtils")],X.prototype,"messagesURIUtils",null),e([m()],X.prototype,"menuConfig",null),e([m()],X.prototype,"multipleSelectionEnabled",null),e([m()],X.prototype,"multipleSelectionEnabledOverride",null),e([m()],X.prototype,"multiSortEnabled",null),e([m()],X.prototype,"multipleSortPriority",null),e([m()],X.prototype,"navigationScale",void 0),e([m()],X.prototype,"noDataMessage",null),e([m()],X.prototype,"objectIds",null),e([m()],X.prototype,"outFields",null),e([m()],X.prototype,"pageCount",null),e([m()],X.prototype,"pageIndex",null),e([m()],X.prototype,"pageSize",null),e([m()],X.prototype,"paginationEnabled",null),e([m()],X.prototype,"pendingEditsCount",null),e([m()],X.prototype,"prompt",null),e([m()],X.prototype,"relatedRecordsEnabled",null),e([m()],X.prototype,"relatedTable",null),e([m()],X.prototype,"relatedTableHasContingentValues",null),e([m()],X.prototype,"relatedTableHasInvalidPendingEdits",null),e([m()],X.prototype,"relatedTableHasPendingEdits",null),e([m()],X.prototype,"relatedTables",null),e([m()],X.prototype,"relationship",null),e([m()],X.prototype,"relationshipColumnConfigs",null),e([m()],X.prototype,"relationshipColumns",null),e([m()],X.prototype,"relationshipConfig",null),e([m()],X.prototype,"relationshipInfos",null),e([m()],X.prototype,"returnGeometryEnabled",null),e([m()],X.prototype,"returnMEnabled",null),e([m()],X.prototype,"returnZEnabled",null),e([m()],X.prototype,"rowHighlightIds",null),e([m()],X.prototype,"selectionManager",null),e([m()],X.prototype,"selectionSource",null),e([m()],X.prototype,"showAllRelatedTables",null),e([m()],X.prototype,"showPrompt",null),e([m()],X.prototype,"showRelatedTableCallback",null),e([m()],X.prototype,"size",null),e([m({readOnly:!0})],X.prototype,"state",null),e([m()],X.prototype,"supportsAddAttachments",null),e([m()],X.prototype,"supportsAttachments",null),e([m()],X.prototype,"supportsDeleteAttachments",null),e([m()],X.prototype,"supportsResizeAttachments",null),e([m()],X.prototype,"supportsUpdateAttachments",null),e([m()],X.prototype,"syncTemplateOnChangesEnabled",null),e([m()],X.prototype,"syncViewSelection",null),e([m()],X.prototype,"syncWithViewSelectionManager",null),e([m({constructOnly:!0})],X.prototype,"tableController",null),e([m({constructOnly:!0})],X.prototype,"tableParent",null),e([m({type:P})],X.prototype,"tableTemplate",null),e([m()],X.prototype,"tableTemplateOverride",null),e([m()],X.prototype,"title",void 0),e([m({type:f})],X.prototype,"timeExtent",null),e([m()],X.prototype,"timeZone",null),e([m()],X.prototype,"view",null),e([m({type:T}),U(["cell-click","cell-dblclick","cell-pointerover","cell-pointerout","cell-keydown","column-reorder","show-related-table"])],X.prototype,"viewModel",void 0),e([m()],X.prototype,"visibleColumns",null),e([m({type:I,nonNullable:!0})],X.prototype,"visibleElements",void 0),e([m({type:I})],X.prototype,"visibleElementsOverride",null),X=G=e([p("esri.widgets.FeatureTable")],X);const Y=X;export{Y as default};
2
+ import{__decorate as e}from"tslib";import{substitute as t}from"../intl.js";import{isSome as i}from"../core/arrayUtils.js";import{deprecateWidget as s}from"../core/deprecate.js";import l from"../core/Logger.js";import{watch as n,sync as o,syncAndInitial as a,initial as r,on as c}from"../core/reactiveUtils.js";import{renderingSanitizer as d}from"../core/sanitizerUtils.js";import{formatFileSize as h}from"../core/unitFormatUtils.js";import{property as m,subclass as p}from"../core/accessorSupport/decorators.js";import{geometryTypes as u}from"../geometry/support/typeUtils.js";import{isLayerFromCatalog as g}from"../layers/catalog/catalogUtils.js";import{isKnowledgeGraphLayer as w,isMapImageLayer as b,isSubtypeGroupLayer as v}from"../layers/support/layerUtils.js";import y from"../tables/AttributeTableTemplate.js";import f from"../time/TimeExtent.js";import _ from"./Widget.js";import{isSupportedImage as M,getCalciteIconForAttachment as V,getAttachmentTypeCategory as C}from"./Attachments/support/attachmentUtils.js";import{loadPromptComponents as A,Prompt as E}from"./Editor/components/Prompt.js";import S from"./FeatureTable/ColumnMenuVisibleElements.js";import T from"./FeatureTable/FeatureTableViewModel.js";import I from"./FeatureTable/VisibleElements.js";import{isGroupColumn as D,isFieldColumn as R}from"./FeatureTable/support/columnUtils.js";import P from"./FeatureTable/support/TableTemplate.js";import{loadFieldColumnComponents as k,isIFeatureTableSupportedLayer as x,isIFeatureTableSupportedLayerWithAttachments as L,getRelationshipIdsToShow as O}from"./FeatureTable/support/tableUtils.js";import{loadCalciteComponents as F}from"./support/componentsUtils.js";import{globalCss as j}from"./support/globalCss.js";import{getIconForLayer as z}from"./support/iconUtils.js";import{messageBundle as $,vmEvent as U,tsx as N,tsxFragment as H}from"./support/widget.js";import{storeNode as B,discardNode as Z}from"./support/widgetUtils.js";var G;const Q="esri-feature-table",W=`${Q}__dialog`,K=`${Q}__attachments-view`,q={base:Q,content:`${Q}__content`,menuPopover:`${Q}__menu-popover`,layerDropdownMenu:`${Q}__layer-switcher-menu`,tableContainer:`${Q}__table-container`,tableContainerWithAttachments:`${Q}__table-container--attachments`,tableNavigation:`${Q}__table-navigation`,attachmentsView:K,attachmentsViewContent:`${K}__content`,attachmentsViewDetails:`${K}__details`,attachmentsViewDropArea:`${K}__drop-area`,attachmentsViewDropAreaLabel:`${K}__drop-area__label`,attachmentsViewDropAreaMessage:`${K}__drop-area__message`,attachmentsViewIcon:`${K}__icon`,attachmentsViewInformation:`${K}__information`,attachmentsViewInformationData:`${K}__information__data`,attachmentsViewInformationLabel:`${K}__information__label`,attachmentsViewList:`${K}__list`,attachmentsViewListFileSize:`${K}__list__filesize`,attachmentsViewListThumbnail:`${K}__list__thumbnail`,expanded:`${Q}__expanded`,collapsed:`${Q}__collapsed`,dialog:`${W}`,dialogContent:`${W}__content`,dialogHeader:`${W}__header`,footerMessage:`${Q}__footer__message`,footerIconDanger:`${Q}__footer__icon--danger`,footerIconSuccess:`${Q}__footer__icon--success`},J={checkCircle:"check-circle",chevronRight:"chevron-right",clearSelection:"clear-selection",downloadTo:"download-to",exclamationMarkTriangle:"exclamation-mark-triangle",expand:"expand",exportToCSV:"file-csv",folderOpen:"folder-open",delete:"trash",layers:"layers",moveUp:"move-up",plus:"plus",refresh:"refresh",reset:"reset",save:"save",showAll:"selection-x",showColumn:"show-column",showSelected:"selection-filter",table:"table",upload:"upload",zoomToSelection:"zoom-to-object"};let X=G=class extends _{constructor(e,t){super(e,t),this._attachmentsDialogPreviewLoading=!1,this._attachmentsInput=null,this._columnVisibilityActions=new Map,this._columnVisibilityList=null,this.attachmentsList=null,this.closed=!1,this.collapsed=!1,this.description=null,this.disabled=!1,this.messagesEditor=null,this.navigationScale="m",this.title=null,this.viewModel=new T,this.visibleElements=new I,this.announceDeprecation=()=>{s(l.getLogger(this),"Feature Table","arcgis-feature-table",{version:"5.0"})},this._showDeleteSelectionPrompt=this._showDeleteSelectionPrompt.bind(this),this._showDiscardEditsPrompt=this._showDiscardEditsPrompt.bind(this),this._resetNestedViews=this._resetNestedViews.bind(this)}initialize(){this.addHandles([n(()=>[this.isQueryingOrSyncing,this.editingEnabled],()=>this.scheduleRender()),n(()=>[this._effectiveVisibleElements,this._effectiveVisibleElements.columnDescriptions,this._effectiveVisibleElements.columnMenus,this._effectiveVisibleElements.columnMenuItems,this.columns.length],()=>{this.columns.forEach(e=>e.visibleElements=this._effectiveVisibleElements),this.refreshCellContent()},o),n(()=>[this.topLayerDisabled,this.columns],()=>this.columns.forEach(e=>e.topLayerDisabled=this.topLayerDisabled),a),n(()=>this._effectiveVisibleElements.selectionColumn,e=>{this.grid&&(this.grid.selectionColumnEnabled=e)},r),c(()=>this.viewModel,"show-related-table",e=>this._onShowRelatedTable(e)),n(()=>this.editingEnabled,()=>{const{attachmentsViewOptions:e}=this;this.clearPrompt(),e&&(e.form?.reset(),e.candidates=null)})])}loadDependencies(){return Promise.all([F({action:()=>import("@esri/calcite-components/dist/components/calcite-action"),alert:()=>import("@esri/calcite-components/dist/components/calcite-alert"),button:()=>import("@esri/calcite-components/dist/components/calcite-button"),chip:()=>import("@esri/calcite-components/dist/components/calcite-chip"),dialog:()=>import("@esri/calcite-components/dist/components/calcite-dialog"),dropdown:()=>import("@esri/calcite-components/dist/components/calcite-dropdown"),"dropdown-group":()=>import("@esri/calcite-components/dist/components/calcite-dropdown-group"),"dropdown-item":()=>import("@esri/calcite-components/dist/components/calcite-dropdown-item"),icon:()=>import("@esri/calcite-components/dist/components/calcite-icon"),label:()=>import("@esri/calcite-components/dist/components/calcite-label"),list:()=>import("@esri/calcite-components/dist/components/calcite-list"),"list-item":()=>import("@esri/calcite-components/dist/components/calcite-list-item"),notice:()=>import("@esri/calcite-components/dist/components/calcite-notice"),pagination:()=>import("@esri/calcite-components/dist/components/calcite-pagination"),panel:()=>import("@esri/calcite-components/dist/components/calcite-panel"),popover:()=>import("@esri/calcite-components/dist/components/calcite-popover"),progress:()=>import("@esri/calcite-components/dist/components/calcite-progress"),switch:()=>import("@esri/calcite-components/dist/components/calcite-switch"),tooltip:()=>import("@esri/calcite-components/dist/components/calcite-tooltip")}),A(),k()])}destroy(){this.drainRelatedTables(),this.clearPrompt()}get _attachmentsViewIsVisible(){return!(null==this.attachmentsViewOptions.objectId&&!this.relatedTables.some(e=>null!=e.attachmentsViewOptions.objectId))}get _columnVisibilityActionDisabled(){const e=this.effectiveTable;return e.menuConfig?.disabled??0===e.columns.length}get _dialogIsOpen(){return!!this.attachmentsViewOptions.dialogInfo}get _effectiveDescription(){const{description:e}=this;return null!=e?d.sanitize("function"==typeof e?e():e):void 0}get _effectiveLayers(){const{layer:e,layers:t}=this,i=t?.length?t.filter(x):[],s=i.length?i:[...this._viewLayers];return e&&!s.includes(e)&&s.push(e),s}get _effectiveTitle(){const{layer:e,messages:i,state:s,highlightIds:l,title:n,size:o}=this;if(n)return d.sanitize("function"==typeof n?n():n);if(!i)return"";if(!e)return i.noLayer;switch(s){case"disabled":return i.errorLayer;case"ready":case"loading":return i.loading;case"error":return i.errorData}return t(i.header,{title:d.sanitize(e.title),count:o,selected:l.length})}get _effectiveVisibleElements(){return this.visibleElementsOverride??this.visibleElements}get _filteredTables(){const e=this.relatedTables.toArray(),t=1===e.length;return this.allRelatedTablesVisible?e:t?[e[0]]:this._attachmentsViewIsVisible?e.slice(-1):e.slice(-2)}get _hasAttachmentsViewError(){return null!=this.attachmentsViewOptions.error}get _hasCustomMenuItems(){return!!this.menuConfig?.items?.length}get _hasDefaultMenuItems(){return!!(this._showClearSelectionAction||this._showDeleteSelectionAction||this._showExportSelectionToCSVAction||this._showRefreshDataAction||this._showZoomToSelectionAction||this._showSelectedRecordsShowSelectedAction||this._showSelectedRecordsShowAllAction||this._showColumnVisibilityAction)}get _shouldShowGrid(){return this.allRelatedTablesVisible||1===this.relatedTables.length&&!this._attachmentsViewIsVisible}get _shouldShowMenu(){const{header:e,menu:t}=this._effectiveVisibleElements;return!(!e||!t||!this._hasDefaultMenuItems&&!this._hasCustomMenuItems)}get _showClearSelectionAction(){return!(!this.highlightIds.length||!this._effectiveVisibleElements.menuItems?.clearSelection||this.relatedTables.length||this._attachmentsViewIsVisible)}get _showColumnVisibilityAction(){const{columnVisibilityMenu:e,header:t,menu:i,menuItems:s}=this._effectiveVisibleElements;return!(!(t&&i&&e&&!1!==s?.toggleColumns)||this.showRelatedTableCallback||this.allRelatedTablesVisible||this._attachmentsViewIsVisible)}get _showDeleteSelectionAction(){return!(!(this.editingEnabled&&this.highlightIds.length&&this._effectiveVisibleElements.menuItems?.deleteSelection&&this.layer?.capabilities?.operations?.supportsDelete)||this.relatedTables.length||this._attachmentsViewIsVisible)}get _showExportSelectionToCSVAction(){return!(!(this._effectiveVisibleElements.menuItems.exportSelectionToCSV&&this.layer&&this.highlightIds.length)||this.relatedTables.length)}get _showLayerDropdown(){return!(!this._effectiveLayers.length||!this._effectiveVisibleElements.layerDropdown)}get _shouldShowNavigationBar(){const e=!!this.relatedTable||this._attachmentsViewIsVisible;return!this.tableParent&&e}get _showRefreshDataAction(){return!!this._effectiveVisibleElements.menuItems?.refreshData}get _showSelectedRecordsShowSelectedAction(){const e=this.objectIds.length,t=this.highlightIds.length;return!(!t||!this._effectiveVisibleElements.menuItems?.selectedRecordsShowSelectedToggle||e&&t===e||this.relatedTables.length||this._attachmentsViewIsVisible)}get _showSelectedRecordsShowAllAction(){return!(!this._effectiveVisibleElements.menuItems?.selectedRecordsShowAllToggle||!this.objectIds.length||this.relatedTables.length)}get _showZoomToSelectionAction(){return!(!this.view||!this.highlightIds.length||this.effectiveTable.layer?.isTable||!this._effectiveVisibleElements.menuItems?.zoomToSelection)}get _viewLayers(){const e=this.view?.map;if(!e)return[];const t=new Set,i=e=>{!x(e)||v(e)||t.has(e)||"sublayer"===e.type&&!e.capabilities?.operations?.supportsQuery||(e.load(),t.add(e))},s=e=>{g(e)||"catalog-footprint"===e.type||(w(e)?(e.load(),e.layers?.forEach(i),e.tables?.forEach(i)):b(e)?(e.loadAll(),e.allSublayers?.forEach(i),e.subtables?.forEach(i)):v(e)?(e.loadAll(),e.sublayers?.forEach(i)):i(e))};return e.allLayers.forEach(s),e.allTables.forEach(s),[...t.values()]}get grid(){return this.viewModel.grid}get actionColumn(){return this.viewModel.actionColumn}get actionColumnConfig(){return this.viewModel.actionColumnConfig}set actionColumnConfig(e){this.viewModel.actionColumnConfig=e}get activeFilters(){return this.viewModel.activeFilters}get activeSortOrders(){return this.viewModel.activeSortOrders}get allColumns(){return this.viewModel.allColumns}get allColumnsVisible(){return this.viewModel.allColumnsVisible}get allRelatedTablesVisible(){return this.viewModel.allRelatedTablesVisible}get allVisibleColumns(){return this.viewModel.allVisibleColumns}get attachmentsColumns(){return this.viewModel.attachmentsColumns}get attachmentsEnabled(){return this.viewModel.attachmentsEnabled}set attachmentsEnabled(e){this.viewModel.attachmentsEnabled=e}get attachmentsViewOptions(){return this.viewModel.attachmentsViewOptions}set attachmentsViewOptions(e){this.viewModel.attachmentsViewOptions=e}get attributeTableTemplate(){return this.viewModel.attributeTableTemplate}set attributeTableTemplate(e){this.viewModel.attributeTableTemplate=e}get autoRefreshEnabled(){return this.viewModel.autoRefreshEnabled}set autoRefreshEnabled(e){this.viewModel.autoRefreshEnabled=e}get autoSaveEnabled(){return this.viewModel.autoSaveEnabled}set autoSaveEnabled(e){this.viewModel.autoSaveEnabled=e}get canAddRelatedFeature(){return this.viewModel.canAddRelatedFeature}get clearPrompt(){return this.viewModel.clearPrompt}set clearPrompt(e){this.viewModel.clearPrompt=e}get columnPerformanceModeEnabled(){return this.viewModel.columnPerformanceModeEnabled}set columnPerformanceModeEnabled(e){this.viewModel.columnPerformanceModeEnabled=e}get columnReorderingEnabled(){return this.viewModel.columnReorderingEnabled}set columnReorderingEnabled(e){this.viewModel.columnReorderingEnabled=e}get columns(){return this.viewModel.columns}get defaultSelectionManager(){return this.viewModel.defaultSelectionManager}get definitionExpression(){return this.viewModel.definitionExpression}set definitionExpression(e){this.viewModel.definitionExpression=e}get container(){return super.container}set container(e){super.container=e}get editingEnabled(){return this.viewModel.editingEnabled}set editingEnabled(e){this.viewModel.editingEnabled=e}get effectiveSelectionManager(){return this.viewModel.effectiveSelectionManager}get effectiveSize(){return this.viewModel.effectiveSize}get effectiveTable(){return this.relatedTable||this}get fieldColumns(){return this.viewModel.fieldColumns}get filterGeometry(){return this.viewModel.filterGeometry}set filterGeometry(e){this.viewModel.filterGeometry=e}get filterBySelectionEnabled(){return this.viewModel.filterBySelectionEnabled}set filterBySelectionEnabled(e){this.viewModel.filterBySelectionEnabled=e}get filterByViewExtent(){return this.viewModel.filterByViewExtent}set filterByViewExtent(e){this.viewModel.filterByViewExtent=e}get groupColumns(){return this.viewModel.groupColumns}get hasContingentValues(){return this.viewModel.hasContingentValues}get hasInvalidPendingEdits(){return this.viewModel.hasInvalidPendingEdits}get hasPendingEdits(){return this.viewModel.hasPendingEdits}get hiddenFields(){return this.viewModel.hiddenFields}set hiddenFields(e){this.viewModel.hiddenFields=e}get highlightEnabled(){return this.viewModel.highlightEnabled}set highlightEnabled(e){this.viewModel.highlightEnabled=e}get highlightIds(){return this.viewModel.highlightIds}set highlightIds(e){this.viewModel.highlightIds=e}get icon(){return J.table}set icon(e){this._overrideIfSome("icon",e)}get initialSize(){return this.viewModel.initialSize}set initialSize(e){this.viewModel.initialSize=e}get isQueryingOrSyncing(){return this.viewModel.isQueryingOrSyncing}get isSyncing(){return this.viewModel.isSyncing}get isSyncingAttachments(){return this.viewModel.isSyncingAttachments}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get layer(){return this.viewModel.layer}set layer(e){this.viewModel.layer=e}get layers(){return this.viewModel.layers}set layers(e){this.viewModel.layers=e}get layerView(){return this.viewModel.layerView}get maxSize(){return this.viewModel.maxSize}set maxSize(e){this.viewModel.maxSize=e}get messages(){return this.viewModel.messages}set messages(e){this.viewModel.messages=e}get messagesCommon(){return this.viewModel.messagesCommon}set messagesCommon(e){this.viewModel.messagesCommon=e}get messagesUnits(){return this.viewModel.messagesUnits}set messagesUnits(e){this.viewModel.messagesUnits=e}get messagesURIUtils(){return this.viewModel.messagesURIUtils}set messagesURIUtils(e){this.viewModel.messagesURIUtils=e}get menuConfig(){return this.viewModel.menuConfig}set menuConfig(e){this.viewModel.menuConfig=e}get multipleSelectionEnabled(){return this.viewModel.multipleSelectionEnabled}set multipleSelectionEnabled(e){this.viewModel.multipleSelectionEnabled=e}get multipleSelectionEnabledOverride(){return this.viewModel.multipleSelectionEnabledOverride}set multipleSelectionEnabledOverride(e){this.viewModel.multipleSelectionEnabledOverride=e}get multiSortEnabled(){return this.viewModel.multiSortEnabled}set multiSortEnabled(e){this.viewModel.multiSortEnabled=e}get multipleSortPriority(){return this.viewModel.multipleSortPriority}set multipleSortPriority(e){this.viewModel.multipleSortPriority=e}get noDataMessage(){return this.viewModel.noDataMessage}set noDataMessage(e){this.viewModel.noDataMessage=e}get objectIds(){return this.viewModel.objectIds}set objectIds(e){this.viewModel.objectIds=e}get outFields(){return this.viewModel.outFields}set outFields(e){this.viewModel.outFields=e}get pageCount(){return this.viewModel.pageCount}get pageIndex(){return this.viewModel.pageIndex}set pageIndex(e){this.viewModel.pageIndex=e}get pageSize(){return this.viewModel.pageSize}set pageSize(e){this.viewModel.pageSize=e}get paginationEnabled(){return this.viewModel.paginationEnabled}set paginationEnabled(e){this.viewModel.paginationEnabled=e}get pendingEditsCount(){return this.viewModel.pendingEditsCount}get prompt(){return this.viewModel.prompt}set prompt(e){this.viewModel.prompt=e}get relatedRecordsEnabled(){return this.viewModel.relatedRecordsEnabled}set relatedRecordsEnabled(e){this.viewModel.relatedRecordsEnabled=e}get relatedTable(){return this.viewModel.relatedTable}get relatedTableHasContingentValues(){return this.viewModel.relatedTableHasContingentValues}get relatedTableHasInvalidPendingEdits(){return this.viewModel.relatedTableHasInvalidPendingEdits}get relatedTableHasPendingEdits(){return this.viewModel.relatedTableHasPendingEdits}get relatedTables(){return this.viewModel.relatedTables}get relationship(){return this.viewModel.relationship}get relationshipColumnConfigs(){return this.viewModel.relationshipColumnConfigs}set relationshipColumnConfigs(e){this.viewModel.relationshipColumnConfigs=e}get relationshipColumns(){return this.viewModel.relationshipColumns}get relationshipConfig(){return this.viewModel.relationshipConfig}set relationshipConfig(e){this.viewModel.relationshipConfig=e}get relationshipInfos(){return this.viewModel.relationshipInfos}get returnGeometryEnabled(){return this.viewModel.returnGeometryEnabled}set returnGeometryEnabled(e){this.viewModel.returnGeometryEnabled=e}get returnMEnabled(){return this.viewModel.returnMEnabled}set returnMEnabled(e){this.viewModel.returnMEnabled=e}get returnZEnabled(){return this.viewModel.returnZEnabled}set returnZEnabled(e){this.viewModel.returnZEnabled=e}get rowHighlightIds(){return this.viewModel.rowHighlightIds}set rowHighlightIds(e){this.viewModel.rowHighlightIds=e}get selectionManager(){return this.viewModel.selectionManager}set selectionManager(e){this.viewModel.selectionManager=e}get selectionSource(){return this.viewModel.selectionSource}set selectionSource(e){this.viewModel.selectionSource=e}get showAllRelatedTables(){return this.viewModel.showAllRelatedTables}set showAllRelatedTables(e){this.viewModel.showAllRelatedTables=e}get showPrompt(){return this.viewModel.showPrompt}set showPrompt(e){this.viewModel.showPrompt=e}get showRelatedTableCallback(){return this.viewModel.showRelatedTableCallback}set showRelatedTableCallback(e){this.viewModel.showRelatedTableCallback=e}get size(){return this.viewModel.size}get state(){return this.viewModel.state}get supportsAddAttachments(){return this.viewModel.supportsAddAttachments}get supportsAttachments(){return this.viewModel.supportsAttachments}get supportsDeleteAttachments(){return this.viewModel.supportsDeleteAttachments}get supportsResizeAttachments(){return this.viewModel.supportsResizeAttachments}get supportsUpdateAttachments(){return this.viewModel.supportsUpdateAttachments}get syncTemplateOnChangesEnabled(){return this.viewModel.syncTemplateOnChangesEnabled}set syncTemplateOnChangesEnabled(e){this.viewModel.syncTemplateOnChangesEnabled=e}get syncViewSelection(){return this.viewModel.syncViewSelection}set syncViewSelection(e){this.viewModel.syncViewSelection=e}get syncWithViewSelectionManager(){return this.syncViewSelection}set syncWithViewSelectionManager(e){this.syncViewSelection=e}get tableController(){return this.viewModel.tableController}set tableController(e){this.viewModel.tableController=e}get tableParent(){return this.viewModel.tableParent}set tableParent(e){this.viewModel.tableParent=e}get tableTemplate(){return this.viewModel.tableTemplate}set tableTemplate(e){this.viewModel.tableTemplate=e}get tableTemplateOverride(){return this.viewModel.tableTemplateOverride}set tableTemplateOverride(e){this.viewModel.tableTemplateOverride=e}get timeExtent(){return this.viewModel.timeExtent}set timeExtent(e){this.viewModel.timeExtent=e}get timeZone(){return this.viewModel.timeZone}set timeZone(e){this.viewModel.timeZone=e}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}get visibleColumns(){return this.viewModel.visibleColumns}get visibleElementsOverride(){const{attachmentsViewOptions:e,relatedTable:t,tableController:i,visibleElements:s}=this,{columnDescriptions:l,columnMenus:n,tooltips:o}=s,a=null!=e.objectId;if(t)return new I({columnDescriptions:l,columnMenus:n,tooltips:o,close:s.close,header:s.header,layerDropdown:s.layerDropdown,layerDropdownIcons:s.layerDropdownIcons,menu:s.menu,menuItems:s.menuItems,progress:s.progress,selectionColumn:!1,columnMenuItems:new S({sortAscending:!1,sortDescending:!1})});if(i){const e=i.relatedTable===this,t=i.allRelatedTablesVisible,r=e&&s.selectionColumn&&!t&&!a,c=e&&!t&&!a;return new I({columnDescriptions:l,columnMenus:n,tooltips:o,selectionColumn:r,close:!1,header:!1,layerDropdown:!1,menu:!1,pendingEditsFooter:!1,progress:!1,columnMenuItems:new S({sortAscending:c,sortDescending:c})})}return a?new I({columnDescriptions:l,columnMenus:n,tooltips:o,close:s.close,header:s.header,layerDropdown:s.layerDropdown,layerDropdownIcons:s.layerDropdownIcons,menu:s.menu,menuItems:s.menuItems,progress:s.progress,selectionColumn:!1,columnMenuItems:new S({sortAscending:!1,sortDescending:!1})}):null}addPendingEdits(e){this.viewModel.addPendingEdits(e)}async deleteAttachments(e,t,i){null!=e&&t?.length&&(i?this._showDeleteAttachmentPrompt(e,t):await this.viewModel.deleteAttachments(e,t))}async deleteSelection(e){this.highlightIds.length&&(e?this._showDeleteSelectionPrompt():await this.viewModel.deleteSelection())}async discardPendingEdits(e,t){return t?this._showDiscardEditsPrompt(e):this.viewModel.discardPendingEdits(e)}async downloadAttachmentById(e,t){return this.viewModel.downloadAttachmentById(e,t)}drainRelatedTables(){this.viewModel.drainRelatedTables()}async exportSelectionToCSV(e){return this.viewModel.exportSelectionToCSV(e)}findColumn(e){return this.viewModel.findColumn(e)}getFeatureStoreItemByObjectId(e){return this.viewModel.getFeatureStoreItemByObjectId(e)}goToPage(e){this.viewModel.goToPage(e)}hideAllColumns(){this.viewModel.hideAllColumns()}hideColumn(e){this.grid?.hideColumn(e)}nextPage(){this.viewModel.nextPage()}previousPage(){this.viewModel.previousPage()}async refresh(){await this.viewModel.refresh()}refreshCellContent(){this.viewModel.refreshCellContent()}async saveAttachmentsViewForm(){await this.viewModel.saveAttachmentsViewForm()}async savePendingEdits(){await this.viewModel.savePendingEdits()}showAllColumns(){this.viewModel.showAllColumns()}showColumn(e){this.grid?.showColumn(e)}sortColumn(e,t){this.viewModel.sortColumn(e,t)}scrollLeft(){this.viewModel.scrollLeft()}scrollToBottom(){this.viewModel.scrollToBottom()}scrollToIndex(e){this.viewModel.scrollToIndex(e)}scrollToRow(e){this.viewModel.scrollToRow(e)}scrollToTop(){this.viewModel.scrollToTop()}toggleColumnVisibility(e){this.viewModel.toggleColumnVisibility(e)}async zoomToSelection(){return this.effectiveTable.viewModel.zoomToSelection()}render(){const{_effectiveVisibleElements:e,isQueryingOrSyncing:t,menuConfig:i,state:s}=this;return N("div",{bind:this,class:this.classes(q.base,j.widget)},N("calcite-panel",{bind:this,class:q.content,closable:e.close,closed:this.closed,collapsed:this.collapsed,collapsible:e.collapse,description:this._effectiveDescription,disabled:this.disabled||"disabled"===s&&!this._effectiveLayers?.length,heading:e.header?this._effectiveTitle:void 0,key:"table-content",loading:"loading"===s,menuOpen:!!i?.open,overlayPositioning:"fixed",onCalcitePanelClose:()=>{this.closed=!0,this.emit("close")},onCalcitePanelToggle:e=>{this.collapsed=e.target.collapsed,this.emit("toggle")}},e.progress?N("calcite-progress",{type:t?"indeterminate":"determinate"}):null,this._showLayerDropdown?this._renderLayerDropdown():null,this._renderColumnVisibilityAction(),this._renderHeaderMenuActions(),this._renderNavigationBar(),this._renderTables(),this._renderError(),this._renderFooterContent()),this._renderColumnVisibilityPopover(),this._renderPrompt(),this._renderDialog())}_renderTables(){const{grid:e,relatedTables:t}=this,i=this.classes(q.tableContainer);if(t.length){const s=this.classes(q.base,this.allRelatedTablesVisible?q.expanded:q.collapsed,this._attachmentsViewIsVisible?q.tableContainerWithAttachments:void 0);return N("div",{class:i},N("calcite-panel",{overlayPositioning:"fixed"},N("div",null,[this._shouldShowGrid?N("div",{class:s},e?.render(),this._renderPagination()):void 0,...this._filteredTables.map(e=>{const i=t.indexOf(e);return N("div",{class:s,key:`related-${i}`},e.render())}),,])))}return null!=this.attachmentsViewOptions.objectId?N("div",{class:i},N("calcite-panel",{overlayPositioning:"fixed"},N("div",null,[N("div",{class:this.classes(q.base,q.collapsed)},e?.render(),this._renderPagination()),this._renderAttachmentsView()]))):[N("div",{class:i},e?.render()),this._renderPagination()]}_renderPagination(){if(this.paginationEnabled)return N("calcite-pagination",{pageSize:1,startItem:this.pageIndex+1,totalItems:this.pageCount,onCalcitePaginationChange:e=>{this._attachmentsDialogPreviewLoading=!1,this.goToPage(e.currentTarget.startItem-1)}})}_renderError(){const{messages:e}=this;return N("calcite-alert",{autoClose:!0,autoCloseDuration:"fast",icon:J.exclamationMarkTriangle,kind:"danger",label:e.errorOccured,open:this._hasAttachmentsViewError,slot:"alerts",topLayerDisabled:this.topLayerDisabled,onCalciteAlertClose:()=>{this.attachmentsViewOptions.error=null}},N("span",{slot:"message"},e.errorOccured))}_renderFooterContent(){if(!this.hasPendingEdits||!this._effectiveVisibleElements.pendingEditsFooter)return;const{hasInvalidPendingEdits:e,isQueryingOrSyncing:t,messages:i,messagesCommon:s}=this,l=e||t,n=this.hasContingentValues,o=[N("calcite-button",{appearance:"outline",disabled:t,iconStart:J.reset,key:"footer-reset-button",onclick:()=>{this.discardPendingEdits()},slot:"footer-end",width:"auto"},s.reset),N("calcite-button",{disabled:l,iconStart:J.save,key:"footer-save-button",loading:this.isSyncing,onclick:()=>{this.savePendingEdits()},slot:"footer-end",width:"auto"},s.save)];if(n){const t=e?i.contingentValues.hasInvalidValues:i.contingentValues.hasValidValues,s=e?J.exclamationMarkTriangle:J.checkCircle,l=e?q.footerIconDanger:q.footerIconSuccess;o.push(N("div",{class:q.footerMessage,key:"footer-message",slot:"footer-start"},N("calcite-icon",{class:l,icon:s,scale:"s",slot:"footer-start"}),t))}return o}_renderPrompt(){return this.prompt?N(E,{...this.prompt,headingLevel:2}):void 0}_showDeleteSelectionPrompt(){const{messages:e,messagesCommon:i}=this,s=t(e.deleteSelectionCount,{count:this.highlightIds.length});this.showPrompt({title:s,message:e.deleteRecordsRemoved,context:"danger",actions:{primary:{label:i.delete,action:async()=>{try{await this.viewModel.deleteSelection()}finally{this.clearPrompt()}}},secondary:{label:e.keepRecords,action:()=>this.clearPrompt()}}})}_showDeleteAttachmentPrompt(e,i){const{messages:s,messagesCommon:l}=this,n=t(s.deleteAttachmentCount,{count:i.length});this.showPrompt({title:n,message:s.deleteAttachmentConfirmation,context:"danger",actions:{primary:{label:l.delete,action:async()=>{try{await this.deleteAttachments(e,i,!1)}finally{this.clearPrompt()}}},secondary:{label:l.cancel,action:()=>this.clearPrompt()}}})}async _showDiscardEditsPrompt(e){const t=Promise.withResolvers(),{messagesEditor:i}=this;return this.showPrompt({title:i.cancelEditTitle,message:i.cancelEditWarningMessage,context:"danger",actions:{primary:{label:i.discardEdits,action:async()=>{try{await this.discardPendingEdits(e)}finally{t.resolve(!0)}}},secondary:{label:i.continueEditing,action:()=>t.resolve(!1)}}}),t.promise.finally(()=>this.clearPrompt())}_onTableViewChange(e){this.hasPendingEdits?this._showDiscardEditsPrompt().then(t=>t&&e()):e()}_resetNestedViews(){this.relatedTable&&this.drainRelatedTables(),this.effectiveTable.attachmentsViewOptions.objectId=null}_renderDialog(){const{attachmentsViewOptions:e,messages:t}=this,{objectId:i}=e;return N("calcite-dialog",{class:q.dialog,description:this.viewModel.getFeatureTitleSync(i),heading:t.attachments,modal:!0,open:this._dialogIsOpen,placement:"cover",width:"l",onCalciteDialogClose:()=>this._onDialogClose()},this._renderDialogContent())}_renderDialogContent(){const e=this.attachmentsViewOptions.dialogInfo;if(e)return this._renderAttachmentsDialogContent(e)}_renderAttachmentsDialogContent(e){const{attachmentsViewOptions:t,messages:i}=this,{attachmentInfos:s}=t,l=s.indexOf(e);return N(H,null,N("div",{class:q.dialogHeader,key:"header",slot:"content-top"},N("span",null,e.name),N("calcite-button",{appearance:"outline",onclick:()=>{t.attachmentId=e.id,t.dialogId=null}},i.viewDetails)),N("calcite-progress",{type:this._attachmentsDialogPreviewLoading?"indeterminate":"determinate"}),N("div",{class:q.dialogContent,key:"content"},this._renderAttachmentsViewDetailsImage(e)),N("calcite-pagination",{pageSize:1,slot:"footer",startItem:l+1,totalItems:s.length,onCalcitePaginationChange:e=>{const i=e.currentTarget.startItem-1,l=s[i]?.id;t.dialogId=l}}))}_onDialogClose(){const e=this.attachmentsViewOptions;null!=e.dialogId&&(e.dialogId=null),this._attachmentsDialogPreviewLoading=!1}_renderHeaderMenuAction(e){const{disabled:t,hidden:i,icon:s,text:l,clickFunction:n}=e;if(!i)return N("calcite-action",{disabled:t??this.menuConfig?.disabled,icon:s??void 0,key:l,onclick:()=>n(),slot:"header-menu-actions",text:l,textEnabled:!0,title:l})}_renderHeaderMenuActions(){return this._shouldShowMenu?[this._renderDefaultHeaderMenuActions(),this._renderCustomHeaderMenuActions()]:[]}_renderDefaultHeaderMenuActions(){if(!this._hasDefaultMenuItems)return[];const{messages:e}=this;return[this._showRefreshDataAction&&{icon:J.refresh,text:e.refreshData,clickFunction:()=>this.refresh()},this._showDeleteSelectionAction&&{icon:J.delete,text:e.deleteSelection,clickFunction:()=>this.deleteSelection(!0)},this._showClearSelectionAction&&{icon:J.clearSelection,text:e.clearSelection,clickFunction:()=>this.highlightIds?.removeAll()},this._showZoomToSelectionAction&&{icon:J.zoomToSelection,text:e.zoomToSelection,clickFunction:()=>this.zoomToSelection()},this._showSelectedRecordsShowSelectedAction&&{icon:J.showSelected,text:e.showSelected,clickFunction:()=>{const{objectIds:e}=this;e.removeAll(),e.addMany(this.highlightIds.toArray())}},this._showSelectedRecordsShowAllAction&&{icon:J.showAll,text:e.showAllRecords,clickFunction:()=>this.objectIds.removeAll()},this._showExportSelectionToCSVAction&&{icon:J.exportToCSV,text:e.exportSelectionCSV,clickFunction:()=>this.exportSelectionToCSV()}].filter(i).map(e=>e&&this._renderHeaderMenuAction(e))}_renderCustomHeaderMenuActions(){return this.menuConfig?.items?.map(({disabled:e,hidden:t,icon:i,label:s,clickFunction:l})=>this._renderHeaderMenuAction({hidden:"function"==typeof t?t():t,icon:i,text:s,disabled:"function"==typeof e?e():e,clickFunction:e=>l(e)}))??[]}_renderColumnVisibilityAction(){if(!this._showColumnVisibilityAction)return[];const{_columnVisibilityActions:e,id:t}=this,i=this.messages.menuText.columnVisibility;return N("calcite-action",{afterCreate:i=>e.set(t,i),afterRemoved:()=>e.delete(t),bind:this,disabled:this._columnVisibilityActionDisabled,icon:J.showColumn,id:`${t}__toggle-columns-action`,slot:"header-actions-end",text:i},this._effectiveVisibleElements.tooltips?N("calcite-tooltip",{closeOnClick:!0,overlayPositioning:"fixed",placement:"bottom-end",referenceElement:e.get(t),topLayerDisabled:this.topLayerDisabled},i):null)}_renderColumnVisibilityPopover(){if(!this._showColumnVisibilityAction||this._columnVisibilityActionDisabled)return;const e=this.visibleElements.columnVisibilityMenuItems.header,t=this.messages.menuText.columnVisibility;return N("calcite-popover",{autoClose:!0,class:q.menuPopover,closable:e,heading:e?t:void 0,label:t,overlayPositioning:"fixed",referenceElement:this._columnVisibilityActions.get(this.id),topLayerDisabled:this.topLayerDisabled},this._renderColumnVisibilityList())}_renderColumnVisibilityList(){const{effectiveTable:e,messages:{menuText:t}}=this;if(0!==e.columns.length)return N("calcite-list",{afterCreate:B,afterRemoved:Z.bind(this),afterUpdate:B,bind:this,"data-node-ref":"_columnVisibilityList",displayMode:"nested",filterEnabled:this.visibleElements.columnVisibilityMenuItems.filter,filterPlaceholder:t.searchFields,label:t.fieldVisibility,selectionMode:"multiple",onCalciteListFilter:()=>this.scheduleRender()},this._renderColumnToggleAll(),e.columns.toArray().map(t=>{const i=D(t)?t.columns?.map(t=>this._renderColumnListItem({column:t,table:e,ignoreSelect:!0})):void 0;return this._renderColumnListItem({column:t,table:e,items:i})}),N("calcite-notice",{appearance:"transparent",kind:"neutral",open:!0,slot:"filter-no-results"},N("div",{slot:"message"},t.noMatchesFound)))}_renderColumnToggleAll(){if(!this.visibleElements.columnVisibilityMenuItems.toggleAll)return;const{_columnVisibilityList:e}=this;return e&&e.filteredItems?.length?N("calcite-button",{appearance:"transparent",onclick:()=>this._toggleAllColumns(),width:"full"},this._getColumnToggleAllText()):void 0}_getColumnToggleAllText(){const{_columnVisibilityList:e,effectiveTable:t,messages:{menuText:i}}=this;return e?""===e.filterText?t.allColumnsVisible?i.deselectAll:i.selectAll:this._allColumnsAreVisible(e.filteredItems.map(e=>e.value))?i.deselectAll:i.selectAll:""}_renderColumnListItem(e){const{column:t,table:i,items:s,ignoreSelect:l}=e,{effectiveLabel:n,fieldName:o,hidden:a}=t;return N("calcite-list-item",{expanded:!(!s?.length||a)||void 0,key:`toggle-columns__item-${o}`,label:n,metadata:{description:t.effectiveDescription,type:R(t)?t.field.type:void 0},selected:!a,value:o,onCalciteListItemSelect:e=>{l&&e.stopPropagation(),i.toggleColumnVisibility(e.currentTarget.value)}},s)}_renderLayerDropdown(){const e=this.messages.selectALayer;return N("div",{class:q.layerDropdownMenu,key:`${this.id}-layerDropdown`,slot:"header-actions-start"},N("calcite-dropdown",{bind:this,maxItems:5,overlayPositioning:"fixed",placement:"bottom-start",topLayerDisabled:this.topLayerDisabled},N("calcite-action",{icon:J.layers,slot:"trigger",text:e,title:e}),N("calcite-dropdown-group",{selectionMode:"single"},this._effectiveLayers.map((e,t)=>this._renderLayerDropdownItem(e,t))??null)))}_renderLayerDropdownItem(e,t){const i=this.visibleElements.layerDropdownIcons;return N("calcite-dropdown-item",{iconStart:i?z(e):void 0,key:`dropdown-item-${t}`,label:e.title??"",selected:e===this.layer,value:e.id,onCalciteDropdownItemSelect:()=>this._onTableViewChange(()=>this.layer=e)},e.title)}_onRelatedNavigationItemClick(e){this.viewModel.drainRelatedTablesAboveIndex(e)}_collapseRelatedTable(e){this.viewModel.collapseRelatedTable(this.effectiveTable,e)}_onShowRelatedTable(e){this.showRelatedTableCallback||this.hasPendingEdits||(this._collapseRelatedTable(e),this._createRelatedTable(e))}async _createRelatedTable(e){const{autoRefreshEnabled:t,autoSaveEnabled:i,editingEnabled:s,effectiveTable:l,multipleSelectionEnabled:n,paginationEnabled:o,pageSize:a,view:r,viewModel:c}=this,{layer:d,objectId:h,relatedLayer:m,relationshipId:p}=e;await d.load();const u=this.attachmentsEnabled&&L(d),g=new G({layer:d,autoRefreshEnabled:t,autoSaveEnabled:i,attachmentsEnabled:u,editingEnabled:s,multipleSelectionEnabled:n,paginationEnabled:o,pageSize:a,relatedRecordsEnabled:!0,relationshipConfig:{objectId:h,relatedLayer:m,relationshipId:p},relationshipColumnConfigs:O(d,p),tableController:this,tableParent:l,view:r,showRelatedTableCallback:e=>c.emit("show-related-table",e)});this.relatedTables.add(g),this.scheduleRender()}_renderAttachmentsView(){switch(this.attachmentsViewOptions.effectiveMode){case"list":return this._renderAttachmentsViewList();case"details":return this._renderAttachmentsViewDetails();case"file":return this._renderAttachmentsViewFile()}}_renderAttachmentsViewFile(){const e=this.attachmentsViewOptions,{objectId:t}=e;if(null!=t)return[N("div",{class:q.attachmentsView,key:"attachments-view"},this._renderAttachmentsViewInformation(),N("div",{class:q.attachmentsViewContent,key:"attachments-view-content"},N("div",{bind:this,class:q.attachmentsViewDropArea,ondragover:e=>e.preventDefault(),ondrop:this._onAttachmentsViewDrop},N("calcite-icon",{class:q.attachmentsViewIcon,icon:J.upload,scale:"l"}),this._renderAttachmentsViewFileLabelNode(),this._renderAttachmentsViewFileMessageNode(),N("form",{afterCreate:t=>e.form=t,afterRemoved:()=>e.form=null,bind:this,key:"attachments-form"},N("fieldset",null,this._renderAttachmentsViewFileNameNode(),N("input",{afterCreate:B,afterRemoved:Z,afterUpdate:B,bind:this,"data-node-ref":"_attachmentsInput",files:e.candidates,hidden:!0,name:"attachment",onchange:e=>this._onAttachmentsViewCandidateChange(e),type:"file"}),this._renderAttachmentsViewFileSelectNode(),this._renderAttachmentsViewFileSaveNode(),this._renderAttachmentsViewFileCancelNode())))))]}_renderAttachmentsViewFileLabelNode(){if("replace"===this.attachmentsViewOptions.fileMode)return N("span",{class:q.attachmentsViewDropAreaLabel,key:"replace-file-node"},this.messages.replaceFile)}_renderAttachmentsViewFileMessageNode(){const e=this.attachmentsViewOptions;if(e.hasCandidates)return;const{messages:t}=this,i=this.supportsAddAttachments?null==e.objectId?t.noFeature:t.dragAndDropToUpload:t.editingRestricted;return N("span",{class:q.attachmentsViewDropAreaMessage,key:"message-node"},i)}_renderAttachmentsViewFileNameNode(){const e=this.attachmentsViewOptions.candidates,t=Array.from(e??[]).at(-1);if(t)return N("span",{class:q.attachmentsViewDropAreaMessage,key:"filename-node"},t.name)}_renderAttachmentsViewFileSelectNode(){if(this.supportsAddAttachments)return N("calcite-button",{appearance:"outline-fill",disabled:this.isSyncingAttachments,iconStart:J.folderOpen,key:"select-node",onclick:()=>{this._resetAttachmentsInput(),this._attachmentsInput?.click()}},this.messages.selectFile)}_renderAttachmentsViewFileSaveNode(){const{isSyncingAttachments:e,messages:t}=this,{attachmentInfo:i,hasCandidates:s}=this.attachmentsViewOptions;if(this.supportsAddAttachments&&s)return N("calcite-button",{appearance:"solid",disabled:e,iconStart:J.save,key:"save-node",loading:e,onclick:()=>{this.saveAttachmentsViewForm()}},i?t.updateAttachment:t.addAttachment)}_renderAttachmentsViewFileCancelNode(){const{hasAttachments:e,hasCandidates:t}=this.attachmentsViewOptions;if(e||t)return N("calcite-button",{appearance:"transparent",bind:this,disabled:this.isSyncingAttachments,key:"cancel-node",onclick:()=>{this._resetAttachmentsInput(),this.attachmentsViewOptions.cancel()}},this.messagesCommon.cancel)}_renderAttachmentsViewDetails(){const{attachmentInfo:e}=this.attachmentsViewOptions;if(e)return[N("div",{class:q.attachmentsView,key:"attachments-view"},this._renderAttachmentsViewInformation(),N("div",{class:q.attachmentsViewContent,key:"attachments-view-content"},N("div",{class:q.attachmentsViewDetails},this._renderAttachmentsViewDetailsPreview(e))))]}_renderAttachmentsViewDetailsPreview(e){const t=[this._renderAttachmentsViewDetailsImage(e)];if(M(e.contentType)){const i=this.messages.maximize;t.push(N("calcite-action",{icon:J.expand,label:i,onclick:t=>{t.preventDefault(),this.attachmentsViewOptions.dialogId=e.id},text:i,textEnabled:!0,title:i}))}return t}_renderAttachmentsViewDetailsImage(e){const{contentType:t,name:i,size:s,url:l}=e,{messages:n}=this;return M(t)?N("img",{afterCreate:()=>this._attachmentsDialogPreviewLoading=!0,alt:i,key:`thumbnail-image-${i}`,onerror:()=>this._attachmentsDialogPreviewLoading=!1,onload:()=>this._attachmentsDialogPreviewLoading=!1,src:`${l}${l?.includes("?")?"&":"?"}s=${s}`,title:i}):[N("calcite-icon",{icon:V(t),key:`thumbnail-icon-${i}`,scale:"l",textLabel:i,title:i}),n.noPreviewAvailable]}_renderAttachmentsViewInformation(){const{attachmentsViewOptions:e,messages:t,messagesUnits:i}=this,{attachmentInfo:s,objectId:l}=e;if(s&&null!=l)return N("div",{class:q.attachmentsViewInformation,key:"information"},this._renderAttachmentViewInformationButtons(s,l),N("span",{class:q.attachmentsViewInformationLabel,key:"file-label"},t.fileName),N("span",{class:q.attachmentsViewInformationData,key:"file-value"},s.name),N("span",{class:q.attachmentsViewInformationLabel,key:"type-label"},t.attachmentType),N("span",{class:q.attachmentsViewInformationData,key:"type-value"},this._getLabelForAttachmentType(s)),this._renderAttachmentKeywordDetails(s),N("span",{class:q.attachmentsViewInformationLabel,key:"size-label"},t.size),N("span",{class:q.attachmentsViewInformationData,key:"size-span"},h(i,s.size??0)))}_renderAttachmentViewInformationButtons(e,t){const{attachmentsViewOptions:i,messages:s,messagesCommon:l}=this,n="details"!==i.effectiveMode,o=e.id,a=[N("calcite-button",{appearance:"outline",disabled:n,key:"download-button",onclick:e=>{e.preventDefault(),this.downloadAttachmentById(t,o)},width:"full"},s.download)];return this.supportsUpdateAttachments&&a.push(N("calcite-button",{appearance:"outline",disabled:n,key:"replace-button",onclick:()=>{i.mode="file",i.attachmentId=o},width:"full"},s.replace)),this.supportsDeleteAttachments&&a.push(N("calcite-button",{appearance:"outline",disabled:n,key:"delete-button",onclick:()=>{this.deleteAttachments(t,[o],!0)},width:"full"},l.delete)),a}_renderAttachmentKeywordDetails({keywords:e}){if(e&&""!==e)return[N("span",{class:q.attachmentsViewInformationLabel,key:"keyword-label"},this.messages.keyword),N("span",{class:q.attachmentsViewInformationData,key:"keyword-value"},e)]}_renderAttachmentsViewList(){const{attachmentsViewOptions:e,isSyncingAttachments:t,messages:i,messagesUnits:s}=this,{attachmentInfos:l,objectId:n}=e;return N("calcite-list",{afterCreate:B,afterRemoved:Z,afterUpdate:B,bind:this,class:q.attachmentsViewList,"data-node-ref":"attachmentsList",key:`attachments-list-${n}`,label:i?.attachments,loading:t,ondragover:e=>e.preventDefault(),ondrop:this._onAttachmentsViewDrop,selectionMode:this.supportsDeleteAttachments?"multiple":"none",onCalciteListChange:()=>this.scheduleRender()},...l?.map(t=>{const{id:l,name:o,size:a}=t,r=h(s,a??0);return N("calcite-list-item",{afterRemoved:()=>this.scheduleRender(),key:`attachment-${l}`,label:o,value:l},this._renderAttachmentsViewListPreview(t),N("span",{class:q.attachmentsViewListFileSize,slot:"actions-end",title:r},r),N("calcite-action",{icon:J.downloadTo,key:"download",label:o,onclick:e=>{e.preventDefault(),this.downloadAttachmentById(n??-1,l)},slot:"actions-end",text:i.downloadAttachment,title:i.downloadAttachment}),N("calcite-action",{icon:J.chevronRight,iconFlipRtl:!0,key:"details",label:o,onclick:()=>{e.mode="details",e.attachmentId=l},slot:"actions-end",text:i.viewAttachment,title:i.viewAttachment}))}))}_renderAttachmentsViewListPreview(e){return N("div",{class:q.attachmentsViewListThumbnail,slot:"content-start"},N("span",null,this._renderAttachmentsViewListImage(e)))}_renderAttachmentsViewListImage(e,t=64){const{contentType:i,name:s,size:l,url:n}=e,o=`${n}${n?.includes("?")?"&":"?"}w=${t}&s=${l}`;return this.supportsResizeAttachments&&M(i)?N("img",{alt:s,key:`thumbnail-image-${s}`,src:o,title:s}):N("calcite-icon",{icon:V(i),key:`thumbnail-icon-${s}`,scale:"l",textLabel:s,title:s})}_onAttachmentsViewCandidateChange({target:e}){this.attachmentsViewOptions.candidates=e?.files}_onAttachmentsViewDrop(e){e.preventDefault(),(this.supportsAddAttachments||this.supportsUpdateAttachments)&&(this.attachmentsViewOptions.mode="file",this.attachmentsViewOptions.candidates=e.dataTransfer?.files)}_resetAttachmentsInput(){this._attachmentsInput&&(this._attachmentsInput.value="")}_getLabelForAttachmentType({contentType:e}){const t=this.messages,i=C(e);return t.attachmentTypes[i]}_renderNavigationBar(){const{effectiveTable:e,messages:i,messagesCommon:s,navigationScale:l,relatedTable:n,relatedTables:o}=this;if(!this._shouldShowNavigationBar)return;const{attachmentsList:a,attachmentsViewOptions:r,layer:c,supportsAddAttachments:d,supportsDeleteAttachments:h}=e;if(!c)return;const{attachmentInfos:m,objectId:p}=r,u=null!=p,g=m.length,w=a?.selectedItems?.length??0,b=`${c.objectIdField}: ${p}`,v=t(i.selectedCount,{count:w}),y=t(i.attachmentsCount,{count:g}),f=u?N("calcite-action",{bind:this,icon:J.chevronRight,iconFlipRtl:!0,key:"navigation-feature",onclick:()=>e.scrollToRow(p),scale:l,text:b,textEnabled:!0,title:b}):void 0,_=u?N("calcite-action",{icon:J.chevronRight,iconFlipRtl:!0,key:"navigation-attachments-label",label:y,onclick:()=>{g>0&&(r.mode="list")},scale:l,text:y,textEnabled:!0,title:y}):void 0,M=u?N("calcite-chip",{closable:!0,closed:0===w,key:"navigation-chip",kind:"inverse",label:v,scale:"s",selected:!0,title:v,value:"selected",onCalciteChipClose:()=>a?.selectedItems?.forEach(e=>e.selected=!1)},v):void 0,V=n?N("calcite-label",{layout:"inline",scale:l},i.showAllTables,N("calcite-switch",{checked:this.allRelatedTablesVisible,scale:l,onCalciteSwitchChange:e=>this.showAllRelatedTables=!!e.currentTarget.checked})):void 0,C=u&&"list"===r.effectiveMode&&null!=p&&w&&h?N("calcite-action",{icon:J.delete,iconFlipRtl:!0,key:"attachments-trash-all",onclick:()=>{e.deleteAttachments(p,a?.selectedItems?.map(e=>e.value)??[],!0)},scale:l,text:s.delete,textEnabled:!0,title:t(i.deleteAttachmentCount,{count:w})}):void 0,A=u&&"list"===r.effectiveMode&&d?N("calcite-action",{bind:this,icon:J.plus,iconFlipRtl:!0,key:"attachments-add",onclick:()=>{r.objectId=p,r.attachmentId=null,r.mode="file"},scale:l,text:i.addAttachment,textEnabled:!0,title:i.addAttachment}):void 0;return N("div",{class:q.tableNavigation,key:"table-nav"},N("calcite-action",{icon:J.moveUp,iconFlipRtl:!0,key:"go-back",onclick:()=>this._onTableViewChange(this._resetNestedViews),scale:l,text:this.layer?.title??"",textEnabled:!1,title:n?i.exitRelatedRecords:i.exitAttachments}),o.toArray().map((e,t)=>this._renderRelatedTableNavigationAction(e,t)),f,_,N("div",null,M,V,C,A))}_renderRelatedTableNavigationAction(e,t){const i=this._getLabelForRelatedTableNavigationAction(e);return N("calcite-action",{icon:J.chevronRight,iconFlipRtl:!0,key:t,onclick:()=>{(t!==this.relatedTables.length-1||this._attachmentsViewIsVisible)&&this._onTableViewChange(()=>this._onRelatedNavigationItemClick(t))},scale:this.navigationScale,text:i,textEnabled:!0,title:e.layer?.title||""})}_getLabelForRelatedTableNavigationAction(e){const t=e.layer?.title;if(!t)return"";const{relatedTables:i}=this;if(i.length<=1)return t;return i.indexOf(e)!==i.length-1&&t.length>20?`${t.slice(0,20)}...`:t}_allColumnsAreVisible(e){return e.every(e=>!1===this.findColumn(e)?.hidden)}_toggleAllColumns(){const{_columnVisibilityList:e,effectiveTable:t}=this,i=e?.filteredItems.map(e=>e.value);""!==e?.filterText&&i?.length?this._allColumnsAreVisible(i)?i.forEach(e=>this.hideColumn(e)):i.forEach(e=>this.showColumn(e)):t.allColumnsVisible?t.hideAllColumns():t.showAllColumns()}};e([m()],X.prototype,"_attachmentsDialogPreviewLoading",void 0),e([m()],X.prototype,"_attachmentsInput",void 0),e([m()],X.prototype,"_attachmentsViewIsVisible",null),e([m()],X.prototype,"_columnVisibilityActions",void 0),e([m()],X.prototype,"_columnVisibilityActionDisabled",null),e([m()],X.prototype,"_columnVisibilityList",void 0),e([m()],X.prototype,"_dialogIsOpen",null),e([m()],X.prototype,"_effectiveDescription",null),e([m()],X.prototype,"_effectiveLayers",null),e([m()],X.prototype,"_effectiveTitle",null),e([m()],X.prototype,"_effectiveVisibleElements",null),e([m()],X.prototype,"_filteredTables",null),e([m()],X.prototype,"_hasAttachmentsViewError",null),e([m()],X.prototype,"_hasCustomMenuItems",null),e([m()],X.prototype,"_hasDefaultMenuItems",null),e([m()],X.prototype,"_shouldShowGrid",null),e([m()],X.prototype,"_shouldShowMenu",null),e([m()],X.prototype,"_showClearSelectionAction",null),e([m()],X.prototype,"_showColumnVisibilityAction",null),e([m()],X.prototype,"_showDeleteSelectionAction",null),e([m()],X.prototype,"_showExportSelectionToCSVAction",null),e([m()],X.prototype,"_showLayerDropdown",null),e([m()],X.prototype,"_shouldShowNavigationBar",null),e([m()],X.prototype,"_showRefreshDataAction",null),e([m()],X.prototype,"_showSelectedRecordsShowSelectedAction",null),e([m()],X.prototype,"_showSelectedRecordsShowAllAction",null),e([m()],X.prototype,"_showZoomToSelectionAction",null),e([m()],X.prototype,"_viewLayers",null),e([m()],X.prototype,"attachmentsList",void 0),e([m({readOnly:!0})],X.prototype,"grid",null),e([m()],X.prototype,"actionColumn",null),e([m()],X.prototype,"actionColumnConfig",null),e([m({readOnly:!0})],X.prototype,"activeFilters",null),e([m({readOnly:!0})],X.prototype,"activeSortOrders",null),e([m()],X.prototype,"allColumns",null),e([m()],X.prototype,"allColumnsVisible",null),e([m({readOnly:!0})],X.prototype,"allRelatedTablesVisible",null),e([m()],X.prototype,"allVisibleColumns",null),e([m()],X.prototype,"attachmentsColumns",null),e([m()],X.prototype,"attachmentsEnabled",null),e([m()],X.prototype,"attachmentsViewOptions",null),e([m({type:y})],X.prototype,"attributeTableTemplate",null),e([m()],X.prototype,"autoRefreshEnabled",null),e([m()],X.prototype,"autoSaveEnabled",null),e([m()],X.prototype,"canAddRelatedFeature",null),e([m()],X.prototype,"clearPrompt",null),e([m()],X.prototype,"closed",void 0),e([m()],X.prototype,"collapsed",void 0),e([m()],X.prototype,"columnPerformanceModeEnabled",null),e([m()],X.prototype,"columnReorderingEnabled",null),e([m({readOnly:!0})],X.prototype,"columns",null),e([m()],X.prototype,"defaultSelectionManager",null),e([m()],X.prototype,"definitionExpression",null),e([m()],X.prototype,"description",void 0),e([m()],X.prototype,"disabled",void 0),e([m()],X.prototype,"editingEnabled",null),e([m()],X.prototype,"effectiveSelectionManager",null),e([m()],X.prototype,"effectiveSize",null),e([m()],X.prototype,"effectiveTable",null),e([m()],X.prototype,"fieldColumns",null),e([m({types:u})],X.prototype,"filterGeometry",null),e([m()],X.prototype,"filterBySelectionEnabled",null),e([m()],X.prototype,"filterByViewExtent",null),e([m()],X.prototype,"groupColumns",null),e([m()],X.prototype,"hasContingentValues",null),e([m()],X.prototype,"hasInvalidPendingEdits",null),e([m()],X.prototype,"hasPendingEdits",null),e([m()],X.prototype,"hiddenFields",null),e([m()],X.prototype,"highlightEnabled",null),e([m()],X.prototype,"highlightIds",null),e([m()],X.prototype,"icon",null),e([m()],X.prototype,"initialSize",null),e([m()],X.prototype,"isQueryingOrSyncing",null),e([m()],X.prototype,"isSyncing",null),e([m()],X.prototype,"isSyncingAttachments",null),e([m()],X.prototype,"label",null),e([m()],X.prototype,"layer",null),e([m()],X.prototype,"layers",null),e([m()],X.prototype,"layerView",null),e([m()],X.prototype,"maxSize",null),e([m(),$("esri/widgets/FeatureTable/t9n/FeatureTable")],X.prototype,"messages",null),e([m(),$("esri/t9n/common")],X.prototype,"messagesCommon",null),e([m(),$("esri/widgets/Editor/t9n/Editor")],X.prototype,"messagesEditor",void 0),e([m(),$("esri/core/t9n/Units")],X.prototype,"messagesUnits",null),e([m(),$("esri/widgets/support/t9n/uriUtils")],X.prototype,"messagesURIUtils",null),e([m()],X.prototype,"menuConfig",null),e([m()],X.prototype,"multipleSelectionEnabled",null),e([m()],X.prototype,"multipleSelectionEnabledOverride",null),e([m()],X.prototype,"multiSortEnabled",null),e([m()],X.prototype,"multipleSortPriority",null),e([m()],X.prototype,"navigationScale",void 0),e([m()],X.prototype,"noDataMessage",null),e([m()],X.prototype,"objectIds",null),e([m()],X.prototype,"outFields",null),e([m()],X.prototype,"pageCount",null),e([m()],X.prototype,"pageIndex",null),e([m()],X.prototype,"pageSize",null),e([m()],X.prototype,"paginationEnabled",null),e([m()],X.prototype,"pendingEditsCount",null),e([m()],X.prototype,"prompt",null),e([m()],X.prototype,"relatedRecordsEnabled",null),e([m()],X.prototype,"relatedTable",null),e([m()],X.prototype,"relatedTableHasContingentValues",null),e([m()],X.prototype,"relatedTableHasInvalidPendingEdits",null),e([m()],X.prototype,"relatedTableHasPendingEdits",null),e([m()],X.prototype,"relatedTables",null),e([m()],X.prototype,"relationship",null),e([m()],X.prototype,"relationshipColumnConfigs",null),e([m()],X.prototype,"relationshipColumns",null),e([m()],X.prototype,"relationshipConfig",null),e([m()],X.prototype,"relationshipInfos",null),e([m()],X.prototype,"returnGeometryEnabled",null),e([m()],X.prototype,"returnMEnabled",null),e([m()],X.prototype,"returnZEnabled",null),e([m()],X.prototype,"rowHighlightIds",null),e([m()],X.prototype,"selectionManager",null),e([m()],X.prototype,"selectionSource",null),e([m()],X.prototype,"showAllRelatedTables",null),e([m()],X.prototype,"showPrompt",null),e([m()],X.prototype,"showRelatedTableCallback",null),e([m()],X.prototype,"size",null),e([m({readOnly:!0})],X.prototype,"state",null),e([m()],X.prototype,"supportsAddAttachments",null),e([m()],X.prototype,"supportsAttachments",null),e([m()],X.prototype,"supportsDeleteAttachments",null),e([m()],X.prototype,"supportsResizeAttachments",null),e([m()],X.prototype,"supportsUpdateAttachments",null),e([m()],X.prototype,"syncTemplateOnChangesEnabled",null),e([m()],X.prototype,"syncViewSelection",null),e([m()],X.prototype,"syncWithViewSelectionManager",null),e([m({constructOnly:!0})],X.prototype,"tableController",null),e([m({constructOnly:!0})],X.prototype,"tableParent",null),e([m({type:P})],X.prototype,"tableTemplate",null),e([m()],X.prototype,"tableTemplateOverride",null),e([m()],X.prototype,"title",void 0),e([m({type:f})],X.prototype,"timeExtent",null),e([m()],X.prototype,"timeZone",null),e([m()],X.prototype,"view",null),e([m({type:T}),U(["cell-click","cell-dblclick","cell-pointerover","cell-pointerout","cell-keydown","column-reorder","show-related-table"])],X.prototype,"viewModel",void 0),e([m()],X.prototype,"visibleColumns",null),e([m({type:I,nonNullable:!0})],X.prototype,"visibleElements",void 0),e([m({type:I})],X.prototype,"visibleElementsOverride",null),X=G=e([p("esri.widgets.FeatureTable")],X);const Y=X;export{Y as default};
@@ -14,8 +14,11 @@ import type SnappingOptions from "../../views/interactive/snapping/SnappingOptio
14
14
  import type { EventedAccessor } from "../../core/Evented.js";
15
15
  import type { TextSymbolProperties } from "../../symbols/TextSymbol.js";
16
16
  import type { MapViewOrSceneView } from "../../views/MapViewOrSceneView.js";
17
+ import type { DrawTool } from "../../views/draw/DrawTool.js";
18
+ import type { PluginConfiguration } from "../../views/draw/support/types.js";
17
19
  import type { SnappingOptionsProperties } from "../../views/interactive/snapping/SnappingOptions.js";
18
20
  import type { CreateEvent, CreateOptions, CreateTool, CreationMode, DeleteEvent, RedoEvent, SketchPointSymbol, SketchPolygonSymbol, SketchPolylineSymbol, SketchTool, State, UpdateEvent, UpdateOptions, UndoEvent } from "./types.js";
21
+ import type { PluginManager } from "./support/PluginManager.js";
19
22
  import type { CIMSymbolProperties } from "../../symbols/CIMSymbol.js";
20
23
  import type { SimpleFillSymbolProperties } from "../../symbols/SimpleFillSymbol.js";
21
24
  import type { SketchLabelOptionsProperties } from "../../views/interactive/sketch/SketchLabelOptions.js";
@@ -29,7 +32,7 @@ import type { SimpleLineSymbolProperties } from "../../symbols/SimpleLineSymbol.
29
32
  import type { SketchTooltipOptionsProperties } from "../../views/interactive/sketch/SketchTooltipOptions.js";
30
33
  import type { SketchValueOptionsProperties } from "../../views/interactive/sketch/SketchValueOptions.js";
31
34
 
32
- export interface SketchViewModelProperties extends Partial<Pick<SketchViewModel, "creationMode" | "layer" | "updateOnGraphicClick" | "useLegacyCreateTools" | "view">> {
35
+ export interface SketchViewModelProperties extends Partial<Pick<SketchViewModel, "creationMode" | "layer" | "rootPlugins" | "updateOnGraphicClick" | "useLegacyCreateTools" | "view">> {
33
36
  /**
34
37
  * The [SimpleFillSymbol](https://developers.arcgis.com/javascript/latest/references/core/symbols/SimpleFillSymbol/) displayed when actively creating a new `polygon` graphic using the [polygon](https://developers.arcgis.com/javascript/latest/references/core/widgets/Sketch/SketchViewModel/#activeTool) tool.
35
38
  *
@@ -641,10 +644,30 @@ export default class SketchViewModel extends EventedAccessor {
641
644
  */
642
645
  get defaultUpdateOptions(): UpdateOptions;
643
646
  set defaultUpdateOptions(value: Partial<UpdateOptions>);
647
+ /**
648
+ * The active tool instance when DrawTool is in use.
649
+ *
650
+ * @internal
651
+ */
652
+ get drawTool(): DrawTool | null | undefined;
653
+ /**
654
+ * Gets available plugins given the active plugins.
655
+ * If the parent of the leaf plugin supports multiple downstream plugin options,
656
+ * those are returned. Otherwise, the root plugins are returned.
657
+ *
658
+ * @internal
659
+ */
660
+ get effectiveAvailablePlugins(): PluginConfiguration[] | null | undefined;
661
+ /**
662
+ * The first plugin in the active Draw 2.0 stack whose downstream leaf can be swapped.
663
+ *
664
+ * @internal
665
+ */
666
+ get firstPluginWithSwappableLeaf(): PluginConfiguration | null | undefined;
644
667
  /**
645
668
  * Indicates whether an asynchronous geometry simplification operation is in progress.
646
669
  *
647
- * Starting new operations (update, create) are blocked when this is true. Call
670
+ * Starting new operations (update, create) should be blocked when this is true. Call
648
671
  * `cancel` to cancel the long-running operation.
649
672
  *
650
673
  * @since 5.1
@@ -680,6 +703,24 @@ export default class SketchViewModel extends EventedAccessor {
680
703
  * @since 4.6
681
704
  */
682
705
  accessor layer: GraphicsLayer | MapNotesLayer | null | undefined;
706
+ /**
707
+ * True if DrawTool is using multiple plugins in a stack.
708
+ *
709
+ * This is typically true for drawing scenarios like polyline
710
+ * and polygon, and false if Draw 2.0 is not active or a
711
+ * very simple plugin like point is active.
712
+ *
713
+ * @internal
714
+ */
715
+ get multiplePluginsActive(): boolean;
716
+ /**
717
+ * PluginManager manages the available DrawTool plugins on behalf of SketchViewModel,
718
+ * and provides utilities for translating from Draw 1.0/CreateTool based
719
+ * configuration to Draw 2.0 Plugin-based configuration.
720
+ *
721
+ * @internal
722
+ */
723
+ get pluginManager(): PluginManager;
683
724
  /**
684
725
  * A [SimpleMarkerSymbol](https://developers.arcgis.com/javascript/latest/references/core/symbols/SimpleMarkerSymbol/), [PictureMarkerSymbol](https://developers.arcgis.com/javascript/latest/references/core/symbols/PictureMarkerSymbol/), [PointSymbol3D](https://developers.arcgis.com/javascript/latest/references/core/symbols/PointSymbol3D/), [TextSymbol](https://developers.arcgis.com/javascript/latest/references/core/symbols/TextSymbol/), [CIMSymbol](https://developers.arcgis.com/javascript/latest/references/core/symbols/CIMSymbol/), or [WebStyleSymbol](https://developers.arcgis.com/javascript/latest/references/core/symbols/WebStyleSymbol/) used for representing the point geometry that is being drawn. [SimpleMarkerSymbol](https://developers.arcgis.com/javascript/latest/references/core/symbols/SimpleMarkerSymbol/) may also be used to symbolize point features in a [SceneView](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/). However, it is recommended you use [PointSymbol3D](https://developers.arcgis.com/javascript/latest/references/core/symbols/PointSymbol3D/) instead.
685
726
  *
@@ -745,6 +786,13 @@ export default class SketchViewModel extends EventedAccessor {
745
786
  */
746
787
  get polylineSymbol(): SketchPolylineSymbol;
747
788
  set polylineSymbol(value: ((SimpleLineSymbolProperties & { type: "simple-line" }) | (LineSymbol3DProperties & { type: "line-3d" }) | (CIMSymbolProperties & { type: "cim" })));
789
+ /**
790
+ * The top-level plugins to show in Sketch.
791
+ * Typically point, polyline, polygon, rectangle, circle, etc.
792
+ *
793
+ * @internal
794
+ */
795
+ accessor rootPlugins: PluginConfiguration[] | null | undefined;
748
796
  /**
749
797
  * The [SnappingOptions](https://developers.arcgis.com/javascript/latest/references/core/views/interactive/snapping/SnappingOptions/) for sketching. It supports [self](https://developers.arcgis.com/javascript/latest/references/core/views/interactive/snapping/SnappingOptions/#selfEnabled) and [feature](https://developers.arcgis.com/javascript/latest/references/core/views/interactive/snapping/SnappingOptions/#featureEnabled) snapping.
750
798
  *
@@ -768,6 +816,17 @@ export default class SketchViewModel extends EventedAccessor {
768
816
  */
769
817
  get tooltipOptions(): SketchTooltipOptions;
770
818
  set tooltipOptions(value: SketchTooltipOptionsProperties);
819
+ /**
820
+ * Indicates whether a create or update operation transition is in progress.
821
+ *
822
+ * During this transition window, [state](https://developers.arcgis.com/javascript/latest/references/core/widgets/Sketch/SketchViewModel/#state) may briefly
823
+ * report `"ready"` and [activeTool](https://developers.arcgis.com/javascript/latest/references/core/widgets/Sketch/SketchViewModel/#activeTool) may briefly be `null`
824
+ * before the next operation becomes active.
825
+ *
826
+ * @internal
827
+ * @since 5.1
828
+ */
829
+ get toolTransitionInProgress(): boolean;
771
830
  /**
772
831
  * An array of graphics that are being updated by the SketchViewModel.
773
832
  *
@@ -880,6 +939,12 @@ export default class SketchViewModel extends EventedAccessor {
880
939
  * sketchVM.create("circle", { preserveAspectRatio: false });
881
940
  */
882
941
  create(tool: CreateTool, createOptions?: CreateOptions | null): Promise<void>;
942
+ /**
943
+ * @param tool - Name of the create tool. Specifies the geometry for the graphic to be created.
944
+ * @param createOptions - Options for the graphic to be created.
945
+ * @internal
946
+ */
947
+ create(tool: CreateTool | PluginConfiguration[], createOptions?: CreateOptions | null): Promise<void>;
883
948
  /**
884
949
  * Deletes the selected graphics used in the update workflow. Calling this method will fire the
885
950
  * [@delete](https://developers.arcgis.com/javascript/latest/references/core/widgets/Sketch/SketchViewModel/#event-delete) event.