@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{substitute as e}from"../../../intl/substitute.js";import{css as t}from"../css.js";import{isCreateFeaturesWorkflow as o,isSplitFeatureWorkflow as i,isMergeFeaturesWorkflow as n,isUpdateFeaturesWorkflow as s,isBatchAttributeFormViewModel as a,isUpdateFeatureWorkflow as r}from"../workflowUtils.js";import{loadFooterActionsComponents as l,FooterActions as c}from"./FooterActions.js";import u from"./MergeFeaturesList.js";import{loadNoticesComponents as p,Notices as m}from"./Notices.js";import{loadPanelContentComponents as d,PanelContentSection as f,PanelContentSectionGroup as g,PanelContent as w}from"./PanelContent.js";import k from"./PendingFeatureList.js";import{loadCalciteComponents as b}from"../../support/componentsUtils.js";import{Heading as v,incrementHeadingLevel as h}from"../../support/Heading.js";import{tsx as F,tsxFragment as y}from"../../support/widget.js";import{classes as A}from"../../support/widgetUtils.js";const j=()=>Promise.all([b({"action-bar":()=>import("@esri/calcite-components/dist/components/calcite-action-bar"),action:()=>import("@esri/calcite-components/dist/components/calcite-action")}),l(),p(),d()]);function C(e){const{editorViewModel:r,headingLevel:l,messages:p,renderAttachments:d,renderFeatureForm:b,renderBatchAttributeForm:A,renderSketchToolbar:j}=e,{activeFeatureCount:C,activeLeafWorkflow:S,activeWorkflow:T,formViewModel:B}=r;if(!S||!T||!B)return null;const V=a(B),z=o(S)&&!S.data.selectedPendingFeature||i(S)&&!S.activeFeature,I=n(S),x=S.shouldShowAttachments&&!V&&!B.activeRelationshipInput&&!B.activeAssociationInput,D=V?B.activeForm.inputs:B.inputs,W=o(S)&&D.every(e=>!e.visible)&&!x,H=null!=r.featureFormViewModel?.activeAssociationInput,P=!z&&!W&&!H,U=W||o(S)&&!x&&!P&&!H,E=s(S)?A:b,N=W?F(f,null,F(k,{headingLevel:l,key:"pending-feature-list",workflow:S})):F(y,null,F(m,{activeFeatureCount:C,messages:p,workflow:T}),I?F(f,{class:t.mergeFeaturesListSection,key:"panel-section-merge"},F(u,{headingLevel:l,key:"merge-features-list",workflow:S})):void 0,F(f,{key:"panel-content-section-main"},F(g,null,z?F(k,{headingLevel:l,key:"pending-feature-list",workflow:S}):E(),x?F("div",{key:"attachments"},F(v,{level:h(l)},p.attachments),d()):null)));return F(y,null,P?M(S,e):void 0,U?j?.():void 0,F(w,{key:"attribute-panel-content"},N),F(c,{buttons:L(e)}))}function M(e,o){const i=[],n="3d"===o.editorViewModel.view?.type,{visibleElements:a}=o;if(a.zoomToButton&&o.editorViewModel.canZoomTo&&i.push(F("calcite-action",{alignment:"center",appearance:"transparent",icon:"zoom-to-object",key:"zoom-to-button",onclick:()=>o.editorViewModel.zoomTo(),scale:"s",text:o.messages.zoomTo,title:o.messages.zoomTo})),a.splitButton&&r(e)&&e.editorItem.supportsSplitFeatureWorkflow&&!n&&o.onSplit){const{onSplit:e,messages:t}=o;i.push(F("calcite-action",{icon:"split-geometry",key:"split-button",onclick:e,scale:"s",text:t.split,title:t.split}))}if(a.mergeButton&&s(e)&&e.supportsMergeFeaturesWorkflow&&!n&&o.onMerge){const{onMerge:e,messages:t}=o;i.push(F("calcite-action",{icon:"merge",key:"merge-button",onclick:e,scale:"s",text:t.mergeFeatures,title:t.mergeFeatures}))}return i.length>0?F("calcite-action-bar",{class:A(t.sketchContainer,t.updateActionBar),"data-testid":"update-feature-panel-action-bar",expandDisabled:!0,layout:"horizontal"},i):void 0}function L({editorViewModel:t,messages:o,messagesCommon:i,onDelete:n,onDeleteAssociation:s,onSave:a}){const{activeFeatureCount:r,activeLeafWorkflow:l,syncing:c}=t;if(!l)return[];const{page:u}=t;if("viewing-associated-features"===u||"viewing-associated-layers"===u)return[{appearance:"outline",onClick:()=>{const{featureFormViewModel:e}=t;null!=e?.associationId&&(e.associationId=null)},disabled:c,label:i.cancel,type:"button"}];const p=[],m=r>1?o.multiFeature:o.singleFeature,d=!l.allowSave||c,f=e(m[l.saveActionLabel],{count:r});p.push({appearance:"solid",onClick:a,disabled:d,label:f,type:"button"});const g={appearance:"outline",disabled:c,kind:"danger",label:e(m.delete,{count:r}),type:"button"};return t.shouldShowDeleteButton&&!t.featureFormHasAssociation&&n&&p.push({...g,onClick:n}),t.featureFormHasAssociation&&!t.shouldShowDeleteButton&&s&&p.push({...g,onClick:s,label:o.deleteAssociationTitle}),t.featureFormHasAssociation&&t.shouldShowDeleteButton&&s&&n&&p.push({...g,primaryLabel:i.delete,primaryText:i.delete,onClick:n,dropdownItems:[{onClick:s,label:o.deleteAssociationTitle}],type:"split-button"}),p}export{C as UpdateFeaturePanelContent,j as loadUpdateFeaturePanelContentComponents};
5
+ import{substitute as e}from"../../../intl/substitute.js";import{css as t}from"../css.js";import{isCreateFeaturesWorkflow as o,isSplitFeatureWorkflow as i,isMergeFeaturesWorkflow as n,isUpdateFeaturesWorkflow as s,isBatchAttributeFormViewModel as a,isUpdateFeatureWorkflow as l}from"../workflowUtils.js";import{loadFooterActionsComponents as r,FooterActions as c}from"./FooterActions.js";import u from"./MergeFeaturesList.js";import{loadNoticesComponents as m,Notices as p}from"./Notices.js";import{loadPanelContentComponents as d,PanelContentSection as f,PanelContentSectionGroup as g,PanelContent as w}from"./PanelContent.js";import k from"./PendingFeatureList.js";import{loadCalciteComponents as b}from"../../support/componentsUtils.js";import{Heading as v,incrementHeadingLevel as h}from"../../support/Heading.js";import{tsx as F,tsxFragment as y}from"../../support/widget.js";import{classes as A}from"../../support/widgetUtils.js";const j=()=>Promise.all([b({"action-bar":()=>import("@esri/calcite-components/dist/components/calcite-action-bar"),action:()=>import("@esri/calcite-components/dist/components/calcite-action")}),r(),m(),d()]);function C(e){const{editorViewModel:l,headingLevel:r,messages:m,renderAttachments:d,renderFeatureForm:b,renderBatchAttributeForm:A,renderSketchToolbar:j}=e,{activeFeatureCount:C,activeLeafWorkflow:S,activeWorkflow:T,formViewModel:B}=l;if(!S||!T||!B)return null;const V=a(B),z=o(S)&&!S.data.selectedPendingFeature||i(S)&&!S.activeFeature,I=n(S),x=S.shouldShowAttachments&&!V&&!B.activeRelationshipInput&&!B.activeAssociationInput,D=V?B.activeForm.inputs:B.inputs,W=o(S)&&D.every(e=>!e.visible)&&!x,H=null!=l.featureFormViewModel?.activeAssociationInput,P=!z&&!W&&!H,U=W||o(S)&&!x&&!P&&!H,E=s(S)?A:b,N=W?F(f,null,F(k,{headingLevel:r,key:"pending-feature-list",workflow:S})):F(y,null,F(p,{activeFeatureCount:C,messages:m,workflow:T}),I?F(f,{class:t.mergeFeaturesListSection,key:"panel-section-merge"},F(u,{headingLevel:r,key:"merge-features-list",workflow:S})):void 0,F(f,{key:"panel-content-section-main"},F(g,null,z?F(k,{headingLevel:r,key:"pending-feature-list",workflow:S}):E(),x?F("div",{key:"attachments"},F(v,{level:h(r)},m.attachments),d()):null)));return F(y,null,P?M(S,e):void 0,U?j?.():void 0,F(w,{key:"attribute-panel-content"},N),F(c,{buttons:L(e)}))}function M(e,o){const i=[],n="3d"===o.editorViewModel.view?.type,{visibleElements:a}=o,r="s";if(a.zoomToButton&&o.editorViewModel.canZoomTo&&i.push(F("calcite-action",{alignment:"center",icon:"zoom-to-object",key:"zoom-to-button",onclick:()=>o.editorViewModel.zoomTo(),scale:r,text:o.messages.zoomTo,title:o.messages.zoomTo})),a.splitButton&&l(e)&&e.editorItem.supportsSplitFeatureWorkflow&&!n&&o.onSplit){const{onSplit:e,messages:t}=o;i.push(F("calcite-action",{icon:"split-geometry",key:"split-button",onclick:e,scale:r,text:t.split,title:t.split}))}if(a.mergeButton&&s(e)&&e.supportsMergeFeaturesWorkflow&&!n&&o.onMerge){const{onMerge:e,messages:t}=o;i.push(F("calcite-action",{icon:"merge",key:"merge-button",onclick:e,scale:r,text:t.mergeFeatures,title:t.mergeFeatures}))}return i.length>0?F("calcite-action-bar",{class:A(t.sketchContainer,t.updateActionBar),"data-testid":"update-feature-panel-action-bar",expandDisabled:!0,layout:"horizontal",scale:r},i):void 0}function L({editorViewModel:t,messages:o,messagesCommon:i,onDelete:n,onDeleteAssociation:s,onSave:a}){const{activeFeatureCount:l,activeLeafWorkflow:r,syncing:c}=t;if(!r)return[];const{page:u}=t;if("viewing-associated-features"===u||"viewing-associated-layers"===u)return[{appearance:"outline",onClick:()=>{const{featureFormViewModel:e}=t;null!=e?.associationId&&(e.associationId=null)},disabled:c,label:i.cancel,type:"button"}];const m=[],p=l>1?o.multiFeature:o.singleFeature,d=!r.allowSave||c,f=e(p[r.saveActionLabel],{count:l});m.push({appearance:"solid",onClick:a,disabled:d,label:f,type:"button"});const g={appearance:"outline",disabled:c,kind:"danger",label:e(p.delete,{count:l}),type:"button"};return t.shouldShowDeleteButton&&!t.featureFormHasAssociation&&n&&m.push({...g,onClick:n}),t.featureFormHasAssociation&&!t.shouldShowDeleteButton&&s&&m.push({...g,onClick:s,label:o.deleteAssociationTitle}),t.featureFormHasAssociation&&t.shouldShowDeleteButton&&s&&n&&m.push({...g,primaryLabel:i.delete,primaryText:i.delete,onClick:n,dropdownItems:[{onClick:s,label:o.deleteAssociationTitle}],type:"split-button"}),m}export{C as UpdateFeaturePanelContent,j as loadUpdateFeaturePanelContentComponents};
@@ -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{destroyMaybe as s}from"../../../core/maybe.js";import{watch as i}from"../../../core/reactiveUtils.js";import{property as o,subclass as l}from"../../../core/accessorSupport/decorators.js";import r from"../../Widget.js";import{legendItemCss as c}from"../css.js";import{Statistics as n}from"./Statistics.js";import{getTranslatedLineTitle as a}from"../support/intlUtils.js";import{loadCalciteComponents as d}from"../../support/componentsUtils.js";import{tsx as p}from"../../support/widget.js";let h=class extends r{constructor(e,t){super(e,t),this.checkboxVisible=!0,this.expanded=!1}loadDependencies(){return d({action:()=>import("@esri/calcite-components/dist/components/calcite-action"),checkbox:()=>import("@esri/calcite-components/dist/components/calcite-checkbox"),label:()=>import("@esri/calcite-components/dist/components/calcite-label")})}initialize(){this._statistics=new n(this._statisticsProps),this.addHandles(i(()=>this._statisticsProps,e=>this._statistics.set(e)))}destroy(){this._statistics=s(this._statistics)}render(){const e=this.expanded;return p("div",{class:this.classes(c.base,{[c.disabled]:this.disabled,[c.expanded]:e}),key:this},this._renderColorIndicator(),p("div",{class:c.header,key:"header"},this._renderLabelWithCheckbox(),this._renderCollapseToggleButton()),e?p("div",{class:c.content,key:"content"},this._statistics.render()):null)}get disabled(){return!this.line.available}get _statisticsProps(){return{line:this.line,effectiveUnits:this.effectiveUnits}}_renderColorIndicator(){return p("div",{class:c.colorIndicator,key:"color-indicator",styles:{backgroundColor:this.line.color.toCss()}})}_renderCollapseToggleButton(){const{expanded:e,messages:t}=this,s=e?t.hideDetails:t.showDetails;return p("calcite-action",{appearance:"transparent",bind:this,class:c.collapseToggle,"data-testid":"legend-toggle",icon:e?"chevron-up":"chevron-down",key:"collapse-toggle",onclick:this._onCollapseToggleClick,scale:"s",text:s,title:s})}_onCollapseToggleClick(){this.onExpandedToggle()}_renderLabelWithCheckbox(){const{line:e,checkboxVisible:t,disabled:s,messages:i}=this;return p("calcite-label",{class:c.label,disabled:s,key:`label-${e.id}`,layout:"inline"},t?this._renderCheckbox():null,a(e,i))}_renderCheckbox(){const{disabled:e,line:s,messages:i}=this,o=s.visible,l=o?i.hideProfile:i.showProfile,r=t(l,{name:a(s,i)});return p("calcite-checkbox",{checked:o,class:c.checkbox,disabled:e,title:r,onCalciteCheckboxChange:()=>s.toggleVisibility()})}};e([o()],h.prototype,"checkboxVisible",void 0),e([o()],h.prototype,"disabled",null),e([o({nonNullable:!0})],h.prototype,"effectiveUnits",void 0),e([o()],h.prototype,"expanded",void 0),e([o({nonNullable:!0})],h.prototype,"line",void 0),e([o()],h.prototype,"messages",void 0),e([o()],h.prototype,"onExpandedToggle",void 0),e([o()],h.prototype,"_statistics",void 0),h=e([l("esri.widgets.ElevationProfile.components.LegendItem")],h);export{h as LegendItem};
5
+ import{__decorate as e}from"tslib";import{substitute as t}from"../../../intl.js";import{destroyMaybe as s}from"../../../core/maybe.js";import{watch as i}from"../../../core/reactiveUtils.js";import{property as o,subclass as l}from"../../../core/accessorSupport/decorators.js";import r from"../../Widget.js";import{legendItemCss as c}from"../css.js";import{Statistics as n}from"./Statistics.js";import{getTranslatedLineTitle as a}from"../support/intlUtils.js";import{loadCalciteComponents as d}from"../../support/componentsUtils.js";import{tsx as p}from"../../support/widget.js";let h=class extends r{constructor(e,t){super(e,t),this.checkboxVisible=!0,this.expanded=!1}loadDependencies(){return d({action:()=>import("@esri/calcite-components/dist/components/calcite-action"),checkbox:()=>import("@esri/calcite-components/dist/components/calcite-checkbox"),label:()=>import("@esri/calcite-components/dist/components/calcite-label")})}initialize(){this._statistics=new n(this._statisticsProps),this.addHandles(i(()=>this._statisticsProps,e=>this._statistics.set(e)))}destroy(){this._statistics=s(this._statistics)}render(){const e=this.expanded;return p("div",{class:this.classes(c.base,{[c.disabled]:this.disabled,[c.expanded]:e}),key:this},this._renderColorIndicator(),p("div",{class:c.header,key:"header"},this._renderLabelWithCheckbox(),this._renderCollapseToggleButton()),e?p("div",{class:c.content,key:"content"},this._statistics.render()):null)}get disabled(){return!this.line.available}get _statisticsProps(){return{line:this.line,effectiveUnits:this.effectiveUnits}}_renderColorIndicator(){return p("div",{class:c.colorIndicator,key:"color-indicator",styles:{backgroundColor:this.line.color.toCss()}})}_renderCollapseToggleButton(){const{expanded:e,messages:t}=this,s=e?t.hideDetails:t.showDetails;return p("calcite-action",{bind:this,class:c.collapseToggle,"data-testid":"legend-toggle",icon:e?"chevron-up":"chevron-down",key:"collapse-toggle",onclick:this._onCollapseToggleClick,scale:"s",text:s,title:s})}_onCollapseToggleClick(){this.onExpandedToggle()}_renderLabelWithCheckbox(){const{line:e,checkboxVisible:t,disabled:s,messages:i}=this;return p("calcite-label",{class:c.label,disabled:s,key:`label-${e.id}`,layout:"inline"},t?this._renderCheckbox():null,a(e,i))}_renderCheckbox(){const{disabled:e,line:s,messages:i}=this,o=s.visible,l=o?i.hideProfile:i.showProfile,r=t(l,{name:a(s,i)});return p("calcite-checkbox",{checked:o,class:c.checkbox,disabled:e,title:r,onCalciteCheckboxChange:()=>s.toggleVisibility()})}};e([o()],h.prototype,"checkboxVisible",void 0),e([o()],h.prototype,"disabled",null),e([o({nonNullable:!0})],h.prototype,"effectiveUnits",void 0),e([o()],h.prototype,"expanded",void 0),e([o({nonNullable:!0})],h.prototype,"line",void 0),e([o()],h.prototype,"messages",void 0),e([o()],h.prototype,"onExpandedToggle",void 0),e([o()],h.prototype,"_statistics",void 0),h=e([l("esri.widgets.ElevationProfile.components.LegendItem")],h);export{h as LegendItem};
@@ -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 n from"../../Widget.js";import{settingsCss as i}from"../css.js";import{loadCalciteComponents as r}from"../../support/componentsUtils.js";import{UnitSelect as s}from"../../support/UnitSelect.js";import{tsx as c}from"../../support/widget.js";let l=class extends n{constructor(){super(...arguments),this.messages=null,this._popoverIsOpen=!1,this._referenceElement=null,this._onUniformChartScalingChange=e=>{this.onUniformChartScalingChange(e.currentTarget.checked)}}loadDependencies(){return r({action:()=>import("@esri/calcite-components/dist/components/calcite-action"),checkbox:()=>import("@esri/calcite-components/dist/components/calcite-checkbox"),label:()=>import("@esri/calcite-components/dist/components/calcite-label"),popover:()=>import("@esri/calcite-components/dist/components/calcite-popover")})}render(){const{id:e,messages:t,visibleElements:o}=this,{unitSelector:n,uniformChartScalingToggle:r}=o;if(!t||!n&&!r)return c("div",{key:`${e}-empty`});const s=this._popoverIsOpen?t.hideSettings:t.showSettings;return c("div",{class:i.base,key:this},c("calcite-action",{afterCreate:e=>{this._referenceElement=e},appearance:"transparent","data-testid":"settings-button",icon:"gear",scale:"s",text:s,title:s}),this._referenceElement?c("calcite-popover",{autoClose:!0,label:s,placement:"bottom-end",referenceElement:this._referenceElement,onCalcitePopoverClose:()=>{this._popoverIsOpen=!1},onCalcitePopoverOpen:()=>{this._popoverIsOpen=!0}},this._renderPopoverContent()):null)}_renderPopoverContent(){const{unitSelector:e,uniformChartScalingToggle:t}=this.visibleElements;return c("div",{class:i.popoverContent},e?this._renderUnitSelector():null,t?this._renderUniformChartScalingToggle():null)}_renderUnitSelector(){const{messages:e}=this;return c(s,{key:"unit-selector-label",options:this.unitOptions,selectLabel:e?.unitSelectLabel??"",value:this.unit,onChange:this.onUnitChange})}_renderUniformChartScalingToggle(){const{messages:e}=this,t=this.uniformChartScaling,o=e?.[t?"uniformChartScalingDisable":"uniformChartScalingEnable"]??"";return c("calcite-label",{class:i.uniformChartScalingLabel,key:"uniform-chart-scaling-label",layout:"inline"},c("calcite-checkbox",{checked:t,class:i.uniformChartScalingCheckbox,title:o,onCalciteCheckboxChange:this._onUniformChartScalingChange}),e?.uniformChartScalingLabel)}};e([t()],l.prototype,"messages",void 0),e([t()],l.prototype,"onUniformChartScalingChange",void 0),e([t()],l.prototype,"onUnitChange",void 0),e([t()],l.prototype,"uniformChartScaling",void 0),e([t()],l.prototype,"unit",void 0),e([t()],l.prototype,"unitOptions",void 0),e([t()],l.prototype,"visibleElements",void 0),e([t()],l.prototype,"_popoverIsOpen",void 0),e([t()],l.prototype,"_referenceElement",void 0),l=e([o("esri.widgets.ElevationProfile.components.SettingsButton")],l);export{l as SettingsButton};
5
+ import{__decorate as e}from"tslib";import{property as t,subclass as o}from"../../../core/accessorSupport/decorators.js";import n from"../../Widget.js";import{settingsCss as i}from"../css.js";import{loadCalciteComponents as r}from"../../support/componentsUtils.js";import{UnitSelect as s}from"../../support/UnitSelect.js";import{tsx as c}from"../../support/widget.js";let l=class extends n{constructor(){super(...arguments),this.messages=null,this._popoverIsOpen=!1,this._referenceElement=null,this._onUniformChartScalingChange=e=>{this.onUniformChartScalingChange(e.currentTarget.checked)}}loadDependencies(){return r({action:()=>import("@esri/calcite-components/dist/components/calcite-action"),checkbox:()=>import("@esri/calcite-components/dist/components/calcite-checkbox"),label:()=>import("@esri/calcite-components/dist/components/calcite-label"),popover:()=>import("@esri/calcite-components/dist/components/calcite-popover")})}render(){const{id:e,messages:t,visibleElements:o}=this,{unitSelector:n,uniformChartScalingToggle:r}=o;if(!t||!n&&!r)return c("div",{key:`${e}-empty`});const s=this._popoverIsOpen?t.hideSettings:t.showSettings;return c("div",{class:i.base,key:this},c("calcite-action",{afterCreate:e=>{this._referenceElement=e},"data-testid":"settings-button",icon:"gear",text:s,title:s}),this._referenceElement?c("calcite-popover",{autoClose:!0,label:s,placement:"bottom-end",referenceElement:this._referenceElement,onCalcitePopoverClose:()=>{this._popoverIsOpen=!1},onCalcitePopoverOpen:()=>{this._popoverIsOpen=!0}},this._renderPopoverContent()):null)}_renderPopoverContent(){const{unitSelector:e,uniformChartScalingToggle:t}=this.visibleElements;return c("div",{class:i.popoverContent},e?this._renderUnitSelector():null,t?this._renderUniformChartScalingToggle():null)}_renderUnitSelector(){const{messages:e}=this;return c(s,{key:"unit-selector-label",options:this.unitOptions,selectLabel:e?.unitSelectLabel??"",value:this.unit,onChange:this.onUnitChange})}_renderUniformChartScalingToggle(){const{messages:e}=this,t=this.uniformChartScaling,o=e?.[t?"uniformChartScalingDisable":"uniformChartScalingEnable"]??"";return c("calcite-label",{class:i.uniformChartScalingLabel,key:"uniform-chart-scaling-label",layout:"inline"},c("calcite-checkbox",{checked:t,class:i.uniformChartScalingCheckbox,title:o,onCalciteCheckboxChange:this._onUniformChartScalingChange}),e?.uniformChartScalingLabel)}};e([t()],l.prototype,"messages",void 0),e([t()],l.prototype,"onUniformChartScalingChange",void 0),e([t()],l.prototype,"onUnitChange",void 0),e([t()],l.prototype,"uniformChartScaling",void 0),e([t()],l.prototype,"unit",void 0),e([t()],l.prototype,"unitOptions",void 0),e([t()],l.prototype,"visibleElements",void 0),e([t()],l.prototype,"_popoverIsOpen",void 0),e([t()],l.prototype,"_referenceElement",void 0),l=e([o("esri.widgets.ElevationProfile.components.SettingsButton")],l);export{l as SettingsButton};
@@ -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 e from"../Graphic.js";import{createTask as i}from"../core/asyncUtils.js";import{deprecateWidget as s}from"../core/deprecate.js";import n from"../core/Logger.js";import{abortMaybe as r,destroyMaybe as o}from"../core/maybe.js";import{memoize as a}from"../core/memoize.js";import{throwIfAborted as l,createAbortError as c}from"../core/promiseUtils.js";import{watch as h,initial as d}from"../core/reactiveUtils.js";import{property as p,subclass as u}from"../core/accessorSupport/decorators.js";import m from"./Widget.js";import{css as _}from"./ElevationProfile/css.js";import{ElevationProfileLineCollection as v}from"./ElevationProfile/elevationProfileLineTypes.js";import C from"./ElevationProfile/ElevationProfileViewModel.js";import g from"./ElevationProfile/ElevationProfileVisibleElements.js";import{Legend as f}from"./ElevationProfile/components/Legend.js";import{SettingsButton as y}from"./ElevationProfile/components/SettingsButton.js";import{getConfig as b}from"./ElevationProfile/support/constants.js";import{loadCalciteComponents as w}from"./support/componentsUtils.js";import{globalCss as k}from"./support/globalCss.js";import{messageBundle as M,tsx as B,tsxFragment as S}from"./support/widget.js";const P=[{type:"select"},{type:"sketch"}],E={none:null,"no-valid-input":"noProfile","no-visible-profiles":"noProfile","refined-but-no-chart-data":"noProfile","too-complex":"tooComplex","unknown-error":"unknown","invalid-geometry":"invalidGeometry","invalid-elevation-info":"invalidElevationInfo"};let U=class extends m{constructor(t,e){super(t,e),this.viewModel=null,this.visibleElements=new g,this.messages=null,this.messagesCommon=null,this.messagesUnits=null,this._chartContainer=null,this._chart=null,this._chartInitTask=null,this._chartIsRefined=!1,this._zoomOutButtonVisible=!1,this._getChartUpdateParamsMemoized=a((t,e,i,s)=>({chart:t,data:e,stationary:i,messages:s})),this._onZoomOutButtonClick=()=>{this._chart?.zoomOut()},this._onClearButtonClick=()=>{this.viewModel.clear()},s(n.getLogger(this),"Elevation Profile","arcgis-elevation-profile",{version:"5.0"}),t?.viewModel||(this._defaultViewModel=new C({view:t?.view,isDefaultViewModel:!0}),this.viewModel=this._defaultViewModel)}loadDependencies(){return w({action:()=>import("@esri/calcite-components/dist/components/calcite-action"),button:()=>import("@esri/calcite-components/dist/components/calcite-button"),loader:()=>import("@esri/calcite-components/dist/components/calcite-loader")})}postInitialize(){this.addHandles([h(()=>({container:this._chartContainer}),({container:t})=>{this._destroyChart(),null!=t&&this._initializeChart(t)},d),h(()=>this._chartUpdateParams,()=>this._updateChart(this._chartUpdateParams),d)])}destroy(){this._destroyChart(),null!=this._defaultViewModel&&this.viewModel!==this._defaultViewModel&&this._defaultViewModel.destroy()}get view(){return this.viewModel.view}set view(t){this.viewModel.view=t}get input(){return this.viewModel.input}set input(t){this.viewModel.input=t}get profiles(){return this.viewModel.profiles}set profiles(t){this.viewModel.profiles=t}get unitOptions(){return this.viewModel.unitOptions}set unitOptions(t){this.viewModel.unitOptions=t}get unit(){return this.viewModel.unit}set unit(t){this.viewModel.unit=t}get icon(){return"altitude"}set icon(t){this._overrideIfSome("icon",t)}get label(){return this.messages?.widgetLabel??""}set label(t){this._overrideIfSome("label",t)}get visible(){return this.viewModel.visible}set visible(t){this.viewModel.visible=t}get test(){return{chart:this._chart}}get _selectButtonVisible(){return!0===this.visibleElements.selectButton&&this.viewModel.selectAvailable}get _chartUpdateParams(){const t=this.view;return this._getChartUpdateParamsMemoized(this._chart,this.viewModel.chartData,null==t||t.stationary,this._chartMessages)}get _chartMessages(){return{...this.messagesUnits,...this.messages}}get _profilesArray(){return this.profiles.toArray()}render(){const{viewModel:t,visible:e}=this;return B("div",{"aria-label":this.messages.widgetLabel,class:this.classes({[_.base]:e,[k.widget]:e,[k.panel]:e,[k.widgetDisabled]:e&&"disabled"===t.state,[_.refined]:1===t.progress}),key:this},B("div",{bind:this,key:"content-wrapper"},e?this._renderContentForState():null))}_renderContentForState(){switch(this.viewModel.state){case"ready":case"disabled":return this._renderContentForReadyState();case"selecting":return this._renderContentForSelectingState();case"creating":return this._renderContentForCreatingState();case"selected":return this._renderContentForSelectedState();case"created":return this._renderContentForCreatedState()}}_renderContentForReadyState(){const{messages:t,visibleElements:e,_selectButtonVisible:i}=this,{sketchButton:s}=e;let n;return n=s&&i?t.readyPrompt:s?t.readyPromptCreateOnly:i?t.readyPromptSelectOnly:t.errors?.noProfile,this._renderContent({prompt:n,chart:!1,actions:P})}_renderContentForSelectingState(){const{view:t}=this;if(null==t)return null;const e=this.messages[`selectingPrompt-${t.type}`];return this._renderContent({prompt:e,chart:!1,actions:[{type:"select-cancel"}]})}_renderContentForCreatingState(){const{view:t,viewModel:e}=this;if(null==t)return null;const i=e.hasVertices?[{type:"sketch-cancel"},{type:"sketch-done",disabled:!e.tool.interaction.canStopCreating}]:[{type:"select"},{type:"sketch",disabled:!0}];if("no-valid-input"===e.errorState){const e=this.messages[`creatingPrompt-${t.type}`];return this._renderContent({chart:!1,actions:i,prompt:e})}const s=this._getErrorMessage();return s?this._renderContent({chart:!1,actions:i,prompt:s}):this._renderContent({chart:!0,actions:i})}_renderContentForSelectedState(){const t=this._getErrorMessage();return t?this._renderContent({chart:!1,actions:P,prompt:t}):this._renderContent({chart:!0,actions:P})}_renderContentForCreatedState(){const t=this._getErrorMessage();return t?this._renderContent({chart:!1,actions:P,prompt:t}):this._renderContent({chart:!0,actions:P})}_getErrorMessage(){const t=E[this.viewModel.errorState];return t?this.messages?.errors?.[t]:null}_renderContent(t){const e=null!=t.prompt?this._renderPrompt(t.prompt):t.chart&&this._renderChart(),{viewModel:i}=this,s=null!=i.input;return B(S,null,B("header",{class:_.header,key:"header"},this._zoomOutButtonVisible?this._renderZoomOutButton():null,this.visibleElements.clearButton&&s?this._renderClearButton():null,this.visibleElements.settingsButton?B(y,{messages:this.messages,uniformChartScaling:i.uniformChartScaling,unit:i.unit,unitOptions:i.unitOptions,visibleElements:this.visibleElements,onUniformChartScalingChange:t=>i.uniformChartScaling=t,onUnitChange:t=>i.unit=t}):null),B("div",{class:_.mainContainer,key:"main-container"},e),this.visibleElements.legend?B(f,{effectiveUnits:i.effectiveUnits,messages:this.messages,profiles:this._profilesArray}):null,this._renderActions(t))}_renderZoomOutButton(){const t=this.messages.zoomOut;return B("calcite-action",{appearance:"transparent",class:_.zoomOutButton,"data-testid":"zoom-out-button",icon:"magnifying-glass-minus",key:"zoom-out",onclick:this._onZoomOutButtonClick,scale:"s",text:t,title:t})}_renderClearButton(){const t=this.messages.clearProfile;return B("calcite-action",{appearance:"transparent",class:_.clearButton,"data-testid":"clear-button",icon:"trash",key:"clear-profile",onclick:this._onClearButtonClick,scale:"s",text:t,title:t})}_renderPrompt(t){return[B("div",{bind:this,class:_.promptContainer,key:"prompt-container"},B("p",null,t))]}_renderChart(){if(!this.visibleElements.chart)return B("div",{class:_.chartContainer,key:"empty-chart-container"});const{chartData:t,progress:e}=this.viewModel,i=this._chartIsRefined||this._canRenderChart(),s=null!=t&&e<1;return i?B(S,null,this._renderSpinner({size:i?"small":"large",visible:s}),B("div",{afterCreate:this._onChartContainerUpdate,afterRemoved:this._onChartContainerRemoved,afterUpdate:this._onChartContainerUpdate,bind:this,class:_.chartContainer,key:"chart-container"})):B(S,null,this._renderSpinner({size:"large",visible:s}),B("div",{class:_.chartContainer,key:"chart-container-empty"}))}_renderSpinner(t){const e="small"===t.size,i=t.visible??!0;return B("calcite-loader",{class:this.classes(_.chartSpinner,e&&_.chartSpinnerSmall,i&&_.chartSpinnerVisible),"data-testid":"chart-spinner",inline:e,key:"spinner",label:"",scale:"s"})}_canRenderChart(){const t=this.viewModel.chartData;if(null==t)return!1;if(!this.viewModel.inputIsSketched)return t.refined;let e=0;for(const{samples:i}of t.lines)e+=null!=i?i.length:0;return t.refined||e<=b().largeChartSamples}_renderActions({actions:t}){const e=t.map(t=>{switch(t.type){case"sketch":return this.visibleElements.sketchButton&&this._renderAction({action:t,className:_.sketchButton,label:this.messages.sketchButtonLabel,onClick:this._onSketchButtonClick,primary:!0});case"sketch-cancel":return this.visibleElements.sketchButton&&this._renderAction({action:t,onClick:this._onCancelButtonClick,className:_.sketchCancelButton,label:this.messagesCommon.cancel,primary:!1});case"sketch-done":return this.visibleElements.sketchButton&&this._renderAction({action:t,onClick:this._onDoneButtonClick,className:_.sketchDoneButton,label:this.messagesCommon.done,primary:!0});case"select":return this._selectButtonVisible&&this._renderAction({action:t,onClick:this._onSelectButtonClick,className:_.selectButton,label:this.messages.selectButtonLabel,primary:!1});case"select-cancel":return this._selectButtonVisible&&this._renderAction({action:t,onClick:this._onCancelButtonClick,className:_.selectCancelButton,label:this.messagesCommon.cancel,primary:!1})}}).filter(Boolean);return e.length?B("footer",{class:_.footer,key:"footer"},e):null}_renderAction({action:t,className:e,label:i,onClick:s,primary:n}){return B("calcite-button",{appearance:n?"solid":"outline-fill",bind:this,class:this.classes(_.actionButton,e),disabled:t.disabled,key:`action-${t.type}`,onclick:s},i)}_onSketchButtonClick(){this.viewModel.start({mode:"sketch"})}_onSelectButtonClick(){this.viewModel.start({mode:"select"})}_onCancelButtonClick(){this.viewModel.cancel()}_onDoneButtonClick(){this.viewModel.stop()}_updateChart(t){const{data:e,chart:i,messages:s,stationary:n}=t;null!=i&&null!=s&&n&&this._canRenderChart()&&(i.update(t),this._chartIsRefined=null!=e&&e.refined)}_onChartContainerUpdate(t){this._chartContainer=t}_onChartContainerRemoved(t){this._chartContainer===t&&(this._chartContainer=null)}_initializeChart(t){r(this._chartInitTask),this._chartInitTask=i(async e=>{const{createChart:i}=await import("./ElevationProfile/support/chartUtils.js");l(e);const s=await i({container:t,abortOptions:{signal:e},onRangeChange:(t,e)=>{this._zoomOutButtonVisible=1!==t||1!==e},onCursorPositionChange:t=>{this.viewModel.hoveredChartPosition=t}});if(e.aborted)throw o(s),c();this._chart=s,this._updateChart(this._chartUpdateParams)})}_destroyChart(){this._chartInitTask=r(this._chartInitTask),this._chart=o(this._chart),this._chartIsRefined=!1}};t([p({type:C})],U.prototype,"viewModel",void 0),t([p()],U.prototype,"view",null),t([p({type:e})],U.prototype,"input",null),t([p({type:v})],U.prototype,"profiles",null),t([p()],U.prototype,"unitOptions",null),t([p()],U.prototype,"unit",null),t([p({type:g,nonNullable:!0})],U.prototype,"visibleElements",void 0),t([p()],U.prototype,"icon",null),t([p()],U.prototype,"label",null),t([p()],U.prototype,"visible",null),t([p(),M("esri/widgets/ElevationProfile/t9n/ElevationProfile")],U.prototype,"messages",void 0),t([p(),M("esri/t9n/common")],U.prototype,"messagesCommon",void 0),t([p(),M("esri/core/t9n/Units")],U.prototype,"messagesUnits",void 0),t([p()],U.prototype,"_chartContainer",void 0),t([p()],U.prototype,"_chart",void 0),t([p()],U.prototype,"_chartInitTask",void 0),t([p()],U.prototype,"_chartIsRefined",void 0),t([p()],U.prototype,"_zoomOutButtonVisible",void 0),t([p()],U.prototype,"_selectButtonVisible",null),t([p()],U.prototype,"_chartUpdateParams",null),t([p()],U.prototype,"_chartMessages",null),t([p()],U.prototype,"_profilesArray",null),U=t([u("esri.widgets.ElevationProfile")],U);const j=U;export{j as default};
5
+ import{__decorate as t}from"tslib";import e from"../Graphic.js";import{createTask as i}from"../core/asyncUtils.js";import{deprecateWidget as s}from"../core/deprecate.js";import n from"../core/Logger.js";import{abortMaybe as r,destroyMaybe as o}from"../core/maybe.js";import{memoize as a}from"../core/memoize.js";import{throwIfAborted as l,createAbortError as c}from"../core/promiseUtils.js";import{watch as h,initial as d}from"../core/reactiveUtils.js";import{property as p,subclass as u}from"../core/accessorSupport/decorators.js";import m from"./Widget.js";import{css as _}from"./ElevationProfile/css.js";import{ElevationProfileLineCollection as v}from"./ElevationProfile/elevationProfileLineTypes.js";import C from"./ElevationProfile/ElevationProfileViewModel.js";import g from"./ElevationProfile/ElevationProfileVisibleElements.js";import{Legend as f}from"./ElevationProfile/components/Legend.js";import{SettingsButton as y}from"./ElevationProfile/components/SettingsButton.js";import{getConfig as b}from"./ElevationProfile/support/constants.js";import{loadCalciteComponents as w}from"./support/componentsUtils.js";import{globalCss as k}from"./support/globalCss.js";import{messageBundle as M,tsx as B,tsxFragment as S}from"./support/widget.js";const P=[{type:"select"},{type:"sketch"}],E={none:null,"no-valid-input":"noProfile","no-visible-profiles":"noProfile","refined-but-no-chart-data":"noProfile","too-complex":"tooComplex","unknown-error":"unknown","invalid-geometry":"invalidGeometry","invalid-elevation-info":"invalidElevationInfo"};let U=class extends m{constructor(t,e){super(t,e),this.viewModel=null,this.visibleElements=new g,this.messages=null,this.messagesCommon=null,this.messagesUnits=null,this._chartContainer=null,this._chart=null,this._chartInitTask=null,this._chartIsRefined=!1,this._zoomOutButtonVisible=!1,this._getChartUpdateParamsMemoized=a((t,e,i,s)=>({chart:t,data:e,stationary:i,messages:s})),this._onZoomOutButtonClick=()=>{this._chart?.zoomOut()},this._onClearButtonClick=()=>{this.viewModel.clear()},s(n.getLogger(this),"Elevation Profile","arcgis-elevation-profile",{version:"5.0"}),t?.viewModel||(this._defaultViewModel=new C({view:t?.view,isDefaultViewModel:!0}),this.viewModel=this._defaultViewModel)}loadDependencies(){return w({action:()=>import("@esri/calcite-components/dist/components/calcite-action"),button:()=>import("@esri/calcite-components/dist/components/calcite-button"),loader:()=>import("@esri/calcite-components/dist/components/calcite-loader")})}postInitialize(){this.addHandles([h(()=>({container:this._chartContainer}),({container:t})=>{this._destroyChart(),null!=t&&this._initializeChart(t)},d),h(()=>this._chartUpdateParams,()=>this._updateChart(this._chartUpdateParams),d)])}destroy(){this._destroyChart(),null!=this._defaultViewModel&&this.viewModel!==this._defaultViewModel&&this._defaultViewModel.destroy()}get view(){return this.viewModel.view}set view(t){this.viewModel.view=t}get input(){return this.viewModel.input}set input(t){this.viewModel.input=t}get profiles(){return this.viewModel.profiles}set profiles(t){this.viewModel.profiles=t}get unitOptions(){return this.viewModel.unitOptions}set unitOptions(t){this.viewModel.unitOptions=t}get unit(){return this.viewModel.unit}set unit(t){this.viewModel.unit=t}get icon(){return"altitude"}set icon(t){this._overrideIfSome("icon",t)}get label(){return this.messages?.widgetLabel??""}set label(t){this._overrideIfSome("label",t)}get visible(){return this.viewModel.visible}set visible(t){this.viewModel.visible=t}get test(){return{chart:this._chart}}get _selectButtonVisible(){return!0===this.visibleElements.selectButton&&this.viewModel.selectAvailable}get _chartUpdateParams(){const t=this.view;return this._getChartUpdateParamsMemoized(this._chart,this.viewModel.chartData,null==t||t.stationary,this._chartMessages)}get _chartMessages(){return{...this.messagesUnits,...this.messages}}get _profilesArray(){return this.profiles.toArray()}render(){const{viewModel:t,visible:e}=this;return B("div",{"aria-label":this.messages.widgetLabel,class:this.classes({[_.base]:e,[k.widget]:e,[k.panel]:e,[k.widgetDisabled]:e&&"disabled"===t.state,[_.refined]:1===t.progress}),key:this},B("div",{bind:this,key:"content-wrapper"},e?this._renderContentForState():null))}_renderContentForState(){switch(this.viewModel.state){case"ready":case"disabled":return this._renderContentForReadyState();case"selecting":return this._renderContentForSelectingState();case"creating":return this._renderContentForCreatingState();case"selected":return this._renderContentForSelectedState();case"created":return this._renderContentForCreatedState()}}_renderContentForReadyState(){const{messages:t,visibleElements:e,_selectButtonVisible:i}=this,{sketchButton:s}=e;let n;return n=s&&i?t.readyPrompt:s?t.readyPromptCreateOnly:i?t.readyPromptSelectOnly:t.errors?.noProfile,this._renderContent({prompt:n,chart:!1,actions:P})}_renderContentForSelectingState(){const{view:t}=this;if(null==t)return null;const e=this.messages[`selectingPrompt-${t.type}`];return this._renderContent({prompt:e,chart:!1,actions:[{type:"select-cancel"}]})}_renderContentForCreatingState(){const{view:t,viewModel:e}=this;if(null==t)return null;const i=e.hasVertices?[{type:"sketch-cancel"},{type:"sketch-done",disabled:!e.tool.interaction.canStopCreating}]:[{type:"select"},{type:"sketch",disabled:!0}];if("no-valid-input"===e.errorState){const e=this.messages[`creatingPrompt-${t.type}`];return this._renderContent({chart:!1,actions:i,prompt:e})}const s=this._getErrorMessage();return s?this._renderContent({chart:!1,actions:i,prompt:s}):this._renderContent({chart:!0,actions:i})}_renderContentForSelectedState(){const t=this._getErrorMessage();return t?this._renderContent({chart:!1,actions:P,prompt:t}):this._renderContent({chart:!0,actions:P})}_renderContentForCreatedState(){const t=this._getErrorMessage();return t?this._renderContent({chart:!1,actions:P,prompt:t}):this._renderContent({chart:!0,actions:P})}_getErrorMessage(){const t=E[this.viewModel.errorState];return t?this.messages?.errors?.[t]:null}_renderContent(t){const e=null!=t.prompt?this._renderPrompt(t.prompt):t.chart&&this._renderChart(),{viewModel:i}=this,s=null!=i.input;return B(S,null,B("header",{class:_.header,key:"header"},this._zoomOutButtonVisible?this._renderZoomOutButton():null,this.visibleElements.clearButton&&s?this._renderClearButton():null,this.visibleElements.settingsButton?B(y,{messages:this.messages,uniformChartScaling:i.uniformChartScaling,unit:i.unit,unitOptions:i.unitOptions,visibleElements:this.visibleElements,onUniformChartScalingChange:t=>i.uniformChartScaling=t,onUnitChange:t=>i.unit=t}):null),B("div",{class:_.mainContainer,key:"main-container"},e),this.visibleElements.legend?B(f,{effectiveUnits:i.effectiveUnits,messages:this.messages,profiles:this._profilesArray}):null,this._renderActions(t))}_renderZoomOutButton(){const t=this.messages.zoomOut;return B("calcite-action",{class:_.zoomOutButton,"data-testid":"zoom-out-button",icon:"magnifying-glass-minus",key:"zoom-out",onclick:this._onZoomOutButtonClick,text:t,title:t})}_renderClearButton(){const t=this.messages.clearProfile;return B("calcite-action",{class:_.clearButton,"data-testid":"clear-button",icon:"trash",key:"clear-profile",onclick:this._onClearButtonClick,text:t,title:t})}_renderPrompt(t){return[B("div",{bind:this,class:_.promptContainer,key:"prompt-container"},B("p",null,t))]}_renderChart(){if(!this.visibleElements.chart)return B("div",{class:_.chartContainer,key:"empty-chart-container"});const{chartData:t,progress:e}=this.viewModel,i=this._chartIsRefined||this._canRenderChart(),s=null!=t&&e<1;return i?B(S,null,this._renderSpinner({size:i?"small":"large",visible:s}),B("div",{afterCreate:this._onChartContainerUpdate,afterRemoved:this._onChartContainerRemoved,afterUpdate:this._onChartContainerUpdate,bind:this,class:_.chartContainer,key:"chart-container"})):B(S,null,this._renderSpinner({size:"large",visible:s}),B("div",{class:_.chartContainer,key:"chart-container-empty"}))}_renderSpinner(t){const e="small"===t.size,i=t.visible??!0;return B("calcite-loader",{class:this.classes(_.chartSpinner,e&&_.chartSpinnerSmall,i&&_.chartSpinnerVisible),"data-testid":"chart-spinner",inline:e,key:"spinner",label:"",scale:"s"})}_canRenderChart(){const t=this.viewModel.chartData;if(null==t)return!1;if(!this.viewModel.inputIsSketched)return t.refined;let e=0;for(const{samples:i}of t.lines)e+=null!=i?i.length:0;return t.refined||e<=b().largeChartSamples}_renderActions({actions:t}){const e=t.map(t=>{switch(t.type){case"sketch":return this.visibleElements.sketchButton&&this._renderAction({action:t,className:_.sketchButton,label:this.messages.sketchButtonLabel,onClick:this._onSketchButtonClick,primary:!0});case"sketch-cancel":return this.visibleElements.sketchButton&&this._renderAction({action:t,onClick:this._onCancelButtonClick,className:_.sketchCancelButton,label:this.messagesCommon.cancel,primary:!1});case"sketch-done":return this.visibleElements.sketchButton&&this._renderAction({action:t,onClick:this._onDoneButtonClick,className:_.sketchDoneButton,label:this.messagesCommon.done,primary:!0});case"select":return this._selectButtonVisible&&this._renderAction({action:t,onClick:this._onSelectButtonClick,className:_.selectButton,label:this.messages.selectButtonLabel,primary:!1});case"select-cancel":return this._selectButtonVisible&&this._renderAction({action:t,onClick:this._onCancelButtonClick,className:_.selectCancelButton,label:this.messagesCommon.cancel,primary:!1})}}).filter(Boolean);return e.length?B("footer",{class:_.footer,key:"footer"},e):null}_renderAction({action:t,className:e,label:i,onClick:s,primary:n}){return B("calcite-button",{appearance:n?"solid":"outline-fill",bind:this,class:this.classes(_.actionButton,e),disabled:t.disabled,key:`action-${t.type}`,onclick:s},i)}_onSketchButtonClick(){this.viewModel.start({mode:"sketch"})}_onSelectButtonClick(){this.viewModel.start({mode:"select"})}_onCancelButtonClick(){this.viewModel.cancel()}_onDoneButtonClick(){this.viewModel.stop()}_updateChart(t){const{data:e,chart:i,messages:s,stationary:n}=t;null!=i&&null!=s&&n&&this._canRenderChart()&&(i.update(t),this._chartIsRefined=null!=e&&e.refined)}_onChartContainerUpdate(t){this._chartContainer=t}_onChartContainerRemoved(t){this._chartContainer===t&&(this._chartContainer=null)}_initializeChart(t){r(this._chartInitTask),this._chartInitTask=i(async e=>{const{createChart:i}=await import("./ElevationProfile/support/chartUtils.js");l(e);const s=await i({container:t,abortOptions:{signal:e},onRangeChange:(t,e)=>{this._zoomOutButtonVisible=1!==t||1!==e},onCursorPositionChange:t=>{this.viewModel.hoveredChartPosition=t}});if(e.aborted)throw o(s),c();this._chart=s,this._updateChart(this._chartUpdateParams)})}_destroyChart(){this._chartInitTask=r(this._chartInitTask),this._chart=o(this._chart),this._chartIsRefined=!1}};t([p({type:C})],U.prototype,"viewModel",void 0),t([p()],U.prototype,"view",null),t([p({type:e})],U.prototype,"input",null),t([p({type:v})],U.prototype,"profiles",null),t([p()],U.prototype,"unitOptions",null),t([p()],U.prototype,"unit",null),t([p({type:g,nonNullable:!0})],U.prototype,"visibleElements",void 0),t([p()],U.prototype,"icon",null),t([p()],U.prototype,"label",null),t([p()],U.prototype,"visible",null),t([p(),M("esri/widgets/ElevationProfile/t9n/ElevationProfile")],U.prototype,"messages",void 0),t([p(),M("esri/t9n/common")],U.prototype,"messagesCommon",void 0),t([p(),M("esri/core/t9n/Units")],U.prototype,"messagesUnits",void 0),t([p()],U.prototype,"_chartContainer",void 0),t([p()],U.prototype,"_chart",void 0),t([p()],U.prototype,"_chartInitTask",void 0),t([p()],U.prototype,"_chartIsRefined",void 0),t([p()],U.prototype,"_zoomOutButtonVisible",void 0),t([p()],U.prototype,"_selectButtonVisible",null),t([p()],U.prototype,"_chartUpdateParams",null),t([p()],U.prototype,"_chartMessages",null),t([p()],U.prototype,"_profilesArray",null),U=t([u("esri.widgets.ElevationProfile")],U);const j=U;export{j as default};
@@ -8,6 +8,7 @@ export type ExpandViewModelState = "ready" | "disabled";
8
8
  /**
9
9
  * Provides the logic for the [Expand](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Expand.html) widget and [component](https://developers.arcgis.com/javascript/latest/references/map-components/arcgis-expand/).
10
10
  *
11
+ * @deprecated since 5.0. Use the [Expand component](https://developers.arcgis.com/javascript/latest/references/map-components/arcgis-expand/) directly instead.
11
12
  * @since 4.3
12
13
  * @see [Expand](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Expand.html) widget - _Deprecated since 4.34. Use the [Expand component](https://developers.arcgis.com/javascript/latest/references/map-components/arcgis-expand/) instead._
13
14
  * @see [Expand component](https://developers.arcgis.com/javascript/latest/references/map-components/arcgis-expand/)
@@ -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/Accessor.js";import{on as i,when as s,pausable as o}from"../../core/reactiveUtils.js";import{property as a,subclass as n}from"../../core/accessorSupport/decorators.js";let l=class extends t{constructor(e){super(e),this._viewpointHandle=null,this.group=null}initialize(){this.addHandles(i(()=>this.view?.ui,"expand",e=>{const{target:t}=e;t&&t!==this&&t.expanded&&t.group&&t.group===this.group&&this._collapse()}))}destroy(){this._viewpointHandle=null,this.view=null}set autoCollapse(e){this._set("autoCollapse",e),this._watchViewpoint()}set expanded(e){const t=!!e;this._set("expanded",t);const i=this.view?.ui;i&&i.emit("expand",{target:this}),this._viewpointHandleChange(t)}get state(){return this.view?.ready?"ready":"disabled"}set view(e){this._get("view")!==e&&(this._set("view",e),e&&s(()=>e.ready,()=>{this.view===e&&this._watchViewpoint()},{once:!0,initial:!0}))}_viewpointHandleChange(e){this._viewpointHandle&&(e?s(()=>this.view?.stationary,()=>this._viewpointHandle?.resume(),{once:!0,initial:!0}):this._viewpointHandle.pause())}_watchViewpoint(){const e="viewpoint";this.removeHandles(e),this._viewpointHandle=null;const{autoCollapse:t,view:i}=this;if(!i||!t)return;const s=o(()=>"3d"===i.type?i.camera:i.viewpoint,()=>this._collapse());this.addHandles(s,e),this._viewpointHandle=s}_collapse(){this.expanded=!1}};e([a({value:!1})],l.prototype,"autoCollapse",null),e([a({value:!1})],l.prototype,"expanded",null),e([a()],l.prototype,"group",void 0),e([a({readOnly:!0})],l.prototype,"state",null),e([a({value:null})],l.prototype,"view",null),l=e([n("esri.widgets.Expand.ExpandViewModel")],l);const p=l;export{p as default};
5
+ import{__decorate as e}from"tslib";import t from"../../core/Accessor.js";import{deprecateUnnecessaryViewModel as i}from"../../core/deprecate.js";import s from"../../core/Logger.js";import{on as o,when as a,pausable as n}from"../../core/reactiveUtils.js";import{property as l,subclass as r}from"../../core/accessorSupport/decorators.js";let p=class extends t{constructor(e){super(e),this._viewpointHandle=null,this.group=null,e?.isDefaultViewModel||i(s.getLogger(this),"Expand","arcgis-expand",{version:"5.0"})}normalizeCtorArgs(e){const{isDefaultViewModel:t,...i}=e??{};return i}initialize(){this.addHandles(o(()=>this.view?.ui,"expand",e=>{const{target:t}=e;t&&t!==this&&t.expanded&&t.group&&t.group===this.group&&this._collapse()}))}destroy(){this._viewpointHandle=null,this.view=null}set autoCollapse(e){this._set("autoCollapse",e),this._watchViewpoint()}set expanded(e){const t=!!e;this._set("expanded",t);const i=this.view?.ui;i&&i.emit("expand",{target:this}),this._viewpointHandleChange(t)}get state(){return this.view?.ready?"ready":"disabled"}set view(e){this._get("view")!==e&&(this._set("view",e),e&&a(()=>e.ready,()=>{this.view===e&&this._watchViewpoint()},{once:!0,initial:!0}))}_viewpointHandleChange(e){this._viewpointHandle&&(e?a(()=>this.view?.stationary,()=>this._viewpointHandle?.resume(),{once:!0,initial:!0}):this._viewpointHandle.pause())}_watchViewpoint(){const e="viewpoint";this.removeHandles(e),this._viewpointHandle=null;const{autoCollapse:t,view:i}=this;if(!i||!t)return;const s=n(()=>"3d"===i.type?i.camera:i.viewpoint,()=>this._collapse());this.addHandles(s,e),this._viewpointHandle=s}_collapse(){this.expanded=!1}};e([l({value:!1})],p.prototype,"autoCollapse",null),e([l({value:!1})],p.prototype,"expanded",null),e([l()],p.prototype,"group",void 0),e([l({readOnly:!0})],p.prototype,"state",null),e([l({value:null})],p.prototype,"view",null),p=e([r("esri.widgets.Expand.ExpandViewModel")],p);const d=p;export{d as default};
package/widgets/Expand.js CHANGED
@@ -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{makeHandle as o}from"../core/handleUtils.js";import n from"../core/Logger.js";import{watch as s,initial as i}from"../core/reactiveUtils.js";import{property as l,subclass as r}from"../core/accessorSupport/decorators.js";import a from"./Widget.js";import d from"./Expand/ExpandViewModel.js";import{loadCalciteComponents as c}from"./support/componentsUtils.js";import{globalCss as p}from"./support/globalCss.js";import{messageBundle as h,tsx as u,isWidget as m,hasDomNode as g}from"./support/widget.js";const v="esri-expand",_={base:v,toggle:`${v}__toggle`,popoverContent:`${v}__popover-content`,panel:`${v}__panel`,panelContent:`${v}__panel-content`,sheet:`${v}__sheet`,contentContainer:`${v}__content-container`,icon:"esri-collapse__icon",iconFlip:"esri-collapse__icon-flip",iconNumber:`${v}__icon-number`},w="chevrons-left",y="chevrons-right",x=Symbol("scheduleRender-override-handle");let C=class extends a{constructor(e,o){super(e,o),this._boundScheduledRender=this.scheduleRender.bind(this),this.closeOnEsc=!0,this.collapseTooltip="",this.content="",this.expandTooltip="",this.focusTrapDisabled=!1,this.iconNumber=0,this.messages=null,this.messagesCommon=null,this.mode="auto",this.placement=null,this.viewModel=new d,this.toggle=()=>{this.viewModel.expanded=!this.viewModel.expanded},this._handlePopoverClose=e=>{e.target===this._popoverEl&&(this.viewModel.expanded=e.currentTarget.open)},this._handleSheetClose=e=>{this.viewModel.expanded=e.currentTarget.open},this._handlePanelClose=e=>{this.viewModel.expanded=!e.currentTarget.closed},this._handleKeyDown=e=>{this.viewModel.expanded&&"Escape"===e.key&&!this._willCloseOnEsc(e)&&e.preventDefault()},this._storeToggleActionEl=e=>{this._toggleActionEl=e},this._storePopoverEl=e=>{this._popoverEl=e},t(n.getLogger(this),"Expand","arcgis-expand",{version:"4.34"})}initialize(){this.addHandles(s(()=>this.viewModel?.view?.size,()=>this._popoverEl?.reposition(),i))}loadDependencies(){return c({action:()=>import("@esri/calcite-components/dist/components/calcite-action"),icon:()=>import("@esri/calcite-components/dist/components/calcite-icon"),panel:()=>import("@esri/calcite-components/dist/components/calcite-panel"),popover:()=>import("@esri/calcite-components/dist/components/calcite-popover"),sheet:()=>import("@esri/calcite-components/dist/components/calcite-sheet")})}get expandTitle(){const{expanded:e,messagesCommon:t,collapseTooltip:o,expandTooltip:n}=this;return(e?o||t?.collapse:n||t?.expand)??""}get _displaySheet(){switch(this.mode){case"drawer":return!0;case"auto":return"xsmall"===this.viewModel.view?.widthBreakpoint;default:return!1}}get autoCollapse(){return this.viewModel.autoCollapse}set autoCollapse(e){this.viewModel.autoCollapse=e}get collapseIcon(){return y}set collapseIcon(e){this._overrideIfSome("collapseIcon",e)}get expanded(){return this.viewModel.expanded}set expanded(e){this.viewModel.expanded=e}get expandIcon(){return"object"==typeof this.content&&"icon"in this.content&&this.content.icon?this.content.icon:w}set expandIcon(e){this._overrideIfSome("expandIcon",e)}get group(){return this.viewModel.group}set group(e){this.viewModel.group=e}get icon(){return null}get label(){return"object"==typeof this.content&&"label"in this.content&&this.content.label?this.content.label:this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}expand(){this.viewModel.expanded=!0}collapse(){this.viewModel.expanded=!1}render(){const{_displaySheet:e,_toggleActionEl:t,viewModel:{expanded:o},label:n,placement:s}=this;return u("div",{class:this.classes(_.base,p.widget)},this._renderToggle(),e?u("calcite-sheet",{class:_.sheet,heightScale:"l",label:n,onkeydown:this._handleKeyDown,open:o,position:"block-end",onCalciteSheetClose:this._handleSheetClose},u("calcite-panel",{class:_.panel,closable:!0,closed:!o,heading:n,onkeydown:this._handleKeyDown,onCalcitePanelClose:this._handlePanelClose},u("div",{class:_.panelContent},this._renderContent()))):t?u("calcite-popover",{afterCreate:this._storePopoverEl,afterUpdate:this._storePopoverEl,focusTrapDisabled:this.focusTrapDisabled,label:n,onkeydown:this._handleKeyDown,open:o,overlayPositioning:"fixed",placement:s??this._getPlacement(),referenceElement:t,onCalcitePopoverClose:this._handlePopoverClose},u("div",{class:_.popoverContent},this._renderContent())):null)}_getPlacement(){const{container:e,view:t}=this,o=e&&t?t.ui.getPosition(e):null;if(!o||"manual"===o)return"auto";const[n,s]=o.split("-");return`${"right"===s?"left":"right"}-${"bottom"===n?"end":"start"}`}_willCloseOnEsc(e){const{closeOnEsc:t}=this;return"function"==typeof t?t(e):t}_renderBadgeNumber(){const{expanded:e,iconNumber:t}=this;return t&&!e?u("span",{class:_.iconNumber,key:"expand__icon-number"},t):null}_renderToggleButton(){const{expanded:e,expandTitle:t,expandIcon:o,collapseIcon:n}=this,s=e?n:o,i=s===w||s===y;return u("calcite-action",{afterCreate:this._storeToggleActionEl,afterUpdate:this._storeToggleActionEl,class:p.widgetButton,onclick:this.toggle,scale:"s",text:t,title:t},s?u("calcite-icon",{class:this.classes(_.icon,i&&_.iconFlip),icon:s,scale:"s"}):null)}_renderToggle(){return u("div",{class:_.toggle},this._renderToggleButton(),this._renderBadgeNumber())}_renderContent(){const{content:e}=this;return"string"==typeof e?u("div",{class:_.contentContainer,innerHTML:e,key:"content__string"}):m(e)?u("div",{afterCreate:()=>{this._overwriteChildScheduleRender(e)},afterRemoved:()=>this.removeHandles(x),afterUpdate:()=>{e.scheduleRender!==this._boundScheduledRender&&(this.removeHandles(x),this._overwriteChildScheduleRender(e))},class:_.contentContainer,key:"content__widget"},e.render()):e instanceof HTMLElement?u("div",{afterCreate:this._attachToNode,bind:e,class:_.contentContainer,key:"content__html-element"}):g(e)?u("div",{afterCreate:this._attachToNode,bind:e.domNode,class:_.contentContainer,key:"content__node"}):null}_overwriteChildScheduleRender(e){const t=e.scheduleRender;e.scheduleRender=this._boundScheduledRender,this.addHandles(o(()=>e.scheduleRender=t),x)}_attachToNode(e){const t=this;e.appendChild(t)}};e([l({readOnly:!0})],C.prototype,"expandTitle",null),e([l()],C.prototype,"_toggleActionEl",void 0),e([l()],C.prototype,"_displaySheet",null),e([l()],C.prototype,"autoCollapse",null),e([l()],C.prototype,"closeOnEsc",void 0),e([l()],C.prototype,"collapseIcon",null),e([l()],C.prototype,"collapseTooltip",void 0),e([l()],C.prototype,"content",void 0),e([l()],C.prototype,"expanded",null),e([l()],C.prototype,"expandIcon",null),e([l()],C.prototype,"expandTooltip",void 0),e([l()],C.prototype,"focusTrapDisabled",void 0),e([l()],C.prototype,"group",null),e([l()],C.prototype,"icon",null),e([l()],C.prototype,"iconNumber",void 0),e([l()],C.prototype,"label",null),e([l(),h("esri/widgets/Expand/t9n/Expand")],C.prototype,"messages",void 0),e([l(),h("esri/t9n/common")],C.prototype,"messagesCommon",void 0),e([l()],C.prototype,"mode",void 0),e([l()],C.prototype,"placement",void 0),e([l()],C.prototype,"view",null),e([l({type:d})],C.prototype,"viewModel",void 0),C=e([r("esri.widgets.Expand")],C);const f=C;export{f as default};
5
+ import{__decorate as e}from"tslib";import{deprecateWidget as t}from"../core/deprecate.js";import{makeHandle as o}from"../core/handleUtils.js";import n from"../core/Logger.js";import{watch as i,initial as s}from"../core/reactiveUtils.js";import{property as l,subclass as r}from"../core/accessorSupport/decorators.js";import a from"./Widget.js";import d from"./Expand/ExpandViewModel.js";import{loadCalciteComponents as c}from"./support/componentsUtils.js";import{globalCss as p}from"./support/globalCss.js";import{messageBundle as h,tsx as u,isWidget as m,hasDomNode as g}from"./support/widget.js";const v="esri-expand",_={base:v,toggle:`${v}__toggle`,popoverContent:`${v}__popover-content`,panel:`${v}__panel`,panelContent:`${v}__panel-content`,sheet:`${v}__sheet`,contentContainer:`${v}__content-container`,icon:"esri-collapse__icon",iconFlip:"esri-collapse__icon-flip",iconNumber:`${v}__icon-number`},w="chevrons-left",y="chevrons-right",x=Symbol("scheduleRender-override-handle");let C=class extends a{constructor(e,o){super(e,o),this._boundScheduledRender=this.scheduleRender.bind(this),this.closeOnEsc=!0,this.collapseTooltip="",this.content="",this.expandTooltip="",this.focusTrapDisabled=!1,this.iconNumber=0,this.messages=null,this.messagesCommon=null,this.mode="auto",this.placement=null,this.viewModel=new d({isDefaultViewModel:!0}),this.toggle=()=>{this.viewModel.expanded=!this.viewModel.expanded},this._handlePopoverClose=e=>{e.target===this._popoverEl&&(this.viewModel.expanded=e.currentTarget.open)},this._handleSheetClose=e=>{this.viewModel.expanded=e.currentTarget.open},this._handlePanelClose=e=>{this.viewModel.expanded=!e.currentTarget.closed},this._handleKeyDown=e=>{this.viewModel.expanded&&"Escape"===e.key&&!this._willCloseOnEsc(e)&&e.preventDefault()},this._storeToggleActionEl=e=>{this._toggleActionEl=e},this._storePopoverEl=e=>{this._popoverEl=e},t(n.getLogger(this),"Expand","arcgis-expand",{version:"4.34"})}initialize(){this.addHandles(i(()=>this.viewModel?.view?.size,()=>this._popoverEl?.reposition(),s))}loadDependencies(){return c({action:()=>import("@esri/calcite-components/dist/components/calcite-action"),icon:()=>import("@esri/calcite-components/dist/components/calcite-icon"),panel:()=>import("@esri/calcite-components/dist/components/calcite-panel"),popover:()=>import("@esri/calcite-components/dist/components/calcite-popover"),sheet:()=>import("@esri/calcite-components/dist/components/calcite-sheet")})}get expandTitle(){const{expanded:e,messagesCommon:t,collapseTooltip:o,expandTooltip:n}=this;return(e?o||t?.collapse:n||t?.expand)??""}get _displaySheet(){switch(this.mode){case"drawer":return!0;case"auto":return"xsmall"===this.viewModel.view?.widthBreakpoint;default:return!1}}get autoCollapse(){return this.viewModel.autoCollapse}set autoCollapse(e){this.viewModel.autoCollapse=e}get collapseIcon(){return y}set collapseIcon(e){this._overrideIfSome("collapseIcon",e)}get expanded(){return this.viewModel.expanded}set expanded(e){this.viewModel.expanded=e}get expandIcon(){return"object"==typeof this.content&&"icon"in this.content&&this.content.icon?this.content.icon:w}set expandIcon(e){this._overrideIfSome("expandIcon",e)}get group(){return this.viewModel.group}set group(e){this.viewModel.group=e}get icon(){return null}get label(){return"object"==typeof this.content&&"label"in this.content&&this.content.label?this.content.label:this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}expand(){this.viewModel.expanded=!0}collapse(){this.viewModel.expanded=!1}render(){const{_displaySheet:e,_toggleActionEl:t,viewModel:{expanded:o},label:n,placement:i}=this;return u("div",{class:this.classes(_.base,p.widget)},this._renderToggle(),e?u("calcite-sheet",{class:_.sheet,heightScale:"l",label:n,onkeydown:this._handleKeyDown,open:o,position:"block-end",onCalciteSheetClose:this._handleSheetClose},u("calcite-panel",{class:_.panel,closable:!0,closed:!o,heading:n,onkeydown:this._handleKeyDown,onCalcitePanelClose:this._handlePanelClose},u("div",{class:_.panelContent},this._renderContent()))):t?u("calcite-popover",{afterCreate:this._storePopoverEl,afterUpdate:this._storePopoverEl,focusTrapDisabled:this.focusTrapDisabled,label:n,onkeydown:this._handleKeyDown,open:o,overlayPositioning:"fixed",placement:i??this._getPlacement(),referenceElement:t,onCalcitePopoverClose:this._handlePopoverClose},u("div",{class:_.popoverContent},this._renderContent())):null)}_getPlacement(){const{container:e,view:t}=this,o=e&&t?t.ui.getPosition(e):null;if(!o||"manual"===o)return"auto";const[n,i]=o.split("-");return`${"right"===i?"left":"right"}-${"bottom"===n?"end":"start"}`}_willCloseOnEsc(e){const{closeOnEsc:t}=this;return"function"==typeof t?t(e):t}_renderBadgeNumber(){const{expanded:e,iconNumber:t}=this;return t&&!e?u("span",{class:_.iconNumber,key:"expand__icon-number"},t):null}_renderToggleButton(){const{expanded:e,expandTitle:t,expandIcon:o,collapseIcon:n}=this,i=e?n:o,s=i===w||i===y;return u("calcite-action",{afterCreate:this._storeToggleActionEl,afterUpdate:this._storeToggleActionEl,class:p.widgetButton,onclick:this.toggle,text:t,title:t},i?u("calcite-icon",{class:this.classes(_.icon,s&&_.iconFlip),icon:i,scale:"s"}):null)}_renderToggle(){return u("div",{class:_.toggle},this._renderToggleButton(),this._renderBadgeNumber())}_renderContent(){const{content:e}=this;return"string"==typeof e?u("div",{class:_.contentContainer,innerHTML:e,key:"content__string"}):m(e)?u("div",{afterCreate:()=>{this._overwriteChildScheduleRender(e)},afterRemoved:()=>this.removeHandles(x),afterUpdate:()=>{e.scheduleRender!==this._boundScheduledRender&&(this.removeHandles(x),this._overwriteChildScheduleRender(e))},class:_.contentContainer,key:"content__widget"},e.render()):e instanceof HTMLElement?u("div",{afterCreate:this._attachToNode,bind:e,class:_.contentContainer,key:"content__html-element"}):g(e)?u("div",{afterCreate:this._attachToNode,bind:e.domNode,class:_.contentContainer,key:"content__node"}):null}_overwriteChildScheduleRender(e){const t=e.scheduleRender;e.scheduleRender=this._boundScheduledRender,this.addHandles(o(()=>e.scheduleRender=t),x)}_attachToNode(e){const t=this;e.appendChild(t)}};e([l({readOnly:!0})],C.prototype,"expandTitle",null),e([l()],C.prototype,"_toggleActionEl",void 0),e([l()],C.prototype,"_displaySheet",null),e([l()],C.prototype,"autoCollapse",null),e([l()],C.prototype,"closeOnEsc",void 0),e([l()],C.prototype,"collapseIcon",null),e([l()],C.prototype,"collapseTooltip",void 0),e([l()],C.prototype,"content",void 0),e([l()],C.prototype,"expanded",null),e([l()],C.prototype,"expandIcon",null),e([l()],C.prototype,"expandTooltip",void 0),e([l()],C.prototype,"focusTrapDisabled",void 0),e([l()],C.prototype,"group",null),e([l()],C.prototype,"icon",null),e([l()],C.prototype,"iconNumber",void 0),e([l()],C.prototype,"label",null),e([l(),h("esri/widgets/Expand/t9n/Expand")],C.prototype,"messages",void 0),e([l(),h("esri/t9n/common")],C.prototype,"messagesCommon",void 0),e([l()],C.prototype,"mode",void 0),e([l()],C.prototype,"placement",void 0),e([l()],C.prototype,"view",null),e([l({type:d})],C.prototype,"viewModel",void 0),C=e([r("esri.widgets.Expand")],C);const f=C;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{substitute as t}from"../../../intl.js";import{watch as i,on as r,initial as s}from"../../../core/reactiveUtils.js";import{stripHTML as l}from"../../../core/string.js";import{property as o,subclass as a}from"../../../core/accessorSupport/decorators.js";import{isSubtypeGroupLayer as n,isGroupLayer as d}from"../../../layers/support/layerUtils.js";import{defaultHighlightName as c,temporaryHighlightName as u}from"../../../views/support/HighlightDefaults.js";import p from"../../Widget.js";import h from"../UtilityNetworkAssociationAddAssociationViewModel.js";import{loadCalciteComponents as m}from"../../support/componentsUtils.js";import _ from"../../support/FilterBuilder.js";import{globalCss as v}from"../../support/globalCss.js";import{Heading as f}from"../../support/Heading.js";import g from"../../support/SelectionToolbar.js";import{tsx as y,messageBundle as b}from"../../support/widget.js";import F from"../../support/SelectionToolbar/VisibleElements.js";const w="esri-feature-form-utility-network-association-layers",C={base:w,header:`${w}__header`,headingContent:`${w}__heading-content`,featureObserver:`${w}__feature-observer`,filterContainer:`${w}__filter-container`,filterOptionsContainer:`${w}__filter-options-container`,filterOptionsHeader:`${w}__filter-options-header`,listContainer:`${w}__list-container`,spatialSelectContainer:`${w}__spatial-select-container`,spatialSelectToolbar:`${w}__spatial-select-toolbar`,stickySpinnerContainer:`${w}__sticky-loading-container`,loadingContainer:`${w}__loading-container`};let L=class extends p{constructor(e,t){super(e,t),this.headingLevel=5,this.messagesCommon=null,this.messagesEditor=null,this.messagesFeature=null,this.messagesFeatureForm=null,this.messagesFilterBuilder=null,this.viewModel=new h,this.view=null,this._filterBuilder=new _,this._featureFilterText="",this._layerFilterText="",this._observer=new IntersectionObserver(([e])=>{e?.isIntersecting&&this._increaseFeaturePage()},{root:window.document}),this._observerNode=null,this._selectionToolbar=new g({returnFeatureTitleFields:!0,layerViewPreferenceEnabled:!1,persistSelection:!1,visibleElements:new F({chip:!1,operationTypeControls:!1,pan:!1})}),this._onSelectionComplete=async e=>{const{highlightHelper:t}=this.viewModel;await this.viewModel.onSelectionComplete(e),t?.removeAll(),this._featureSpatialGraphics.length>0&&t?.add(this._featureSpatialGraphics)}}initialize(){this._setupSelectionToolbar(),this.addHandles([i(()=>this.viewModel,()=>this.reset()),i(()=>[this.viewModel.state,this._observerNode],()=>this._onObserverChange()),i(()=>this.selectedLayer,e=>{this._filterBuilder.layer=e,e||(this.filterOptionsVisible=!1,this._featureFilterText="")})])}loadDependencies(){return m({action:()=>import("@esri/calcite-components/dist/components/calcite-action"),button:()=>import("@esri/calcite-components/dist/components/calcite-button"),icon:()=>import("@esri/calcite-components/dist/components/calcite-icon"),input:()=>import("@esri/calcite-components/dist/components/calcite-input"),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")})}destroy(){this._filterBuilder.destroy(),this._selectionToolbar.destroy()}get filterOptionsVisible(){return this.viewModel.filterOptionsVisible}set filterOptionsVisible(e){this.viewModel.filterOptionsVisible=e}get isSelecting(){return"active"===this._selectionToolbar.state}get selectedLayer(){return this.viewModel.selectedLayer}set selectedLayer(e){this.viewModel.selectedLayer=e}get selectedFeature(){return this.viewModel.selectedFeature}set selectedFeature(e){this.viewModel.selectedFeature=e}get filterWhereClause(){return this.viewModel.filterWhereClause}set filterWhereClause(e){this.viewModel.filterWhereClause=e,e||this._filterBuilder.reset()}get _featureSpatialGraphics(){return this.viewModel.featureSpatialItems.toArray().map(e=>e.feature)}get _filteredFeatureItems(){const{_featureFilterText:e}=this,{featureItems:t,featureSpatialItems:i}=this.viewModel;return(i.length?i:t).map(e=>({label:e.label,graphic:e.feature,layer:e.feature.sourceLayer})).filter(t=>t.label?.toLowerCase().includes(e)??!1)}get _filteredFeatureItemsPage(){const{featurePage:e,featuresPerPage:t}=this.viewModel,i=e*t;return this._filteredFeatureItems.toArray().slice(0,i)}render(){return y("div",{class:this.classes(C.base,v.widget)},this._renderContent())}applyFilterOptions(){const{selectedLayer:e}=this;this.filterOptionsVisible=!1,e&&(this.filterWhereClause=this._filterBuilder.whereClause)}cancelSelection(){this._selectionToolbar.cancel()}reset(){this.filterWhereClause=null,this._featureFilterText="",this._layerFilterText="",this.filterOptionsVisible=!1,this._filterBuilder.reset()}startSelection(e){this._selectionToolbar.activateTool(e)}_setupSelectionToolbar(){this.addHandles([i(()=>this.view,e=>{this.viewModel.reset(),this._selectionToolbar.view="2d"===e?.type?e:null},s),i(()=>[this.viewModel,this.viewModel.layerItems.length,this.viewModel.map?.allLayers.map(e=>e.visible),this.viewModel.map?.allLayers?.filter(e=>n(e)).toArray().flatMap(e=>e.sublayers.toArray()).map(e=>e.visible)],()=>this._updateToolbarSources()),r(()=>this._selectionToolbar,"before-activate",e=>this.emit("before-selection",e)),r(()=>this._selectionToolbar,"complete",this._onSelectionComplete)])}_updateToolbarSources(){const e=this.viewModel.layerItems.toArray().filter(e=>{const{parent:t}=e;return!(t&&(d(t)||n(t))&&!t.visible)&&e.visible});this._selectionToolbar.sources=e}_onObserverChange(){this._observerNode&&this._observer.unobserve(this._observerNode);const{state:e}=this.viewModel;this._observerNode&&"ready"===e&&this._observer.observe(this._observerNode)}_increaseFeaturePage(){const{featureCount:e,featurePage:t,featureSpatialItems:i,state:r}=this.viewModel;e||i.length||1===t?"ready"===r&&this.viewModel.featurePage++:this.viewModel.featurePage=1}_renderContent(){const{state:e,filterOptionsVisible:t}=this.viewModel;return"loading"===e?this._renderLoading():t?this._renderFilterOptions():[this._renderSelectionToolbar(),this._renderListContent()]}_renderListContent(){return this._selectionToolbar.activeOperation?.processingFinalSelection?this._renderLoading():this.selectedLayer||this.viewModel.featureSpatialItems.length?this._renderFeatures():this._renderLayers()}_renderSelectionToolbar(){const{messagesCommon:e,_selectionToolbar:t}=this,{featureSpatialItems:i,selectedLayer:r}=this.viewModel;if(r||!t.sources?.length)return null;const s=y("div",{class:C.spatialSelectToolbar},t.render()),l=y("calcite-button",{appearance:"transparent",disabled:!i.length,label:e.clear,onclick:()=>this.viewModel.reset()},e.clear);return y("div",{class:C.spatialSelectContainer,key:"spatial-select-toolbar"},s,l)}_renderStickyLoading(){return"querying"===this.viewModel.state?y("div",{class:C.stickySpinnerContainer,key:"sticky-loader"},this._renderLoadingIcon()):null}_renderLoading(){return y("div",{class:C.loadingContainer,key:"loading-container"},this._renderLoadingIcon())}_renderLoadingIcon(){return y("calcite-loader",{inline:!0,label:this.messagesCommon.loading})}_renderFilterOptions(){return y("div",{class:C.filterOptionsContainer},y("div",{class:C.filterOptionsHeader},y("span",null,this.messagesFilterBuilder.widgetLabel),y("calcite-button",{appearance:"transparent",onclick:()=>this._filterBuilder.reset()},this.messagesCommon.clear)),this._filterBuilder.render())}_renderLayers(){const e=this.messagesFeatureForm.associations,t=e.availableLayers,i=e.filterLayers;return y("div",null,this._renderHeader({heading:t,placeholder:i,renderFilterOptions:!1,renderTotal:!1}),y("div",{class:C.listContainer},y("calcite-list",{label:e.associatedFeatures},this._renderLayerItems(),this._renderStickyLoading())))}_renderLayerItems(){const{_layerFilterText:e,viewModel:t,messagesCommon:i}=this,{layerItems:r,tableItems:s}=t;return r.concat(s).map(e=>({label:e.title??i.untitled,layer:e})).filter(t=>t.label?.toLowerCase().includes(e)??!1).toArray().map(e=>this._renderLayerItem(e))}_renderLayerItem(e){const{label:t,layer:i}=e;return y("calcite-list-item",{key:`layer-item-${i.id}`,label:l(t),onCalciteListItemSelect:()=>{this.selectedLayer=i,this._filterBuilder.reset()}},y("calcite-icon",{flipRtl:!0,icon:"chevron-right",scale:"s",slot:"content-end"}))}_renderFeatures(){const{selectedLayer:e,viewModel:t}=this,i=t.featureSpatialItems.length>0,r=this.messagesFeatureForm.associations,s=i?void 0:e?.title||this.messagesCommon.untitled,l=r.filterFeatures;return y("div",null,this._renderHeader({heading:s,placeholder:l,renderFilterOptions:!i,renderTotal:!0}),y("div",{class:C.listContainer},y("calcite-list",{label:r.associatedFeatures},this._renderFeatureItems(),this._renderStickyLoading(),this._renderFeatureObserver())))}_renderFeatureItems(){return this._filteredFeatureItemsPage.map(e=>this._renderFeatureItem(e))}_renderFeatureItem(e){const{viewModel:t}=this,{highlightHelper:i}=t,{label:r,graphic:s}=e,o=t.featureSpatialItems.length>0?()=>i?.update(s,c):void 0,a=t.featureSpatialItems.length>0?()=>i?.update(s,u):void 0;return y("calcite-list-item",{key:`feature-item-${s.uid}`,label:l(r),onmouseenter:o,onmouseleave:a,onCalciteListItemSelect:()=>{this.selectedFeature={feature:s,label:r}}},y("calcite-icon",{flipRtl:!0,icon:"chevron-right",scale:"s",slot:"content-end"}))}_onObserverCreate(e){this._observerNode=e}_renderFeatureObserver(){return y("div",{afterCreate:this._onObserverCreate,bind:this,class:C.featureObserver,key:"feature-observer"})}_renderHeader(e){return y("div",{class:C.header,key:"filter"},this._renderHeading(e.heading),this._renderFilter(e.placeholder,e.renderFilterOptions),e.renderTotal?this._renderTotal():null)}_renderHeading(e){return e?y(f,{key:"title",level:this.headingLevel},y("div",{class:C.headingContent},y("calcite-icon",{icon:"layer"}),e)):null}_renderFilter(e,t){const i=!this.selectedLayer&&!this.viewModel.featureSpatialItems.length,r=i?this._layerFilterText:this._featureFilterText;return y("div",{class:C.filterContainer,key:"filter"},y("calcite-input",{icon:"search",placeholder:e,type:"search",value:r,onCalciteInputInput:e=>{i?this._layerFilterText=e.currentTarget.value.trim().toLowerCase():this._featureFilterText=e.currentTarget.value.trim().toLowerCase()}},t?this._renderFilterOptionsAction():null))}_renderFilterOptionsAction(){const e=this.messagesFeatureForm.associations.filterOptions;return y("calcite-action",{appearance:"transparent",icon:"sliders",indicator:!!this._filterBuilder.whereClause,onclick:()=>{this.viewModel.filterOptionsVisible=!this.viewModel.filterOptionsVisible},scale:"s",slot:"action",text:e,title:e})}_renderTotal(){const{messagesFeature:e,viewModel:i}=this,{featureCount:r,featureSpatialItems:s}=i,l=t(e.numberRecords,{number:s.length?s.length:r});return y("div",{key:"total"},l)}};e([o()],L.prototype,"filterOptionsVisible",null),e([o()],L.prototype,"headingLevel",void 0),e([o()],L.prototype,"isSelecting",null),e([o(),b("esri/t9n/common")],L.prototype,"messagesCommon",void 0),e([o(),b("esri/widgets/Editor/t9n/Editor")],L.prototype,"messagesEditor",void 0),e([o(),b("esri/widgets/Feature/t9n/Feature")],L.prototype,"messagesFeature",void 0),e([o(),b("esri/widgets/FeatureForm/t9n/FeatureForm")],L.prototype,"messagesFeatureForm",void 0),e([o(),b("esri/widgets/support/FilterBuilder/t9n/FilterBuilder")],L.prototype,"messagesFilterBuilder",void 0),e([o()],L.prototype,"selectedLayer",null),e([o({type:h})],L.prototype,"viewModel",void 0),e([o()],L.prototype,"selectedFeature",null),e([o()],L.prototype,"filterWhereClause",null),e([o()],L.prototype,"view",void 0),e([o()],L.prototype,"_filterBuilder",void 0),e([o()],L.prototype,"_featureFilterText",void 0),e([o()],L.prototype,"_layerFilterText",void 0),e([o()],L.prototype,"_observer",void 0),e([o()],L.prototype,"_featureSpatialGraphics",null),e([o()],L.prototype,"_filteredFeatureItems",null),e([o()],L.prototype,"_filteredFeatureItemsPage",null),e([o()],L.prototype,"_observerNode",void 0),L=e([a("esri.widgets.FeatureForm.FeatureFormUtilityNetworkAssociations.UtilityNetworkAssociationItemList")],L);const T=L;export{T as default};
5
+ import{__decorate as e}from"tslib";import{substitute as t}from"../../../intl.js";import{watch as i,on as r,initial as s}from"../../../core/reactiveUtils.js";import{stripHTML as l}from"../../../core/string.js";import{property as o,subclass as a}from"../../../core/accessorSupport/decorators.js";import{isSubtypeGroupLayer as n,isGroupLayer as d}from"../../../layers/support/layerUtils.js";import{defaultHighlightName as c,temporaryHighlightName as u}from"../../../views/support/HighlightDefaults.js";import p from"../../Widget.js";import h from"../UtilityNetworkAssociationAddAssociationViewModel.js";import{loadCalciteComponents as m}from"../../support/componentsUtils.js";import _ from"../../support/FilterBuilder.js";import{globalCss as v}from"../../support/globalCss.js";import{Heading as f}from"../../support/Heading.js";import g from"../../support/SelectionToolbar.js";import{tsx as y,messageBundle as b}from"../../support/widget.js";import F from"../../support/SelectionToolbar/VisibleElements.js";const w="esri-feature-form-utility-network-association-layers",C={base:w,header:`${w}__header`,headingContent:`${w}__heading-content`,featureObserver:`${w}__feature-observer`,filterContainer:`${w}__filter-container`,filterOptionsContainer:`${w}__filter-options-container`,filterOptionsHeader:`${w}__filter-options-header`,listContainer:`${w}__list-container`,spatialSelectContainer:`${w}__spatial-select-container`,spatialSelectToolbar:`${w}__spatial-select-toolbar`,stickySpinnerContainer:`${w}__sticky-loading-container`,loadingContainer:`${w}__loading-container`};let L=class extends p{constructor(e,t){super(e,t),this.headingLevel=5,this.messagesCommon=null,this.messagesEditor=null,this.messagesFeature=null,this.messagesFeatureForm=null,this.messagesFilterBuilder=null,this.viewModel=new h,this.view=null,this._filterBuilder=new _,this._featureFilterText="",this._layerFilterText="",this._observer=new IntersectionObserver(([e])=>{e?.isIntersecting&&this._increaseFeaturePage()},{root:window.document}),this._observerNode=null,this._selectionToolbar=new g({returnFeatureTitleFields:!0,layerViewPreferenceEnabled:!1,persistSelection:!1,visibleElements:new F({chip:!1,operationTypeControls:!1,pan:!1})}),this._onSelectionComplete=async e=>{const{highlightHelper:t}=this.viewModel;await this.viewModel.onSelectionComplete(e),t?.removeAll(),this._featureSpatialGraphics.length>0&&t?.add(this._featureSpatialGraphics)}}initialize(){this._setupSelectionToolbar(),this.addHandles([i(()=>this.viewModel,()=>this.reset()),i(()=>[this.viewModel.state,this._observerNode],()=>this._onObserverChange()),i(()=>this.selectedLayer,e=>{this._filterBuilder.layer=e,e||(this.filterOptionsVisible=!1,this._featureFilterText="")})])}loadDependencies(){return m({action:()=>import("@esri/calcite-components/dist/components/calcite-action"),button:()=>import("@esri/calcite-components/dist/components/calcite-button"),icon:()=>import("@esri/calcite-components/dist/components/calcite-icon"),input:()=>import("@esri/calcite-components/dist/components/calcite-input"),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")})}destroy(){this._filterBuilder.destroy(),this._selectionToolbar.destroy()}get filterOptionsVisible(){return this.viewModel.filterOptionsVisible}set filterOptionsVisible(e){this.viewModel.filterOptionsVisible=e}get isSelecting(){return"active"===this._selectionToolbar.state}get selectedLayer(){return this.viewModel.selectedLayer}set selectedLayer(e){this.viewModel.selectedLayer=e}get selectedFeature(){return this.viewModel.selectedFeature}set selectedFeature(e){this.viewModel.selectedFeature=e}get filterWhereClause(){return this.viewModel.filterWhereClause}set filterWhereClause(e){this.viewModel.filterWhereClause=e,e||this._filterBuilder.reset()}get _featureSpatialGraphics(){return this.viewModel.featureSpatialItems.toArray().map(e=>e.feature)}get _filteredFeatureItems(){const{_featureFilterText:e}=this,{featureItems:t,featureSpatialItems:i}=this.viewModel;return(i.length?i:t).map(e=>({label:e.label,graphic:e.feature,layer:e.feature.sourceLayer})).filter(t=>t.label?.toLowerCase().includes(e)??!1)}get _filteredFeatureItemsPage(){const{featurePage:e,featuresPerPage:t}=this.viewModel,i=e*t;return this._filteredFeatureItems.toArray().slice(0,i)}render(){return y("div",{class:this.classes(C.base,v.widget)},this._renderContent())}applyFilterOptions(){const{selectedLayer:e}=this;this.filterOptionsVisible=!1,e&&(this.filterWhereClause=this._filterBuilder.whereClause)}cancelSelection(){this._selectionToolbar.cancel()}reset(){this.filterWhereClause=null,this._featureFilterText="",this._layerFilterText="",this.filterOptionsVisible=!1,this._filterBuilder.reset()}startSelection(e){this._selectionToolbar.activateTool(e)}_setupSelectionToolbar(){this.addHandles([i(()=>this.view,e=>{this.viewModel.reset(),this._selectionToolbar.view="2d"===e?.type?e:null},s),i(()=>[this.viewModel,this.viewModel.layerItems.length,this.viewModel.map?.allLayers.map(e=>e.visible),this.viewModel.map?.allLayers?.filter(e=>n(e)).toArray().flatMap(e=>e.sublayers.toArray()).map(e=>e.visible)],()=>this._updateToolbarSources()),r(()=>this._selectionToolbar,"before-activate",e=>this.emit("before-selection",e)),r(()=>this._selectionToolbar,"complete",this._onSelectionComplete)])}_updateToolbarSources(){const e=this.viewModel.layerItems.toArray().filter(e=>{const{parent:t}=e;return!(t&&(d(t)||n(t))&&!t.visible)&&e.visible});this._selectionToolbar.sources=e}_onObserverChange(){this._observerNode&&this._observer.unobserve(this._observerNode);const{state:e}=this.viewModel;this._observerNode&&"ready"===e&&this._observer.observe(this._observerNode)}_increaseFeaturePage(){const{featureCount:e,featurePage:t,featureSpatialItems:i,state:r}=this.viewModel;e||i.length||1===t?"ready"===r&&this.viewModel.featurePage++:this.viewModel.featurePage=1}_renderContent(){const{state:e,filterOptionsVisible:t}=this.viewModel;return"loading"===e?this._renderLoading():t?this._renderFilterOptions():[this._renderSelectionToolbar(),this._renderListContent()]}_renderListContent(){return this._selectionToolbar.activeOperation?.processingFinalSelection?this._renderLoading():this.selectedLayer||this.viewModel.featureSpatialItems.length?this._renderFeatures():this._renderLayers()}_renderSelectionToolbar(){const{messagesCommon:e,_selectionToolbar:t}=this,{featureSpatialItems:i,selectedLayer:r}=this.viewModel;if(r||!t.sources?.length)return null;const s=y("div",{class:C.spatialSelectToolbar},t.render()),l=y("calcite-button",{appearance:"transparent",disabled:!i.length,label:e.clear,onclick:()=>this.viewModel.reset()},e.clear);return y("div",{class:C.spatialSelectContainer,key:"spatial-select-toolbar"},s,l)}_renderStickyLoading(){return"querying"===this.viewModel.state?y("div",{class:C.stickySpinnerContainer,key:"sticky-loader"},this._renderLoadingIcon()):null}_renderLoading(){return y("div",{class:C.loadingContainer,key:"loading-container"},this._renderLoadingIcon())}_renderLoadingIcon(){return y("calcite-loader",{inline:!0,label:this.messagesCommon.loading})}_renderFilterOptions(){return y("div",{class:C.filterOptionsContainer},y("div",{class:C.filterOptionsHeader},y("span",null,this.messagesFilterBuilder.widgetLabel),y("calcite-button",{appearance:"transparent",onclick:()=>this._filterBuilder.reset()},this.messagesCommon.clear)),this._filterBuilder.render())}_renderLayers(){const e=this.messagesFeatureForm.associations,t=e.availableLayers,i=e.filterLayers;return y("div",null,this._renderHeader({heading:t,placeholder:i,renderFilterOptions:!1,renderTotal:!1}),y("div",{class:C.listContainer},y("calcite-list",{label:e.associatedFeatures},this._renderLayerItems(),this._renderStickyLoading())))}_renderLayerItems(){const{_layerFilterText:e,viewModel:t,messagesCommon:i}=this,{layerItems:r,tableItems:s}=t;return r.concat(s).map(e=>({label:e.title??i.untitled,layer:e})).filter(t=>t.label?.toLowerCase().includes(e)??!1).toArray().map(e=>this._renderLayerItem(e))}_renderLayerItem(e){const{label:t,layer:i}=e;return y("calcite-list-item",{key:`layer-item-${i.id}`,label:l(t),onCalciteListItemSelect:()=>{this.selectedLayer=i,this._filterBuilder.reset()}},y("calcite-icon",{flipRtl:!0,icon:"chevron-right",scale:"s",slot:"content-end"}))}_renderFeatures(){const{selectedLayer:e,viewModel:t}=this,i=t.featureSpatialItems.length>0,r=this.messagesFeatureForm.associations,s=i?void 0:e?.title||this.messagesCommon.untitled,l=r.filterFeatures;return y("div",null,this._renderHeader({heading:s,placeholder:l,renderFilterOptions:!i,renderTotal:!0}),y("div",{class:C.listContainer},y("calcite-list",{label:r.associatedFeatures},this._renderFeatureItems(),this._renderStickyLoading(),this._renderFeatureObserver())))}_renderFeatureItems(){return this._filteredFeatureItemsPage.map(e=>this._renderFeatureItem(e))}_renderFeatureItem(e){const{viewModel:t}=this,{highlightHelper:i}=t,{label:r,graphic:s}=e,o=t.featureSpatialItems.length>0?()=>i?.update(s,c):void 0,a=t.featureSpatialItems.length>0?()=>i?.update(s,u):void 0;return y("calcite-list-item",{key:`feature-item-${s.uid}`,label:l(r),onmouseenter:o,onmouseleave:a,onCalciteListItemSelect:()=>{this.selectedFeature={feature:s,label:r}}},y("calcite-icon",{flipRtl:!0,icon:"chevron-right",scale:"s",slot:"content-end"}))}_onObserverCreate(e){this._observerNode=e}_renderFeatureObserver(){return y("div",{afterCreate:this._onObserverCreate,bind:this,class:C.featureObserver,key:"feature-observer"})}_renderHeader(e){return y("div",{class:C.header,key:"filter"},this._renderHeading(e.heading),this._renderFilter(e.placeholder,e.renderFilterOptions),e.renderTotal?this._renderTotal():null)}_renderHeading(e){return e?y(f,{key:"title",level:this.headingLevel},y("div",{class:C.headingContent},y("calcite-icon",{icon:"layer"}),e)):null}_renderFilter(e,t){const i=!this.selectedLayer&&!this.viewModel.featureSpatialItems.length,r=i?this._layerFilterText:this._featureFilterText;return y("div",{class:C.filterContainer,key:"filter"},y("calcite-input",{icon:"search",placeholder:e,type:"search",value:r,onCalciteInputInput:e=>{i?this._layerFilterText=e.currentTarget.value.trim().toLowerCase():this._featureFilterText=e.currentTarget.value.trim().toLowerCase()}},t?this._renderFilterOptionsAction():null))}_renderFilterOptionsAction(){const e=this.messagesFeatureForm.associations.filterOptions;return y("calcite-action",{icon:"sliders",indicator:!!this._filterBuilder.whereClause,onclick:()=>{this.viewModel.filterOptionsVisible=!this.viewModel.filterOptionsVisible},slot:"action",text:e,title:e})}_renderTotal(){const{messagesFeature:e,viewModel:i}=this,{featureCount:r,featureSpatialItems:s}=i,l=t(e.numberRecords,{number:s.length?s.length:r});return y("div",{key:"total"},l)}};e([o()],L.prototype,"filterOptionsVisible",null),e([o()],L.prototype,"headingLevel",void 0),e([o()],L.prototype,"isSelecting",null),e([o(),b("esri/t9n/common")],L.prototype,"messagesCommon",void 0),e([o(),b("esri/widgets/Editor/t9n/Editor")],L.prototype,"messagesEditor",void 0),e([o(),b("esri/widgets/Feature/t9n/Feature")],L.prototype,"messagesFeature",void 0),e([o(),b("esri/widgets/FeatureForm/t9n/FeatureForm")],L.prototype,"messagesFeatureForm",void 0),e([o(),b("esri/widgets/support/FilterBuilder/t9n/FilterBuilder")],L.prototype,"messagesFilterBuilder",void 0),e([o()],L.prototype,"selectedLayer",null),e([o({type:h})],L.prototype,"viewModel",void 0),e([o()],L.prototype,"selectedFeature",null),e([o()],L.prototype,"filterWhereClause",null),e([o()],L.prototype,"view",void 0),e([o()],L.prototype,"_filterBuilder",void 0),e([o()],L.prototype,"_featureFilterText",void 0),e([o()],L.prototype,"_layerFilterText",void 0),e([o()],L.prototype,"_observer",void 0),e([o()],L.prototype,"_featureSpatialGraphics",null),e([o()],L.prototype,"_filteredFeatureItems",null),e([o()],L.prototype,"_filteredFeatureItemsPage",null),e([o()],L.prototype,"_observerNode",void 0),L=e([a("esri.widgets.FeatureForm.FeatureFormUtilityNetworkAssociations.UtilityNetworkAssociationItemList")],L);const T=L;export{T 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,formatNumber as i}from"../intl.js";import{isSome as o}from"../core/arrayUtils.js";import"../core/has.js";import s from"../core/Logger.js";import{createResolver as n}from"../core/promiseUtils.js";import a from"../core/ReactiveMap.js";import{watch as r,whenOnce as l,initial as d}from"../core/reactiveUtils.js";import{property as c,subclass as u}from"../core/accessorSupport/decorators.js";import{isIntegerField as p}from"../layers/support/fieldUtils.js";import{isSubtypeGroupLayer as m,getSubtypesFromLayer as h}from"../layers/support/layerUtils.js";import{isString as v}from"../support/guards.js";import _ from"./Widget.js";import{Prompt as g}from"./Editor/components/Prompt.js";import{isRelatableFeatureSupportedLayer as b}from"./Feature/support/featureUtils.js";import{css as f}from"./FeatureForm/css.js";import{isUtilityNetworkAssociationInput as y,isGroupInput as C,isFieldInput as F,isRelationshipInput as w,isTextElementInput as R,flattenInputs as k,isInputInGroupInput as I,isFieldElementWithInputType as O,getErrorMessageForFieldInput as N,getIconForFeature as M,isNumberFieldInput as L,isInputInThisGroupInput as T,subtypeChangeShouldPrompt as A}from"./FeatureForm/featureFormUtils.js";import x from"./FeatureForm/FeatureFormViewModel.js";import D from"./FeatureForm/VisibleElements.js";import{loadCalciteComponents as V}from"./support/componentsUtils.js";import{getLabelForDateFieldValue as S,getIntlOptionsForField as U,numberingSystem as E,prepareISOFieldValueForDateComponents as $,prepareUnixFieldValueForDateComponents as j,normalizeTimeOnlyString as P,getISOFieldValueFromDateComponents as G,getUnixFieldValueFromDateComponents as H}from"./support/dateUtils.js";import{globalCss as W}from"./support/globalCss.js";import{Heading as Z,incrementHeadingLevel as B}from"./support/Heading.js";import{messageBundle as K,vmEvent as q,tsx as z}from"./support/widget.js";import{setFocus as J}from"./support/widgetUtils.js";const Q="data-field-name";let X=class extends _{constructor(e,t){super(e,t),this._associationsWidgetsMap=new a,this._attemptFocusOnNextRender=!1,this._dateComponentMap=new Map,this._inputsWithChanges=new Set,this._focusedFieldName=null,this._pendingSubtypeChoice=null,this._listObserverNode=null,this._listObserver=new IntersectionObserver(e=>{e.length&&e[0].isIntersecting&&this._incrementRelatedRecordPage()},{root:window.document}),this._prompt=null,this._featureFormUNAssociationList=null,this.groupDisplay="all",this.headingLevel=2,this.messages=null,this.messagesCommon=null,this.messagesFeature=null,this.messagesTemplates=null,this.viewModel=new x,this.visibleElements=new D,this._onShowAllRelatedRecordsClick=e=>{const{feature:t,callbacks:i}=this;t&&i?.showAllRelatedRecords&&i.showAllRelatedRecords({parentFeature:t,relationshipId:e})},this._onAddRelatedRecordsClick=(e,t,i)=>{const{feature:o,callbacks:s}=this;let n=i;if(o&&s?.addRelatedRecord){if(m(i)&&e.activeCategory){const t=e.activeCategory.value,o=i.findSublayerForSubtypeCode(t);o&&b(o)&&(n=o)}s.addRelatedRecord({parentFeature:o,relatedLayer:n,relationshipId:t})}},this._onFormKeyDown=this._onFormKeyDown.bind(this),this._onFormSubmit=this._onFormSubmit.bind(this),this._onGroupToggle=this._onGroupToggle.bind(this),this._onComponentBlur=this._onComponentBlur.bind(this),this._onComponentFocus=this._onComponentFocus.bind(this),this._onComponentKeyDown=this._onComponentKeyDown.bind(this),this._afterComponentCreate=this._afterComponentCreate.bind(this),this._afterComponentCreateOrUpdate=this._afterComponentCreateOrUpdate.bind(this),this._afterDateComponentCreate=this._afterDateComponentCreate.bind(this),this._afterDateComponentCreateOrUpdate=this._afterDateComponentCreateOrUpdate.bind(this),this._afterRadioGroupCreateOrUpdate=this._afterRadioGroupCreateOrUpdate.bind(this),this._afterGroupCreate=this._afterGroupCreate.bind(this)}initialize(){this.addHandles([r(()=>this.feature,()=>{this._inputsWithChanges.clear(),this._dateComponentMap.clear(),l(()=>!this.viewModel.updating).then(()=>{const e=this._getFocusableInput("forward");this._syncGroupInputStates(),this._focusedFieldName=e?.name||null,this._attemptFocusOnNextRender=!0})}),r(()=>[this._featureFormUNAssociationList,this.visibleElements.associationDetails],([e,t])=>{e&&(e.visibleElements.associationDetails=t)},d),r(()=>this.groupDisplay,()=>this._syncGroupInputStates()),this.on("submit",e=>{if(e.invalid.length>0){const[t]=e.invalid;e.invalid.forEach(e=>this._inputsWithChanges.add(e)),this._focusedFieldName=t,this._attemptFocusOnNextRender=!0,this.scheduleRender()}}),r(()=>[this.viewModel.activeRelationshipInput,this._listObserverNode],()=>this._onObserverChange()),r(()=>this.viewModel.activeAssociationInput,e=>{e&&this._featureFormUNAssociationList&&(this._featureFormUNAssociationList.associationInput=e,this._featureFormUNAssociationList.viewModel=e.viewModel)}),r(()=>this.viewModel.inputs.filter(y),async e=>{this._featureFormUNAssociationList||await this._setUpUtilityNetworkAssociationList();for(const t of e)this._associationsWidgetsMap.has(t)||this._associationsWidgetsMap.set(t,await this._makeAssociationsWidget(t))})])}loadDependencies(){return V({block:()=>import("@esri/calcite-components/dist/components/calcite-block"),button:()=>import("@esri/calcite-components/dist/components/calcite-button"),chip:()=>import("@esri/calcite-components/dist/components/calcite-chip"),combobox:()=>import("@esri/calcite-components/dist/components/calcite-combobox"),"combobox-item":()=>import("@esri/calcite-components/dist/components/calcite-combobox-item"),"combobox-item-group":()=>import("@esri/calcite-components/dist/components/calcite-combobox-item-group"),icon:()=>import("@esri/calcite-components/dist/components/calcite-icon"),input:()=>import("@esri/calcite-components/dist/components/calcite-input"),"input-date-picker":()=>import("@esri/calcite-components/dist/components/calcite-input-date-picker"),"input-message":()=>import("@esri/calcite-components/dist/components/calcite-input-message"),"input-number":()=>import("@esri/calcite-components/dist/components/calcite-input-number"),"input-time-picker":()=>import("@esri/calcite-components/dist/components/calcite-input-time-picker"),"input-time-zone":()=>import("@esri/calcite-components/dist/components/calcite-input-time-zone"),label:()=>import("@esri/calcite-components/dist/components/calcite-label"),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"),"radio-button":()=>import("@esri/calcite-components/dist/components/calcite-radio-button"),"radio-button-group":()=>import("@esri/calcite-components/dist/components/calcite-radio-button-group"),switch:()=>import("@esri/calcite-components/dist/components/calcite-switch"),"text-area":()=>import("@esri/calcite-components/dist/components/calcite-text-area")})}destroy(){this._listObserverNode&&this._listObserver.unobserve(this._listObserverNode)}get _relatedRecordsEnabled(){const{callbacks:e}=this;return!(!e||!(e.addRelatedRecord||e.editRelatedRecord||e.showAllRelatedRecords))}get _utilityNetworkAssociationsEnabled(){const{callbacks:e}=this;return!(!e?.viewAssociatedLayers||!e.viewAssociatedFeatures)}get _subtypes(){return h(this.layer)}get associationId(){return this.viewModel.associationId}set associationId(e){this.viewModel.associationId=e}get associatedLayer(){return this.viewModel.associatedLayer}set associatedLayer(e){this.viewModel.associatedLayer=e}get disabled(){return this.viewModel.disabled}set disabled(e){this.viewModel.disabled=e}get feature(){return this.viewModel.feature}set feature(e){this.viewModel.feature=e}get formTemplate(){return this.viewModel.formTemplate}set formTemplate(e){this.viewModel.formTemplate=e}get icon(){return"form-field"}set icon(e){this._overrideIfSome("icon",e)}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get layer(){return this.viewModel.layer}set layer(e){this.viewModel.layer=e}get map(){return this.viewModel.map}set map(e){this.viewModel.map=e}get callbacks(){return this.viewModel.callbacks}set callbacks(e){this.viewModel.callbacks=e}get relationshipId(){return this.viewModel.relationshipId}set relationshipId(e){this.viewModel.relationshipId=e}get spatialReference(){return this.viewModel.spatialReference}set spatialReference(e){this.viewModel.spatialReference=e}get strict(){return this.viewModel.strict}set strict(e){this.viewModel.strict=e}get timeZone(){return this.viewModel.timeZone}set timeZone(e){this.viewModel.timeZone=e}get showPrompt(){return e=>{this._prompt?.cancel?.(),this._prompt=e}}set showPrompt(e){this._overrideIfSome("showPrompt",e)}get clearPrompt(){return()=>this._prompt=null}set clearPrompt(e){this._overrideIfSome("clearPrompt",e)}getValues(){return this.viewModel.getValues()}submit(){return this.viewModel.submit()}render(){const{state:e}=this.viewModel;return z("div",{class:this.classes(f.base,W.widget,W.panel)},"ready"===e?this._renderForm():null)}_renderForm(){return z("div",null,z("form",{class:f.form,inert:!!this._prompt,novalidate:!0,onkeydown:this._onFormKeyDown,onsubmit:this._onFormSubmit},this._renderReadOnlyNotice(),this._renderHeader(),this._renderContent()),this._prompt?z(g,{...this._prompt,headingLevel:this.headingLevel}):void 0)}_renderReadOnlyNotice(){const{disabled:e,messages:t}=this;if(e&&this.visibleElements.readOnlyNotice)return z("calcite-notice",{class:f.disabledNotice,icon:"read-only-non-editable",kind:"brand",open:!0,scale:"s",width:"full"},z("div",{slot:"message"},t.disabledForm))}_renderHeader(){const e=this.viewModel,{formTitle:t,formDescription:i}=e;if(!e.formHeaderVisible)return;const o=null!=t&&z(Z,{key:"title",level:this.headingLevel},t),s=null!=i&&z("p",{class:f.description,key:"description"},i);return z("div",{class:f.formHeader},o,s)}_renderContent(){const{viewModel:e}=this;return e.activeRelationshipInput?this._renderRelationshipInput(e.activeRelationshipInput):e.activeAssociationInput?this._renderFeatureFormUtilityNetworkAssociationList():e.inputs.filter(o).filter(e=>e.visible).map(e=>this._renderInput(e))}_renderInput(e){return C(e)?this._renderGroup(e):F(e)?this._renderLabeledField(e):w(e)?this._renderRelationshipInput(e):R(e)?this._renderTextElementInput(e):y(e)?this._renderUtilityNetworkAssociationsElementInput(e):void 0}_renderFeatureFormUtilityNetworkAssociationList(){return this._featureFormUNAssociationList?.render()}_selectAssociatedLayer(e){const{feature:t,callbacks:i}=this;t&&i?.viewAssociatedFeatures&&i.viewAssociatedFeatures({associatedLayer:e.layer})}async _selectAssociatedFeature(e){const{feature:t,callbacks:i}=this;t&&i?.selectAssociatedFeature&&await i.selectAssociatedFeature({parentFeature:t,...e})}_onAddAssociation(e){const{feature:t,callbacks:i}=this;t&&i?.addAssociation&&i.addAssociation(e)}async _setUpUtilityNetworkAssociationList(){if(!this._featureFormUNAssociationList){const e=(await import("./FeatureForm/FeatureFormUtilityNetworkAssociations/FeatureFormUtilityNetworkAssociationList.js")).default;this._featureFormUNAssociationList=new e({onSelectLayer:this._selectAssociatedLayer.bind(this),onSelectFeature:this._selectAssociatedFeature.bind(this),onAddAssociation:this._onAddAssociation.bind(this)})}}async _makeAssociationsWidget(e){return new(0,(await import("./Feature/FeatureUtilityNetworkAssociations.js")).default)({onSelectAssociationType:({viewModel:t,listType:i})=>{t.activeAssociationType=i;const{feature:o,callbacks:s}=this;o&&s?.viewAssociatedLayers&&s.viewAssociatedLayers({associationId:e.uid})},viewModel:e.associationsViewModel})}_renderUtilityNetworkAssociationsElementInput(e){if(this._utilityNetworkAssociationsEnabled)return this._associationsWidgetsMap.get(e)?.render()}_renderDescriptionOrEmpty(e,t){return null==e?null:z("div",{class:this.classes(f.description),id:t},e)}_renderGroup(e){const{formTemplate:t,headingLevel:i}=this,{description:o,id:s,inputs:n,label:a,open:r}=e,l=n.filter(e=>e.visible),d=this.viewModel.findField(this._focusedFieldName),c=d?.group===e,u="sequential"===this.groupDisplay;return z("calcite-block",{afterCreate:this._afterGroupCreate,class:this.classes(f.group,u?f.groupSequential:null,c?f.groupActive:null),collapsible:!0,"data-group":e,description:o||void 0,expanded:r,heading:a??"",headingLevel:t?.title?B(i):i,id:s,key:s,onCalciteBlockToggle:({currentTarget:t})=>this._onGroupToggle(t,e)},l.map(e=>this._renderInput(e)))}_getFocusableInput(e,t){const i=k(this.viewModel.inputs);let o;if("backward"===e&&i.reverse(),t)if(C(t)){const e=t.inputs.find(e=>e.visible);o=e?i.indexOf(e):0}else{let s;if(I(t)&&!t.group.open){const i=t.group.inputs.filter(F);s="forward"===e?i[i.length-1]:i[0]}else s=t;o=i.indexOf(s)+1}else o=0;for(let s=o;s<i.length;s++){const e=i[s];if(e.visible&&F(e)){if(this.disabled&&e.inputType&&("switch"===e.inputType||"radio-buttons"===e.inputType))continue;return e}}return null}_renderLabeledField(e){const{dataType:i,feature:o,label:s,layer:n,required:a}=e,r={"aria-label":a?t(this.messages.requiredFieldLabel,{name:s}):s,class:f.label,key:`${n.id}-${o.uid}-${e.name}`},l=[z("div",{class:f.labelTextContent,key:"labelTextContainer"},s,a?z("span",{"aria-hidden":"true",title:this.messagesCommon.required},"*"):void 0),"unsupported"!==i?this._renderFieldInput(e):this._renderReadOnlyComponent(e),this._renderAuxiliaryText(e)];return"date"===i&&"coded-value"!==e.domain?.type?z("label",{...r},l):z("calcite-label",{...r},l)}_renderFieldInput(e){const{dataType:t,domain:i,inputType:o,name:s}=e,n=this.getCommonInputProps(e);if("coded-value"===i?.type){const t=this.viewModel.getFieldValueOptionsForField(s,this.messages.empty);return"switch"!==o||e.hasInvalidSwitchValue?"radio-buttons"===o?this._renderRadioButtonComponents(e,t.flat(),n):this._renderComboBoxComponent(e,t,n):this._renderSwitchComponent(e,n)}return"datetime-picker"===o||"date"===t?this._renderDateComponents(e,n):"number"===t?this._renderNumberComponent(e,n):this._renderStringComponent(e,n)}_renderStringComponent(e,t){return"text-area"===e.inputType?t.readOnly?z("calcite-input",{...t,loading:e.updating,type:"textarea",onCalciteInputInput:e=>this._saveValueFromComponent(e.currentTarget)}):z("calcite-text-area",{...t,resize:"vertical",onCalciteTextAreaInput:e=>this._saveValueFromComponent(e.currentTarget)}):z("calcite-input",{...t,loading:e.updating,type:"text",onCalciteInputInput:e=>this._saveValueFromComponent(e.currentTarget)})}_renderNumberComponent(e,t){const i=p(e.field),o=i&&""!==t.value?Math.round(parseFloat(t.value)).toString():t.value;return z("calcite-input-number",{...t,integer:i,loading:e.updating,type:"number",value:o,onCalciteInputNumberInput:e=>this._saveValueFromComponent(e.currentTarget)})}_renderDateComponents(e,t){const{field:i}=e;switch(i.type){case"date":return this._renderDateFieldComponents(e,t);case"date-only":return this._renderDateOnlyFieldComponent(e,t);case"time-only":return this._renderTimeOnlyFieldComponent(e,t);case"timestamp-offset":return this._renderTimestampOffsetFieldComponents(e,t);default:return this._renderReadOnlyComponent(e,S(i,t.value,{timeZone:this.timeZone,...U(i)}))}}_renderDateOnlyFieldComponent(e,t){const{range:i,valid:o,value:s}=e,{class:n,key:a,readOnly:r}=t,{rawMax:l,rawMin:d}=i;return z("calcite-input-date-picker",{afterCreate:this._afterDateComponentCreate,afterUpdate:this._afterDateComponentCreateOrUpdate,"aria-invalid":!o,class:n,"data-date-part":"date","data-field-name":t[Q],key:`${a}-date-input`,max:v(l)?l:void 0,min:v(d)?d:void 0,numberingSystem:E,onblur:e=>{this._focusedFieldName=null,this._saveValueFromDateComponent(e.target)},onfocus:this._onComponentFocus,overlayPositioning:"fixed",readOnly:r,value:null!=s?`${s}`:void 0,onCalciteInputDatePickerChange:e=>this._saveValueFromDateComponent(e.currentTarget)})}_renderTimeOnlyFieldComponent(e,t){const{valid:i,value:o}=e,{class:s,key:n,readOnly:a}=t;return z("calcite-input-time-picker",{afterCreate:this._afterDateComponentCreate,afterUpdate:this._afterDateComponentCreateOrUpdate,"aria-invalid":!i,class:s,"data-date-part":"time","data-field-name":t[Q],key:`${n}-time-input`,numberingSystem:E,onblur:e=>{this._focusedFieldName=null,this._saveValueFromDateComponent(e.target)},onfocus:this._onComponentFocus,overlayPositioning:"fixed",readOnly:a,step:e.timeStep,value:null!=o?`${o}`:void 0,onCalciteInputTimePickerChange:e=>this._saveValueFromDateComponent(e.currentTarget)})}_renderTimestampOffsetFieldComponents(e,t){const{name:i,range:o,timeZone:s,valid:n,value:a}=e,{class:r,key:l,readOnly:d}=t,{rawMax:c,rawMin:u}=o,p={afterCreate:this._afterDateComponentCreate,afterUpdate:this._afterDateComponentCreateOrUpdate,"aria-invalid":!n,numberingSystem:E,overlayPositioning:"fixed",readOnly:d,[Q]:i,onfocus:this._onComponentFocus},m=$(c,s),h=$(u,s),v=$(a,s);return z("div",{class:f.dateInputContainer,key:`${l}-date-time-container`},z("calcite-input-date-picker",{...p,class:r,"data-date-part":"date",key:`${l}-date-input`,max:m?.date??void 0,min:h?.date??void 0,onblur:e=>{this._focusedFieldName=null,this._saveValueFromDateComponent(e.target)},value:v.date??void 0,onCalciteInputDatePickerChange:e=>this._saveValueFromDateComponent(e.currentTarget)}),z("calcite-input-time-picker",{...p,class:r,"data-date-part":"time",key:`${l}-time-input`,onblur:e=>{this._focusedFieldName=null,this._saveValueFromDateComponent(e.target)},step:e.timeStep,value:v.time??void 0,onCalciteInputTimePickerChange:e=>this._saveValueFromDateComponent(e.currentTarget)}),e.includeTimeOffset?z("calcite-input-time-zone",{...p,class:r,"data-date-part":"timeZone",disabled:d,key:`${l}-timezone-input`,onblur:e=>{this._focusedFieldName=null,this._saveValueFromDateComponent(e.target)},value:v.timeZoneOffset??"0",onCalciteInputTimeZoneChange:e=>this._saveValueFromDateComponent(e.currentTarget)}):null)}_renderDateFieldComponents(e,t){const{includeTime:i,name:o,valid:s,value:n}=e,{class:a,key:r,max:l,min:d,readOnly:c}=t,{timeZone:u}=this,p={afterCreate:this._afterDateComponentCreate,afterUpdate:this._afterDateComponentCreateOrUpdate,"aria-invalid":!s,numberingSystem:E,overlayPositioning:"fixed",readOnly:c,[Q]:o,onfocus:this._onComponentFocus},m=j(n,u),h=j(l,u),v=j(d,u);return z("div",{class:f.dateInputContainer,key:`${r}-date-time-container`},z("calcite-input-date-picker",{...p,class:a,"data-date-part":"date",key:`${r}-date-input`,max:h?.date??void 0,min:v?.date??void 0,onblur:e=>{this._focusedFieldName=null,this._saveValueFromDateComponent(e.target)},value:m.date??void 0,onCalciteInputDatePickerChange:e=>this._saveValueFromDateComponent(e.currentTarget)}),i?z("calcite-input-time-picker",{...p,class:a,"data-date-part":"time",key:`${r}-time-input`,onblur:e=>{this._focusedFieldName=null,this._saveValueFromDateComponent(e.target)},step:1,value:m.time??void 0,onCalciteInputTimePickerChange:e=>this._saveValueFromDateComponent(e.currentTarget)}):null)}_renderReadOnlyComponent(e,t){const i=this.getCommonInputProps(e);return z("calcite-input",{...i,class:this.classes(f.fieldInput,f.inputDisabled),readOnly:!0,type:"text",value:null!=t?`${t}`:i.value})}_renderComboBoxComponent(e,t,i){const{value:o,name:s}=e,{viewModel:n,_inputsWithChanges:a}=this,r="INSERT"===n.editType,l=a.has(s),d=null==o&&(!r||l),c=r&&e.showNoValueOptionEnabled&&!l?()=>{}:i.onblur;return z("calcite-combobox",{...i,allowCustomValues:!1,clearDisabled:!0,onblur:c,overlayPositioning:"fixed",selectionMode:"single",onCalciteComboboxChange:({currentTarget:t})=>{d&&0===t.selectedItems.length?this._ignoreDeselectionOfNoValueOption(t):e.isSubtypeField&&0===t.selectedItems.length?t.value=`${e.value}`:this._saveValueFromComponent(t)}},this.renderComboboxOptionsList(e,t))}renderComboboxOptionsList(e,t){const{value:i,name:o}=e,{messages:s,messagesTemplates:n,viewModel:a,_inputsWithChanges:r}=this,[l,d,c]=t.map(e=>e.map(({name:e,value:t})=>z("calcite-combobox-item",{key:`#${t}`,selected:i===t,textLabel:e,value:`${t}`}))),u=[];d.length>0&&u.push(z("calcite-combobox-item-group",{key:"other",label:n.other},d)),c.length>0&&u.push(z("calcite-combobox-item-group",{key:"unsupported",label:s.subtypes.unsupportedDomainGroupTitle},c)),u.length>0?u.unshift(z("calcite-combobox-item-group",{key:"recommended",label:s.recommended},l)):u.push(...l);const p="INSERT"===a.editType,m=r.has(o),h=null==i&&(!p||m);return e.showNoValueOptionEnabled&&u.unshift(z("calcite-combobox-item",{key:"empty-option",selected:h,textLabel:e.showNoValueLabel||s.empty,value:""})),u}_renderRadioButtonComponents(e,t,i){const{name:o,value:s}=e,n=t.map(({name:e,value:t})=>this._renderRadioButtonComponent({key:e,label:e,name:o,value:t,selected:t===s,props:i}));if(e.showNoValueOptionEnabled){const t="",a=e.showNoValueLabel||this.messages.empty,r=s===t||null===s;n.unshift(this._renderRadioButtonComponent({key:"empty-option",label:a,name:o,value:t,selected:r,props:i}))}return z("calcite-radio-button-group",{afterCreate:this._afterRadioGroupCreateOrUpdate,afterUpdate:this._afterRadioGroupCreateOrUpdate,class:f.inputRadioGroup,"data-field-name":i[Q],key:`${i.key}-radio-group`,layout:"vertical",name:i.key,required:i.required},n)}_renderSwitchComponent(e,t){const{value:i}=e,o=!!O(e.element,"switch")&&i===e.element.input.onValue;return z("calcite-switch",{...t,checked:o,class:f.inputSwitch,disabled:t.readOnly,onblur:()=>{this._focusedFieldName=null},onCalciteSwitchChange:e=>this._saveValueFromComponent(e.currentTarget)})}_renderRadioButtonComponent({key:e,name:t,value:i,selected:o,label:s,props:n}){return z("calcite-label",{class:f.inputRadioLabel,key:e,layout:"inline"},z("calcite-radio-button",{...n,afterCreate:void 0,afterUpdate:void 0,checked:o,class:f.inputRadio,disabled:n.readOnly,name:t,onblur:()=>{this._focusedFieldName=null},value:i,onCalciteRadioButtonChange:({currentTarget:e})=>{e.checked&&this._saveValueFromComponent(e)}}),s)}_renderAuxiliaryText(e){const t=e.name,i=this._inputsWithChanges.has(t)&&!e.submittable?N(e,this.messages,this.timeZone):null!=this.viewModel.contingencyConstraintViolations.get(t)?this.messages.validationErrors.valuesIncompatible:null!=e.valueExpressionExecutor&&e.valueExpressionExecutor.stale?this.messages.valueExpressionError:null;return null!=i?z("calcite-input-message",{icon:!0,status:"invalid"},i):this._inputsWithChanges.has(t)&&e.valueIsOutOfDomain?z("calcite-input-message",{icon:!0,status:"idle"},this.messages.subtypes.fieldOutOfSubtypeDomainWarning):this._renderDescriptionOrEmpty(e.description)}_renderShowAllRelatedRecordsListItem(e){if(!e.showAllActionVisible||!this.callbacks?.showAllRelatedRecords)return;const i=this.messages;return z("calcite-list-item",{description:t(i.totalCount,{count:e.featureCount}),key:"show-all-related-features",label:i.showAll,value:!0,onCalciteListItemSelect:()=>this._onShowAllRelatedRecordsClick(e.relationshipId)},z("calcite-icon",{icon:"list",scale:"s",slot:"content-end"}))}_renderAddRelatedRecordButton(e){const{canAddRelatedFeature:t,relationshipId:i,relatedLayer:o,editable:s}=e,{messages:n,callbacks:a,disabled:r}=this,l=!s||r;if(t&&a?.addRelatedRecord&&o&&!l)return z("calcite-button",{alignment:"center",appearance:"outline-fill",class:f.centeredButton,disabled:e.updating||!e.originHasValidKey,iconStart:"plus",key:`${i}-add-button`,onclick:()=>{!e.updating&&e.originHasValidKey&&this._onAddRelatedRecordsClick(e,i,o)},round:!0,scale:"s",width:"full"},e.relatedLayerIsTable?n.addRecord:n.addFeature)}_renderRelatedRecordListItem(e,t,i){const{feature:o,description:s,title:n}=e,{feature:a,callbacks:r}=this,{highlightHelper:l}=this.viewModel,d=()=>{l?.removeAll(),r?.editRelatedRecord&&a&&r.editRelatedRecord({parentFeature:a,relationshipId:t,relatedFeature:o,readOnly:i})},c=l?()=>l.add(o):void 0,u=l?()=>l.remove(o):void 0;return z("calcite-list-item",{bind:this,description:s,key:`${t}-${o.uid}`,label:n,onmouseenter:c,onmouseleave:u,value:n,onCalciteListItemSelect:d},z("calcite-icon",{icon:M(o),slot:"content-start"}),z("calcite-icon",{icon:"chevron-right",scale:"s",slot:"content-end"}))}_renderRelationshipInput(e){if(!this._relatedRecordsEnabled)return;const{relationshipId:t,activeCategory:i}=e,o=i?null:this._renderDescriptionOrEmpty(e.description);return z("calcite-label",{class:this.classes(f.label,f.relatedRecordsLabel),key:`relationship-${t}-container`},z("div",null,this._renderRelatedRecordsHeaderContainer(e),o,this._renderRelationshipInputContent(e)),this._renderAddRelatedRecordButton(e))}_renderRelationshipInputContent(e){return e.featureCount>0?this._renderRelatedRecordsList(e):e.activeCategory&&0===e.featureCount?this._renderNoRelatedRecordsNotice():e.allCategories?.length?this._renderCategoryList(e):e.loaded?e.originHasValidKey?this._renderNoRelatedRecordsNotice():this._renderNoValidOriginKeyNotice(e):void 0}_renderCategoryList(e){return z("calcite-list",{displayMode:"flat",label:this.messages.relatedRecordsList,loading:e.updating},e.categories?.map(t=>this._renderCategory(e,t)),this._renderShowAllCategoriesListItem(e))}_renderCategory(e,t){const{count:o,name:s,value:n}=t,a=i(o);return z("calcite-list-item",{key:`${s}-${n}`,label:s,onCalciteListItemSelect:()=>this._selectCategory(e,t)},z("calcite-chip",{label:a,scale:"s",slot:"content-end"},a),z("calcite-icon",{flipRtl:!0,icon:"chevron-left",scale:"s",slot:"content-end"}))}_selectCategory(e,t){this.relationshipId=e.relationshipId,e.activeCategory=t}_renderShowAllCategoriesListItem(e){if(!e.showAllCategoriesVisible)return;const i=this.messages;return z("calcite-list-item",{description:t(i.totalCount,{count:e.allCategories?.length??0}),key:"show-all-categories",label:i.showAll,value:!0,onCalciteListItemSelect:()=>e.showAllEnabled=!0},z("calcite-icon",{icon:"list",scale:"s",slot:"content-end"}))}_renderRelatedRecordsHeaderContainer(e){const t=e.updating||!e.loaded;return z("div",{class:f.relatedRecordsHeader,key:`relationship-${e.relationshipId}-header`},z("span",null,e.label),t?z("calcite-loader",{inline:!0,key:"loader",label:this.messagesCommon?.loading,scale:"s",type:"indeterminate"}):void 0)}_renderRelatedRecordsList(e){const{relationshipId:t,editable:i}=e,{disabled:o}=this,s=!i||o;return z("calcite-list",{class:f.relatedRecordsList,label:this.messages?.relatedRecordsList},e.relatedFeatureInfos.map(e=>this._renderRelatedRecordListItem(e,t,s)),this._renderShowAllRelatedRecordsListItem(e),this._renderObserverNode())}_renderNoValidOriginKeyNotice(e){const{messages:i}=this,o=e.relatedLayerIsTable?i.noOriginKeyRecord:i.noOriginKeyFeature,s=e.relationship?.keyField,n=this.viewModel.findField(s),a=e.layer?.fieldsIndex.get(s),r=n?.label||a?.alias||s,l=t(o,{relatedLayerName:e.relatedLayer?.title,originKeyField:r});return z("calcite-notice",{icon:"information",kind:"brand",open:!0,scale:"s",width:"full"},z("div",{slot:"message"},l))}_renderNoRelatedRecordsNotice(){return z("calcite-notice",{icon:"information",kind:"brand",open:!0,scale:"s",width:"full"},z("div",{slot:"message"},this.messagesFeature.noRelatedFeatures))}_renderObserverNode(){if(this.viewModel.activeRelationshipInput?.showAllEnabled)return z("div",{afterCreate:this._afterListObserverCreated,afterRemoved:this._afterListObserverRemoved,bind:this,class:f.listObserver,key:"feature-observer"})}_renderTextElementInput(e){return z("div",{class:f.textElement,"data-testid":`text-element-${e.label}`,innerHTML:e.text,key:e.id})}getCommonInputProps(e){const{disabled:t}=this,{editable:i,hint:o,label:s,maxLength:n,minLength:a,name:r,range:{max:l,min:d},required:c,valid:u,value:p}=e,m=this._inputsWithChanges.has(r),h=!i||t;return{afterCreate:this._afterComponentCreate,afterUpdate:this._afterComponentCreateOrUpdate,"aria-invalid":u?"false":"true",class:this.classes(f.fieldInput,h?f.inputDisabled:null),status:m&&!u?"invalid":"idle",key:r,label:s,max:null!=l?l:void 0,min:null!=d?d:void 0,maxLength:n>-1?n:void 0,minLength:a>-1?a:void 0,placeholder:o??void 0,readOnly:h,required:c,value:null==p?"":`${p}`,onblur:this._onComponentBlur,onfocus:this._onComponentFocus,onkeydown:this._onComponentKeyDown,[Q]:r}}_getFieldInputFromHTMLElement(e){return this.viewModel.findField(e.getAttribute(Q))}_afterDateComponentCreate(e){const t=this._getFieldInputFromHTMLElement(e),i=e.dataset.datePart,o=this._dateComponentMap.get(t.name);if("valueAsDate"in e&&null!=e.value&&null!=t.value){const i=new ResizeObserver(()=>{switch(e.value=void 0,t.field.type){case"date":e.value=j(t.value,this.timeZone).date??"";break;case"timestamp-offset":e.value=$(t.value,this.timeZone).date??"";break;default:e.value=`${t.value}`}i.unobserve(e)});i.observe(e)}if(null!=o)switch(i){case"date":o.date=e;break;case"time":o.time=e;break;case"timeZone":o.timeZone=e}else this._dateComponentMap.set(t.name,{[i]:e});this._afterDateComponentCreateOrUpdate(e)}_afterDateComponentCreateOrUpdate(e){this._afterComponentCreateOrUpdate(e)}_afterComponentCreate(e){const t=this._getFieldInputFromHTMLElement(e);L(t)&&null!=e.value&&"setNumberValue"in e&&e.setNumberValue({committing:!1,value:e.value,origin:"direct"}),this._afterComponentCreateOrUpdate(e)}_afterRadioGroupCreateOrUpdate(e){const t=e.selectedItem,i=e.querySelector("calcite-radio-button"),o=t||i;o&&this._afterComponentCreateOrUpdate(o)}_afterComponentCreateOrUpdate(e){const{viewModel:t}=this,i=this._getFieldInputFromHTMLElement(e),o=t.findField(this._focusedFieldName);this._attemptFocusOnNextRender&&o===i&&(this._attemptFocusOnNextRender=!1,I(i)&&(i.group.open=!0),J(e))}async _afterGroupCreate(e){const t=this.viewModel.findGroup(e.id),i=this.viewModel.findField(this._focusedFieldName);i&&t&&T(i,t)&&(!i.editable||this.disabled)&&(await e.componentOnReady(),this._attemptFocusOnNextRender=!0,this.scheduleRender())}_onComponentFocus(e){const t=e.target,i=this._getFieldInputFromHTMLElement(t);this._focusedFieldName=i.name}_onComponentBlur(e){const t=e.target;this._focusedFieldName=null;"readOnly"in t&&t.readOnly||this._saveValueFromComponent(t)}_saveValueFromDateComponent(e){const{timeZone:t}=this,i=this._getFieldInputFromHTMLElement(e),o=i.field.type,{name:s,range:n}=i,a=this._dateComponentMap.get(s);if(!a)return;let r=this.viewModel.getValue(s),l=null;"date-only"===o?l=Array.isArray(e.value)?e.value[0]:e.value:"time-only"===o?(r=P(r),l=P(e.value)):l="timestamp-offset"===o?null!=e.value?G({dateComponent:a.date,timeComponent:a.time,timeZoneComponent:a.timeZone,oldValue:r,defaultTimeZone:t}):null:null!=e.value?H({oldValue:r,dateComponent:a.date,timeComponent:a.time,timeZone:t,max:n.max,min:n.min}):null,null!==l&&e.value?r!==l&&this._updateFieldValue(s,l):this._updateFieldValue(s,null)}_saveValueFromComponent(e){const t=this._getFieldInputFromHTMLElement(e),i=this._parseValue(e),o=t.value;t.isSubtypeField&&A(this.layer,o,i)?this._pendingSubtypeChoice||i===o||(this._pendingSubtypeChoice=this._handleSubtypeChoice(t,i)):this._updateFieldValue(t.name,i)}async _handleSubtypeChoice(e,i){const{value:o,name:s}=e,{messages:a,viewModel:r,messagesCommon:l,_subtypes:d}=this;if(this._updateFieldValue(s,i),!d?.length)return;const c=d.find(e=>e.code===i),u=d.find(e=>e.code===o)?.name??`${o}`;if(!c)return;const p=n();r.pendingSubtypeChoice=p;let m="update-fields";const h=[{label:a.subtypes.useDefaultValuesOption,value:"update-fields"},{label:a.subtypes.keepCurrentValuesOption,value:"keep-existing"}],v={context:"info",title:a.subtypes.changeWarningTitle,message:t(a.subtypes.changeWarning,{originalType:u,newType:c.name}),radios:h,defaultRadioSelection:"update-fields",onRadioSelection:e=>m=e,actions:{primary:{label:l.apply,action:()=>p.resolve(m),type:"positive"},secondary:{label:l.cancel,type:"neutral",action:()=>p.resolve("undo")}},cancel:()=>p.reject()};try{this.showPrompt(v);switch(await p.promise){case"update-fields":r.applySubtypeDefaults(c),this._validateContingenciesForNonNullFields();break;case"keep-existing":this._validateContingenciesForNonNullFields();break;case"undo":this._updateFieldValue(e.name,o)}}finally{r.pendingSubtypeChoice=null,this.clearPrompt(),this._pendingSubtypeChoice=null}}_onComponentKeyDown({key:e,target:t}){const i=this._getFieldInputFromHTMLElement(t);"Enter"===e&&I(i)&&!i.group.open&&(i.group.open=!0)}_updateFieldValue(e,t){const i=this.viewModel.getValue(e);this.viewModel.setValue(e,t),this._inputsWithChanges.add(e);i!==t&&this.viewModel.fieldsWithContingentValues.has(e)&&this._validateContingenciesForNonNullFields()}_validateContingenciesForNonNullFields(){const e=Object.fromEntries(Object.entries(this.getValues()).filter(([e,t])=>null!=t));this.viewModel.validateContingencyConstraints(e)}_parseValue(e){const t=this._getFieldInputFromHTMLElement(e),i=e.value;return O(t.element,"switch")?e.checked?t.element.input.onValue:t.element.input.offValue:null==i||""===i?null:"number"===t.dataType?"-0"===i||"-0."===i||"-0,"===i?i:parseFloat(i):"date"===t.field.type?parseFloat(i):i}_ignoreDeselectionOfNoValueOption(e){const{firstChild:t,selectedItems:i}=e;0===i.length&&t&&"selected"in t?t.selected=!0:s.getLogger(this).warnOnce("Failed to override user attempt to deselect 'No value' option.")}_onGroupToggle(e,t){e.expanded?(t.open=!0,this._focusedFieldName=this._getFocusableInput("forward",t)?.name||null,this._attemptFocusOnNextRender=!0,"sequential"===this.groupDisplay&&this.viewModel.allGroupInputs.forEach(e=>{e!==t&&(e.open=!1)})):t.open=!1,this.scheduleRender()}_onFormSubmit(e){e.preventDefault()}_onFormKeyDown(e){"Enter"===e.key&&this.viewModel.submit()}_afterListObserverCreated(e){this.viewModel.activeRelationshipInput&&(this._listObserverNode=e)}_afterListObserverRemoved(){this._listObserverNode=null}_onObserverChange(){this._listObserverNode&&this._listObserver.unobserve(this._listObserverNode);const e=this.viewModel.activeRelationshipInput;e&&this._listObserverNode&&e.showAllEnabled&&this._listObserver.observe(this._listObserverNode)}_incrementRelatedRecordPage(){const e=this.viewModel.activeRelationshipInput;e?.incrementPage()}_syncGroupInputStates(){if("sequential"!==this.groupDisplay)return;const e=this.viewModel.allGroupInputs;if(!e.length)return;const t=e.filter(e=>e.open);0===t.length?e[0].open=!0:t.length>1&&t.slice(1).forEach(e=>e.open=!1)}get test(){return{inputsWithChanges:this._inputsWithChanges,updateValue:this._saveValueFromComponent.bind(this)}}};e([c()],X.prototype,"_listObserverNode",void 0),e([c()],X.prototype,"_relatedRecordsEnabled",null),e([c()],X.prototype,"_utilityNetworkAssociationsEnabled",null),e([c()],X.prototype,"_prompt",void 0),e([c()],X.prototype,"_subtypes",null),e([c()],X.prototype,"associationId",null),e([c()],X.prototype,"associatedLayer",null),e([c()],X.prototype,"disabled",null),e([c()],X.prototype,"feature",null),e([c()],X.prototype,"_featureFormUNAssociationList",void 0),e([c()],X.prototype,"formTemplate",null),e([c()],X.prototype,"groupDisplay",void 0),e([c()],X.prototype,"headingLevel",void 0),e([c()],X.prototype,"icon",null),e([c()],X.prototype,"label",null),e([c()],X.prototype,"layer",null),e([c()],X.prototype,"map",null),e([c(),K("esri/widgets/FeatureForm/t9n/FeatureForm")],X.prototype,"messages",void 0),e([c(),K("esri/t9n/common")],X.prototype,"messagesCommon",void 0),e([c(),K("esri/widgets/Feature/t9n/Feature")],X.prototype,"messagesFeature",void 0),e([c(),K("esri/widgets/FeatureTemplates/t9n/FeatureTemplates")],X.prototype,"messagesTemplates",void 0),e([c()],X.prototype,"callbacks",null),e([c()],X.prototype,"relationshipId",null),e([c()],X.prototype,"spatialReference",null),e([c()],X.prototype,"strict",null),e([c()],X.prototype,"timeZone",null),e([c()],X.prototype,"showPrompt",null),e([c()],X.prototype,"clearPrompt",null),e([c({type:x}),q(["value-change","submit"])],X.prototype,"viewModel",void 0),e([c({type:D,nonNullable:!0})],X.prototype,"visibleElements",void 0),e([c()],X.prototype,"test",null),X=e([u("esri.widgets.FeatureForm")],X);const Y=X;export{Y as default};
5
+ import{__decorate as e}from"tslib";import{substitute as t,formatNumber as i}from"../intl.js";import{isSome as o}from"../core/arrayUtils.js";import"../core/has.js";import s from"../core/Logger.js";import{createResolver as n}from"../core/promiseUtils.js";import a from"../core/ReactiveMap.js";import{watch as r,whenOnce as l,initial as d}from"../core/reactiveUtils.js";import{property as c,subclass as u}from"../core/accessorSupport/decorators.js";import{isIntegerField as p}from"../layers/support/fieldUtils.js";import{isSubtypeGroupLayer as m,getSubtypesFromLayer as h}from"../layers/support/layerUtils.js";import{isString as v}from"../support/guards.js";import _ from"./Widget.js";import{Prompt as g}from"./Editor/components/Prompt.js";import{isRelatableFeatureSupportedLayer as b}from"./Feature/support/featureUtils.js";import{css as f}from"./FeatureForm/css.js";import{isUtilityNetworkAssociationInput as y,isGroupInput as C,isFieldInput as F,isRelationshipInput as w,isTextElementInput as R,flattenInputs as k,isInputInGroupInput as O,isFieldElementWithInputType as I,getErrorMessageForFieldInput as N,getIconForFeature as M,isNumberFieldInput as L,isInputInThisGroupInput as T,subtypeChangeShouldPrompt as A}from"./FeatureForm/featureFormUtils.js";import x from"./FeatureForm/FeatureFormViewModel.js";import D from"./FeatureForm/VisibleElements.js";import{loadCalciteComponents as V}from"./support/componentsUtils.js";import{getLabelForDateFieldValue as S,getIntlOptionsForField as U,numberingSystem as E,prepareISOFieldValueForDateComponents as $,prepareUnixFieldValueForDateComponents as j,normalizeTimeOnlyString as P,getISOFieldValueFromDateComponents as G,getUnixFieldValueFromDateComponents as H}from"./support/dateUtils.js";import{globalCss as W}from"./support/globalCss.js";import{Heading as Z,incrementHeadingLevel as B}from"./support/Heading.js";import{messageBundle as K,vmEvent as q,tsx as z}from"./support/widget.js";import{setFocus as J}from"./support/widgetUtils.js";const Q="data-field-name";let X=class extends _{constructor(e,t){super(e,t),this._associationsWidgetsMap=new a,this._attemptFocusOnNextRender=!1,this._dateComponentMap=new Map,this._inputsWithChanges=new Set,this._focusedFieldName=null,this._pendingSubtypeChoice=null,this._listObserverNode=null,this._listObserver=new IntersectionObserver(e=>{e.length&&e[0].isIntersecting&&this._incrementRelatedRecordPage()},{root:window.document}),this._prompt=null,this._featureFormUNAssociationList=null,this.groupDisplay="all",this.headingLevel=2,this.messages=null,this.messagesCommon=null,this.messagesFeature=null,this.messagesTemplates=null,this.viewModel=new x,this.visibleElements=new D,this._onShowAllRelatedRecordsClick=e=>{const{feature:t,callbacks:i}=this;t&&i?.showAllRelatedRecords&&i.showAllRelatedRecords({parentFeature:t,relationshipId:e})},this._onAddRelatedRecordsClick=(e,t,i)=>{const{feature:o,callbacks:s}=this;let n=i;if(o&&s?.addRelatedRecord){if(m(i)&&e.activeCategory){const t=e.activeCategory.value,o=i.findSublayerForSubtypeCode(t);o&&b(o)&&(n=o)}s.addRelatedRecord({parentFeature:o,relatedLayer:n,relationshipId:t})}},this._onFormKeyDown=this._onFormKeyDown.bind(this),this._onFormSubmit=this._onFormSubmit.bind(this),this._onGroupToggle=this._onGroupToggle.bind(this),this._onComponentBlur=this._onComponentBlur.bind(this),this._onComponentFocus=this._onComponentFocus.bind(this),this._onComponentKeyDown=this._onComponentKeyDown.bind(this),this._afterComponentCreate=this._afterComponentCreate.bind(this),this._afterComponentCreateOrUpdate=this._afterComponentCreateOrUpdate.bind(this),this._afterDateComponentCreate=this._afterDateComponentCreate.bind(this),this._afterDateComponentCreateOrUpdate=this._afterDateComponentCreateOrUpdate.bind(this),this._afterRadioGroupCreateOrUpdate=this._afterRadioGroupCreateOrUpdate.bind(this),this._afterGroupCreate=this._afterGroupCreate.bind(this)}initialize(){this.addHandles([r(()=>this.feature,()=>{this._inputsWithChanges.clear(),this._dateComponentMap.clear(),l(()=>!this.viewModel.updating).then(()=>{const e=this._getFocusableInput("forward");this._syncGroupInputStates(),this._focusedFieldName=e?.name||null,this._attemptFocusOnNextRender=!0})}),r(()=>[this._featureFormUNAssociationList,this.visibleElements.associationDetails],([e,t])=>{e&&(e.visibleElements.associationDetails=t)},d),r(()=>this.groupDisplay,()=>this._syncGroupInputStates()),this.on("submit",e=>{if(e.invalid.length>0){const[t]=e.invalid;e.invalid.forEach(e=>this._inputsWithChanges.add(e)),this._focusedFieldName=t,this._attemptFocusOnNextRender=!0,this.scheduleRender()}}),r(()=>[this.viewModel.activeRelationshipInput,this._listObserverNode],()=>this._onObserverChange()),r(()=>this.viewModel.activeAssociationInput,e=>{e&&this._featureFormUNAssociationList&&(this._featureFormUNAssociationList.associationInput=e,this._featureFormUNAssociationList.viewModel=e.viewModel)}),r(()=>this.viewModel.inputs.filter(y),async e=>{this._featureFormUNAssociationList||await this._setUpUtilityNetworkAssociationList();for(const t of e)this._associationsWidgetsMap.has(t)||this._associationsWidgetsMap.set(t,await this._makeAssociationsWidget(t))})])}loadDependencies(){return V({block:()=>import("@esri/calcite-components/dist/components/calcite-block"),button:()=>import("@esri/calcite-components/dist/components/calcite-button"),chip:()=>import("@esri/calcite-components/dist/components/calcite-chip"),combobox:()=>import("@esri/calcite-components/dist/components/calcite-combobox"),"combobox-item":()=>import("@esri/calcite-components/dist/components/calcite-combobox-item"),"combobox-item-group":()=>import("@esri/calcite-components/dist/components/calcite-combobox-item-group"),icon:()=>import("@esri/calcite-components/dist/components/calcite-icon"),input:()=>import("@esri/calcite-components/dist/components/calcite-input"),"input-date-picker":()=>import("@esri/calcite-components/dist/components/calcite-input-date-picker"),"input-message":()=>import("@esri/calcite-components/dist/components/calcite-input-message"),"input-number":()=>import("@esri/calcite-components/dist/components/calcite-input-number"),"input-time-picker":()=>import("@esri/calcite-components/dist/components/calcite-input-time-picker"),"input-time-zone":()=>import("@esri/calcite-components/dist/components/calcite-input-time-zone"),label:()=>import("@esri/calcite-components/dist/components/calcite-label"),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"),"radio-button":()=>import("@esri/calcite-components/dist/components/calcite-radio-button"),"radio-button-group":()=>import("@esri/calcite-components/dist/components/calcite-radio-button-group"),switch:()=>import("@esri/calcite-components/dist/components/calcite-switch"),"text-area":()=>import("@esri/calcite-components/dist/components/calcite-text-area")})}destroy(){this._listObserverNode&&this._listObserver.unobserve(this._listObserverNode)}get _relatedRecordsEnabled(){const{callbacks:e}=this;return!(!e||!(e.addRelatedRecord||e.editRelatedRecord||e.showAllRelatedRecords))}get _utilityNetworkAssociationsEnabled(){const{callbacks:e}=this;return!(!e?.viewAssociatedLayers||!e.viewAssociatedFeatures)}get _subtypes(){return h(this.layer)}get associationId(){return this.viewModel.associationId}set associationId(e){this.viewModel.associationId=e}get associatedLayer(){return this.viewModel.associatedLayer}set associatedLayer(e){this.viewModel.associatedLayer=e}get disabled(){return this.viewModel.disabled}set disabled(e){this.viewModel.disabled=e}get feature(){return this.viewModel.feature}set feature(e){this.viewModel.feature=e}get formTemplate(){return this.viewModel.formTemplate}set formTemplate(e){this.viewModel.formTemplate=e}get icon(){return"form-field"}set icon(e){this._overrideIfSome("icon",e)}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get layer(){return this.viewModel.layer}set layer(e){this.viewModel.layer=e}get map(){return this.viewModel.map}set map(e){this.viewModel.map=e}get callbacks(){return this.viewModel.callbacks}set callbacks(e){this.viewModel.callbacks=e}get relationshipId(){return this.viewModel.relationshipId}set relationshipId(e){this.viewModel.relationshipId=e}get spatialReference(){return this.viewModel.spatialReference}set spatialReference(e){this.viewModel.spatialReference=e}get strict(){return this.viewModel.strict}set strict(e){this.viewModel.strict=e}get timeZone(){return this.viewModel.timeZone}set timeZone(e){this.viewModel.timeZone=e}get showPrompt(){return e=>{this._prompt?.cancel?.(),this._prompt=e}}set showPrompt(e){this._overrideIfSome("showPrompt",e)}get clearPrompt(){return()=>this._prompt=null}set clearPrompt(e){this._overrideIfSome("clearPrompt",e)}getValues(){return this.viewModel.getValues()}submit(){return this.viewModel.submit()}render(){const{state:e}=this.viewModel;return z("div",{class:this.classes(f.base,W.widget,W.panel)},"ready"===e?this._renderForm():null)}_renderForm(){return z("div",null,z("form",{class:f.form,inert:!!this._prompt,novalidate:!0,onkeydown:this._onFormKeyDown,onsubmit:this._onFormSubmit},this._renderReadOnlyNotice(),this._renderHeader(),this._renderContent()),this._prompt?z(g,{...this._prompt,headingLevel:this.headingLevel}):void 0)}_renderReadOnlyNotice(){const{disabled:e,messages:t}=this;if(e&&this.visibleElements.readOnlyNotice)return z("calcite-notice",{class:f.disabledNotice,icon:"read-only-non-editable",kind:"brand",open:!0,scale:"s",width:"full"},z("div",{slot:"message"},t.disabledForm))}_renderHeader(){const e=this.viewModel,{formTitle:t,formDescription:i}=e;if(!e.formHeaderVisible)return;const o=null!=t&&z(Z,{key:"title",level:this.headingLevel},t),s=null!=i&&z("p",{class:f.description,key:"description"},i);return z("div",{class:f.formHeader},o,s)}_renderContent(){const{viewModel:e}=this;return e.activeRelationshipInput?this._renderRelationshipInput(e.activeRelationshipInput):e.activeAssociationInput?this._renderFeatureFormUtilityNetworkAssociationList():e.inputs.filter(o).filter(e=>e.visible).map(e=>this._renderInput(e))}_renderInput(e){return C(e)?this._renderGroup(e):F(e)?this._renderLabeledField(e):w(e)?this._renderRelationshipInput(e):R(e)?this._renderTextElementInput(e):y(e)?this._renderUtilityNetworkAssociationsElementInput(e):void 0}_renderFeatureFormUtilityNetworkAssociationList(){return this._featureFormUNAssociationList?.render()}_selectAssociatedLayer(e){const{feature:t,callbacks:i}=this;t&&i?.viewAssociatedFeatures&&i.viewAssociatedFeatures({associatedLayer:e.layer})}async _selectAssociatedFeature(e){const{feature:t,callbacks:i}=this;t&&i?.selectAssociatedFeature&&await i.selectAssociatedFeature({parentFeature:t,...e})}_onAddAssociation(e){const{feature:t,callbacks:i}=this;t&&i?.addAssociation&&i.addAssociation(e)}async _setUpUtilityNetworkAssociationList(){if(!this._featureFormUNAssociationList){const e=(await import("./FeatureForm/FeatureFormUtilityNetworkAssociations/FeatureFormUtilityNetworkAssociationList.js")).default;this._featureFormUNAssociationList=new e({onSelectLayer:this._selectAssociatedLayer.bind(this),onSelectFeature:this._selectAssociatedFeature.bind(this),onAddAssociation:this._onAddAssociation.bind(this)})}}async _makeAssociationsWidget(e){return new(0,(await import("./Feature/FeatureUtilityNetworkAssociations.js")).default)({onSelectAssociationType:({viewModel:t,listType:i})=>{t.activeAssociationType=i;const{feature:o,callbacks:s}=this;o&&s?.viewAssociatedLayers&&s.viewAssociatedLayers({associationId:e.uid})},viewModel:e.associationsViewModel})}_renderUtilityNetworkAssociationsElementInput(e){if(this._utilityNetworkAssociationsEnabled)return this._associationsWidgetsMap.get(e)?.render()}_renderDescriptionOrEmpty(e,t){return null==e?null:z("div",{class:this.classes(f.description),id:t},e)}_renderGroup(e){const{formTemplate:t,headingLevel:i}=this,{description:o,id:s,inputs:n,label:a,open:r}=e,l=n.filter(e=>e.visible),d=this.viewModel.findField(this._focusedFieldName),c=d?.group===e,u="sequential"===this.groupDisplay;return z("calcite-block",{afterCreate:this._afterGroupCreate,class:this.classes(f.group,u?f.groupSequential:null,c?f.groupActive:null),collapsible:!0,"data-group":e,description:o||void 0,expanded:r,heading:a??"",headingLevel:t?.title?B(i):i,id:s,key:s,onCalciteBlockToggle:({currentTarget:t})=>this._onGroupToggle(t,e)},l.map(e=>this._renderInput(e)))}_getFocusableInput(e,t){const i=k(this.viewModel.inputs);let o;if("backward"===e&&i.reverse(),t)if(C(t)){const e=t.inputs.find(e=>e.visible);o=e?i.indexOf(e):0}else{let s;if(O(t)&&!t.group.open){const i=t.group.inputs.filter(F);s="forward"===e?i[i.length-1]:i[0]}else s=t;o=i.indexOf(s)+1}else o=0;for(let s=o;s<i.length;s++){const e=i[s];if(e.visible&&F(e)){if(this.disabled&&e.inputType&&("switch"===e.inputType||"radio-buttons"===e.inputType))continue;return e}}return null}_renderLabeledField(e){const{dataType:i,feature:o,label:s,layer:n,required:a}=e,r={"aria-label":a?t(this.messages.requiredFieldLabel,{name:s}):s,class:f.label,key:`${n.id}-${o.uid}-${e.name}`},l=[z("div",{class:f.labelTextContent,key:"labelTextContainer"},s,a?z("span",{"aria-hidden":"true",title:this.messagesCommon.required},"*"):void 0),"unsupported"!==i?this._renderFieldInput(e):this._renderReadOnlyComponent(e),this._renderAuxiliaryText(e)];return"date"===i&&"coded-value"!==e.domain?.type?z("label",{...r},l):z("calcite-label",{...r},l)}_renderFieldInput(e){const{dataType:t,domain:i,inputType:o,name:s}=e,n=this.getCommonInputProps(e);if("coded-value"===i?.type){const t=this.viewModel.getFieldValueOptionsForField(s,this.messages.empty);return"switch"!==o||e.hasInvalidSwitchValue?"radio-buttons"===o?this._renderRadioButtonComponents(e,t.flat(),n):this._renderComboBoxComponent(e,t,n):this._renderSwitchComponent(e,n)}return"datetime-picker"===o||"date"===t?this._renderDateComponents(e,n):"number"===t?this._renderNumberComponent(e,n):this._renderStringComponent(e,n)}_renderStringComponent(e,t){return"text-area"===e.inputType?t.readOnly?z("calcite-text-area",{...t,onCalciteTextAreaInput:e=>this._saveValueFromComponent(e.currentTarget)}):z("calcite-text-area",{...t,resize:"vertical",onCalciteTextAreaInput:e=>this._saveValueFromComponent(e.currentTarget)}):z("calcite-input",{...t,loading:e.updating,type:"text",onCalciteInputInput:e=>this._saveValueFromComponent(e.currentTarget)})}_renderNumberComponent(e,t){const i=p(e.field),o=i&&""!==t.value?Math.round(parseFloat(t.value)).toString():t.value;return z("calcite-input-number",{...t,integer:i,loading:e.updating,type:"number",value:o,onCalciteInputNumberInput:e=>this._saveValueFromComponent(e.currentTarget)})}_renderDateComponents(e,t){const{field:i}=e;switch(i.type){case"date":return this._renderDateFieldComponents(e,t);case"date-only":return this._renderDateOnlyFieldComponent(e,t);case"time-only":return this._renderTimeOnlyFieldComponent(e,t);case"timestamp-offset":return this._renderTimestampOffsetFieldComponents(e,t);default:return this._renderReadOnlyComponent(e,S(i,t.value,{timeZone:this.timeZone,...U(i)}))}}_renderDateOnlyFieldComponent(e,t){const{range:i,valid:o,value:s}=e,{class:n,key:a,readOnly:r}=t,{rawMax:l,rawMin:d}=i;return z("calcite-input-date-picker",{afterCreate:this._afterDateComponentCreate,afterUpdate:this._afterDateComponentCreateOrUpdate,"aria-invalid":!o,class:n,"data-date-part":"date","data-field-name":t[Q],key:`${a}-date-input`,max:v(l)?l:void 0,min:v(d)?d:void 0,numberingSystem:E,onblur:e=>{this._focusedFieldName=null,this._saveValueFromDateComponent(e.target)},onfocus:this._onComponentFocus,overlayPositioning:"fixed",readOnly:r,value:null!=s?`${s}`:void 0,onCalciteInputDatePickerChange:e=>this._saveValueFromDateComponent(e.currentTarget)})}_renderTimeOnlyFieldComponent(e,t){const{valid:i,value:o}=e,{class:s,key:n,readOnly:a}=t;return z("calcite-input-time-picker",{afterCreate:this._afterDateComponentCreate,afterUpdate:this._afterDateComponentCreateOrUpdate,"aria-invalid":!i,class:s,"data-date-part":"time","data-field-name":t[Q],key:`${n}-time-input`,numberingSystem:E,onblur:e=>{this._focusedFieldName=null,this._saveValueFromDateComponent(e.target)},onfocus:this._onComponentFocus,overlayPositioning:"fixed",readOnly:a,step:e.timeStep,value:null!=o?`${o}`:void 0,onCalciteInputTimePickerChange:e=>this._saveValueFromDateComponent(e.currentTarget)})}_renderTimestampOffsetFieldComponents(e,t){const{name:i,range:o,timeZone:s,valid:n,value:a}=e,{class:r,key:l,readOnly:d}=t,{rawMax:c,rawMin:u}=o,p={afterCreate:this._afterDateComponentCreate,afterUpdate:this._afterDateComponentCreateOrUpdate,"aria-invalid":!n,numberingSystem:E,overlayPositioning:"fixed",readOnly:d,[Q]:i,onfocus:this._onComponentFocus},m=$(c,s),h=$(u,s),v=$(a,s);return z("div",{class:f.dateInputContainer,key:`${l}-date-time-container`},z("calcite-input-date-picker",{...p,class:r,"data-date-part":"date",key:`${l}-date-input`,max:m?.date??void 0,min:h?.date??void 0,onblur:e=>{this._focusedFieldName=null,this._saveValueFromDateComponent(e.target)},value:v.date??void 0,onCalciteInputDatePickerChange:e=>this._saveValueFromDateComponent(e.currentTarget)}),z("calcite-input-time-picker",{...p,class:r,"data-date-part":"time",key:`${l}-time-input`,onblur:e=>{this._focusedFieldName=null,this._saveValueFromDateComponent(e.target)},step:e.timeStep,value:v.time??void 0,onCalciteInputTimePickerChange:e=>this._saveValueFromDateComponent(e.currentTarget)}),e.includeTimeOffset?z("calcite-input-time-zone",{...p,class:r,"data-date-part":"timeZone",disabled:d,key:`${l}-timezone-input`,onblur:e=>{this._focusedFieldName=null,this._saveValueFromDateComponent(e.target)},value:v.timeZoneOffset??"0",onCalciteInputTimeZoneChange:e=>this._saveValueFromDateComponent(e.currentTarget)}):null)}_renderDateFieldComponents(e,t){const{includeTime:i,name:o,valid:s,value:n}=e,{class:a,key:r,max:l,min:d,readOnly:c}=t,{timeZone:u}=this,p={afterCreate:this._afterDateComponentCreate,afterUpdate:this._afterDateComponentCreateOrUpdate,"aria-invalid":!s,numberingSystem:E,overlayPositioning:"fixed",readOnly:c,[Q]:o,onfocus:this._onComponentFocus},m=j(n,u),h=j(l,u),v=j(d,u);return z("div",{class:f.dateInputContainer,key:`${r}-date-time-container`},z("calcite-input-date-picker",{...p,class:a,"data-date-part":"date",key:`${r}-date-input`,max:h?.date??void 0,min:v?.date??void 0,onblur:e=>{this._focusedFieldName=null,this._saveValueFromDateComponent(e.target)},value:m.date??void 0,onCalciteInputDatePickerChange:e=>this._saveValueFromDateComponent(e.currentTarget)}),i?z("calcite-input-time-picker",{...p,class:a,"data-date-part":"time",key:`${r}-time-input`,onblur:e=>{this._focusedFieldName=null,this._saveValueFromDateComponent(e.target)},step:1,value:m.time??void 0,onCalciteInputTimePickerChange:e=>this._saveValueFromDateComponent(e.currentTarget)}):null)}_renderReadOnlyComponent(e,t){const i=this.getCommonInputProps(e);return z("calcite-input",{...i,class:this.classes(f.fieldInput,f.inputDisabled),readOnly:!0,type:"text",value:null!=t?`${t}`:i.value})}_renderComboBoxComponent(e,t,i){const{value:o,name:s}=e,{viewModel:n,_inputsWithChanges:a}=this,r="INSERT"===n.editType,l=a.has(s),d=null==o&&(!r||l),c=r&&e.showNoValueOptionEnabled&&!l?()=>{}:i.onblur;return z("calcite-combobox",{...i,allowCustomValues:!1,clearDisabled:!0,onblur:c,overlayPositioning:"fixed",selectionMode:"single",onCalciteComboboxChange:({currentTarget:t})=>{d&&0===t.selectedItems.length?this._ignoreDeselectionOfNoValueOption(t):e.isSubtypeField&&0===t.selectedItems.length?t.value=`${e.value}`:this._saveValueFromComponent(t)}},this.renderComboboxOptionsList(e,t))}renderComboboxOptionsList(e,t){const{value:i,name:o}=e,{messages:s,messagesTemplates:n,viewModel:a,_inputsWithChanges:r}=this,[l,d,c]=t.map(e=>e.map(({name:e,value:t})=>z("calcite-combobox-item",{heading:e,key:`#${t}`,selected:i===t,value:`${t}`}))),u=[];d.length>0&&u.push(z("calcite-combobox-item-group",{key:"other",label:n.other},d)),c.length>0&&u.push(z("calcite-combobox-item-group",{key:"unsupported",label:s.subtypes.unsupportedDomainGroupTitle},c)),u.length>0?u.unshift(z("calcite-combobox-item-group",{key:"recommended",label:s.recommended},l)):u.push(...l);const p="INSERT"===a.editType,m=r.has(o),h=null==i&&(!p||m);return e.showNoValueOptionEnabled&&u.unshift(z("calcite-combobox-item",{heading:e.showNoValueLabel||s.empty,key:"empty-option",selected:h,value:""})),u}_renderRadioButtonComponents(e,t,i){const{name:o,value:s}=e,n=t.map(({name:e,value:t})=>this._renderRadioButtonComponent({key:e,label:e,name:o,value:t,selected:t===s,props:i}));if(e.showNoValueOptionEnabled){const t="",a=e.showNoValueLabel||this.messages.empty,r=s===t||null===s;n.unshift(this._renderRadioButtonComponent({key:"empty-option",label:a,name:o,value:t,selected:r,props:i}))}return z("calcite-radio-button-group",{afterCreate:this._afterRadioGroupCreateOrUpdate,afterUpdate:this._afterRadioGroupCreateOrUpdate,class:f.inputRadioGroup,"data-field-name":i[Q],key:`${i.key}-radio-group`,layout:"vertical",name:i.key,required:i.required},n)}_renderSwitchComponent(e,t){const{value:i}=e,o=!!I(e.element,"switch")&&i===e.element.input.onValue;return z("calcite-switch",{...t,checked:o,class:f.inputSwitch,disabled:t.readOnly,onblur:()=>{this._focusedFieldName=null},onCalciteSwitchChange:e=>this._saveValueFromComponent(e.currentTarget)})}_renderRadioButtonComponent({key:e,name:t,value:i,selected:o,label:s,props:n}){return z("calcite-label",{class:f.inputRadioLabel,key:e,layout:"inline"},z("calcite-radio-button",{...n,afterCreate:void 0,afterUpdate:void 0,checked:o,class:f.inputRadio,disabled:n.readOnly,name:t,onblur:()=>{this._focusedFieldName=null},value:i,onCalciteRadioButtonChange:({currentTarget:e})=>{e.checked&&this._saveValueFromComponent(e)}}),s)}_renderAuxiliaryText(e){const t=e.name,i=this._inputsWithChanges.has(t)&&!e.submittable?N(e,this.messages,this.timeZone):null!=this.viewModel.contingencyConstraintViolations.get(t)?this.messages.validationErrors.valuesIncompatible:null!=e.valueExpressionExecutor&&e.valueExpressionExecutor.stale?this.messages.valueExpressionError:null;return null!=i?z("calcite-input-message",{icon:!0,status:"invalid"},i):this._inputsWithChanges.has(t)&&e.valueIsOutOfDomain?z("calcite-input-message",{icon:!0,status:"idle"},this.messages.subtypes.fieldOutOfSubtypeDomainWarning):this._renderDescriptionOrEmpty(e.description)}_renderShowAllRelatedRecordsListItem(e){if(!e.showAllActionVisible||!this.callbacks?.showAllRelatedRecords)return;const i=this.messages;return z("calcite-list-item",{description:t(i.totalCount,{count:e.featureCount}),key:"show-all-related-features",label:i.showAll,value:!0,onCalciteListItemSelect:()=>this._onShowAllRelatedRecordsClick(e.relationshipId)},z("calcite-icon",{icon:"list",scale:"s",slot:"content-end"}))}_renderAddRelatedRecordButton(e){const{canAddRelatedFeature:t,relationshipId:i,relatedLayer:o,editable:s}=e,{messages:n,callbacks:a,disabled:r}=this,l=!s||r;if(t&&a?.addRelatedRecord&&o&&!l)return z("calcite-button",{alignment:"center",appearance:"outline-fill",class:f.centeredButton,disabled:e.updating||!e.originHasValidKey,iconStart:"plus",key:`${i}-add-button`,onclick:()=>{!e.updating&&e.originHasValidKey&&this._onAddRelatedRecordsClick(e,i,o)},round:!0,scale:"s",width:"full"},e.relatedLayerIsTable?n.addRecord:n.addFeature)}_renderRelatedRecordListItem(e,t,i){const{feature:o,description:s,title:n}=e,{feature:a,callbacks:r}=this,{highlightHelper:l}=this.viewModel,d=()=>{l?.removeAll(),r?.editRelatedRecord&&a&&r.editRelatedRecord({parentFeature:a,relationshipId:t,relatedFeature:o,readOnly:i})},c=l?()=>l.add(o):void 0,u=l?()=>l.remove(o):void 0;return z("calcite-list-item",{bind:this,description:s,key:`${t}-${o.uid}`,label:n,onmouseenter:c,onmouseleave:u,value:n,onCalciteListItemSelect:d},z("calcite-icon",{icon:M(o),slot:"content-start"}),z("calcite-icon",{icon:"chevron-right",scale:"s",slot:"content-end"}))}_renderRelationshipInput(e){if(!this._relatedRecordsEnabled)return;const{relationshipId:t,activeCategory:i}=e,o=i?null:this._renderDescriptionOrEmpty(e.description);return z("calcite-label",{class:this.classes(f.label,f.relatedRecordsLabel),key:`relationship-${t}-container`},z("div",null,this._renderRelatedRecordsHeaderContainer(e),o,this._renderRelationshipInputContent(e)),this._renderAddRelatedRecordButton(e))}_renderRelationshipInputContent(e){return e.featureCount>0?this._renderRelatedRecordsList(e):e.activeCategory&&0===e.featureCount?this._renderNoRelatedRecordsNotice():e.allCategories?.length?this._renderCategoryList(e):e.loaded?e.originHasValidKey?this._renderNoRelatedRecordsNotice():this._renderNoValidOriginKeyNotice(e):void 0}_renderCategoryList(e){return z("calcite-list",{displayMode:"flat",label:this.messages.relatedRecordsList,loading:e.updating},e.categories?.map(t=>this._renderCategory(e,t)),this._renderShowAllCategoriesListItem(e))}_renderCategory(e,t){const{count:o,name:s,value:n}=t,a=i(o);return z("calcite-list-item",{key:`${s}-${n}`,label:s,onCalciteListItemSelect:()=>this._selectCategory(e,t)},z("calcite-chip",{label:a,scale:"s",slot:"content-end"},a),z("calcite-icon",{flipRtl:!0,icon:"chevron-left",scale:"s",slot:"content-end"}))}_selectCategory(e,t){this.relationshipId=e.relationshipId,e.activeCategory=t}_renderShowAllCategoriesListItem(e){if(!e.showAllCategoriesVisible)return;const i=this.messages;return z("calcite-list-item",{description:t(i.totalCount,{count:e.allCategories?.length??0}),key:"show-all-categories",label:i.showAll,value:!0,onCalciteListItemSelect:()=>e.showAllEnabled=!0},z("calcite-icon",{icon:"list",scale:"s",slot:"content-end"}))}_renderRelatedRecordsHeaderContainer(e){const t=e.updating||!e.loaded;return z("div",{class:f.relatedRecordsHeader,key:`relationship-${e.relationshipId}-header`},z("span",null,e.label),t?z("calcite-loader",{inline:!0,key:"loader",label:this.messagesCommon?.loading,scale:"s",type:"indeterminate"}):void 0)}_renderRelatedRecordsList(e){const{relationshipId:t,editable:i}=e,{disabled:o}=this,s=!i||o;return z("calcite-list",{class:f.relatedRecordsList,label:this.messages?.relatedRecordsList},e.relatedFeatureInfos.map(e=>this._renderRelatedRecordListItem(e,t,s)),this._renderShowAllRelatedRecordsListItem(e),this._renderObserverNode())}_renderNoValidOriginKeyNotice(e){const{messages:i}=this,o=e.relatedLayerIsTable?i.noOriginKeyRecord:i.noOriginKeyFeature,s=e.relationship?.keyField,n=this.viewModel.findField(s),a=e.layer?.fieldsIndex.get(s),r=n?.label||a?.alias||s,l=t(o,{relatedLayerName:e.relatedLayer?.title,originKeyField:r});return z("calcite-notice",{icon:"information",kind:"brand",open:!0,scale:"s",width:"full"},z("div",{slot:"message"},l))}_renderNoRelatedRecordsNotice(){return z("calcite-notice",{icon:"information",kind:"brand",open:!0,scale:"s",width:"full"},z("div",{slot:"message"},this.messagesFeature.noRelatedFeatures))}_renderObserverNode(){if(this.viewModel.activeRelationshipInput?.showAllEnabled)return z("div",{afterCreate:this._afterListObserverCreated,afterRemoved:this._afterListObserverRemoved,bind:this,class:f.listObserver,key:"feature-observer"})}_renderTextElementInput(e){return z("div",{class:f.textElement,"data-testid":`text-element-${e.label}`,innerHTML:e.text,key:e.id})}getCommonInputProps(e){const{disabled:t}=this,{editable:i,hint:o,label:s,maxLength:n,minLength:a,name:r,range:{max:l,min:d},required:c,valid:u,value:p}=e,m=this._inputsWithChanges.has(r),h=!i||t;return{afterCreate:this._afterComponentCreate,afterUpdate:this._afterComponentCreateOrUpdate,"aria-invalid":u?"false":"true",class:this.classes(f.fieldInput,h?f.inputDisabled:null),status:m&&!u?"invalid":"idle",key:r,label:s,max:null!=l?l:void 0,min:null!=d?d:void 0,maxLength:n>-1?n:void 0,minLength:a>-1?a:void 0,placeholder:o??void 0,readOnly:h,required:c,value:null==p?"":`${p}`,onblur:this._onComponentBlur,onfocus:this._onComponentFocus,onkeydown:this._onComponentKeyDown,[Q]:r}}_getFieldInputFromHTMLElement(e){return this.viewModel.findField(e.getAttribute(Q))}_afterDateComponentCreate(e){const t=this._getFieldInputFromHTMLElement(e),i=e.dataset.datePart,o=this._dateComponentMap.get(t.name);if("valueAsDate"in e&&null!=e.value&&null!=t.value){const i=new ResizeObserver(()=>{switch(e.value=void 0,t.field.type){case"date":e.value=j(t.value,this.timeZone).date??"";break;case"timestamp-offset":e.value=$(t.value,this.timeZone).date??"";break;default:e.value=`${t.value}`}i.unobserve(e)});i.observe(e)}if(null!=o)switch(i){case"date":o.date=e;break;case"time":o.time=e;break;case"timeZone":o.timeZone=e}else this._dateComponentMap.set(t.name,{[i]:e});this._afterDateComponentCreateOrUpdate(e)}_afterDateComponentCreateOrUpdate(e){this._afterComponentCreateOrUpdate(e)}_afterComponentCreate(e){const t=this._getFieldInputFromHTMLElement(e);L(t)&&null!=e.value&&"setNumberValue"in e&&e.setNumberValue({committing:!1,value:e.value,origin:"direct"}),this._afterComponentCreateOrUpdate(e)}_afterRadioGroupCreateOrUpdate(e){const t=e.selectedItem,i=e.querySelector("calcite-radio-button"),o=t||i;o&&this._afterComponentCreateOrUpdate(o)}_afterComponentCreateOrUpdate(e){const{viewModel:t}=this,i=this._getFieldInputFromHTMLElement(e),o=t.findField(this._focusedFieldName);this._attemptFocusOnNextRender&&o===i&&(this._attemptFocusOnNextRender=!1,O(i)&&(i.group.open=!0),J(e))}async _afterGroupCreate(e){const t=this.viewModel.findGroup(e.id),i=this.viewModel.findField(this._focusedFieldName);i&&t&&T(i,t)&&(!i.editable||this.disabled)&&(await e.componentOnReady(),this._attemptFocusOnNextRender=!0,this.scheduleRender())}_onComponentFocus(e){const t=e.target,i=this._getFieldInputFromHTMLElement(t);this._focusedFieldName=i.name}_onComponentBlur(e){const t=e.target;this._focusedFieldName=null;"readOnly"in t&&t.readOnly||this._saveValueFromComponent(t)}_saveValueFromDateComponent(e){const{timeZone:t}=this,i=this._getFieldInputFromHTMLElement(e),o=i.field.type,{name:s,range:n}=i,a=this._dateComponentMap.get(s);if(!a)return;let r=this.viewModel.getValue(s),l=null;"date-only"===o?l=Array.isArray(e.value)?e.value[0]:e.value:"time-only"===o?(r=P(r),l=P(e.value)):l="timestamp-offset"===o?null!=e.value?G({dateComponent:a.date,timeComponent:a.time,timeZoneComponent:a.timeZone,oldValue:r,defaultTimeZone:t}):null:null!=e.value?H({oldValue:r,dateComponent:a.date,timeComponent:a.time,timeZone:t,max:n.max,min:n.min}):null,null!==l&&e.value?r!==l&&this._updateFieldValue(s,l):this._updateFieldValue(s,null)}_saveValueFromComponent(e){const t=this._getFieldInputFromHTMLElement(e),i=this._parseValue(e),o=t.value;t.isSubtypeField&&A(this.layer,o,i)?this._pendingSubtypeChoice||i===o||(this._pendingSubtypeChoice=this._handleSubtypeChoice(t,i)):this._updateFieldValue(t.name,i)}async _handleSubtypeChoice(e,i){const{value:o,name:s}=e,{messages:a,viewModel:r,messagesCommon:l,_subtypes:d}=this;if(this._updateFieldValue(s,i),!d?.length)return;const c=d.find(e=>e.code===i),u=d.find(e=>e.code===o)?.name??`${o}`;if(!c)return;const p=n();r.pendingSubtypeChoice=p;let m="update-fields";const h=[{label:a.subtypes.useDefaultValuesOption,value:"update-fields"},{label:a.subtypes.keepCurrentValuesOption,value:"keep-existing"}],v={context:"info",title:a.subtypes.changeWarningTitle,message:t(a.subtypes.changeWarning,{originalType:u,newType:c.name}),radios:h,defaultRadioSelection:"update-fields",onRadioSelection:e=>m=e,actions:{primary:{label:l.apply,action:()=>p.resolve(m),type:"positive"},secondary:{label:l.cancel,type:"neutral",action:()=>p.resolve("undo")}},cancel:()=>p.reject()};try{this.showPrompt(v);switch(await p.promise){case"update-fields":r.applySubtypeDefaults(c),this._validateContingenciesForNonNullFields();break;case"keep-existing":this._validateContingenciesForNonNullFields();break;case"undo":this._updateFieldValue(e.name,o)}}finally{r.pendingSubtypeChoice=null,this.clearPrompt(),this._pendingSubtypeChoice=null}}_onComponentKeyDown({key:e,target:t}){const i=this._getFieldInputFromHTMLElement(t);"Enter"===e&&O(i)&&!i.group.open&&(i.group.open=!0)}_updateFieldValue(e,t){const i=this.viewModel.getValue(e);this.viewModel.setValue(e,t),this._inputsWithChanges.add(e);i!==t&&this.viewModel.fieldsWithContingentValues.has(e)&&this._validateContingenciesForNonNullFields()}_validateContingenciesForNonNullFields(){const e=Object.fromEntries(Object.entries(this.getValues()).filter(([e,t])=>null!=t));this.viewModel.validateContingencyConstraints(e)}_parseValue(e){const t=this._getFieldInputFromHTMLElement(e),i=e.value;return I(t.element,"switch")?e.checked?t.element.input.onValue:t.element.input.offValue:null==i||""===i?null:"number"===t.dataType?"-0"===i||"-0."===i||"-0,"===i?i:parseFloat(i):"date"===t.field.type?parseFloat(i):i}_ignoreDeselectionOfNoValueOption(e){const{firstChild:t,selectedItems:i}=e;0===i.length&&t&&"selected"in t?t.selected=!0:s.getLogger(this).warnOnce("Failed to override user attempt to deselect 'No value' option.")}_onGroupToggle(e,t){e.expanded?(t.open=!0,this._focusedFieldName=this._getFocusableInput("forward",t)?.name||null,this._attemptFocusOnNextRender=!0,"sequential"===this.groupDisplay&&this.viewModel.allGroupInputs.forEach(e=>{e!==t&&(e.open=!1)})):t.open=!1,this.scheduleRender()}_onFormSubmit(e){e.preventDefault()}_onFormKeyDown(e){"Enter"===e.key&&this.viewModel.submit()}_afterListObserverCreated(e){this.viewModel.activeRelationshipInput&&(this._listObserverNode=e)}_afterListObserverRemoved(){this._listObserverNode=null}_onObserverChange(){this._listObserverNode&&this._listObserver.unobserve(this._listObserverNode);const e=this.viewModel.activeRelationshipInput;e&&this._listObserverNode&&e.showAllEnabled&&this._listObserver.observe(this._listObserverNode)}_incrementRelatedRecordPage(){const e=this.viewModel.activeRelationshipInput;e?.incrementPage()}_syncGroupInputStates(){if("sequential"!==this.groupDisplay)return;const e=this.viewModel.allGroupInputs;if(!e.length)return;const t=e.filter(e=>e.open);0===t.length?e[0].open=!0:t.length>1&&t.slice(1).forEach(e=>e.open=!1)}get test(){return{inputsWithChanges:this._inputsWithChanges,updateValue:this._saveValueFromComponent.bind(this)}}};e([c()],X.prototype,"_listObserverNode",void 0),e([c()],X.prototype,"_relatedRecordsEnabled",null),e([c()],X.prototype,"_utilityNetworkAssociationsEnabled",null),e([c()],X.prototype,"_prompt",void 0),e([c()],X.prototype,"_subtypes",null),e([c()],X.prototype,"associationId",null),e([c()],X.prototype,"associatedLayer",null),e([c()],X.prototype,"disabled",null),e([c()],X.prototype,"feature",null),e([c()],X.prototype,"_featureFormUNAssociationList",void 0),e([c()],X.prototype,"formTemplate",null),e([c()],X.prototype,"groupDisplay",void 0),e([c()],X.prototype,"headingLevel",void 0),e([c()],X.prototype,"icon",null),e([c()],X.prototype,"label",null),e([c()],X.prototype,"layer",null),e([c()],X.prototype,"map",null),e([c(),K("esri/widgets/FeatureForm/t9n/FeatureForm")],X.prototype,"messages",void 0),e([c(),K("esri/t9n/common")],X.prototype,"messagesCommon",void 0),e([c(),K("esri/widgets/Feature/t9n/Feature")],X.prototype,"messagesFeature",void 0),e([c(),K("esri/widgets/FeatureTemplates/t9n/FeatureTemplates")],X.prototype,"messagesTemplates",void 0),e([c()],X.prototype,"callbacks",null),e([c()],X.prototype,"relationshipId",null),e([c()],X.prototype,"spatialReference",null),e([c()],X.prototype,"strict",null),e([c()],X.prototype,"timeZone",null),e([c()],X.prototype,"showPrompt",null),e([c()],X.prototype,"clearPrompt",null),e([c({type:x}),q(["value-change","submit"])],X.prototype,"viewModel",void 0),e([c({type:D,nonNullable:!0})],X.prototype,"visibleElements",void 0),e([c()],X.prototype,"test",null),X=e([u("esri.widgets.FeatureForm")],X);const Y=X;export{Y 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 t from"../../../core/Accessor.js";import{watch as i,when as n,initial as o}from"../../../core/reactiveUtils.js";import{renderingSanitizer as s,stripHTMLSanitizer as l}from"../../../core/sanitizerUtils.js";import{property as r,subclass as a}from"../../../core/accessorSupport/decorators.js";import{css as c}from"./ColumnCSS.js";import{isEmptyStringOrWhitespace as d}from"../support/tableUtils.js";import{autoLink as p}from"../../support/uriUtils.js";import{setFocus as u}from"../../support/widgetUtils.js";const m=/<br\s*\/*>/gi;let h=class extends t{constructor(e){super(e),this._menuIsOpen=!1,this.autoWidth=!1,this.cellValueFormatFunction=({root:e,rowData:t,value:i})=>{const{formatFunction:n}=this,o=this.sanitizeContent(i);if(n&&t){const{index:i,item:{attachments:s,feature:l,relatedRecords:r}}=t;return n({attachments:s,column:this,feature:l,index:i,relatedRecords:r,value:o,virtualIndex:this.getVirtualRowIndex(e),field:void 0})}return o},this.description=null,this.direction=null,this.fieldName=null,this.flexGrow=1,this.footerRenderFunction=null,this.formatFunction=null,this.frozen=!1,this.frozenToEnd=!1,this.grid=null,this.headerRenderFunction=e=>{const{root:t}=e,i=this.createHeaderContent();this.removeCellContent(t),t.appendChild(i)},this.hidden=!1,this.icon=null,this.iconText=null,this.initialSortPriority=null,this.label=null,this.labelTooltipText=null,this.menuConfig=null,this.messages=null,this.messagesCommon=null,this.messagesURIUtils=null,this.renderFunction=({root:e,rowData:t})=>{const i=this.getCellValue(t),n=this.cellValueFormatFunction({root:e,rowData:t,value:i});let o=null;if(o=n instanceof HTMLElement?n:p(this.messagesURIUtils,n),this.removeCellContent(e),o instanceof HTMLElement)e.removeAttribute("title"),e.appendChild(o);else if(null!=o){const t=o.toString();e.innerHTML=t,e.title=t}},this.resizable=!0,this.sortable=!1,this.store=null,this.textAlign="start",this.textWrap=!1,this.timeZone=null,this.visibleElements=null,this.width=200}initialize(){const{fieldName:e}=this;this._set("sortElement",this.createSortElement()),this.sortElement.setAttribute("path",e),this.addHandles([i(()=>this.direction,e=>{const{sortElement:t}=this;this.effectiveSortable&&t&&(e?this.sortElement.direction!==e&&t.setAttribute("direction",e):t.removeAttribute("direction"))}),n(()=>this.grid?.isReady&&this.sortElement,()=>{const{direction:e,grid:t,hidden:i,sortElement:n}=this;i&&e&&n&&t&&!t.hasSorter(n)&&t.addSorter(n)},o),i(()=>[this.timeZone,this.icon,this.iconText,this.labelTooltipText],()=>this.grid?.requestContentUpdate()),i(()=>this.hidden,()=>this.closeMenu()),i(()=>this.fieldName,e=>{const{sortElement:t}=this;t&&t.path!==e&&t.setAttribute("path",e)}),i(()=>[this.effectiveLabel,this.labelTooltipText],([e,t])=>{const{sortElement:i}=this;i&&(i.setAttribute("title",t||e),i.textContent=e)})])}get _headerRequiresTextContainer(){return!(!this.effectiveSortable&&""===this.effectiveLabel&&null==this.effectiveDescription)}get customMenuItems(){return this.menuConfig?.items?.map(({disabled:e,hidden:t,icon:i,iconClass:n,label:o,selected:s,clickFunction:l})=>this.createCalciteDropdownItem({disabled:e,hidden:t,iconClass:n,iconStart:i,selected:s,textContent:o,onclick:e=>l(e)}))??[]}get defaultMenuItems(){if(!this.effectiveSortable)return[];const e=this.messages,t=[],i=this.visibleElements?.columnMenuItems;if(!1!==i?.sortAscending){const i=this.createCalciteDropdownItem({iconStart:"sort-ascending-arrow",textContent:e?.sortAsc,onclick:()=>this.direction="asc"});t.push(i)}if(!1!==i?.sortDescending){const i=this.createCalciteDropdownItem({iconStart:"sort-descending-arrow",textContent:e?.sortDesc,onclick:()=>this.direction="desc"});t.push(i)}return t}get effectiveDescription(){const{description:e}=this;return d(e)?null:this.sanitizeLabel(e)}get effectiveLabel(){return this.sanitizeLabel(this.label||this.fieldName)}get effectiveSortable(){return this.sortable}get iconNode(){const{icon:e,iconText:t}=this,i=t?this.sanitizeLabel(t):void 0;return e?this.createCalciteIcon({icon:e,textLabel:i}):null}set invalid(e){this._set("invalid",e),this.grid?.generateCellPartNames()}get invalid(){return this._get("invalid")??!1}get menu(){const{customMenuItems:e,defaultMenuItems:t,menuConfig:i}=this,n=!!i?.open,o=this.createCalciteAction({icon:i?.icon??"ellipsis",text:this.messages?.menu??"",slot:"trigger"}),s=document.createElement("calcite-dropdown");if(s.maxItems=i?.maxItems??4,s.placement="top-end",s.scale=i?.scale??"m",n&&(s.open=n,this._menuIsOpen=!0),s.appendChild(o),s.addEventListener("calciteDropdownOpen",()=>this._menuIsOpen=!0),s.addEventListener("calciteDropdownClose",()=>this._menuIsOpen=!1),s.onkeydown=this._stopPropagationOnSelect,s.addEventListener("mousewheel",e=>{e.stopPropagation()}),t.length){const e=s.appendChild(document.createElement("calcite-dropdown-group"));e.selectionMode="none",e.append(...t)}if(e.length){const t=s.appendChild(document.createElement("calcite-dropdown-group"));t.selectionMode=i?.selectionMode??"none",t.append(...e)}return s}get menuItems(){return[...this.defaultMenuItems,...this.customMenuItems]}get menuIsOpen(){return this._menuIsOpen}get menuIsVisible(){return!(!1===this.visibleElements?.columnMenus||!this.menuItems.length)}get tableTimeZone(){return this.store.timeZone}closeMenu(){this.menu.open=!1}createSortElement(){const{effectiveLabel:e,direction:t,fieldName:i,initialSortPriority:n}=this,o=document.createElement("vaadin-grid-sorter");return o.classList.add(c.sorter),o.setAttribute("path",i),o.setAttribute("title",this.labelTooltipText||e),o.textContent=e,t&&o.setAttribute("direction",t),null!=n&&(o._initialOrder=n),o.addEventListener("direction-changed",()=>{this.direction!==o.direction&&this._set("direction",o.direction)}),o}createCalciteAction(e){const t=document.createElement("calcite-action"),{alignment:i,appearance:n,className:o,disabled:s,icon:l,label:r,scale:a,slot:c,text:d,textEnabled:p,onclick:u}=e;return t.alignment=i??"center",t.appearance=n??"transparent",t.className=o??"",t.disabled=!!s,t.icon=l??"",t.label=r??"",t.scale=a??"s",t.slot=c??"",t.text=t.title=d??"",t.textEnabled=!!p,t.onclick=u??null,t}createCalciteButton(e){const t=document.createElement("calcite-button"),{alignment:i,appearance:n,className:o,disabled:s,iconEnd:l,iconFlipRtl:r,kind:a,loading:c,onclick:d,scale:p,textContent:u,title:m,width:h}=e;return t.alignment=i??"center",t.className=o??"",t.scale=p??"s",t.appearance=n??"transparent",t.disabled=!!s,t.iconEnd=l??"",r&&(t.iconFlipRtl=r),t.kind=a??"brand",t.loading=!!c,t.textContent=u??"",m&&(t.title=m),t.width=h??"auto",t.onclick=d??null,t}createCalciteDropdownItem(e){const t=document.createElement("calcite-dropdown-item"),{disabled:i,hidden:n,iconClass:o,iconStart:s,textContent:l,onclick:r,selected:a}=e,d=l??"";if(o&&!s){const e=document.createElement("span"),i=document.createElement("span");i.classList.add(c.headerMenuIcon,o),e.textContent=e.title=d,e.insertBefore(i,e.firstChild),t.appendChild(e)}else t.iconStart=s??"",t.textContent=t.title=d;return t.disabled=!!i,t.hidden="function"==typeof n?n():!!n,t.selected=!!a,r&&(t.addEventListener("calciteDropdownItemSelect",r),t.onkeydown=this._stopPropagationOnSelect),t}createCalciteIcon(e){const{effectiveLabel:t}=this,{icon:i,scale:n,textLabel:o}=e,s=document.createElement("calcite-icon"),l=o??t;return s.icon=i,s.scale=n??"s",s.textLabel=l,s.title=l,s}createHeaderContent(){const{effectiveDescription:e,effectiveLabel:t,iconNode:i}=this,n=document.createElement("div");if(n.classList.add(c.headerContent),i&&n.appendChild(i),!this._headerRequiresTextContainer)return n;const o=n.appendChild(document.createElement("div"));return this.effectiveSortable?o.appendChild(this.sortElement):""!==t&&o.appendChild(this._createHeaderTextElement({label:t,cssClass:c.headerLabel,title:this.labelTooltipText})),null!=e&&!1!==this.visibleElements?.columnDescriptions&&o.appendChild(this._createHeaderTextElement({label:e,cssClass:c.headerDescription})),this.menuIsVisible&&n.appendChild(this.menu),n}getCellValue(e){return e?.item.feature.attributes?.[this.fieldName]}getVirtualRowIndex(e){const t=this.grid?.getRowContainingNode(e);return t?.parentElement?[...t.parentElement.children].indexOf(t):-1}removeCellContent(e){if(e&&e.firstChild)try{for(;e?.firstChild;)e?.removeChild(e.firstChild)}catch(t){}}openMenu(){this.menuIsVisible&&(this.menu.open=!0,u(this.menuItems[0]))}sanitizeContent(e){return s.sanitize(e)}sanitizeLabel(e){return null==e||""===e?"":l.sanitize(e.toString()).replaceAll(m," ")}sort(){this.effectiveSortable&&this.sortElement?.click()}_stopPropagationOnSelect(e){"Enter"!==e.key&&" "!==e.key||e.stopPropagation()}_createHeaderTextElement({cssClass:e,label:t,title:i}){const n=document.createElement("span");n.classList.add(e);const o=n.appendChild(document.createElement("span"));return o.textContent=t,o.setAttribute("title",i||t),n}};e([r()],h.prototype,"_headerRequiresTextContainer",null),e([r()],h.prototype,"_menuIsOpen",void 0),e([r()],h.prototype,"autoWidth",void 0),e([r()],h.prototype,"cellValueFormatFunction",void 0),e([r()],h.prototype,"customMenuItems",null),e([r()],h.prototype,"defaultMenuItems",null),e([r()],h.prototype,"description",void 0),e([r()],h.prototype,"direction",void 0),e([r()],h.prototype,"effectiveDescription",null),e([r()],h.prototype,"effectiveLabel",null),e([r()],h.prototype,"effectiveSortable",null),e([r({constructOnly:!0})],h.prototype,"fieldName",void 0),e([r()],h.prototype,"flexGrow",void 0),e([r()],h.prototype,"footerRenderFunction",void 0),e([r()],h.prototype,"formatFunction",void 0),e([r()],h.prototype,"frozen",void 0),e([r()],h.prototype,"frozenToEnd",void 0),e([r()],h.prototype,"grid",void 0),e([r()],h.prototype,"iconNode",null),e([r()],h.prototype,"invalid",null),e([r()],h.prototype,"headerRenderFunction",void 0),e([r()],h.prototype,"hidden",void 0),e([r()],h.prototype,"icon",void 0),e([r()],h.prototype,"iconText",void 0),e([r({constructOnly:!0})],h.prototype,"initialSortPriority",void 0),e([r()],h.prototype,"label",void 0),e([r()],h.prototype,"labelTooltipText",void 0),e([r()],h.prototype,"menu",null),e([r()],h.prototype,"menuItems",null),e([r()],h.prototype,"menuConfig",void 0),e([r()],h.prototype,"menuIsOpen",null),e([r()],h.prototype,"menuIsVisible",null),e([r()],h.prototype,"messages",void 0),e([r()],h.prototype,"messagesCommon",void 0),e([r()],h.prototype,"messagesURIUtils",void 0),e([r()],h.prototype,"renderFunction",void 0),e([r()],h.prototype,"resizable",void 0),e([r()],h.prototype,"sortable",void 0),e([r({readOnly:!0})],h.prototype,"sortElement",void 0),e([r()],h.prototype,"store",void 0),e([r()],h.prototype,"tableTimeZone",null),e([r()],h.prototype,"textAlign",void 0),e([r()],h.prototype,"textWrap",void 0),e([r()],h.prototype,"timeZone",void 0),e([r()],h.prototype,"visibleElements",void 0),e([r()],h.prototype,"width",void 0),h=e([a("esri.widgets.FeatureTable.Grid.Column")],h);const f=h;export{f as default};
5
+ import{__decorate as e}from"tslib";import t from"../../../core/Accessor.js";import{watch as i,when as n,initial as o}from"../../../core/reactiveUtils.js";import{renderingSanitizer as s,stripHTMLSanitizer as l}from"../../../core/sanitizerUtils.js";import{property as r,subclass as a}from"../../../core/accessorSupport/decorators.js";import{css as c}from"./ColumnCSS.js";import{isEmptyStringOrWhitespace as d}from"../support/tableUtils.js";import{autoLink as p}from"../../support/uriUtils.js";import{setFocus as u}from"../../support/widgetUtils.js";const m=/<br\s*\/*>/gi;let h=class extends t{constructor(e){super(e),this._menuIsOpen=!1,this.autoWidth=!1,this.cellValueFormatFunction=({root:e,rowData:t,value:i})=>{const{formatFunction:n}=this,o=this.sanitizeContent(i);if(n&&t){const{index:i,item:{attachments:s,feature:l,relatedRecords:r}}=t;return n({attachments:s,column:this,feature:l,index:i,relatedRecords:r,value:o,virtualIndex:this.getVirtualRowIndex(e),field:void 0})}return o},this.description=null,this.direction=null,this.fieldName=null,this.flexGrow=1,this.footerRenderFunction=null,this.formatFunction=null,this.frozen=!1,this.frozenToEnd=!1,this.grid=null,this.headerRenderFunction=e=>{const{root:t}=e,i=this.createHeaderContent();this.removeCellContent(t),t.appendChild(i)},this.hidden=!1,this.icon=null,this.iconText=null,this.initialSortPriority=null,this.label=null,this.labelTooltipText=null,this.menuConfig=null,this.messages=null,this.messagesCommon=null,this.messagesURIUtils=null,this.renderFunction=({root:e,rowData:t})=>{const i=this.getCellValue(t),n=this.cellValueFormatFunction({root:e,rowData:t,value:i});let o=null;if(o=n instanceof HTMLElement?n:p(this.messagesURIUtils,n),this.removeCellContent(e),o instanceof HTMLElement)e.removeAttribute("title"),e.appendChild(o);else if(null!=o){const t=o.toString();e.innerHTML=t,e.title=t}},this.resizable=!0,this.sortable=!1,this.store=null,this.textAlign="start",this.textWrap=!1,this.timeZone=null,this.visibleElements=null,this.width=200}initialize(){const{fieldName:e}=this;this._set("sortElement",this.createSortElement()),this.sortElement.setAttribute("path",e),this.addHandles([i(()=>this.direction,e=>{const{sortElement:t}=this;this.effectiveSortable&&t&&(e?this.sortElement.direction!==e&&t.setAttribute("direction",e):t.removeAttribute("direction"))}),n(()=>this.grid?.isReady&&this.sortElement,()=>{const{direction:e,grid:t,hidden:i,sortElement:n}=this;i&&e&&n&&t&&!t.hasSorter(n)&&t.addSorter(n)},o),i(()=>[this.timeZone,this.icon,this.iconText,this.labelTooltipText],()=>this.grid?.requestContentUpdate()),i(()=>this.hidden,()=>this.closeMenu()),i(()=>this.fieldName,e=>{const{sortElement:t}=this;t&&t.path!==e&&t.setAttribute("path",e)}),i(()=>[this.effectiveLabel,this.labelTooltipText],([e,t])=>{const{sortElement:i}=this;i&&(i.setAttribute("title",t||e),i.textContent=e)})])}get _headerRequiresTextContainer(){return!(!this.effectiveSortable&&""===this.effectiveLabel&&null==this.effectiveDescription)}get customMenuItems(){return this.menuConfig?.items?.map(({disabled:e,hidden:t,icon:i,iconClass:n,label:o,selected:s,clickFunction:l})=>this.createCalciteDropdownItem({disabled:e,hidden:t,iconClass:n,iconStart:i,selected:s,textContent:o,onclick:e=>l(e)}))??[]}get defaultMenuItems(){if(!this.effectiveSortable)return[];const e=this.messages,t=[],i=this.visibleElements?.columnMenuItems;if(!1!==i?.sortAscending){const i=this.createCalciteDropdownItem({iconStart:"sort-ascending-arrow",textContent:e?.sortAsc,onclick:()=>this.direction="asc"});t.push(i)}if(!1!==i?.sortDescending){const i=this.createCalciteDropdownItem({iconStart:"sort-descending-arrow",textContent:e?.sortDesc,onclick:()=>this.direction="desc"});t.push(i)}return t}get effectiveDescription(){const{description:e}=this;return d(e)?null:this.sanitizeLabel(e)}get effectiveLabel(){return this.sanitizeLabel(this.label||this.fieldName)}get effectiveSortable(){return this.sortable}get iconNode(){const{icon:e,iconText:t}=this,i=t?this.sanitizeLabel(t):void 0;return e?this.createCalciteIcon({icon:e,textLabel:i}):null}set invalid(e){this._set("invalid",e),this.grid?.generateCellPartNames()}get invalid(){return this._get("invalid")??!1}get menu(){const{customMenuItems:e,defaultMenuItems:t,menuConfig:i}=this,n=!!i?.open,o=this.createCalciteAction({icon:i?.icon??"ellipsis",text:this.messages?.menu??"",scale:"m",slot:"trigger"}),s=document.createElement("calcite-dropdown");if(s.maxItems=i?.maxItems??4,s.placement="top-end",s.scale=i?.scale??"m",n&&(s.open=n,this._menuIsOpen=!0),s.appendChild(o),s.addEventListener("calciteDropdownOpen",()=>this._menuIsOpen=!0),s.addEventListener("calciteDropdownClose",()=>this._menuIsOpen=!1),s.onkeydown=this._stopPropagationOnSelect,s.addEventListener("mousewheel",e=>{e.stopPropagation()}),t.length){const e=s.appendChild(document.createElement("calcite-dropdown-group"));e.selectionMode="none",e.append(...t)}if(e.length){const t=s.appendChild(document.createElement("calcite-dropdown-group"));t.selectionMode=i?.selectionMode??"none",t.append(...e)}return s}get menuItems(){return[...this.defaultMenuItems,...this.customMenuItems]}get menuIsOpen(){return this._menuIsOpen}get menuIsVisible(){return!(!1===this.visibleElements?.columnMenus||!this.menuItems.length)}get tableTimeZone(){return this.store.timeZone}closeMenu(){this.menu.open=!1}createSortElement(){const{effectiveLabel:e,direction:t,fieldName:i,initialSortPriority:n}=this,o=document.createElement("vaadin-grid-sorter");return o.classList.add(c.sorter),o.setAttribute("path",i),o.setAttribute("title",this.labelTooltipText||e),o.textContent=e,t&&o.setAttribute("direction",t),null!=n&&(o._initialOrder=n),o.addEventListener("direction-changed",()=>{this.direction!==o.direction&&this._set("direction",o.direction)}),o}createCalciteAction(e){const t=document.createElement("calcite-action"),{alignment:i,className:n,disabled:o,icon:s,label:l,scale:r,slot:a,text:c,textEnabled:d,onclick:p}=e;return t.alignment=i??"center",t.className=n??"",t.disabled=!!o,s&&(t.icon=s),t.label=l??"",t.scale=r??"s",t.slot=a??"",t.text=t.title=c??"",t.textEnabled=!!d,t.onclick=p??null,t}createCalciteButton(e){const t=document.createElement("calcite-button"),{alignment:i,appearance:n,className:o,disabled:s,iconEnd:l,iconFlipRtl:r,kind:a,loading:c,onclick:d,scale:p,textContent:u,title:m,width:h}=e;return t.alignment=i??"center",t.className=o??"",t.scale=p??"s",t.appearance=n??"transparent",t.disabled=!!s,l&&(t.iconEnd=l),r&&(t.iconFlipRtl=r),t.kind=a??"brand",t.loading=!!c,t.textContent=u??"",m&&(t.title=m),t.width=h??"auto",t.onclick=d??null,t}createCalciteDropdownItem(e){const t=document.createElement("calcite-dropdown-item"),{disabled:i,hidden:n,iconClass:o,iconStart:s,textContent:l,onclick:r,selected:a}=e,d=l??"";if(o&&!s){const e=document.createElement("span"),i=document.createElement("span");i.classList.add(c.headerMenuIcon,o),e.textContent=e.title=d,e.insertBefore(i,e.firstChild),t.appendChild(e)}else s&&(t.iconStart=s),t.textContent=t.title=d;return t.disabled=!!i,t.hidden="function"==typeof n?n():!!n,t.selected=!!a,r&&(t.addEventListener("calciteDropdownItemSelect",r),t.onkeydown=this._stopPropagationOnSelect),t}createCalciteIcon(e){const{effectiveLabel:t}=this,{icon:i,scale:n,textLabel:o}=e,s=document.createElement("calcite-icon"),l=o??t;return s.icon=i,s.scale=n??"s",s.textLabel=l,s.title=l,s}createHeaderContent(){const{effectiveDescription:e,effectiveLabel:t,iconNode:i}=this,n=document.createElement("div");if(n.classList.add(c.headerContent),i&&n.appendChild(i),!this._headerRequiresTextContainer)return n;const o=n.appendChild(document.createElement("div"));return this.effectiveSortable?o.appendChild(this.sortElement):""!==t&&o.appendChild(this._createHeaderTextElement({label:t,cssClass:c.headerLabel,title:this.labelTooltipText})),null!=e&&!1!==this.visibleElements?.columnDescriptions&&o.appendChild(this._createHeaderTextElement({label:e,cssClass:c.headerDescription})),this.menuIsVisible&&n.appendChild(this.menu),n}getCellValue(e){return e?.item.feature.attributes?.[this.fieldName]}getVirtualRowIndex(e){const t=this.grid?.getRowContainingNode(e);return t?.parentElement?[...t.parentElement.children].indexOf(t):-1}removeCellContent(e){if(e&&e.firstChild)try{for(;e?.firstChild;)e?.removeChild(e.firstChild)}catch(t){}}openMenu(){this.menuIsVisible&&(this.menu.open=!0,u(this.menuItems[0]))}sanitizeContent(e){return s.sanitize(e)}sanitizeLabel(e){return null==e||""===e?"":l.sanitize(e.toString()).replaceAll(m," ")}sort(){this.effectiveSortable&&this.sortElement?.click()}_stopPropagationOnSelect(e){"Enter"!==e.key&&" "!==e.key||e.stopPropagation()}_createHeaderTextElement({cssClass:e,label:t,title:i}){const n=document.createElement("span");n.classList.add(e);const o=n.appendChild(document.createElement("span"));return o.textContent=t,o.setAttribute("title",i||t),n}};e([r()],h.prototype,"_headerRequiresTextContainer",null),e([r()],h.prototype,"_menuIsOpen",void 0),e([r()],h.prototype,"autoWidth",void 0),e([r()],h.prototype,"cellValueFormatFunction",void 0),e([r()],h.prototype,"customMenuItems",null),e([r()],h.prototype,"defaultMenuItems",null),e([r()],h.prototype,"description",void 0),e([r()],h.prototype,"direction",void 0),e([r()],h.prototype,"effectiveDescription",null),e([r()],h.prototype,"effectiveLabel",null),e([r()],h.prototype,"effectiveSortable",null),e([r({constructOnly:!0})],h.prototype,"fieldName",void 0),e([r()],h.prototype,"flexGrow",void 0),e([r()],h.prototype,"footerRenderFunction",void 0),e([r()],h.prototype,"formatFunction",void 0),e([r()],h.prototype,"frozen",void 0),e([r()],h.prototype,"frozenToEnd",void 0),e([r()],h.prototype,"grid",void 0),e([r()],h.prototype,"iconNode",null),e([r()],h.prototype,"invalid",null),e([r()],h.prototype,"headerRenderFunction",void 0),e([r()],h.prototype,"hidden",void 0),e([r()],h.prototype,"icon",void 0),e([r()],h.prototype,"iconText",void 0),e([r({constructOnly:!0})],h.prototype,"initialSortPriority",void 0),e([r()],h.prototype,"label",void 0),e([r()],h.prototype,"labelTooltipText",void 0),e([r()],h.prototype,"menu",null),e([r()],h.prototype,"menuItems",null),e([r()],h.prototype,"menuConfig",void 0),e([r()],h.prototype,"menuIsOpen",null),e([r()],h.prototype,"menuIsVisible",null),e([r()],h.prototype,"messages",void 0),e([r()],h.prototype,"messagesCommon",void 0),e([r()],h.prototype,"messagesURIUtils",void 0),e([r()],h.prototype,"renderFunction",void 0),e([r()],h.prototype,"resizable",void 0),e([r()],h.prototype,"sortable",void 0),e([r({readOnly:!0})],h.prototype,"sortElement",void 0),e([r()],h.prototype,"store",void 0),e([r()],h.prototype,"tableTimeZone",null),e([r()],h.prototype,"textAlign",void 0),e([r()],h.prototype,"textWrap",void 0),e([r()],h.prototype,"timeZone",void 0),e([r()],h.prototype,"visibleElements",void 0),e([r()],h.prototype,"width",void 0),h=e([a("esri.widgets.FeatureTable.Grid.Column")],h);const f=h;export{f as default};
@@ -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{substitute as i}from"../../intl/substitute.js";import l from"./Grid/Column.js";import{css as r}from"./Grid/ColumnCSS.js";import{isIFeatureTableSupportedLayerWithRelationships as s,findRelationship as n}from"./support/tableUtils.js";const a={showRecordsButton:"esri-column__show-related-records-button"};let p=class extends l{constructor(t){super(t),this.flexGrow=1,this.icon="link",this.layer=null,this.relatedLayer=null,this.relationshipId=null,this.renderFunction=({root:t,rowData:e})=>{if(!e)return;const o=e.item,{layer:l,relatedLayer:n}=this;if(!o?.feature||!s(l)||!s(n))return;const{messages:p}=this,{index:d}=e,{feature:h,objectId:c}=o,{collapsed:u,showRelatedTableCallback:b,relationshipId:y}=this,f=o.relatedRecords,m=f?.find(t=>t.relationshipId===y)?.count??0,C=!u&&b&&p?.recordsCount?i(p.recordsCount,{count:m}):`${m}`,w=t=>{t.preventDefault(),u||this.showRelatedTableCallback?.({feature:h,index:d,layer:l,objectId:c,relatedLayer:n,relationshipId:y})},v=u?"":"chevron-right";if(t.firstChild){const e=t.firstChild;return e.textContent=C,e.onclick=w,void(e.iconEnd=v)}const x=this.createCalciteButton({className:`${a.showRecordsButton} ${r.contentFull}`,iconEnd:v,iconFlipRtl:"both",scale:"m",textContent:C,title:C,onclick:w});this.removeCellContent(t),t.appendChild(x)},this.resizable=!0,this.showRelatedTableCallback=null,this.textAlign="center",this.width="200px"}get _relationshipLabel(){return this.label||this.originRelationship?.name||this.layer.title||""}get collapsed(){return this._get("collapsed")||!1}set collapsed(t){t?this.set({flexGrow:0,resizable:!1,width:"80px"}):this.set({flexGrow:1,resizable:!0,width:"200px"}),this._set("collapsed",t)}get effectiveLabel(){return this.collapsed?"":this._relationshipLabel}get iconNode(){const{icon:t}=this;return t?this.createCalciteIcon({icon:t,textLabel:this._relationshipLabel}):null}get originRelationship(){const t=this.relationshipId;return this.relatedLayer.relationships?.find(({id:e})=>e===t)}get relationship(){return n(this.layer,this.relationshipId)}};t([e()],p.prototype,"_relationshipLabel",null),t([e()],p.prototype,"collapsed",null),t([e()],p.prototype,"effectiveLabel",null),t([e()],p.prototype,"flexGrow",void 0),t([e()],p.prototype,"icon",void 0),t([e()],p.prototype,"iconNode",null),t([e()],p.prototype,"layer",void 0),t([e()],p.prototype,"originRelationship",null),t([e()],p.prototype,"relatedLayer",void 0),t([e()],p.prototype,"relationship",null),t([e()],p.prototype,"relationshipId",void 0),t([e()],p.prototype,"renderFunction",void 0),t([e()],p.prototype,"resizable",void 0),t([e()],p.prototype,"showRelatedTableCallback",void 0),t([e()],p.prototype,"textAlign",void 0),t([e()],p.prototype,"width",void 0),p=t([o("esri.widgets.FeatureTable.RelationshipColumn")],p);const d=p;export{d as default};
5
+ import{__decorate as t}from"tslib";import{property as e,subclass as o}from"../../core/accessorSupport/decorators.js";import{substitute as i}from"../../intl/substitute.js";import l from"./Grid/Column.js";import{css as r}from"./Grid/ColumnCSS.js";import{isIFeatureTableSupportedLayerWithRelationships as s,findRelationship as n}from"./support/tableUtils.js";const a={showRecordsButton:"esri-column__show-related-records-button"};let p=class extends l{constructor(t){super(t),this.flexGrow=1,this.icon="link",this.layer=null,this.relatedLayer=null,this.relationshipId=null,this.renderFunction=({root:t,rowData:e})=>{if(!e)return;const o=e.item,{layer:l,relatedLayer:n}=this;if(!o?.feature||!s(l)||!s(n))return;const{messages:p}=this,{index:d}=e,{feature:h,objectId:c}=o,{collapsed:u,showRelatedTableCallback:b,relationshipId:y}=this,f=o.relatedRecords,m=f?.find(t=>t.relationshipId===y)?.count??0,C=!u&&b&&p?.recordsCount?i(p.recordsCount,{count:m}):`${m}`,v=t=>{t.preventDefault(),u||this.showRelatedTableCallback?.({feature:h,index:d,layer:l,objectId:c,relatedLayer:n,relationshipId:y})},w=u?void 0:"chevron-right";if(t.firstChild){const e=t.firstChild;return e.textContent=C,e.onclick=v,void(w&&(e.iconEnd=w))}const x=this.createCalciteButton({className:`${a.showRecordsButton} ${r.contentFull}`,iconEnd:w,iconFlipRtl:"both",scale:"m",textContent:C,title:C,onclick:v});this.removeCellContent(t),t.appendChild(x)},this.resizable=!0,this.showRelatedTableCallback=null,this.textAlign="center",this.width="200px"}get _relationshipLabel(){return this.label||this.originRelationship?.name||this.layer.title||""}get collapsed(){return this._get("collapsed")||!1}set collapsed(t){t?this.set({flexGrow:0,resizable:!1,width:"80px"}):this.set({flexGrow:1,resizable:!0,width:"200px"}),this._set("collapsed",t)}get effectiveLabel(){return this.collapsed?"":this._relationshipLabel}get iconNode(){const{icon:t}=this;return t?this.createCalciteIcon({icon:t,textLabel:this._relationshipLabel}):null}get originRelationship(){const t=this.relationshipId;return this.relatedLayer.relationships?.find(({id:e})=>e===t)}get relationship(){return n(this.layer,this.relationshipId)}};t([e()],p.prototype,"_relationshipLabel",null),t([e()],p.prototype,"collapsed",null),t([e()],p.prototype,"effectiveLabel",null),t([e()],p.prototype,"flexGrow",void 0),t([e()],p.prototype,"icon",void 0),t([e()],p.prototype,"iconNode",null),t([e()],p.prototype,"layer",void 0),t([e()],p.prototype,"originRelationship",null),t([e()],p.prototype,"relatedLayer",void 0),t([e()],p.prototype,"relationship",null),t([e()],p.prototype,"relationshipId",void 0),t([e()],p.prototype,"renderFunction",void 0),t([e()],p.prototype,"resizable",void 0),t([e()],p.prototype,"showRelatedTableCallback",void 0),t([e()],p.prototype,"textAlign",void 0),t([e()],p.prototype,"width",void 0),p=t([o("esri.widgets.FeatureTable.RelationshipColumn")],p);const d=p;export{d as default};