@arcgis/core 5.0.0-next.60 → 5.0.0-next.62

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 (662) hide show
  1. package/Graphic.d.ts +1 -1
  2. package/analysis/VolumeMeasurement/volumeMeasurementConfiguration.js +1 -1
  3. package/applications/Components/previewSymbol2D.d.ts +1 -1
  4. package/applications/Components/webStyleSymbolUtils.d.ts +1 -1
  5. package/assets/components/assets/combobox/t9n/messages.ar.json +1 -1
  6. package/assets/components/assets/combobox/t9n/messages.bg.json +1 -1
  7. package/assets/components/assets/combobox/t9n/messages.bs.json +1 -1
  8. package/assets/components/assets/combobox/t9n/messages.ca.json +1 -1
  9. package/assets/components/assets/combobox/t9n/messages.cs.json +1 -1
  10. package/assets/components/assets/combobox/t9n/messages.da.json +1 -1
  11. package/assets/components/assets/combobox/t9n/messages.de.json +1 -1
  12. package/assets/components/assets/combobox/t9n/messages.el.json +1 -1
  13. package/assets/components/assets/combobox/t9n/messages.en.json +1 -1
  14. package/assets/components/assets/combobox/t9n/messages.es.json +1 -1
  15. package/assets/components/assets/combobox/t9n/messages.et.json +1 -1
  16. package/assets/components/assets/combobox/t9n/messages.fi.json +1 -1
  17. package/assets/components/assets/combobox/t9n/messages.fr.json +1 -1
  18. package/assets/components/assets/combobox/t9n/messages.he.json +1 -1
  19. package/assets/components/assets/combobox/t9n/messages.hr.json +1 -1
  20. package/assets/components/assets/combobox/t9n/messages.hu.json +1 -1
  21. package/assets/components/assets/combobox/t9n/messages.id.json +1 -1
  22. package/assets/components/assets/combobox/t9n/messages.it.json +1 -1
  23. package/assets/components/assets/combobox/t9n/messages.ja.json +1 -1
  24. package/assets/components/assets/combobox/t9n/messages.json +1 -1
  25. package/assets/components/assets/combobox/t9n/messages.ko.json +1 -1
  26. package/assets/components/assets/combobox/t9n/messages.lt.json +1 -1
  27. package/assets/components/assets/combobox/t9n/messages.lv.json +1 -1
  28. package/assets/components/assets/combobox/t9n/messages.nl.json +1 -1
  29. package/assets/components/assets/combobox/t9n/messages.no.json +1 -1
  30. package/assets/components/assets/combobox/t9n/messages.pl.json +1 -1
  31. package/assets/components/assets/combobox/t9n/messages.pt-BR.json +1 -1
  32. package/assets/components/assets/combobox/t9n/messages.pt-PT.json +1 -1
  33. package/assets/components/assets/combobox/t9n/messages.ro.json +1 -1
  34. package/assets/components/assets/combobox/t9n/messages.ru.json +1 -1
  35. package/assets/components/assets/combobox/t9n/messages.sk.json +1 -1
  36. package/assets/components/assets/combobox/t9n/messages.sl.json +1 -1
  37. package/assets/components/assets/combobox/t9n/messages.sr.json +1 -1
  38. package/assets/components/assets/combobox/t9n/messages.sv.json +1 -1
  39. package/assets/components/assets/combobox/t9n/messages.th.json +1 -1
  40. package/assets/components/assets/combobox/t9n/messages.tr.json +1 -1
  41. package/assets/components/assets/combobox/t9n/messages.uk.json +1 -1
  42. package/assets/components/assets/combobox/t9n/messages.vi.json +1 -1
  43. package/assets/components/assets/combobox/t9n/messages.zh-CN.json +1 -1
  44. package/assets/components/assets/combobox/t9n/messages.zh-HK.json +1 -1
  45. package/assets/components/assets/combobox/t9n/messages.zh-TW.json +1 -1
  46. package/assets/components/assets/date-picker/nls/fr-CA.json +1 -0
  47. package/assets/components/assets/icon/arcgisLivingAtlas16.json +1 -0
  48. package/assets/components/assets/icon/arcgisLivingAtlas24.json +1 -0
  49. package/assets/components/assets/icon/arcgisLivingAtlas32.json +1 -0
  50. package/assets/components/assets/icon/arcgisSolutions16.json +1 -0
  51. package/assets/components/assets/icon/arcgisSolutions24.json +1 -0
  52. package/assets/components/assets/icon/arcgisSolutions32.json +1 -0
  53. package/assets/components/assets/icon/cameraSensorMap24.json +1 -1
  54. package/assets/components/assets/icon/contingentValuesRetire16.json +1 -0
  55. package/assets/components/assets/icon/contingentValuesRetire24.json +1 -0
  56. package/assets/components/assets/icon/contingentValuesRetire32.json +1 -0
  57. package/assets/components/assets/icon/domain16.json +1 -1
  58. package/assets/components/assets/icon/domain24.json +1 -1
  59. package/assets/components/assets/icon/domain32.json +1 -1
  60. package/assets/components/assets/icon/duplicateValues16.json +1 -0
  61. package/assets/components/assets/icon/duplicateValues24.json +1 -0
  62. package/assets/components/assets/icon/duplicateValues32.json +1 -0
  63. package/assets/components/assets/icon/envelope32F.json +1 -1
  64. package/assets/components/assets/icon/fieldGroups16.json +1 -0
  65. package/assets/components/assets/icon/fieldGroups24.json +1 -0
  66. package/assets/components/assets/icon/fieldGroups32.json +1 -0
  67. package/assets/components/assets/icon/groupContent16.json +1 -0
  68. package/assets/components/assets/icon/groupContent24.json +1 -0
  69. package/assets/components/assets/icon/groupContent32.json +1 -0
  70. package/assets/components/assets/icon/groupTemplate16.json +1 -0
  71. package/assets/components/assets/icon/groupTemplate24.json +1 -0
  72. package/assets/components/assets/icon/groupTemplate32.json +1 -0
  73. package/assets/components/assets/icon/integerSet16.json +1 -0
  74. package/assets/components/assets/icon/integerSet24.json +1 -0
  75. package/assets/components/assets/icon/integerSet32.json +1 -0
  76. package/assets/components/assets/icon/intersection16.json +1 -1
  77. package/assets/components/assets/icon/lineIntersection16.json +1 -1
  78. package/assets/components/assets/icon/linkChartCentrality16.json +1 -1
  79. package/assets/components/assets/icon/locationReferencingDataset16.json +1 -1
  80. package/assets/components/assets/icon/locationReferencingDataset24.json +1 -1
  81. package/assets/components/assets/icon/locationReferencingDataset32.json +1 -1
  82. package/assets/components/assets/icon/metadata16.json +1 -0
  83. package/assets/components/assets/icon/metadata24.json +1 -0
  84. package/assets/components/assets/icon/metadata32.json +1 -0
  85. package/assets/components/assets/icon/missionSystemMessage16.json +1 -0
  86. package/assets/components/assets/icon/missionSystemMessage24.json +1 -0
  87. package/assets/components/assets/icon/missionSystemMessage32.json +1 -0
  88. package/assets/components/assets/icon/newCompletePart16.json +1 -1
  89. package/assets/components/assets/icon/newCompletePart24.json +1 -1
  90. package/assets/components/assets/icon/newCompletePart32.json +1 -1
  91. package/assets/components/assets/icon/numberSet16.json +1 -0
  92. package/assets/components/assets/icon/numberSet24.json +1 -0
  93. package/assets/components/assets/icon/numberSet32.json +1 -0
  94. package/assets/components/assets/icon/openData16.json +1 -0
  95. package/assets/components/assets/icon/openData24.json +1 -0
  96. package/assets/components/assets/icon/openData32.json +1 -0
  97. package/assets/components/assets/icon/organizeTemplate16.json +1 -0
  98. package/assets/components/assets/icon/organizeTemplate24.json +1 -0
  99. package/assets/components/assets/icon/organizeTemplate32.json +1 -0
  100. package/assets/components/assets/icon/partneredCollaboration16.json +1 -0
  101. package/assets/components/assets/icon/partneredCollaboration24.json +1 -0
  102. package/assets/components/assets/icon/partneredCollaboration32.json +1 -0
  103. package/assets/components/assets/icon/personMagnifyingGlass16.json +1 -1
  104. package/assets/components/assets/icon/personMagnifyingGlass24.json +1 -1
  105. package/assets/components/assets/icon/pieChartSectionHashFilled16.json +1 -1
  106. package/assets/components/assets/icon/relativeDirectionArrows16.json +1 -0
  107. package/assets/components/assets/icon/relativeDirectionArrows24.json +1 -0
  108. package/assets/components/assets/icon/relativeDirectionArrows32.json +1 -0
  109. package/assets/components/assets/icon/signalHealth16.json +1 -0
  110. package/assets/components/assets/icon/signalHealth24.json +1 -0
  111. package/assets/components/assets/icon/signalHealth32.json +1 -0
  112. package/assets/components/assets/icon/sortAscendingView16.json +1 -0
  113. package/assets/components/assets/icon/sortAscendingView24.json +1 -0
  114. package/assets/components/assets/icon/sortAscendingView32.json +1 -0
  115. package/assets/components/assets/icon/sortDescendingView16.json +1 -0
  116. package/assets/components/assets/icon/sortDescendingView24.json +1 -0
  117. package/assets/components/assets/icon/sortDescendingView32.json +1 -0
  118. package/assets/components/assets/icon/starValues16.json +1 -0
  119. package/assets/components/assets/icon/starValues24.json +1 -0
  120. package/assets/components/assets/icon/starValues32.json +1 -0
  121. package/assets/components/assets/icon/updateTable16.json +1 -0
  122. package/assets/components/assets/icon/updateTable24.json +1 -0
  123. package/assets/components/assets/icon/updateTable32.json +1 -0
  124. package/assets/esri/core/workers/RemoteClient.js +1 -1
  125. package/assets/esri/core/workers/chunks/{94929cf2b9fc66a93882.js → 02cf735176f286a48dd2.js} +1 -1
  126. package/assets/esri/core/workers/chunks/{f3437ae6bba846b524d3.js → 095c1b88cdcb91ab837e.js} +1 -1
  127. package/assets/esri/core/workers/chunks/{b7f2fb6684cf684b0bce.js → 0dc3a04ce717b7ddd957.js} +1 -1
  128. package/assets/esri/core/workers/chunks/{297344c2c1119159d143.js → 10373885604655f673df.js} +1 -1
  129. package/assets/esri/core/workers/chunks/{8208c073e606973ea1ad.js → 12f700b932a241e59071.js} +1 -1
  130. package/assets/esri/core/workers/chunks/{1e8ceed33a3657ac02b3.js → 153ff2ceefccd946498b.js} +1 -1
  131. package/assets/esri/core/workers/chunks/{ca761dc5f45cafef313e.js → 17dea03fc4eb414f0022.js} +1 -1
  132. package/assets/esri/core/workers/chunks/1800994523d7cdfb73af.js +1 -0
  133. package/assets/esri/core/workers/chunks/{ec5f83aa752c39a96609.js → 19db60a3b4b09d445bd1.js} +1 -1
  134. package/assets/esri/core/workers/chunks/{7147fc7502b385b302b2.js → 23b623637126f8411a30.js} +1 -1
  135. package/assets/esri/core/workers/chunks/{a7aa87e2c4197ba595ef.js → 2abc205f81f26fc4852b.js} +2 -2
  136. package/assets/esri/core/workers/chunks/37002a46f03a9fc5f644.js +2 -0
  137. package/assets/esri/core/workers/chunks/{78fc9a55e620602db1ff.js.LICENSE.txt → 37002a46f03a9fc5f644.js.LICENSE.txt} +1 -1
  138. package/assets/esri/core/workers/chunks/{b4a59dd11d75df7bd510.js → 3cce8e894bf37c3e598e.js} +1 -1
  139. package/assets/esri/core/workers/chunks/{492d575894c7905bb70c.js → 3d49c6427120edc8eac9.js} +1 -1
  140. package/assets/esri/core/workers/chunks/{23a9dd9454d5249bbd59.js → 3da53c017f9c5d2d778a.js} +1 -1
  141. package/assets/esri/core/workers/chunks/43e2c1d72cd9c8beed2f.js +2 -0
  142. package/assets/esri/core/workers/chunks/{3266c3392c24ce6cdd83.js.LICENSE.txt → 43e2c1d72cd9c8beed2f.js.LICENSE.txt} +1 -1
  143. package/assets/esri/core/workers/chunks/{3d1a5a3467f3a6585b3e.js → 4f03d19a70dca6c507be.js} +1 -1
  144. package/assets/esri/core/workers/chunks/{24c35a46cf8ed11b774d.js → 5180b15f1a865756a02e.js} +1 -1
  145. package/assets/esri/core/workers/chunks/57302b92e9899cce4ba3.js +1 -0
  146. package/assets/esri/core/workers/chunks/5909a0e763fddc3542e7.js +2 -0
  147. package/assets/esri/core/workers/chunks/{6f3ffc04086bca30e55d.js.LICENSE.txt → 5909a0e763fddc3542e7.js.LICENSE.txt} +2 -2
  148. package/assets/esri/core/workers/chunks/{d9736c783513e9c9b22f.js → 5a2933ae19345b7d5aa7.js} +1 -1
  149. package/assets/esri/core/workers/chunks/{5d31fbabaa875f8627c0.js → 631a11a2b2001c708527.js} +1 -1
  150. package/assets/esri/core/workers/chunks/{fa95c9248fbfab338f2e.js → 63b8cd7d5cafbaeed894.js} +1 -1
  151. package/assets/esri/core/workers/chunks/6b4a24248182245167ca.js +1 -0
  152. package/assets/esri/core/workers/chunks/6be530ab81291745485b.js +2 -0
  153. package/assets/esri/core/workers/chunks/{70e2804d3710c6af468e.js.LICENSE.txt → 6be530ab81291745485b.js.LICENSE.txt} +1 -1
  154. package/assets/esri/core/workers/chunks/{ef9a23d41acb5ad36426.js → 6cb44cd319cb6c2539c8.js} +1 -1
  155. package/assets/esri/core/workers/chunks/73c416ae0ec5a1815591.js +2 -0
  156. package/assets/esri/core/workers/chunks/{be631029691d9a320cb5.js.LICENSE.txt → 73c416ae0ec5a1815591.js.LICENSE.txt} +1 -7
  157. package/assets/esri/core/workers/chunks/{352c674730c7b7258ae3.js → 76086517591d0eb35156.js} +1 -1
  158. package/assets/esri/core/workers/chunks/{436f206898306df019ac.js → 7c47fefbf4c93b63200f.js} +1 -1
  159. package/assets/esri/core/workers/chunks/7e8573749a02e1f54fb1.js +1 -0
  160. package/assets/esri/core/workers/chunks/{9ff8ee6ed6b98c03ae7e.js → 9ccabf8142fb5de4d3e2.js} +2 -2
  161. package/assets/esri/core/workers/chunks/{9ff8ee6ed6b98c03ae7e.js.LICENSE.txt → 9ccabf8142fb5de4d3e2.js.LICENSE.txt} +1 -1
  162. package/assets/esri/core/workers/chunks/ab71865b94022e78035c.js +1 -0
  163. package/assets/esri/core/workers/chunks/{424daef7b5dec1b99aba.js → af3e93a4ac3ff2addc90.js} +1 -1
  164. package/assets/esri/core/workers/chunks/{bf82bb1cdd8b31e7f2aa.js → bb08359610a41e304b55.js} +1 -1
  165. package/assets/esri/core/workers/chunks/{495b11fdecc3ba90d454.js → bfc063d4431bfa162160.js} +1 -1
  166. package/assets/esri/core/workers/chunks/c2aeecd27e004c6cd7e1.js +2 -0
  167. package/assets/esri/core/workers/chunks/c2aeecd27e004c6cd7e1.js.LICENSE.txt +9 -0
  168. package/assets/esri/core/workers/chunks/{60362c5651ef41fa7e5f.js → c2bab829d6f6e05bbd81.js} +1 -1
  169. package/assets/esri/core/workers/chunks/{fa0bbf0d7eadb924c473.js → cc50f96321a7c12f300b.js} +1 -1
  170. package/assets/esri/core/workers/chunks/{62752cd6821959cf6751.js → cfbe9993263fa6f69363.js} +1 -1
  171. package/assets/esri/core/workers/chunks/cfe1506a443fc84a0b91.js +1 -0
  172. package/assets/esri/core/workers/chunks/d13b2ce8a89938b0472b.js +1 -0
  173. package/assets/esri/core/workers/chunks/da99fd0d3106dd357743.js +1 -0
  174. package/assets/esri/core/workers/chunks/{2d8dca9a4a58469ddd05.js → e705d041f6c1632bfbcc.js} +1 -1
  175. package/assets/esri/core/workers/chunks/{0483a2cfdb8c7158e73a.js → e85da52d9cc7d9396872.js} +1 -1
  176. package/assets/esri/core/workers/chunks/e95821a199e10b389e29.js +2 -0
  177. package/assets/esri/core/workers/chunks/{69278d08a7d64917f826.js.LICENSE.txt → e95821a199e10b389e29.js.LICENSE.txt} +1 -1
  178. package/assets/esri/core/workers/chunks/f25bebd2b6eb0d0f6626.js +2 -0
  179. package/assets/esri/core/workers/chunks/{d9251c3c85c3ddd242c8.js.LICENSE.txt → f25bebd2b6eb0d0f6626.js.LICENSE.txt} +1 -1
  180. package/assets/esri/core/workers/chunks/f32d4813b450a3eb4262.js +1 -0
  181. package/assets/esri/core/workers/chunks/{1ced78750c61600b2d4e.js → f351007cdcd0938d3b6c.js} +1 -1
  182. package/assets/esri/core/workers/chunks/{4b088260252787734c00.js → f5f584d325f8f2ea825f.js} +1 -1
  183. package/assets/esri/core/workers/chunks/{3405a23973f9e701a4d6.js → f7d93aae350796b88562.js} +1 -1
  184. package/assets/esri/core/workers/chunks/f9bddbf5dbc91897cb04.js +1 -0
  185. package/assets/esri/libs/parquet/pkg/bundle_bg.wasm +0 -0
  186. package/assets/esri/themes/base/_core.scss +1 -1
  187. package/assets/esri/themes/base/widgets/_BuildingPhasePicker.scss +1 -3
  188. package/assets/esri/themes/base/widgets/_FeatureTable.scss +4 -4
  189. package/assets/esri/themes/base/widgets/_Grid.scss +6 -5
  190. package/assets/esri/themes/base/widgets/_Sketch.scss +0 -3
  191. package/assets/esri/themes/base/widgets/_Tooltip.scss +6 -6
  192. package/assets/esri/themes/dark/main.css +1 -1
  193. package/assets/esri/themes/light/main.css +1 -1
  194. package/assets/esri/themes/light/view.css +1 -1
  195. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_ar.json +1 -1
  196. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_bg.json +1 -1
  197. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_bs.json +1 -1
  198. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_ca.json +1 -1
  199. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_cs.json +1 -1
  200. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_da.json +1 -1
  201. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_de.json +1 -1
  202. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_el.json +1 -1
  203. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_es.json +1 -1
  204. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_et.json +1 -1
  205. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_fi.json +1 -1
  206. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_fr.json +1 -1
  207. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_he.json +1 -1
  208. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_hr.json +1 -1
  209. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_hu.json +1 -1
  210. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_id.json +1 -1
  211. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_it.json +1 -1
  212. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_ja.json +1 -1
  213. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_ko.json +1 -1
  214. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_lt.json +1 -1
  215. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_lv.json +1 -1
  216. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_nl.json +1 -1
  217. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_no.json +1 -1
  218. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_pl.json +1 -1
  219. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_pt-BR.json +1 -1
  220. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_pt-PT.json +1 -1
  221. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_ro.json +1 -1
  222. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_ru.json +1 -1
  223. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_sk.json +1 -1
  224. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_sl.json +1 -1
  225. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_sr.json +1 -1
  226. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_sv.json +1 -1
  227. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_th.json +1 -1
  228. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_tr.json +1 -1
  229. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_uk.json +1 -1
  230. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_vi.json +1 -1
  231. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_zh-CN.json +1 -1
  232. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_zh-HK.json +1 -1
  233. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_zh-TW.json +1 -1
  234. package/chunks/CutFillDepth.glsl.js +13 -10
  235. package/chunks/CutFillReduction.glsl.js +14 -8
  236. package/chunks/GaussianSplat.glsl.js +1 -1
  237. package/chunks/Laserlines.glsl.js +2 -2
  238. package/chunks/boundedPlane.js +1 -1
  239. package/chunks/cameraUtilsSpherical.js +1 -1
  240. package/chunks/vec32.js +1 -1
  241. package/config.js +1 -1
  242. package/core/Loadable.d.ts +8 -2
  243. package/core/libs/gl-matrix-2/math/vec3.js +1 -1
  244. package/core/reactiveUtils.d.ts +1 -1
  245. package/effects/FocusAreas.d.ts +1 -1
  246. package/form/FormTemplate.d.ts +2 -2
  247. package/form/elements/AttachmentElement.d.ts +2 -2
  248. package/form/elements/GroupElement.d.ts +2 -2
  249. package/form/elements/inputs/attachments/AttachmentInput.d.ts +9 -2
  250. package/form/elements/inputs/attachments/AudioInput.d.ts +10 -1
  251. package/form/elements/inputs/attachments/DocumentInput.d.ts +9 -1
  252. package/form/elements/inputs/attachments/ImageInput.d.ts +10 -1
  253. package/form/elements/inputs/attachments/Input.d.ts +19 -1
  254. package/form/elements/inputs/attachments/SignatureInput.d.ts +5 -0
  255. package/form/elements/inputs/attachments/VideoInput.d.ts +10 -1
  256. package/form/elements/inputs/attachments/types.d.ts +15 -0
  257. package/form/elements.d.ts +0 -9
  258. package/form/types.d.ts +17 -0
  259. package/geometry/support/lineSegment.js +1 -1
  260. package/geometry/support/meshUtils/merge.js +1 -1
  261. package/geometry/support/sphere.js +1 -1
  262. package/interfaces.d.ts +74 -212
  263. package/intl/substitute.d.ts +1 -1
  264. package/intl.d.ts +5 -5
  265. package/kernel.js +1 -1
  266. package/layers/VoxelWasmPerSceneView.js +1 -1
  267. package/layers/catalog/CatalogFootprintLayer.d.ts +1 -1
  268. package/layers/knowledgeGraph/layerUtils.js +1 -1
  269. package/layers/ogc/types.d.ts +1 -1
  270. package/layers/orientedImagery/transformations/worldToImage.js +1 -1
  271. package/layers/support/FieldsIndex.d.ts +2 -1
  272. package/layers/support/RouteStopSymbols.d.ts +1 -1
  273. package/layers/support/RouteSymbols.d.ts +1 -1
  274. package/layers/support/tiles3DUtils.js +1 -1
  275. package/layers/voxel/VoxelVolume.js +1 -1
  276. package/networks/UtilityNetwork.js +1 -1
  277. package/networks/support/Circuit.d.ts +2 -2
  278. package/networks/support/CircuitLocation.d.ts +3 -3
  279. package/networks/support/CircuitLocation.js +1 -1
  280. package/networks/support/CircuitPathConnectivityElement.js +1 -1
  281. package/networks/support/CircuitSection.d.ts +2 -2
  282. package/networks/support/jsonTypes.d.ts +2 -2
  283. package/networks/support/networkFieldUtils.js +1 -1
  284. package/package.json +3 -3
  285. package/portal/PortalUser.d.ts +2 -2
  286. package/renderers/ClassBreaksRenderer.d.ts +2 -2
  287. package/renderers/SimpleRenderer.d.ts +1 -1
  288. package/renderers/UniqueValueRenderer.d.ts +1 -1
  289. package/renderers/support/ClassBreakInfo.d.ts +1 -1
  290. package/renderers/support/RendererLegendOptions.d.ts +2 -1
  291. package/renderers/support/UniqueValueClass.d.ts +1 -1
  292. package/renderers/support/UniqueValueInfo.d.ts +1 -1
  293. package/renderers/types.d.ts +1 -1
  294. package/rest/networks/circuits/alterCircuit.js +1 -1
  295. package/rest/networks/circuits/createCircuit.js +1 -1
  296. package/rest/networks/circuits/deleteCircuits.js +1 -1
  297. package/rest/networks/circuits/exportCircuits.js +1 -1
  298. package/rest/networks/circuits/queryCircuits.js +1 -1
  299. package/rest/networks/circuits/support/QueryCircuitsParameters.js +1 -1
  300. package/rest/networks/circuits/verifyCircuits.js +1 -1
  301. package/rest/networks/support/Association.js +1 -1
  302. package/rest/networks/support/TelecomNetworkElement.d.ts +6 -5
  303. package/rest/networks/support/TelecomNetworkElement.js +1 -1
  304. package/rest/networks/support/TraceLocation.d.ts +10 -8
  305. package/rest/networks/support/TraceLocation.js +1 -1
  306. package/rest/networks/support/TraceResult.js +1 -1
  307. package/rest/networks/unitIdentifiers/insertGap.js +1 -1
  308. package/rest/networks/unitIdentifiers/queryUnitIdentifiers.js +1 -1
  309. package/rest/networks/unitIdentifiers/reset.js +1 -1
  310. package/rest/networks/unitIdentifiers/resize.js +1 -1
  311. package/rest/networks/unitIdentifiers/support/UnitQueryResult.js +1 -1
  312. package/rest/places.d.ts +0 -4
  313. package/rest/support/AttributeBinsQuery.d.ts +1 -14
  314. package/rest/symbolService.d.ts +2 -2
  315. package/smartMapping/raster/renderers/vectorField.d.ts +0 -1
  316. package/smartMapping/renderers/opacity.d.ts +1 -1
  317. package/smartMapping/renderers/support/spikeUtils.d.ts +2 -2
  318. package/smartMapping/renderers/type.d.ts +1 -1
  319. package/smartMapping/renderers/univariateColorSize.d.ts +4 -4
  320. package/smartMapping/statistics/types.d.ts +2 -2
  321. package/support/actions/actionUtils.js +1 -1
  322. package/support/revision.js +1 -1
  323. package/symbols/CIMSymbol.d.ts +29 -29
  324. package/symbols/Font.d.ts +1 -1
  325. package/symbols/IconSymbol3DLayer.d.ts +3 -4
  326. package/symbols/ObjectSymbol3DLayer.d.ts +3 -4
  327. package/symbols/Symbol.d.ts +2 -5
  328. package/symbols/Symbol3DLayer.d.ts +2 -3
  329. package/symbols/TextSymbol.d.ts +3 -3
  330. package/symbols/TextSymbol3DLayer.d.ts +3 -3
  331. package/symbols/WaterSymbol3DLayer.d.ts +4 -7
  332. package/symbols/WebStyleSymbol.d.ts +5 -5
  333. package/symbols/cim/cimAnalyzer.js +1 -1
  334. package/symbols/cim/defaultCIMValues.js +1 -1
  335. package/symbols/cim/{CIMTypes.d.ts → types.d.ts} +216 -167
  336. package/symbols/cim/types.js +5 -0
  337. package/symbols/support/IconSymbol3DLayerResource.d.ts +2 -3
  338. package/symbols/support/ObjectSymbol3DLayerResource.d.ts +2 -3
  339. package/symbols/support/Symbol3DFillMaterial.d.ts +2 -2
  340. package/symbols/support/cimConversionUtils.d.ts +1 -1
  341. package/symbols/support/cimSymbolUtils.d.ts +4 -4
  342. package/symbols/support/jsonUtils.d.ts +1 -1
  343. package/symbols/support/symbolUtils.d.ts +66 -4
  344. package/symbols/support/types.d.ts +3 -62
  345. package/symbols/types.d.ts +113 -1
  346. package/unionTypes.d.ts +61 -14
  347. package/views/2d/engine/flow/dataUtils.js +1 -1
  348. package/views/2d/engine/flow/utils.js +1 -1
  349. package/views/2d/engine/vectorTiles/shaders/sources/shaderRepository.js +1 -1
  350. package/views/2d/engine/webgl/shaderGraph/techniques/fill/GradientFillMeshWriter.js +1 -1
  351. package/views/2d/engine/webgl/shaderGraph/techniques/fill/GradientSizeHelper.js +1 -1
  352. package/views/2d/engine/webgl/shaderGraph/techniques/line/GradientStrokeMeshWriter.js +1 -1
  353. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  354. package/views/2d/interactive/SegmentLabels2D.js +1 -1
  355. package/views/2d/layers/BaseLayerViewGL2D.d.ts +6 -6
  356. package/views/2d/layers/RouteLayerView2D.js +1 -1
  357. package/views/2d/layers/support/RouteLayerInteraction.js +1 -1
  358. package/views/2d/layers/support/RouteLayerInteractiveOptions.js +5 -0
  359. package/views/2d/layers/support/RouteLayerWaypointVisualization.js +1 -1
  360. package/views/3d/analysis/AreaMeasurement/support/AreaMeasurementVisualization.js +1 -1
  361. package/views/3d/analysis/AreaMeasurement/support/MeasurementData.js +1 -1
  362. package/views/3d/analysis/Dimension/lengthDimensionConstraintUtils.js +1 -1
  363. package/views/3d/analysis/Dimension/lengthDimensionUtils.js +1 -1
  364. package/views/3d/analysis/LineOfSight/LineOfSightController.js +1 -1
  365. package/views/3d/analysis/LineOfSight/LineOfSightIntersectionResult.js +1 -1
  366. package/views/3d/analysis/Slice/sliceToolUtils.js +1 -1
  367. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillComputation.js +1 -1
  368. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillController.js +1 -1
  369. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillVisualization.js +1 -1
  370. package/views/3d/analysis/VolumeMeasurementAnalysisView3D.js +1 -1
  371. package/views/3d/animation/pointToPoint/Camera.js +1 -1
  372. package/views/3d/camera/constraintUtils/distance.js +1 -1
  373. package/views/3d/camera/constraintUtils/tilt.js +1 -1
  374. package/views/3d/environment/ChapmanApproximation.glsl.js +1 -1
  375. package/views/3d/environment/CloudsParameters.js +1 -1
  376. package/views/3d/environment/EnvironmentManager.js +1 -1
  377. package/views/3d/environment/MarsAtmosphere.js +1 -1
  378. package/views/3d/interactive/SegmentLabels3D.js +1 -1
  379. package/views/3d/interactive/editingTools/manipulations/MoveZManipulation.js +1 -1
  380. package/views/3d/interactive/editingTools/media/MediaElementManipulator3D.js +1 -1
  381. package/views/3d/interactive/editingTools/reshape/edgeOffsetUtils.js +1 -1
  382. package/views/3d/interactive/visualElements/LabelVisualElement.js +1 -1
  383. package/views/3d/interactive/visualElements/RightAngleQuadVisualElement.js +1 -1
  384. package/views/3d/layers/FlowSubView3D.js +1 -1
  385. package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
  386. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  387. package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
  388. package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
  389. package/views/3d/layers/i3s/I3SViewportQueries.js +1 -1
  390. package/views/3d/layers/i3s/PointCloudRenderer.js +1 -1
  391. package/views/3d/layers/support/FeatureTileMeasurements3D.js +1 -1
  392. package/views/3d/layers/support/FeatureTileVisibility3D.js +1 -1
  393. package/views/3d/state/Frustum.js +1 -1
  394. package/views/3d/state/controllers/FovController.js +1 -1
  395. package/views/3d/state/controllers/GamepadKeyboardController.js +1 -1
  396. package/views/3d/state/controllers/momentum/ZoomPlanarMomentumController.js +1 -1
  397. package/views/3d/support/FrustumExtentIntersection.js +1 -1
  398. package/views/3d/support/cameraUtils.js +1 -1
  399. package/views/3d/support/engineContent/line.js +1 -1
  400. package/views/3d/support/flow/FlowWorker.js +1 -1
  401. package/views/3d/support/flow/StreamlineResources3D.js +1 -1
  402. package/views/3d/support/flow/constants.js +1 -1
  403. package/views/3d/support/flow/geometryUtils.js +1 -1
  404. package/views/3d/support/gaussianSplatting/GaussianSplatDataStore.js +1 -1
  405. package/views/3d/support/gaussianSplatting/GaussianSplatTextureAtlas.js +1 -1
  406. package/views/3d/support/intersectionUtils.js +1 -1
  407. package/views/3d/support/orientedBoundingBox.js +1 -1
  408. package/views/3d/support/pointsOfInterest/CameraOnSurface.js +1 -1
  409. package/views/3d/support/pointsOfInterest/CenterOnSurface.js +1 -1
  410. package/views/3d/support/pointsOfInterest/Focus.js +1 -1
  411. package/views/3d/support/viewpointUtils.js +1 -1
  412. package/views/3d/terrain/OverlayManager.js +1 -1
  413. package/views/3d/terrain/OverlayRenderer.js +1 -1
  414. package/views/3d/terrain/PatchRenderData.js +1 -1
  415. package/views/3d/terrain/SphericalPatch.js +1 -1
  416. package/views/3d/terrain/Tile.js +1 -1
  417. package/views/3d/webgl/RenderCamera.js +1 -1
  418. package/views/3d/webgl-engine/core/FBOCache.js +1 -1
  419. package/views/3d/webgl-engine/core/FBOCacheFormats.js +1 -1
  420. package/views/3d/webgl-engine/effects/focusArea/FocusAreaMaskNode.js +1 -1
  421. package/views/3d/webgl-engine/effects/geometry/RenderOccludedRenderNode.js +1 -1
  422. package/views/3d/webgl-engine/lib/CutFillDepth.js +1 -1
  423. package/views/3d/webgl-engine/lib/GPUPointOcclusionQuery.js +1 -1
  424. package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
  425. package/views/3d/webgl-engine/lib/MainFramebuffer.js +1 -1
  426. package/views/3d/webgl-engine/lib/Object3D.js +1 -1
  427. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  428. package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
  429. package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
  430. package/views/3d/webgl-engine/lib/Viewshed.js +1 -1
  431. package/views/3d/webgl-engine/lib/ViewshedShadowMap.js +1 -1
  432. package/views/3d/webgl-engine/lib/edgeRendering/edgePreprocessing.js +1 -1
  433. package/views/3d/webgl-engine/lib/geometryDataUtils.js +1 -1
  434. package/views/3d/webgl-engine/lib/triangleIntersectionUtils.js +1 -1
  435. package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
  436. package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
  437. package/views/3d/webgl-engine/materials/MeasurementArrowMaterial.js +1 -1
  438. package/views/3d/webgl-engine/materials/NativeLineMaterial.js +1 -1
  439. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  440. package/views/3d/webgl-engine/shaders/AnimatedLine.glsl.js +13 -12
  441. package/views/3d/webgl-engine/shaders/CutFillDepthTechniqueConfiguration.js +5 -0
  442. package/views/3d/webgl-engine/shaders/CutFillReductionTechniqueConfiguration.js +5 -0
  443. package/views/3d/webgl-engine/shaders/RibbonLineTechniqueConfiguration.js +1 -1
  444. package/views/3d/webgl-engine/shaders/SphereDepthInterpolate.glsl.js +1 -1
  445. package/views/interactive/GraphicManipulator.js +1 -1
  446. package/views/interactive/coordinateHelper.js +1 -1
  447. package/views/interactive/editGeometry/operations/OffsetEdgeVertex.js +1 -1
  448. package/views/interactive/sketch/constraints.js +1 -1
  449. package/views/interactive/snapping/featureSources/sceneLayerSource/SceneLayerSnappingSourceWorker.js +1 -1
  450. package/views/interactive/snapping/featureSources/sceneLayerSource/sceneLayerSnappingUtils.js +1 -1
  451. package/views/interactive/snapping/hints/LineSnappingHint.js +1 -1
  452. package/views/interactive/tooltip/tooltipCommonUtils.js +1 -1
  453. package/views/navigation/PanSphericalMomentumEstimator.js +1 -1
  454. package/views/support/Scheduler.js +1 -1
  455. package/views/support/euclideanAreaMeasurementUtils.js +1 -1
  456. package/views/support/euclideanLengthMeasurementUtils.js +1 -1
  457. package/views/support/geometry3dUtils.js +1 -1
  458. package/webdoc/widgets/FloorFilter.js +1 -1
  459. package/widgets/BasemapLayerList.js +1 -1
  460. package/widgets/BatchAttributeForm.js +1 -1
  461. package/widgets/Bookmarks.js +1 -1
  462. package/widgets/BuildingExplorer/BuildingLevelPicker/BuildingLevelPicker.js +1 -1
  463. package/widgets/BuildingExplorer/BuildingPhasePicker/BuildingPhasePicker.js +1 -1
  464. package/widgets/CatalogLayerList.js +1 -1
  465. package/widgets/Directions/DirectionsViewModel.js +1 -1
  466. package/widgets/Directions.js +1 -1
  467. package/widgets/Editor/components/FeatureList.js +1 -1
  468. package/widgets/Editor/components/PendingFeatureList.js +1 -1
  469. package/widgets/Editor/components/UpdateFeaturePanelContent.js +1 -1
  470. package/widgets/ElevationProfile/components/LegendItem.js +1 -1
  471. package/widgets/ElevationProfile/components/SettingsButton.js +1 -1
  472. package/widgets/ElevationProfile.js +1 -1
  473. package/widgets/Expand/ExpandViewModel.d.ts +1 -0
  474. package/widgets/Expand/ExpandViewModel.js +1 -1
  475. package/widgets/Expand.js +1 -1
  476. package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/UtilityNetworkAssociationItemList.js +1 -1
  477. package/widgets/FeatureForm.js +1 -1
  478. package/widgets/FeatureTable/Grid/Column.js +1 -1
  479. package/widgets/FeatureTable/RelationshipColumn.js +1 -1
  480. package/widgets/FeatureTable.js +1 -1
  481. package/widgets/Features/FeaturesDrillIn.js +1 -1
  482. package/widgets/Features.js +1 -1
  483. package/widgets/FloorFilter/FloorFilterViewModel.js +1 -1
  484. package/widgets/LayerList/LayerListItem.js +1 -1
  485. package/widgets/LayerList.js +1 -1
  486. package/widgets/Legend/LegendViewModel.js +1 -1
  487. package/widgets/Print.js +1 -1
  488. package/widgets/Search/SearchSource.d.ts +1 -1
  489. package/widgets/Sketch/support/ResponsiveToolbar/OverflowGroup.js +1 -1
  490. package/widgets/Sketch/support/ResponsiveToolbar/SplitButton.js +1 -1
  491. package/widgets/Sketch/support/ResponsiveToolbar/responsiveToolbarUtils.js +1 -1
  492. package/widgets/Sketch/types.d.ts +1 -1
  493. package/widgets/Sketch.js +1 -1
  494. package/widgets/Slice.js +1 -1
  495. package/widgets/TableList/types.d.ts +2 -3
  496. package/widgets/TableList.d.ts +1 -1
  497. package/widgets/TableList.js +1 -1
  498. package/widgets/TimeZoneLabel.js +1 -1
  499. package/widgets/UtilityNetworkAssociations.js +1 -1
  500. package/widgets/UtilityNetworkTrace/UtilityNetworkTraceFeature.js +1 -1
  501. package/widgets/UtilityNetworkTrace/UtilityNetworkTraceFeaturesDrillIn.js +1 -1
  502. package/widgets/UtilityNetworkTrace.js +1 -1
  503. package/widgets/UtilityNetworkValidateTopology.js +1 -1
  504. package/widgets/ValuePicker/ValuePickerCombobox.js +1 -1
  505. package/widgets/support/GeolocationPositioning.js +1 -1
  506. package/widgets/support/SelectionList.js +1 -1
  507. package/widgets/support/iconUtils.js +1 -1
  508. package/widgets/types.d.ts +2 -2
  509. package/assets/components/assets/modal/t9n/messages.ar.json +0 -1
  510. package/assets/components/assets/modal/t9n/messages.bg.json +0 -1
  511. package/assets/components/assets/modal/t9n/messages.bs.json +0 -1
  512. package/assets/components/assets/modal/t9n/messages.ca.json +0 -1
  513. package/assets/components/assets/modal/t9n/messages.cs.json +0 -1
  514. package/assets/components/assets/modal/t9n/messages.da.json +0 -1
  515. package/assets/components/assets/modal/t9n/messages.de.json +0 -1
  516. package/assets/components/assets/modal/t9n/messages.el.json +0 -1
  517. package/assets/components/assets/modal/t9n/messages.en.json +0 -1
  518. package/assets/components/assets/modal/t9n/messages.es.json +0 -1
  519. package/assets/components/assets/modal/t9n/messages.et.json +0 -1
  520. package/assets/components/assets/modal/t9n/messages.fi.json +0 -1
  521. package/assets/components/assets/modal/t9n/messages.fr.json +0 -1
  522. package/assets/components/assets/modal/t9n/messages.he.json +0 -1
  523. package/assets/components/assets/modal/t9n/messages.hr.json +0 -1
  524. package/assets/components/assets/modal/t9n/messages.hu.json +0 -1
  525. package/assets/components/assets/modal/t9n/messages.id.json +0 -1
  526. package/assets/components/assets/modal/t9n/messages.it.json +0 -1
  527. package/assets/components/assets/modal/t9n/messages.ja.json +0 -1
  528. package/assets/components/assets/modal/t9n/messages.json +0 -1
  529. package/assets/components/assets/modal/t9n/messages.ko.json +0 -1
  530. package/assets/components/assets/modal/t9n/messages.lt.json +0 -1
  531. package/assets/components/assets/modal/t9n/messages.lv.json +0 -1
  532. package/assets/components/assets/modal/t9n/messages.nl.json +0 -1
  533. package/assets/components/assets/modal/t9n/messages.no.json +0 -1
  534. package/assets/components/assets/modal/t9n/messages.pl.json +0 -1
  535. package/assets/components/assets/modal/t9n/messages.pt-BR.json +0 -1
  536. package/assets/components/assets/modal/t9n/messages.pt-PT.json +0 -1
  537. package/assets/components/assets/modal/t9n/messages.ro.json +0 -1
  538. package/assets/components/assets/modal/t9n/messages.ru.json +0 -1
  539. package/assets/components/assets/modal/t9n/messages.sk.json +0 -1
  540. package/assets/components/assets/modal/t9n/messages.sl.json +0 -1
  541. package/assets/components/assets/modal/t9n/messages.sr.json +0 -1
  542. package/assets/components/assets/modal/t9n/messages.sv.json +0 -1
  543. package/assets/components/assets/modal/t9n/messages.th.json +0 -1
  544. package/assets/components/assets/modal/t9n/messages.tr.json +0 -1
  545. package/assets/components/assets/modal/t9n/messages.uk.json +0 -1
  546. package/assets/components/assets/modal/t9n/messages.vi.json +0 -1
  547. package/assets/components/assets/modal/t9n/messages.zh-CN.json +0 -1
  548. package/assets/components/assets/modal/t9n/messages.zh-HK.json +0 -1
  549. package/assets/components/assets/modal/t9n/messages.zh-TW.json +0 -1
  550. package/assets/components/assets/tip/t9n/messages.ar.json +0 -1
  551. package/assets/components/assets/tip/t9n/messages.bg.json +0 -1
  552. package/assets/components/assets/tip/t9n/messages.bs.json +0 -1
  553. package/assets/components/assets/tip/t9n/messages.ca.json +0 -1
  554. package/assets/components/assets/tip/t9n/messages.cs.json +0 -1
  555. package/assets/components/assets/tip/t9n/messages.da.json +0 -1
  556. package/assets/components/assets/tip/t9n/messages.de.json +0 -1
  557. package/assets/components/assets/tip/t9n/messages.el.json +0 -1
  558. package/assets/components/assets/tip/t9n/messages.en.json +0 -1
  559. package/assets/components/assets/tip/t9n/messages.es.json +0 -1
  560. package/assets/components/assets/tip/t9n/messages.et.json +0 -1
  561. package/assets/components/assets/tip/t9n/messages.fi.json +0 -1
  562. package/assets/components/assets/tip/t9n/messages.fr.json +0 -1
  563. package/assets/components/assets/tip/t9n/messages.he.json +0 -1
  564. package/assets/components/assets/tip/t9n/messages.hr.json +0 -1
  565. package/assets/components/assets/tip/t9n/messages.hu.json +0 -1
  566. package/assets/components/assets/tip/t9n/messages.id.json +0 -1
  567. package/assets/components/assets/tip/t9n/messages.it.json +0 -1
  568. package/assets/components/assets/tip/t9n/messages.ja.json +0 -1
  569. package/assets/components/assets/tip/t9n/messages.json +0 -1
  570. package/assets/components/assets/tip/t9n/messages.ko.json +0 -1
  571. package/assets/components/assets/tip/t9n/messages.lt.json +0 -1
  572. package/assets/components/assets/tip/t9n/messages.lv.json +0 -1
  573. package/assets/components/assets/tip/t9n/messages.nl.json +0 -1
  574. package/assets/components/assets/tip/t9n/messages.no.json +0 -1
  575. package/assets/components/assets/tip/t9n/messages.pl.json +0 -1
  576. package/assets/components/assets/tip/t9n/messages.pt-BR.json +0 -1
  577. package/assets/components/assets/tip/t9n/messages.pt-PT.json +0 -1
  578. package/assets/components/assets/tip/t9n/messages.ro.json +0 -1
  579. package/assets/components/assets/tip/t9n/messages.ru.json +0 -1
  580. package/assets/components/assets/tip/t9n/messages.sk.json +0 -1
  581. package/assets/components/assets/tip/t9n/messages.sl.json +0 -1
  582. package/assets/components/assets/tip/t9n/messages.sr.json +0 -1
  583. package/assets/components/assets/tip/t9n/messages.sv.json +0 -1
  584. package/assets/components/assets/tip/t9n/messages.th.json +0 -1
  585. package/assets/components/assets/tip/t9n/messages.tr.json +0 -1
  586. package/assets/components/assets/tip/t9n/messages.uk.json +0 -1
  587. package/assets/components/assets/tip/t9n/messages.vi.json +0 -1
  588. package/assets/components/assets/tip/t9n/messages.zh-CN.json +0 -1
  589. package/assets/components/assets/tip/t9n/messages.zh-HK.json +0 -1
  590. package/assets/components/assets/tip/t9n/messages.zh-TW.json +0 -1
  591. package/assets/components/assets/tip-manager/t9n/messages.ar.json +0 -1
  592. package/assets/components/assets/tip-manager/t9n/messages.bg.json +0 -1
  593. package/assets/components/assets/tip-manager/t9n/messages.bs.json +0 -1
  594. package/assets/components/assets/tip-manager/t9n/messages.ca.json +0 -1
  595. package/assets/components/assets/tip-manager/t9n/messages.cs.json +0 -1
  596. package/assets/components/assets/tip-manager/t9n/messages.da.json +0 -1
  597. package/assets/components/assets/tip-manager/t9n/messages.de.json +0 -1
  598. package/assets/components/assets/tip-manager/t9n/messages.el.json +0 -1
  599. package/assets/components/assets/tip-manager/t9n/messages.en.json +0 -1
  600. package/assets/components/assets/tip-manager/t9n/messages.es.json +0 -1
  601. package/assets/components/assets/tip-manager/t9n/messages.et.json +0 -1
  602. package/assets/components/assets/tip-manager/t9n/messages.fi.json +0 -1
  603. package/assets/components/assets/tip-manager/t9n/messages.fr.json +0 -1
  604. package/assets/components/assets/tip-manager/t9n/messages.he.json +0 -1
  605. package/assets/components/assets/tip-manager/t9n/messages.hr.json +0 -1
  606. package/assets/components/assets/tip-manager/t9n/messages.hu.json +0 -1
  607. package/assets/components/assets/tip-manager/t9n/messages.id.json +0 -1
  608. package/assets/components/assets/tip-manager/t9n/messages.it.json +0 -1
  609. package/assets/components/assets/tip-manager/t9n/messages.ja.json +0 -1
  610. package/assets/components/assets/tip-manager/t9n/messages.json +0 -1
  611. package/assets/components/assets/tip-manager/t9n/messages.ko.json +0 -1
  612. package/assets/components/assets/tip-manager/t9n/messages.lt.json +0 -1
  613. package/assets/components/assets/tip-manager/t9n/messages.lv.json +0 -1
  614. package/assets/components/assets/tip-manager/t9n/messages.nl.json +0 -1
  615. package/assets/components/assets/tip-manager/t9n/messages.no.json +0 -1
  616. package/assets/components/assets/tip-manager/t9n/messages.pl.json +0 -1
  617. package/assets/components/assets/tip-manager/t9n/messages.pt-BR.json +0 -1
  618. package/assets/components/assets/tip-manager/t9n/messages.pt-PT.json +0 -1
  619. package/assets/components/assets/tip-manager/t9n/messages.ro.json +0 -1
  620. package/assets/components/assets/tip-manager/t9n/messages.ru.json +0 -1
  621. package/assets/components/assets/tip-manager/t9n/messages.sk.json +0 -1
  622. package/assets/components/assets/tip-manager/t9n/messages.sl.json +0 -1
  623. package/assets/components/assets/tip-manager/t9n/messages.sr.json +0 -1
  624. package/assets/components/assets/tip-manager/t9n/messages.sv.json +0 -1
  625. package/assets/components/assets/tip-manager/t9n/messages.th.json +0 -1
  626. package/assets/components/assets/tip-manager/t9n/messages.tr.json +0 -1
  627. package/assets/components/assets/tip-manager/t9n/messages.uk.json +0 -1
  628. package/assets/components/assets/tip-manager/t9n/messages.vi.json +0 -1
  629. package/assets/components/assets/tip-manager/t9n/messages.zh-CN.json +0 -1
  630. package/assets/components/assets/tip-manager/t9n/messages.zh-HK.json +0 -1
  631. package/assets/components/assets/tip-manager/t9n/messages.zh-TW.json +0 -1
  632. package/assets/esri/core/workers/chunks/1e17ad6cdffa5016a3db.js +0 -1
  633. package/assets/esri/core/workers/chunks/211837df0edada4414c5.js +0 -1
  634. package/assets/esri/core/workers/chunks/21ebd234cf32ae52b3ea.js +0 -1
  635. package/assets/esri/core/workers/chunks/262c5794650853457acc.js +0 -1
  636. package/assets/esri/core/workers/chunks/3266c3392c24ce6cdd83.js +0 -2
  637. package/assets/esri/core/workers/chunks/509065a27bd07bd32475.js +0 -1
  638. package/assets/esri/core/workers/chunks/69278d08a7d64917f826.js +0 -2
  639. package/assets/esri/core/workers/chunks/6f3ffc04086bca30e55d.js +0 -2
  640. package/assets/esri/core/workers/chunks/70e2804d3710c6af468e.js +0 -2
  641. package/assets/esri/core/workers/chunks/78fc9a55e620602db1ff.js +0 -2
  642. package/assets/esri/core/workers/chunks/a67c3958d76d10c04fa6.js +0 -2
  643. package/assets/esri/core/workers/chunks/a67c3958d76d10c04fa6.js.LICENSE.txt +0 -3
  644. package/assets/esri/core/workers/chunks/a94dd0f5839b6e2bb2d2.js +0 -1
  645. package/assets/esri/core/workers/chunks/b7bcff9a64f41a0a0b6a.js +0 -1
  646. package/assets/esri/core/workers/chunks/be631029691d9a320cb5.js +0 -2
  647. package/assets/esri/core/workers/chunks/c7802c144959d60e774a.js +0 -1
  648. package/assets/esri/core/workers/chunks/d9251c3c85c3ddd242c8.js +0 -2
  649. package/assets/esri/core/workers/chunks/edd3cf415955309b4ca4.js +0 -1
  650. package/assets/esri/core/workers/chunks/fbd577f56529063ce491.js +0 -1
  651. package/form/elements/inputs/attachments/support/inputs.d.ts +0 -10
  652. package/form/support/formUtils.d.ts +0 -4
  653. package/symbols/cim/enums.d.ts +0 -50
  654. package/symbols/cim/enums.js +0 -5
  655. package/symbols/support/OccludedVisibility.d.ts +0 -2
  656. package/symbols/support/materialUtils.d.ts +0 -2
  657. package/symbols/support/textUtils.d.ts +0 -10
  658. package/symbols/support/typeUtils.d.ts +0 -86
  659. package/symbols/support/webStyleAcceptedFormats.d.ts +0 -2
  660. package/symbols.d.ts +0 -439
  661. package/symbols.js +0 -5
  662. /package/effects/{FocusAreaStyle.d.ts → types.d.ts} +0 -0
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import t from"../core/Collection.js";import{IdentifiableMixin as i}from"../core/Identifiable.js";import{on as o,watch as s,initial as l}from"../core/reactiveUtils.js";import{property as r,subclass as n}from"../core/accessorSupport/decorators.js";import a from"./Widget.js";import d from"./LayerList/LayerListItem.js";import{minDragEnabledItems as c,minFilterItems as m,getLayerType as p,removeDestroyedListItems as h,setFilterPredicate as u}from"./LayerList/support/layerListUtils.js";import{loadCalciteComponents as g}from"./support/componentsUtils.js";import{globalCss as f}from"./support/globalCss.js";import{calciteListFilterProps as I}from"./support/listUtils.js";import{tsx as b,messageBundle as _,vmEvent as v}from"./support/widget.js";import{setFocus as w}from"./support/widgetUtils.js";import{css as y}from"./TableList/css.js";import L from"./TableList/ListItem.js";import E from"./TableList/TableListViewModel.js";import C from"./TableList/TableListVisibleElements.js";import{getItem as F,sortTablesToIds as M}from"./TableList/support/tableListUtils.js";const P="nested",D=t.ofType(L);let T=class extends(i(a)){constructor(e,t){super(e,t),this._rootListEl=null,this._focusRootFlowItem=!1,this._focusPanelFlowItem=!1,this._lastDragDetail=null,this._selectedDragItemLayerUid=null,this._rootGroupUid=`table-${this.uid}`,this.collapsed=!1,this.dragEnabled=!1,this.filterPlaceholder="",this.filterPredicate=null,this.filterText="",this.headingLevel=2,this.listItemCanGiveFunction=null,this.listItemCanReceiveFunction=null,this.messages=null,this.messagesCommon=null,this.minDragEnabledItems=c,this.minFilterItems=m,this.selectedItems=new D,this.selectionMode="none",this.viewModel=new E,this.visibleElements=new C,this._canMove=({dragEl:e,fromEl:t,toEl:i},o)=>{const s="pull"===o?this.listItemCanGiveFunction:this.listItemCanReceiveFunction,l=F(e);if(!l?.sortable)return!1;const r=F(t),n=p(t),a=F(i),d=p(i),c=!!n&&!!d&&n===d,m={selected:l,from:r,to:a},h=t.group,u=i.group;return h&&u&&"function"==typeof s?s.call(null,m):c},this._onCalciteListOrderChange=e=>{const{_lastDragDetail:t}=this,{toEl:i,fromEl:o,dragEl:s,newIndex:l}=e;if(!o||!i||t?.newIndex===l&&t?.dragEl===s&&t?.toEl===i&&t?.fromEl===o)return;this._lastDragDetail=e,this._selectedDragItemLayerUid=s.value;const r=Array.from(o.children).filter(e=>e?.matches("calcite-list-item")).map(e=>e.value);M(this.map?.tables,r)},this._onSelectedDragItemLayerUidChange=e=>{this._selectedDragItemLayerUid=e},this._onTriggerAction=(e,t)=>{this.triggerAction(e,t)},this._onPanelOpen=()=>{this._focusPanelFlowItem=!0}}initialize(){this.addHandles([o(()=>this.viewModel.tableItems,"change",()=>h(this.selectedItems),l),s(()=>[this.filterPredicate,this._rootListEl],()=>u(this._rootListEl,this.filterPredicate))])}loadDependencies(){return g({button:()=>import("@esri/calcite-components/dist/components/calcite-button"),flow:()=>import("@esri/calcite-components/dist/components/calcite-flow"),"flow-item":()=>import("@esri/calcite-components/dist/components/calcite-flow-item"),list:()=>import("@esri/calcite-components/dist/components/calcite-list"),notice:()=>import("@esri/calcite-components/dist/components/calcite-notice")})}get _dragEnabled(){return this.viewModel.totalItems>=this.minDragEnabledItems&&this.dragEnabled}get _filterEnabled(){return this.viewModel.totalItems>=this.minFilterItems&&this.visibleElements.filter}get _visibleItems(){return this.tableItems?.filter(e=>!e.hidden&&(this.visibleElements.errors||!e.error))}get _openedPanelItems(){return this._visibleItems.filter(({hidden:e,panel:t})=>!e&&t?.open&&!t.disabled&&t.flowEnabled)}get icon(){return"table"}set icon(e){this._overrideIfSome("icon",e)}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get listItemCreatedFunction(){return this.viewModel.listItemCreatedFunction}set listItemCreatedFunction(e){this.viewModel.listItemCreatedFunction=e}get map(){return this.viewModel.map}set map(e){this.viewModel.map=e}get tableItems(){return this.viewModel.tableItems}get tables(){return this.viewModel.tables}set tables(e){this.viewModel.tables=e}triggerAction(e,t){return this.viewModel.triggerAction(e,t)}render(){const e=this.viewModel?.state,t={[f.hidden]:"loading"===e,[f.disabled]:"disabled"===e};return b("div",{class:this.classes(y.base,f.widget,f.panel,t)},this._renderItems())}_renderNoItemsMessage(){return b("div",{slot:"message"},this.messages.noItemsToDisplay)}_renderNoItems(){return b("div",{class:y.itemMessage,key:"esri-layer-list__no-items"},b("calcite-notice",{icon:"information",kind:"info",open:!0,width:"full"},this._renderNoItemsMessage()))}_renderPanelFlowItems(){const{_openedPanelItems:e}=this;return e.toArray().map(({title:t,panel:i},o)=>{const s=()=>this._handlePanelFlowItemBack(i);return b("calcite-flow-item",{afterCreate:this._focusPanelFlowItemNode,afterUpdate:this._focusPanelFlowItemNode,bind:this,description:t,heading:i.title,headingLevel:this.headingLevel,key:`flow-panel-${i.uid}`,selected:o===e.length-1,onCalciteFlowItemBack:e=>{e.preventDefault(),s()}},i.render(),b("calcite-button",{appearance:"transparent",onclick:s,slot:"footer-actions",width:"full"},this.messagesCommon.back))})}_handlePanelFlowItemBack(e){e.open=!1,this._focusRootFlowItem=!0}_focusRootFlowItemNode(e){this._focusRootFlowItem&&(this._focusRootFlowItem=!1,w(e))}_focusPanelFlowItemNode(e){this._focusPanelFlowItem&&(this._focusPanelFlowItem=!1,w(e))}_renderItems(){const{visible:e,collapsed:t,visibleElements:{closeButton:i,collapseButton:o,heading:s,flow:l},_dragEnabled:r,_visibleItems:n,_filterEnabled:a,_rootGroupUid:d,_openedPanelItems:c,selectionMode:m,messages:p,filterPlaceholder:h,filterText:u}=this,g=[b("calcite-flow-item",{afterCreate:this._focusRootFlowItemNode,afterUpdate:this._focusRootFlowItemNode,bind:this,closable:i,closed:!e,collapsed:t,collapsible:o,heading:s?p.widgetLabel:void 0,headingLevel:this.headingLevel,key:"root-flow-item",selected:!c.length,onCalciteFlowItemClose:()=>this.visible=!1},n?.length?null:this._renderNoItems(),b("calcite-list",{afterCreate:e=>{this._rootListEl=e},afterRemoved:()=>{this._rootListEl=null},canPull:e=>this._canMove(e,"pull"),canPut:e=>this._canMove(e,"put"),"data-layer-type":d,displayMode:P,dragEnabled:r,filterEnabled:a,filterPlaceholder:h,filterProps:I,filterText:a?u:"",group:d,key:"root-list",label:p.widgetLabel,selectionAppearance:"border",selectionMode:m,onCalciteListChange:e=>this._handleCalciteListChange(e),onCalciteListDragEnd:e=>this._handleCalciteListDragEnd(e.detail),onCalciteListFilter:e=>this.filterText=e.currentTarget?.filterText??"",onCalciteListOrderChange:e=>this._onCalciteListOrderChange(e.detail)},n.toArray().map(e=>this._renderItem(e)),a?b("div",{class:y.filterNoResults,slot:"filter-no-results"},b("calcite-notice",{kind:"info",open:!0,width:"full"},this._renderNoItemsMessage())):null)),this._renderPanelFlowItems()];return e?l?b("calcite-flow",{key:"root-flow"},g):g:null}_handleCalciteListDragEnd(e){const{fromEl:t,dragEl:i,oldIndex:o}=e;t.insertBefore(i,t.children[o])}_renderItem(e){return b(d,{canMove:this._canMove,css:y,displayMode:P,dragEnabled:this.dragEnabled,item:e,key:`layerListItem-${e.layer.uid}`,listModeDisabled:this.viewModel.listModeDisabled,messages:this.messages,messagesCommon:this.messagesCommon,rootGroupUid:this._rootGroupUid,selectedDragItemLayerUid:this._selectedDragItemLayerUid,selectedItems:this.selectedItems,selectionMode:this.selectionMode,visibleElements:this.visibleElements,onAction:this._onTriggerAction,onPanelOpen:this._onPanelOpen,onSelectedDragItemLayerUidChange:this._onSelectedDragItemLayerUidChange})}_handleCalciteListChange(e){const{selectionMode:t,selectedItems:i}=this;if("none"===t)return;const o=e.target.selectedItems.map(e=>F(e)).filter(Boolean);i.removeAll(),i.addMany(o)}};e([r()],T.prototype,"_rootListEl",void 0),e([r()],T.prototype,"_focusRootFlowItem",void 0),e([r()],T.prototype,"_focusPanelFlowItem",void 0),e([r()],T.prototype,"_dragEnabled",null),e([r()],T.prototype,"_filterEnabled",null),e([r()],T.prototype,"_visibleItems",null),e([r()],T.prototype,"_openedPanelItems",null),e([r()],T.prototype,"collapsed",void 0),e([r()],T.prototype,"dragEnabled",void 0),e([r()],T.prototype,"filterPlaceholder",void 0),e([r()],T.prototype,"filterPredicate",void 0),e([r()],T.prototype,"filterText",void 0),e([r()],T.prototype,"headingLevel",void 0),e([r()],T.prototype,"icon",null),e([r()],T.prototype,"label",null),e([r()],T.prototype,"listItemCanGiveFunction",void 0),e([r()],T.prototype,"listItemCanReceiveFunction",void 0),e([r()],T.prototype,"listItemCreatedFunction",null),e([r()],T.prototype,"map",null),e([r(),_("esri/widgets/TableList/t9n/TableList")],T.prototype,"messages",void 0),e([r(),_("esri/t9n/common")],T.prototype,"messagesCommon",void 0),e([r()],T.prototype,"minDragEnabledItems",void 0),e([r()],T.prototype,"minFilterItems",void 0),e([r({type:D})],T.prototype,"selectedItems",void 0),e([r()],T.prototype,"selectionMode",void 0),e([r({readOnly:!0})],T.prototype,"tableItems",null),e([r()],T.prototype,"tables",null),e([v("trigger-action"),r({type:E})],T.prototype,"viewModel",void 0),e([r({type:C,nonNullable:!0})],T.prototype,"visibleElements",void 0),T=e([n("esri.widgets.TableList")],T);const U=T;export{U as default};
5
+ import{__decorate as e}from"tslib";import t from"../core/Collection.js";import{IdentifiableMixin as i}from"../core/Identifiable.js";import{on as o,watch as s,initial as l}from"../core/reactiveUtils.js";import{property as r,subclass as n}from"../core/accessorSupport/decorators.js";import a from"./Widget.js";import d from"./LayerList/LayerListItem.js";import{minDragEnabledItems as c,minFilterItems as m,getLayerType as p,removeDestroyedListItems as h,setFilterPredicate as u}from"./LayerList/support/layerListUtils.js";import{loadCalciteComponents as g}from"./support/componentsUtils.js";import{globalCss as f}from"./support/globalCss.js";import{calciteListFilterProps as I}from"./support/listUtils.js";import{tsx as b,messageBundle as _,vmEvent as v}from"./support/widget.js";import{setFocus as w}from"./support/widgetUtils.js";import{css as y}from"./TableList/css.js";import L from"./TableList/ListItem.js";import E from"./TableList/TableListViewModel.js";import C from"./TableList/TableListVisibleElements.js";import{getItem as F,sortTablesToIds as M}from"./TableList/support/tableListUtils.js";const P="nested",D=t.ofType(L);let T=class extends(i(a)){constructor(e,t){super(e,t),this._rootListEl=null,this._focusRootFlowItem=!1,this._focusPanelFlowItem=!1,this._lastDragDetail=null,this._selectedDragItemLayerUid=null,this._rootGroupUid=`table-${this.uid}`,this.collapsed=!1,this.dragEnabled=!1,this.filterPlaceholder="",this.filterPredicate=null,this.filterText="",this.headingLevel=2,this.listItemCanGiveFunction=null,this.listItemCanReceiveFunction=null,this.messages=null,this.messagesCommon=null,this.minDragEnabledItems=c,this.minFilterItems=m,this.selectedItems=new D,this.selectionMode="none",this.viewModel=new E,this.visibleElements=new C,this._canMove=({dragEl:e,fromEl:t,toEl:i},o)=>{const s="pull"===o?this.listItemCanGiveFunction:this.listItemCanReceiveFunction,l=F(e);if(!l?.sortable)return!1;const r=F(t),n=p(t),a=F(i),d=p(i),c=!!n&&!!d&&n===d,m={selected:l,from:r,to:a},h=t.group,u=i.group;return h&&u&&"function"==typeof s?s.call(null,m):c},this._onCalciteListOrderChange=e=>{const{_lastDragDetail:t}=this,{toEl:i,fromEl:o,dragEl:s,newIndex:l}=e;if(!o||!i||t?.newIndex===l&&t?.dragEl===s&&t?.toEl===i&&t?.fromEl===o)return;this._lastDragDetail=e,this._selectedDragItemLayerUid=s.value;const r=Array.from(o.children).filter(e=>e?.matches("calcite-list-item")).map(e=>e.value);M(this.map?.tables,r)},this._onSelectedDragItemLayerUidChange=e=>{this._selectedDragItemLayerUid=e},this._onTriggerAction=(e,t)=>{this.triggerAction(e,t)},this._onPanelOpen=()=>{this._focusPanelFlowItem=!0}}initialize(){this.addHandles([o(()=>this.viewModel.tableItems,"change",()=>h(this.selectedItems),l),s(()=>[this.filterPredicate,this._rootListEl],()=>u(this._rootListEl,this.filterPredicate))])}loadDependencies(){return g({button:()=>import("@esri/calcite-components/dist/components/calcite-button"),flow:()=>import("@esri/calcite-components/dist/components/calcite-flow"),"flow-item":()=>import("@esri/calcite-components/dist/components/calcite-flow-item"),list:()=>import("@esri/calcite-components/dist/components/calcite-list"),notice:()=>import("@esri/calcite-components/dist/components/calcite-notice")})}get _dragEnabled(){return this.viewModel.totalItems>=this.minDragEnabledItems&&this.dragEnabled}get _filterEnabled(){return this.viewModel.totalItems>=this.minFilterItems&&this.visibleElements.filter}get _visibleItems(){return this.tableItems?.filter(e=>!e.hidden&&(this.visibleElements.errors||!e.error))}get _openedPanelItems(){return this._visibleItems.filter(({hidden:e,panel:t})=>!e&&t?.open&&!t.disabled&&t.flowEnabled)}get icon(){return"table"}set icon(e){this._overrideIfSome("icon",e)}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get listItemCreatedFunction(){return this.viewModel.listItemCreatedFunction}set listItemCreatedFunction(e){this.viewModel.listItemCreatedFunction=e}get map(){return this.viewModel.map}set map(e){this.viewModel.map=e}get tableItems(){return this.viewModel.tableItems}get tables(){return this.viewModel.tables}set tables(e){this.viewModel.tables=e}triggerAction(e,t){return this.viewModel.triggerAction(e,t)}render(){const e=this.viewModel?.state,t={[f.hidden]:"loading"===e,[f.disabled]:"disabled"===e};return b("div",{class:this.classes(y.base,f.widget,f.panel,t)},this._renderItems())}_renderNoItemsMessage(){return b("div",{slot:"message"},this.messages.noItemsToDisplay)}_renderNoItems(){return b("div",{class:y.itemMessage,key:"esri-layer-list__no-items"},b("calcite-notice",{icon:"information",kind:"info",open:!0,width:"full"},this._renderNoItemsMessage()))}_renderPanelFlowItems(){const{_openedPanelItems:e}=this;return e.toArray().map(({title:t,panel:i},o)=>{const s=()=>this._handlePanelFlowItemBack(i);return b("calcite-flow-item",{afterCreate:this._focusPanelFlowItemNode,afterUpdate:this._focusPanelFlowItemNode,bind:this,description:t,heading:i.title,headingLevel:this.headingLevel,key:`flow-panel-${i.uid}`,selected:o===e.length-1,onCalciteFlowItemBack:e=>{e.preventDefault(),s()}},i.render(),b("calcite-button",{appearance:"transparent",onclick:s,slot:"footer-start",width:"full"},this.messagesCommon.back))})}_handlePanelFlowItemBack(e){e.open=!1,this._focusRootFlowItem=!0}_focusRootFlowItemNode(e){this._focusRootFlowItem&&(this._focusRootFlowItem=!1,w(e))}_focusPanelFlowItemNode(e){this._focusPanelFlowItem&&(this._focusPanelFlowItem=!1,w(e))}_renderItems(){const{visible:e,collapsed:t,visibleElements:{closeButton:i,collapseButton:o,heading:s,flow:l},_dragEnabled:r,_visibleItems:n,_filterEnabled:a,_rootGroupUid:d,_openedPanelItems:c,selectionMode:m,messages:p,filterPlaceholder:h,filterText:u}=this,g=[b("calcite-flow-item",{afterCreate:this._focusRootFlowItemNode,afterUpdate:this._focusRootFlowItemNode,bind:this,closable:i,closed:!e,collapsed:t,collapsible:o,heading:s?p.widgetLabel:void 0,headingLevel:this.headingLevel,key:"root-flow-item",selected:!c.length,onCalciteFlowItemClose:()=>this.visible=!1},n?.length?null:this._renderNoItems(),b("calcite-list",{afterCreate:e=>{this._rootListEl=e},afterRemoved:()=>{this._rootListEl=null},canPull:e=>this._canMove(e,"pull"),canPut:e=>this._canMove(e,"put"),"data-layer-type":d,displayMode:P,dragEnabled:r,filterEnabled:a,filterPlaceholder:h,filterProps:I,filterText:a?u:"",group:d,key:"root-list",label:p.widgetLabel,selectionAppearance:"border",selectionMode:m,onCalciteListChange:e=>this._handleCalciteListChange(e),onCalciteListDragEnd:e=>this._handleCalciteListDragEnd(e.detail),onCalciteListFilter:e=>this.filterText=e.currentTarget?.filterText??"",onCalciteListOrderChange:e=>this._onCalciteListOrderChange(e.detail)},n.toArray().map(e=>this._renderItem(e)),a?b("div",{class:y.filterNoResults,slot:"filter-no-results"},b("calcite-notice",{kind:"info",open:!0,width:"full"},this._renderNoItemsMessage())):null)),this._renderPanelFlowItems()];return e?l?b("calcite-flow",{key:"root-flow"},g):g:null}_handleCalciteListDragEnd(e){const{fromEl:t,dragEl:i,oldIndex:o}=e;t.insertBefore(i,t.children[o])}_renderItem(e){return b(d,{canMove:this._canMove,css:y,displayMode:P,dragEnabled:this.dragEnabled,item:e,key:`layerListItem-${e.layer.uid}`,listModeDisabled:this.viewModel.listModeDisabled,messages:this.messages,messagesCommon:this.messagesCommon,rootGroupUid:this._rootGroupUid,selectedDragItemLayerUid:this._selectedDragItemLayerUid,selectedItems:this.selectedItems,selectionMode:this.selectionMode,visibleElements:this.visibleElements,onAction:this._onTriggerAction,onPanelOpen:this._onPanelOpen,onSelectedDragItemLayerUidChange:this._onSelectedDragItemLayerUidChange})}_handleCalciteListChange(e){const{selectionMode:t,selectedItems:i}=this;if("none"===t)return;const o=e.target.selectedItems.map(e=>F(e)).filter(Boolean);i.removeAll(),i.addMany(o)}};e([r()],T.prototype,"_rootListEl",void 0),e([r()],T.prototype,"_focusRootFlowItem",void 0),e([r()],T.prototype,"_focusPanelFlowItem",void 0),e([r()],T.prototype,"_dragEnabled",null),e([r()],T.prototype,"_filterEnabled",null),e([r()],T.prototype,"_visibleItems",null),e([r()],T.prototype,"_openedPanelItems",null),e([r()],T.prototype,"collapsed",void 0),e([r()],T.prototype,"dragEnabled",void 0),e([r()],T.prototype,"filterPlaceholder",void 0),e([r()],T.prototype,"filterPredicate",void 0),e([r()],T.prototype,"filterText",void 0),e([r()],T.prototype,"headingLevel",void 0),e([r()],T.prototype,"icon",null),e([r()],T.prototype,"label",null),e([r()],T.prototype,"listItemCanGiveFunction",void 0),e([r()],T.prototype,"listItemCanReceiveFunction",void 0),e([r()],T.prototype,"listItemCreatedFunction",null),e([r()],T.prototype,"map",null),e([r(),_("esri/widgets/TableList/t9n/TableList")],T.prototype,"messages",void 0),e([r(),_("esri/t9n/common")],T.prototype,"messagesCommon",void 0),e([r()],T.prototype,"minDragEnabledItems",void 0),e([r()],T.prototype,"minFilterItems",void 0),e([r({type:D})],T.prototype,"selectedItems",void 0),e([r()],T.prototype,"selectionMode",void 0),e([r({readOnly:!0})],T.prototype,"tableItems",null),e([r()],T.prototype,"tables",null),e([v("trigger-action"),r({type:E})],T.prototype,"viewModel",void 0),e([r({type:C,nonNullable:!0})],T.prototype,"visibleElements",void 0),T=e([n("esri.widgets.TableList")],T);const U=T;export{U as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import{deprecateWidget as t}from"../core/deprecate.js";import i from"../core/Logger.js";import{property as s,subclass as o}from"../core/accessorSupport/decorators.js";import{systemTimeZone as n,system as r,unknown as a}from"../time/constants.js";import c from"./Widget.js";import{loadCalciteComponents as l}from"./support/componentsUtils.js";import{globalCss as d}from"./support/globalCss.js";import{messageBundle as p,isRTL as m,tsx as h}from"./support/widget.js";import{css as b}from"./TimeZoneLabel/css.js";import g from"./TimeZoneLabel/TimeZoneLabelViewModel.js";let v=class extends c{constructor(e,s){super(e,s),this.disabled=!1,this.expanded=!1,this.messages=null,this.viewModel=new g,this._onExpanderClick=()=>{this.expanded=!this.expanded},t(i.getLogger(this),"Time Zone Label","arcgis-time-zone-label",{version:"4.33"})}loadDependencies(){return l({action:()=>import("@esri/calcite-components/dist/components/calcite-action"),icon:()=>import("@esri/calcite-components/dist/components/calcite-icon"),"input-time-zone":()=>import("@esri/calcite-components/dist/components/calcite-input-time-zone"),label:()=>import("@esri/calcite-components/dist/components/calcite-label")})}get expandDirection(){if(!this.view||!this.container)return"end";const e=m();switch(this.view.ui.getPosition(this.container)){case"top-right":case"bottom-right":case"top-trailing":case"bottom-trailing":return e?"end":"start";case"top-left":case"bottom-left":case"top-leading":case"bottom-leading":return e?"start":"end";default:return"end"}}set expandDirection(e){this._overrideIfSome("expandDirection",e)}get icon(){return"time-zone"}set icon(e){this._overrideIfSome("icon",e)}get interactive(){return!(this.disabled||"disabled"===this.viewModel.state)}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}render(){const{expandDirection:e,interactive:t,label:i}=this,s=this.classes(b.base,d.widget,!t&&d.disabled),o=[this._renderExpander(),this._renderName(),this._renderBadge()];return"start"===e&&o.reverse(),h("div",{"aria-label":i,class:s},o)}_getIcon(){const{expanded:e,expandDirection:t}=this;return e?m()?"start"===t?"chevrons-left":"chevrons-right":"start"===t?"chevrons-right":"chevrons-left":"time-zone"}_renderExpander(){const{interactive:e,label:t}=this,i=this._getIcon();return h("calcite-action",{active:!1,class:b.expander,disabled:!e,icon:i,key:b.expander,onclick:this._onExpanderClick,scale:"s",text:t,title:t})}_renderBadge(){const{expanded:e,interactive:t}=this;return h("div",{class:this.classes(b.badge,!e&&b.badgeHidden,!t&&b.badgeDisabled)},h("calcite-icon",{class:b.badgeIcon,icon:"time-zone",scale:"s"}))}_renderName(){const e=this.viewModel.view?.timeZone,t=e===r?n:e,i=e===a;return[h("calcite-label",{class:this.classes(b.label,(!this.expanded||!i)&&b.labelHidden,!this.interactive&&b.labelDisabled)},this.messages.noAdjustment),h("calcite-input-time-zone",{class:this.classes(b.name,(!this.expanded||!t||i)&&b.nameHidden),disabled:!this.interactive,mode:"region",readOnly:!0,value:t})]}};e([s()],v.prototype,"disabled",void 0),e([s()],v.prototype,"expandDirection",null),e([s()],v.prototype,"expanded",void 0),e([s()],v.prototype,"icon",null),e([s({readOnly:!0})],v.prototype,"interactive",null),e([s()],v.prototype,"label",null),e([s(),p("esri/widgets/TimeZoneLabel/t9n/TimeZoneLabel")],v.prototype,"messages",void 0),e([s()],v.prototype,"view",null),e([s()],v.prototype,"viewModel",void 0),v=e([o("esri.widgets.TimeZoneLabel")],v);const u=v;export{u as default};
5
+ import{__decorate as e}from"tslib";import{deprecateWidget as t}from"../core/deprecate.js";import i from"../core/Logger.js";import{property as s,subclass as o}from"../core/accessorSupport/decorators.js";import{systemTimeZone as n,system as r,unknown as a}from"../time/constants.js";import c from"./Widget.js";import{loadCalciteComponents as l}from"./support/componentsUtils.js";import{globalCss as d}from"./support/globalCss.js";import{messageBundle as p,isRTL as m,tsx as h}from"./support/widget.js";import{css as b}from"./TimeZoneLabel/css.js";import g from"./TimeZoneLabel/TimeZoneLabelViewModel.js";let v=class extends c{constructor(e,s){super(e,s),this.disabled=!1,this.expanded=!1,this.messages=null,this.viewModel=new g,this._onExpanderClick=()=>{this.expanded=!this.expanded},t(i.getLogger(this),"Time Zone Label","arcgis-time-zone-label",{version:"4.33"})}loadDependencies(){return l({action:()=>import("@esri/calcite-components/dist/components/calcite-action"),icon:()=>import("@esri/calcite-components/dist/components/calcite-icon"),"input-time-zone":()=>import("@esri/calcite-components/dist/components/calcite-input-time-zone"),label:()=>import("@esri/calcite-components/dist/components/calcite-label")})}get expandDirection(){if(!this.view||!this.container)return"end";const e=m();switch(this.view.ui.getPosition(this.container)){case"top-right":case"bottom-right":case"top-trailing":case"bottom-trailing":return e?"end":"start";case"top-left":case"bottom-left":case"top-leading":case"bottom-leading":return e?"start":"end";default:return"end"}}set expandDirection(e){this._overrideIfSome("expandDirection",e)}get icon(){return"time-zone"}set icon(e){this._overrideIfSome("icon",e)}get interactive(){return!(this.disabled||"disabled"===this.viewModel.state)}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}render(){const{expandDirection:e,interactive:t,label:i}=this,s=this.classes(b.base,d.widget,!t&&d.disabled),o=[this._renderExpander(),this._renderName(),this._renderBadge()];return"start"===e&&o.reverse(),h("div",{"aria-label":i,class:s},o)}_getIcon(){const{expanded:e,expandDirection:t}=this;return e?m()?"start"===t?"chevrons-left":"chevrons-right":"start"===t?"chevrons-right":"chevrons-left":"time-zone"}_renderExpander(){const{interactive:e,label:t}=this,i=this._getIcon();return h("calcite-action",{active:!1,class:b.expander,disabled:!e,icon:i,key:b.expander,onclick:this._onExpanderClick,text:t,title:t})}_renderBadge(){const{expanded:e,interactive:t}=this;return h("div",{class:this.classes(b.badge,!e&&b.badgeHidden,!t&&b.badgeDisabled)},h("calcite-icon",{class:b.badgeIcon,icon:"time-zone",scale:"s"}))}_renderName(){const e=this.viewModel.view?.timeZone,t=e===r?n:e,i=e===a;return[h("calcite-label",{class:this.classes(b.label,(!this.expanded||!i)&&b.labelHidden,!this.interactive&&b.labelDisabled)},this.messages.noAdjustment),h("calcite-input-time-zone",{class:this.classes(b.name,(!this.expanded||!t||i)&&b.nameHidden),disabled:!this.interactive,mode:"region",readOnly:!0,value:t})]}};e([s()],v.prototype,"disabled",void 0),e([s()],v.prototype,"expandDirection",null),e([s()],v.prototype,"expanded",void 0),e([s()],v.prototype,"icon",null),e([s({readOnly:!0})],v.prototype,"interactive",null),e([s()],v.prototype,"label",null),e([s(),p("esri/widgets/TimeZoneLabel/t9n/TimeZoneLabel")],v.prototype,"messages",void 0),e([s()],v.prototype,"view",null),e([s()],v.prototype,"viewModel",void 0),v=e([o("esri.widgets.TimeZoneLabel")],v);const u=v;export{u as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as t}from"tslib";import{watch as i,on as s,initial as e}from"../core/reactiveUtils.js";import{property as o,subclass as n}from"../core/accessorSupport/decorators.js";import l from"../symbols/SimpleLineSymbol.js";import a from"./Widget.js";import{loadCalciteComponents as c}from"./support/componentsUtils.js";import{messageBundle as r,tsx as d}from"./support/widget.js";import h from"./UtilityNetworkAssociations/UtilityNetworkAssociationsLineSymbolPicker.js";import m from"./UtilityNetworkAssociations/UtilityNetworkAssociationsViewModel.js";import A from"./UtilityNetworkAssociations/VisibleElements.js";const u="esri-un-associations",w={action:`${u}__action`,actionRefresh:`${u}__action-refresh`,blockContent:`${u}__block-content`,blockSectionSettings:`${u}__block-section-settings`,combobox:`${u}__combobox`,comboboxItem:`${u}__combobox-item`,divControlsMain:`${u}__div-controls-main`,label:`${u}__label`,labelAndCombobox:`${u}__label-and-combobox`,labelAndSlider:`${u}__label-and-slider`,labelAndToggle:`${u}__label-and-toggle`,panel:`${u}__panel`,slider:`${u}__slider`,statusIconContainer:`${u}__status-icon-container`,statusIconWarning:`${u}__status-icon-warning`,switch:`${u}__switch`,switchContainer:`${u}__switch-container`,widgetContainer:`${u}__widget-container`};let b=class extends a{constructor(t,i){super(t,i),this._autoRefreshAssociations=!0,this._associationsOptionsEnabled=!1,this._maxAllowableAssociationsSliderMax=1e3,this._maxAllowableAssociationsSliderMin=250,this._maxAllowableAssociationsSliderStep=250,this.messages=null,this.messagesCommon=null,this.viewModel=new m,this.visibleElements=new A}initialize(){this.addHandles([i(()=>[this.view?.stationary,this.showAssociationsEnabled,this.includeConnectivityAssociations,this.includeStructuralAttachmentAssociations,this.maxAllowableAssociations],()=>{!0===this.autoRefreshAssociations&&(!0===this.showAssociationsEnabled?this.viewModel.showAssociations():this.viewModel.removeAssociations())}),i(()=>this.view?.map?.utilityNetworks,t=>{t?.items.forEach(async(t,i)=>{t.loaded||await t.load(),0===i&&(this.utilityNetwork=t)})},e),s(()=>this.view?.map?.utilityNetworks,"change",t=>{const i=t.target;t.added.forEach(async t=>{t.loaded||await t.load()}),t.removed.some(t=>t.layerUrl===this.utilityNetwork?.layerUrl)&&(this.utilityNetwork=null),this.utilityNetwork=i.length?i.getItemAt(0):null})])}get autoRefreshAssociations(){return this._autoRefreshAssociations}set autoRefreshAssociations(t){this._autoRefreshAssociations=t}get connectivityAssociationsLineSymbol(){return this.viewModel.connectivityAssociationsLineSymbol}set connectivityAssociationsLineSymbol(t){this.viewModel.connectivityAssociationsLineSymbol=t}get icon(){return"view-associations"}set icon(t){this._overrideIfSome("icon",t)}get includeConnectivityAssociations(){return this.viewModel.includeConnectivityAssociations}set includeConnectivityAssociations(t){this.viewModel.includeConnectivityAssociations=t}get includeStructuralAttachmentAssociations(){return this.viewModel.includeStructuralAttachmentAssociations}set includeStructuralAttachmentAssociations(t){this.viewModel.includeStructuralAttachmentAssociations=t}get label(){return this.messages?.widgetLabel??""}set label(t){this._overrideIfSome("label",t)}get maxAllowableAssociations(){return this.viewModel.maxAllowableAssociations}set maxAllowableAssociations(t){this.viewModel.maxAllowableAssociations=t}get maxAllowableAssociationsSliderMax(){return this._maxAllowableAssociationsSliderMax}set maxAllowableAssociationsSliderMax(t){t<=this.maxAllowableAssociationsSliderMin||(this._maxAllowableAssociationsSliderMax=t)}get maxAllowableAssociationsSliderMin(){return this._maxAllowableAssociationsSliderMin}set maxAllowableAssociationsSliderMin(t){t<0||t>=this.maxAllowableAssociationsSliderMax||(this._maxAllowableAssociationsSliderMin=t)}get maxAllowableAssociationsSliderStep(){return this._maxAllowableAssociationsSliderStep}set maxAllowableAssociationsSliderStep(t){this._maxAllowableAssociationsSliderStep=t}get showArrowsConnectivity(){return this.viewModel.showArrowsConnectivity}set showArrowsConnectivity(t){this.viewModel.showArrowsConnectivity=t}get showArrowsStructuralAttachment(){return this.viewModel.showArrowsStructuralAttachment}set showArrowsStructuralAttachment(t){this.viewModel.showArrowsStructuralAttachment=t}get showAssociationsEnabled(){return this.viewModel.showAssociationsEnabled}set showAssociationsEnabled(t){this.viewModel.showAssociationsEnabled=t}get structuralAttachmentAssociationsLineSymbol(){return this.viewModel.structuralAttachmentAssociationsLineSymbol}set structuralAttachmentAssociationsLineSymbol(t){this.viewModel.structuralAttachmentAssociationsLineSymbol=t}get utilityNetwork(){return this.viewModel.utilityNetwork}set utilityNetwork(t){this.viewModel.utilityNetwork=t}get view(){return this.viewModel.view}set view(t){this.viewModel.view=t}render(){const{label:t}=this;return d("div",{class:w.widgetContainer},d("calcite-block",{class:w.blockContent,collapsible:!0,heading:t},this._renderStatusIcon(),this.autoRefreshAssociations?this._renderShowAssociationsSwitch():this._renderRefreshAssociationsAction(),this._renderContent()))}loadDependencies(){return c({action:()=>import("@esri/calcite-components/dist/components/calcite-action"),block:()=>import("@esri/calcite-components/dist/components/calcite-block"),"block-section":()=>import("@esri/calcite-components/dist/components/calcite-block-section"),icon:()=>import("@esri/calcite-components/dist/components/calcite-icon"),combobox:()=>import("@esri/calcite-components/dist/components/calcite-combobox"),"combobox-item":()=>import("@esri/calcite-components/dist/components/calcite-combobox-item"),label:()=>import("@esri/calcite-components/dist/components/calcite-label"),notice:()=>import("@esri/calcite-components/dist/components/calcite-notice"),panel:()=>import("@esri/calcite-components/dist/components/calcite-panel"),slider:()=>import("@esri/calcite-components/dist/components/calcite-slider"),switch:()=>import("@esri/calcite-components/dist/components/calcite-switch"),tooltip:()=>import("@esri/calcite-components/dist/components/calcite-tooltip")})}_connectivityAssociationsSwitchChange(t){this.includeConnectivityAssociations=t.currentTarget.checked}_getLoadErrorMessagesAsNotices(t,i){return d("calcite-notice",{closable:!1,key:`error-notice-${i}`,kind:"warning",open:!0,scale:"s"},d("div",{slot:"message"},t))}_maxAllowableAssociationsSliderChange(t){this.maxAllowableAssociations=Number(t.currentTarget.value)}_refreshAssociations(){const{viewModel:t,viewModel:{state:i}}=this;"ready"!==i&&"warning"!==i||t.showAssociations()}_renderConnectivityAssociationsSettings(){const{messages:{input:{enableConnectivity:t}},visibleElements:{connectivityAssociationsSettings:i}}=this;if(i)return d("calcite-block-section",{class:w.blockSectionSettings,text:t},d(h,{id:`${this.id}-symbol-picker-connectivity`,lineSymbol:this.connectivityAssociationsLineSymbol,showArrows:this.showArrowsConnectivity,visibleElements:i}))}_renderConnectivityAssociationsToggle(){const{messages:{input:{enableConnectivity:t}}}=this;return d("div",{class:w.labelAndToggle,key:"connectivityAssociationsToggleDiv"},d("calcite-label",{class:w.label},t),d("calcite-switch",{bind:this,checked:this.includeConnectivityAssociations,disabled:!this._associationsOptionsEnabled&&this.autoRefreshAssociations,onCalciteSwitchChange:this._connectivityAssociationsSwitchChange}))}_renderComboboxItem({heading:t,value:i,selected:s}){return d("calcite-combobox-item",{class:w.comboboxItem,heading:t,selected:s,textLabel:t,value:i})}_renderContent(){const{viewModel:{loadErrors:t,state:i}}=this;return"disabled"===i?d("div",{class:w.divControlsMain,key:"loadErrorsDiv"},t.items.map(this._getLoadErrorMessagesAsNotices)):d("calcite-panel",{class:w.panel,disabled:"loading"===i},d("div",{class:w.divControlsMain},this._renderConnectivityAssociationsToggle(),this._renderStructuralAttachmentAssociationsToggle(),this._renderSettingsPane()))}_renderLoadingAction(t,i,s){return d("div",{key:t,slot:"control"},d("calcite-action",{id:i,loading:!0,text:s}),d("calcite-tooltip",{overlayPositioning:"fixed",referenceElement:i},d("span",null,s)))}_renderMaxAllowableAssociationsSlider(){const{messages:{input:{maxAllowableAssociations:t}},visibleElements:{maxAllowableAssociationsSlider:i}}=this;if(i)return d("div",{class:w.labelAndSlider,key:"maxAllowableAssociationsSliderDiv"},d("calcite-label",{class:w.label},t),d("calcite-slider",{bind:this,class:w.slider,labelTicks:!0,max:this.maxAllowableAssociationsSliderMax,min:this.maxAllowableAssociationsSliderMin,scale:"s",snap:!0,step:this.maxAllowableAssociationsSliderStep,ticks:this.maxAllowableAssociationsSliderStep,value:this.maxAllowableAssociations,onCalciteSliderChange:this._maxAllowableAssociationsSliderChange}))}_renderRefreshAssociationsAction(){const{messages:{input:{refreshAssociations:t}},messagesCommon:{loading:i},viewModel:{state:s}}=this,e=`${this.id}-refresh-action`;if("disabled"!==s)return d("div",{class:w.actionRefresh,slot:"control"},d("calcite-action",{bind:this,class:w.action,icon:"refresh-f",id:e,loading:"loading"===s,onclick:this._refreshAssociations,text:t}),d("calcite-tooltip",{overlayPositioning:"fixed",referenceElement:e},d("span",null,"loading"===s?i:t)))}_renderSettingsPane(){const{messagesCommon:{settings:t},visibleElements:{maxAllowableAssociationsSlider:i,connectivityAssociationsSettings:s,structuralAttachmentAssociationsSettings:e}}=this,o=(this.view?.map).utilityNetworks?.items;if(1!==o?.length||i||s||e)return d("calcite-block",{class:w.blockContent,collapsible:!0,heading:t},d("div",{class:w.divControlsMain},this._renderUtilityNetworkSettings(),this._renderMaxAllowableAssociationsSlider()),this._renderConnectivityAssociationsSettings(),this._renderStructuralAttachmentAssociationsSettings())}_renderShowAssociationsSwitch(){const{messages:{input:{enableAssociations:t}},messagesCommon:{loading:i},viewModel:{state:s}}=this,e=`${this.id}-show-associations-switch`;if("disabled"!==s)return"loading"===s?this._renderLoadingAction("loadingActionDiv",`${this.id}-loading-action`,i):d("div",{class:w.switchContainer,key:"switchDiv",slot:"control"},d("calcite-switch",{bind:this,checked:this.showAssociationsEnabled,class:w.switch,id:e,onCalciteSwitchChange:this._showAssociationsSwitchChange}),d("calcite-tooltip",{overlayPositioning:"fixed",referenceElement:e},d("span",null,t)))}_renderStatusIcon(){const{messagesCommon:{executing:t},viewModel:{executionError:i,state:s}}=this;switch(s){case"disabled":return this._renderWarningIcon("statusDiv",`${this.id}-disabled-icon`,null);case"warning":return this._renderWarningIcon("statusDiv",`${this.id}-warning-icon`,i);case"executing":return this._renderLoadingAction("executingActionDiv",`${this.id}-executing-action`,t);default:return}}_renderStructuralAttachmentAssociationsSettings(){const{messages:{input:{enableStructuralAttachment:t}},visibleElements:{structuralAttachmentAssociationsSettings:i}}=this;if(i)return d("calcite-block-section",{class:w.blockSectionSettings,text:t},d(h,{id:`${this.id}-symbol-picker-structural-attachment`,lineSymbol:this.structuralAttachmentAssociationsLineSymbol,showArrows:this.showArrowsStructuralAttachment,visibleElements:i}))}_renderStructuralAttachmentAssociationsToggle(){const{messages:{input:{enableStructuralAttachment:t}}}=this;return d("div",{class:w.labelAndToggle,key:"structuralAttachmentAssociationsToggleDiv"},d("calcite-label",{class:w.label},t),d("calcite-switch",{bind:this,checked:this.includeStructuralAttachmentAssociations,disabled:!this._associationsOptionsEnabled&&this.autoRefreshAssociations,onCalciteSwitchChange:this._structuralAttAssociationsSwitchChange}))}_renderUtilityNetworkSettings(){const{messages:{input:{utilityNetwork:t}}}=this,i=(this.view?.map).utilityNetworks?.items;if(1===i?.length)return null;const s=i?.map(t=>{const i=t.title,s=t.layerUrl,e=t.layerUrl===this.utilityNetwork?.layerUrl;return this._renderComboboxItem({heading:i,value:s,selected:e})});return d("div",{class:w.labelAndCombobox,key:"utilityNetworkComboboxDiv"},d("calcite-label",{class:w.label},t),d("calcite-combobox",{class:w.combobox,clearDisabled:!0,label:"",maxItems:3,overlayPositioning:"fixed",selectionMode:"single-persist",onCalciteComboboxChange:t=>{const s=i?.find(i=>i.layerUrl===t.currentTarget.value);this.utilityNetwork=s}},s))}_showAssociationsSwitchChange({currentTarget:t}){const{viewModel:i}=this;this.showAssociationsEnabled=t.checked,this._associationsOptionsEnabled=t.checked,this.showAssociationsEnabled||i.removeAssociations()}_structuralAttAssociationsSwitchChange(t){this.includeStructuralAttachmentAssociations=t.currentTarget.checked}_renderWarningIcon(t,i,s){return s?d("div",{class:w.statusIconContainer,key:t,slot:"control"},d("calcite-icon",{class:w.statusIconWarning,icon:"exclamation-mark-triangle",id:i,scale:"s"}),d("calcite-tooltip",{overlayPositioning:"fixed",referenceElement:i},d("span",null,s))):d("div",{class:w.statusIconContainer,key:t,slot:"control"},d("calcite-icon",{class:w.statusIconWarning,icon:"exclamation-mark-triangle",id:i,scale:"s"}))}};t([o()],b.prototype,"autoRefreshAssociations",null),t([o({type:l})],b.prototype,"connectivityAssociationsLineSymbol",null),t([o()],b.prototype,"icon",null),t([o()],b.prototype,"includeConnectivityAssociations",null),t([o()],b.prototype,"includeStructuralAttachmentAssociations",null),t([o()],b.prototype,"label",null),t([o()],b.prototype,"maxAllowableAssociations",null),t([o()],b.prototype,"maxAllowableAssociationsSliderMax",null),t([o()],b.prototype,"maxAllowableAssociationsSliderMin",null),t([o()],b.prototype,"maxAllowableAssociationsSliderStep",null),t([o(),r("esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations")],b.prototype,"messages",void 0),t([o(),r("esri/t9n/common")],b.prototype,"messagesCommon",void 0),t([o()],b.prototype,"showArrowsConnectivity",null),t([o()],b.prototype,"showArrowsStructuralAttachment",null),t([o()],b.prototype,"showAssociationsEnabled",null),t([o({type:l})],b.prototype,"structuralAttachmentAssociationsLineSymbol",null),t([o()],b.prototype,"utilityNetwork",null),t([o()],b.prototype,"view",null),t([o({type:m})],b.prototype,"viewModel",void 0),t([o({type:A,nonNullable:!0})],b.prototype,"visibleElements",void 0),b=t([n("esri.widgets.UtilityNetworkAssociations")],b);const p=b;export{p as default};
5
+ import{__decorate as t}from"tslib";import{watch as i,on as s,initial as e}from"../core/reactiveUtils.js";import{property as o,subclass as n}from"../core/accessorSupport/decorators.js";import l from"../symbols/SimpleLineSymbol.js";import a from"./Widget.js";import{loadCalciteComponents as c}from"./support/componentsUtils.js";import{messageBundle as r,tsx as d}from"./support/widget.js";import h from"./UtilityNetworkAssociations/UtilityNetworkAssociationsLineSymbolPicker.js";import m from"./UtilityNetworkAssociations/UtilityNetworkAssociationsViewModel.js";import A from"./UtilityNetworkAssociations/VisibleElements.js";const u="esri-un-associations",w={action:`${u}__action`,actionRefresh:`${u}__action-refresh`,blockContent:`${u}__block-content`,blockSectionSettings:`${u}__block-section-settings`,combobox:`${u}__combobox`,comboboxItem:`${u}__combobox-item`,divControlsMain:`${u}__div-controls-main`,label:`${u}__label`,labelAndCombobox:`${u}__label-and-combobox`,labelAndSlider:`${u}__label-and-slider`,labelAndToggle:`${u}__label-and-toggle`,panel:`${u}__panel`,slider:`${u}__slider`,statusIconContainer:`${u}__status-icon-container`,statusIconWarning:`${u}__status-icon-warning`,switch:`${u}__switch`,switchContainer:`${u}__switch-container`,widgetContainer:`${u}__widget-container`};let b=class extends a{constructor(t,i){super(t,i),this._autoRefreshAssociations=!0,this._associationsOptionsEnabled=!1,this._maxAllowableAssociationsSliderMax=1e3,this._maxAllowableAssociationsSliderMin=250,this._maxAllowableAssociationsSliderStep=250,this.messages=null,this.messagesCommon=null,this.viewModel=new m,this.visibleElements=new A}initialize(){this.addHandles([i(()=>[this.view?.stationary,this.showAssociationsEnabled,this.includeConnectivityAssociations,this.includeStructuralAttachmentAssociations,this.maxAllowableAssociations],()=>{!0===this.autoRefreshAssociations&&(!0===this.showAssociationsEnabled?this.viewModel.showAssociations():this.viewModel.removeAssociations())}),i(()=>this.view?.map?.utilityNetworks,t=>{t?.items.forEach(async(t,i)=>{t.loaded||await t.load(),0===i&&(this.utilityNetwork=t)})},e),s(()=>this.view?.map?.utilityNetworks,"change",t=>{const i=t.target;t.added.forEach(async t=>{t.loaded||await t.load()}),t.removed.some(t=>t.layerUrl===this.utilityNetwork?.layerUrl)&&(this.utilityNetwork=null),this.utilityNetwork=i.length?i.getItemAt(0):null})])}get autoRefreshAssociations(){return this._autoRefreshAssociations}set autoRefreshAssociations(t){this._autoRefreshAssociations=t}get connectivityAssociationsLineSymbol(){return this.viewModel.connectivityAssociationsLineSymbol}set connectivityAssociationsLineSymbol(t){this.viewModel.connectivityAssociationsLineSymbol=t}get icon(){return"view-associations"}set icon(t){this._overrideIfSome("icon",t)}get includeConnectivityAssociations(){return this.viewModel.includeConnectivityAssociations}set includeConnectivityAssociations(t){this.viewModel.includeConnectivityAssociations=t}get includeStructuralAttachmentAssociations(){return this.viewModel.includeStructuralAttachmentAssociations}set includeStructuralAttachmentAssociations(t){this.viewModel.includeStructuralAttachmentAssociations=t}get label(){return this.messages?.widgetLabel??""}set label(t){this._overrideIfSome("label",t)}get maxAllowableAssociations(){return this.viewModel.maxAllowableAssociations}set maxAllowableAssociations(t){this.viewModel.maxAllowableAssociations=t}get maxAllowableAssociationsSliderMax(){return this._maxAllowableAssociationsSliderMax}set maxAllowableAssociationsSliderMax(t){t<=this.maxAllowableAssociationsSliderMin||(this._maxAllowableAssociationsSliderMax=t)}get maxAllowableAssociationsSliderMin(){return this._maxAllowableAssociationsSliderMin}set maxAllowableAssociationsSliderMin(t){t<0||t>=this.maxAllowableAssociationsSliderMax||(this._maxAllowableAssociationsSliderMin=t)}get maxAllowableAssociationsSliderStep(){return this._maxAllowableAssociationsSliderStep}set maxAllowableAssociationsSliderStep(t){this._maxAllowableAssociationsSliderStep=t}get showArrowsConnectivity(){return this.viewModel.showArrowsConnectivity}set showArrowsConnectivity(t){this.viewModel.showArrowsConnectivity=t}get showArrowsStructuralAttachment(){return this.viewModel.showArrowsStructuralAttachment}set showArrowsStructuralAttachment(t){this.viewModel.showArrowsStructuralAttachment=t}get showAssociationsEnabled(){return this.viewModel.showAssociationsEnabled}set showAssociationsEnabled(t){this.viewModel.showAssociationsEnabled=t}get structuralAttachmentAssociationsLineSymbol(){return this.viewModel.structuralAttachmentAssociationsLineSymbol}set structuralAttachmentAssociationsLineSymbol(t){this.viewModel.structuralAttachmentAssociationsLineSymbol=t}get utilityNetwork(){return this.viewModel.utilityNetwork}set utilityNetwork(t){this.viewModel.utilityNetwork=t}get view(){return this.viewModel.view}set view(t){this.viewModel.view=t}render(){const{label:t}=this;return d("div",{class:w.widgetContainer},d("calcite-block",{class:w.blockContent,collapsible:!0,heading:t},this._renderStatusIcon(),this.autoRefreshAssociations?this._renderShowAssociationsSwitch():this._renderRefreshAssociationsAction(),this._renderContent()))}loadDependencies(){return c({action:()=>import("@esri/calcite-components/dist/components/calcite-action"),block:()=>import("@esri/calcite-components/dist/components/calcite-block"),"block-section":()=>import("@esri/calcite-components/dist/components/calcite-block-section"),icon:()=>import("@esri/calcite-components/dist/components/calcite-icon"),combobox:()=>import("@esri/calcite-components/dist/components/calcite-combobox"),"combobox-item":()=>import("@esri/calcite-components/dist/components/calcite-combobox-item"),label:()=>import("@esri/calcite-components/dist/components/calcite-label"),notice:()=>import("@esri/calcite-components/dist/components/calcite-notice"),panel:()=>import("@esri/calcite-components/dist/components/calcite-panel"),slider:()=>import("@esri/calcite-components/dist/components/calcite-slider"),switch:()=>import("@esri/calcite-components/dist/components/calcite-switch"),tooltip:()=>import("@esri/calcite-components/dist/components/calcite-tooltip")})}_connectivityAssociationsSwitchChange(t){this.includeConnectivityAssociations=t.currentTarget.checked}_getLoadErrorMessagesAsNotices(t,i){return d("calcite-notice",{closable:!1,key:`error-notice-${i}`,kind:"warning",open:!0,scale:"s"},d("div",{slot:"message"},t))}_maxAllowableAssociationsSliderChange(t){this.maxAllowableAssociations=Number(t.currentTarget.value)}_refreshAssociations(){const{viewModel:t,viewModel:{state:i}}=this;"ready"!==i&&"warning"!==i||t.showAssociations()}_renderConnectivityAssociationsSettings(){const{messages:{input:{enableConnectivity:t}},visibleElements:{connectivityAssociationsSettings:i}}=this;if(i)return d("calcite-block-section",{class:w.blockSectionSettings,text:t},d(h,{id:`${this.id}-symbol-picker-connectivity`,lineSymbol:this.connectivityAssociationsLineSymbol,showArrows:this.showArrowsConnectivity,visibleElements:i}))}_renderConnectivityAssociationsToggle(){const{messages:{input:{enableConnectivity:t}}}=this;return d("div",{class:w.labelAndToggle,key:"connectivityAssociationsToggleDiv"},d("calcite-label",{class:w.label},t),d("calcite-switch",{bind:this,checked:this.includeConnectivityAssociations,disabled:!this._associationsOptionsEnabled&&this.autoRefreshAssociations,onCalciteSwitchChange:this._connectivityAssociationsSwitchChange}))}_renderComboboxItem({heading:t,value:i,selected:s}){return d("calcite-combobox-item",{class:w.comboboxItem,heading:t,selected:s,value:i})}_renderContent(){const{viewModel:{loadErrors:t,state:i}}=this;return"disabled"===i?d("div",{class:w.divControlsMain,key:"loadErrorsDiv"},t.items.map(this._getLoadErrorMessagesAsNotices)):d("calcite-panel",{class:w.panel,disabled:"loading"===i},d("div",{class:w.divControlsMain},this._renderConnectivityAssociationsToggle(),this._renderStructuralAttachmentAssociationsToggle(),this._renderSettingsPane()))}_renderLoadingAction(t,i,s){return d("div",{key:t,slot:"control"},d("calcite-action",{id:i,loading:!0,text:s}),d("calcite-tooltip",{overlayPositioning:"fixed",referenceElement:i},d("span",null,s)))}_renderMaxAllowableAssociationsSlider(){const{messages:{input:{maxAllowableAssociations:t}},visibleElements:{maxAllowableAssociationsSlider:i}}=this;if(i)return d("div",{class:w.labelAndSlider,key:"maxAllowableAssociationsSliderDiv"},d("calcite-label",{class:w.label},t),d("calcite-slider",{bind:this,class:w.slider,labelTicks:!0,max:this.maxAllowableAssociationsSliderMax,min:this.maxAllowableAssociationsSliderMin,scale:"s",snap:!0,step:this.maxAllowableAssociationsSliderStep,ticks:this.maxAllowableAssociationsSliderStep,value:this.maxAllowableAssociations,onCalciteSliderChange:this._maxAllowableAssociationsSliderChange}))}_renderRefreshAssociationsAction(){const{messages:{input:{refreshAssociations:t}},messagesCommon:{loading:i},viewModel:{state:s}}=this,e=`${this.id}-refresh-action`;if("disabled"!==s)return d("div",{class:w.actionRefresh,slot:"control"},d("calcite-action",{bind:this,class:w.action,icon:"refresh-f",id:e,loading:"loading"===s,onclick:this._refreshAssociations,text:t}),d("calcite-tooltip",{overlayPositioning:"fixed",referenceElement:e},d("span",null,"loading"===s?i:t)))}_renderSettingsPane(){const{messagesCommon:{settings:t},visibleElements:{maxAllowableAssociationsSlider:i,connectivityAssociationsSettings:s,structuralAttachmentAssociationsSettings:e}}=this,o=(this.view?.map).utilityNetworks?.items;if(1!==o?.length||i||s||e)return d("calcite-block",{class:w.blockContent,collapsible:!0,heading:t},d("div",{class:w.divControlsMain},this._renderUtilityNetworkSettings(),this._renderMaxAllowableAssociationsSlider()),this._renderConnectivityAssociationsSettings(),this._renderStructuralAttachmentAssociationsSettings())}_renderShowAssociationsSwitch(){const{messages:{input:{enableAssociations:t}},messagesCommon:{loading:i},viewModel:{state:s}}=this,e=`${this.id}-show-associations-switch`;if("disabled"!==s)return"loading"===s?this._renderLoadingAction("loadingActionDiv",`${this.id}-loading-action`,i):d("div",{class:w.switchContainer,key:"switchDiv",slot:"control"},d("calcite-switch",{bind:this,checked:this.showAssociationsEnabled,class:w.switch,id:e,onCalciteSwitchChange:this._showAssociationsSwitchChange}),d("calcite-tooltip",{overlayPositioning:"fixed",referenceElement:e},d("span",null,t)))}_renderStatusIcon(){const{messagesCommon:{executing:t},viewModel:{executionError:i,state:s}}=this;switch(s){case"disabled":return this._renderWarningIcon("statusDiv",`${this.id}-disabled-icon`,null);case"warning":return this._renderWarningIcon("statusDiv",`${this.id}-warning-icon`,i);case"executing":return this._renderLoadingAction("executingActionDiv",`${this.id}-executing-action`,t);default:return}}_renderStructuralAttachmentAssociationsSettings(){const{messages:{input:{enableStructuralAttachment:t}},visibleElements:{structuralAttachmentAssociationsSettings:i}}=this;if(i)return d("calcite-block-section",{class:w.blockSectionSettings,text:t},d(h,{id:`${this.id}-symbol-picker-structural-attachment`,lineSymbol:this.structuralAttachmentAssociationsLineSymbol,showArrows:this.showArrowsStructuralAttachment,visibleElements:i}))}_renderStructuralAttachmentAssociationsToggle(){const{messages:{input:{enableStructuralAttachment:t}}}=this;return d("div",{class:w.labelAndToggle,key:"structuralAttachmentAssociationsToggleDiv"},d("calcite-label",{class:w.label},t),d("calcite-switch",{bind:this,checked:this.includeStructuralAttachmentAssociations,disabled:!this._associationsOptionsEnabled&&this.autoRefreshAssociations,onCalciteSwitchChange:this._structuralAttAssociationsSwitchChange}))}_renderUtilityNetworkSettings(){const{messages:{input:{utilityNetwork:t}}}=this,i=(this.view?.map).utilityNetworks?.items;if(1===i?.length)return null;const s=i?.map(t=>{const i=t.title,s=t.layerUrl,e=t.layerUrl===this.utilityNetwork?.layerUrl;return this._renderComboboxItem({heading:i,value:s,selected:e})});return d("div",{class:w.labelAndCombobox,key:"utilityNetworkComboboxDiv"},d("calcite-label",{class:w.label},t),d("calcite-combobox",{class:w.combobox,clearDisabled:!0,label:"",maxItems:3,overlayPositioning:"fixed",selectionMode:"single-persist",onCalciteComboboxChange:t=>{const s=i?.find(i=>i.layerUrl===t.currentTarget.value);this.utilityNetwork=s}},s))}_showAssociationsSwitchChange({currentTarget:t}){const{viewModel:i}=this;this.showAssociationsEnabled=t.checked,this._associationsOptionsEnabled=t.checked,this.showAssociationsEnabled||i.removeAssociations()}_structuralAttAssociationsSwitchChange(t){this.includeStructuralAttachmentAssociations=t.currentTarget.checked}_renderWarningIcon(t,i,s){return s?d("div",{class:w.statusIconContainer,key:t,slot:"control"},d("calcite-icon",{class:w.statusIconWarning,icon:"exclamation-mark-triangle",id:i,scale:"s"}),d("calcite-tooltip",{overlayPositioning:"fixed",referenceElement:i},d("span",null,s))):d("div",{class:w.statusIconContainer,key:t,slot:"control"},d("calcite-icon",{class:w.statusIconWarning,icon:"exclamation-mark-triangle",id:i,scale:"s"}))}};t([o()],b.prototype,"autoRefreshAssociations",null),t([o({type:l})],b.prototype,"connectivityAssociationsLineSymbol",null),t([o()],b.prototype,"icon",null),t([o()],b.prototype,"includeConnectivityAssociations",null),t([o()],b.prototype,"includeStructuralAttachmentAssociations",null),t([o()],b.prototype,"label",null),t([o()],b.prototype,"maxAllowableAssociations",null),t([o()],b.prototype,"maxAllowableAssociationsSliderMax",null),t([o()],b.prototype,"maxAllowableAssociationsSliderMin",null),t([o()],b.prototype,"maxAllowableAssociationsSliderStep",null),t([o(),r("esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations")],b.prototype,"messages",void 0),t([o(),r("esri/t9n/common")],b.prototype,"messagesCommon",void 0),t([o()],b.prototype,"showArrowsConnectivity",null),t([o()],b.prototype,"showArrowsStructuralAttachment",null),t([o()],b.prototype,"showAssociationsEnabled",null),t([o({type:l})],b.prototype,"structuralAttachmentAssociationsLineSymbol",null),t([o()],b.prototype,"utilityNetwork",null),t([o()],b.prototype,"view",null),t([o({type:m})],b.prototype,"viewModel",void 0),t([o({type:A,nonNullable:!0})],b.prototype,"visibleElements",void 0),b=t([n("esri.widgets.UtilityNetworkAssociations")],b);const p=b;export{p as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import{substitute as t}from"../../intl.js";import i from"../../core/Collection.js";import{watch as o}from"../../core/reactiveUtils.js";import{throttle as s}from"../../core/throttle.js";import{property as n,subclass as r}from"../../core/accessorSupport/decorators.js";import{fetchMessageBundle as l}from"../../intl/messages.js";import{isFeatureLayer as a,isSubtypeSublayer as d}from"../../layers/support/layerUtils.js";import{UtilityNetworkAssociationsContent as c}from"../../popup/content.js";import{substituteActionImage as u,getActionStyles as p}from"../../support/actions/actionUtils.js";import h from"../Feature.js";import m from"../Spinner.js";import g from"../Widget.js";import{css as w}from"../Feature/resources.js";import{FeatureContentMixin as v}from"../Feature/support/FeatureContentMixin.js";import{css as _}from"../Features/css.js";import f from"../Features/FeaturesViewModel.js";import{ActionsCollection as y}from"../Popup/actions.js";import{zoomToLocation as M}from"../Popup/actionUtils.js";import{loadCalciteComponents as F}from"../support/componentsUtils.js";import{globalCss as A}from"../support/globalCss.js";import{Heading as I}from"../support/Heading.js";import{tsx as b,messageBundle as k,vmEvent as T}from"../support/widget.js";import C from"./UtilityNetworkTraceFeaturesDrillIn.js";const W="selected-index",N=0,x="features-spinner",j="esri-utility-network-trace",S={blockContainer:`${j}__block-container`,blockContent:`${j}__block-content`,featureContent:`${j}__feature-content`,paddingBottom:`${j}__pad-bottom`,paddingTop:`${j}__pad-top`};let L=class extends(v(g)){constructor(e,t){super(e,t),this._actionBarMenuNode=null,this._drillInFlowItems=new i,this._drillInWidget=new C({flowItems:this._drillInFlowItems}),this._feature=null,this._featureMenuViewportNode=null,this._spinner=null,this._utilityNetworkTraceMessages=null,this.featureNavigationTop=!1,this.headerActions=new y,this.headingLevel=2,this.messages=null,this.messagesCommon=null,this.responsiveActionsEnabled=!1,this.viewModel=new f,this._renderAction=(e,t)=>{const i=this._getActionTitle(e),{type:o,active:s,uid:n,disabled:r,indicator:l}=e;return e.visible?b("calcite-action",{active:"toggle"===o&&e.value,appearance:"solid",bind:this,"data-action-uid":n,disabled:"zoom-to-feature"===e.id?!this.feature.geometry:r,icon:this._getActionIcon(e),indicator:l,key:`action-${t}`,loading:s,onclick:this._triggerAction,scale:"s",text:i,title:this._hideActionText?i:void 0},this._renderFallbackIcon(e)):null},this._renderAddNsoBlock=()=>{const{_utilityNetworkTraceMessages:e,messagesCommon:t}=this;return b("calcite-block",{class:S.blockContent,expanded:!this.feature,heading:e?.inputsStrings.addNonspatialOption},b("calcite-action",{icon:"x",onclick:()=>this.emit("close-un-trace-feature-block"),slot:"control",text:t.close}),b("calcite-notice",{icon:"information",kind:"info",open:!this.feature},b("div",{slot:"message"},e?.inputsStrings.addNonspatialHint)))},this._renderNoPopupErrorBlock=()=>{const{_utilityNetworkTraceMessages:e,messagesCommon:t}=this;return b("calcite-block",{description:void 0,expanded:!0,heading:"show-feature-info"===this.mode?t.warning:void 0},b("calcite-notice",{class:this.classes(S.paddingBottom,S.paddingTop),icon:"exclamation-mark-triangle",kind:"danger",open:!0},b("div",{slot:"message"},e.alertsStrings.noPopupConfigured)),"show-feature-info"===this.mode?b("calcite-action",{icon:"x",onclick:()=>this.emit("close-un-trace-feature-block"),slot:"control",text:t.close}):void 0)},this._displaySpinnerThrottled=s(()=>this._displaySpinner(),N),this.addHandles([this._displaySpinnerThrottled,o(()=>this.viewModel?.active,e=>this._drillInWidget.closed=!e),o(()=>this.viewModel?.view,(e,t)=>this._viewChange(e,t)),o(()=>this.viewModel?.view?.ready,(e,t)=>this._viewReadyChange(e??!1,t??!1)),o(()=>[this.viewModel?.waitingForResult,this.viewModel?.location],()=>{this._hideSpinner(),this._displaySpinnerThrottled()}),o(()=>this.viewModel?.screenLocation,()=>this._closeOpenActionMenu()),o(()=>this.selectedFeatureWidget,()=>this._destroyDrillInFlowItemWidgets()),o(()=>{const e=this.selectedFeatureWidget?.viewModel;return[e?.title,e?.state]},()=>this._setTitleFromFeatureWidget()),o(()=>{const e=this.selectedFeatureWidget?.viewModel;return[e?.content,e?.state]},()=>this._setContentFromFeatureWidget()),o(()=>this.viewModel?.featureViewModels,()=>this._featureMenuViewportScrollTop()),this._drillInWidget.on("close",()=>{this.emit("close")}),this._drillInWidget.on("exit",()=>this._destroyDrillInFlowItemWidgets()),this._drillInWidget.on("open-feature",({feature:e})=>this._openRelatedFeature(e)),this._drillInWidget.on("zoom-to-feature",({featureWidget:e})=>M(this.viewModel,e)),this._drillInWidget.on("add-nso-trace-location",({featureWidget:e})=>this.emit("add-nso-trace-location",{featureWidget:e}))])}initialize(){(async()=>{this._utilityNetworkTraceMessages=await l("esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace")})(),this._drillInWidget.mode=this.mode,this._drillInWidget.closable=!1}loadDependencies(){return F({action:()=>import("@esri/calcite-components/dist/components/calcite-action"),"action-bar":()=>import("@esri/calcite-components/dist/components/calcite-action-bar"),"action-group":()=>import("@esri/calcite-components/dist/components/calcite-action-group"),block:()=>import("@esri/calcite-components/dist/components/calcite-block"),flow:()=>import("@esri/calcite-components/dist/components/calcite-flow"),"flow-item":()=>import("@esri/calcite-components/dist/components/calcite-flow-item"),notice:()=>import("@esri/calcite-components/dist/components/calcite-notice")})}destroy(){this._destroyDrillInFlowItemWidgets(),this._destroySelectedFeatureWidget(),this._destroySpinner(),this._drillInWidget?.destroy()}get _hideActionText(){if(!this.responsiveActionsEnabled)return!1;const e=this.view?.widthBreakpoint;return"xsmall"===e||"small"===e||"medium"===e}get active(){return this.viewModel.active}get content(){return this.viewModel.content}set content(e){this.viewModel.content=e}get feature(){return this.viewModel.features.length?this.viewModel.features[0]:null}set feature(e){this.viewModel.features=e?[e]:[]}get goToOverride(){return this.viewModel.goToOverride}set goToOverride(e){this.viewModel.goToOverride=e}get hasAssociationsPopupElement(){const e=a(this.feature?.sourceLayer)?this.feature?.sourceLayer:void 0,t=d(this.feature?.sourceLayer)?this.feature?.sourceLayer:void 0,i=e?.popupTemplate||t?.popupTemplate||null,o=i?.content;return!(Array.isArray(o)&&!o.some(e=>e instanceof c))}get hasPopupInfo(){const e=a(this.feature?.sourceLayer)?this.feature?.sourceLayer:void 0,t=d(this.feature?.sourceLayer)?this.feature?.sourceLayer:void 0;return!(!e?.popupTemplate&&!t?.popupTemplate)}get location(){return this.viewModel.location}set location(e){this.viewModel.location=e}get mode(){return this._get("mode")||"add-nso"}set mode(e){this._set("mode",e)}get promises(){return this.viewModel.promises}set promises(e){this.viewModel.promises=e}get selectedFeature(){return this.viewModel.selectedFeature}get selectedDrillInFeature(){const e=Array.from(this._drillInFlowItems).at(-1);if(!e)return null;const{flowType:t}=e;return"feature-association"===t||"feature-relationship"===t?e.graphic??null:null}get selectedFeatureWidget(){const{_feature:e,headingLevel:t,_drillInFlowItems:i,timeZone:o}=this,{selectedFeatureViewModel:s}=this.viewModel,n={title:!1};return s?(e?(e.viewModel=s,e.visibleElements=n):this._feature=new h({flowItems:i,headingLevel:t+1,timeZone:o,viewModel:s,visibleElements:n}),this._feature):null}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}open(e){this.removeHandles(W),this.viewModel.open({features:[e]})}triggerAction(e){return this.viewModel.triggerAction(e)}render(){return b("div",{bind:this,class:this.classes(_.base,A.widget,A.panel,S.blockContainer)},"add-nso"===this.mode?this._renderAddNsoBlock():void 0,this.feature?this.hasPopupInfo?this._renderContentContainer():this._renderNoPopupErrorBlock():void 0)}_renderActionBar(){return this.viewModel.allActions?.length?b("calcite-action-bar",{expandDisabled:!0,expanded:!this._hideActionText,key:"header-action-bar",scale:"s",slot:"action-bar"},b("calcite-action-group",{afterCreate:e=>this._actionBarMenuNode=e,overlayPositioning:"fixed",scale:"s"},this._renderActions())):null}_renderActions(){return this.viewModel.allActions.toArray().map(this._renderAction)}_renderContent(){const e=this.viewModel?.content;return e?"string"==typeof e?b("div",{class:w.contentNode,innerHTML:e,key:e}):this.renderNodeContent(e):null}_renderContentContainer(){const e=[this._renderContentFeature(),this._drillInWidget.render()];return b("calcite-flow",{key:"content-container"},e)}_renderContentFeature(){const{_drillInFlowItems:e,headingLevel:t,featureNavigationTop:i}=this,{title:o,active:s}=this.viewModel,n=o||"";return b("calcite-flow-item",{bind:this,class:this.classes({[_.contentFeature]:!0}),closed:!s,collapseDirection:i?"down":"up",headingLevel:t,key:"root-flow-item",loading:this.viewModel.waitingForContents,selected:0===e.length},"show-feature-info"===this.mode?b("calcite-action",{icon:"x",onclick:()=>{this.emit("close")},slot:"header-actions-end",text:this.messagesCommon.close}):void 0,n?b(I,{class:this.classes(_.featuresHeading,A.heading),innerHTML:n,key:"header-content",level:this.headingLevel,slot:"header-content"}):null,this._renderHeaderActions(),this._renderActionBar(),b("div",{class:"add-nso"===this.mode?this.classes(_.container,_.contentContainer):this.classes(_.container,_.contentContainer,S.featureContent)},this._renderContent()))}_renderFallbackIcon(e){const{className:t,icon:i}=e;if(i)return null;const o=u({action:e,feature:this.selectedFeature}),s={[_.icon]:!!t,[_.actionImage]:!!o};return t&&(s[t]=!0),o||t?b("span",{"aria-hidden":"true",class:this.classes(_.icon,s),key:"icon",styles:p(o)}):null}_renderHeaderAction(e,t){const i=e.title||"";return e.visible?b("calcite-action",{active:"toggle"===e.type&&e.value,appearance:"solid",bind:this,"data-action-uid":e.uid,disabled:e.disabled||!this.feature.geometry,icon:e.icon??void 0,indicator:e.indicator,key:`header-action-${t}`,loading:e.active,onclick:this._triggerHeaderAction,slot:"header-actions-end",text:i,title:i}):null}_renderHeaderActions(){return this.headerActions.map((e,t)=>this._renderHeaderAction(e,t)).toArray()}_closeOpenActionMenu(){const{_actionBarMenuNode:e}=this;e&&(e.menuOpen=!1)}_createSpinner(e){e&&(this._spinner=new m({view:e}),e.ui.add(this._spinner,{key:x,position:"manual",internal:!0}))}_destroyDrillInFlowItemWidgets(){this._drillInFlowItems.drain(e=>{"showAllEnabled"in e.viewModel&&(e.viewModel.showAllEnabled=!1),e.viewModel=null,e.destroy()})}_destroySelectedFeatureWidget(){const{_feature:e}=this;e&&(e.viewModel=null,!e.destroyed&&e.destroy()),this._feature=null}_destroySpinner(){const{_spinner:e,view:t}=this;e&&(t?.ui?.remove(e,x),e.destroy(),this._spinner=null)}_displaySpinner(){const{_spinner:e}=this;if(!e)return;const{location:t,waitingForResult:i}=this.viewModel;i&&t?e.show({location:t}):e.hide()}_featureMenuViewportScrollTop(){this._featureMenuViewportNode?.scrollContentTo({top:0})}_getActionIcon(e){return e.icon?e.icon:e.image||e.className?void 0:"question"}_getActionTitle(e){const{messages:i,selectedFeature:o,messagesCommon:s}=this,{id:n}=e,r=o?.attributes,l=e.title??"",a="zoom-to-feature"===n?t(l,{messages:i}):"remove-selected-feature"===n?t(l,{messages:s}):"zoom-to-clustered-features"===n||"browse-clustered-features"===n?t(l,{messages:i}):e.title;return a&&r?t(a,r):a??""}_hideSpinner(){const{_spinner:e}=this;e&&(e.location=null,e.hide())}async _openRelatedFeature(e){await e.viewModel.updateGeometry();const t=e.graphic,i=t?.geometry;null!=i&&null!=t&&(this._destroyDrillInFlowItemWidgets(),await this.viewModel.zoomTo({target:i}),this.open(t))}_setContentFromFeatureWidget(){const{selectedFeatureWidget:e}=this;e&&(this.viewModel.content=e)}_setTitleFromFeatureWidget(){const{selectedFeatureWidget:e,messagesCommon:t}=this,i=e?.viewModel;e&&(this.viewModel.title="error"===i?.state?t?.errorMessage:i?.title||"")}_triggerAction(e){const t=e.currentTarget;if(t.disabled)return;const i=t.dataset.actionUid,{allActions:o}=this.viewModel,s=o.findIndex(e=>e.uid===i),n=o.at(s);"toggle"===n?.type&&(n.value=!n.value),this.viewModel.triggerAction(s)}_triggerHeaderAction(e){const t=e.currentTarget;if(t.disabled)return;const i=t.dataset.actionUid,o=this.headerActions.find(({uid:e})=>e===i);o&&!o.disabled&&("toggle"===o?.type&&(o.value=!o.value),this.emit("trigger-header-action",{action:o}))}_viewReadyChange(e,t){e?this._wireUpView(this.viewModel?.view):t&&this.viewModel.clear()}_viewChange(e,t){e&&t&&this.viewModel.clear()}_wireUpView(e){this._destroySpinner(),e&&this._createSpinner(e)}};e([n()],L.prototype,"_drillInFlowItems",void 0),e([n()],L.prototype,"_hideActionText",null),e([n({readOnly:!0})],L.prototype,"active",null),e([n()],L.prototype,"content",null),e([n()],L.prototype,"feature",null),e([n()],L.prototype,"featureNavigationTop",void 0),e([n()],L.prototype,"goToOverride",null),e([n()],L.prototype,"hasAssociationsPopupElement",null),e([n()],L.prototype,"hasPopupInfo",null),e([n({type:y})],L.prototype,"headerActions",void 0),e([n()],L.prototype,"headingLevel",void 0),e([n()],L.prototype,"location",null),e([n(),k("esri/widgets/Features/t9n/Features")],L.prototype,"messages",void 0),e([n(),k("esri/t9n/common")],L.prototype,"messagesCommon",void 0),e([n()],L.prototype,"mode",null),e([n()],L.prototype,"promises",null),e([n()],L.prototype,"responsiveActionsEnabled",void 0),e([n({readOnly:!0})],L.prototype,"selectedFeature",null),e([n({readOnly:!0})],L.prototype,"selectedDrillInFeature",null),e([n({readOnly:!0})],L.prototype,"selectedFeatureWidget",null),e([n()],L.prototype,"timeZone",null),e([n()],L.prototype,"view",null),e([n({type:f}),T(["triggerAction","trigger-action"])],L.prototype,"viewModel",void 0),L=e([r("esri.widgets.UtilityNetworkTrace.UtilityNetworkTraceFeature")],L);const U=L;export{U as default};
5
+ import{__decorate as e}from"tslib";import{substitute as t}from"../../intl.js";import i from"../../core/Collection.js";import{watch as o}from"../../core/reactiveUtils.js";import{throttle as s}from"../../core/throttle.js";import{property as n,subclass as r}from"../../core/accessorSupport/decorators.js";import{fetchMessageBundle as l}from"../../intl/messages.js";import{isFeatureLayer as a,isSubtypeSublayer as d}from"../../layers/support/layerUtils.js";import{UtilityNetworkAssociationsContent as c}from"../../popup/content.js";import{substituteActionImage as u,getActionStyles as p}from"../../support/actions/actionUtils.js";import h from"../Feature.js";import m from"../Spinner.js";import g from"../Widget.js";import{css as w}from"../Feature/resources.js";import{FeatureContentMixin as v}from"../Feature/support/FeatureContentMixin.js";import{css as _}from"../Features/css.js";import f from"../Features/FeaturesViewModel.js";import{ActionsCollection as y}from"../Popup/actions.js";import{zoomToLocation as M}from"../Popup/actionUtils.js";import{loadCalciteComponents as F}from"../support/componentsUtils.js";import{globalCss as A}from"../support/globalCss.js";import{Heading as I}from"../support/Heading.js";import{tsx as b,messageBundle as k,vmEvent as T}from"../support/widget.js";import C from"./UtilityNetworkTraceFeaturesDrillIn.js";const W="selected-index",N=0,x="features-spinner",j="esri-utility-network-trace",S={blockContainer:`${j}__block-container`,blockContent:`${j}__block-content`,featureContent:`${j}__feature-content`,paddingBottom:`${j}__pad-bottom`,paddingTop:`${j}__pad-top`};let L=class extends(v(g)){constructor(e,t){super(e,t),this._actionBarMenuNode=null,this._drillInFlowItems=new i,this._drillInWidget=new C({flowItems:this._drillInFlowItems}),this._feature=null,this._featureMenuViewportNode=null,this._spinner=null,this._utilityNetworkTraceMessages=null,this.featureNavigationTop=!1,this.headerActions=new y,this.headingLevel=2,this.messages=null,this.messagesCommon=null,this.responsiveActionsEnabled=!1,this.viewModel=new f,this._renderAction=(e,t)=>{const i=this._getActionTitle(e),{type:o,active:s,uid:n,disabled:r,indicator:l}=e;return e.visible?b("calcite-action",{active:"toggle"===o&&e.value,bind:this,"data-action-uid":n,disabled:"zoom-to-feature"===e.id?!this.feature.geometry:r,icon:this._getActionIcon(e),indicator:l,key:`action-${t}`,loading:s,onclick:this._triggerAction,scale:"s",text:i,title:this._hideActionText?i:void 0},this._renderFallbackIcon(e)):null},this._renderAddNsoBlock=()=>{const{_utilityNetworkTraceMessages:e,messagesCommon:t}=this;return b("calcite-block",{class:S.blockContent,expanded:!this.feature,heading:e?.inputsStrings.addNonspatialOption},b("calcite-action",{icon:"x",onclick:()=>this.emit("close-un-trace-feature-block"),slot:"actions-end",text:t.close}),b("calcite-notice",{icon:"information",kind:"info",open:!this.feature},b("div",{slot:"message"},e?.inputsStrings.addNonspatialHint)))},this._renderNoPopupErrorBlock=()=>{const{_utilityNetworkTraceMessages:e,messagesCommon:t}=this;return b("calcite-block",{description:void 0,expanded:!0,heading:"show-feature-info"===this.mode?t.warning:void 0},b("calcite-notice",{class:this.classes(S.paddingBottom,S.paddingTop),icon:"exclamation-mark-triangle",kind:"danger",open:!0},b("div",{slot:"message"},e.alertsStrings.noPopupConfigured)),"show-feature-info"===this.mode?b("calcite-action",{icon:"x",onclick:()=>this.emit("close-un-trace-feature-block"),slot:"actions-end",text:t.close}):void 0)},this._displaySpinnerThrottled=s(()=>this._displaySpinner(),N),this.addHandles([this._displaySpinnerThrottled,o(()=>this.viewModel?.active,e=>this._drillInWidget.closed=!e),o(()=>this.viewModel?.view,(e,t)=>this._viewChange(e,t)),o(()=>this.viewModel?.view?.ready,(e,t)=>this._viewReadyChange(e??!1,t??!1)),o(()=>[this.viewModel?.waitingForResult,this.viewModel?.location],()=>{this._hideSpinner(),this._displaySpinnerThrottled()}),o(()=>this.viewModel?.screenLocation,()=>this._closeOpenActionMenu()),o(()=>this.selectedFeatureWidget,()=>this._destroyDrillInFlowItemWidgets()),o(()=>{const e=this.selectedFeatureWidget?.viewModel;return[e?.title,e?.state]},()=>this._setTitleFromFeatureWidget()),o(()=>{const e=this.selectedFeatureWidget?.viewModel;return[e?.content,e?.state]},()=>this._setContentFromFeatureWidget()),o(()=>this.viewModel?.featureViewModels,()=>this._featureMenuViewportScrollTop()),this._drillInWidget.on("close",()=>{this.emit("close")}),this._drillInWidget.on("exit",()=>this._destroyDrillInFlowItemWidgets()),this._drillInWidget.on("open-feature",({feature:e})=>this._openRelatedFeature(e)),this._drillInWidget.on("zoom-to-feature",({featureWidget:e})=>M(this.viewModel,e)),this._drillInWidget.on("add-nso-trace-location",({featureWidget:e})=>this.emit("add-nso-trace-location",{featureWidget:e}))])}initialize(){(async()=>{this._utilityNetworkTraceMessages=await l("esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace")})(),this._drillInWidget.mode=this.mode,this._drillInWidget.closable=!1}loadDependencies(){return F({action:()=>import("@esri/calcite-components/dist/components/calcite-action"),"action-bar":()=>import("@esri/calcite-components/dist/components/calcite-action-bar"),"action-group":()=>import("@esri/calcite-components/dist/components/calcite-action-group"),block:()=>import("@esri/calcite-components/dist/components/calcite-block"),flow:()=>import("@esri/calcite-components/dist/components/calcite-flow"),"flow-item":()=>import("@esri/calcite-components/dist/components/calcite-flow-item"),notice:()=>import("@esri/calcite-components/dist/components/calcite-notice")})}destroy(){this._destroyDrillInFlowItemWidgets(),this._destroySelectedFeatureWidget(),this._destroySpinner(),this._drillInWidget?.destroy()}get _hideActionText(){if(!this.responsiveActionsEnabled)return!1;const e=this.view?.widthBreakpoint;return"xsmall"===e||"small"===e||"medium"===e}get active(){return this.viewModel.active}get content(){return this.viewModel.content}set content(e){this.viewModel.content=e}get feature(){return this.viewModel.features.length?this.viewModel.features[0]:null}set feature(e){this.viewModel.features=e?[e]:[]}get goToOverride(){return this.viewModel.goToOverride}set goToOverride(e){this.viewModel.goToOverride=e}get hasAssociationsPopupElement(){const e=a(this.feature?.sourceLayer)?this.feature?.sourceLayer:void 0,t=d(this.feature?.sourceLayer)?this.feature?.sourceLayer:void 0,i=e?.popupTemplate||t?.popupTemplate||null,o=i?.content;return!(Array.isArray(o)&&!o.some(e=>e instanceof c))}get hasPopupInfo(){const e=a(this.feature?.sourceLayer)?this.feature?.sourceLayer:void 0,t=d(this.feature?.sourceLayer)?this.feature?.sourceLayer:void 0;return!(!e?.popupTemplate&&!t?.popupTemplate)}get location(){return this.viewModel.location}set location(e){this.viewModel.location=e}get mode(){return this._get("mode")||"add-nso"}set mode(e){this._set("mode",e)}get promises(){return this.viewModel.promises}set promises(e){this.viewModel.promises=e}get selectedFeature(){return this.viewModel.selectedFeature}get selectedDrillInFeature(){const e=Array.from(this._drillInFlowItems).at(-1);if(!e)return null;const{flowType:t}=e;return"feature-association"===t||"feature-relationship"===t?e.graphic??null:null}get selectedFeatureWidget(){const{_feature:e,headingLevel:t,_drillInFlowItems:i,timeZone:o}=this,{selectedFeatureViewModel:s}=this.viewModel,n={title:!1};return s?(e?(e.viewModel=s,e.visibleElements=n):this._feature=new h({flowItems:i,headingLevel:t+1,timeZone:o,viewModel:s,visibleElements:n}),this._feature):null}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}open(e){this.removeHandles(W),this.viewModel.open({features:[e]})}triggerAction(e){return this.viewModel.triggerAction(e)}render(){return b("div",{bind:this,class:this.classes(_.base,A.widget,A.panel,S.blockContainer)},"add-nso"===this.mode?this._renderAddNsoBlock():void 0,this.feature?this.hasPopupInfo?this._renderContentContainer():this._renderNoPopupErrorBlock():void 0)}_renderActionBar(){return this.viewModel.allActions?.length?b("calcite-action-bar",{expandDisabled:!0,expanded:!this._hideActionText,key:"header-action-bar",scale:"s",slot:"action-bar"},b("calcite-action-group",{afterCreate:e=>this._actionBarMenuNode=e,overlayPositioning:"fixed",scale:"s"},this._renderActions())):null}_renderActions(){return this.viewModel.allActions.toArray().map(this._renderAction)}_renderContent(){const e=this.viewModel?.content;return e?"string"==typeof e?b("div",{class:w.contentNode,innerHTML:e,key:e}):this.renderNodeContent(e):null}_renderContentContainer(){const e=[this._renderContentFeature(),this._drillInWidget.render()];return b("calcite-flow",{key:"content-container"},e)}_renderContentFeature(){const{_drillInFlowItems:e,headingLevel:t,featureNavigationTop:i}=this,{title:o,active:s}=this.viewModel,n=o||"";return b("calcite-flow-item",{bind:this,class:this.classes({[_.contentFeature]:!0}),closed:!s,collapseDirection:i?"down":"up",headingLevel:t,key:"root-flow-item",loading:this.viewModel.waitingForContents,selected:0===e.length},"show-feature-info"===this.mode?b("calcite-action",{icon:"x",onclick:()=>{this.emit("close")},slot:"header-actions-end",text:this.messagesCommon.close}):void 0,n?b(I,{class:this.classes(_.featuresHeading,A.heading),innerHTML:n,key:"header-content",level:this.headingLevel,slot:"header-content"}):null,this._renderHeaderActions(),this._renderActionBar(),b("div",{class:"add-nso"===this.mode?this.classes(_.container,_.contentContainer):this.classes(_.container,_.contentContainer,S.featureContent)},this._renderContent()))}_renderFallbackIcon(e){const{className:t,icon:i}=e;if(i)return null;const o=u({action:e,feature:this.selectedFeature}),s={[_.icon]:!!t,[_.actionImage]:!!o};return t&&(s[t]=!0),o||t?b("span",{"aria-hidden":"true",class:this.classes(_.icon,s),key:"icon",styles:p(o)}):null}_renderHeaderAction(e,t){const i=e.title||"";return e.visible?b("calcite-action",{active:"toggle"===e.type&&e.value,bind:this,"data-action-uid":e.uid,disabled:e.disabled||!this.feature.geometry,icon:e.icon??void 0,indicator:e.indicator,key:`header-action-${t}`,loading:e.active,onclick:this._triggerHeaderAction,slot:"header-actions-end",text:i,title:i}):null}_renderHeaderActions(){return this.headerActions.map((e,t)=>this._renderHeaderAction(e,t)).toArray()}_closeOpenActionMenu(){const{_actionBarMenuNode:e}=this;e&&(e.menuOpen=!1)}_createSpinner(e){e&&(this._spinner=new m({view:e}),e.ui.add(this._spinner,{key:x,position:"manual",internal:!0}))}_destroyDrillInFlowItemWidgets(){this._drillInFlowItems.drain(e=>{"showAllEnabled"in e.viewModel&&(e.viewModel.showAllEnabled=!1),e.viewModel=null,e.destroy()})}_destroySelectedFeatureWidget(){const{_feature:e}=this;e&&(e.viewModel=null,!e.destroyed&&e.destroy()),this._feature=null}_destroySpinner(){const{_spinner:e,view:t}=this;e&&(t?.ui?.remove(e,x),e.destroy(),this._spinner=null)}_displaySpinner(){const{_spinner:e}=this;if(!e)return;const{location:t,waitingForResult:i}=this.viewModel;i&&t?e.show({location:t}):e.hide()}_featureMenuViewportScrollTop(){this._featureMenuViewportNode?.scrollContentTo({top:0})}_getActionIcon(e){return e.icon?e.icon:e.image||e.className?void 0:"question"}_getActionTitle(e){const{messages:i,selectedFeature:o,messagesCommon:s}=this,{id:n}=e,r=o?.attributes,l=e.title??"",a="zoom-to-feature"===n?t(l,{messages:i}):"remove-selected-feature"===n?t(l,{messages:s}):"zoom-to-clustered-features"===n||"browse-clustered-features"===n?t(l,{messages:i}):e.title;return a&&r?t(a,r):a??""}_hideSpinner(){const{_spinner:e}=this;e&&(e.location=null,e.hide())}async _openRelatedFeature(e){await e.viewModel.updateGeometry();const t=e.graphic,i=t?.geometry;null!=i&&null!=t&&(this._destroyDrillInFlowItemWidgets(),await this.viewModel.zoomTo({target:i}),this.open(t))}_setContentFromFeatureWidget(){const{selectedFeatureWidget:e}=this;e&&(this.viewModel.content=e)}_setTitleFromFeatureWidget(){const{selectedFeatureWidget:e,messagesCommon:t}=this,i=e?.viewModel;e&&(this.viewModel.title="error"===i?.state?t?.errorMessage:i?.title||"")}_triggerAction(e){const t=e.currentTarget;if(t.disabled)return;const i=t.dataset.actionUid,{allActions:o}=this.viewModel,s=o.findIndex(e=>e.uid===i),n=o.at(s);"toggle"===n?.type&&(n.value=!n.value),this.viewModel.triggerAction(s)}_triggerHeaderAction(e){const t=e.currentTarget;if(t.disabled)return;const i=t.dataset.actionUid,o=this.headerActions.find(({uid:e})=>e===i);o&&!o.disabled&&("toggle"===o?.type&&(o.value=!o.value),this.emit("trigger-header-action",{action:o}))}_viewReadyChange(e,t){e?this._wireUpView(this.viewModel?.view):t&&this.viewModel.clear()}_viewChange(e,t){e&&t&&this.viewModel.clear()}_wireUpView(e){this._destroySpinner(),e&&this._createSpinner(e)}};e([n()],L.prototype,"_drillInFlowItems",void 0),e([n()],L.prototype,"_hideActionText",null),e([n({readOnly:!0})],L.prototype,"active",null),e([n()],L.prototype,"content",null),e([n()],L.prototype,"feature",null),e([n()],L.prototype,"featureNavigationTop",void 0),e([n()],L.prototype,"goToOverride",null),e([n()],L.prototype,"hasAssociationsPopupElement",null),e([n()],L.prototype,"hasPopupInfo",null),e([n({type:y})],L.prototype,"headerActions",void 0),e([n()],L.prototype,"headingLevel",void 0),e([n()],L.prototype,"location",null),e([n(),k("esri/widgets/Features/t9n/Features")],L.prototype,"messages",void 0),e([n(),k("esri/t9n/common")],L.prototype,"messagesCommon",void 0),e([n()],L.prototype,"mode",null),e([n()],L.prototype,"promises",null),e([n()],L.prototype,"responsiveActionsEnabled",void 0),e([n({readOnly:!0})],L.prototype,"selectedFeature",null),e([n({readOnly:!0})],L.prototype,"selectedDrillInFeature",null),e([n({readOnly:!0})],L.prototype,"selectedFeatureWidget",null),e([n()],L.prototype,"timeZone",null),e([n()],L.prototype,"view",null),e([n({type:f}),T(["triggerAction","trigger-action"])],L.prototype,"viewModel",void 0),L=e([r("esri.widgets.UtilityNetworkTrace.UtilityNetworkTraceFeature")],L);const U=L;export{U as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import{substitute as t}from"../../intl.js";import{property as i,subclass as o}from"../../core/accessorSupport/decorators.js";import{fetchMessageBundle as s}from"../../intl/messages.js";import a from"../Widget.js";import{css as n}from"../Features/css.js";import{zoomToFeature as r}from"../Popup/actions.js";import{loadCalciteComponents as c}from"../support/componentsUtils.js";import{messageBundle as l,tsx as d,tsxFragment as p}from"../support/widget.js";const u=r.clone(),m={featureContent:`${"esri-utility-network-trace"}__feature-content`};let h=class extends a{constructor(e,t){super(e,t),this._utilityNetworkTraceMessages=null,this.closed=!1,this.closable=!0,this.messages=null,this.messagesCommon=null,this._handleAddNonspatialTraceLocation=e=>{this.emit("add-nso-trace-location",{featureWidget:e})},this._handleOpenFeature=e=>{this.emit("open-feature",{feature:e})},this._handleZoomToFeature=e=>{this.emit("zoom-to-feature",{featureWidget:e})}}initialize(){(async()=>{this._utilityNetworkTraceMessages=await s("esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace")})()}loadDependencies(){return c({action:()=>import("@esri/calcite-components/dist/components/calcite-action"),"action-bar":()=>import("@esri/calcite-components/dist/components/calcite-action-bar"),"action-group":()=>import("@esri/calcite-components/dist/components/calcite-action-group"),"flow-item":()=>import("@esri/calcite-components/dist/components/calcite-flow-item")})}get mode(){return this._get("mode")||"show-feature-info"}set mode(e){this._set("mode",e)}render(){const{flowItems:e}=this,t=e?.toArray();return d(p,null,t?.map((t,i)=>this._renderFlowItem(t,i===e.length-1)))}_renderAddNonspatialTraceLocationAction(e){const{_utilityNetworkTraceMessages:t}=this;return d("calcite-action",{appearance:"solid",bind:this,icon:"utility-network-trace",onclick:()=>this._handleAddNonspatialTraceLocation(e),scale:"s",text:t.inputsStrings.addNonspatialOption,textEnabled:!0,title:t.inputsStrings.addNonspatialOption})}_renderFlowItem(e,t){const{messages:i,closable:o,closed:s}=this,a="graphic"in e&&!e.isTable,r="feature-association"===e.flowType,c=this._getExitMessage(e),l=i.selectFeature,p=e,u=p?p.graphic?.sourceLayer:null,h=!(u?u.geometryType:null);return d("calcite-flow-item",{bind:this,closable:o,closed:s,description:this._getDrillInFlowItemDescription(e),heading:e.title??"",key:`flow-item-${e.viewModel.uid}`,selected:t,onCalciteFlowItemBack:e=>{e.preventDefault(),this._handleDrillInBackClick()}},d("calcite-action",{appearance:"transparent",bind:this,class:n.actionExit,icon:"move-up",key:"exit-action",onclick:this._handleExitClick,slot:"header-actions-start",text:c,title:c}),a?d("calcite-action",{appearance:"transparent",bind:this,icon:"zoom-to-object",key:"open-feature-action",onclick:()=>this._handleOpenFeature(e),slot:"header-actions-end",text:l,title:l}):null,"show-feature-info"===this.mode?d("calcite-action",{icon:"x",onclick:()=>{this.emit("close")},slot:"header-actions-end",text:this.messagesCommon.close}):void 0,r&&"add-nso"===this.mode?d("calcite-action-bar",{expandDisabled:!0,expanded:!0,key:"header-action-bar",scale:"s",slot:"action-bar"},d("calcite-action-group",{overlayPositioning:"fixed",scale:"s"},h?this._renderAddNonspatialTraceLocationAction(e):this._renderZoomToFeatureAction(e))):null,d("div",{class:this.classes(n.container,m.featureContent)},e.render()))}_renderZoomToFeatureAction(e){const t=this._getActionTitle(u);return d("calcite-action",{active:u.active,appearance:"solid",bind:this,"data-action-uid":u.uid,disabled:u.disabled,icon:u.icon??"question",indicator:u.indicator,key:`action-${u.uid}`,loading:u.active,onclick:()=>this._handleZoomToFeature(e),scale:"s",text:t,textEnabled:!0,title:t})}_getActionTitle(e){const{messages:i}=this,{id:o}=e,s=e.title??"";return"zoom-to-feature"===o?t(s,{messages:i}):s}_getDrillInFlowItemDescription(e){switch(e.flowType){case"feature":case"feature-association":case"feature-utility-network-associations":return e.viewModel.description??"";case"feature-relationship":return e.allItemsDescription;case"feature-utility-network-association-type":return e.description??""}}_getExitMessage(e){switch(e.flowType){case"feature":case"feature-association":return"";case"feature-relationship":return this.messages.exitRelatedRecords;case"feature-utility-network-associations":case"feature-utility-network-association-type":return this.messages.exitAssociations}}_handleDrillInBackClick(){const e=this.flowItems?.pop();e&&("showAllEnabled"in e.viewModel&&(e.viewModel.showAllEnabled=!1),e&&(e.viewModel=null,e.destroy()))}_handleExitClick(){this.emit("exit")}};e([i()],h.prototype,"closed",void 0),e([i()],h.prototype,"closable",void 0),e([i()],h.prototype,"flowItems",void 0),e([i(),l("esri/widgets/Features/t9n/Features")],h.prototype,"messages",void 0),e([i(),l("esri/t9n/common")],h.prototype,"messagesCommon",void 0),e([i()],h.prototype,"mode",null),h=e([o("esri.widgets.UtilityNetworkTrace.UtilityNetworkTraceFeaturesDrillIn")],h);const f=h;export{f as default};
5
+ import{__decorate as e}from"tslib";import{substitute as t}from"../../intl.js";import{property as i,subclass as o}from"../../core/accessorSupport/decorators.js";import{fetchMessageBundle as s}from"../../intl/messages.js";import a from"../Widget.js";import{css as n}from"../Features/css.js";import{zoomToFeature as r}from"../Popup/actions.js";import{loadCalciteComponents as c}from"../support/componentsUtils.js";import{messageBundle as l,tsx as d,tsxFragment as u}from"../support/widget.js";const m=r.clone(),p={featureContent:`${"esri-utility-network-trace"}__feature-content`};let h=class extends a{constructor(e,t){super(e,t),this._utilityNetworkTraceMessages=null,this.closed=!1,this.closable=!0,this.messages=null,this.messagesCommon=null,this._handleAddNonspatialTraceLocation=e=>{this.emit("add-nso-trace-location",{featureWidget:e})},this._handleOpenFeature=e=>{this.emit("open-feature",{feature:e})},this._handleZoomToFeature=e=>{this.emit("zoom-to-feature",{featureWidget:e})}}initialize(){(async()=>{this._utilityNetworkTraceMessages=await s("esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace")})()}loadDependencies(){return c({action:()=>import("@esri/calcite-components/dist/components/calcite-action"),"action-bar":()=>import("@esri/calcite-components/dist/components/calcite-action-bar"),"action-group":()=>import("@esri/calcite-components/dist/components/calcite-action-group"),"flow-item":()=>import("@esri/calcite-components/dist/components/calcite-flow-item")})}get mode(){return this._get("mode")||"show-feature-info"}set mode(e){this._set("mode",e)}render(){const{flowItems:e}=this,t=e?.toArray();return d(u,null,t?.map((t,i)=>this._renderFlowItem(t,i===e.length-1)))}_renderAddNonspatialTraceLocationAction(e){const{_utilityNetworkTraceMessages:t}=this;return d("calcite-action",{bind:this,icon:"utility-network-trace",onclick:()=>this._handleAddNonspatialTraceLocation(e),scale:"s",text:t.inputsStrings.addNonspatialOption,textEnabled:!0,title:t.inputsStrings.addNonspatialOption})}_renderFlowItem(e,t){const{messages:i,closable:o,closed:s}=this,a="graphic"in e&&!e.isTable,r="feature-association"===e.flowType,c=this._getExitMessage(e),l=i.selectFeature,u=e,m=u?u.graphic?.sourceLayer:null,h=!(m?m.geometryType:null);return d("calcite-flow-item",{bind:this,closable:o,closed:s,description:this._getDrillInFlowItemDescription(e),heading:e.title??"",key:`flow-item-${e.viewModel.uid}`,selected:t,onCalciteFlowItemBack:e=>{e.preventDefault(),this._handleDrillInBackClick()}},d("calcite-action",{bind:this,class:n.actionExit,icon:"move-up",key:"exit-action",onclick:this._handleExitClick,slot:"header-actions-start",text:c,title:c}),a?d("calcite-action",{bind:this,icon:"zoom-to-object",key:"open-feature-action",onclick:()=>this._handleOpenFeature(e),slot:"header-actions-end",text:l,title:l}):null,"show-feature-info"===this.mode?d("calcite-action",{icon:"x",onclick:()=>{this.emit("close")},slot:"header-actions-end",text:this.messagesCommon.close}):void 0,r&&"add-nso"===this.mode?d("calcite-action-bar",{expandDisabled:!0,expanded:!0,key:"header-action-bar",scale:"s",slot:"action-bar"},d("calcite-action-group",{overlayPositioning:"fixed",scale:"s"},h?this._renderAddNonspatialTraceLocationAction(e):this._renderZoomToFeatureAction(e))):null,d("div",{class:this.classes(n.container,p.featureContent)},e.render()))}_renderZoomToFeatureAction(e){const t=this._getActionTitle(m);return d("calcite-action",{active:m.active,bind:this,"data-action-uid":m.uid,disabled:m.disabled,icon:m.icon??"question",indicator:m.indicator,key:`action-${m.uid}`,loading:m.active,onclick:()=>this._handleZoomToFeature(e),scale:"s",text:t,textEnabled:!0,title:t})}_getActionTitle(e){const{messages:i}=this,{id:o}=e,s=e.title??"";return"zoom-to-feature"===o?t(s,{messages:i}):s}_getDrillInFlowItemDescription(e){switch(e.flowType){case"feature":case"feature-association":case"feature-utility-network-associations":return e.viewModel.description??"";case"feature-relationship":return e.allItemsDescription;case"feature-utility-network-association-type":return e.description??""}}_getExitMessage(e){switch(e.flowType){case"feature":case"feature-association":return"";case"feature-relationship":return this.messages.exitRelatedRecords;case"feature-utility-network-associations":case"feature-utility-network-association-type":return this.messages.exitAssociations}}_handleDrillInBackClick(){const e=this.flowItems?.pop();e&&("showAllEnabled"in e.viewModel&&(e.viewModel.showAllEnabled=!1),e&&(e.viewModel=null,e.destroy()))}_handleExitClick(){this.emit("exit")}};e([i()],h.prototype,"closed",void 0),e([i()],h.prototype,"closable",void 0),e([i()],h.prototype,"flowItems",void 0),e([i(),l("esri/widgets/Features/t9n/Features")],h.prototype,"messages",void 0),e([i(),l("esri/t9n/common")],h.prototype,"messagesCommon",void 0),e([i()],h.prototype,"mode",null),h=e([o("esri.widgets.UtilityNetworkTrace.UtilityNetworkTraceFeaturesDrillIn")],h);const f=h;export{f as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import{watch as t,on as s,initial as i,when as r}from"../core/reactiveUtils.js";import{property as o,subclass as a}from"../core/accessorSupport/decorators.js";import{UpdatingHandles as l}from"../core/support/UpdatingHandles.js";import n from"../layers/support/CodedValueDomain.js";import{isSubtypeGroupLayer as c}from"../layers/support/layerUtils.js";import d from"../rest/support/Query.js";import u from"./Widget.js";import{loadCalciteComponents as h}from"./support/componentsUtils.js";import{globalCss as p}from"./support/globalCss.js";import{messageBundle as g,vmEvent as m,tsx as _}from"./support/widget.js";import{storeNode as b}from"./support/widgetUtils.js";import w from"./UtilityNetworkTrace/UtilityNetworkTraceFeature.js";import v from"./UtilityNetworkTrace/UtilityNetworkTraceViewModel.js";import{defaultSwatchColors as y}from"./UtilityNetworkTrace/support/GraphicHandler.js";const f="esri-utility-network-trace",S={base:f,addButtonContainer:`${f}__add-button-container`,blockContainer:`${f}__block-container`,blockContent:`${f}__block-content`,clearPrompt:`${f}__reset-prompt`,clearResultsBlock:`${f}__clear-results-block`,doublePaddingTop:`${f}__double-pad-top`,flow:`${f}__flow`,listContainer:`${f}__list-container`,noticeContainer:`${f}__notice-container`,numberInput:`${f}__number-input`,promptDivider:`${f}__divider`,tabs:`${f}__tabs`};function T(e){return{height:e+"px"}}function k(e){return{width:e+"px"}}function F(){return{width:"75%"}}function C(e){return{width:"100%",height:window.getComputedStyle(e).getPropertyValue("max-height")}}function A(e){return{display:"flex",flexDirection:e}}function R(e){return e instanceof n}const N={noExtension:-2147208474},M=Symbol();let x=class extends u{constructor(e,t){super(e,t),this._activeTab="input",this._activeTrace=null,this._activeSwatch="",this._addNonspatialObjectActive=!1,this._alertRemoveModal=!1,this._assetGroupHeader="",this._assetTypeHeader="",this._confirmReset=!1,this._errorMessage="",this._swatchNode=null,this._selectToolActive=!1,this._showFeatureInfoActive=!1,this._traceHeaderForFlow="",this._traceResultsFunctions=[],this._traceResultsAssetGroup=[],this._traceResultsAssetType=[],this._traceResultsIndividual=[],this._traceResultsState="result",this._warningNoFlag=!1,this._warningNoTraceSelected=!1,this._findNonspatialFeatureWidget=new w({mode:"add-nso"}),this._individualResultNode=null,this._loadUnError=!0,this._resultDisplayField="objectid",this._resultFeatureWidget=new w({mode:"show-feature-info"}),this._resultObjectIdField="objectid",this._resultSortField="objectid",this._resultSortOrder="desc",this._showResultOptions=!1,this._symbolStartFlag=null,this._symbolBarrier=null,this._traceLocationType="starting-point",this._updatingHandles=new l,this._warningNoBarrierAssetFound=!1,this._warningNoBarrierAssetNsoFound=!1,this._warningNoStartAssetFound=!1,this._warningNoStartAssetNsoFound=!1,this._warningNoTerminal=!1,this._wasPopupEnabled=!1,this._watchHandler=null,this.disabled=!0,this.inputSettings=[],this.messages=null,this.messagesCommon=null,this.messagesUnits=null,this.viewModel=new v,this._afterComponentCreate=this._afterComponentCreate.bind(this)}initialize(){this._utilityNetworkTraceInitialized(),this.addHandles([t(()=>this.view,()=>this._viewChangeHandle(),i),t(()=>this.viewModel?.resultAreaProperties,()=>this.scheduleRender()),t(()=>this._addNonspatialObjectActive,e=>{this._findNonspatialFeatureWidget.feature=null,e?this._changeCursor("crosshair"):this.view.popupEnabled=this._wasPopupEnabled}),t(()=>this._showFeatureInfoActive,e=>{e||(this._resultFeatureWidget.feature=null,this.view.popupEnabled=this._wasPopupEnabled)}),s(()=>this._findNonspatialFeatureWidget,"add-nso-trace-location",({featureWidget:e})=>{this.viewModel.addNonspatialTraceLocation(e.graphic,this._traceLocationType),this._warningNoFlag=!1,this._addNonspatialObjectActive=!1}),s(()=>this._findNonspatialFeatureWidget,"close-un-trace-feature-block",()=>{this._changeCursor("default"),this._addNonspatialObjectActive=!1,this.viewModel.cancelAddFlagByHit()}),s(()=>this._resultFeatureWidget,"close-un-trace-feature-block",()=>{this._showFeatureInfoActive=!1}),s(()=>this._resultFeatureWidget,"close",()=>{this._resetResultFeatureWidget()})])}destroy(){this._findNonspatialFeatureWidget?.destroy(),this._resultFeatureWidget?.destroy()}get defaultGraphicColor(){return this.viewModel.defaultGraphicColor}set defaultGraphicColor(e){this.viewModel.defaultGraphicColor=e}get enableResultArea(){return this.viewModel.enableResultArea}set enableResultArea(e){this.viewModel.enableResultArea=e}get flags(){return this.viewModel.flags}set flags(e){this.viewModel.flags=e}get icon(){return"utility-network-trace"}set icon(e){this._overrideIfSome("icon",e)}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get resultAreaProperties(){return this.viewModel.resultAreaProperties}set resultAreaProperties(e){this.viewModel.resultAreaProperties=e}get selectedTraces(){return this.viewModel.selectedTraces}set selectedTraces(e){this.viewModel.selectedTraces=e}get selectOnComplete(){return this.viewModel.selectOnComplete}set selectOnComplete(e){this.viewModel.selectOnComplete=e}get showGraphicsOnComplete(){return this.viewModel.showGraphicsOnComplete}set showGraphicsOnComplete(e){this.viewModel.showGraphicsOnComplete=e}get showSelectionAttributes(){return this.viewModel.showSelectionAttributes}set showSelectionAttributes(e){this.viewModel.showSelectionAttributes=e}get traceResults(){return this.viewModel.traceResults}get utilityNetwork(){return this.viewModel.utilityNetwork}set utilityNetwork(e){this.viewModel.utilityNetwork=e}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}async checkCanTrace(){this._confirmReset=!1,this._resetResultFeatureWidget();const e=this.viewModel.checkCanTrace();e.status?(this._warningNoFlag=!1,this._warningNoTraceSelected=!1,this._warningNoTerminal=!1,this._traceResultsState="result",this.switchTab("results"),this.viewModel._activeProgress=!0,this.viewModel.removeAllResultAreaGraphics(),await this.viewModel.callTrace(),this.viewModel._activeProgress=!1):e.issues.forEach(e=>{switch(e){case"noStartingPoints":this._warningNoFlag=!0;break;case"noTerminalSelected":this._warningNoTerminal=!0;break;default:this._warningNoTraceSelected=!0}})}confirmReset(){this._confirmReset=!0}render(){return this._mixCustomStrings(),this._overrideFlagSymbol(),_("div",{class:this.classes(S.base,p.widget,p.panel,{[p.widgetDisabled]:this.disabled})},this._renderUtilityNetworkTrace())}loadDependencies(){return h({action:()=>import("@esri/calcite-components/dist/components/calcite-action"),"action-group":()=>import("@esri/calcite-components/dist/components/calcite-action-group"),"action-pad":()=>import("@esri/calcite-components/dist/components/calcite-action-pad"),block:()=>import("@esri/calcite-components/dist/components/calcite-block"),"block-section":()=>import("@esri/calcite-components/dist/components/calcite-block-section"),button:()=>import("@esri/calcite-components/dist/components/calcite-button"),checkbox:()=>import("@esri/calcite-components/dist/components/calcite-checkbox"),"color-picker-swatch":()=>import("@esri/calcite-components/dist/components/calcite-color-picker-swatch"),combobox:()=>import("@esri/calcite-components/dist/components/calcite-combobox"),"combobox-item":()=>import("@esri/calcite-components/dist/components/calcite-combobox-item"),"dropdown-group":()=>import("@esri/calcite-components/dist/components/calcite-dropdown-group"),"dropdown-item":()=>import("@esri/calcite-components/dist/components/calcite-dropdown-item"),fab:()=>import("@esri/calcite-components/dist/components/calcite-fab"),flow:()=>import("@esri/calcite-components/dist/components/calcite-flow"),"flow-item":()=>import("@esri/calcite-components/dist/components/calcite-flow-item"),icon:()=>import("@esri/calcite-components/dist/components/calcite-icon"),"input-number":()=>import("@esri/calcite-components/dist/components/calcite-input-number"),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"),loader:()=>import("@esri/calcite-components/dist/components/calcite-loader"),notice:()=>import("@esri/calcite-components/dist/components/calcite-notice"),option:()=>import("@esri/calcite-components/dist/components/calcite-option"),panel:()=>import("@esri/calcite-components/dist/components/calcite-panel"),popover:()=>import("@esri/calcite-components/dist/components/calcite-popover"),scrim:()=>import("@esri/calcite-components/dist/components/calcite-scrim"),select:()=>import("@esri/calcite-components/dist/components/calcite-select"),"split-button":()=>import("@esri/calcite-components/dist/components/calcite-split-button"),tab:()=>import("@esri/calcite-components/dist/components/calcite-tab"),"tab-nav":()=>import("@esri/calcite-components/dist/components/calcite-tab-nav"),"tab-title":()=>import("@esri/calcite-components/dist/components/calcite-tab-title"),tabs:()=>import("@esri/calcite-components/dist/components/calcite-tabs")})}switchTab(e){this._activeTab=e}switchToFromAssetGroup(e,t,s){this._traceHeaderForFlow=t,this._traceResultsAssetGroup=e,this._traceResultsState=s}switchToFromAssetType(e,t,s){this._assetGroupHeader=t,this._traceResultsAssetType=e,this._traceResultsState=s}switchToFromFunctions(e,t){this._traceResultsFunctions=e,this._traceResultsState=t}switchToFromIndividualRecords(e,t,s){this._assetTypeHeader=t,this._traceResultsIndividual=e,this._traceResultsState=s}_renderAddNonspatialLocationBlock(){const{messages:e}=this;return _("calcite-block",{expanded:!0,key:`${this.id}__add-spatial-location-block`,label:e.inputsStrings.addNonspatialOption},this._findNonspatialFeatureWidget.render())}_renderAddSpatialLocationBlock(){const{messages:e,messagesCommon:t}=this;return _("calcite-block",{class:S.blockContent,expanded:!0,heading:"starting-point"===this._traceLocationType?e.inputsStrings.headerStartingPoint:e.inputsStrings.headerBarrier,key:`${this.id}__add-nonspatial-location-block`,label:"starting-point"===this._traceLocationType?e.inputsStrings.headerStartingPoint:e.inputsStrings.headerBarrier},_("calcite-action",{icon:"x",onclick:()=>{this.viewModel.removeClickHandler(),this.view?.popup&&(this.view.popupEnabled=this._wasPopupEnabled),this._changeCursor("default"),this._selectToolActive=!1},slot:"control",text:t.close}),_("calcite-notice",{icon:"starting-point"===this._traceLocationType?"pin-plus":"x-circle-f",kind:"info",open:!0},_("div",{slot:"message"},e.inputsStrings.addPointHint)))}_renderClearTraceResultsBlock(){const{messages:e,messagesCommon:t}=this;return _("calcite-scrim",{key:`${this.id}__clear-results-block`},_("calcite-block",{class:S.clearResultsBlock,expanded:!0},_("h3",null,e.resultsStrings.startOverButton),_("div",null,e.resultsStrings.startOverValidation),_("div",{class:S.promptDivider}),_("div",{styles:A("row")},_("calcite-button",{appearance:"outline",onclick:()=>{this._confirmReset=!1},slot:"secondary",width:"full"},t.cancel),_("calcite-button",{onclick:()=>{this._confirmReset=!1,this.viewModel.reset(),this.switchTab("input")},slot:"primary",width:"full"},t.form.ok))))}_renderExecutingTraceBlock(){const{messages:e}=this;return _("calcite-loader",{label:e.alertsStrings.traceExecuting,text:e.alertsStrings.traceExecuting,type:"indeterminate"})}_renderInputBlock(){const{messages:e}=this;return _("calcite-block",{class:S.blockContainer,expanded:!0,key:`${this.id}__inputs-block`,label:e.inputsStrings.headerTabInputs},_("calcite-flow",{class:S.flow},_("calcite-flow-item",{key:`${this.id}__inputs-flow-item`,selected:!this._selectToolActive&&!this._addNonspatialObjectActive},this._warningNoFlag?this._renderWarningMessage("flag",!0):null,this._warningNoTerminal?this._renderWarningMessage("noTerminal",!0):null,this._warningNoTraceSelected?this._renderWarningMessage("trace",!0):null,this._renderTraceSelectorContainer(),this._renderStartFlagsContainer(),this._renderBarriersFlagsContainer(),this._warningNoFlag&&this._warningNoTraceSelected?_("div",{styles:T(10)}):null,_("calcite-fab",{appearance:"solid",icon:"utility-network-trace",kind:"brand",onclick:()=>{this.checkCanTrace()},slot:"fab",text:e.tracingStrings.runTrace,textEnabled:!0,title:e.tracingStrings.runTrace,type:"button"}))))}_renderInputsTab(){const{messagesCommon:e}=this;let t="input";return this._selectToolActive&&!this._addNonspatialObjectActive&&(t="add-spatial-location"),!this._selectToolActive&&this._addNonspatialObjectActive&&(t="add-nso-location"),this.disabled&&(t="loading"),_("calcite-tab",{key:`${this.id}__inputs-tab-item`,selected:"input"===this._activeTab},"loading"===t?_("calcite-loader",{label:e.loading,type:"indeterminate"}):null,"input"===t?this._renderInputBlock():null,"add-spatial-location"===t?this._renderAddSpatialLocationBlock():null,"add-nso-location"===t?this._renderAddNonspatialLocationBlock():null)}_renderBarriersFlagsContainer(){const{messages:e}=this,t=[];let s=[];s=this.viewModel._flags.filter(e=>"barrier"===e.type),s.forEach(e=>{e.displayValue&&t.push(this._renderFlagRow(e,"barrier"))});let i=null;return this._symbolBarrier&&(i=this._getSymbolIcon(this._symbolBarrier)),_("calcite-block",{class:S.blockContent,collapsible:!0,expanded:!0,heading:e.inputsStrings.headerBarrier+" ("+s.length+")",overlayPositioning:"fixed"},_("div",{slot:"icon"},i||_("calcite-icon",{icon:"x-circle-f",scale:"s"})),_("div",null,e.inputsStrings.barrierPointHint),_("div",{class:S.listContainer},t),this._warningNoBarrierAssetFound?this._renderWarningMessage("noBarrierAsset",!0):null,this._warningNoBarrierAssetNsoFound?this._renderWarningMessage("noBarrierAssetNso",!0):null,_("div",{class:S.addButtonContainer},_("calcite-split-button",{appearance:"outline-fill",primaryIconStart:"select",primaryText:e.inputsStrings.addPointOption,onCalciteSplitButtonPrimaryClick:()=>{this._setupAddTraceLocation("barrier")}},_("calcite-dropdown-group",{selectionMode:"none"},_("calcite-dropdown-item",{onCalciteDropdownItemSelect:()=>{this._setupAddNonspatialObject("barrier")}},e.inputsStrings.addNonspatialOption)))))}_renderFlagRow(e,t){const{messages:s,messagesCommon:i}=this,r=[];let o=!1;return null!=e.allTerminals&&e.allTerminals.terminals.length>0&&(o=!0,e.allTerminals.terminals.forEach(t=>{let s=!1;e?.selectedTerminals?.includes(t.id)&&(s=!0),r.push(_("calcite-combobox-item",{key:t.name,selected:s,textLabel:t.name,value:t.id}))})),_("calcite-block",{collapsible:null!==e.allTerminals||"barrier"===e.type,heading:e.displayValue?.value??"",key:"pop"+e.globalId+e.type+e.id+t,overlayPositioning:"fixed"},_("calcite-action",{icon:"trash",label:i.remove,onclick:()=>{this.viewModel.removeFlag(e)},scale:"s",slot:"header-menu-actions",text:i.remove,textEnabled:!0}),e.mapGraphic&&e.mapPoint?_("calcite-action",{icon:"zoom-to-object",label:s.globalStrings.zoomToFeature,onclick:()=>{this.viewModel.zoomToAsset(e.details.geometry)},scale:"s",slot:"header-menu-actions",text:s.globalStrings.zoomToFeature,textEnabled:!0}):null,"barrier"===e.type?_("calcite-label",{layout:"inline",scale:"s"},_("calcite-checkbox",{checked:e.isFilterBarrier,onclick:()=>{this.viewModel.manageFilterBarrier(!e.isFilterBarrier,e)},scale:"s"}),s.inputsStrings.barrierFilter):null,o?_("calcite-combobox",{label:s.globalStrings.selectTerminalPlaceholder,maxItems:0,overlayPositioning:"fixed",placeholder:s.globalStrings.selectTerminalPlaceholder,scale:"s",selectionMode:"multiple",onCalciteComboboxChange:t=>{t.currentTarget.selectedItems.length>0?(e.selectedTerminals=[],t.currentTarget.selectedItems.forEach(t=>{this.viewModel.addTerminal(t.value,e)})):e.selectedTerminals=[]},onCalciteComboboxChipClose:t=>{t.preventDefault(),this.viewModel.removeTerminal(t.currentTarget.value,e)}},r):null)}_renderHighlightColorPicker(e,t,s){const{messages:i}=this,{graphicHandler:r}=this.viewModel,o=[],a=new RegExp(`^${e.hex}$`,"i"),l=r.highlightColor.length>y.length?5:4;for(const n of r.highlightColor)o.push(_("calcite-action",{active:a.test(n.hex),key:n.hex,label:i.resultsStrings.graphicColor,onclick:()=>{"aggregate"===s?this.viewModel.changeResultGraphicColor(n,t):this.viewModel.changeResultAreaColor(t,n)},scale:"s",text:i.resultsStrings.graphicColor},_("calcite-color-picker-swatch",{active:a.test(n.hex),color:n.hex,scale:"s"})));return _("calcite-action-pad",{expandDisabled:!0,layout:"grid",position:"start"},_("calcite-action-group",{columns:l},o))}_renderRemoveTraceContainer(e){const{messages:t}=this;return _("calcite-action",{icon:"trash",label:t.globalStrings.clearResults,onclick:()=>{this._alertRemoveModal=!0,this._activeTrace=e.trace},scale:"s",slot:"header-menu-actions",text:t.globalStrings.clearResults,textEnabled:!0})}_renderResultsTab(){let e="results";return this._showFeatureInfoActive&&(e="show-feature-info"),this.viewModel._activeProgress&&(e="executing"),this._confirmReset&&(e="clear-trace-results"),_("calcite-tab",{key:`${this.id}__results-tab-item`},"executing"===e?this._renderExecutingTraceBlock():null,"results"===e?this.viewModel.traceResults.length?this._renderResultsPanel():this._renderWarningMessage("noTraceExecuted",!1):null,"show-feature-info"===e?this._renderShowFeatureInfoBlock():null,"clear-trace-results"===e?this._renderClearTraceResultsBlock():null)}_renderResultsPanel(){const{messages:e}=this;return _("calcite-block",{class:S.blockContainer,expanded:!0,key:`${this.id}__results-block`,label:e.resultsStrings.headerTabResults},_("calcite-flow",{class:S.flow},this._renderTraceResults(),this._renderTraceResultFunctions(),this._renderTraceResultByAssetGroup(),this._renderTraceResultByAssetType(),this._renderTraceResultIndividual()))}_renderResultRowFunctions(e){return _("calcite-block",{collapsible:!1,heading:e.networkAttributeName+" "+e.functionType+" = "+e.result,overlayPositioning:"fixed"})}_renderResultRowAssetGroup(e){const t=this._getAssetGroupName(e[0]);return _("calcite-list-item",{key:`${t}-${e.assetGroupCode}`,label:t+" ("+e.length+")",onCalciteListItemSelect:()=>{this.switchToFromAssetType(this._groupResultsByAssetType(e),t+" ("+e.length+")","assetType")}},_("calcite-icon",{icon:"chevron-right",scale:"s",slot:"content-end"}))}_renderResultRowAssetType(e){const t=this._getAssetTypeName(e[0]);return _("calcite-list-item",{key:`${t}-${e.assetTypeCode}`,label:t+" ("+e.length+")",onCalciteListItemSelect:()=>{this._updatingHandles.addPromise(this.viewModel.queryFeaturesById(e).then(s=>{if(s?.length){this._resultObjectIdField=s[0].layer.objectIdField,"objectid"===this._resultDisplayField&&(this._resultDisplayField=s[0].layer.objectIdField),"objectid"===this._resultSortField&&(this._resultSortField=s[0].layer.objectIdField);const i=this._appendAttributes(e,s,"objectId");this.switchToFromIndividualRecords(i,t+" ("+e.length+")","records")}else this.switchToFromIndividualRecords(e,t+" ("+e.length+")","records")}))}},_("calcite-icon",{icon:"chevron-right",scale:"s",slot:"content-end"}))}_renderResultRowIndividual(e){const{messages:t}=this;let s,i=null;if(i=e?.details?.fields.find(({name:e})=>e===this._resultDisplayField),"date"===i?.type){s=new Date(e.details.attributes[this._resultDisplayField]).toDateString()}else if("assetgroup"===this._resultDisplayField.toLowerCase())s=this._getAssetGroupName(e);else if("assettype"===this._resultDisplayField.toLowerCase())s=this._getAssetTypeName(e);else if(i?.domain&&R(i.domain)){const t=i.domain.codedValues.find(({code:t})=>t===e.details.attributes[this._resultDisplayField]);s=t?.name}else s=e.details?.attributes[this._resultDisplayField]??e.objectId;return s&&""!==s&&null!==s?"string"==typeof s&&(s.trim()||(s=t.resultsStrings.noValue)):s=t.resultsStrings.noValue,_("calcite-list-item",{key:e.details.uid,label:s,onCalciteListItemSelect:async()=>{this._disablePopup(),this._showFeatureInfoActive=!0;const t=c(e.details?.layer)?e.details?.layer:null;if(t){const s=Object.keys(e.details.attributes).find(e=>e.toLowerCase()===t.subtypeField.toLowerCase())??"assetgroup",i=t.sublayers.find(t=>t.subtypeCode===e.details.attributes[s]),r=Object.keys(e.details.attributes).find(e=>e.toLowerCase()===t.objectIdField.toLowerCase())??"objectid",o=new d;o.outFields=["*"],o.returnGeometry=!0,o.where=r+" = "+e.details.attributes[r];const a=await(i?.queryFeatures(o));a&&this._resultFeatureWidget.open(a.features[0])}else this._resultFeatureWidget.open(e.details)}},_("calcite-icon",{icon:"chevron-right",scale:"s",slot:"content-end"}))}_renderShowFeatureInfoBlock(){const{messages:e}=this;return _("calcite-block",{class:S.blockContainer,expanded:!0,key:`${this.id}__show-feature-info-block`,label:e.resultsStrings.headerFeatureInfo},this._resultFeatureWidget.render())}_renderStartFlagsContainer(){const{messages:e}=this,t=[];let s=[];s=this.viewModel._flags.filter(e=>"starting-point"===e.type),s.forEach(e=>{e.displayValue&&t.push(this._renderFlagRow(e,"start"))});let i=null;return this._symbolStartFlag&&(i=this._getSymbolIcon(this._symbolStartFlag)),_("calcite-block",{class:S.blockContent,collapsible:!0,expanded:!0,heading:e.inputsStrings.headerStartingPoint+" ("+s.length+")",overlayPositioning:"fixed"},_("div",{slot:"icon"},i||_("calcite-icon",{icon:"pin",scale:"s"})),_("div",null,e.inputsStrings.startingPointHint),_("div",{class:S.listContainer},t),this._warningNoStartAssetFound?this._renderWarningMessage("noStartAsset",!0):null,this._warningNoStartAssetNsoFound?this._renderWarningMessage("noStartAssetNso",!0):null,_("div",{class:S.addButtonContainer},_("calcite-split-button",{appearance:"outline-fill",primaryIconStart:"select",primaryText:e.inputsStrings.addPointOption,onCalciteSplitButtonPrimaryClick:()=>{this._setupAddTraceLocation("starting-point")}},_("calcite-dropdown-group",{selectionMode:"none"},_("calcite-dropdown-item",{onCalciteDropdownItemSelect:()=>{this._setupAddNonspatialObject("starting-point")}},e.inputsStrings.addNonspatialOption)))))}_renderStartOverContainer(){const{messages:e}=this;return _("calcite-fab",{appearance:"solid",icon:"trash",kind:"brand",onclick:()=>{this.confirmReset()},slot:"fab",text:e.resultsStrings.startOverButton,textEnabled:!0,title:e.resultsStrings.startOverButton,type:"button"})}_renderTraceResultByAssetGroup(){const e=this._traceResultsAssetGroup,t=[];for(const s in e){const i=e[s];for(const e in i)t.push(this._renderResultRowAssetGroup(i[e]))}return _("calcite-flow-item",{heading:this._traceHeaderForFlow,key:"assetGroupResultMultiple",selected:"assetGroup"===this._traceResultsState,onCalciteFlowItemBack:()=>{this.switchToFromAssetGroup([],"","result")}},_("calcite-list",{label:""},t),this._renderStartOverContainer())}_renderTraceResultByAssetType(){const e=this._traceResultsAssetType,t=[];for(const s in e)e[s].length>0&&t.push(this._renderResultRowAssetType(e[s]));return _("calcite-flow-item",{heading:this._assetGroupHeader,key:"assetTypeResult",loading:this._updatingHandles.updating,selected:"assetType"===this._traceResultsState,onCalciteFlowItemBack:()=>{this.switchToFromAssetType([],"","assetGroup")}},_("calcite-list",{label:"",selectionMode:"none"},t),this._renderStartOverContainer())}_renderTraceResultFunctions(){if("functions"!==this._traceResultsState)return null;const{messages:e}=this,t=this._traceResultsFunctions,s=[];return t.forEach(e=>{s.push(this._renderResultRowFunctions(e))}),_("calcite-flow-item",{heading:e.resultsStrings.functionHeader,key:"functionResultMultiple",selected:"functions"===this._traceResultsState,onCalciteFlowItemBack:()=>{this.switchToFromFunctions([],"result")}},s,this._renderStartOverContainer())}_renderTraceResultIndividual(){const{messages:e}=this,t=this._traceResultsIndividual;t.sort(this._compare(this._resultSortField,this._resultSortOrder));const s=[];if(t.length>0){(t[0].details?.fields.some(({name:e})=>e.toLowerCase()===this._resultDisplayField.toLocaleLowerCase())??!1)||(this._resultDisplayField=this._resultObjectIdField,this._resultSortField=this._resultObjectIdField),t.forEach(e=>{e?.details&&s.push(this._renderResultRowIndividual(e))}),0===s.length&&s.push(_("calcite-list-item",{label:e.resultsStrings.noFeaturesInMap}))}return _("calcite-flow-item",{heading:this._assetTypeHeader,key:"individualResult",selected:"records"===this._traceResultsState,onCalciteFlowItemBack:()=>{this._showResultOptions=!1,this.switchToFromIndividualRecords([],"","assetType")}},_("calcite-action",{afterCreate:b,bind:this,"data-node-ref":"_individualResultNode",icon:"gear",id:"field_options"+this.id,label:e.resultsStrings.displayAttribute,onclick:()=>{this._showResultOptions=!0},slot:"header-actions-end",text:e.resultsStrings.displayAttribute}),this._renderTraceResultIndividualPopover(),_("calcite-list",{label:"",selectionMode:"none"},s),this._renderStartOverContainer())}_renderTraceResultIndividualPopover(){const{messages:e}=this,t=this._traceResultsIndividual,s=[],i=[];return t.length>0&&(t[0].details?t[0].details.fields.forEach(({name:e,alias:t})=>{s.push(_("calcite-option",{key:`display-${e}`,label:t??e,selected:e===this._resultDisplayField,value:e})),i.push(_("calcite-option",{key:`sort-${e}`,label:t??e,selected:e===this._resultSortField,value:e}))}):(s.push(_("calcite-option",{key:`display-${this._resultDisplayField}`,label:this._resultDisplayField,value:this._resultDisplayField})),i.push(_("calcite-option",{key:`sort-${this._resultDisplayField}`,label:this._resultDisplayField,value:this._resultDisplayField})))),_("calcite-popover",{autoClose:!0,label:e.resultsStrings.displayAttribute,offsetDistance:0,offsetSkidding:0,open:this._showResultOptions,overlayPositioning:"fixed",placement:"left-start",referenceElement:this._individualResultNode,styles:null!==this.domNode?k(.75*this.domNode.clientWidth):F()},_("calcite-block",{expanded:!0,label:e.resultsStrings.displayAttribute,overlayPositioning:"fixed"},_("calcite-label",{scale:"s"},e.resultsStrings.displayAttribute,_("calcite-select",{label:e.resultsStrings.displayAttribute,scale:"s",onCalciteSelectChange:e=>{const t=e.currentTarget;this._resultDisplayField=t.selectedOption.value,this._showResultOptions=!1}},s)),_("calcite-label",{scale:"s"},e.resultsStrings.sortBy,_("calcite-select",{label:e.resultsStrings.sortBy,scale:"s",onCalciteSelectChange:e=>{const s=e.currentTarget;this._resultSortField=s.selectedOption.value,t.sort(this._compare(this._resultSortField,this._resultSortOrder)),this._traceResultsIndividual=t,this._showResultOptions=!1}},i))))}_renderTraceResults(){const{messages:e,messagesCommon:t}=this,{selectFeatures:s}=e.resultsStrings,i=this.viewModel.traceResults,r=[];return i.forEach((t,i)=>{let o=[],a=[],l=!1,n=!1,c=!1,d="";null!==t.results&&t.results.hasOwnProperty("elements")?(null!==t.results.aggregatedGeometry&&(n=!0),null!==t.results.globalFunctionResults&&t.results.globalFunctionResults.length>0&&(a=t.results.globalFunctionResults,a.length>0&&(c=!0)),t.results.elements&&t.results.elements.length>0&&(o=t.results.elements,o.length>0&&(l=!0)),(n||l)&&(d=this.messagesUnits.units[t.resultArea?.unit]?.abbr),r.push(_("calcite-block",{class:S.blockContent,collapsible:!0,description:t.trace.description??"",expanded:!0,heading:t.trace.title,key:`${t.trace.title}${i}`,overlayPositioning:"fixed"},this._renderRemoveTraceContainer(t),_("calcite-list",{label:""},c?_("calcite-list-item",{label:e.resultsStrings.functionHeader+" ("+a.length+")",onCalciteListItemSelect:()=>{this.switchToFromFunctions(a,"functions")}},_("calcite-icon",{icon:"chevron-right",scale:"s",slot:"content-end"})):null,l&&this.viewModel.showSelectionAttributes?_("calcite-list-item",{key:this.id,label:e.resultsStrings.viewFeatures+" ("+o.length+")",onCalciteListItemSelect:()=>{this.switchToFromAssetGroup(this._groupResultsByAssetGroup(t),t.trace.title+" ("+o.length+")","assetGroup")}},_("calcite-icon",{icon:"chevron-right",scale:"s",slot:"content-end"})):this.viewModel.showSelectionAttributes?_("calcite-label",{layout:"inline",scale:"s"},e.resultsStrings.noSelectionResults):null),l?_("div",{class:S.doublePaddingTop},_("calcite-label",{layout:"inline",onclick:e=>{e.preventDefault(),e.stopPropagation(),this.viewModel.mergeSelection(!t.selectionEnabled,t.trace)},scale:"s"},_("calcite-checkbox",{checked:t.selectionEnabled,onclick:e=>{e.preventDefault(),e.stopPropagation(),this.viewModel.mergeSelection(!t.selectionEnabled,t.trace)}}),this.viewModel.showSelectionAttributes?s:`${s} (${o.length})`)):null,n?_("calcite-block-section",{expanded:t.graphicEnabled,key:`aggregate-${t.trace.title}-${i}`,text:e.resultsStrings.highlightTrace,toggleDisplay:"switch",onCalciteBlockSectionToggle:e=>{e.currentTarget.expanded?this.viewModel.changeResultGraphicColor(t.graphicColor,t):this.viewModel.removeResultGraphicFromView(t)}},_("calcite-list",{label:e.resultsStrings.graphicColor,selectionMode:"none"},_("calcite-list-item",{label:e.resultsStrings.graphicColor,onclick:e=>{this._swatchNode=e.currentTarget,this._activeSwatch="aggGeom_"+i}},_("calcite-color-picker-swatch",{color:t.graphicColor.hex,scale:"s",slot:"actions-end"})))):null,this.enableResultArea&&(n||l)?_("calcite-block-section",{expanded:t.resultArea?.show,key:`area-${t.trace.title}-${i}`,text:e.resultsStrings.resultAreaHeader,toggleDisplay:"switch",onCalciteBlockSectionToggle:e=>{e.currentTarget.expanded?t.resultAreaGraphic?this.viewModel.addResultAreaToMap(t,t.resultAreaGraphic):this.viewModel.addResultAreaToMap(t):this.viewModel.removeResultAreaFromMap(t)}},_("calcite-list",{label:"",selectionMode:"none"},_("calcite-list-item",{label:e.resultsStrings.graphicColor,onclick:e=>{const t=e.currentTarget;this._swatchNode=t,this._activeSwatch="resultArea_"+i}},_("calcite-color-picker-swatch",{color:t.resultArea?.color.hex,scale:"s",slot:"actions-end"}))),_("calcite-list",{label:"",selectionMode:"none"},_("calcite-list-item",{label:e.resultsStrings.resultAreaBuffer},_("calcite-input-number",{afterCreate:this._afterComponentCreate,class:S.numberInput,max:999999,min:0,scale:"s",slot:"actions-end",suffixText:d,value:t.resultArea?.distance.toString(),onCalciteInputNumberChange:e=>{if(!this.view?.popup)return;this.view.popup.visible&&this.view.closePopup();const s=e.currentTarget;t.resultArea.distance>=0?(t.resultArea.distance=parseInt(s.value,10),this.viewModel.removeResultAreaFromMap(t),this.viewModel.addResultAreaToMap(t)):(t.resultArea.distance=0,this.viewModel.removeResultAreaFromMap(t),this.viewModel.addResultAreaToMap(t))}})))):null,_("calcite-popover",{autoClose:!0,closable:!0,label:e.resultsStrings.graphicColor,offsetDistance:0,offsetSkidding:0,open:this._activeSwatch==="aggGeom_"+i||this._activeSwatch==="resultArea_"+i,overlayPositioning:"fixed",placement:"auto-start",referenceElement:this._swatchNode,scale:"s",onCalcitePopoverClose:()=>{this._swatchNode=null,this._activeSwatch=null}},this._renderHighlightColorPicker(this._activeSwatch==="resultArea_"+i?t.resultArea?.color:t.graphicColor,t,this._activeSwatch==="resultArea_"+i?"resultArea":"aggregate"))))):r.push(_("calcite-block",{collapsible:!1,expanded:!0,heading:t.trace.title,key:"error-"+i,overlayPositioning:"fixed"},this._renderRemoveTraceContainer(t),this._renderWarningMessage("noController",!1,t.status)))}),_("calcite-flow-item",{key:"traceResults",selected:"result"===this._traceResultsState},r,this._renderStartOverContainer(),this._alertRemoveModal?_("calcite-scrim",{key:"prompt"},_("div",{class:S.clearPrompt},_("h3",{slot:"header"},e.globalStrings.clearResults),_("div",{slot:"content"},e.alertsStrings.clearResultsAlert),_("div",{class:S.promptDivider}),_("div",{styles:A("row")},_("calcite-button",{appearance:"outline",onclick:()=>{this._alertRemoveModal=!1},slot:"secondary",width:"full"},t.cancel),_("calcite-button",{onclick:()=>{this._activeTrace&&this.viewModel.clearResult(this._activeTrace),this._alertRemoveModal=!1,0===this.viewModel.traceResults.length?this.switchTab("input"):(this._activeTrace=this.viewModel.traceResults[0].trace,this._traceResultsState="result")},slot:"primary",width:"full"},t.form.ok)))):null)}_renderTraceSelectorContainer(){const{messages:e}=this,t=this.viewModel.traces.map(e=>this._renderComboboxItem({value:e.globalId,text:e.title,selected:e.selected??!1})),s=this.viewModel.traces.filter(e=>e.selected),i=e.tracingStrings.traceOperation+` (${s.length})`;return _("calcite-block",{class:S.blockContent,collapsible:!0,expanded:!0,heading:i,overlayPositioning:"fixed"},_("calcite-icon",{icon:"utility-network-trace",scale:"s",slot:"icon"}),_("calcite-combobox",{label:e.inputsStrings.selectTraces,maxItems:0,overlayPositioning:"fixed",placeholder:e.inputsStrings.selectTraces,scale:"s",selectionMode:"multiple",onCalciteComboboxChange:e=>{this.viewModel.traces.forEach(t=>{t.selected=e.currentTarget.selectedItems.some(e=>e.value===t.globalId)}),e.currentTarget.selectedItems.length&&(this._warningNoTraceSelected=!1)}},t))}_renderUtilityNetworkTrace(){const{viewModel:e,viewModel:{utilityNetwork:t}}=this,s=e.view?.map,{messages:i}=this;let r=_("calcite-tabs",{class:S.tabs,layout:"center",position:"top",styles:C(this.container)},_("calcite-tab-nav",{slot:"title-group"},_("calcite-tab-title",{onclick:()=>{this.switchTab("input")},selected:"input"===this._activeTab},i.inputsStrings.headerTabInputs),_("calcite-tab-title",{onclick:()=>{this.switchTab("results")},selected:"results"===this._activeTab},i.resultsStrings.headerTabResults)),this._renderInputsTab(),this._renderResultsTab());return(!s.utilityNetworks?.length&&!t||t&&!t.sharedNamedTraceConfigurations.length)&&(r=_("calcite-panel",null,this._renderWarningMessage("noTraceConfig",!1))),this._loadUnError||(r=_("calcite-panel",null,this._renderWarningMessage("loadUNError",!1,this._errorMessage))),r}_renderWarningMessage(e,t,s){const{messages:i}=this;let r=i.alertsStrings.NoRunAlertHeader,o=i.alertsStrings.noResultsInfo;switch(e){case"flag":r=i.alertsStrings.startingPointAlertHeader,o=i.alertsStrings.startingPointAlert;break;case"noTerminal":r=i.alertsStrings.noTerminalDefinedHeader,o=i.alertsStrings.noTerminalDefined;break;case"trace":r=i.alertsStrings.selectTraceAlertHeader,o=i.alertsStrings.selectTraceAlert;break;case"noTraceExecuted":r=i.alertsStrings.NoRunAlertHeader,o=i.alertsStrings.noResultsInfo;break;case"noBarrierAsset":case"noStartAsset":r=i.alertsStrings.noAssetsFoundHeader,o=i.alertsStrings.noAssetFound;break;case"noBarrierAssetNso":case"noStartAssetNso":r="",o=i.alertsStrings.noAssetFound;break;case"noTraceConfig":r="",o=i.alertsStrings.noTraceSupported;break;default:r=i.alertsStrings.genericErrorHeader,o=s||""}return _("div",{class:S.noticeContainer,key:e},_("calcite-notice",{closable:t,icon:!0,key:e,kind:"danger",open:!0,scale:"s",width:"auto",onCalciteNoticeClose:()=>this._handleWarningNoticeClose(e)},_("div",{slot:"title"},r),_("div",{slot:"message"},o)))}_afterComponentCreate(e){"value"in e&&null!=e.value&&"setNumberValue"in e&&e.setNumberValue({committing:!1,value:e.value,origin:"direct"})}_appendAttributes(e,t,s){const i=[];return e.forEach(e=>{t.forEach(t=>{t.featureSet.features.forEach(r=>{e[s]===r.attributes[this._resultObjectIdField]&&(e.details=r,e.details.fields=t.featureSet.fields,i.push(e))})})}),i}_changeCursor(e="default"){this.removeHandles(M),this.view&&"default"!==e&&this.addHandles(this.view.acquireCursor(e),M)}_disablePopup(){const{view:e}=this;e.popupEnabled=!1,e.closePopup()}_compare(e,t){return(s,i)=>{let r=0,o=s.details?.attributes[e]??s.objectId,a=i.details?.attributes[e]??i.objectId;return isNaN(o)&&(o=o.toLowerCase()),isNaN(a)&&(a=a.toLowerCase()),"desc"===t?o>a?r=1:o<a&&(r=-1):o<a?r=1:o>a&&(r=-1),r}}_getAssetGroupName(e){let t=e.assetGroupCode.toString();const s=e.assetGroupCode,i=this.viewModel.getValidSources().find(t=>t.sourceId===e.networkSourceId);if(i){const e=i.assetGroups.find(e=>e.assetGroupCode===s);e&&(t=e.assetGroupName)}return t}_getAssetTypeName(e){let t=e.assetTypeCode.toString();const s=e.assetGroupCode,i=this.viewModel.getValidSources().find(t=>t.sourceId===e.networkSourceId);if(i){const r=i.assetGroups.find(e=>e.assetGroupCode===s);if(r){const s=r.assetTypes.find(t=>t.assetTypeCode===e.assetTypeCode);s&&(t=s.assetTypeName)}}return t}_getSymbolIcon(e){return"picture-marker"===e.type?_("img",{height:e.height,src:e.url??void 0,width:e.width}):null}_groupBy(e,t){return e.reduce((e,s)=>((e[s[t]]=e[s[t]]||[]).push(s),e),{})}_groupResultsByAssetGroup(e){const t=[],s=e.results?.elements,i=this._groupBy(s??[],"networkSourceId");for(const r in i)t.push(this._groupBy(i[r],"assetGroupCode"));return t}_groupResultsByAssetType(e){return this._groupBy(e,"assetTypeCode")}_handleWarningNoticeClose(e){switch(e){case"flag":this._warningNoFlag=!1;break;case"noTerminal":this._warningNoTerminal=!1;break;case"trace":this._warningNoTraceSelected=!1;break;case"noStartAsset":this._warningNoStartAssetFound=!1;break;case"noStartAssetNso":this._warningNoStartAssetNsoFound=!1;break;case"noBarrierAsset":this._warningNoBarrierAssetFound=!1;break;case"noBarrierAssetNso":this._warningNoBarrierAssetNsoFound=!1}}_mixCustomStrings(){const{messages:e}=this;this.inputSettings.length>0&&this.inputSettings.forEach(t=>{"starting-point"===t.type&&(e.inputsStrings.headerStartingPoint=t.label,e.inputsStrings.startingPointHint=t.description),"barrier"===t.type&&(e.inputsStrings.headerBarrier=t.label,e.inputsStrings.barrierPointHint=t.description)})}_overrideFlagSymbol(){this.inputSettings.length>0&&this.inputSettings.forEach(e=>{"starting-point"===e.type?this._symbolStartFlag=e.symbol:this._symbolBarrier=e.symbol,this.viewModel.changeFlagSymbol(e.type,e.symbol)})}_processFlagOnLoad(){return this.view?.when().then(()=>{this._watchHandler=r(()=>!this.view?.updating,async()=>{this._warningNoFlag=!1,this._warningNoBarrierAssetFound=!1,this._warningNoStartAssetFound=!1;const e=await this.viewModel.addFlagsOnLoad();this.viewModel.removeFlagsOnLoadWatcher(),e.includes("barrier")&&(this._warningNoBarrierAssetFound=!0),e.includes("starting-point")&&(this._warningNoStartAssetFound=!0),this.disabled=!1,null!==this._watchHandler&&this._watchHandler.remove()})})}_registerWatchers(){this.addHandles([t(()=>this.selectedTraces,()=>{this.viewModel.selectTracesOnLoad(),this.scheduleRender()}),t(()=>this.defaultGraphicColor,()=>{this.viewModel.traceResults.length>0&&this.viewModel.traceResults.forEach(e=>{this.viewModel.changeResultGraphicColor(this.viewModel.defaultGraphicColor,e)}),this.scheduleRender()})])}_renderComboboxItem({text:e,value:t,selected:s}){return _("calcite-combobox-item",{key:t,selected:s,textLabel:e,value:t})}_resetResultFeatureWidget(){this._showFeatureInfoActive=!1,this._resultFeatureWidget.feature=null,this.view.popupEnabled=this._wasPopupEnabled}_resetTraceLocationWarnings(){this._warningNoBarrierAssetFound=!1,this._warningNoBarrierAssetNsoFound=!1,this._warningNoStartAssetFound=!1,this._warningNoStartAssetNsoFound=!1}_setupAddNonspatialObject(e){this._disablePopup(),this._traceLocationType=e,this._addNonspatialObjectActive=!0,this._resetTraceLocationWarnings(),this.viewModel.getNonspatialTraceLocationInitialFeature().then(e=>{this._findNonspatialFeatureWidget.feature=null;const t=e.graphic;this._findNonspatialFeatureWidget.open(t)}).catch(()=>{this._warningNoStartAssetNsoFound="starting-point"===e,this._warningNoBarrierAssetNsoFound="barrier"===e,this._addNonspatialObjectActive=!1}).finally(()=>this._changeCursor("default"))}_setupAddTraceLocation(e){this._traceLocationType=e,this._changeCursor("crosshair"),this._selectToolActive=!0,this._addNonspatialObjectActive=!1,this._resetTraceLocationWarnings(),this.viewModel.addFlagByHit(this._traceLocationType,this._symbolStartFlag).then(e=>{this._changeCursor("default"),e?this._warningNoFlag=!1:(this._warningNoStartAssetFound="starting-point"===this._traceLocationType,this._warningNoBarrierAssetFound="barrier"===this._traceLocationType),this._selectToolActive=!1})}_utilityNetworkTraceInitialized(){this.viewModel.loadUtilityNetwork().then(async e=>{e&&(this.viewModel.selectTracesOnLoad(),this._registerWatchers(),this.viewModel.flags.length>0&&await this._processFlagOnLoad()),this.disabled=!1}).catch(e=>{const{messages:t}=this;this._loadUnError=!1,"utility-network:no-user-type-extension"===e.name||e.details?.raw?.extendedCode===N.noExtension?this._errorMessage=t.alertsStrings.noUserExtension:this._errorMessage=e.message,this.disabled=!1})}_viewChangeHandle(){this._wasPopupEnabled=this.view?.popupEnabled??!1,this._findNonspatialFeatureWidget.view=this.view,this._resultFeatureWidget.view=this.view}};e([o()],x.prototype,"_activeTab",void 0),e([o()],x.prototype,"_activeTrace",void 0),e([o()],x.prototype,"_activeSwatch",void 0),e([o()],x.prototype,"_addNonspatialObjectActive",void 0),e([o()],x.prototype,"_alertRemoveModal",void 0),e([o()],x.prototype,"_assetGroupHeader",void 0),e([o()],x.prototype,"_assetTypeHeader",void 0),e([o()],x.prototype,"_confirmReset",void 0),e([o()],x.prototype,"_errorMessage",void 0),e([o()],x.prototype,"_swatchNode",void 0),e([o()],x.prototype,"_selectToolActive",void 0),e([o()],x.prototype,"_showFeatureInfoActive",void 0),e([o()],x.prototype,"_traceHeaderForFlow",void 0),e([o()],x.prototype,"_traceResultsFunctions",void 0),e([o()],x.prototype,"_traceResultsAssetGroup",void 0),e([o()],x.prototype,"_traceResultsAssetType",void 0),e([o()],x.prototype,"_traceResultsIndividual",void 0),e([o()],x.prototype,"_traceResultsState",void 0),e([o()],x.prototype,"_warningNoFlag",void 0),e([o()],x.prototype,"_warningNoTraceSelected",void 0),e([o()],x.prototype,"_updatingHandles",void 0),e([o()],x.prototype,"defaultGraphicColor",null),e([o()],x.prototype,"disabled",void 0),e([o()],x.prototype,"enableResultArea",null),e([o()],x.prototype,"flags",null),e([o()],x.prototype,"icon",null),e([o()],x.prototype,"inputSettings",void 0),e([o()],x.prototype,"label",null),e([o(),g("esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace")],x.prototype,"messages",void 0),e([o(),g("esri/t9n/common")],x.prototype,"messagesCommon",void 0),e([o(),g("esri/core/t9n/Units")],x.prototype,"messagesUnits",void 0),e([o()],x.prototype,"resultAreaProperties",null),e([o()],x.prototype,"selectedTraces",null),e([o()],x.prototype,"selectOnComplete",null),e([o()],x.prototype,"showGraphicsOnComplete",null),e([o()],x.prototype,"showSelectionAttributes",null),e([o({readOnly:!0})],x.prototype,"traceResults",null),e([o()],x.prototype,"utilityNetwork",null),e([o()],x.prototype,"view",null),e([m(["add-flag","add-flag-complete","add-flag-error","select-features","clear-selection","add-result-area","remove-result-area","create-result-area","reset"]),o({type:v})],x.prototype,"viewModel",void 0),x=e([a("esri.widgets.UtilityNetworkTrace")],x);const I=x;export{I as default};
5
+ import{__decorate as e}from"tslib";import{watch as t,on as s,initial as i,when as r}from"../core/reactiveUtils.js";import{property as o,subclass as a}from"../core/accessorSupport/decorators.js";import{UpdatingHandles as l}from"../core/support/UpdatingHandles.js";import n from"../layers/support/CodedValueDomain.js";import{isSubtypeGroupLayer as c}from"../layers/support/layerUtils.js";import d from"../rest/support/Query.js";import u from"./Widget.js";import{loadCalciteComponents as h}from"./support/componentsUtils.js";import{globalCss as p}from"./support/globalCss.js";import{messageBundle as g,vmEvent as m,tsx as _}from"./support/widget.js";import{storeNode as b}from"./support/widgetUtils.js";import w from"./UtilityNetworkTrace/UtilityNetworkTraceFeature.js";import v from"./UtilityNetworkTrace/UtilityNetworkTraceViewModel.js";import{defaultSwatchColors as y}from"./UtilityNetworkTrace/support/GraphicHandler.js";const f="esri-utility-network-trace",S={base:f,addButtonContainer:`${f}__add-button-container`,blockContainer:`${f}__block-container`,blockContent:`${f}__block-content`,clearPrompt:`${f}__reset-prompt`,clearResultsBlock:`${f}__clear-results-block`,doublePaddingTop:`${f}__double-pad-top`,flow:`${f}__flow`,listContainer:`${f}__list-container`,noticeContainer:`${f}__notice-container`,numberInput:`${f}__number-input`,promptDivider:`${f}__divider`,tabs:`${f}__tabs`};function T(e){return{height:e+"px"}}function k(e){return{width:e+"px"}}function F(){return{width:"75%"}}function C(e){return{width:"100%",height:window.getComputedStyle(e).getPropertyValue("max-height")}}function A(e){return{display:"flex",flexDirection:e}}function R(e){return e instanceof n}const N={noExtension:-2147208474},M=Symbol();let x=class extends u{constructor(e,t){super(e,t),this._activeTab="input",this._activeTrace=null,this._activeSwatch="",this._addNonspatialObjectActive=!1,this._alertRemoveModal=!1,this._assetGroupHeader="",this._assetTypeHeader="",this._confirmReset=!1,this._errorMessage="",this._swatchNode=null,this._selectToolActive=!1,this._showFeatureInfoActive=!1,this._traceHeaderForFlow="",this._traceResultsFunctions=[],this._traceResultsAssetGroup=[],this._traceResultsAssetType=[],this._traceResultsIndividual=[],this._traceResultsState="result",this._warningNoFlag=!1,this._warningNoTraceSelected=!1,this._findNonspatialFeatureWidget=new w({mode:"add-nso"}),this._individualResultNode=null,this._loadUnError=!0,this._resultDisplayField="objectid",this._resultFeatureWidget=new w({mode:"show-feature-info"}),this._resultObjectIdField="objectid",this._resultSortField="objectid",this._resultSortOrder="desc",this._showResultOptions=!1,this._symbolStartFlag=null,this._symbolBarrier=null,this._traceLocationType="starting-point",this._updatingHandles=new l,this._warningNoBarrierAssetFound=!1,this._warningNoBarrierAssetNsoFound=!1,this._warningNoStartAssetFound=!1,this._warningNoStartAssetNsoFound=!1,this._warningNoTerminal=!1,this._wasPopupEnabled=!1,this._watchHandler=null,this.disabled=!0,this.inputSettings=[],this.messages=null,this.messagesCommon=null,this.messagesUnits=null,this.viewModel=new v,this._afterComponentCreate=this._afterComponentCreate.bind(this)}initialize(){this._utilityNetworkTraceInitialized(),this.addHandles([t(()=>this.view,()=>this._viewChangeHandle(),i),t(()=>this.viewModel?.resultAreaProperties,()=>this.scheduleRender()),t(()=>this._addNonspatialObjectActive,e=>{this._findNonspatialFeatureWidget.feature=null,e?this._changeCursor("crosshair"):this.view.popupEnabled=this._wasPopupEnabled}),t(()=>this._showFeatureInfoActive,e=>{e||(this._resultFeatureWidget.feature=null,this.view.popupEnabled=this._wasPopupEnabled)}),s(()=>this._findNonspatialFeatureWidget,"add-nso-trace-location",({featureWidget:e})=>{this.viewModel.addNonspatialTraceLocation(e.graphic,this._traceLocationType),this._warningNoFlag=!1,this._addNonspatialObjectActive=!1}),s(()=>this._findNonspatialFeatureWidget,"close-un-trace-feature-block",()=>{this._changeCursor("default"),this._addNonspatialObjectActive=!1,this.viewModel.cancelAddFlagByHit()}),s(()=>this._resultFeatureWidget,"close-un-trace-feature-block",()=>{this._showFeatureInfoActive=!1}),s(()=>this._resultFeatureWidget,"close",()=>{this._resetResultFeatureWidget()})])}destroy(){this._findNonspatialFeatureWidget?.destroy(),this._resultFeatureWidget?.destroy()}get defaultGraphicColor(){return this.viewModel.defaultGraphicColor}set defaultGraphicColor(e){this.viewModel.defaultGraphicColor=e}get enableResultArea(){return this.viewModel.enableResultArea}set enableResultArea(e){this.viewModel.enableResultArea=e}get flags(){return this.viewModel.flags}set flags(e){this.viewModel.flags=e}get icon(){return"utility-network-trace"}set icon(e){this._overrideIfSome("icon",e)}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get resultAreaProperties(){return this.viewModel.resultAreaProperties}set resultAreaProperties(e){this.viewModel.resultAreaProperties=e}get selectedTraces(){return this.viewModel.selectedTraces}set selectedTraces(e){this.viewModel.selectedTraces=e}get selectOnComplete(){return this.viewModel.selectOnComplete}set selectOnComplete(e){this.viewModel.selectOnComplete=e}get showGraphicsOnComplete(){return this.viewModel.showGraphicsOnComplete}set showGraphicsOnComplete(e){this.viewModel.showGraphicsOnComplete=e}get showSelectionAttributes(){return this.viewModel.showSelectionAttributes}set showSelectionAttributes(e){this.viewModel.showSelectionAttributes=e}get traceResults(){return this.viewModel.traceResults}get utilityNetwork(){return this.viewModel.utilityNetwork}set utilityNetwork(e){this.viewModel.utilityNetwork=e}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}async checkCanTrace(){this._confirmReset=!1,this._resetResultFeatureWidget();const e=this.viewModel.checkCanTrace();e.status?(this._warningNoFlag=!1,this._warningNoTraceSelected=!1,this._warningNoTerminal=!1,this._traceResultsState="result",this.switchTab("results"),this.viewModel._activeProgress=!0,this.viewModel.removeAllResultAreaGraphics(),await this.viewModel.callTrace(),this.viewModel._activeProgress=!1):e.issues.forEach(e=>{switch(e){case"noStartingPoints":this._warningNoFlag=!0;break;case"noTerminalSelected":this._warningNoTerminal=!0;break;default:this._warningNoTraceSelected=!0}})}confirmReset(){this._confirmReset=!0}render(){return this._mixCustomStrings(),this._overrideFlagSymbol(),_("div",{class:this.classes(S.base,p.widget,p.panel,{[p.widgetDisabled]:this.disabled})},this._renderUtilityNetworkTrace())}loadDependencies(){return h({action:()=>import("@esri/calcite-components/dist/components/calcite-action"),"action-group":()=>import("@esri/calcite-components/dist/components/calcite-action-group"),"action-pad":()=>import("@esri/calcite-components/dist/components/calcite-action-pad"),block:()=>import("@esri/calcite-components/dist/components/calcite-block"),"block-section":()=>import("@esri/calcite-components/dist/components/calcite-block-section"),button:()=>import("@esri/calcite-components/dist/components/calcite-button"),checkbox:()=>import("@esri/calcite-components/dist/components/calcite-checkbox"),"color-picker-swatch":()=>import("@esri/calcite-components/dist/components/calcite-color-picker-swatch"),combobox:()=>import("@esri/calcite-components/dist/components/calcite-combobox"),"combobox-item":()=>import("@esri/calcite-components/dist/components/calcite-combobox-item"),"dropdown-group":()=>import("@esri/calcite-components/dist/components/calcite-dropdown-group"),"dropdown-item":()=>import("@esri/calcite-components/dist/components/calcite-dropdown-item"),fab:()=>import("@esri/calcite-components/dist/components/calcite-fab"),flow:()=>import("@esri/calcite-components/dist/components/calcite-flow"),"flow-item":()=>import("@esri/calcite-components/dist/components/calcite-flow-item"),icon:()=>import("@esri/calcite-components/dist/components/calcite-icon"),"input-number":()=>import("@esri/calcite-components/dist/components/calcite-input-number"),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"),loader:()=>import("@esri/calcite-components/dist/components/calcite-loader"),notice:()=>import("@esri/calcite-components/dist/components/calcite-notice"),option:()=>import("@esri/calcite-components/dist/components/calcite-option"),panel:()=>import("@esri/calcite-components/dist/components/calcite-panel"),popover:()=>import("@esri/calcite-components/dist/components/calcite-popover"),scrim:()=>import("@esri/calcite-components/dist/components/calcite-scrim"),select:()=>import("@esri/calcite-components/dist/components/calcite-select"),"split-button":()=>import("@esri/calcite-components/dist/components/calcite-split-button"),tab:()=>import("@esri/calcite-components/dist/components/calcite-tab"),"tab-nav":()=>import("@esri/calcite-components/dist/components/calcite-tab-nav"),"tab-title":()=>import("@esri/calcite-components/dist/components/calcite-tab-title"),tabs:()=>import("@esri/calcite-components/dist/components/calcite-tabs")})}switchTab(e){this._activeTab=e}switchToFromAssetGroup(e,t,s){this._traceHeaderForFlow=t,this._traceResultsAssetGroup=e,this._traceResultsState=s}switchToFromAssetType(e,t,s){this._assetGroupHeader=t,this._traceResultsAssetType=e,this._traceResultsState=s}switchToFromFunctions(e,t){this._traceResultsFunctions=e,this._traceResultsState=t}switchToFromIndividualRecords(e,t,s){this._assetTypeHeader=t,this._traceResultsIndividual=e,this._traceResultsState=s}_renderAddNonspatialLocationBlock(){const{messages:e}=this;return _("calcite-block",{expanded:!0,key:`${this.id}__add-spatial-location-block`,label:e.inputsStrings.addNonspatialOption},this._findNonspatialFeatureWidget.render())}_renderAddSpatialLocationBlock(){const{messages:e,messagesCommon:t}=this;return _("calcite-block",{class:S.blockContent,expanded:!0,heading:"starting-point"===this._traceLocationType?e.inputsStrings.headerStartingPoint:e.inputsStrings.headerBarrier,key:`${this.id}__add-nonspatial-location-block`,label:"starting-point"===this._traceLocationType?e.inputsStrings.headerStartingPoint:e.inputsStrings.headerBarrier},_("calcite-action",{icon:"x",onclick:()=>{this.viewModel.removeClickHandler(),this.view?.popup&&(this.view.popupEnabled=this._wasPopupEnabled),this._changeCursor("default"),this._selectToolActive=!1},slot:"actions-end",text:t.close}),_("calcite-notice",{icon:"starting-point"===this._traceLocationType?"pin-plus":"x-circle-f",kind:"info",open:!0},_("div",{slot:"message"},e.inputsStrings.addPointHint)))}_renderClearTraceResultsBlock(){const{messages:e,messagesCommon:t}=this;return _("calcite-scrim",{key:`${this.id}__clear-results-block`},_("calcite-block",{class:S.clearResultsBlock,expanded:!0},_("h3",null,e.resultsStrings.startOverButton),_("div",null,e.resultsStrings.startOverValidation),_("div",{class:S.promptDivider}),_("div",{styles:A("row")},_("calcite-button",{appearance:"outline",onclick:()=>{this._confirmReset=!1},slot:"secondary",width:"full"},t.cancel),_("calcite-button",{onclick:()=>{this._confirmReset=!1,this.viewModel.reset(),this.switchTab("input")},slot:"primary",width:"full"},t.form.ok))))}_renderExecutingTraceBlock(){const{messages:e}=this;return _("calcite-loader",{label:e.alertsStrings.traceExecuting,text:e.alertsStrings.traceExecuting,type:"indeterminate"})}_renderInputBlock(){const{messages:e}=this;return _("calcite-block",{class:S.blockContainer,expanded:!0,key:`${this.id}__inputs-block`,label:e.inputsStrings.headerTabInputs},_("calcite-flow",{class:S.flow},_("calcite-flow-item",{key:`${this.id}__inputs-flow-item`,selected:!this._selectToolActive&&!this._addNonspatialObjectActive},this._warningNoFlag?this._renderWarningMessage("flag",!0):null,this._warningNoTerminal?this._renderWarningMessage("noTerminal",!0):null,this._warningNoTraceSelected?this._renderWarningMessage("trace",!0):null,this._renderTraceSelectorContainer(),this._renderStartFlagsContainer(),this._renderBarriersFlagsContainer(),this._warningNoFlag&&this._warningNoTraceSelected?_("div",{styles:T(10)}):null,_("calcite-fab",{appearance:"solid",icon:"utility-network-trace",kind:"brand",onclick:()=>{this.checkCanTrace()},slot:"fab",text:e.tracingStrings.runTrace,textEnabled:!0,title:e.tracingStrings.runTrace,type:"button"}))))}_renderInputsTab(){const{messagesCommon:e}=this;let t="input";return this._selectToolActive&&!this._addNonspatialObjectActive&&(t="add-spatial-location"),!this._selectToolActive&&this._addNonspatialObjectActive&&(t="add-nso-location"),this.disabled&&(t="loading"),_("calcite-tab",{key:`${this.id}__inputs-tab-item`,selected:"input"===this._activeTab},"loading"===t?_("calcite-loader",{label:e.loading,type:"indeterminate"}):null,"input"===t?this._renderInputBlock():null,"add-spatial-location"===t?this._renderAddSpatialLocationBlock():null,"add-nso-location"===t?this._renderAddNonspatialLocationBlock():null)}_renderBarriersFlagsContainer(){const{messages:e}=this,t=[];let s=[];s=this.viewModel._flags.filter(e=>"barrier"===e.type),s.forEach(e=>{e.displayValue&&t.push(this._renderFlagRow(e,"barrier"))});let i=null;return this._symbolBarrier&&(i=this._getSymbolIcon(this._symbolBarrier)),_("calcite-block",{class:S.blockContent,collapsible:!0,expanded:!0,heading:e.inputsStrings.headerBarrier+" ("+s.length+")",overlayPositioning:"fixed"},null!=i?_("div",{slot:"content-start"},i):_("div",{slot:"icon-start"},_("calcite-icon",{icon:"x-circle-f",scale:"s"})),_("div",null,e.inputsStrings.barrierPointHint),_("div",{class:S.listContainer},t),this._warningNoBarrierAssetFound?this._renderWarningMessage("noBarrierAsset",!0):null,this._warningNoBarrierAssetNsoFound?this._renderWarningMessage("noBarrierAssetNso",!0):null,_("div",{class:S.addButtonContainer},_("calcite-split-button",{appearance:"outline-fill",primaryIconStart:"select",primaryText:e.inputsStrings.addPointOption,onCalciteSplitButtonPrimaryClick:()=>{this._setupAddTraceLocation("barrier")}},_("calcite-dropdown-group",{selectionMode:"none"},_("calcite-dropdown-item",{onCalciteDropdownItemSelect:()=>{this._setupAddNonspatialObject("barrier")}},e.inputsStrings.addNonspatialOption)))))}_renderFlagRow(e,t){const{messages:s,messagesCommon:i}=this,r=[];let o=!1;return null!=e.allTerminals&&e.allTerminals.terminals.length>0&&(o=!0,e.allTerminals.terminals.forEach(t=>{let s=!1;e?.selectedTerminals?.includes(t.id)&&(s=!0),r.push(_("calcite-combobox-item",{heading:t.name,key:t.name,selected:s,value:t.id}))})),_("calcite-block",{collapsible:null!==e.allTerminals||"barrier"===e.type,heading:e.displayValue?.value??"",key:"pop"+e.globalId+e.type+e.id+t,overlayPositioning:"fixed"},_("calcite-action",{icon:"trash",label:i.remove,onclick:()=>{this.viewModel.removeFlag(e)},scale:"s",slot:"header-menu-actions",text:i.remove,textEnabled:!0}),e.mapGraphic&&e.mapPoint?_("calcite-action",{icon:"zoom-to-object",label:s.globalStrings.zoomToFeature,onclick:()=>{this.viewModel.zoomToAsset(e.details.geometry)},scale:"s",slot:"header-menu-actions",text:s.globalStrings.zoomToFeature,textEnabled:!0}):null,"barrier"===e.type?_("calcite-label",{layout:"inline",scale:"s"},_("calcite-checkbox",{checked:e.isFilterBarrier,onclick:()=>{this.viewModel.manageFilterBarrier(!e.isFilterBarrier,e)},scale:"s"}),s.inputsStrings.barrierFilter):null,o?_("calcite-combobox",{label:s.globalStrings.selectTerminalPlaceholder,maxItems:0,overlayPositioning:"fixed",placeholder:s.globalStrings.selectTerminalPlaceholder,scale:"s",selectionMode:"multiple",onCalciteComboboxChange:t=>{t.currentTarget.selectedItems.length>0?(e.selectedTerminals=[],t.currentTarget.selectedItems.forEach(t=>{this.viewModel.addTerminal(t.value,e)})):e.selectedTerminals=[]},onCalciteComboboxChipClose:t=>{t.preventDefault(),this.viewModel.removeTerminal(t.currentTarget.value,e)}},r):null)}_renderHighlightColorPicker(e,t,s){const{messages:i}=this,{graphicHandler:r}=this.viewModel,o=[],a=new RegExp(`^${e.hex}$`,"i"),l=r.highlightColor.length>y.length?5:4;for(const n of r.highlightColor)o.push(_("calcite-action",{active:a.test(n.hex),key:n.hex,label:i.resultsStrings.graphicColor,onclick:()=>{"aggregate"===s?this.viewModel.changeResultGraphicColor(n,t):this.viewModel.changeResultAreaColor(t,n)},scale:"s",text:i.resultsStrings.graphicColor},_("calcite-color-picker-swatch",{active:a.test(n.hex),color:n.hex,scale:"s"})));return _("calcite-action-pad",{expandDisabled:!0,layout:"grid",position:"start"},_("calcite-action-group",{columns:l},o))}_renderRemoveTraceContainer(e){const{messages:t}=this;return _("calcite-action",{icon:"trash",label:t.globalStrings.clearResults,onclick:()=>{this._alertRemoveModal=!0,this._activeTrace=e.trace},scale:"s",slot:"header-menu-actions",text:t.globalStrings.clearResults,textEnabled:!0})}_renderResultsTab(){let e="results";return this._showFeatureInfoActive&&(e="show-feature-info"),this.viewModel._activeProgress&&(e="executing"),this._confirmReset&&(e="clear-trace-results"),_("calcite-tab",{key:`${this.id}__results-tab-item`},"executing"===e?this._renderExecutingTraceBlock():null,"results"===e?this.viewModel.traceResults.length?this._renderResultsPanel():this._renderWarningMessage("noTraceExecuted",!1):null,"show-feature-info"===e?this._renderShowFeatureInfoBlock():null,"clear-trace-results"===e?this._renderClearTraceResultsBlock():null)}_renderResultsPanel(){const{messages:e}=this;return _("calcite-block",{class:S.blockContainer,expanded:!0,key:`${this.id}__results-block`,label:e.resultsStrings.headerTabResults},_("calcite-flow",{class:S.flow},this._renderTraceResults(),this._renderTraceResultFunctions(),this._renderTraceResultByAssetGroup(),this._renderTraceResultByAssetType(),this._renderTraceResultIndividual()))}_renderResultRowFunctions(e){return _("calcite-block",{collapsible:!1,heading:e.networkAttributeName+" "+e.functionType+" = "+e.result,overlayPositioning:"fixed"})}_renderResultRowAssetGroup(e){const t=this._getAssetGroupName(e[0]);return _("calcite-list-item",{key:`${t}-${e.assetGroupCode}`,label:t+" ("+e.length+")",onCalciteListItemSelect:()=>{this.switchToFromAssetType(this._groupResultsByAssetType(e),t+" ("+e.length+")","assetType")}},_("calcite-icon",{icon:"chevron-right",scale:"s",slot:"content-end"}))}_renderResultRowAssetType(e){const t=this._getAssetTypeName(e[0]);return _("calcite-list-item",{key:`${t}-${e.assetTypeCode}`,label:t+" ("+e.length+")",onCalciteListItemSelect:()=>{this._updatingHandles.addPromise(this.viewModel.queryFeaturesById(e).then(s=>{if(s?.length){this._resultObjectIdField=s[0].layer.objectIdField,"objectid"===this._resultDisplayField&&(this._resultDisplayField=s[0].layer.objectIdField),"objectid"===this._resultSortField&&(this._resultSortField=s[0].layer.objectIdField);const i=this._appendAttributes(e,s,"objectId");this.switchToFromIndividualRecords(i,t+" ("+e.length+")","records")}else this.switchToFromIndividualRecords(e,t+" ("+e.length+")","records")}))}},_("calcite-icon",{icon:"chevron-right",scale:"s",slot:"content-end"}))}_renderResultRowIndividual(e){const{messages:t}=this;let s,i=null;if(i=e?.details?.fields.find(({name:e})=>e===this._resultDisplayField),"date"===i?.type){s=new Date(e.details.attributes[this._resultDisplayField]).toDateString()}else if("assetgroup"===this._resultDisplayField.toLowerCase())s=this._getAssetGroupName(e);else if("assettype"===this._resultDisplayField.toLowerCase())s=this._getAssetTypeName(e);else if(i?.domain&&R(i.domain)){const t=i.domain.codedValues.find(({code:t})=>t===e.details.attributes[this._resultDisplayField]);s=t?.name}else s=e.details?.attributes[this._resultDisplayField]??e.objectId;return s&&""!==s&&null!==s?"string"==typeof s&&(s.trim()||(s=t.resultsStrings.noValue)):s=t.resultsStrings.noValue,_("calcite-list-item",{key:e.details.uid,label:s,onCalciteListItemSelect:async()=>{this._disablePopup(),this._showFeatureInfoActive=!0;const t=c(e.details?.layer)?e.details?.layer:null;if(t){const s=Object.keys(e.details.attributes).find(e=>e.toLowerCase()===t.subtypeField.toLowerCase())??"assetgroup",i=t.sublayers.find(t=>t.subtypeCode===e.details.attributes[s]),r=Object.keys(e.details.attributes).find(e=>e.toLowerCase()===t.objectIdField.toLowerCase())??"objectid",o=new d;o.outFields=["*"],o.returnGeometry=!0,o.where=r+" = "+e.details.attributes[r];const a=await(i?.queryFeatures(o));a&&this._resultFeatureWidget.open(a.features[0])}else this._resultFeatureWidget.open(e.details)}},_("calcite-icon",{icon:"chevron-right",scale:"s",slot:"content-end"}))}_renderShowFeatureInfoBlock(){const{messages:e}=this;return _("calcite-block",{class:S.blockContainer,expanded:!0,key:`${this.id}__show-feature-info-block`,label:e.resultsStrings.headerFeatureInfo},this._resultFeatureWidget.render())}_renderStartFlagsContainer(){const{messages:e}=this,t=[];let s=[];s=this.viewModel._flags.filter(e=>"starting-point"===e.type),s.forEach(e=>{e.displayValue&&t.push(this._renderFlagRow(e,"start"))});let i=null;return this._symbolStartFlag&&(i=this._getSymbolIcon(this._symbolStartFlag)),_("calcite-block",{class:S.blockContent,collapsible:!0,expanded:!0,heading:e.inputsStrings.headerStartingPoint+" ("+s.length+")",overlayPositioning:"fixed"},_("div",{slot:"icon"},i||_("calcite-icon",{icon:"pin",scale:"s"})),_("div",null,e.inputsStrings.startingPointHint),_("div",{class:S.listContainer},t),this._warningNoStartAssetFound?this._renderWarningMessage("noStartAsset",!0):null,this._warningNoStartAssetNsoFound?this._renderWarningMessage("noStartAssetNso",!0):null,_("div",{class:S.addButtonContainer},_("calcite-split-button",{appearance:"outline-fill",primaryIconStart:"select",primaryText:e.inputsStrings.addPointOption,onCalciteSplitButtonPrimaryClick:()=>{this._setupAddTraceLocation("starting-point")}},_("calcite-dropdown-group",{selectionMode:"none"},_("calcite-dropdown-item",{onCalciteDropdownItemSelect:()=>{this._setupAddNonspatialObject("starting-point")}},e.inputsStrings.addNonspatialOption)))))}_renderStartOverContainer(){const{messages:e}=this;return _("calcite-fab",{appearance:"solid",icon:"trash",kind:"brand",onclick:()=>{this.confirmReset()},slot:"fab",text:e.resultsStrings.startOverButton,textEnabled:!0,title:e.resultsStrings.startOverButton,type:"button"})}_renderTraceResultByAssetGroup(){const e=this._traceResultsAssetGroup,t=[];for(const s in e){const i=e[s];for(const e in i)t.push(this._renderResultRowAssetGroup(i[e]))}return _("calcite-flow-item",{heading:this._traceHeaderForFlow,key:"assetGroupResultMultiple",selected:"assetGroup"===this._traceResultsState,onCalciteFlowItemBack:()=>{this.switchToFromAssetGroup([],"","result")}},_("calcite-list",{label:""},t),this._renderStartOverContainer())}_renderTraceResultByAssetType(){const e=this._traceResultsAssetType,t=[];for(const s in e)e[s].length>0&&t.push(this._renderResultRowAssetType(e[s]));return _("calcite-flow-item",{heading:this._assetGroupHeader,key:"assetTypeResult",loading:this._updatingHandles.updating,selected:"assetType"===this._traceResultsState,onCalciteFlowItemBack:()=>{this.switchToFromAssetType([],"","assetGroup")}},_("calcite-list",{label:"",selectionMode:"none"},t),this._renderStartOverContainer())}_renderTraceResultFunctions(){if("functions"!==this._traceResultsState)return null;const{messages:e}=this,t=this._traceResultsFunctions,s=[];return t.forEach(e=>{s.push(this._renderResultRowFunctions(e))}),_("calcite-flow-item",{heading:e.resultsStrings.functionHeader,key:"functionResultMultiple",selected:"functions"===this._traceResultsState,onCalciteFlowItemBack:()=>{this.switchToFromFunctions([],"result")}},s,this._renderStartOverContainer())}_renderTraceResultIndividual(){const{messages:e}=this,t=this._traceResultsIndividual;t.sort(this._compare(this._resultSortField,this._resultSortOrder));const s=[];if(t.length>0){(t[0].details?.fields.some(({name:e})=>e.toLowerCase()===this._resultDisplayField.toLocaleLowerCase())??!1)||(this._resultDisplayField=this._resultObjectIdField,this._resultSortField=this._resultObjectIdField),t.forEach(e=>{e?.details&&s.push(this._renderResultRowIndividual(e))}),0===s.length&&s.push(_("calcite-list-item",{label:e.resultsStrings.noFeaturesInMap}))}return _("calcite-flow-item",{heading:this._assetTypeHeader,key:"individualResult",selected:"records"===this._traceResultsState,onCalciteFlowItemBack:()=>{this._showResultOptions=!1,this.switchToFromIndividualRecords([],"","assetType")}},_("calcite-action",{afterCreate:b,bind:this,"data-node-ref":"_individualResultNode",icon:"gear",id:"field_options"+this.id,label:e.resultsStrings.displayAttribute,onclick:()=>{this._showResultOptions=!0},slot:"header-actions-end",text:e.resultsStrings.displayAttribute}),this._renderTraceResultIndividualPopover(),_("calcite-list",{label:"",selectionMode:"none"},s),this._renderStartOverContainer())}_renderTraceResultIndividualPopover(){const{messages:e}=this,t=this._traceResultsIndividual,s=[],i=[];return t.length>0&&(t[0].details?t[0].details.fields.forEach(({name:e,alias:t})=>{s.push(_("calcite-option",{key:`display-${e}`,label:t??e,selected:e===this._resultDisplayField,value:e})),i.push(_("calcite-option",{key:`sort-${e}`,label:t??e,selected:e===this._resultSortField,value:e}))}):(s.push(_("calcite-option",{key:`display-${this._resultDisplayField}`,label:this._resultDisplayField,value:this._resultDisplayField})),i.push(_("calcite-option",{key:`sort-${this._resultDisplayField}`,label:this._resultDisplayField,value:this._resultDisplayField})))),_("calcite-popover",{autoClose:!0,label:e.resultsStrings.displayAttribute,offsetDistance:0,offsetSkidding:0,open:this._showResultOptions,overlayPositioning:"fixed",placement:"left-start",referenceElement:this._individualResultNode,styles:null!==this.domNode?k(.75*this.domNode.clientWidth):F()},_("calcite-block",{expanded:!0,label:e.resultsStrings.displayAttribute,overlayPositioning:"fixed"},_("calcite-label",{scale:"s"},e.resultsStrings.displayAttribute,_("calcite-select",{label:e.resultsStrings.displayAttribute,scale:"s",onCalciteSelectChange:e=>{const t=e.currentTarget;this._resultDisplayField=t.selectedOption.value,this._showResultOptions=!1}},s)),_("calcite-label",{scale:"s"},e.resultsStrings.sortBy,_("calcite-select",{label:e.resultsStrings.sortBy,scale:"s",onCalciteSelectChange:e=>{const s=e.currentTarget;this._resultSortField=s.selectedOption.value,t.sort(this._compare(this._resultSortField,this._resultSortOrder)),this._traceResultsIndividual=t,this._showResultOptions=!1}},i))))}_renderTraceResults(){const{messages:e,messagesCommon:t}=this,{selectFeatures:s}=e.resultsStrings,i=this.viewModel.traceResults,r=[];return i.forEach((t,i)=>{let o=[],a=[],l=!1,n=!1,c=!1,d="";null!==t.results&&t.results.hasOwnProperty("elements")?(null!==t.results.aggregatedGeometry&&(n=!0),null!==t.results.globalFunctionResults&&t.results.globalFunctionResults.length>0&&(a=t.results.globalFunctionResults,a.length>0&&(c=!0)),t.results.elements&&t.results.elements.length>0&&(o=t.results.elements,o.length>0&&(l=!0)),(n||l)&&(d=this.messagesUnits.units[t.resultArea?.unit]?.abbr),r.push(_("calcite-block",{class:S.blockContent,collapsible:!0,description:t.trace.description??"",expanded:!0,heading:t.trace.title,key:`${t.trace.title}${i}`,overlayPositioning:"fixed"},this._renderRemoveTraceContainer(t),_("calcite-list",{label:""},c?_("calcite-list-item",{label:e.resultsStrings.functionHeader+" ("+a.length+")",onCalciteListItemSelect:()=>{this.switchToFromFunctions(a,"functions")}},_("calcite-icon",{icon:"chevron-right",scale:"s",slot:"content-end"})):null,l&&this.viewModel.showSelectionAttributes?_("calcite-list-item",{key:this.id,label:e.resultsStrings.viewFeatures+" ("+o.length+")",onCalciteListItemSelect:()=>{this.switchToFromAssetGroup(this._groupResultsByAssetGroup(t),t.trace.title+" ("+o.length+")","assetGroup")}},_("calcite-icon",{icon:"chevron-right",scale:"s",slot:"content-end"})):this.viewModel.showSelectionAttributes?_("calcite-label",{layout:"inline",scale:"s"},e.resultsStrings.noSelectionResults):null),l?_("div",{class:S.doublePaddingTop},_("calcite-label",{layout:"inline",onclick:e=>{e.preventDefault(),e.stopPropagation(),this.viewModel.mergeSelection(!t.selectionEnabled,t.trace)},scale:"s"},_("calcite-checkbox",{checked:t.selectionEnabled,onclick:e=>{e.preventDefault(),e.stopPropagation(),this.viewModel.mergeSelection(!t.selectionEnabled,t.trace)}}),this.viewModel.showSelectionAttributes?s:`${s} (${o.length})`)):null,n?_("calcite-block-section",{expanded:t.graphicEnabled,key:`aggregate-${t.trace.title}-${i}`,text:e.resultsStrings.highlightTrace,toggleDisplay:"switch",onCalciteBlockSectionToggle:e=>{e.currentTarget.expanded?this.viewModel.changeResultGraphicColor(t.graphicColor,t):this.viewModel.removeResultGraphicFromView(t)}},_("calcite-list",{label:e.resultsStrings.graphicColor,selectionMode:"none"},_("calcite-list-item",{label:e.resultsStrings.graphicColor,onclick:e=>{this._swatchNode=e.currentTarget,this._activeSwatch="aggGeom_"+i}},_("calcite-color-picker-swatch",{color:t.graphicColor.hex,scale:"s",slot:"actions-end"})))):null,this.enableResultArea&&(n||l)?_("calcite-block-section",{expanded:t.resultArea?.show,key:`area-${t.trace.title}-${i}`,text:e.resultsStrings.resultAreaHeader,toggleDisplay:"switch",onCalciteBlockSectionToggle:e=>{e.currentTarget.expanded?t.resultAreaGraphic?this.viewModel.addResultAreaToMap(t,t.resultAreaGraphic):this.viewModel.addResultAreaToMap(t):this.viewModel.removeResultAreaFromMap(t)}},_("calcite-list",{label:"",selectionMode:"none"},_("calcite-list-item",{label:e.resultsStrings.graphicColor,onclick:e=>{const t=e.currentTarget;this._swatchNode=t,this._activeSwatch="resultArea_"+i}},_("calcite-color-picker-swatch",{color:t.resultArea?.color.hex,scale:"s",slot:"actions-end"}))),_("calcite-list",{label:"",selectionMode:"none"},_("calcite-list-item",{label:e.resultsStrings.resultAreaBuffer},_("calcite-input-number",{afterCreate:this._afterComponentCreate,class:S.numberInput,max:999999,min:0,scale:"s",slot:"actions-end",suffixText:d,value:t.resultArea?.distance.toString(),onCalciteInputNumberChange:e=>{if(!this.view?.popup)return;this.view.popup.visible&&this.view.closePopup();const s=e.currentTarget;t.resultArea.distance>=0?(t.resultArea.distance=parseInt(s.value,10),this.viewModel.removeResultAreaFromMap(t),this.viewModel.addResultAreaToMap(t)):(t.resultArea.distance=0,this.viewModel.removeResultAreaFromMap(t),this.viewModel.addResultAreaToMap(t))}})))):null,_("calcite-popover",{autoClose:!0,closable:!0,label:e.resultsStrings.graphicColor,offsetDistance:0,offsetSkidding:0,open:this._activeSwatch==="aggGeom_"+i||this._activeSwatch==="resultArea_"+i,overlayPositioning:"fixed",placement:"auto-start",referenceElement:this._swatchNode,scale:"s",onCalcitePopoverClose:()=>{this._swatchNode=null,this._activeSwatch=null}},this._renderHighlightColorPicker(this._activeSwatch==="resultArea_"+i?t.resultArea?.color:t.graphicColor,t,this._activeSwatch==="resultArea_"+i?"resultArea":"aggregate"))))):r.push(_("calcite-block",{collapsible:!1,expanded:!0,heading:t.trace.title,key:"error-"+i,overlayPositioning:"fixed"},this._renderRemoveTraceContainer(t),this._renderWarningMessage("noController",!1,t.status)))}),_("calcite-flow-item",{key:"traceResults",selected:"result"===this._traceResultsState},r,this._renderStartOverContainer(),this._alertRemoveModal?_("calcite-scrim",{key:"prompt"},_("div",{class:S.clearPrompt},_("h3",{slot:"header"},e.globalStrings.clearResults),_("div",{slot:"content"},e.alertsStrings.clearResultsAlert),_("div",{class:S.promptDivider}),_("div",{styles:A("row")},_("calcite-button",{appearance:"outline",onclick:()=>{this._alertRemoveModal=!1},slot:"secondary",width:"full"},t.cancel),_("calcite-button",{onclick:()=>{this._activeTrace&&this.viewModel.clearResult(this._activeTrace),this._alertRemoveModal=!1,0===this.viewModel.traceResults.length?this.switchTab("input"):(this._activeTrace=this.viewModel.traceResults[0].trace,this._traceResultsState="result")},slot:"primary",width:"full"},t.form.ok)))):null)}_renderTraceSelectorContainer(){const{messages:e}=this,t=this.viewModel.traces.map(e=>this._renderComboboxItem({value:e.globalId,text:e.title,selected:e.selected??!1})),s=this.viewModel.traces.filter(e=>e.selected),i=e.tracingStrings.traceOperation+` (${s.length})`;return _("calcite-block",{class:S.blockContent,collapsible:!0,expanded:!0,heading:i,overlayPositioning:"fixed"},_("calcite-icon",{icon:"utility-network-trace",scale:"s",slot:"icon"}),_("calcite-combobox",{label:e.inputsStrings.selectTraces,maxItems:0,overlayPositioning:"fixed",placeholder:e.inputsStrings.selectTraces,scale:"s",selectionMode:"multiple",onCalciteComboboxChange:e=>{this.viewModel.traces.forEach(t=>{t.selected=e.currentTarget.selectedItems.some(e=>e.value===t.globalId)}),e.currentTarget.selectedItems.length&&(this._warningNoTraceSelected=!1)}},t))}_renderUtilityNetworkTrace(){const{viewModel:e,viewModel:{utilityNetwork:t}}=this,s=e.view?.map,{messages:i}=this;let r=_("calcite-tabs",{class:S.tabs,layout:"center",position:"top",styles:C(this.container)},_("calcite-tab-nav",{slot:"title-group"},_("calcite-tab-title",{onclick:()=>{this.switchTab("input")},selected:"input"===this._activeTab},i.inputsStrings.headerTabInputs),_("calcite-tab-title",{onclick:()=>{this.switchTab("results")},selected:"results"===this._activeTab},i.resultsStrings.headerTabResults)),this._renderInputsTab(),this._renderResultsTab());return(!s.utilityNetworks?.length&&!t||t&&!t.sharedNamedTraceConfigurations.length)&&(r=_("calcite-panel",null,this._renderWarningMessage("noTraceConfig",!1))),this._loadUnError||(r=_("calcite-panel",null,this._renderWarningMessage("loadUNError",!1,this._errorMessage))),r}_renderWarningMessage(e,t,s){const{messages:i}=this;let r=i.alertsStrings.NoRunAlertHeader,o=i.alertsStrings.noResultsInfo;switch(e){case"flag":r=i.alertsStrings.startingPointAlertHeader,o=i.alertsStrings.startingPointAlert;break;case"noTerminal":r=i.alertsStrings.noTerminalDefinedHeader,o=i.alertsStrings.noTerminalDefined;break;case"trace":r=i.alertsStrings.selectTraceAlertHeader,o=i.alertsStrings.selectTraceAlert;break;case"noTraceExecuted":r=i.alertsStrings.NoRunAlertHeader,o=i.alertsStrings.noResultsInfo;break;case"noBarrierAsset":case"noStartAsset":r=i.alertsStrings.noAssetsFoundHeader,o=i.alertsStrings.noAssetFound;break;case"noBarrierAssetNso":case"noStartAssetNso":r="",o=i.alertsStrings.noAssetFound;break;case"noTraceConfig":r="",o=i.alertsStrings.noTraceSupported;break;default:r=i.alertsStrings.genericErrorHeader,o=s||""}return _("div",{class:S.noticeContainer,key:e},_("calcite-notice",{closable:t,icon:!0,key:e,kind:"danger",open:!0,scale:"s",width:"auto",onCalciteNoticeClose:()=>this._handleWarningNoticeClose(e)},_("div",{slot:"title"},r),_("div",{slot:"message"},o)))}_afterComponentCreate(e){"value"in e&&null!=e.value&&"setNumberValue"in e&&e.setNumberValue({committing:!1,value:e.value,origin:"direct"})}_appendAttributes(e,t,s){const i=[];return e.forEach(e=>{t.forEach(t=>{t.featureSet.features.forEach(r=>{e[s]===r.attributes[this._resultObjectIdField]&&(e.details=r,e.details.fields=t.featureSet.fields,i.push(e))})})}),i}_changeCursor(e="default"){this.removeHandles(M),this.view&&"default"!==e&&this.addHandles(this.view.acquireCursor(e),M)}_disablePopup(){const{view:e}=this;e.popupEnabled=!1,e.closePopup()}_compare(e,t){return(s,i)=>{let r=0,o=s.details?.attributes[e]??s.objectId,a=i.details?.attributes[e]??i.objectId;return isNaN(o)&&(o=o.toLowerCase()),isNaN(a)&&(a=a.toLowerCase()),"desc"===t?o>a?r=1:o<a&&(r=-1):o<a?r=1:o>a&&(r=-1),r}}_getAssetGroupName(e){let t=e.assetGroupCode.toString();const s=e.assetGroupCode,i=this.viewModel.getValidSources().find(t=>t.sourceId===e.networkSourceId);if(i){const e=i.assetGroups.find(e=>e.assetGroupCode===s);e&&(t=e.assetGroupName)}return t}_getAssetTypeName(e){let t=e.assetTypeCode.toString();const s=e.assetGroupCode,i=this.viewModel.getValidSources().find(t=>t.sourceId===e.networkSourceId);if(i){const r=i.assetGroups.find(e=>e.assetGroupCode===s);if(r){const s=r.assetTypes.find(t=>t.assetTypeCode===e.assetTypeCode);s&&(t=s.assetTypeName)}}return t}_getSymbolIcon(e){return"picture-marker"===e.type?_("img",{height:e.height,src:e.url??void 0,width:e.width}):null}_groupBy(e,t){return e.reduce((e,s)=>((e[s[t]]=e[s[t]]||[]).push(s),e),{})}_groupResultsByAssetGroup(e){const t=[],s=e.results?.elements,i=this._groupBy(s??[],"networkSourceId");for(const r in i)t.push(this._groupBy(i[r],"assetGroupCode"));return t}_groupResultsByAssetType(e){return this._groupBy(e,"assetTypeCode")}_handleWarningNoticeClose(e){switch(e){case"flag":this._warningNoFlag=!1;break;case"noTerminal":this._warningNoTerminal=!1;break;case"trace":this._warningNoTraceSelected=!1;break;case"noStartAsset":this._warningNoStartAssetFound=!1;break;case"noStartAssetNso":this._warningNoStartAssetNsoFound=!1;break;case"noBarrierAsset":this._warningNoBarrierAssetFound=!1;break;case"noBarrierAssetNso":this._warningNoBarrierAssetNsoFound=!1}}_mixCustomStrings(){const{messages:e}=this;this.inputSettings.length>0&&this.inputSettings.forEach(t=>{"starting-point"===t.type&&(e.inputsStrings.headerStartingPoint=t.label,e.inputsStrings.startingPointHint=t.description),"barrier"===t.type&&(e.inputsStrings.headerBarrier=t.label,e.inputsStrings.barrierPointHint=t.description)})}_overrideFlagSymbol(){this.inputSettings.length>0&&this.inputSettings.forEach(e=>{"starting-point"===e.type?this._symbolStartFlag=e.symbol:this._symbolBarrier=e.symbol,this.viewModel.changeFlagSymbol(e.type,e.symbol)})}_processFlagOnLoad(){return this.view?.when().then(()=>{this._watchHandler=r(()=>!this.view?.updating,async()=>{this._warningNoFlag=!1,this._warningNoBarrierAssetFound=!1,this._warningNoStartAssetFound=!1;const e=await this.viewModel.addFlagsOnLoad();this.viewModel.removeFlagsOnLoadWatcher(),e.includes("barrier")&&(this._warningNoBarrierAssetFound=!0),e.includes("starting-point")&&(this._warningNoStartAssetFound=!0),this.disabled=!1,null!==this._watchHandler&&this._watchHandler.remove()})})}_registerWatchers(){this.addHandles([t(()=>this.selectedTraces,()=>{this.viewModel.selectTracesOnLoad(),this.scheduleRender()}),t(()=>this.defaultGraphicColor,()=>{this.viewModel.traceResults.length>0&&this.viewModel.traceResults.forEach(e=>{this.viewModel.changeResultGraphicColor(this.viewModel.defaultGraphicColor,e)}),this.scheduleRender()})])}_renderComboboxItem({text:e,value:t,selected:s}){return _("calcite-combobox-item",{heading:e??"",key:t,selected:s,value:t})}_resetResultFeatureWidget(){this._showFeatureInfoActive=!1,this._resultFeatureWidget.feature=null,this.view.popupEnabled=this._wasPopupEnabled}_resetTraceLocationWarnings(){this._warningNoBarrierAssetFound=!1,this._warningNoBarrierAssetNsoFound=!1,this._warningNoStartAssetFound=!1,this._warningNoStartAssetNsoFound=!1}_setupAddNonspatialObject(e){this._disablePopup(),this._traceLocationType=e,this._addNonspatialObjectActive=!0,this._resetTraceLocationWarnings(),this.viewModel.getNonspatialTraceLocationInitialFeature().then(e=>{this._findNonspatialFeatureWidget.feature=null;const t=e.graphic;this._findNonspatialFeatureWidget.open(t)}).catch(()=>{this._warningNoStartAssetNsoFound="starting-point"===e,this._warningNoBarrierAssetNsoFound="barrier"===e,this._addNonspatialObjectActive=!1}).finally(()=>this._changeCursor("default"))}_setupAddTraceLocation(e){this._traceLocationType=e,this._changeCursor("crosshair"),this._selectToolActive=!0,this._addNonspatialObjectActive=!1,this._resetTraceLocationWarnings(),this.viewModel.addFlagByHit(this._traceLocationType,this._symbolStartFlag).then(e=>{this._changeCursor("default"),e?this._warningNoFlag=!1:(this._warningNoStartAssetFound="starting-point"===this._traceLocationType,this._warningNoBarrierAssetFound="barrier"===this._traceLocationType),this._selectToolActive=!1})}_utilityNetworkTraceInitialized(){this.viewModel.loadUtilityNetwork().then(async e=>{e&&(this.viewModel.selectTracesOnLoad(),this._registerWatchers(),this.viewModel.flags.length>0&&await this._processFlagOnLoad()),this.disabled=!1}).catch(e=>{const{messages:t}=this;this._loadUnError=!1,"utility-network:no-user-type-extension"===e.name||e.details?.raw?.extendedCode===N.noExtension?this._errorMessage=t.alertsStrings.noUserExtension:this._errorMessage=e.message,this.disabled=!1})}_viewChangeHandle(){this._wasPopupEnabled=this.view?.popupEnabled??!1,this._findNonspatialFeatureWidget.view=this.view,this._resultFeatureWidget.view=this.view}};e([o()],x.prototype,"_activeTab",void 0),e([o()],x.prototype,"_activeTrace",void 0),e([o()],x.prototype,"_activeSwatch",void 0),e([o()],x.prototype,"_addNonspatialObjectActive",void 0),e([o()],x.prototype,"_alertRemoveModal",void 0),e([o()],x.prototype,"_assetGroupHeader",void 0),e([o()],x.prototype,"_assetTypeHeader",void 0),e([o()],x.prototype,"_confirmReset",void 0),e([o()],x.prototype,"_errorMessage",void 0),e([o()],x.prototype,"_swatchNode",void 0),e([o()],x.prototype,"_selectToolActive",void 0),e([o()],x.prototype,"_showFeatureInfoActive",void 0),e([o()],x.prototype,"_traceHeaderForFlow",void 0),e([o()],x.prototype,"_traceResultsFunctions",void 0),e([o()],x.prototype,"_traceResultsAssetGroup",void 0),e([o()],x.prototype,"_traceResultsAssetType",void 0),e([o()],x.prototype,"_traceResultsIndividual",void 0),e([o()],x.prototype,"_traceResultsState",void 0),e([o()],x.prototype,"_warningNoFlag",void 0),e([o()],x.prototype,"_warningNoTraceSelected",void 0),e([o()],x.prototype,"_updatingHandles",void 0),e([o()],x.prototype,"defaultGraphicColor",null),e([o()],x.prototype,"disabled",void 0),e([o()],x.prototype,"enableResultArea",null),e([o()],x.prototype,"flags",null),e([o()],x.prototype,"icon",null),e([o()],x.prototype,"inputSettings",void 0),e([o()],x.prototype,"label",null),e([o(),g("esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace")],x.prototype,"messages",void 0),e([o(),g("esri/t9n/common")],x.prototype,"messagesCommon",void 0),e([o(),g("esri/core/t9n/Units")],x.prototype,"messagesUnits",void 0),e([o()],x.prototype,"resultAreaProperties",null),e([o()],x.prototype,"selectedTraces",null),e([o()],x.prototype,"selectOnComplete",null),e([o()],x.prototype,"showGraphicsOnComplete",null),e([o()],x.prototype,"showSelectionAttributes",null),e([o({readOnly:!0})],x.prototype,"traceResults",null),e([o()],x.prototype,"utilityNetwork",null),e([o()],x.prototype,"view",null),e([m(["add-flag","add-flag-complete","add-flag-error","select-features","clear-selection","add-result-area","remove-result-area","create-result-area","reset"]),o({type:v})],x.prototype,"viewModel",void 0),x=e([a("esri.widgets.UtilityNetworkTrace")],x);const I=x;export{I as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as t}from"tslib";import{property as e,subclass as o}from"../core/accessorSupport/decorators.js";import i from"./Widget.js";import{loadCalciteComponents as s}from"./support/componentsUtils.js";import{messageBundle as n,tsx as c}from"./support/widget.js";import a from"./UtilityNetworkValidateTopology/UtilityNetworkValidateTopologyViewModel.js";const l="esri-un-validate-topology",r={container:`${l}__container`,content:`${l}__content`,controlsContainer:`${l}__controls-container`,statusIconError:`${l}__status-icon-error`,statusIconSuccess:`${l}__status-icon-success`,statusIconContainer:`${l}__status-icon-container`};let d=class extends i{constructor(t,e){super(t,e),this.messages=null,this.viewModel=new a}loadDependencies(){return s({action:()=>import("@esri/calcite-components/dist/components/calcite-action"),block:()=>import("@esri/calcite-components/dist/components/calcite-block"),icon:()=>import("@esri/calcite-components/dist/components/calcite-icon"),notice:()=>import("@esri/calcite-components/dist/components/calcite-notice"),option:()=>import("@esri/calcite-components/dist/components/calcite-option"),select:()=>import("@esri/calcite-components/dist/components/calcite-select"),tooltip:()=>import("@esri/calcite-components/dist/components/calcite-tooltip")})}get extentToValidate(){return this.viewModel.extentToValidate}set extentToValidate(t){this.viewModel.extentToValidate=t}get icon(){return"check-circle"}set icon(t){this._overrideIfSome("icon",t)}get label(){return this.messages?.label??""}set label(t){this._overrideIfSome("label",t)}get utilityNetwork(){return this.viewModel.utilityNetwork}set utilityNetwork(t){this.viewModel.utilityNetwork=t}get view(){return this.viewModel.view}set view(t){this.viewModel.view=t}render(){const{viewModel:t}=this;return"disabled"===t.state?c("div",{class:r.container},c("calcite-block",{class:r.content,collapsible:!1,expanded:!0,heading:this.label},this._renderLoadErrorStatusIcon(),this._renderLoadErrorsNotices())):c("div",{class:r.container},c("calcite-block",{class:r.content,collapsible:!0,expanded:!1,heading:this.label},this._renderStatusIcon(),this._renderValidateTopologyAction(),this._renderControls()))}_extentOptionSelectChange(t){this.extentToValidate=t.currentTarget.value}_getLoadErrorMessagesAsNotices(t,e){return c("calcite-notice",{closable:!1,key:"error-notice-"+e,kind:"warning",open:!0,scale:"s"},c("div",{slot:"message"},t))}_handleValidateTopologyAction(){this.viewModel.validateTopology().catch(()=>{})}_renderControls(){const{viewModel:t}=this;return"failed"===t.state?c("div",{class:r.controlsContainer},this._renderExtentOptionSelect(),this._renderStatusNotice()):this._renderExtentOptionSelect()}_renderExtentOptionSelect(){const{messages:t,viewModel:e}=this;return c("div",{key:"selectExtentDiv"},c("calcite-select",{bind:this,disabled:"loading"===e.state||"executing"===e.state,label:t.input.extentToValidate,onCalciteSelectChange:this._extentOptionSelectChange},c("calcite-option",{selected:"current"===e.extentToValidate,value:"current"},t.input.currentExtent),c("calcite-option",{selected:"entire"===e.extentToValidate,value:"entire"},t.input.entireExtent)))}_renderLoadErrorsNotices(){const{viewModel:t}=this;return c("div",{class:r.controlsContainer,key:"loadErrorsDiv"},t.loadErrors.items.map(this._getLoadErrorMessagesAsNotices))}_renderLoadErrorStatusIcon(){return c("div",{class:r.statusIconContainer,key:"statusDiv",slot:"control"},c("calcite-icon",{class:r.statusIconError,icon:"exclamation-mark-triangle",scale:"s"}))}_renderStatusIcon(){const{messages:t,viewModel:e}=this,o=`${this.id}-validation-status-action`,i=`${this.id}-error-status-icon`,s=`${this.id}-success-status-icon`,n=t=>{setTimeout(()=>{t.textContent=""},3500)};return"executing"===e.state?c("div",{key:"statusDivExecuting",slot:"control"},c("calcite-action",{id:o,loading:!0,text:t.status.executing}),c("calcite-tooltip",{overlayPositioning:"fixed",referenceElement:o},c("span",null,t.status.executing))):"success"===e.state?c("div",{afterCreate:n,class:r.statusIconContainer,key:"statusDivSuccess",slot:"control"},c("calcite-icon",{class:r.statusIconSuccess,icon:"check-circle",id:s,scale:"s"}),c("calcite-tooltip",{referenceElement:s},c("span",null,t.status.success))):"failed"===e.state?c("div",{class:r.statusIconContainer,key:"statusDivFailed",slot:"control"},c("calcite-icon",{class:r.statusIconError,icon:"exclamation-mark-triangle",id:i,scale:"s"}),c("calcite-tooltip",{referenceElement:i},c("span",null,e.executionError))):c("div",{class:r.statusIconContainer,key:"statusDiv",slot:"control"})}_renderStatusNotice(){const{viewModel:t}=this;return c("div",{key:"executionErrorDiv"},c("calcite-notice",{closable:!0,kind:"warning",open:!0,scale:"s"},c("div",{slot:"message"},t.executionError)))}_renderValidateTopologyAction(){const{messages:t,viewModel:e}=this,o=`${this.id}-validation-action`;return c("div",{key:"actionDiv",slot:"control"},c("calcite-action",{bind:this,disabled:"executing"===e.state,icon:"play-f",id:o,loading:"loading"===e.state,onclick:this._handleValidateTopologyAction,text:t.input.validateTopology}),c("calcite-tooltip",{referenceElement:o},c("span",null,"loading"===e.state?t.status.loading:t.input.validateTopology)))}};t([e()],d.prototype,"extentToValidate",null),t([e()],d.prototype,"icon",null),t([e()],d.prototype,"label",null),t([e(),n("esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology")],d.prototype,"messages",void 0),t([e()],d.prototype,"utilityNetwork",null),t([e()],d.prototype,"view",null),t([e({type:a})],d.prototype,"viewModel",void 0),d=t([o("esri.widgets.UtilityNetworkValidateTopology")],d);const p=d;export{p as default};
5
+ import{__decorate as t}from"tslib";import{property as e,subclass as o}from"../core/accessorSupport/decorators.js";import i from"./Widget.js";import{loadCalciteComponents as s}from"./support/componentsUtils.js";import{messageBundle as n,tsx as a}from"./support/widget.js";import c from"./UtilityNetworkValidateTopology/UtilityNetworkValidateTopologyViewModel.js";const l="esri-un-validate-topology",r={container:`${l}__container`,content:`${l}__content`,controlsContainer:`${l}__controls-container`,statusIconError:`${l}__status-icon-error`,statusIconSuccess:`${l}__status-icon-success`,statusIconContainer:`${l}__status-icon-container`};let d=class extends i{constructor(t,e){super(t,e),this.messages=null,this.viewModel=new c}loadDependencies(){return s({action:()=>import("@esri/calcite-components/dist/components/calcite-action"),block:()=>import("@esri/calcite-components/dist/components/calcite-block"),icon:()=>import("@esri/calcite-components/dist/components/calcite-icon"),notice:()=>import("@esri/calcite-components/dist/components/calcite-notice"),option:()=>import("@esri/calcite-components/dist/components/calcite-option"),select:()=>import("@esri/calcite-components/dist/components/calcite-select"),tooltip:()=>import("@esri/calcite-components/dist/components/calcite-tooltip")})}get extentToValidate(){return this.viewModel.extentToValidate}set extentToValidate(t){this.viewModel.extentToValidate=t}get icon(){return"check-circle"}set icon(t){this._overrideIfSome("icon",t)}get label(){return this.messages?.label??""}set label(t){this._overrideIfSome("label",t)}get utilityNetwork(){return this.viewModel.utilityNetwork}set utilityNetwork(t){this.viewModel.utilityNetwork=t}get view(){return this.viewModel.view}set view(t){this.viewModel.view=t}render(){const{viewModel:t}=this;return"disabled"===t.state?a("div",{class:r.container},a("calcite-block",{class:r.content,collapsible:!1,expanded:!0,heading:this.label},this._renderLoadErrorStatusIcon(),this._renderLoadErrorsNotices())):a("div",{class:r.container},a("calcite-block",{class:r.content,collapsible:!0,expanded:!1,heading:this.label},this._renderStatusIcon(),this._renderValidateTopologyAction(),this._renderControls()),this._renderValidateTopologyActionTooltip())}_extentOptionSelectChange(t){this.extentToValidate=t.currentTarget.value}_getLoadErrorMessagesAsNotices(t,e){return a("calcite-notice",{closable:!1,key:"error-notice-"+e,kind:"warning",open:!0,scale:"s"},a("div",{slot:"message"},t))}_handleValidateTopologyAction(){this.viewModel.validateTopology().catch(()=>{})}_renderControls(){const{viewModel:t}=this;return"failed"===t.state?a("div",{class:r.controlsContainer},this._renderExtentOptionSelect(),this._renderStatusNotice()):this._renderExtentOptionSelect()}_renderExtentOptionSelect(){const{messages:t,viewModel:e}=this;return a("div",{key:"selectExtentDiv"},a("calcite-select",{bind:this,disabled:"loading"===e.state||"executing"===e.state,label:t.input.extentToValidate,onCalciteSelectChange:this._extentOptionSelectChange},a("calcite-option",{selected:"current"===e.extentToValidate,value:"current"},t.input.currentExtent),a("calcite-option",{selected:"entire"===e.extentToValidate,value:"entire"},t.input.entireExtent)))}_renderLoadErrorsNotices(){const{viewModel:t}=this;return a("div",{class:r.controlsContainer,key:"loadErrorsDiv"},t.loadErrors.items.map(this._getLoadErrorMessagesAsNotices))}_renderLoadErrorStatusIcon(){return a("div",{class:r.statusIconContainer,key:"statusDiv",slot:"actions-end"},a("calcite-icon",{class:r.statusIconError,icon:"exclamation-mark-triangle",scale:"s"}))}_renderStatusIcon(){const{messages:t,viewModel:e}=this,o=`${this.id}-validation-status-action`,i=`${this.id}-error-status-icon`,s=`${this.id}-success-status-icon`,n=t=>{setTimeout(()=>{t.textContent=""},3500)};return"executing"===e.state?a("div",{key:"statusDivExecuting",slot:"actions-end"},a("calcite-action",{id:o,loading:!0,text:t.status.executing}),a("calcite-tooltip",{overlayPositioning:"fixed",referenceElement:o},a("span",null,t.status.executing))):"success"===e.state?a("div",{afterCreate:n,class:r.statusIconContainer,key:"statusDivSuccess",slot:"actions-end"},a("calcite-icon",{class:r.statusIconSuccess,icon:"check-circle",id:s,scale:"s"}),a("calcite-tooltip",{referenceElement:s},a("span",null,t.status.success))):"failed"===e.state?a("div",{class:r.statusIconContainer,key:"statusDivFailed",slot:"actions-end"},a("calcite-icon",{class:r.statusIconError,icon:"exclamation-mark-triangle",id:i,scale:"s"}),a("calcite-tooltip",{referenceElement:i},a("span",null,e.executionError))):a("div",{class:r.statusIconContainer,key:"statusDiv",slot:"actions-end"})}_renderStatusNotice(){const{viewModel:t}=this;return a("div",{key:"executionErrorDiv"},a("calcite-notice",{closable:!0,kind:"warning",open:!0,scale:"s"},a("div",{slot:"message"},t.executionError)))}_renderValidateTopologyActionTooltip(){const{messages:t,viewModel:e}=this,o=`${this.id}-validation-action`;return a("calcite-tooltip",{referenceElement:o},a("span",null,"loading"===e.state?t.status.loading:t.input.validateTopology))}_renderValidateTopologyAction(){const{messages:t,viewModel:e}=this,o=`${this.id}-validation-action`;return a("calcite-action",{bind:this,disabled:"executing"===e.state,icon:"play-f",id:o,loading:"loading"===e.state,onclick:this._handleValidateTopologyAction,slot:"actions-end",text:t.input.validateTopology})}};t([e()],d.prototype,"extentToValidate",null),t([e()],d.prototype,"icon",null),t([e()],d.prototype,"label",null),t([e(),n("esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology")],d.prototype,"messages",void 0),t([e()],d.prototype,"utilityNetwork",null),t([e()],d.prototype,"view",null),t([e({type:c})],d.prototype,"viewModel",void 0),d=t([o("esri.widgets.UtilityNetworkValidateTopology")],d);const p=d;export{p as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import{property as t,subclass as o}from"../../core/accessorSupport/decorators.js";import{loadCalciteComponents as l}from"../support/componentsUtils.js";import{tsx as s}from"../support/widget.js";import i from"./ValuePickerBaseComponent.js";const r="esri-value-picker__combobox";let a=class extends i{constructor(e,t){super(e,t),this.items=null,this.placeholder=null,this.type="combobox"}loadDependencies(){return l({combobox:()=>import("@esri/calcite-components/dist/components/calcite-combobox"),"combobox-item":()=>import("@esri/calcite-components/dist/components/calcite-combobox-item")})}get canNext(){return!(!this.items||!this.viewModel)&&this.items.findIndex(({value:e})=>e===this.viewModel.values?.[0])!==this.items.length-1}get canPlay(){return null!=this.viewModel&&!!this.items?.length}get canPrevious(){const{items:e,viewModel:t}=this;return!(!e||!t)&&0!==e.findIndex(({value:e})=>e===t.values?.[0])}get label(){return super.label}set label(e){super.label=e}render(){const{viewModel:e}=this;if(null==e)return s("div",null);const t=e.values?.[0];return s("div",{class:r},s("calcite-combobox",{disabled:e.disabled,label:this.label,maxItems:10,overlayPositioning:"fixed",placeholder:this.placeholder??void 0,selectionMode:"single",onCalciteComboboxChange:t=>{Array.isArray(t.currentTarget.value)||(null!=e.values?e.values[0]!==t.currentTarget.value&&(e.values=[t.currentTarget.value]):e.values=[t.currentTarget.value])}},this.items?.map(({value:e,label:o},l)=>s("calcite-combobox-item",{key:l,selected:e===t,textLabel:o,value:e}))))}animate(e){this._step(1,e)}next(){this._step(1)}previous(){this._step(-1)}_step(e,t=!1){const{viewModel:o,items:l}=this;if(!l?.length||!o)return;if(!o.values)return void(o.values=[l[0].value]);const s=l.findIndex(({value:e})=>e===o.values[0]);if(-1===s)return void(o.values=[l[0].value]);const i=s+e;i<0||i>=l.length?o.loop||t?o.values=[l[1===e?0:l.length-1].value]:"playing"===o.state&&o.pause():o.values=[l[i].value]}};e([t()],a.prototype,"canNext",null),e([t()],a.prototype,"canPlay",null),e([t()],a.prototype,"canPrevious",null),e([t()],a.prototype,"items",void 0),e([t()],a.prototype,"placeholder",void 0),e([t()],a.prototype,"type",void 0),a=e([o("esri.widgets.ValuePicker.ValuePickerCombobox")],a);const n=a;export{n as default};
5
+ import{__decorate as e}from"tslib";import{property as t,subclass as o}from"../../core/accessorSupport/decorators.js";import{loadCalciteComponents as l}from"../support/componentsUtils.js";import{tsx as s}from"../support/widget.js";import i from"./ValuePickerBaseComponent.js";const r="esri-value-picker__combobox";let a=class extends i{constructor(e,t){super(e,t),this.items=null,this.placeholder=null,this.type="combobox"}loadDependencies(){return l({combobox:()=>import("@esri/calcite-components/dist/components/calcite-combobox"),"combobox-item":()=>import("@esri/calcite-components/dist/components/calcite-combobox-item")})}get canNext(){return!(!this.items||!this.viewModel)&&this.items.findIndex(({value:e})=>e===this.viewModel.values?.[0])!==this.items.length-1}get canPlay(){return null!=this.viewModel&&!!this.items?.length}get canPrevious(){const{items:e,viewModel:t}=this;return!(!e||!t)&&0!==e.findIndex(({value:e})=>e===t.values?.[0])}get label(){return super.label}set label(e){super.label=e}render(){const{viewModel:e}=this;if(null==e)return s("div",null);const t=e.values?.[0];return s("div",{class:r},s("calcite-combobox",{disabled:e.disabled,label:this.label,maxItems:10,overlayPositioning:"fixed",placeholder:this.placeholder??void 0,selectionMode:"single",onCalciteComboboxChange:t=>{Array.isArray(t.currentTarget.value)||(null!=e.values?e.values[0]!==t.currentTarget.value&&(e.values=[t.currentTarget.value]):e.values=[t.currentTarget.value])}},this.items?.map(({value:e,label:o},l)=>s("calcite-combobox-item",{heading:o,key:l,selected:e===t,value:e}))))}animate(e){this._step(1,e)}next(){this._step(1)}previous(){this._step(-1)}_step(e,t=!1){const{viewModel:o,items:l}=this;if(!l?.length||!o)return;if(!o.values)return void(o.values=[l[0].value]);const s=l.findIndex(({value:e})=>e===o.values[0]);if(-1===s)return void(o.values=[l[0].value]);const i=s+e;i<0||i>=l.length?o.loop||t?o.values=[l[1===e?0:l.length-1].value]:"playing"===o.state&&o.pause():o.values=[l[i].value]}};e([t()],a.prototype,"canNext",null),e([t()],a.prototype,"canPlay",null),e([t()],a.prototype,"canPrevious",null),e([t()],a.prototype,"items",void 0),e([t()],a.prototype,"placeholder",void 0),e([t()],a.prototype,"type",void 0),a=e([o("esri.widgets.ValuePicker.ValuePickerCombobox")],a);const n=a;export{n as default};