@arcgis/core 5.2.0-next.15 → 5.2.0-next.16
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.
- package/applications/Urban/editingSessionUtils.js +1 -1
- package/arcade/featureSetUtils.js +1 -1
- package/arcade/featureset/sources/FeatureLayerDynamic.js +1 -1
- package/arcade/featureset/sources/FeatureLayerParquet.js +2 -0
- package/arcade/featureset/support/FeatureSet.js +1 -1
- package/arcade/featureset/support/shared.js +1 -1
- package/arcade.d.ts +2 -1
- package/arcgisGlobal.d.ts +3 -1
- package/assets/esri/core/t9n/Units_ar.json +1 -1
- package/assets/esri/core/t9n/Units_bg.json +1 -1
- package/assets/esri/core/t9n/Units_bs.json +1 -1
- package/assets/esri/core/t9n/Units_ca.json +1 -1
- package/assets/esri/core/t9n/Units_cs.json +1 -1
- package/assets/esri/core/t9n/Units_da.json +1 -1
- package/assets/esri/core/t9n/Units_de.json +1 -1
- package/assets/esri/core/t9n/Units_el.json +1 -1
- package/assets/esri/core/t9n/Units_es.json +1 -1
- package/assets/esri/core/t9n/Units_et.json +1 -1
- package/assets/esri/core/t9n/Units_fi.json +1 -1
- package/assets/esri/core/t9n/Units_fr.json +1 -1
- package/assets/esri/core/t9n/Units_he.json +1 -1
- package/assets/esri/core/t9n/Units_hr.json +1 -1
- package/assets/esri/core/t9n/Units_hu.json +1 -1
- package/assets/esri/core/t9n/Units_id.json +1 -1
- package/assets/esri/core/t9n/Units_it.json +1 -1
- package/assets/esri/core/t9n/Units_ja.json +1 -1
- package/assets/esri/core/t9n/Units_ko.json +1 -1
- package/assets/esri/core/t9n/Units_lt.json +1 -1
- package/assets/esri/core/t9n/Units_lv.json +1 -1
- package/assets/esri/core/t9n/Units_nl.json +1 -1
- package/assets/esri/core/t9n/Units_no.json +1 -1
- package/assets/esri/core/t9n/Units_pl.json +1 -1
- package/assets/esri/core/t9n/Units_pt-BR.json +1 -1
- package/assets/esri/core/t9n/Units_pt-PT.json +1 -1
- package/assets/esri/core/t9n/Units_ro.json +1 -1
- package/assets/esri/core/t9n/Units_ru.json +1 -1
- package/assets/esri/core/t9n/Units_sk.json +1 -1
- package/assets/esri/core/t9n/Units_sl.json +1 -1
- package/assets/esri/core/t9n/Units_sr.json +1 -1
- package/assets/esri/core/t9n/Units_sv.json +1 -1
- package/assets/esri/core/t9n/Units_th.json +1 -1
- package/assets/esri/core/t9n/Units_tr.json +1 -1
- package/assets/esri/core/t9n/Units_uk.json +1 -1
- package/assets/esri/core/t9n/Units_vi.json +1 -1
- package/assets/esri/core/t9n/Units_zh-CN.json +1 -1
- package/assets/esri/core/t9n/Units_zh-HK.json +1 -1
- package/assets/esri/core/t9n/Units_zh-TW.json +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/007485862ce95928717a.js +1 -0
- package/assets/esri/core/workers/chunks/{d9d4754062758789f186.js → 05016e5a1de384994001.js} +2 -2
- package/assets/esri/core/workers/chunks/05b6b2c0b76afb100e33.js +1 -0
- package/assets/esri/core/workers/chunks/{8927fb4aa68f7e541a39.js → 05d597dd117766beadd8.js} +1 -1
- package/assets/esri/core/workers/chunks/{b045bffb4f2eb9203183.js → 05e1f1628a3726eca03d.js} +1 -1
- package/assets/esri/core/workers/chunks/0a52373c4ba652e0ee0f.js +1 -0
- package/assets/esri/core/workers/chunks/0b522e05668bef729b1b.js +1 -0
- package/assets/esri/core/workers/chunks/0d42322362e76f674d94.js +2 -0
- package/assets/esri/core/workers/chunks/{81e3bd1a0634ddc2b833.js → 0f10d7d592c36ee2d1ea.js} +1 -1
- package/assets/esri/core/workers/chunks/{cdf6ad970dc1893dac58.js → 110135b0562a3b5708b9.js} +1 -1
- package/assets/esri/core/workers/chunks/122892f365f5327d290c.js +1 -0
- package/assets/esri/core/workers/chunks/1305690054214a9cf48d.js +1 -0
- package/assets/esri/core/workers/chunks/168c15cf462f9abcbdd2.js +1 -0
- package/assets/esri/core/workers/chunks/169bfafec4d59be2beb0.js +1 -0
- package/assets/esri/core/workers/chunks/1c689bb502657b1f173b.js +1 -0
- package/assets/esri/core/workers/chunks/1d2609ce6220b5af5526.js +1 -0
- package/assets/esri/core/workers/chunks/1d38b2fcd85ac9ebd7c6.js +1 -0
- package/assets/esri/core/workers/chunks/1e109a521ca8772fdf04.js +1 -0
- package/assets/esri/core/workers/chunks/1ea840b7ac1ffaa0c389.js +1 -0
- package/assets/esri/core/workers/chunks/1f48438b3055afeb710f.js +1 -0
- package/assets/esri/core/workers/chunks/{c2cd80b712f29e8cbb8d.js → 1ff57bf19f021f5fd246.js} +1 -1
- package/assets/esri/core/workers/chunks/2353fbc1ff4481dcfb1f.js +1 -0
- package/assets/esri/core/workers/chunks/2509da565e5a2b43ac7f.js +1 -0
- package/assets/esri/core/workers/chunks/255c8e937e7a123ebb04.js +1 -0
- package/assets/esri/core/workers/chunks/256cc116e3be4feee593.js +1 -0
- package/assets/esri/core/workers/chunks/26aa8190ac439f634c5b.js +1 -0
- package/assets/esri/core/workers/chunks/{a442534ac0956a68b769.js → 282930645ce525d5bc92.js} +1 -1
- package/assets/esri/core/workers/chunks/{45b560ca01fb566ba560.js → 2a8d791aef3123e6a3c4.js} +1 -1
- package/assets/esri/core/workers/chunks/2b781de7b467c61849b2.js +1 -0
- package/assets/esri/core/workers/chunks/2baee42e1797a709fe4b.js +1 -0
- package/assets/esri/core/workers/chunks/2c017eae434254610c8e.js +1 -0
- package/assets/esri/core/workers/chunks/2d7a4b669804d0c5029b.js +1 -0
- package/assets/esri/core/workers/chunks/2f40193d1b2e534c5226.js +1 -0
- package/assets/esri/core/workers/chunks/303e723e829ea7088d43.js +1 -0
- package/assets/esri/core/workers/chunks/35533c8ef541f7643497.js +2 -0
- package/assets/esri/core/workers/chunks/36913f0f944a9eb82cd3.js +1 -0
- package/assets/esri/core/workers/chunks/{cc62e5095e328bed3e01.js → 3aa0a34d2b7dbf2e2c66.js} +1 -1
- package/assets/esri/core/workers/chunks/3d4ad7c728e02aa90551.js +1 -0
- package/assets/esri/core/workers/chunks/{3526ab3b1f87c24ae6f8.js → 4162a2bb774e6ba2c0db.js} +1 -1
- package/assets/esri/core/workers/chunks/436d51b9f1b1b5abc4bc.js +1 -0
- package/assets/esri/core/workers/chunks/43ef6dee2e1d9ed7885e.js +1 -0
- package/assets/esri/core/workers/chunks/442424200e7475e9a08f.js +1 -0
- package/assets/esri/core/workers/chunks/4b96aa2dc5b88846bb53.js +1 -0
- package/assets/esri/core/workers/chunks/4ea325c829d3b82854b1.js +1 -0
- package/assets/esri/core/workers/chunks/51a53011478e0cf96e0b.js +1 -0
- package/assets/esri/core/workers/chunks/51a8a47aac1d8d22ba9d.js +1 -0
- package/assets/esri/core/workers/chunks/5481af25fd46914498df.js +1 -0
- package/assets/esri/core/workers/chunks/54f54623532f633dc0e2.js +1 -0
- package/assets/esri/core/workers/chunks/5809e70a8e57e9b05959.js +1 -0
- package/assets/esri/core/workers/chunks/589b31cc5c663a288942.js +1 -0
- package/assets/esri/core/workers/chunks/58ce4bcfb15f378b1b9f.js +1 -0
- package/assets/esri/core/workers/chunks/58e0e50b6c3abaa4798f.js +1 -0
- package/assets/esri/core/workers/chunks/595bc41ff36c77324d01.js +261 -0
- package/assets/esri/core/workers/chunks/599bd80379423c99799d.js +1 -0
- package/assets/esri/core/workers/chunks/5bf01e0eff8a78b65e9e.js +1 -0
- package/assets/esri/core/workers/chunks/5dfeefee96659832398a.js +1 -0
- package/assets/esri/core/workers/chunks/{011a4d4201696fa10408.js → 5ea1113b7bdcf94b2822.js} +1 -1
- package/assets/esri/core/workers/chunks/5fab14c5f1febebb75f1.js +1 -0
- package/assets/esri/core/workers/chunks/609edb4da427ec37bcf7.js +1 -0
- package/assets/esri/core/workers/chunks/60d4a3f770bb1e01cd10.js +1 -0
- package/assets/esri/core/workers/chunks/63858dfcff1177e597e7.js +1 -0
- package/assets/esri/core/workers/chunks/686c1a1b794ebe1a0341.js +1 -0
- package/assets/esri/core/workers/chunks/68b77b36daae2b4b4237.js +1 -0
- package/assets/esri/core/workers/chunks/{11c3b1e8ca21ad62fdd1.js → 6db5ee9c589265b23b60.js} +1 -1
- package/assets/esri/core/workers/chunks/6dc60afb0c39bbb001a3.js +1 -0
- package/assets/esri/core/workers/chunks/{5bfae465872760e7af6d.js → 6f240fe78b299e6c4fcc.js} +1 -1
- package/assets/esri/core/workers/chunks/70cb825bb37f1977d2ab.js +1 -0
- package/assets/esri/core/workers/chunks/71a593fa116770e58832.js +1 -0
- package/assets/esri/core/workers/chunks/71f09e34d56c9fe5c307.js +1 -0
- package/assets/esri/core/workers/chunks/{72cfb186e50537bcdd19.js → 75915f81caaf9e5345a9.js} +1 -1
- package/assets/esri/core/workers/chunks/7832d94f35b79e27ee51.js +1 -0
- package/assets/esri/core/workers/chunks/{e5f8c73349407c25956b.js → 7c61b18e43c789aaecc6.js} +1 -1
- package/assets/esri/core/workers/chunks/818a481ce579f519de1c.js +1 -0
- package/assets/esri/core/workers/chunks/831455798b177678720c.js +1 -0
- package/assets/esri/core/workers/chunks/83ce38342796bd6d73ce.js +1 -0
- package/assets/esri/core/workers/chunks/84a0bb53fcbd99b5aa0c.js +1 -0
- package/assets/esri/core/workers/chunks/87b86375f8557418dbe6.js +1 -0
- package/assets/esri/core/workers/chunks/8817d25c7f4cf0e6c6bd.js +1 -0
- package/assets/esri/core/workers/chunks/{0b55fc5050e718371e05.js → 888af532ad48fd86f285.js} +1 -1
- package/assets/esri/core/workers/chunks/{9331969046f2b277d620.js → 8a39dd585742960d3ca2.js} +1 -1
- package/assets/esri/core/workers/chunks/8ade399db21938822a7c.js +1 -0
- package/assets/esri/core/workers/chunks/8c62e2dabd1f1e13d244.js +1 -0
- package/assets/esri/core/workers/chunks/{5cb1b950249d651f3837.js → 8dcb3e77f76d8396706b.js} +1 -1
- package/assets/esri/core/workers/chunks/909e88c27d80777b047c.js +1 -0
- package/assets/esri/core/workers/chunks/91c5205d1274c7f190d5.js +1 -0
- package/assets/esri/core/workers/chunks/91c543443cd6768ad6ff.js +1 -0
- package/assets/esri/core/workers/chunks/9230ad807020fc2bbf8e.js +1 -0
- package/assets/esri/core/workers/chunks/92458803531fdfe1557a.js +1 -0
- package/assets/esri/core/workers/chunks/{976ab2be6c244768c08a.js → 940ebb13618d38c6b459.js} +1 -1
- package/assets/esri/core/workers/chunks/987594539981483a7c5e.js +1 -0
- package/assets/esri/core/workers/chunks/99c002015c2127e6cbfc.js +2 -0
- package/assets/esri/core/workers/chunks/9da1a514e042eb642d35.js +1 -0
- package/assets/esri/core/workers/chunks/a1509e2e7809b6754b4f.js +1 -0
- package/assets/esri/core/workers/chunks/{a4f3bcfabd4ad127abf2.js → a3195521a83565c7c2d3.js} +1 -1
- package/assets/esri/core/workers/chunks/a3393780655152102c45.js +1 -0
- package/assets/esri/core/workers/chunks/{52175ff9e8c2c136f90a.js → a3ecde3794a7db3cf283.js} +1 -1
- package/assets/esri/core/workers/chunks/a4d918b47cd4ee0e1666.js +1 -0
- package/assets/esri/core/workers/chunks/a844c4e031e77db11478.js +1 -0
- package/assets/esri/core/workers/chunks/{bfd1aef8ac795e1ce227.js → a892b3be70f482bef0ba.js} +1 -1
- package/assets/esri/core/workers/chunks/a8ef7acb6d3d1f45e14c.js +1 -0
- package/assets/esri/core/workers/chunks/a99ce2f12c8204ee542a.js +1 -0
- package/assets/esri/core/workers/chunks/aba7a053015a9738d8a0.js +1 -0
- package/assets/esri/core/workers/chunks/{c8460bdf60aca749ed05.js → ac16016964be3b684e98.js} +1 -1
- package/assets/esri/core/workers/chunks/ac7ecd90330090c90005.js +1 -0
- package/assets/esri/core/workers/chunks/adce59e4111bae4225f7.js +1 -0
- package/assets/esri/core/workers/chunks/af3b060fdfa3b6174340.js +1 -0
- package/assets/esri/core/workers/chunks/b0212df1fe8d9448f3d6.js +1 -0
- package/assets/esri/core/workers/chunks/b289c46ce2dc04d32e81.js +1 -0
- package/assets/esri/core/workers/chunks/{c983e5ce0ff952b65d7f.js → b2b342b06d502fc61ea5.js} +1 -1
- package/assets/esri/core/workers/chunks/{67ebde34377f98d17cda.js → b5571e93bc136dac8ee1.js} +1 -1
- package/assets/esri/core/workers/chunks/ba1c4a8794ac55942e35.js +1 -0
- package/assets/esri/core/workers/chunks/bbcad2fde838819ffc7b.js +1 -0
- package/assets/esri/core/workers/chunks/bd260798b8de09a1eeb2.js +1 -0
- package/assets/esri/core/workers/chunks/{44d0ca9d4c5f1722688c.js → bf67e0f6064fb9d94ac8.js} +1 -1
- package/assets/esri/core/workers/chunks/{0bf72e9d0a6deceeb406.js → bfa6f4c08e7571bb1f37.js} +1 -1
- package/assets/esri/core/workers/chunks/c030a974a63155f450e9.js +1 -0
- package/assets/esri/core/workers/chunks/c0b7b9d115dccb2924ff.js +1 -0
- package/assets/esri/core/workers/chunks/c2db773201adca204f95.js +1 -0
- package/assets/esri/core/workers/chunks/c318e6dbb8651433038f.js +2 -0
- package/assets/esri/core/workers/chunks/c4a2ec2e5897300163ac.js +1 -0
- package/assets/esri/core/workers/chunks/{8b0a01ebc86ab226f01f.js → c538435216d253f7702e.js} +1 -1
- package/assets/esri/core/workers/chunks/c5e172d3baf5414868f0.js +1 -0
- package/assets/esri/core/workers/chunks/c63b315c6b76b4860fc5.js +1 -0
- package/assets/esri/core/workers/chunks/c8091e8fd7ca43a4490a.js +1 -0
- package/assets/esri/core/workers/chunks/{2413b383b7f2bdcd4ced.js → c8672a54c98d472aa24d.js} +1 -1
- package/assets/esri/core/workers/chunks/cf9a132c4c37e62de3d7.js +1 -0
- package/assets/esri/core/workers/chunks/d0321dd4b5b2d863eecd.js +1 -0
- package/assets/esri/core/workers/chunks/{886ae23a1d8fa21e531f.js → d750e4abeb777caa8c36.js} +1 -1
- package/assets/esri/core/workers/chunks/{bd36c57dd0cd28dee55f.js → d7acbc2ddff4cee8a465.js} +1 -1
- package/assets/esri/core/workers/chunks/{cb8c4d8334fab9bd9a04.js → d90bc34d97bb21c29c40.js} +1 -1
- package/assets/esri/core/workers/chunks/d9fcc63df008f687848a.js +1 -0
- package/assets/esri/core/workers/chunks/db96a0c66578b2d1b715.js +1 -0
- package/assets/esri/core/workers/chunks/{6a1b6f8c868f8edce1d7.js → dd3b0070081eaf805d95.js} +1 -1
- package/assets/esri/core/workers/chunks/dd5dddf7e422216d3806.js +1 -0
- package/assets/esri/core/workers/chunks/de83c177f8a1234a5b2e.js +1 -0
- package/assets/esri/core/workers/chunks/{07ca020796c57cefda62.js → dfb19701b488089874fd.js} +1 -1
- package/assets/esri/core/workers/chunks/e2f33945d838183a2192.js +1 -0
- package/assets/esri/core/workers/chunks/{d97c0c18202b8c578f8c.js → e5471373f89fd7cb9844.js} +1 -1
- package/assets/esri/core/workers/chunks/e65d291bab13f7f5323b.js +1 -0
- package/assets/esri/core/workers/chunks/e95ee94027c1934086d8.js +1 -0
- package/assets/esri/core/workers/chunks/ecbf84a1f42e6188faab.js +1 -0
- package/assets/esri/core/workers/chunks/efaa1d05705f6b450e8f.js +1 -0
- package/assets/esri/core/workers/chunks/efaf998d18479a0380ae.js +1 -0
- package/assets/esri/core/workers/chunks/f0573db9a3d3e1499a7e.js +1 -0
- package/assets/esri/core/workers/chunks/f07722efd7fa2b75d4dd.js +1 -0
- package/assets/esri/core/workers/chunks/{520e0e5307eef27becc6.js → f0924613f818dd165ad9.js} +1 -1
- package/assets/esri/core/workers/chunks/f3fd40df92e59f7c687c.js +1 -0
- package/assets/esri/core/workers/chunks/{3d20c86f1fe877bf884b.js → f59b76fde2cbd17f64b3.js} +1 -1
- package/assets/esri/core/workers/chunks/f6afc597eaf2afa9a4a0.js +1 -0
- package/assets/esri/core/workers/chunks/{ed2a1c371dfc5d4a744e.js → f7f820483e45c05ab9e4.js} +2 -2
- package/assets/esri/core/workers/chunks/f98bb3885bfc7f18f26c.js +1 -0
- package/assets/esri/core/workers/chunks/f9b44ff9bb4f7a88ab56.js +1 -0
- package/assets/esri/core/workers/chunks/{b102beeeb7a919f68b51.js → fb81705cec1be2431876.js} +1 -1
- package/assets/esri/core/workers/chunks/fd53ef66176ae164e221.js +1 -0
- package/assets/esri/core/workers/chunks/fd956a58787020d610af.js +1 -0
- package/assets/esri/core/workers/chunks/fdec3a2e100688c42e41.js +1 -0
- package/assets/esri/core/workers/chunks/fe6385115d76e16e8da0.js +1 -0
- package/assets/esri/core/workers/chunks/fedbeb488d5d7c07c7dc.js +1 -0
- package/assets/esri/core/workers/chunks/{d9695794cfaa014a55b1.js → ff00ac01f0baaecaa890.js} +1 -1
- package/assets/esri/libs/parquet/pkg/bundle_bg.wasm +0 -0
- package/assets/esri/themes/base/widgets/_BatchAttributeForm.scss +62 -90
- package/assets/esri/themes/base/widgets/_OrientedImageryViewer.scss +0 -2
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_ar.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_bg.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_bs.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_ca.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_cs.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_da.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_de.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_el.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_es.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_et.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_fi.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_fr.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_he.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_hr.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_hu.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_id.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_it.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_ja.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_ko.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_lt.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_lv.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_nl.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_no.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_pl.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_pt-BR.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_pt-PT.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_ro.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_ru.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_sk.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_sl.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_sr.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_sv.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_th.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_tr.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_uk.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_vi.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_zh-CN.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_zh-HK.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_zh-TW.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_ar.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_bg.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_bs.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_ca.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_cs.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_da.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_de.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_el.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_es.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_et.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_fi.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_fr.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_he.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_hr.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_hu.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_id.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_it.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_ja.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_ko.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_lt.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_lv.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_nl.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_no.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_pl.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_pt-BR.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_pt-PT.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_ro.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_ru.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_sk.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_sl.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_sr.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_sv.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_th.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_tr.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_uk.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_vi.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_zh-CN.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_zh-HK.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_zh-TW.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ar.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_bg.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_bs.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ca.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_cs.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_da.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_de.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_el.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_es.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_et.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_fi.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_fr.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_he.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_hr.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_hu.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_id.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_it.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ja.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ko.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_lt.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_lv.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_nl.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_no.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_pl.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_pt-BR.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_pt-PT.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ro.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ru.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sk.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sl.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sr.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sv.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_th.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_tr.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_uk.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_vi.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_zh-CN.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_zh-HK.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_zh-TW.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ar.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_bg.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_bs.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ca.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_cs.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_da.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_de.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_el.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_es.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_et.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_fi.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_fr.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_he.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_hr.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_hu.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_id.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_it.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ja.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ko.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_lt.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_lv.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_nl.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_no.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_pl.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_pt-BR.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_pt-PT.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ro.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ru.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sk.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sl.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sr.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sv.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_th.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_tr.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_uk.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_vi.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_zh-CN.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_zh-HK.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_zh-TW.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ar.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_bg.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_bs.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ca.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_cs.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_da.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_de.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_el.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_es.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_et.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_fi.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_fr.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_he.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_hr.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_hu.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_id.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_it.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ja.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ko.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_lt.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_lv.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_nl.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_no.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pl.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pt-BR.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pt-PT.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ro.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ru.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sk.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sl.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sr.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sv.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_th.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_tr.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_uk.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_vi.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-CN.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-HK.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-TW.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_ar.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_bg.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_bs.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_ca.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_cs.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_da.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_de.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_el.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_es.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_et.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_fi.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_fr.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_he.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_hr.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_hu.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_id.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_it.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_ja.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_ko.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_lt.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_lv.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_nl.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_no.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_pl.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_pt-BR.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_pt-PT.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_ro.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_ru.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_sk.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_sl.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_sr.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_sv.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_th.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_tr.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_uk.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_vi.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_zh-CN.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_zh-HK.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_zh-TW.json +1 -1
- package/chunks/Bufferer-CclWhXVb.js +2 -0
- package/chunks/Distance2DCalculator-DjIp2uQi.js +2 -0
- package/chunks/Envelope.js +1 -1
- package/chunks/Envelope2D.js +1 -1
- package/chunks/GaussianSplatComposition.glsl.js +1 -1
- package/chunks/GeodeticDistanceCalculator-zRp89-dW.js +2 -0
- package/chunks/GeodeticUtils.js +1 -1
- package/chunks/Geometry.js +1 -1
- package/chunks/{GeometryCleaner-BEJM7I4l.js → GeometryCleaner-CIE8Wfmb.js} +1 -1
- package/chunks/GlowComposition.glsl.js +1 -1
- package/chunks/MultiPathImpl.js +1 -1
- package/chunks/OITBlend.glsl.js +1 -1
- package/chunks/OITDimOpaque.glsl.js +1 -1
- package/chunks/OperatorClip.js +1 -1
- package/chunks/OperatorCrosses.js +1 -1
- package/chunks/OperatorCut.js +1 -1
- package/chunks/OperatorDefinitions.js +1 -1
- package/chunks/OperatorDensify.js +1 -1
- package/chunks/OperatorGeneralize.js +1 -1
- package/chunks/OperatorGeodesicBuffer.js +1 -1
- package/chunks/OperatorGeodeticArea.js +1 -1
- package/chunks/OperatorGeodeticDensifyByLength.js +1 -1
- package/chunks/OperatorGeodeticDistance.js +1 -1
- package/chunks/OperatorGeodeticLength.js +1 -1
- package/chunks/OperatorGraphicBuffer.js +2 -0
- package/chunks/OperatorIntegrate.js +1 -1
- package/chunks/OperatorIntersects.js +1 -1
- package/chunks/OperatorMultiPartToSinglePart.js +1 -1
- package/chunks/OperatorOverlaps.js +1 -1
- package/chunks/OperatorProximity.js +1 -1
- package/chunks/OperatorProximityGeodesic.js +1 -1
- package/chunks/OperatorShapePreservingLength.js +1 -1
- package/chunks/OperatorShapePreservingProject.js +1 -1
- package/chunks/OperatorSimplifyOGC.js +1 -1
- package/chunks/OperatorTouches.js +1 -1
- package/chunks/OperatorWithin.js +1 -1
- package/chunks/Point2D.js +1 -1
- package/chunks/ProjectionTransformation.js +1 -1
- package/chunks/{SideCalculator2D-BNwb5gvz.js → SideCalculator2D-DX0718xq.js} +1 -1
- package/chunks/SimpleGeometryCursor.js +1 -1
- package/chunks/SpatialReference.js +1 -1
- package/chunks/Transformation2D.js +1 -1
- package/chunks/centroidOperator.js +1 -1
- package/chunks/containsOperator.js +1 -1
- package/chunks/disjointOperator.js +1 -1
- package/chunks/distanceOperator.js +1 -1
- package/chunks/equalsOperator.js +1 -1
- package/chunks/languageUtils.js +1 -1
- package/config.js +1 -1
- package/core/has.js +1 -1
- package/core/screenUtils.js +1 -1
- package/editing/types.d.ts +22 -2
- package/form/elements/UtilityNetworkAssociationsElement.d.ts +0 -1
- package/geometry/Mesh.d.ts +1 -1
- package/geometry/operators/extendOperator.js +1 -1
- package/geometry/operators/gx/operatorAffineTransform.js +1 -1
- package/geometry/operators/gx/operatorAlphaShape.js +1 -1
- package/geometry/operators/gx/operatorAutoComplete.js +1 -1
- package/geometry/operators/gx/operatorBoundary.js +1 -1
- package/geometry/operators/gx/operatorBuffer.js +1 -1
- package/geometry/operators/gx/operatorConvexHull.js +1 -1
- package/geometry/operators/gx/operatorDifference.js +1 -1
- package/geometry/operators/gx/operatorGraphicBuffer.js +1 -1
- package/geometry/operators/gx/operatorIntersection.js +1 -1
- package/geometry/operators/gx/operatorLabelPoint.js +1 -1
- package/geometry/operators/gx/operatorLinesToPolygons.js +1 -1
- package/geometry/operators/gx/operatorLocateBetween.js +1 -1
- package/geometry/operators/gx/operatorMinimumBoundingCircle.js +1 -1
- package/geometry/operators/gx/operatorOffset.js +1 -1
- package/geometry/operators/gx/operatorPolygonOverlay.js +1 -1
- package/geometry/operators/gx/operatorPolygonSlicer.js +1 -1
- package/geometry/operators/gx/operatorSinglePartToMultiPart.js +1 -1
- package/geometry/operators/gx/operatorSymmetricDifference.js +1 -1
- package/geometry/operators/gx/operatorUnion.js +1 -1
- package/geometry/operators/isNearOperator.js +1 -1
- package/geometry/operators/json/containsOperator.js +1 -1
- package/geometry/operators/json/disjointOperator.js +1 -1
- package/geometry/operators/reshapeOperator.js +1 -1
- package/geometry/operators/support/apiConverter.js +1 -1
- package/geometry/operators/support/initNoPeFactory.js +1 -1
- package/geometry/operators/support/jsonConverter.js +1 -1
- package/geometry/support/aaBoundingRect.js +1 -1
- package/graphic/AnnotationFeatureGraphicOrigin.d.ts +5 -2
- package/graphic/AnnotationFeatureGraphicOrigin.js +1 -1
- package/graphic/DimensionFeatureGraphicOrigin.js +1 -1
- package/graphic/graphicOrigins.js +1 -1
- package/graphic/isAnnotationFeatureGraphicOrigin.d.ts +29 -0
- package/graphic/isAnnotationFeatureGraphicOrigin.js +2 -0
- package/graphic/isDimensionFeatureGraphicOrigin.d.ts +29 -0
- package/graphic/isDimensionFeatureGraphicOrigin.js +2 -0
- package/interfaces.d.ts +3 -3
- package/kernel.js +1 -1
- package/layers/AnnotationFeatureLayer.d.ts +73 -0
- package/layers/AnnotationFeatureLayer.js +1 -1
- package/layers/FeatureLayer.d.ts +7 -4
- package/layers/FeatureLayer.js +1 -1
- package/layers/Lyr3DWasmPerSceneView.js +1 -1
- package/layers/ParquetLayer.js +1 -1
- package/layers/SubtypeGroupLayer.d.ts +7 -4
- package/layers/SubtypeGroupLayer.js +1 -1
- package/layers/graphics/applyEditsUtils.js +1 -1
- package/layers/graphics/data/QueryEngine.js +1 -1
- package/layers/graphics/sources/FeatureLayerSource.js +1 -1
- package/layers/graphics/sources/ParquetSource.js +1 -1
- package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
- package/layers/orientedImagery/core/coverageUtils.js +1 -1
- package/layers/orientedImagery/transformations/utils.js +1 -1
- package/layers/support/{AnnotationSublayer.d.ts → AnnotationFeatureSublayer.d.ts} +12 -12
- package/layers/support/AnnotationFeatureSublayer.js +2 -0
- package/layers/support/EditingCapabilities.js +1 -1
- package/layers/support/ParquetPortalItemData.js +1 -1
- package/layers/support/SubtypeSublayer.d.ts +7 -4
- package/layers/support/SubtypeSublayer.js +1 -1
- package/layers/support/featureLayerUtils.js +1 -1
- package/networks/UtilityNetwork.js +1 -1
- package/package.json +3 -3
- package/popup/Feature.d.ts +57 -6
- package/popup/Features.d.ts +86 -7
- package/popup/content/UtilityNetworkAssociationsContent.d.ts +0 -1
- package/popup/support/UtilityNetworkAssociationType.d.ts +0 -1
- package/rest/print.js +1 -1
- package/rest/query/operations/query.js +1 -1
- package/smartMapping/renderers/location.js +1 -1
- package/smartMapping/renderers/opacity.js +1 -1
- package/smartMapping/renderers/predominance.js +1 -1
- package/smartMapping/renderers/support/regenerateUtils.js +1 -1
- package/smartMapping/renderers/support/rendererUtils.d.ts +3 -1
- package/smartMapping/renderers/support/rendererUtils.js +1 -1
- package/smartMapping/support/adapters/FeatureLayerAdapter.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/WebStyleSymbol.js +1 -1
- package/symbols/cim/effects/EffectOffset.js +1 -1
- package/symbols/support/symbolUtils.js +1 -1
- package/symbols/support/webStyleSymbolCache.js +2 -0
- package/third-party-notices.txt +0 -32
- package/undoredo/support/ApplySet.js +1 -1
- package/undoredo/support/ApplySetItem.js +1 -1
- package/views/2d/analysis/AreaMeasurement/AreaMeasurementTool.js +1 -1
- package/views/2d/engine/vectorTiles/VectorTileContainer.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/FeatureInstanceStore.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AAnimatedShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedMarkerMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/attributes.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/mesh/MeshWriterVertexPack.js +1 -1
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/engine/webgl/util/AnnotationMatcher.js +1 -1
- package/views/2d/layers/features/layerAdapters/AnnotationLayerAdapter.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReader.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReaderParquet.js +1 -1
- package/views/2d/layers/support/annodime/annotationGraphic.js +1 -1
- package/views/2d/layers/support/annodime/cimAnnotations.js +1 -1
- package/views/2d/layers/support/annodime/utils.js +1 -1
- package/views/2d/support/hitTestUtils.js +1 -1
- package/views/2d/unitBezier.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightPlacementController.js +2 -0
- package/views/3d/analysis/LineOfSight/LineOfSightReshapeTool3D.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightTool2.js +1 -1
- package/views/3d/analysis/LineOfSight/lineOfSightPlacementUtils.js +2 -0
- package/views/3d/analysis/Viewshed/ViewshedDrawToolRenderer.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedPlacementController.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedPlacementPointPlugin.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedPlacementRootPlugin.js +1 -1
- package/views/3d/analysis/Viewshed/placementUtils.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
- package/views/3d/layers/graphics/Graphics3DSymbol.js +1 -1
- package/views/3d/layers/graphics/SymbolComplexity.js +1 -1
- package/views/3d/layers/graphics/defaultSymbolComplexity.js +1 -1
- package/views/3d/support/QualityProfile.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentTechnique.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/PathEvaluate.glsl.js +14 -6
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/PathVertexPosition.glsl.js +2 -1
- package/views/3d/webgl-engine/core/shaderLibrary/util/EmissionDimming.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/blit/Blit.js +1 -1
- package/views/3d/webgl-engine/effects/glow/Glow.js +1 -1
- package/views/3d/webgl-engine/effects/transparency/OITBlend.js +1 -1
- package/views/3d/webgl-engine/lib/OrderIndependentTransparency.js +1 -1
- package/views/3d/webgl-engine/lib/PathEvaluator.js +1 -1
- package/views/3d/webgl-engine/materials/PathTechnique.js +1 -1
- package/views/3d/webgl-engine/materials/PolygonOffset.js +1 -1
- package/views/3d/webgl-engine/shaders/HUDMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/OutputColorHighlightOLID.glsl.js +6 -7
- package/views/3d/webgl-engine/shaders/ditherNoise.glsl.js +1 -1
- package/views/LinkChartView.d.ts +3 -1
- package/views/View2D.d.ts +3 -1
- package/views/draw/support/editingSessionUtils.js +1 -1
- package/views/interactive/snapping/SnappingManager.js +1 -1
- package/views/interactive/snapping/candidates/dehydrated/{DehydratedVertexSnappingCandidate.js → DehydratedFeatureSnappingCandidate.js} +1 -1
- package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.d.ts +10 -3
- package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js +1 -1
- package/widgets/BatchAttributeForm/attachmentUtils.d.ts +9 -0
- package/widgets/BatchAttributeForm/attachmentUtils.js +1 -1
- package/widgets/BatchAttributeForm/batchAttributeFormUtils.js +1 -1
- package/widgets/BatchAttributeForm/css.js +1 -1
- package/widgets/BatchAttributeForm/inputs/AttachmentElementInput.d.ts +3 -3
- package/widgets/BatchAttributeForm/inputs/AttachmentElementInput.js +1 -1
- package/widgets/BatchAttributeForm/inputs/BatchFormInputs.js +1 -1
- package/widgets/BatchAttributeForm/inputs/FieldInput.js +1 -1
- package/widgets/BatchAttributeForm/inputs/GroupInput.js +1 -1
- package/widgets/BatchAttributeForm/inputs/InputBase.js +1 -1
- package/widgets/BatchAttributeForm/inputs/RelationshipElementInput.js +1 -1
- package/widgets/BatchAttributeForm/inputs/support/attachmentValidationCriteriaState.d.ts +1 -1
- package/widgets/BatchAttributeForm/inputs/support/createBatchFormInputs.js +1 -1
- package/widgets/BatchAttributeForm/interfaceUtils.js +1 -1
- package/widgets/BatchAttributeForm/templates/support/createBatchFormTemplate.js +1 -1
- package/widgets/BatchAttributeForm/templates/support/hashElementTemplate.js +1 -1
- package/widgets/BatchAttributeForm/types.d.ts +92 -7
- package/widgets/BatchAttributeForm.js +1 -1
- package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
- package/widgets/Editor/CreateFeaturesWorkflowData.js +1 -1
- package/widgets/Editor/EditorViewModel.d.ts +1 -1
- package/widgets/Editor/EditorViewModel.js +1 -1
- package/widgets/Editor/Edits.js +1 -1
- package/widgets/Editor/MergeFeaturesWorkflow.js +1 -1
- package/widgets/Editor/SplitFeatureWorkflow.js +1 -1
- package/widgets/Editor/UpdateFeatureWorkflow.js +1 -1
- package/widgets/Editor/UpdateFeaturesWorkflow.js +1 -1
- package/widgets/Editor/UpdateRecordWorkflow.js +1 -1
- package/widgets/Editor/UpdateWorkflow.js +1 -1
- package/widgets/Editor/UpdateWorkflowData.js +1 -1
- package/widgets/Editor/components/UpdateFeaturePanelContent.js +1 -1
- package/widgets/Editor/support/EditorItem.js +1 -1
- package/widgets/Editor/support/SketchController.js +1 -1
- package/widgets/Editor/support/attachmentUtils.js +2 -0
- package/widgets/Editor/workflowUtils.js +1 -1
- package/widgets/Editor.js +1 -1
- package/widgets/Feature/FeatureViewModel.d.ts +0 -1
- package/widgets/FeatureForm/UtilityNetworkAssociationInput.d.ts +0 -1
- package/widgets/Features/FeaturesViewModel.d.ts +0 -1
- package/widgets/Features/FeaturesViewModel.js +1 -1
- package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/adapters/sketch/MeasurementAdapter.js +1 -1
- package/widgets/OrientedImageryViewer/components/OrientedImageryVideoViewModel.js +1 -1
- package/widgets/OrientedImageryViewer.js +1 -1
- package/widgets/Popup.js +1 -1
- package/widgets/Sketch/SketchViewModel.d.ts +10 -1
- package/widgets/Sketch/SketchViewModel.js +1 -1
- package/widgets/Sketch.js +1 -1
- package/widgets/UtilityNetworkTrace/UtilityNetworkTraceViewModel.js +1 -1
- package/widgets/UtilityNetworkTrace/support/GeometryHandler.js +1 -1
- package/assets/components/assets/icon/orientedImageryFullSuperimpose16.json +0 -1
- package/assets/components/assets/icon/orientedImageryFullSuperimpose24.json +0 -1
- package/assets/components/assets/icon/orientedImageryFullSuperimpose32.json +0 -1
- package/assets/components/assets/icon/orientedImageryHalfSuperimpose16.json +0 -1
- package/assets/components/assets/icon/orientedImageryHalfSuperimpose24.json +0 -1
- package/assets/components/assets/icon/orientedImageryHalfSuperimpose32.json +0 -1
- package/assets/components/assets/icon/orientedImagerySceneOnly16.json +0 -1
- package/assets/components/assets/icon/orientedImagerySceneOnly24.json +0 -1
- package/assets/components/assets/icon/orientedImagerySceneOnly32.json +0 -1
- package/assets/components/assets/icon/parquetFeatureLayer16.json +0 -1
- package/assets/components/assets/icon/parquetFeatureLayer24.json +0 -1
- package/assets/components/assets/icon/parquetFeatureLayer32.json +0 -1
- package/assets/esri/core/workers/chunks/013708f40f811158d42c.js +0 -1
- package/assets/esri/core/workers/chunks/03354e9256b2f77fd4f2.js +0 -1
- package/assets/esri/core/workers/chunks/0436fe89adc78696251c.js +0 -1
- package/assets/esri/core/workers/chunks/079b412d07d02504f1db.js +0 -1
- package/assets/esri/core/workers/chunks/0826d36dfbfa28442b70.js +0 -1
- package/assets/esri/core/workers/chunks/0ded58ccb83f624f1460.js +0 -1
- package/assets/esri/core/workers/chunks/0ecc1bc1686844cdd60e.js +0 -1
- package/assets/esri/core/workers/chunks/152f1c08197955224ad3.js +0 -1
- package/assets/esri/core/workers/chunks/174cc2e69e5b5a13d880.js +0 -1
- package/assets/esri/core/workers/chunks/181e948d076a9a7aae8a.js +0 -1
- package/assets/esri/core/workers/chunks/18e7784f13a57a75585a.js +0 -1
- package/assets/esri/core/workers/chunks/1c8436b27a3d3cde5cfc.js +0 -1
- package/assets/esri/core/workers/chunks/1d81e667a580c5cdeda1.js +0 -262
- package/assets/esri/core/workers/chunks/1dacc0b64bd27ce2de3a.js +0 -1
- package/assets/esri/core/workers/chunks/1eeb1edca0ad5db6917c.js +0 -1
- package/assets/esri/core/workers/chunks/1f289aa69dd6b6be534a.js +0 -1
- package/assets/esri/core/workers/chunks/27c6def22c2b0791ce9e.js +0 -1
- package/assets/esri/core/workers/chunks/2bc4aff77c830061e16e.js +0 -1
- package/assets/esri/core/workers/chunks/2c3fc2805f6de0963789.js +0 -1
- package/assets/esri/core/workers/chunks/2d2895f1fdf44d212a4d.js +0 -1
- package/assets/esri/core/workers/chunks/2e6382d50bf012064eae.js +0 -1
- package/assets/esri/core/workers/chunks/3248001d9dfb9153699e.js +0 -1
- package/assets/esri/core/workers/chunks/33b4f5dfe1a16b59b010.js +0 -1
- package/assets/esri/core/workers/chunks/36dac6ab51d9dbdd091d.js +0 -1
- package/assets/esri/core/workers/chunks/36dd3ad3ef2fbfc15cbd.js +0 -1
- package/assets/esri/core/workers/chunks/39974d1e5d3820ef1680.js +0 -1
- package/assets/esri/core/workers/chunks/42e5e00610f281ca8ffa.js +0 -1
- package/assets/esri/core/workers/chunks/4301cb9670fa7c907460.js +0 -1
- package/assets/esri/core/workers/chunks/493a0981e90a5799fb5b.js +0 -1
- package/assets/esri/core/workers/chunks/4c54cb80c4dc9bbbd395.js +0 -1
- package/assets/esri/core/workers/chunks/4cc78493805671708a9b.js +0 -1
- package/assets/esri/core/workers/chunks/4e788fc6cb2ea936f676.js +0 -1
- package/assets/esri/core/workers/chunks/4efef5fa8bf23aaf34cd.js +0 -1
- package/assets/esri/core/workers/chunks/5100b5a6a506c704dfaf.js +0 -1
- package/assets/esri/core/workers/chunks/5121768c70f1e03b685c.js +0 -1
- package/assets/esri/core/workers/chunks/52afd43bbe23e358efb5.js +0 -1
- package/assets/esri/core/workers/chunks/52f354bf80ee5ab0379a.js +0 -1
- package/assets/esri/core/workers/chunks/5359ff9492383c5bd9b1.js +0 -1
- package/assets/esri/core/workers/chunks/54d7f07e3348ddb6d9a2.js +0 -1
- package/assets/esri/core/workers/chunks/57b7e5fde972d3ad7884.js +0 -1
- package/assets/esri/core/workers/chunks/597aa39cdb5366ef9a74.js +0 -1
- package/assets/esri/core/workers/chunks/5aba23584e0b230c75f5.js +0 -1
- package/assets/esri/core/workers/chunks/5cb274e5759f7ca0d4ed.js +0 -1
- package/assets/esri/core/workers/chunks/5d8924fdcdb473d261cd.js +0 -1
- package/assets/esri/core/workers/chunks/62de9e83331fb10aac6a.js +0 -2
- package/assets/esri/core/workers/chunks/62e77e3c5ca9b4887923.js +0 -2
- package/assets/esri/core/workers/chunks/64114a7d2da162987958.js +0 -1
- package/assets/esri/core/workers/chunks/641cddee377599916de2.js +0 -2
- package/assets/esri/core/workers/chunks/65520a443e3811255bea.js +0 -1
- package/assets/esri/core/workers/chunks/65f02eca694cc1c9f5a7.js +0 -1
- package/assets/esri/core/workers/chunks/6821462e5c1e9c76010a.js +0 -1
- package/assets/esri/core/workers/chunks/6a3d207308b29651f397.js +0 -1
- package/assets/esri/core/workers/chunks/6f5d61f734ec40dafabb.js +0 -1
- package/assets/esri/core/workers/chunks/737de87bfb9b5f5a9c6c.js +0 -1
- package/assets/esri/core/workers/chunks/7748743d4be047094d67.js +0 -1
- package/assets/esri/core/workers/chunks/78c53aeb0a408ab3c80c.js +0 -1
- package/assets/esri/core/workers/chunks/79f2d4b3af5776ec2045.js +0 -1
- package/assets/esri/core/workers/chunks/7a8ed08cd173963b3112.js +0 -1
- package/assets/esri/core/workers/chunks/7b5c1030a7cf0f382cc4.js +0 -1
- package/assets/esri/core/workers/chunks/7cadb872b9ca96eedca5.js +0 -1
- package/assets/esri/core/workers/chunks/7cee81c5aa1e6b7d2452.js +0 -1
- package/assets/esri/core/workers/chunks/7ed3d6c72f23c628df3b.js +0 -1
- package/assets/esri/core/workers/chunks/80f4f686ce403cb2693f.js +0 -1
- package/assets/esri/core/workers/chunks/8351012ceb466f01b8fd.js +0 -1
- package/assets/esri/core/workers/chunks/859bc873e7af911a518f.js +0 -1
- package/assets/esri/core/workers/chunks/8e99f937fd36cf2cd05f.js +0 -1
- package/assets/esri/core/workers/chunks/93bd56396b8cd020f965.js +0 -1
- package/assets/esri/core/workers/chunks/94fac056e14caed09682.js +0 -1
- package/assets/esri/core/workers/chunks/957f7b8de4aecb6f644e.js +0 -1
- package/assets/esri/core/workers/chunks/97d2bdbea39cbcf8fd0f.js +0 -1
- package/assets/esri/core/workers/chunks/99101789035f1787c630.js +0 -1
- package/assets/esri/core/workers/chunks/9c6d34bb666f630d511f.js +0 -1
- package/assets/esri/core/workers/chunks/a0208e35b217808777c4.js +0 -1
- package/assets/esri/core/workers/chunks/a320998f18922a35899f.js +0 -1
- package/assets/esri/core/workers/chunks/a4e9a17dacbb52444d75.js +0 -1
- package/assets/esri/core/workers/chunks/a5abba59e738c3240c22.js +0 -1
- package/assets/esri/core/workers/chunks/a63bba226de6c5e464b0.js +0 -1
- package/assets/esri/core/workers/chunks/a9f29ff36a7ae5bae686.js +0 -1
- package/assets/esri/core/workers/chunks/aae0049c2c3e15a813e8.js +0 -1
- package/assets/esri/core/workers/chunks/adc32f6b45ea3026fc34.js +0 -1
- package/assets/esri/core/workers/chunks/af8ef6701631ed5e5b80.js +0 -1
- package/assets/esri/core/workers/chunks/b666027b9022fa346a79.js +0 -1
- package/assets/esri/core/workers/chunks/b73c146d3e550eaf07eb.js +0 -1
- package/assets/esri/core/workers/chunks/b803e7b0d489bb628d72.js +0 -1
- package/assets/esri/core/workers/chunks/bb24972603fb35dd8dcf.js +0 -1
- package/assets/esri/core/workers/chunks/bcc097271f5cdf0a97a7.js +0 -1
- package/assets/esri/core/workers/chunks/c0cbc50e5afd68bd485c.js +0 -1
- package/assets/esri/core/workers/chunks/c3ff2ff0a86a9143d7a5.js +0 -1
- package/assets/esri/core/workers/chunks/c6d0b4875b6b8d6bc25a.js +0 -1
- package/assets/esri/core/workers/chunks/c9a4601073e1a3eee9d0.js +0 -1
- package/assets/esri/core/workers/chunks/cf8ce21dc649021e97f6.js +0 -1
- package/assets/esri/core/workers/chunks/d78b7cac322755e87eb8.js +0 -1
- package/assets/esri/core/workers/chunks/dddb57ff637643ccfc87.js +0 -1
- package/assets/esri/core/workers/chunks/df18b0a653b328d8d052.js +0 -1
- package/assets/esri/core/workers/chunks/e1bf87077541da6853c6.js +0 -1
- package/assets/esri/core/workers/chunks/e3b713a590cce6245ee2.js +0 -1
- package/assets/esri/core/workers/chunks/e4406baf206b9e4c7e4f.js +0 -1
- package/assets/esri/core/workers/chunks/e499252cb52f7aed49a0.js +0 -1
- package/assets/esri/core/workers/chunks/e4e2f479c0c45ae1b2c3.js +0 -1
- package/assets/esri/core/workers/chunks/e656fd5ecf9ac059a87b.js +0 -1
- package/assets/esri/core/workers/chunks/e92698f50089484c4901.js +0 -1
- package/assets/esri/core/workers/chunks/e9c5c295b6bf10e942a4.js +0 -1
- package/assets/esri/core/workers/chunks/eb91dc957c328674e119.js +0 -1
- package/assets/esri/core/workers/chunks/ed3d16a5b4084ef61f8a.js +0 -1
- package/assets/esri/core/workers/chunks/edcde00495727d506c46.js +0 -1
- package/assets/esri/core/workers/chunks/efb4aa5886730ea377bd.js +0 -1
- package/assets/esri/core/workers/chunks/f0832b413612c77a62ca.js +0 -1
- package/assets/esri/core/workers/chunks/f116331c6eca937aac8e.js +0 -1
- package/assets/esri/core/workers/chunks/f334bf192dff5af10a70.js +0 -1
- package/assets/esri/core/workers/chunks/f518835b2dc89a48cfb1.js +0 -1
- package/assets/esri/core/workers/chunks/f5731ad4cfbbf1cc569a.js +0 -2
- package/assets/esri/core/workers/chunks/f76b1fc36f5606cac2c8.js +0 -1
- package/assets/esri/core/workers/chunks/f7fca88d120d45bb782a.js +0 -1
- package/assets/esri/core/workers/chunks/f819854098d63fe4ccdb.js +0 -1
- package/assets/esri/core/workers/chunks/f98118127469449ca145.js +0 -1
- package/assets/esri/core/workers/chunks/f9e22cf59e2e2782d70f.js +0 -1
- package/assets/esri/core/workers/chunks/fbe7dae0b4bf2d172487.js +0 -1
- package/assets/esri/core/workers/chunks/fea3b6bef761ef78630e.js +0 -1
- package/chunks/Bufferer-Dw9Qi4T1.js +0 -2
- package/chunks/Distance2DCalculator-CXhBP-8I.js +0 -2
- package/chunks/GeodeticDistanceCalculator-Ce-woMPw.js +0 -2
- package/layers/support/AnnotationSublayer.js +0 -2
- package/views/3d/analysis/LineOfSight/LineOfSightPlacementTool.js +0 -2
- /package/assets/esri/core/workers/chunks/{d9d4754062758789f186.js.LICENSE.txt → 05016e5a1de384994001.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{62e77e3c5ca9b4887923.js.LICENSE.txt → 0d42322362e76f674d94.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{62de9e83331fb10aac6a.js.LICENSE.txt → 35533c8ef541f7643497.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{641cddee377599916de2.js.LICENSE.txt → 99c002015c2127e6cbfc.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{f5731ad4cfbbf1cc569a.js.LICENSE.txt → c318e6dbb8651433038f.js.LICENSE.txt} +0 -0
- /package/chunks/{Centroid-DZi-eb9F.js → Centroid-CA-TwbbN.js} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{isSome as t}from"../../core/arrayUtils.js";import{createTask as i}from"../../core/asyncUtils.js";import o from"../../core/Collection.js";import{deprecatedFunction as r}from"../../core/deprecate.js";import s from"../../core/Error.js";import{EventedAccessor as a}from"../../core/Evented.js";import{abortHandle as n,makeHandle as l}from"../../core/handleUtils.js";import"../../core/has.js";import c from"../../core/Logger.js";import{destroyMaybe as d,abortMaybe as p,removeMaybe as h}from"../../core/maybe.js";import{throwIfAborted as u}from"../../core/promiseUtils.js";import w from"../../core/ReactiveMap.js";import{watch as f,syncAndInitial as m,initial as y,on as g,when as k,sync as v,whenOnce as _}from"../../core/reactiveUtils.js";import{property as W,subclass as M}from"../../core/accessorSupport/decorators.js";import{UpdatingHandles as T}from"../../core/support/UpdatingHandles.js";import{getTemplatesForLayers as b}from"../../editing/templateUtils.js";import{getGraphicLayer as S}from"../../graphic/graphicOriginUtils.js";import V from"../../layers/GraphicsLayer.js";import{isEditableLayer as F}from"../../layers/support/editableLayers.js";import{isFeatureLayer as I,isSubtypeGroupLayer as L,getOwningPortalUrl as E}from"../../layers/support/layerUtils.js";import{parseKnownArcGISOnlineDomain as C}from"../../portal/support/urlUtils.js";import A from"../../views/SelectionManager.js";import{fetchFullFeaturesByObjectId as U}from"../../views/draw/support/editingSessionUtils.js";import O from"../../views/interactive/sketch/SketchLabelOptions.js";import j from"../../views/interactive/sketch/SketchOptions.js";import P from"../../views/interactive/sketch/SketchTooltipOptions.js";import R from"../../views/interactive/sketch/SketchValueOptions.js";import{SnappingManager as H}from"../../views/interactive/snapping/SnappingManager.js";import q from"../../views/interactive/snapping/SnappingOptions.js";import{isSelectableLayer as x}from"../../views/support/selectionUtils.js";import G from"../Attachments/AttachmentsViewModel.js";import D from"./CreateFeaturesWorkflow.js";import B from"./UpdateWorkflow.js";import{getLayersFromWorkflow as N,isCreateFeaturesWorkflow as Q,isUpdateRecordWorkflow as z,isUpdateFeaturesWorkflow as Z,isMergeFeaturesWorkflow as $,isSplitFeatureWorkflow as J,isUpdateWorkflow as K,findEditorItemForLayerOrThrow as X,toFeatureInfos as Y,fetchFullFeatures as ee,findEditorItemForLayer as te,whenEditorLayerView as ie}from"./workflowUtils.js";import oe from"./support/EditorItem.js";import{assertViewNot3D as re,MultipleSourceLayersError as se,InsufficientFeatureCountError as ae,MissingOriginLayerError as ne,assertMergeWorkflowCapabilities as le,FetchFullFeatureError as ce,assertSplitWorkflowCapabilities as de}from"./support/errors.js";import{makeTemplateGroupInfoForLayer as pe}from"../FeatureTemplates/featureTemplatesUtils.js";import he from"../FeatureTemplates/FeatureTemplatesViewModel.js";import ue from"../Sketch/SketchViewModel.js";import we from"../Spinner/SpinnerViewModel.js";import{goTo as fe}from"../support/goToUtils.js";import{isFeatureItem as me,isLayerItem as ye}from"../support/SelectionList/selectionListUtils.js";import ge from"../support/SelectionList/SelectionListViewModel.js";import ke from"../support/SelectionToolbar/SelectionToolbarViewModel.js";function ve(e,t){return e?.find(e=>e.layer===t)}let _e=class extends a{constructor(e){super(e),this._defaultSelectionManager=new A,this._queuedSelectionTool=null,this._sketchEventListenerHandle=null,this._sketchGraphicsLayer=new V({listMode:"hide",internal:!0,title:"Editor sketch layer"}),this._snappingManager=null,this._templatesByLayer=new Map,this._updateItemsTask=null,this._updateTemplatesTask=null,this._updatingHandles=new T,this._featureTemplatesViewModelIsRestricted=!1,this.activeWorkflow=null,this._activityQueue=new o,this.editorItems=new o,this.editorItemsLayerMap=new w,this.failures=[],this.hideTemplatesForInactiveLayers=!1,this.attachmentsViewModel=new G({capabilities:{editing:!0}}),this.featureTemplatesViewModel=new he({disabledItemFunction:({layer:e})=>this._itemIsSuspended(e)}),this.layerInfos=null,this.ownSketchViewModel=new ue({layer:this._sketchGraphicsLayer,useLegacyCreateTools:this._get("useLegacyCreateTools")??!0}),this.selectionListViewModel=new ge,this.selectionManager=null,this.selectionToolbarViewModel=new ke({continuousSelectionEnabled:!0,defaultOperationType:"replace",persistSelection:!1,returnGeometry:!1}),this.sketchOptions=new j,this.snappingOptions=new q({attributeRulesEnabled:!0}),this.spinnerViewModel=new we,this.syncViewSelection=!1,this.pageStack=[],this.showDiscardEditsPrompt=()=>Promise.resolve(!0),this.showConfirmationPrompt=()=>Promise.resolve(!0),this._candidateCommitted=!1,this.back=async()=>{if("viewing-selection-list"===this.state)return this.selectionListViewModel.filterText=void 0,void this.effectiveSelectionManager.clear();this.canGoBack&&(this.activeWorkflow?.hasPreviousStep?await this.activeWorkflow.back(this.showDiscardEditsPrompt):await this._cancelWorkflow({force:!this.hasPendingEdits}))},this.saveWorkflow=async()=>await(this.activeWorkflow?.save(this.showConfirmationPrompt)),this.selectFeature=(e,t=!1)=>{const i=this.activeWorkflow;if(this._candidateCommitted||"update"!==i?.type)return;const{rootFeatures:o}=i.data;o.removeAll(),e&&o.add(e),t&&(i.next(),this._candidateCommitted=!0)}}initialize(){this.addHandles([f(()=>{const e=this.view,t=e?.map?.editableLayers.toArray(),i=e?.allLayerViews,o=i?.filter(e=>!!t?.includes(e.layer));return[t,o,this.layerInfos]},()=>this._updateEditorItems(),m),f(()=>this.hideTemplatesForInactiveLayers,()=>this.syncFeatureTemplates()),f(()=>this._selectionSources,()=>this._syncSelectionSources(),y),g(()=>this.activeWorkflow,"cancel",()=>this.emit("workflow-cancel")),g(()=>this.activeWorkflow,"commit",()=>this.emit("workflow-commit")),g(()=>this.activeWorkflow,"complete",()=>{this.emit("workflow-commit"),this._set("activeWorkflow",null)}),k(()=>!this.activeWorkflow&&this._queuedSelectionTool,()=>this._queuedSelectionTool&&this.selectionToolbarViewModel.activateTool(this._queuedSelectionTool)),f(()=>this.activeWorkflow,e=>this._defaultSelectionManager.highlightEnabled=!e),k(()=>this.view?.map,e=>e.add(this._sketchGraphicsLayer),y),g(()=>this.editorItems,"change",()=>this._afterEditorItemsChange()),f(()=>[this.canCreate,this.canUpdateVisible],()=>this._afterEditorItemsChange()),f(()=>this.page,(e,t)=>{const i=[...this.pageStack];if(-1===i.indexOf(e))i.push(e);else for(;i.length&&i.at(-1)!==e;)i.pop();this.pageStack=i},m),k(()=>"awaiting-update-feature-candidate"===this.state,()=>this._candidateCommitted=!1),g(()=>this.featureTemplatesViewModel,"select",async({item:e,oldItem:t})=>{const{activeWorkflow:i}=this;if(i){if("update"===i.type&&"awaiting-feature-creation-info"===i.activeWorkflow?.stepId)return;try{await this.cancelWorkflow({force:!this.hasPendingEdits})}catch{return void this.featureTemplatesViewModel.select(t,{emit:!1})}}if(!e)return;const o={layer:e.layer,template:e.template};if(e.supportsUpload)return this.featureTemplatesViewModel.select(t,{emit:!1}),this.startCreateFeaturesWorkflow(o);await this.startCreateFeaturesWorkflowAtFeatureCreation(o)}),f(()=>[this.view,this.featureTemplatesViewModel],([e,t])=>{t.view=e},m),g(()=>this.view,"key-down",e=>{"Escape"===e.key&&this.activeWorkflow?.keyboardCancellationEnabled&&(e.stopPropagation(),this.back())}),g(()=>this.sketchViewModel,["create","delete","update"],e=>{const{activeWorkflow:t}=this,i=N(t),o=`sketch-${e.type}`;this.emit(o,{type:o,detail:e,layer:i[0],layers:i})},v),f(()=>this.view,e=>{if(this._snappingManager=d(this._snappingManager),!e)return;const t=this.snappingOptions;this._snappingManager=new H({view:e,options:t}),this.ownSketchViewModel.snappingManager=this._snappingManager},m),f(()=>this.snappingOptions,e=>{this._snappingManager&&(this._snappingManager.options=e)},m),g(()=>this.selectionToolbarViewModel,"complete",e=>this._onSelectionComplete(e)),f(()=>({view:this.view,selectionManager:this.effectiveSelectionManager,selectionListViewModel:this.selectionListViewModel,selectionToolbarViewModel:this.selectionToolbarViewModel}),({view:e,selectionManager:t,selectionListViewModel:i,selectionToolbarViewModel:o})=>{t.view=e,i.view=e,o.view=e},m),f(()=>this.effectiveSelectionManager,e=>{this.selectionListViewModel.selectionManager=e,this.selectionToolbarViewModel.selectionManager=e},m)])}destroy(){this._cancelWorkflow({warnIfNoWorkflow:!1}).then(()=>{this.view?.map?.remove(this._sketchGraphicsLayer),this.view=null}),this._updateItemsTask=p(this._updateItemsTask),this._updatingHandles.destroy(),this._sketchEventListenerHandle=h(this._sketchEventListenerHandle),this.selectionListViewModel?.destroy(),this.selectionToolbarViewModel?.destroy(),this._defaultSelectionManager.destroy()}get _featureTemplatesLayersAndTables(){const e=new o;for(const t of this.editorItems){const i=this.hideTemplatesForInactiveLayers&&!t.visible;t.supportsCreateFeaturesWorkflow&&!i&&e.push(t.layer)}return e}get _selectionSources(){const e=new o;if(this.syncViewSelection||this.selectionManager)return e;for(const t of this.editorItems)x(t.layer)&&t.supportsUpdateWorkflow&&e.push(t.layer);return e}get activeFeatureCount(){const e=this.activeLeafWorkflow;return Q(e)?e.pendingFeatures.length:z(e)&&e.data.edits.feature?1:Z(e)?e.data.fullFeatures.length:$(e)?e.data.features.length:J(e)?2:0}get activeLeafWorkflow(){const e=this.activeWorkflow;return e&&K(e)?e.activeWorkflow??e:e}get canCreate(){return this.editorItems.some(e=>e.supportsCreateFeaturesWorkflow)}get canCreateVisible(){return!!this.featureTemplatesLayers.length}get canUpdate(){return this.editorItems.some(e=>e.supportsUpdateWorkflow)}get canUpdateVisible(){return this.editorItems.some(e=>e.supportsUpdateWorkflow&&e.visible)}get featureTemplatesLayers(){return this._featureTemplatesLayersAndTables.filter(e=>"scene"===e.type||!e.isTable)}get effectiveSelectionManager(){const e=this.view;return e&&this.syncViewSelection?e.selectionManager:this.selectionManager??this._defaultSelectionManager}get featureFormViewModel(){return null}get formViewModel(){return this.activeWorkflow?.formViewModel}get utilityNetworkAssociationAddAssociationViewModel(){const{activeWorkflow:e}=this;return"update"===e?.type?e.activeUtilityNetworkAssociationAddAssociationViewModel:null}get labelOptions(){return this.sketchOptions.labels}set labelOptions(e){this.sketchOptions.labels=e}get useLegacyCreateTools(){return this.ownSketchViewModel.useLegacyCreateTools}set useLegacyCreateTools(e){this.ownSketchViewModel.useLegacyCreateTools=e}get isUsingLegacyCreateTools(){return this.useLegacyCreateTools||"2d"!==this.view?.type}get sketchViewModel(){const{activeWorkflow:e}=this;return"update"===e?.type?e.activeSketchViewModel:"create-features"===e?.type?e.sketchViewModel:this.ownSketchViewModel}get state(){if(!this.view?.ready)return"disabled";const e=this.attachmentsViewModel.mode;if("add"===e)return"adding-attachment";if("edit"===e)return"editing-attachment";const{activeWorkflow:t}=this,i=!t?.stepId;return this.effectiveSelectionManager.count&&i?"viewing-selection-list":i?"ready":"update"===t.type&&t.activeWorkflow?.stepId?t.activeWorkflow.stepId:t.stepId}get syncing(){return this._activityQueue.length>0}get updating(){return this._updatingHandles.updating||!0===this.activeWorkflow?.updating}get tooltipOptions(){return this.sketchOptions.tooltips}set tooltipOptions(e){this.sketchOptions.tooltips=e}get valueOptions(){return this.sketchOptions.values}set valueOptions(e){this.sketchOptions.values=e}set view(e){this.ownSketchViewModel.view=e,this.spinnerViewModel.view=e,this._set("view",e)}get canZoomTo(){return this._getWorkingFeatures().some(e=>e.geometry)}get page(){const{activeWorkflow:e,state:t}=this;if("update"===e?.type&&e.formViewModel?.activeAssociationsInput)return e.formViewModel.activeAssociationsInput.associatedLayer?"viewing-associated-features":"viewing-associated-layers";if("update"===e?.type&&"awaiting-feature-to-update"===e.stepId)return"ready";if("create-features"===e?.type&&0===e.numPendingFeatures){const t=e.data.upload;if(t)return"default"===t.state?"ready":"creating-features-upload-details"}return t??"disabled"}get formDisabled(){const{activeLeafWorkflow:e}=this;if(z(e))return!1===e.data.editorItem?.capabilities.update.attributes||!0===e.formViewModel.disabled||!0===e.formViewModel.readOnly;if(Z(e)){const{formViewModel:t}=e;return t.disabled||t.readOnly}return!1}get formHasAssociation(){return!!this.formViewModel?.activeAssociation}get canGoBack(){return null!=this.activeWorkflow&&!this.syncing}get shouldShowDeleteButton(){const{activeLeafWorkflow:e}=this;if(z(e)){const{data:t}=e;return t.editorItem?.capabilities.delete.enabled&&!t.readOnly}return!!Z(e)&&e.data.editorItems.every(e=>e.capabilities.delete.enabled)}get hasPendingEdits(){return this.activeWorkflow?.hasPendingEdits??!1}get snappingManager(){return this._snappingManager}activateSelectionTool(e){return this.selectionToolbarViewModel.activateTool(e)}cancelSelectionTool(){this.selectionToolbarViewModel.cancel()}getTemplatesForLayer(e){return this._templatesByLayer.get(e)??[]}async startCreateFeaturesWorkflowAtFeatureTypeSelection(){return this.startCreateFeaturesWorkflow()}async startCreateFeaturesWorkflowAtFeatureCreation(e){return this.startCreateFeaturesWorkflow(e,"creating-features")}async startCreateFeaturesWorkflow(e,t="awaiting-feature-creation-info"){if(await _(()=>!this.updating),!this.canCreate)throw new s("editing:unsupported-workflow","Creating features is unsupported or disabled.");const i=this._createUpdatingResolver();try{await this._cancelWorkflow();const i=this._createCreateFeaturesWorkflow(e,t);this._set("activeWorkflow",i),await i.start()}catch(o){this._logErrorAndCancelWorkflow(o)}finally{i.resolve()}}async startCreateFeaturesWorkflowAtFeatureEdit(e){await _(()=>!this.updating);const t=this._createUpdatingResolver();try{const{initialFeature:t}=e,i=t.sourceLayer=t.layer,o=i?X(this.editorItems,i):void 0;if(!o?.supportsCreateFeaturesWorkflow)throw new s("editing:unsupported-workflow","Creating features is unsupported or disabled for this layer.");await this._cancelWorkflow();const r=this._createCreateFeaturesWorkflow({initialFeature:t,layer:o.layer,maxFeatures:1},"creating-features");this._set("activeWorkflow",r),await r.start()}catch(i){this._logErrorAndCancelWorkflow(i)}finally{t.resolve()}}async startMergeFeaturesWorkflow(e,t={}){await _(()=>!this.updating),re(this,"merge-features");const i=Array.isArray(e)?Y(e):[e];if(i.length>1)throw new se;if(0===i.length||i[0].objectIds.length<2)throw new ae(2);const r=i[0],s=r.layer;if(!s)throw new ne;const a=X(this.editorItems,s);le(a);const l=this._createUpdatingResolver(),c=new AbortController;this.addHandles(n(c));try{await this._cancelWorkflow(),this.cancelSelectionTool();const e=await U(r.objectIds,s,this.view?.spatialReference,c.signal);if(e.length!==r.objectIds.length)throw new ce;let i;if(t.keyFeature){const o=t.keyFeature.getObjectId();i=e.find(e=>e.getObjectId()===o)??t.keyFeature}const a=this._createUpdateWorkflow("editing-existing-feature",{rootFeatures:new o(e),rootWorkflowOptions:{type:"merge",props:{...t,keyFeature:i}}});this._set("activeWorkflow",a),this.addHandles(this._destroyWorkflowOnCommit(a)),await a.start()}catch(d){this._logErrorAndCancelWorkflow(d)}finally{l.resolve()}}async startSplitFeatureWorkflow(e,t={}){await _(()=>!this.updating),re(this,"split-feature");const i=S(e);if(!i)throw new ne;const r=X(this.editorItems,i);de(r);const s=this._createUpdatingResolver(),a=new AbortController;this.addHandles(n(a));try{await this._cancelWorkflow(),this.cancelSelectionTool();const r=await ee([e],i,this.view?.spatialReference,a.signal);if(1!==r.length)throw new ce;const s=this._createUpdateWorkflow("editing-existing-feature",{rootFeatures:new o(r),rootWorkflowOptions:{type:"split",props:t}});this._set("activeWorkflow",s),this.addHandles(this._destroyWorkflowOnCommit(s)),await s.start()}catch(l){this._logErrorAndCancelWorkflow(l)}finally{s.resolve()}}async startUpdateFeaturesWorkflow(e){if(await _(()=>!this.updating),!this.canUpdate)return void this._logError("editing:unsupported-workflow","Update features workflow is unsupported or disabled.");const t=Array.isArray(e)?Y(e):[e];if(t.length>1)throw new se;const i=this._createUpdatingResolver();try{await this._cancelWorkflow(),this.cancelSelectionTool();const e=this._createUpdateWorkflow("editing-existing-feature",{rootFeatureInfos:t,rootWorkflowOptions:{type:"update-multiple"}});e.addHandles(this._destroyWorkflowOnCommit(e)),this._set("activeWorkflow",e),await e.start()}catch(o){this._logErrorAndCancelWorkflow(o)}finally{i.resolve()}}async startUpdateWorkflowAtFeatureSelection(){if(await _(()=>!this.updating),!this.canUpdate)return void this._logError("editing:unsupported-workflow","Update workflow is unsupported or disabled.");const e=this._createUpdatingResolver();try{await this._cancelWorkflow();const e=this._createUpdateWorkflow();this._set("activeWorkflow",e),await e.start()}catch(t){this._logErrorAndCancelWorkflow(t)}finally{e.resolve()}}async startUpdateWorkflowAtMultipleFeatureSelection(e){if(await _(()=>!this.updating),!this.canUpdate)return void this._logError("editing:unsupported-workflow","Update workflow is unsupported or disabled.");const t=this._createUpdatingResolver();try{await this._cancelWorkflow();const t=this._createUpdateWorkflow("awaiting-update-feature-candidate");t.data.candidates=e,this._set("activeWorkflow",t),await t.start()}catch(i){this._logErrorAndCancelWorkflow(i)}finally{t.resolve()}}async startUpdateWorkflowAtFeatureEdit(e){if(await _(()=>!this.updating),!this.canUpdate)return void this._logError("editing:unsupported-workflow","Update workflow is unsupported or disabled.");const t=this._createUpdatingResolver();try{await this._cancelWorkflow(),this.cancelSelectionTool();const t=this._createUpdateWorkflow("editing-existing-feature",{rootFeatures:new o([e])});t.addHandles(this._destroyWorkflowOnCommit(t)),this._set("activeWorkflow",t),await t.start()}catch(i){this._logErrorAndCancelWorkflow(i)}finally{t.resolve()}}async startUpdateWorkflowWithActiveSelection(){const{selectionListViewModel:e}=this;if(!e.visibleFeatureCount||!e.visibleLayerCount)throw new s("editing:missing-selection","Unable to determine visible selection.");if(e.visibleLayerCount>1)throw new s("editing:features-different-layers","Cannot start workflow with features from different layers.");const t=e.layerItems.find(e=>e.visible);t&&await this._startUpdateWorkflowWithLayerItem(t,"update")}async deleteFeatureFromWorkflow(){r(c.getLogger(this),"EditorViewModel.deleteFeatureFromWorkflow is deprecated. Use EditorViewModel.deleteFeatures instead.",{version:"4.33",replacement:"EditorViewModel.deleteFeatures",warnOnce:!0}),await this.deleteFeatures()}async deleteFeatures(){const e=this.activeWorkflow;if(K(e))return e.deleteActiveFeatures();this._logError("editing:unsupported-workflow","Deleting features requires an active update workflow.")}async deleteAssociationFromWorkflow(){const{activeWorkflow:e}=this;e&&"update"===e.type?await e.deleteActiveAssociation():this._logError("editing:unsupported-workflow","Deleting an association requires an active update workflow.")}async cancelWorkflow(e){return this._cancelWorkflow({warnIfNoWorkflow:!0,...e})}itemHasInvalidFormTemplate(e){return null!=e&&!0===te(this.editorItems,e.layer)?.hasInvalidFormTemplate}syncFeatureTemplates(){this._featureTemplatesViewModelIsRestricted||this._updateTemplates()}zoomTo(e){const{view:i,sketchViewModel:o}=this;if(!i)return;const r=void 0,s=e??o?.createGraphic;if(s)"mesh"===s.geometry?.type?fe(i,s.geometry,r):fe(i,s,r);else{const e=this._getWorkingFeatures();"3d"===i.type&&e?.some(e=>"mesh"===e.geometry?.type)?fe(i,e.map(e=>e.geometry).filter(t),r):e&&fe(i,e,r)}}async toggleUpdateWorkflow(){this.canUpdate&&(this.hasPendingEdits&&!await this.showDiscardEditsPrompt()||(this.activeWorkflow&&"awaiting-feature-to-update"===this.state?await this.cancelWorkflow({force:!0}):await this.startUpdateWorkflowAtFeatureSelection()))}async onSelectionListItemSelect(e){me(e)&&await this.startUpdateWorkflowAtFeatureEdit(e.graphic)}async onSelectionListMenuItemSelect(e,t){me(e)?await this.startUpdateWorkflowAtFeatureEdit(e.graphic):ye(e)&&await this._startUpdateWorkflowWithLayerItem(e,t)}restrictFeatureTemplatesViewModelToLayer(e){return this._featureTemplatesViewModelIsRestricted=!0,this._setFeatureTemplatesViewModelLayers([e]),l(()=>{this._featureTemplatesViewModelIsRestricted=!1,this._setFeatureTemplatesViewModelLayers(this.featureTemplatesLayers)})}async _getEditorItemCandidates(e){const{view:t}=this;if(!t?.map)return[];const{map:i}=t,o=i.editableLayers.toArray(),r=i.allTables.toArray().filter(e=>I(e)||L(e));return await Promise.allSettled([...o.flatMap(e=>this._getLayerLoadPromise(e)),...r.flatMap(e=>this._getLayerLoadPromise(e))]),u(e),[...o.reverse(),...r.reverse()].filter(e=>F(e)&&("mesh"!==e.geometryType||"3d"===t.type)).flatMap(e=>"subtype-group"===e.type?e.sublayers.toArray():e)}_getLayerLoadPromise(e){return L(e)?e.loadAll():e.load()}_drainEditorItems(){this.editorItems.drain(e=>e.destroy())}_updateEditorItems(){p(this._updateItemsTask);const{view:e}=this,t=i(async t=>{if(!e?.map||!e?.allLayerViews)return;const i=await this._getEditorItemCandidates(t);if(!i.length)return this._drainEditorItems(),void this.editorItemsLayerMap.clear();const o=[],r=[],s=[],{editorItemsLayerMap:a,layerInfos:n}=this;for(const c of i){const t=ve(n,c),i=await ie(e,c).catch(()=>null),l=t?o:i?r:s,d=new oe({layer:c,layerInfo:t,layerView:i});l.push(d),a.set(c,d)}n?.length&&o.sort((e,t)=>n.findIndex(({layer:t})=>t===e.layer)-n.findIndex(({layer:e})=>e===t.layer));const l=[...o,...r,...s];t.aborted||(this._drainEditorItems(),this.editorItems.addMany(l))});this._updatingHandles.consumePromise(t.promise),this._updateItemsTask=t}_updateTemplates(){p(this._updateTemplatesTask);const e=i(async e=>{const t=this._templatesByLayer,i=this._featureTemplatesLayersAndTables.filter(e=>!t.has(e));if(i.length>0){const o=await b({layers:i.toArray(),view:this.view,signal:e,queryOptions:{returnVisibleTemplatesOnly:!0}});for(const{layer:e,templates:i}of o)t.set(e,i)}this._setFeatureTemplatesViewModelLayers(this.featureTemplatesLayers)});this._updatingHandles.consumePromise(e.promise),this._updateTemplatesTask=e}_setFeatureTemplatesViewModelLayers(e){const t=this._templatesByLayer,i=[];for(const o of e){const e=t.get(o);e&&e.length>0&&i.push(pe(o,e))}this.featureTemplatesViewModel.templateInfos=i}_afterEditorItemsChange(){const{activeWorkflow:e}=this;if(this.syncFeatureTemplates(),!e)return;const{stepId:t}=e;"create-features"!==e.type?"update"===e.type&&("awaiting-feature-to-update"===t&&!this.canUpdateVisible||"awaiting-update-feature-candidate"===t&&!e.hasUpdatableCandidates)&&this._cancelWorkflow():"awaiting-feature-creation-info"!==t||this.canCreate||this._cancelWorkflow()}async _cancelWorkflow(e){const t=this.activeWorkflow;if(!t)return void(e?.warnIfNoWorkflow&&this._logError("editing:no-active-workflow","There is no active workflow to cancel."));if(!e||!1!==e.force){this.emit("workflow-cancel"),this._set("activeWorkflow",null);try{await t.cancel(e)}finally{t.destroy()}}else try{await t.cancel(e),this._set("activeWorkflow",null),t.destroy()}catch(i){}}_createCreateFeaturesWorkflow(e,t){return D.create({viewModel:this,creationInfo:e,sketchOptions:this.sketchOptions,snappingManager:this._snappingManager,startAt:t,applyEdits:(e,t,i)=>this._applyEdits(e,t,i),applyEditsFeatureService:(e,t,i)=>this._applyEditsFeatureService(e,t,i),addAttachmentsCallback:(e,t)=>this._addAttachments(e,t)})}_createUpdateWorkflow(e,t){const i=B.create({viewModel:this,sketchOptions:this.sketchOptions,snappingManager:this._snappingManager,startAt:e,...t,applyEdits:(e,t,i)=>this._applyEdits(e,t,i),applyEditsFeatureService:(e,t,i)=>this._applyEditsFeatureService(e,t,i),addAttachmentsCallback:(e,t)=>this._addAttachments(e,t)});return i}_addAttachments(e,t){const i=t.map(t=>this._addAttachment(e,t.feature,t.attachment))??[];return Promise.all(i)}async _addAttachment(e,t,i){let o=null;if(!("addAttachment"in e)||null==e.capabilities?.attachment)throw new s("editor:attachments-not-supported","Adding attachments is not supported for this layer type");return await this._queueOperation(async()=>(o=await(e.addAttachment?.(t,i).catch(e=>{throw e?.error||e}))??null,o)),o}async _applyEdits(e,t,i){let o=null;const r=e.url?await E(e.url):null,s={returnServiceEditsOption:(!r||!C(r))&&!/\/hosted\//i.test(e.url)?"original-and-current-features":void 0,editsRespectTrueCurves:!0,...i};return await this._queueOperation(async()=>{const{view:i}=this;if(!i)return null;const r=await ie(i,e).catch(()=>null);return o=await e.applyEdits(t,s),r&&await _(()=>!r.updating),o}),o}async _applyEditsFeatureService(e,t,i){let o=null;return await this._queueOperation(async()=>o=await e.applyEdits(t,i)),o}_destroyWorkflowOnCommit(e){return g(()=>e,"commit",()=>{e.destroy(),this.activeWorkflow===e&&this._set("activeWorkflow",null)})}_queueOperation(e){this._activityQueue.push(e);const t=(e,t)=>{const i=t.indexOf(e);i>-1&&t.splice(i,1)};return e().then(e=>(Array.isArray(e)?e.forEach(e=>this._handleEditsResultError(e)):this._handleEditsResultError(e),e)).catch(i=>{this._logError("editing:operation-error","An error occurred.",{error:i});const o={error:i,retry:()=>(t(o,this.failures),this._queueOperation(e)),cancel:()=>{t(o,this.failures)}};this._set("failures",[...this.failures,o])}).then(()=>{t(e,this._activityQueue)})}_handleEditsResultError(e){if(null!=e&&"error"in e&&null!=e.error)throw e.error;if(null!=e&&"addFeatureResults"in e){const{addFeatureResults:t,deleteFeatureResults:i,updateFeatureResults:o}=e,r=t.find(e=>!!e.error)||o.find(e=>!!e.error)||i.find(e=>!!e.error);if(r)throw r.error}}_createUpdatingResolver(){const e=Promise.withResolvers();return this._updatingHandles.consumePromise(e.promise),e}_logErrorAndCancelWorkflow(e){const{name:t,message:i,details:o}=e;this._logError(t??"editing:workflow-start-failed",i??void 0,o??e),this._cancelWorkflow({force:!0})}_itemIsSuspended(e){const t=X(this.editorItems,e);return null!=t&&(!t.visible||t.disabled)}_logError(e,t,i){c.getLogger(this).error(new s(e,t,i))}_syncSelectionSources(){this._defaultSelectionManager.sources.items=this._selectionSources.toArray()}async _onSelectionComplete(e){if(e.aborted)return;const{operationType:t,selection:i}=e,{effectiveSelectionManager:o}=this;this._queuedSelectionTool=void 0;const r=[],s=[];i.forEach(e=>{const t=S(e),i=this.editorItemsLayerMap.get(t);i?.editable&&s.push(e),!1!==i?.visible&&r.push(e)});const a=1===r.length&&s.includes(r[0]);if("ready"===this.state&&a&&"replace"===t)return this._queuedSelectionTool=e.toolName,this.startUpdateWorkflowAtFeatureEdit(r[0]);switch(t){case"remove":o.updateSelection({current:[],added:[],removed:r});break;case"replace":o.clear(),o.updateSelection({current:r,added:[],removed:[]});break;case"add":o.updateSelection({current:r,added:[],removed:[]})}}async _startUpdateWorkflowWithLayerItem(e,t){if(!e.objectIds?.length)return;const i=e.featureItems.filter(e=>e.visible).map(e=>e.graphic),o=this.selectionListViewModel.filterText;if(1===i.length)return await this.startUpdateWorkflowAtFeatureEdit(i[0]);let r;if(null!=o&&""!==o){const e=Y(i);if(e.length>1)throw new se;if(r=e[0],!r)throw new ae("merge"===t?2:1)}else r={layer:e.layer,objectIds:e.objectIds};"update"===t?await this.startUpdateFeaturesWorkflow(r):"merge"===t&&await this.startMergeFeaturesWorkflow(r)}_getWorkingFeatures(){const{sketchViewModel:e}=this;if(e?.createGraphic)return[e.createGraphic];if(e?.updateGraphics?.length)return e.updateGraphics.toArray();const{formViewModel:t}=this;return t?t.activeFeature?[t.activeFeature]:t.features.toArray():[]}};e([W()],_e.prototype,"_defaultSelectionManager",void 0),e([W()],_e.prototype,"_featureTemplatesLayersAndTables",null),e([W()],_e.prototype,"_queuedSelectionTool",void 0),e([W()],_e.prototype,"_snappingManager",void 0),e([W()],_e.prototype,"_selectionSources",null),e([W()],_e.prototype,"activeFeatureCount",null),e([W({readOnly:!0})],_e.prototype,"activeWorkflow",void 0),e([W()],_e.prototype,"activeLeafWorkflow",null),e([W({readOnly:!0})],_e.prototype,"_activityQueue",void 0),e([W({readOnly:!0})],_e.prototype,"canCreate",null),e([W()],_e.prototype,"canCreateVisible",null),e([W({readOnly:!0})],_e.prototype,"canUpdate",null),e([W()],_e.prototype,"canUpdateVisible",null),e([W()],_e.prototype,"featureTemplatesLayers",null),e([W()],_e.prototype,"editorItems",void 0),e([W()],_e.prototype,"editorItemsLayerMap",void 0),e([W()],_e.prototype,"effectiveSelectionManager",null),e([W({readOnly:!0})],_e.prototype,"failures",void 0),e([W()],_e.prototype,"hideTemplatesForInactiveLayers",void 0),e([W({type:G})],_e.prototype,"attachmentsViewModel",void 0),e([W()],_e.prototype,"featureFormViewModel",null),e([W()],_e.prototype,"formViewModel",null),e([W()],_e.prototype,"utilityNetworkAssociationAddAssociationViewModel",null),e([W({type:he})],_e.prototype,"featureTemplatesViewModel",void 0),e([W({type:O})],_e.prototype,"labelOptions",null),e([W()],_e.prototype,"layerInfos",void 0),e([W()],_e.prototype,"useLegacyCreateTools",null),e([W()],_e.prototype,"isUsingLegacyCreateTools",null),e([W()],_e.prototype,"ownSketchViewModel",void 0),e([W()],_e.prototype,"selectionListViewModel",void 0),e([W()],_e.prototype,"selectionManager",void 0),e([W()],_e.prototype,"selectionToolbarViewModel",void 0),e([W()],_e.prototype,"sketchOptions",void 0),e([W()],_e.prototype,"sketchViewModel",null),e([W({type:q,nonNullable:!0})],_e.prototype,"snappingOptions",void 0),e([W()],_e.prototype,"spinnerViewModel",void 0),e([W()],_e.prototype,"state",null),e([W({readOnly:!0})],_e.prototype,"syncing",null),e([W()],_e.prototype,"syncViewSelection",void 0),e([W()],_e.prototype,"updating",null),e([W({type:P})],_e.prototype,"tooltipOptions",null),e([W({type:R})],_e.prototype,"valueOptions",null),e([W()],_e.prototype,"view",null),e([W()],_e.prototype,"canZoomTo",null),e([W()],_e.prototype,"pageStack",void 0),e([W()],_e.prototype,"showDiscardEditsPrompt",void 0),e([W()],_e.prototype,"showConfirmationPrompt",void 0),e([W()],_e.prototype,"_candidateCommitted",void 0),e([W()],_e.prototype,"page",null),e([W()],_e.prototype,"formDisabled",null),e([W()],_e.prototype,"formHasAssociation",null),e([W()],_e.prototype,"canGoBack",null),e([W()],_e.prototype,"shouldShowDeleteButton",null),e([W()],_e.prototype,"hasPendingEdits",null),e([W()],_e.prototype,"snappingManager",null),_e=e([M("esri.widgets.Editor.EditorViewModel")],_e);const We=_e;export{We as default};
|
|
2
|
+
import{__decorate as e}from"tslib";import{isSome as t}from"../../core/arrayUtils.js";import{createTask as i}from"../../core/asyncUtils.js";import o from"../../core/Collection.js";import{deprecatedFunction as a}from"../../core/deprecate.js";import r from"../../core/Error.js";import{EventedAccessor as s}from"../../core/Evented.js";import{abortHandle as n,makeHandle as l}from"../../core/handleUtils.js";import"../../core/has.js";import c from"../../core/Logger.js";import{destroyMaybe as d,abortMaybe as p,removeMaybe as h}from"../../core/maybe.js";import{throwIfAborted as u}from"../../core/promiseUtils.js";import w from"../../core/ReactiveMap.js";import{watch as f,syncAndInitial as m,initial as y,on as g,when as k,sync as v,whenOnce as _}from"../../core/reactiveUtils.js";import{property as W,subclass as M}from"../../core/accessorSupport/decorators.js";import{UpdatingHandles as T}from"../../core/support/UpdatingHandles.js";import{getTemplatesForLayers as b}from"../../editing/templateUtils.js";import{getGraphicLayer as S}from"../../graphic/graphicOriginUtils.js";import V from"../../layers/GraphicsLayer.js";import{isEditableLayer as F}from"../../layers/support/editableLayers.js";import{isFeatureLayer as I,isSubtypeGroupLayer as A,getOwningPortalUrl as L}from"../../layers/support/layerUtils.js";import{parseKnownArcGISOnlineDomain as E}from"../../portal/support/urlUtils.js";import C from"../../views/SelectionManager.js";import{fetchFullFeaturesByObjectId as U}from"../../views/draw/support/editingSessionUtils.js";import O from"../../views/interactive/sketch/SketchLabelOptions.js";import j from"../../views/interactive/sketch/SketchOptions.js";import P from"../../views/interactive/sketch/SketchTooltipOptions.js";import R from"../../views/interactive/sketch/SketchValueOptions.js";import{SnappingManager as H}from"../../views/interactive/snapping/SnappingManager.js";import q from"../../views/interactive/snapping/SnappingOptions.js";import{isSelectableLayer as x}from"../../views/support/selectionUtils.js";import G from"../Attachments/AttachmentsViewModel.js";import D from"./CreateFeaturesWorkflow.js";import B from"./UpdateWorkflow.js";import{getLayersFromWorkflow as N,isCreateFeaturesWorkflow as Q,isUpdateRecordWorkflow as z,isUpdateFeaturesWorkflow as Z,isMergeFeaturesWorkflow as $,isSplitFeatureWorkflow as J,isUpdateWorkflow as K,findEditorItemForLayerOrThrow as X,toFeatureInfos as Y,fetchFullFeatures as ee,findEditorItemForLayer as te,whenEditorLayerView as ie}from"./workflowUtils.js";import oe from"./support/EditorItem.js";import{assertViewNot3D as ae,MultipleSourceLayersError as re,InsufficientFeatureCountError as se,MissingOriginLayerError as ne,assertMergeWorkflowCapabilities as le,FetchFullFeatureError as ce,assertSplitWorkflowCapabilities as de}from"./support/errors.js";import{makeTemplateGroupInfoForLayer as pe}from"../FeatureTemplates/featureTemplatesUtils.js";import he from"../FeatureTemplates/FeatureTemplatesViewModel.js";import ue from"../Sketch/SketchViewModel.js";import we from"../Spinner/SpinnerViewModel.js";import{goTo as fe}from"../support/goToUtils.js";import{isFeatureItem as me,isLayerItem as ye}from"../support/SelectionList/selectionListUtils.js";import ge from"../support/SelectionList/SelectionListViewModel.js";import ke from"../support/SelectionToolbar/SelectionToolbarViewModel.js";function ve(e,t){return e?.find(e=>e.layer===t)}let _e=class extends s{constructor(e){super(e),this._defaultSelectionManager=new C,this._queuedSelectionTool=null,this._sketchEventListenerHandle=null,this._sketchGraphicsLayer=new V({listMode:"hide",internal:!0,title:"Editor sketch layer"}),this._snappingManager=null,this._templatesByLayer=new Map,this._updateItemsTask=null,this._updateTemplatesTask=null,this._updatingHandles=new T,this._featureTemplatesViewModelIsRestricted=!1,this.activeWorkflow=null,this._activityQueue=new o,this.editorItems=new o,this.editorItemsLayerMap=new w,this.failures=[],this.hideTemplatesForInactiveLayers=!1,this.attachmentsViewModel=new G({capabilities:{editing:!0}}),this.featureTemplatesViewModel=new he({disabledItemFunction:({layer:e})=>this._itemIsSuspended(e)}),this.layerInfos=null,this.ownSketchViewModel=new ue({layer:this._sketchGraphicsLayer,useLegacyCreateTools:this._get("useLegacyCreateTools")??!0}),this.selectionListViewModel=new ge,this.selectionManager=null,this.selectionToolbarViewModel=new ke({continuousSelectionEnabled:!0,defaultOperationType:"replace",persistSelection:!1,returnGeometry:!1}),this.sketchOptions=new j,this.snappingOptions=new q({attributeRulesEnabled:!0}),this.spinnerViewModel=new we,this.syncViewSelection=!1,this.pageStack=[],this.showDiscardEditsPrompt=()=>Promise.resolve(!0),this.showConfirmationPrompt=()=>Promise.resolve(!0),this._candidateCommitted=!1,this.back=async()=>{if("viewing-selection-list"===this.state)return this.selectionListViewModel.filterText=void 0,void this.effectiveSelectionManager.clear();this.canGoBack&&(this.activeWorkflow?.hasPreviousStep?await this.activeWorkflow.back(this.showDiscardEditsPrompt):await this._cancelWorkflow({force:!this.hasPendingEdits}))},this.saveWorkflow=async()=>await(this.activeWorkflow?.save(this.showConfirmationPrompt)),this.selectFeature=(e,t=!1)=>{const i=this.activeWorkflow;if(this._candidateCommitted||"update"!==i?.type)return;const{rootFeatures:o}=i.data;o.removeAll(),e&&o.add(e),t&&(i.next(),this._candidateCommitted=!0)}}initialize(){this.addHandles([f(()=>{const e=this.view,t=e?.map?.editableLayers.toArray(),i=e?.allLayerViews,o=i?.filter(e=>!!t?.includes(e.layer));return[t,o,this.layerInfos]},()=>this._updateEditorItems(),m),f(()=>this.hideTemplatesForInactiveLayers,()=>this.syncFeatureTemplates()),f(()=>this._selectionSources,()=>this._syncSelectionSources(),y),g(()=>this.activeWorkflow,"cancel",()=>this.emit("workflow-cancel")),g(()=>this.activeWorkflow,"commit",()=>this.emit("workflow-commit")),g(()=>this.activeWorkflow,"complete",()=>{this.emit("workflow-commit"),this._set("activeWorkflow",null)}),k(()=>!this.activeWorkflow&&this._queuedSelectionTool,()=>this._queuedSelectionTool&&this.selectionToolbarViewModel.activateTool(this._queuedSelectionTool)),f(()=>this.activeWorkflow,e=>this._defaultSelectionManager.highlightEnabled=!e),k(()=>this.view?.map,e=>e.add(this._sketchGraphicsLayer),y),g(()=>this.editorItems,"change",()=>this._afterEditorItemsChange()),f(()=>[this.canCreate,this.canUpdateVisible],()=>this._afterEditorItemsChange()),f(()=>this.page,(e,t)=>{const i=[...this.pageStack];if(-1===i.indexOf(e))i.push(e);else for(;i.length&&i.at(-1)!==e;)i.pop();this.pageStack=i},m),k(()=>"awaiting-update-feature-candidate"===this.state,()=>this._candidateCommitted=!1),g(()=>this.featureTemplatesViewModel,"select",async({item:e,oldItem:t})=>{const{activeWorkflow:i}=this;if(i){if("update"===i.type&&"awaiting-feature-creation-info"===i.activeWorkflow?.stepId)return;try{await this.cancelWorkflow({force:!this.hasPendingEdits})}catch{return void this.featureTemplatesViewModel.select(t,{emit:!1})}}if(!e)return;const o={layer:e.layer,template:e.template};if(e.supportsUpload)return this.featureTemplatesViewModel.select(t,{emit:!1}),this.startCreateFeaturesWorkflow(o);await this.startCreateFeaturesWorkflowAtFeatureCreation(o)}),f(()=>[this.view,this.featureTemplatesViewModel],([e,t])=>{t.view=e},m),g(()=>this.view,"key-down",e=>{"Escape"===e.key&&this.activeWorkflow?.keyboardCancellationEnabled&&(e.stopPropagation(),this.back())}),g(()=>this.sketchViewModel,["create","delete","update"],e=>{const{activeWorkflow:t}=this,i=N(t),o=`sketch-${e.type}`;this.emit(o,{type:o,detail:e,layer:i[0],layers:i})},v),f(()=>this.view,e=>{if(this._snappingManager=d(this._snappingManager),!e)return;const t=this.snappingOptions;this._snappingManager=new H({view:e,options:t}),this.ownSketchViewModel.snappingManager=this._snappingManager},m),f(()=>this.snappingOptions,e=>{this._snappingManager&&(this._snappingManager.options=e)},m),g(()=>this.selectionToolbarViewModel,"complete",e=>this._onSelectionComplete(e)),f(()=>({view:this.view,selectionManager:this.effectiveSelectionManager,selectionListViewModel:this.selectionListViewModel,selectionToolbarViewModel:this.selectionToolbarViewModel}),({view:e,selectionManager:t,selectionListViewModel:i,selectionToolbarViewModel:o})=>{t.view=e,i.view=e,o.view=e},m),f(()=>this.effectiveSelectionManager,e=>{this.selectionListViewModel.selectionManager=e,this.selectionToolbarViewModel.selectionManager=e},m)])}destroy(){this._cancelWorkflow({warnIfNoWorkflow:!1}).then(()=>{this.view?.map?.remove(this._sketchGraphicsLayer),this.view=null}),this._updateItemsTask=p(this._updateItemsTask),this._updatingHandles.destroy(),this._sketchEventListenerHandle=h(this._sketchEventListenerHandle),this.selectionListViewModel?.destroy(),this.selectionToolbarViewModel?.destroy(),this._defaultSelectionManager.destroy()}get _featureTemplatesLayersAndTables(){const e=new o;for(const t of this.editorItems){const i=this.hideTemplatesForInactiveLayers&&!t.visible;t.supportsCreateFeaturesWorkflow&&!i&&e.push(t.layer)}return e}get _selectionSources(){const e=new o;if(this.syncViewSelection||this.selectionManager)return e;for(const t of this.editorItems)x(t.layer)&&t.supportsUpdateWorkflow&&e.push(t.layer);return e}get activeFeatureCount(){const e=this.activeLeafWorkflow;return Q(e)?e.pendingFeatures.length:z(e)&&e.data.edits.feature?1:Z(e)?e.data.fullFeatures.length:$(e)?e.data.features.length:J(e)?2:0}get activeLeafWorkflow(){const e=this.activeWorkflow;return e&&K(e)?e.activeWorkflow??e:e}get canCreate(){return this.editorItems.some(e=>e.supportsCreateFeaturesWorkflow)}get canCreateVisible(){return!!this.featureTemplatesLayers.length}get canUpdate(){return this.editorItems.some(e=>e.supportsUpdateWorkflow)}get canUpdateVisible(){return this.editorItems.some(e=>e.supportsUpdateWorkflow&&e.visible)}get featureTemplatesLayers(){return this._featureTemplatesLayersAndTables.filter(e=>"scene"===e.type||!e.isTable)}get effectiveSelectionManager(){const e=this.view;return e&&this.syncViewSelection?e.selectionManager:this.selectionManager??this._defaultSelectionManager}get featureFormViewModel(){return null}get formViewModel(){return this.activeWorkflow?.formViewModel}get utilityNetworkAssociationAddAssociationViewModel(){const{activeWorkflow:e}=this;return"update"===e?.type?e.activeUtilityNetworkAssociationAddAssociationViewModel:null}get labelOptions(){return this.sketchOptions.labels}set labelOptions(e){this.sketchOptions.labels=e}get useLegacyCreateTools(){return this.ownSketchViewModel.useLegacyCreateTools}set useLegacyCreateTools(e){this.ownSketchViewModel.useLegacyCreateTools=e}get isUsingLegacyCreateTools(){return this.useLegacyCreateTools||"2d"!==this.view?.type}get sketchViewModel(){const{activeWorkflow:e}=this;return"update"===e?.type?e.activeSketchViewModel:"create-features"===e?.type?e.sketchViewModel:this.ownSketchViewModel}get state(){if(!this.view?.ready)return"disabled";const e=this.attachmentsViewModel.mode;if("add"===e)return"adding-attachment";if("edit"===e)return"editing-attachment";const{activeWorkflow:t}=this,i=!t?.stepId;return this.effectiveSelectionManager.count&&i?"viewing-selection-list":i?"ready":"update"===t.type&&t.activeWorkflow?.stepId?t.activeWorkflow.stepId:t.stepId}get syncing(){return this._activityQueue.length>0}get updating(){return this._updatingHandles.updating||!0===this.activeWorkflow?.updating}get tooltipOptions(){return this.sketchOptions.tooltips}set tooltipOptions(e){this.sketchOptions.tooltips=e}get valueOptions(){return this.sketchOptions.values}set valueOptions(e){this.sketchOptions.values=e}set view(e){this.ownSketchViewModel.view=e,this.spinnerViewModel.view=e,this._set("view",e)}get canZoomTo(){return this._getWorkingFeatures().some(e=>e.geometry)}get page(){const{activeWorkflow:e,state:t}=this;if("update"===e?.type&&e.formViewModel?.activeAssociationsInput)return e.formViewModel.activeAssociationsInput.associatedLayer?"viewing-associated-features":"viewing-associated-layers";if("update"===e?.type&&"awaiting-feature-to-update"===e.stepId)return"ready";if("create-features"===e?.type&&0===e.numPendingFeatures){const t=e.data.upload;if(t)return"default"===t.state?"ready":"creating-features-upload-details"}return t??"disabled"}get formDisabled(){const{activeLeafWorkflow:e}=this;if(z(e))return!1===e.data.editorItem?.capabilities.update.attributes||!0===e.formViewModel.disabled||!0===e.formViewModel.readOnly;if(Z(e)){const{formViewModel:t}=e;return t.disabled||t.readOnly}return!1}get formHasAssociation(){return!!this.formViewModel?.activeAssociation}get canGoBack(){return null!=this.activeWorkflow&&!this.syncing}get shouldShowDeleteButton(){const{activeLeafWorkflow:e}=this;if(z(e)){const{data:t}=e;return t.editorItem?.capabilities.delete.enabled&&!t.readOnly}return!!Z(e)&&e.data.editorItems.every(e=>e.capabilities.delete.enabled)}get hasPendingEdits(){return this.activeWorkflow?.hasPendingEdits??!1}get snappingManager(){return this._snappingManager}activateSelectionTool(e){return this.selectionToolbarViewModel.activateTool(e)}cancelSelectionTool(){this.selectionToolbarViewModel.cancel()}getTemplatesForLayer(e){return this._templatesByLayer.get(e)??[]}async startCreateFeaturesWorkflowAtFeatureTypeSelection(){return this.startCreateFeaturesWorkflow()}async startCreateFeaturesWorkflowAtFeatureCreation(e){return this.startCreateFeaturesWorkflow(e,"creating-features")}async startCreateFeaturesWorkflow(e,t="awaiting-feature-creation-info"){if(await _(()=>!this.updating),!this.canCreate)throw new r("editing:unsupported-workflow","Creating features is unsupported or disabled.");const i=this._createUpdatingResolver();try{await this._cancelWorkflow();const i=this._createCreateFeaturesWorkflow(e,t);this._set("activeWorkflow",i),await i.start()}catch(o){this._logErrorAndCancelWorkflow(o)}finally{i.resolve()}}async startCreateFeaturesWorkflowAtFeatureEdit(e){await _(()=>!this.updating);const t=this._createUpdatingResolver();try{const{initialFeature:t}=e,i=t.sourceLayer=t.layer,o=i?X(this.editorItems,i):void 0;if(!o?.supportsCreateFeaturesWorkflow)throw new r("editing:unsupported-workflow","Creating features is unsupported or disabled for this layer.");await this._cancelWorkflow();const a=this._createCreateFeaturesWorkflow({initialFeature:t,layer:o.layer,maxFeatures:1},"creating-features");this._set("activeWorkflow",a),await a.start()}catch(i){this._logErrorAndCancelWorkflow(i)}finally{t.resolve()}}async startMergeFeaturesWorkflow(e,t={}){await _(()=>!this.updating),ae(this,"merge-features");const i=Array.isArray(e)?Y(e):[e];if(i.length>1)throw new re;if(0===i.length||i[0].objectIds.length<2)throw new se(2);const a=i[0],r=a.layer;if(!r)throw new ne;const s=X(this.editorItems,r);le(s);const l=this._createUpdatingResolver(),c=new AbortController;this.addHandles(n(c));try{await this._cancelWorkflow(),this.cancelSelectionTool();const e=await U(a.objectIds,r,this.view?.spatialReference,c.signal);if(e.length!==a.objectIds.length)throw new ce;let i;if(t.keyFeature){const o=t.keyFeature.getObjectId();i=e.find(e=>e.getObjectId()===o)??t.keyFeature}const s=this._createUpdateWorkflow("editing-existing-feature",{rootFeatures:new o(e),rootWorkflowOptions:{type:"merge",props:{...t,keyFeature:i}}});this._set("activeWorkflow",s),this.addHandles(this._destroyWorkflowOnCommit(s)),await s.start()}catch(d){this._logErrorAndCancelWorkflow(d)}finally{l.resolve()}}async startSplitFeatureWorkflow(e,t={}){await _(()=>!this.updating),ae(this,"split-feature");const i=S(e);if(!i)throw new ne;const a=X(this.editorItems,i);de(a);const r=this._createUpdatingResolver(),s=new AbortController;this.addHandles(n(s));try{await this._cancelWorkflow(),this.cancelSelectionTool();const a=await ee([e],i,this.view?.spatialReference,s.signal);if(1!==a.length)throw new ce;const r=this._createUpdateWorkflow("editing-existing-feature",{rootFeatures:new o(a),rootWorkflowOptions:{type:"split",props:t}});this._set("activeWorkflow",r),this.addHandles(this._destroyWorkflowOnCommit(r)),await r.start()}catch(l){this._logErrorAndCancelWorkflow(l)}finally{r.resolve()}}async startUpdateFeaturesWorkflow(e){if(await _(()=>!this.updating),!this.canUpdate)return void this._logError("editing:unsupported-workflow","Update features workflow is unsupported or disabled.");const t=Array.isArray(e)?Y(e):[e];if(t.length>1)throw new re;const i=this._createUpdatingResolver();try{await this._cancelWorkflow(),this.cancelSelectionTool();const e=this._createUpdateWorkflow("editing-existing-feature",{rootFeatureInfos:t,rootWorkflowOptions:{type:"update-multiple"}});e.addHandles(this._destroyWorkflowOnCommit(e)),this._set("activeWorkflow",e),await e.start()}catch(o){this._logErrorAndCancelWorkflow(o)}finally{i.resolve()}}async startUpdateWorkflowAtFeatureSelection(){if(await _(()=>!this.updating),!this.canUpdate)return void this._logError("editing:unsupported-workflow","Update workflow is unsupported or disabled.");const e=this._createUpdatingResolver();try{await this._cancelWorkflow();const e=this._createUpdateWorkflow();this._set("activeWorkflow",e),await e.start()}catch(t){this._logErrorAndCancelWorkflow(t)}finally{e.resolve()}}async startUpdateWorkflowAtMultipleFeatureSelection(e){if(await _(()=>!this.updating),!this.canUpdate)return void this._logError("editing:unsupported-workflow","Update workflow is unsupported or disabled.");const t=this._createUpdatingResolver();try{await this._cancelWorkflow();const t=this._createUpdateWorkflow("awaiting-update-feature-candidate");t.data.candidates=e,this._set("activeWorkflow",t),await t.start()}catch(i){this._logErrorAndCancelWorkflow(i)}finally{t.resolve()}}async startUpdateWorkflowAtFeatureEdit(e){if(await _(()=>!this.updating),!this.canUpdate)return void this._logError("editing:unsupported-workflow","Update workflow is unsupported or disabled.");const t=this._createUpdatingResolver();try{await this._cancelWorkflow(),this.cancelSelectionTool();const t=this._createUpdateWorkflow("editing-existing-feature",{rootFeatures:new o([e])});t.addHandles(this._destroyWorkflowOnCommit(t)),this._set("activeWorkflow",t),await t.start()}catch(i){this._logErrorAndCancelWorkflow(i)}finally{t.resolve()}}async startUpdateWorkflowWithActiveSelection(){const{selectionListViewModel:e}=this;if(!e.visibleFeatureCount||!e.visibleLayerCount)throw new r("editing:missing-selection","Unable to determine visible selection.");if(e.visibleLayerCount>1)throw new r("editing:features-different-layers","Cannot start workflow with features from different layers.");const t=e.layerItems.find(e=>e.visible);t&&await this._startUpdateWorkflowWithLayerItem(t,"update")}async deleteFeatureFromWorkflow(){a(c.getLogger(this),"EditorViewModel.deleteFeatureFromWorkflow is deprecated. Use EditorViewModel.deleteFeatures instead.",{version:"4.33",replacement:"EditorViewModel.deleteFeatures",warnOnce:!0}),await this.deleteFeatures()}async deleteFeatures(){const e=this.activeWorkflow;if(K(e))return e.deleteActiveFeatures();this._logError("editing:unsupported-workflow","Deleting features requires an active update workflow.")}async deleteAssociationFromWorkflow(){const{activeWorkflow:e}=this;e&&"update"===e.type?await e.deleteActiveAssociation():this._logError("editing:unsupported-workflow","Deleting an association requires an active update workflow.")}async cancelWorkflow(e){return this._cancelWorkflow({warnIfNoWorkflow:!0,...e})}itemHasInvalidFormTemplate(e){return null!=e&&!0===te(this.editorItems,e.layer)?.hasInvalidFormTemplate}syncFeatureTemplates(){this._featureTemplatesViewModelIsRestricted||this._updateTemplates()}zoomTo(e){const{view:i,sketchViewModel:o}=this;if(!i)return;const a=void 0,r=e??o?.createGraphic;if(r)"mesh"===r.geometry?.type?fe(i,r.geometry,a):fe(i,r,a);else{const e=this._getWorkingFeatures();"3d"===i.type&&e?.some(e=>"mesh"===e.geometry?.type)?fe(i,e.map(e=>e.geometry).filter(t),a):e&&fe(i,e,a)}}async toggleUpdateWorkflow(){this.canUpdate&&(this.hasPendingEdits&&!await this.showDiscardEditsPrompt()||(this.activeWorkflow&&"awaiting-feature-to-update"===this.state?await this.cancelWorkflow({force:!0}):await this.startUpdateWorkflowAtFeatureSelection()))}async onSelectionListItemSelect(e){me(e)&&await this.startUpdateWorkflowAtFeatureEdit(e.graphic)}async onSelectionListMenuItemSelect(e,t){me(e)?await this.startUpdateWorkflowAtFeatureEdit(e.graphic):ye(e)&&await this._startUpdateWorkflowWithLayerItem(e,t)}restrictFeatureTemplatesViewModelToLayer(e){return this._featureTemplatesViewModelIsRestricted=!0,this._setFeatureTemplatesViewModelLayers([e]),l(()=>{this._featureTemplatesViewModelIsRestricted=!1,this._setFeatureTemplatesViewModelLayers(this.featureTemplatesLayers)})}async _getEditorItemCandidates(e){const{view:t}=this;if(!t?.map)return[];const{map:i}=t,o=i.editableLayers.toArray(),a=i.allTables.toArray().filter(e=>I(e)||A(e));return await Promise.allSettled([...o.flatMap(e=>this._getLayerLoadPromise(e)),...a.flatMap(e=>this._getLayerLoadPromise(e))]),u(e),[...o.reverse(),...a.reverse()].filter(e=>F(e)&&("mesh"!==e.geometryType||"3d"===t.type)).flatMap(e=>"subtype-group"===e.type?e.sublayers.toArray():e)}_getLayerLoadPromise(e){return A(e)?e.loadAll():e.load()}_drainEditorItems(){this.editorItems.drain(e=>e.destroy())}_updateEditorItems(){p(this._updateItemsTask);const{view:e}=this,t=i(async t=>{if(!e?.map||!e?.allLayerViews)return;const i=await this._getEditorItemCandidates(t);if(!i.length)return this._drainEditorItems(),void this.editorItemsLayerMap.clear();const o=[],a=[],r=[],{editorItemsLayerMap:s,layerInfos:n}=this;for(const c of i){const t=ve(n,c),i=await ie(e,c).catch(()=>null),l=t?o:i?a:r,d=new oe({layer:c,layerInfo:t,layerView:i});l.push(d),s.set(c,d)}n?.length&&o.sort((e,t)=>n.findIndex(({layer:t})=>t===e.layer)-n.findIndex(({layer:e})=>e===t.layer));const l=[...o,...a,...r];t.aborted||(this._drainEditorItems(),this.editorItems.addMany(l))});this._updatingHandles.consumePromise(t.promise),this._updateItemsTask=t}_updateTemplates(){p(this._updateTemplatesTask);const e=i(async e=>{const t=this._templatesByLayer,i=this._featureTemplatesLayersAndTables.filter(e=>!t.has(e));if(i.length>0){const o=await b({layers:i.toArray(),view:this.view,signal:e,queryOptions:{returnVisibleTemplatesOnly:!0}});for(const{layer:e,templates:i}of o)t.set(e,i)}this._setFeatureTemplatesViewModelLayers(this.featureTemplatesLayers)});this._updatingHandles.consumePromise(e.promise),this._updateTemplatesTask=e}_setFeatureTemplatesViewModelLayers(e){const t=this._templatesByLayer,i=[];for(const o of e){const e=t.get(o);e&&e.length>0&&i.push(pe(o,e))}this.featureTemplatesViewModel.templateInfos=i}_afterEditorItemsChange(){const{activeWorkflow:e}=this;if(this.syncFeatureTemplates(),!e)return;const{stepId:t}=e;"create-features"!==e.type?"update"===e.type&&("awaiting-feature-to-update"===t&&!this.canUpdateVisible||"awaiting-update-feature-candidate"===t&&!e.hasUpdatableCandidates)&&this._cancelWorkflow():"awaiting-feature-creation-info"!==t||this.canCreate||this._cancelWorkflow()}async _cancelWorkflow(e){const t=this.activeWorkflow;if(!t)return void(e?.warnIfNoWorkflow&&this._logError("editing:no-active-workflow","There is no active workflow to cancel."));if(!e||!1!==e.force){this.emit("workflow-cancel"),this._set("activeWorkflow",null);try{await t.cancel(e)}finally{t.destroy()}}else try{await t.cancel(e),this._set("activeWorkflow",null),t.destroy()}catch(i){}}_createCreateFeaturesWorkflow(e,t){return D.create({viewModel:this,creationInfo:e,sketchOptions:this.sketchOptions,snappingManager:this._snappingManager,startAt:t,applyEdits:(e,t,i)=>this._applyEdits(e,t,i),applyEditsFeatureService:(e,t,i)=>this._applyEditsFeatureService(e,t,i),addAttachmentsCallback:(e,t)=>this._addAttachments(e,t)})}_createUpdateWorkflow(e,t){const i=B.create({viewModel:this,sketchOptions:this.sketchOptions,snappingManager:this._snappingManager,startAt:e,...t,applyEdits:(e,t,i)=>this._applyEdits(e,t,i),applyEditsFeatureService:(e,t,i)=>this._applyEditsFeatureService(e,t,i),addAttachmentsCallback:(e,t)=>this._addAttachments(e,t),applyAttachmentEdits:(e,t)=>this._editAttachments(e,t)});return i}async _editAttachments(e,i){const o=[];i.adds.forEach(t=>o.push(this._addAttachment(e,t))),i.updates.forEach(t=>o.push(this._updateAttachment(e,t))),i.deletes.forEach(t=>o.push(this._deleteAttachments(e,t)));return(await Promise.all(o)).filter(t).flat()}_addAttachments(e,t){return Promise.all(t.map(t=>this._addAttachment(e,t)))}async _addAttachment(e,t){let i=null;if(!("addAttachment"in e)||null==e.capabilities?.attachment)throw new r("editor:attachments-not-supported","Adding attachments is not supported for this layer.");const{feature:o,attachment:a,keywords:s}=t,n=s?{keywords:s}:void 0;return await this._queueOperation(async()=>(i=await(e.addAttachment?.(o,a,n).catch(e=>{throw e?.error||e}))??null,i)),i}async _updateAttachment(e,t){if(!("updateAttachment"in e)||!e.updateAttachment||null==e.capabilities?.attachment)throw new r("editor:attachments-not-supported","Updating attachments is not supported for this layer");const{feature:i,attachmentId:o,attachment:a}=t;let s=null;return await this._queueOperation(async()=>(s=await e.updateAttachment(i,o,a).catch(e=>{throw e?.error||e}),s)),s}async _deleteAttachments(e,t){if(!("deleteAttachments"in e)||!e.deleteAttachments||null==e.capabilities?.attachment)throw new r("editor:attachments-not-supported","Deleting attachments is not supported for this layer");const{feature:i,attachmentIds:o}=t;let a=null;return await this._queueOperation(async()=>(a=await e.deleteAttachments(i,o).catch(e=>{throw e?.error||e}),a)),a}async _applyEdits(e,t,i){let o=null;const a=e.url?await L(e.url):null,r={returnServiceEditsOption:(!a||!E(a))&&!/\/hosted\//i.test(e.url)?"original-and-current-features":void 0,editsRespectTrueCurves:!0,...i};return await this._queueOperation(async()=>{const{view:i}=this;if(!i)return null;const a=await ie(i,e).catch(()=>null);return o=await e.applyEdits(t,r),a&&await _(()=>!a.updating),o}),o}async _applyEditsFeatureService(e,t,i){let o=null;return await this._queueOperation(async()=>o=await e.applyEdits(t,i)),o}_destroyWorkflowOnCommit(e){return g(()=>e,"commit",()=>{e.destroy(),this.activeWorkflow===e&&this._set("activeWorkflow",null)})}_queueOperation(e){this._activityQueue.push(e);const t=(e,t)=>{const i=t.indexOf(e);i>-1&&t.splice(i,1)};return e().then(e=>(Array.isArray(e)?e.forEach(e=>this._handleEditsResultError(e)):this._handleEditsResultError(e),e)).catch(i=>{this._logError("editing:operation-error","An error occurred.",{error:i});const o={error:i,retry:()=>(t(o,this.failures),this._queueOperation(e)),cancel:()=>{t(o,this.failures)}};this._set("failures",[...this.failures,o])}).then(()=>{t(e,this._activityQueue)})}_handleEditsResultError(e){if(null!=e&&"error"in e&&null!=e.error)throw e.error;if(null!=e&&"addFeatureResults"in e){const{addFeatureResults:t,deleteFeatureResults:i,updateFeatureResults:o}=e,a=t.find(e=>!!e.error)||o.find(e=>!!e.error)||i.find(e=>!!e.error);if(a)throw a.error}}_createUpdatingResolver(){const e=Promise.withResolvers();return this._updatingHandles.consumePromise(e.promise),e}_logErrorAndCancelWorkflow(e){const{name:t,message:i,details:o}=e;this._logError(t??"editing:workflow-start-failed",i??void 0,o??e),this._cancelWorkflow({force:!0})}_itemIsSuspended(e){const t=X(this.editorItems,e);return null!=t&&(!t.visible||t.disabled)}_logError(e,t,i){c.getLogger(this).error(new r(e,t,i))}_syncSelectionSources(){this._defaultSelectionManager.sources.items=this._selectionSources.toArray()}async _onSelectionComplete(e){if(e.aborted)return;const{operationType:t,selection:i}=e,{effectiveSelectionManager:o}=this;this._queuedSelectionTool=void 0;const a=[],r=[];i.forEach(e=>{const t=S(e),i=this.editorItemsLayerMap.get(t);i?.editable&&r.push(e),!1!==i?.visible&&a.push(e)});const s=1===a.length&&r.includes(a[0]);if("ready"===this.state&&s&&"replace"===t)return this._queuedSelectionTool=e.toolName,this.startUpdateWorkflowAtFeatureEdit(a[0]);switch(t){case"remove":o.updateSelection({current:[],added:[],removed:a});break;case"replace":o.clear(),o.updateSelection({current:a,added:[],removed:[]});break;case"add":o.updateSelection({current:a,added:[],removed:[]})}}async _startUpdateWorkflowWithLayerItem(e,t){if(!e.objectIds?.length)return;const i=e.featureItems.filter(e=>e.visible).map(e=>e.graphic),o=this.selectionListViewModel.filterText;if(1===i.length)return await this.startUpdateWorkflowAtFeatureEdit(i[0]);let a;if(null!=o&&""!==o){const e=Y(i);if(e.length>1)throw new re;if(a=e[0],!a)throw new se("merge"===t?2:1)}else a={layer:e.layer,objectIds:e.objectIds};"update"===t?await this.startUpdateFeaturesWorkflow(a):"merge"===t&&await this.startMergeFeaturesWorkflow(a)}_getWorkingFeatures(){const{sketchViewModel:e}=this;if(e?.createGraphic)return[e.createGraphic];if(e?.updateGraphics?.length)return e.updateGraphics.toArray();const{formViewModel:t}=this;return t?t.activeFeature?[t.activeFeature]:t.features.toArray():[]}};e([W()],_e.prototype,"_defaultSelectionManager",void 0),e([W()],_e.prototype,"_featureTemplatesLayersAndTables",null),e([W()],_e.prototype,"_queuedSelectionTool",void 0),e([W()],_e.prototype,"_snappingManager",void 0),e([W()],_e.prototype,"_selectionSources",null),e([W()],_e.prototype,"activeFeatureCount",null),e([W({readOnly:!0})],_e.prototype,"activeWorkflow",void 0),e([W()],_e.prototype,"activeLeafWorkflow",null),e([W({readOnly:!0})],_e.prototype,"_activityQueue",void 0),e([W({readOnly:!0})],_e.prototype,"canCreate",null),e([W()],_e.prototype,"canCreateVisible",null),e([W({readOnly:!0})],_e.prototype,"canUpdate",null),e([W()],_e.prototype,"canUpdateVisible",null),e([W()],_e.prototype,"featureTemplatesLayers",null),e([W()],_e.prototype,"editorItems",void 0),e([W()],_e.prototype,"editorItemsLayerMap",void 0),e([W()],_e.prototype,"effectiveSelectionManager",null),e([W({readOnly:!0})],_e.prototype,"failures",void 0),e([W()],_e.prototype,"hideTemplatesForInactiveLayers",void 0),e([W({type:G})],_e.prototype,"attachmentsViewModel",void 0),e([W()],_e.prototype,"featureFormViewModel",null),e([W()],_e.prototype,"formViewModel",null),e([W()],_e.prototype,"utilityNetworkAssociationAddAssociationViewModel",null),e([W({type:he})],_e.prototype,"featureTemplatesViewModel",void 0),e([W({type:O})],_e.prototype,"labelOptions",null),e([W()],_e.prototype,"layerInfos",void 0),e([W()],_e.prototype,"useLegacyCreateTools",null),e([W()],_e.prototype,"isUsingLegacyCreateTools",null),e([W()],_e.prototype,"ownSketchViewModel",void 0),e([W()],_e.prototype,"selectionListViewModel",void 0),e([W()],_e.prototype,"selectionManager",void 0),e([W()],_e.prototype,"selectionToolbarViewModel",void 0),e([W()],_e.prototype,"sketchOptions",void 0),e([W()],_e.prototype,"sketchViewModel",null),e([W({type:q,nonNullable:!0})],_e.prototype,"snappingOptions",void 0),e([W()],_e.prototype,"spinnerViewModel",void 0),e([W()],_e.prototype,"state",null),e([W({readOnly:!0})],_e.prototype,"syncing",null),e([W()],_e.prototype,"syncViewSelection",void 0),e([W()],_e.prototype,"updating",null),e([W({type:P})],_e.prototype,"tooltipOptions",null),e([W({type:R})],_e.prototype,"valueOptions",null),e([W()],_e.prototype,"view",null),e([W()],_e.prototype,"canZoomTo",null),e([W()],_e.prototype,"pageStack",void 0),e([W()],_e.prototype,"showDiscardEditsPrompt",void 0),e([W()],_e.prototype,"showConfirmationPrompt",void 0),e([W()],_e.prototype,"_candidateCommitted",void 0),e([W()],_e.prototype,"page",null),e([W()],_e.prototype,"formDisabled",null),e([W()],_e.prototype,"formHasAssociation",null),e([W()],_e.prototype,"canGoBack",null),e([W()],_e.prototype,"shouldShowDeleteButton",null),e([W()],_e.prototype,"hasPendingEdits",null),e([W()],_e.prototype,"snappingManager",null),_e=e([M("esri.widgets.Editor.EditorViewModel")],_e);const We=_e;export{We as default};
|
package/widgets/Editor/Edits.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as t}from"tslib";import e from"../../core/Accessor.js";import i from"../../core/Collection.js";import{debounce as s,ignoreAbortErrors as r}from"../../core/promiseUtils.js";import{property as o,subclass as a}from"../../core/accessorSupport/decorators.js";import{attributesAreEquivalent as n}from"./support/editsUtils.js";function d(t){return null==t?null:JSON.stringify(t)}let l=class extends e{constructor(t){super(t),this._stagedForDelete=!1,this._attachmentEdits=new i,this.feature=null,this.initialFeature=null,this.submittable=!1,this.displayTitle=null,this.isAssociation=!1,this._debouncedRefreshDisplayTitle=s(this._refreshDisplayTitle.bind(this),100)}get attributesModified(){return!n(this.initialFeature?.attributes,this.feature?.attributes)}get geometryModified(){return this._stringifyGeometry(this.feature)!==this._stringifyGeometry(this.initialFeature)}get stagedForDelete(){return this._stagedForDelete}get modified(){return this.attributesModified||this.geometryModified||this.attachmentsModified||this._stagedForDelete}get attachmentsModified(){return this._attachmentEdits.some(t=>t.
|
|
2
|
+
import{__decorate as t}from"tslib";import e from"../../core/Accessor.js";import i from"../../core/Collection.js";import{debounce as s,ignoreAbortErrors as r}from"../../core/promiseUtils.js";import{property as o,subclass as a}from"../../core/accessorSupport/decorators.js";import{attributesAreEquivalent as n}from"./support/editsUtils.js";function d(t){return null==t?null:JSON.stringify(t)}let l=class extends e{constructor(t){super(t),this._stagedForDelete=!1,this._attachmentEdits=new i,this.feature=null,this.initialFeature=null,this.submittable=!1,this.displayTitle=null,this.isAssociation=!1,this._debouncedRefreshDisplayTitle=s(this._refreshDisplayTitle.bind(this),100)}get attributesModified(){return!n(this.initialFeature?.attributes,this.feature?.attributes)}get geometryModified(){return this._stringifyGeometry(this.feature)!==this._stringifyGeometry(this.initialFeature)}get stagedForDelete(){return this._stagedForDelete}get modified(){return this.attributesModified||this.geometryModified||this.attachmentsModified||this._stagedForDelete}get attachmentsModified(){return this._attachmentEdits.some(t=>t.adds.length>0||t.updates.length>0||t.deletes.length>0)}get attachmentEdits(){return this._attachmentEdits.toArray()}set timeZone(t){this._set("timeZone",t),r(this._debouncedRefreshDisplayTitle())}setAttribute(t,e){const{feature:i}=this;i&&(i.setAttribute(t,e),this.notifyChange("attributesModified")),r(this._debouncedRefreshDisplayTitle())}setAttachmentEdits(t){this._attachmentEdits.removeAll(),t?.length&&this._attachmentEdits.addMany(t)}stageDelete(){this._stagedForDelete=!0}unstageDelete(){this._stagedForDelete=!1}trackChanges(t=this.feature){this.initialFeature=t?.clone(),this._attachmentEdits.removeAll(),r(this._debouncedRefreshDisplayTitle())}updateAttributes(t){const{feature:e}=this;e&&(e.attributes=t,this.notifyChange("attributesModified")),r(this._debouncedRefreshDisplayTitle())}updateGeometry(t){const{feature:e}=this;e&&(e.geometry=t,this.notifyChange("geometryModified"))}_stringifyGeometry(t){const e=t?.geometry;return d("mesh"===e?.type?{transform:e.transform??null,vertexSpace:e.vertexSpace}:e)}async _refreshDisplayTitle(t){const e=this.feature,i=e?.sourceLayer;if(!i||!("getFeatureTitle"in i))return;const s=await i.getFeatureTitle(e,{fetchMissingFields:!1,removeHTML:!0,timeZone:this.timeZone});t.aborted||(this.displayTitle=""===s?null:s)}};t([o()],l.prototype,"_stagedForDelete",void 0),t([o()],l.prototype,"_attachmentEdits",void 0),t([o()],l.prototype,"attributesModified",null),t([o()],l.prototype,"feature",void 0),t([o()],l.prototype,"geometryModified",null),t([o()],l.prototype,"initialFeature",void 0),t([o()],l.prototype,"modified",null),t([o()],l.prototype,"attachmentsModified",null),t([o({readOnly:!0})],l.prototype,"attachmentEdits",null),t([o()],l.prototype,"submittable",void 0),t([o()],l.prototype,"displayTitle",void 0),t([o()],l.prototype,"isAssociation",void 0),t([o()],l.prototype,"timeZone",null),l=t([a("esri.widgets.Editor.Edits")],l);const h=l;export{h as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import t from"../../core/Collection.js";import i from"../../core/Error.js";import{makeHandle as r,handlesGroup as a,destroyHandle as o}from"../../core/handleUtils.js";import{destroyMaybe as s}from"../../core/maybe.js";import{whenOnce as n,watch as l,initial as d}from"../../core/reactiveUtils.js";import{property as h,subclass as u}from"../../core/accessorSupport/decorators.js";import m from"../../layers/GraphicsLayer.js";import{updateGraphicSymbolWhenRequired as c}from"../../views/draw/support/editingSessionUtils.js";import p from"../../views/draw/support/HighlightHelper.js";import{temporaryHighlightName as w}from"../../views/support/HighlightDefaults.js";import f from"../BatchAttributeForm/BatchAttributeFormViewModel.js";import y from"./Edits.js";import g from"./MergeFeaturesWorkflowData.js";import v from"./Workflow.js";import{handleFormValuesChangeEvent as F,makeMinimalAttributes as _}from"./workflowUtils.js";import{assertViewNot3D as M,assertMergeWorkflowCapabilities as k,assertMinimumFeatureCount as V,assertFeaturesAreFromSameLayer as I,InvalidKeyFeatureError as j}from"./support/errors.js";import{mergeFeatures as
|
|
2
|
+
import{__decorate as e}from"tslib";import t from"../../core/Collection.js";import i from"../../core/Error.js";import{makeHandle as r,handlesGroup as a,destroyHandle as o}from"../../core/handleUtils.js";import{destroyMaybe as s}from"../../core/maybe.js";import{whenOnce as n,watch as l,initial as d}from"../../core/reactiveUtils.js";import{property as h,subclass as u}from"../../core/accessorSupport/decorators.js";import m from"../../layers/GraphicsLayer.js";import{updateGraphicSymbolWhenRequired as c}from"../../views/draw/support/editingSessionUtils.js";import p from"../../views/draw/support/HighlightHelper.js";import{temporaryHighlightName as w}from"../../views/support/HighlightDefaults.js";import f from"../BatchAttributeForm/BatchAttributeFormViewModel.js";import y from"./Edits.js";import g from"./MergeFeaturesWorkflowData.js";import v from"./Workflow.js";import{handleFormValuesChangeEvent as F,makeMinimalAttributes as _}from"./workflowUtils.js";import{assertViewNot3D as M,assertMergeWorkflowCapabilities as k,assertMinimumFeatureCount as V,assertFeaturesAreFromSameLayer as I,InvalidKeyFeatureError as j}from"./support/errors.js";import{mergeFeatures as A}from"./support/mergeFeaturesUtils.js";var H;const b=Symbol();let E=H=class extends v{constructor(e){super(e),this.type="merge-features",this._formViewModel=null,this._graphicsLayer=null,this._highlightHelper=null}initialize(){const e=this.data.viewModel.view;this._highlightHelper=e?new p({view:e}):null,this._initializeFormViewModel(),this._initializeGraphicsLayer(),this._createAndInitializeEdits(this.data.keyFeature)}destroy(){const e=this._graphicsLayer,{view:t}=this.data.viewModel;t?.destroyed||t?.map.remove(e),this._graphicsLayer=s(this._graphicsLayer),this._formViewModel?.destroy(),this._highlightHelper?.destroy()}get formViewModel(){return this._formViewModel}get hasPendingEdits(){return!1}get layer(){return this.data.editorItem.layer}get parent(){return this.data.parent}get shouldShowAttachments(){return this.data.editorItem.capabilities.attachments.enabled}static async create(e){const{applyEdits:t,applyEditsFeatureService:i,...r}=e,{editorItem:a,features:o}=r;if(M(r.viewModel,"merge-features"),k(a),V(o,2),I(o),r.keyFeature&&!o.includes(r.keyFeature))throw new j;const s=await A(o),n=new H({data:new g({...r,mergedGeometry:s}),onCommit:z(t)});return n._set("steps",L()),n}async enter(){this._configureAttachmentsViewModel()}exit(){}isKeyFeature(e){return this.data.keyFeature===e}isTemporaryHighlightFeature(e){return this.data.temporaryHighlightFeature===e}async setKeyFeature(e){const{data:t}=this;if(e!==t.keyFeature){if(!t.features.includes(e))throw new j;t.keyFeature=e,await this._createAndInitializeEdits(e)}}async start(){return await n(()=>!this.updating),await super.start(),this._makeSketchController()}getFeatureTitle(e){return this.data.getFeatureTitle(e)}async _createAndInitializeEdits(e){const{data:t}=this,i=e.clone();i.geometry=t.mergedGeometry;const r=new y({feature:i});t.edits=r;const a=t.getInitialFeature(e)||e;r.trackChanges(a),await this._setFeatureOnFormViewModel(i,a),this._setFeatureOnAttachmentsViewModel(e)}_initializeFormViewModel(){const{data:e}=this,t=e.viewModel.view,i=e.editorItem.layerInfo?[e.editorItem.layerInfo]:null,r=new f({editType:"UPDATE",highlightHelper:this._highlightHelper,layerInfos:i,map:t?.map,readOnly:!0,spatialReference:t?.spatialReference,timeZone:e.timeZone});this._formViewModel=r,this.addHandles(r.on("values-change",F({filter:t=>t===e.edits?.feature,forEachFeature:e=>{c(e,t?.scale)},forEachValueChange:(t,i)=>e.edits?.setAttribute(t,i)})))}_initializeGraphicsLayer(){const{data:e}=this,{view:t}=e.viewModel,i=new m({elevationInfo:e.editorItem.layer.elevationInfo,internal:!0,listMode:"hide",title:"mergeFeaturesWorkflow-internal"});this._graphicsLayer=i,t?.map.add(i)}_makeSketchController(){return{enter:async()=>{this.addHandles(U(this.data),b)},exit:()=>{this.removeHandles(b)}}}async _setFeatureOnFormViewModel(e,i){const r=this._formViewModel;r.features=new t([e]),r.activeFeatureIndex=0,await r.overrideOriginalFeature(e,i),await n(()=>!r.updating)}_configureAttachmentsViewModel(){const{data:e}=this,{keyFeature:t,viewModel:i}=e,{attachmentsViewModel:r}=i;r.set({capabilities:{editing:!1},graphic:t,filesEnabled:!1,mode:"view"})}_setFeatureOnAttachmentsViewModel(e){this.data.viewModel.attachmentsViewModel.graphic=e}};e([h()],E.prototype,"formViewModel",null),e([h()],E.prototype,"hasPendingEdits",null),e([h()],E.prototype,"layer",null),e([h()],E.prototype,"parent",null),e([h()],E.prototype,"shouldShowAttachments",null),e([h()],E.prototype,"type",void 0),e([h()],E.prototype,"_formViewModel",void 0),e([h()],E.prototype,"_graphicsLayer",void 0),e([h()],E.prototype,"_highlightHelper",void 0),E=H=e([u("esri.widgets.Editor.MergeFeaturesWorkflow")],E);const S=E;function L(){return[{id:"choosing-key-feature",async setUp(){},async tearDown(){}}]}function z(e){return async t=>{const{edits:r,keyFeature:a}=t,o=r?.feature?.cloneShallow(),s=t.editorItem.layer;if(!r||!o)throw new i("editing:missing-feature","Workflow data has no edits to submit.");r.attributesModified||(o.attributes=_(o,t.editorItem.layer));const n=[];for(const e of t.features){if(e===a)continue;const t=e.cloneShallow();t.attributes=_(t,s),t.geometry=null,n.push(t)}await e(s,{updateFeatures:[o],deleteFeatures:n})}}function U(e){const t=e.viewModel.view;if(!t)return r();const i=new p({view:t});for(const r of e.features)i.add(r);const s=new p({view:t,highlightName:w}),n=l(()=>e.keyFeature,e=>{s.removeAll(),s.add(e)},d),h=new p({view:t,highlightName:w}),u=l(()=>e.temporaryHighlightFeature,e=>{h.removeAll(),e&&h.add(e)});return a([o(i),n,o(s),u,o(h)])}export{S as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import t from"../../core/Collection.js";import i from"../../core/Error.js";import{makeHandle as r,handlesGroup as a,destroyHandle as o}from"../../core/handleUtils.js";import"../../core/has.js";import{destroyMaybe as s}from"../../core/maybe.js";import{debounce as n}from"../../core/promiseUtils.js";import{watch as l,whenOnce as d,on as p,initial as u}from"../../core/reactiveUtils.js";import{property as c,subclass as h}from"../../core/accessorSupport/decorators.js";import m from"../../layers/GraphicsLayer.js";import{swapForEditingSession as y,updateGraphicSymbolWhenRequired as w}from"../../views/draw/support/editingSessionUtils.js";import{getDrawHelpMessage as g}from"../../views/draw/support/helpMessageUtils.js";import f from"../../views/draw/support/HighlightHelper.js";import v from"../../views/interactive/snapping/FeatureSnappingLayerSource.js";import{temporaryHighlightName as _}from"../../views/support/HighlightDefaults.js";import F from"../BatchAttributeForm/BatchAttributeFormViewModel.js";import M from"./Edits.js";import S from"./SplitFeatureWorkflowData.js";import b from"./Workflow.js";import{activeSketchToolDrawsUnsupportedCurve as k,containsUnsupportedCurve as I,createWorkflowSteps as T,handleFormValuesChangeEvent as V,makeMinimalAttributes as E}from"./workflowUtils.js";import{assertViewNot3D as G,assertSplitWorkflowCapabilities as C}from"./support/errors.js";import{getCompatibleSpitterGeometryType as H,ensureSplittableGeometry as j,makeNewFeatureAttributes as x,splitGeometry as U,canSplitByPoint as L,isSplitterGeometry as W}from"./support/splitFeatureUtils.js";import O from"../Sketch/SketchViewModel.js";import{getDrawToolGeometryTypeFromCreateTool as A}from"../Sketch/support/sketchUtils.js";var P;const z=Symbol(),D=Symbol();let R=P=class extends b{constructor(e){super(e),this.defaultSplitterGeometryType=null,this.type="split-feature",this._activeFeature=null,this._formViewModel=null,this._graphicsLayer=null,this._highlightHelper=null,this._lastSplitterGeometryWasInvalid=!1,this._sketchViewModel=null,this._webStyleCache=new Map}initialize(){const e=this.data.viewModel.view;this._highlightHelper=e?new f({view:e,highlightName:_}):null,this._initializeFormViewModel();const t=this._initializeGraphicsLayer();this._initializeSketchViewModel(t)}destroy(){const e=this._graphicsLayer,{view:t}=this.data.viewModel;t?.destroyed||t?.map.remove(e),this._graphicsLayer=s(this._graphicsLayer),this._formViewModel.destroy(),this._sketchViewModel.destroy(),this._highlightHelper?.destroy()}get activeFeature(){return this._activeFeature}get allowSave(){const{data:e}=this;return null!=e.existingFeatureEdits&&null!=e.newFeatureEdits&&!this.updating}get availableCreateTools(){const e=["polyline","polygon","rectangle","circle","freehandPolyline","freehandPolygon"];switch(this.data.editorItem.layer.geometryType){case"polygon":case"multipoint":return e;case"polyline":return["point",...e];default:return[]}}get formViewModel(){return this._formViewModel}get hasInvalidFormTemplate(){return!!this.data.editorItem?.hasInvalidFormTemplate}get hasPreviousStep(){return null!==this._activeFeature||this._stepIndex>0}get helpMessage(){const{activeCreateToolDrawMode:e,activeTool:t,createGraphic:i,drawTool:r,isUsingLegacyCreateTools:a}=this._sketchViewModel;if(!a)return r?.helpMessageKey??"noTool";const o=A(t);return"mesh"!==o?g(o,i?.geometry,e):void 0}get layer(){return this.data.editorItem.layer}get parent(){return this.data.parent}get sketchUpdateOptions(){return{enableScaling:!this.curveResizeDisabled,multipleSelectionEnabled:!1}}get updating(){return this._updatingHandles.updating||this._formViewModel.updating||this._sketchViewModel.updating}get noticeMessage(){return this._splittingMayIntroduceCurves&&k(this._sketchViewModel,this.data.editorItem)?"curveToolDensifyWarning":this._lastSplitterGeometryWasInvalid?"invalidSplitterGeometry":void 0}get _splittingMayIntroduceCurves(){return"polygon"===this.data.editorItem.layer.geometryType}async back(e){if(this.activeFeature)return await this.setActiveFeature(null);await super.back(e)}static create(e){const{applyEdits:t,applyEditsFeatureService:r,defaultSplitterGeometryType:a,startAt:o,...s}=e;if(G(e.viewModel,"split-feature"),C(s.editorItem),"reviewing-features"===o){if(!s.splitterGeometry)throw new i("editing:split-geometry-required","Must provide the split geometry to start at the 'reviewing-features' step.");const e=H(j(s.feature.geometry),s.splitterGeometry.type);if(s.splitterGeometry.type!==e)throw new i("editing:incompatible-split-geometries",`Geometry of type '${s.splitterGeometry.type}' cannot be used to split geometry of type '${s.feature.geometry?.type}'.`)}const n=new P({data:new S(s),defaultSplitterGeometryType:a,onCommit:B(e.applyEdits)});return n._set("steps",P._createWorkflowSteps(n,o)),n}async enter(){}exit(){if("reviewing-features"!==this.stepId)throw new i("editing:invalid-exit-state","The SplitFeatureWorkflow can only be exited when in the 'reviewing-features' step.")}async setActiveFeature(e){const t=this._activeFeature;if(e===t)return;const r=this.data,a=t?r.getEditsForFeature(t):null;if(a&&(a.submittable=this._formViewModel.valid),this._activeFeature=e,null==e)return;const o=this.data.getRoleForFeature(e);if(!o)throw new i("editing:unknown-feature","The provided feature is not part of this workflow.");await this._setFeatureOnFormViewModel(e,o)}async commit(e){const{newFeatureEdits:t,existingFeatureEdits:i,editorItem:r}=this.data,a=[i?.feature,t?.feature].filter(e=>!!e);if(e&&I(a,r)){if(!await e("curveEditingDensifyPrompt"))return this.reset()}return super.commit()}async start(){return await super.start(),this._makeSketchController()}async _createAndInitializeEdits({newPart:e,remainingPart:t}){const{data:i}=this,r=i.feature,a=this._formViewModel,o=r.clone();o.geometry=t;const s=new M({feature:o});i.existingFeatureEdits=s,s.trackChanges(i.initialFeature),await this._setFeatureOnFormViewModel(o,"existing"),s.submittable=a.valid;const n=r.clone();n.geometry=e,n.attributes=x(r.attributes,i.editorItem.layer);const l=new M({feature:n});return i.newFeatureEdits=l,l.trackChanges(),await this._setFeatureOnFormViewModel(n,"new"),l.submittable=a.valid,{featureToCreate:n,featureToUpdate:o}}static _createWorkflowSteps(e,t="drawing-splitter-geometry"){const{data:r}=e;return T(["drawing-splitter-geometry","reviewing-features"],t,{"drawing-splitter-geometry":()=>({id:"drawing-splitter-geometry",async setUp(){const t=j(r.feature.geometry),a=H(t,e.defaultSplitterGeometryType),{snappingManager:o}=r;L(t)&&o&&e.addHandles(Z(o,e.layer));const s=e._sketchViewModel;e.addHandles([p(()=>s,"create",async t=>{if("start"===t.state&&e._lastSplitterGeometryWasInvalid&&(e._lastSplitterGeometryWasInvalid=!1),"complete"===t.state){e._graphicsLayer.removeAll();const o=t.graphic?.geometry;try{if(!W(o))throw new i("editing:invalid-split-geometry","The geometry produced by the Sketch operation cannot be used for splitting.");r.splitterGeometry=o,r.splitResult=await e._updatingHandles.addPromise(e._executeSplit(o)),await e.next()}catch(a){e._lastSplitterGeometryWasInvalid=!0,await s.create(t.tool)}}}),l(()=>s.activeTool,(t,i)=>{"point"===t&&!e.hasHandles(z)&&o?e.addHandles($(o,e.layer),z):"point"===i&&e.removeHandles(z)})],this.id),await s.create(a)},async tearDown(){e.removeHandles(this.id)}}),"reviewing-features":()=>({id:"reviewing-features",async setUp(){const t=r.splitterGeometry;if(!t)throw new i("editing:missing-splitter-geometry","The `splitterGeometry` property of the workflow's data must be set in order to start the 'reviewing-features' step.");const a=r.splitResult??await e._executeSplit(t),{featureToCreate:o,featureToUpdate:s}=await e._createAndInitializeEdits(a),n=await e._displayFeatureGraphics(s,o);e.addHandles(n,this.id)},async tearDown(){e.removeHandles(this.id)}})})}async _displayFeatureGraphics(e,t){const{data:i,_graphicsLayer:o}=this,s=i.viewModel.view,d=[];if(!e||!t||!s)return r();const p=n(i=>Promise.all([w(e,this._webStyleCache,i),w(t,this._webStyleCache,i)]));return await p("2d"===s.type?s.scale:null),"2d"===s.type&&d.push(l(()=>s.scale,e=>p(e))),o.add(t),d.push(r(()=>o.remove(t))),d.push(await y(o,s,i.feature,e)),a(d)}async _executeSplit(e){const{data:t}=this,{feature:r}=t,a=r.geometry;if(!a)throw new i("editing:feature-has-no-geometry","Cannot split the provided feature as it has no geometry.");const o=await U(a,e);if(!o||!o.newPart)throw new i("editing:split-failed","The split operation did not produce a valid result.");return o}_initializeFormViewModel(){const{data:e,_webStyleCache:t}=this,i=e.viewModel.view,r=e.editorItem.layerInfo?[e.editorItem.layerInfo]:null,a=new F({activeFeatureIndex:0,highlightHelper:this._highlightHelper,layerInfos:r,map:i?.map,spatialReference:i?.spatialReference,timeZone:e.timeZone});this._formViewModel=a,this.addHandles(a.on("values-change",V({forEachFeature:e=>{w(e,t,i?.scale)},forEachValueChange:(t,i,r)=>e.getEditsForFeature(r)?.setAttribute(t,i)})))}_initializeGraphicsLayer(){const{data:e}=this,{view:t}=e.viewModel,i=new m({elevationInfo:e.editorItem.layer.elevationInfo,internal:!0,listMode:"hide",title:"splitFeatureWorkflow-internal"});return this._graphicsLayer=i,t?.map.add(i),i}_initializeSketchViewModel(e){const{data:t}=this,{view:i}=t.viewModel;this._sketchViewModel=new O({layer:e,creationMode:"single",sketchOptions:t.sketchOptions,snappingManager:t.snappingManager,useLegacyCreateTools:t.viewModel.useLegacyCreateTools,updateOnGraphicClick:!1,defaultUpdateOptions:this.sketchUpdateOptions,view:i})}_makeSketchController(){return{enter:async()=>this.addHandles(q(this)),exit:()=>this.removeHandles(D),viewModel:this._sketchViewModel}}async _setFeatureOnFormViewModel(e,i){const r=this._formViewModel;r.features=new t([e]),r.activeFeatureIndex=0,"existing"===i?(r.editType="UPDATE",r.overrideOriginalFeature(e,this.data.initialFeature)):r.editType="INSERT",await d(()=>!r.updating)}get test(){}};e([c()],R.prototype,"activeFeature",null),e([c()],R.prototype,"allowSave",null),e([c()],R.prototype,"availableCreateTools",null),e([c()],R.prototype,"defaultSplitterGeometryType",void 0),e([c()],R.prototype,"formViewModel",null),e([c()],R.prototype,"hasInvalidFormTemplate",null),e([c()],R.prototype,"hasPreviousStep",null),e([c()],R.prototype,"helpMessage",null),e([c()],R.prototype,"layer",null),e([c()],R.prototype,"parent",null),e([c()],R.prototype,"sketchUpdateOptions",null),e([c()],R.prototype,"type",void 0),e([c()],R.prototype,"updating",null),e([c()],R.prototype,"noticeMessage",null),e([c()],R.prototype,"_activeFeature",void 0),e([c()],R.prototype,"_formViewModel",void 0),e([c()],R.prototype,"_graphicsLayer",void 0),e([c()],R.prototype,"_highlightHelper",void 0),e([c()],R.prototype,"_lastSplitterGeometryWasInvalid",void 0),e([c()],R.prototype,"_sketchViewModel",void 0),e([c()],R.prototype,"_splittingMayIntroduceCurves",null),R=P=e([h("esri.widgets.Editor.SplitFeatureWorkflow")],R);const N=R;function B(e){return async t=>{const{existingFeatureEdits:r,newFeatureEdits:a}=t,o=r?.feature?.cloneShallow(),s=a?.feature?.cloneShallow(),n=t.editorItem.layer;if(null==o||null==s)throw new i("editing:missing-features","Expected both a feature to update and a feature to add for the split operation.");r?.attributesModified||(o.attributes=E(o,t.editorItem.layer)),await e(n,{addFeatures:[s],updateFeatures:[o]})}}function Z(e,t){if(e.options.featureSources.some(e=>e.layer===t))return r();const i=new v({enabled:!1,layer:t});return e.options.featureSources.add(i),r(()=>{e.options.featureSources.remove(i),i.destroy()})}function $(e,t){const{options:i}=e,a=i.enabled;i.enabled=!0;const o=i.featureEnabled;i.featureEnabled=!0;const s=i.distance;i.distance=15;const n=new Map;for(const r of i.featureSources)n.set(r,r.enabled),r.layer===t?r.enabled=!0:r.enabled=!1;return r(()=>{i.enabled=a,i.featureEnabled=o,i.distance=s;for(const[e,t]of n)e.enabled=t})}function q(e){const t=e.data,{feature:i,viewModel:s}=t,{view:n}=s;if(!n)return r();const d=new f({view:n}),p=l(()=>e.stepId,e=>{switch(d.removeAll(),e){case"drawing-splitter-geometry":d.add(i);break;case"reviewing-features":d.add(t.existingFeatureEdits?.feature),d.add(t.newFeatureEdits?.feature)}},u),c=new f({view:n,highlightName:_}),h=l(()=>t.temporaryHighlightFeature,(t,i)=>{i&&i!==e.activeFeature&&c.remove(i),t&&c.add(t)}),m=l(()=>e.activeFeature,(e,i)=>{i&&i!==t.temporaryHighlightFeature&&c.remove(i),e&&c.add(e)});return a([p,h,m,o(d),o(c)])}export{N as default};
|
|
2
|
+
import{__decorate as e}from"tslib";import t from"../../core/Collection.js";import i from"../../core/Error.js";import{makeHandle as r,handlesGroup as a,destroyHandle as o}from"../../core/handleUtils.js";import"../../core/has.js";import{destroyMaybe as s}from"../../core/maybe.js";import{debounce as n}from"../../core/promiseUtils.js";import{watch as l,whenOnce as d,on as p,initial as u}from"../../core/reactiveUtils.js";import{property as c,subclass as h}from"../../core/accessorSupport/decorators.js";import m from"../../layers/GraphicsLayer.js";import{swapForEditingSession as y,updateGraphicSymbolWhenRequired as w}from"../../views/draw/support/editingSessionUtils.js";import{getDrawHelpMessage as g}from"../../views/draw/support/helpMessageUtils.js";import f from"../../views/draw/support/HighlightHelper.js";import v from"../../views/interactive/snapping/FeatureSnappingLayerSource.js";import{temporaryHighlightName as _}from"../../views/support/HighlightDefaults.js";import F from"../BatchAttributeForm/BatchAttributeFormViewModel.js";import M from"./Edits.js";import S from"./SplitFeatureWorkflowData.js";import b from"./Workflow.js";import{activeSketchToolDrawsUnsupportedCurve as k,containsUnsupportedCurve as I,createWorkflowSteps as T,handleFormValuesChangeEvent as V,makeMinimalAttributes as E}from"./workflowUtils.js";import{assertViewNot3D as G,assertSplitWorkflowCapabilities as H}from"./support/errors.js";import{getCompatibleSpitterGeometryType as j,ensureSplittableGeometry as x,makeNewFeatureAttributes as C,splitGeometry as U,canSplitByPoint as L,isSplitterGeometry as W}from"./support/splitFeatureUtils.js";import O from"../Sketch/SketchViewModel.js";import{getDrawToolGeometryTypeFromCreateTool as A}from"../Sketch/support/sketchUtils.js";var P;const z=Symbol(),D=Symbol();let R=P=class extends b{constructor(e){super(e),this.defaultSplitterGeometryType=null,this.type="split-feature",this._activeFeature=null,this._formViewModel=null,this._graphicsLayer=null,this._highlightHelper=null,this._lastSplitterGeometryWasInvalid=!1,this._sketchViewModel=null}initialize(){const e=this.data.viewModel.view;this._highlightHelper=e?new f({view:e,highlightName:_}):null,this._initializeFormViewModel();const t=this._initializeGraphicsLayer();this._initializeSketchViewModel(t)}destroy(){const e=this._graphicsLayer,{view:t}=this.data.viewModel;t?.destroyed||t?.map.remove(e),this._graphicsLayer=s(this._graphicsLayer),this._formViewModel.destroy(),this._sketchViewModel.destroy(),this._highlightHelper?.destroy()}get activeFeature(){return this._activeFeature}get allowSave(){const{data:e}=this;return null!=e.existingFeatureEdits&&null!=e.newFeatureEdits&&!this.updating}get availableCreateTools(){const e=["polyline","polygon","rectangle","circle","freehandPolyline","freehandPolygon"];switch(this.data.editorItem.layer.geometryType){case"polygon":case"multipoint":return e;case"polyline":return["point",...e];default:return[]}}get formViewModel(){return this._formViewModel}get hasInvalidFormTemplate(){return!!this.data.editorItem?.hasInvalidFormTemplate}get hasPreviousStep(){return null!==this._activeFeature||this._stepIndex>0}get helpMessage(){const{activeCreateToolDrawMode:e,activeTool:t,createGraphic:i,drawTool:r,isUsingLegacyCreateTools:a}=this._sketchViewModel;if(!a)return r?.helpMessageKey??"noTool";const o=A(t);return"mesh"!==o?g(o,i?.geometry,e):void 0}get layer(){return this.data.editorItem.layer}get parent(){return this.data.parent}get sketchUpdateOptions(){return{enableScaling:!this.curveResizeDisabled,multipleSelectionEnabled:!1}}get updating(){return this._updatingHandles.updating||this._formViewModel.updating||this._sketchViewModel.updating}get noticeMessage(){return this._splittingMayIntroduceCurves&&k(this._sketchViewModel,this.data.editorItem)?"curveToolDensifyWarning":this._lastSplitterGeometryWasInvalid?"invalidSplitterGeometry":void 0}get _splittingMayIntroduceCurves(){return"polygon"===this.data.editorItem.layer.geometryType}async back(e){if(this.activeFeature)return await this.setActiveFeature(null);await super.back(e)}static create(e){const{applyEdits:t,applyEditsFeatureService:r,defaultSplitterGeometryType:a,startAt:o,...s}=e;if(G(e.viewModel,"split-feature"),H(s.editorItem),"reviewing-features"===o){if(!s.splitterGeometry)throw new i("editing:split-geometry-required","Must provide the split geometry to start at the 'reviewing-features' step.");const e=j(x(s.feature.geometry),s.splitterGeometry.type);if(s.splitterGeometry.type!==e)throw new i("editing:incompatible-split-geometries",`Geometry of type '${s.splitterGeometry.type}' cannot be used to split geometry of type '${s.feature.geometry?.type}'.`)}const n=new P({data:new S(s),defaultSplitterGeometryType:a,onCommit:B(e.applyEdits)});return n._set("steps",P._createWorkflowSteps(n,o)),n}async enter(){}exit(){if("reviewing-features"!==this.stepId)throw new i("editing:invalid-exit-state","The SplitFeatureWorkflow can only be exited when in the 'reviewing-features' step.")}async setActiveFeature(e){const t=this._activeFeature;if(e===t)return;const r=this.data,a=t?r.getEditsForFeature(t):null;if(a&&(a.submittable=this._formViewModel.valid),this._activeFeature=e,null==e)return;const o=this.data.getRoleForFeature(e);if(!o)throw new i("editing:unknown-feature","The provided feature is not part of this workflow.");await this._setFeatureOnFormViewModel(e,o)}async commit(e){const{newFeatureEdits:t,existingFeatureEdits:i,editorItem:r}=this.data,a=[i?.feature,t?.feature].filter(e=>!!e);if(e&&I(a,r)){if(!await e("curveEditingDensifyPrompt"))return this.reset()}return super.commit()}async start(){return await super.start(),this._makeSketchController()}async _createAndInitializeEdits({newPart:e,remainingPart:t}){const{data:i}=this,r=i.feature,a=this._formViewModel,o=r.clone();o.geometry=t;const s=new M({feature:o});i.existingFeatureEdits=s,s.trackChanges(i.initialFeature),await this._setFeatureOnFormViewModel(o,"existing"),s.submittable=a.valid;const n=r.clone();n.geometry=e,n.attributes=C(r.attributes,i.editorItem.layer);const l=new M({feature:n});return i.newFeatureEdits=l,l.trackChanges(),await this._setFeatureOnFormViewModel(n,"new"),l.submittable=a.valid,{featureToCreate:n,featureToUpdate:o}}static _createWorkflowSteps(e,t="drawing-splitter-geometry"){const{data:r}=e;return T(["drawing-splitter-geometry","reviewing-features"],t,{"drawing-splitter-geometry":()=>({id:"drawing-splitter-geometry",async setUp(){const t=x(r.feature.geometry),a=j(t,e.defaultSplitterGeometryType),{snappingManager:o}=r;L(t)&&o&&e.addHandles(Z(o,e.layer));const s=e._sketchViewModel;e.addHandles([p(()=>s,"create",async t=>{if("start"===t.state&&e._lastSplitterGeometryWasInvalid&&(e._lastSplitterGeometryWasInvalid=!1),"complete"===t.state){e._graphicsLayer.removeAll();const o=t.graphic?.geometry;try{if(!W(o))throw new i("editing:invalid-split-geometry","The geometry produced by the Sketch operation cannot be used for splitting.");r.splitterGeometry=o,r.splitResult=await e._updatingHandles.addPromise(e._executeSplit(o)),await e.next()}catch(a){e._lastSplitterGeometryWasInvalid=!0,await s.create(t.tool)}}}),l(()=>s.activeTool,(t,i)=>{"point"===t&&!e.hasHandles(z)&&o?e.addHandles($(o,e.layer),z):"point"===i&&e.removeHandles(z)})],this.id),await s.create(a)},async tearDown(){e.removeHandles(this.id)}}),"reviewing-features":()=>({id:"reviewing-features",async setUp(){const t=r.splitterGeometry;if(!t)throw new i("editing:missing-splitter-geometry","The `splitterGeometry` property of the workflow's data must be set in order to start the 'reviewing-features' step.");const a=r.splitResult??await e._executeSplit(t),{featureToCreate:o,featureToUpdate:s}=await e._createAndInitializeEdits(a),n=await e._displayFeatureGraphics(s,o);e.addHandles(n,this.id)},async tearDown(){e.removeHandles(this.id)}})})}async _displayFeatureGraphics(e,t){const{data:i,_graphicsLayer:o}=this,s=i.viewModel.view,d=[];if(!e||!t||!s)return r();const p=n(i=>Promise.all([w(e,i),w(t,i)]));return await p("2d"===s.type?s.scale:null),"2d"===s.type&&d.push(l(()=>s.scale,e=>p(e))),o.add(t),d.push(r(()=>o.remove(t))),d.push(await y(o,s,i.feature,e)),a(d)}async _executeSplit(e){const{data:t}=this,{feature:r}=t,a=r.geometry;if(!a)throw new i("editing:feature-has-no-geometry","Cannot split the provided feature as it has no geometry.");const o=await U(a,e);if(!o||!o.newPart)throw new i("editing:split-failed","The split operation did not produce a valid result.");return o}_initializeFormViewModel(){const{data:e}=this,t=e.viewModel.view,i=e.editorItem.layerInfo?[e.editorItem.layerInfo]:null,r=new F({activeFeatureIndex:0,highlightHelper:this._highlightHelper,layerInfos:i,map:t?.map,spatialReference:t?.spatialReference,timeZone:e.timeZone});this._formViewModel=r,this.addHandles(r.on("values-change",V({forEachFeature:e=>{w(e,t?.scale)},forEachValueChange:(t,i,r)=>e.getEditsForFeature(r)?.setAttribute(t,i)})))}_initializeGraphicsLayer(){const{data:e}=this,{view:t}=e.viewModel,i=new m({elevationInfo:e.editorItem.layer.elevationInfo,internal:!0,listMode:"hide",title:"splitFeatureWorkflow-internal"});return this._graphicsLayer=i,t?.map.add(i),i}_initializeSketchViewModel(e){const{data:t}=this,{view:i}=t.viewModel;this._sketchViewModel=new O({layer:e,creationMode:"single",sketchOptions:t.sketchOptions,snappingManager:t.snappingManager,useLegacyCreateTools:t.viewModel.useLegacyCreateTools,updateOnGraphicClick:!1,defaultUpdateOptions:this.sketchUpdateOptions,view:i})}_makeSketchController(){return{enter:async()=>this.addHandles(q(this)),exit:()=>this.removeHandles(D),viewModel:this._sketchViewModel}}async _setFeatureOnFormViewModel(e,i){const r=this._formViewModel;r.features=new t([e]),r.activeFeatureIndex=0,"existing"===i?(r.editType="UPDATE",r.overrideOriginalFeature(e,this.data.initialFeature)):r.editType="INSERT",await d(()=>!r.updating)}get test(){}};e([c()],R.prototype,"activeFeature",null),e([c()],R.prototype,"allowSave",null),e([c()],R.prototype,"availableCreateTools",null),e([c()],R.prototype,"defaultSplitterGeometryType",void 0),e([c()],R.prototype,"formViewModel",null),e([c()],R.prototype,"hasInvalidFormTemplate",null),e([c()],R.prototype,"hasPreviousStep",null),e([c()],R.prototype,"helpMessage",null),e([c()],R.prototype,"layer",null),e([c()],R.prototype,"parent",null),e([c()],R.prototype,"sketchUpdateOptions",null),e([c()],R.prototype,"type",void 0),e([c()],R.prototype,"updating",null),e([c()],R.prototype,"noticeMessage",null),e([c()],R.prototype,"_activeFeature",void 0),e([c()],R.prototype,"_formViewModel",void 0),e([c()],R.prototype,"_graphicsLayer",void 0),e([c()],R.prototype,"_highlightHelper",void 0),e([c()],R.prototype,"_lastSplitterGeometryWasInvalid",void 0),e([c()],R.prototype,"_sketchViewModel",void 0),e([c()],R.prototype,"_splittingMayIntroduceCurves",null),R=P=e([h("esri.widgets.Editor.SplitFeatureWorkflow")],R);const N=R;function B(e){return async t=>{const{existingFeatureEdits:r,newFeatureEdits:a}=t,o=r?.feature?.cloneShallow(),s=a?.feature?.cloneShallow(),n=t.editorItem.layer;if(null==o||null==s)throw new i("editing:missing-features","Expected both a feature to update and a feature to add for the split operation.");r?.attributesModified||(o.attributes=E(o,t.editorItem.layer)),await e(n,{addFeatures:[s],updateFeatures:[o]})}}function Z(e,t){if(e.options.featureSources.some(e=>e.layer===t))return r();const i=new v({enabled:!1,layer:t});return e.options.featureSources.add(i),r(()=>{e.options.featureSources.remove(i),i.destroy()})}function $(e,t){const{options:i}=e,a=i.enabled;i.enabled=!0;const o=i.featureEnabled;i.featureEnabled=!0;const s=i.distance;i.distance=15;const n=new Map;for(const r of i.featureSources)n.set(r,r.enabled),r.layer===t?r.enabled=!0:r.enabled=!1;return r(()=>{i.enabled=a,i.featureEnabled=o,i.distance=s;for(const[e,t]of n)e.enabled=t})}function q(e){const t=e.data,{feature:i,viewModel:s}=t,{view:n}=s;if(!n)return r();const d=new f({view:n}),p=l(()=>e.stepId,e=>{switch(d.removeAll(),e){case"drawing-splitter-geometry":d.add(i);break;case"reviewing-features":d.add(t.existingFeatureEdits?.feature),d.add(t.newFeatureEdits?.feature)}},u),c=new f({view:n,highlightName:_}),h=l(()=>t.temporaryHighlightFeature,(t,i)=>{i&&i!==e.activeFeature&&c.remove(i),t&&c.add(t)}),m=l(()=>e.activeFeature,(e,i)=>{i&&i!==t.temporaryHighlightFeature&&c.remove(i),e&&c.add(e)});return a([p,h,m,o(d),o(c)])}export{N as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import t from"../../core/Error.js";import{makeHandle as i}from"../../core/handleUtils.js";import"../../core/has.js";import{destroyMaybe as s}from"../../core/maybe.js";import{watch as a,sync as
|
|
2
|
+
import{__decorate as e}from"tslib";import t from"../../core/Error.js";import{makeHandle as i}from"../../core/handleUtils.js";import"../../core/has.js";import{destroyMaybe as s}from"../../core/maybe.js";import{watch as a,sync as r}from"../../core/reactiveUtils.js";import{property as o,subclass as l}from"../../core/accessorSupport/decorators.js";import d from"../../layers/GraphicsLayer.js";import{isSceneLayer as n}from"../../layers/support/layerUtils.js";import{updateGraphicSymbolWhenRequired as h,swapForEditingSession as c}from"../../views/draw/support/editingSessionUtils.js";import{highlightsSupported as p}from"../../views/support/layerViewUtils.js";import u from"./UpdateFeatureWorkflowData.js";import{UpdateRecordWorkflow as m,handleKeys as w}from"./UpdateRecordWorkflow.js";import{handleFormValuesChangeEvent as y,getVisualVariableAttributes as k,setUpGeometryUpdate as f,syncUpdateOptions as g,cloneGraphicExceptMesh as _,canCreateInteractiveEditSession as v,isTerminalUpdateEventType as V}from"./workflowUtils.js";import M from"../Sketch/SketchViewModel.js";var S;const b={...w,highlights:Symbol(),sketchGraphics:Symbol(),sketchViewModel:Symbol()};let U=S=class extends m{constructor(e){super(e),this.type="update-feature",this._layerViewEditSession=null,this._sketchGraphicClone=null,this._sketchLayer=null,this._sketchViewModel=null}destroy(){this._layerViewEditSession?.rollback()}get curveResizeDisabled(){return this.data.curveResizeDisabled}get curveUpdatesDisabled(){return this.data.curveUpdatesDisabled}get sketchUpdateOptions(){const{capabilities:e,layer:t}=this.data.editorItem;return{enableScaling:!this.curveResizeDisabled,multipleSelectionEnabled:!1,reshapeOptions:{enableCreateCurveFromStraightEdge:!n(t)&&e.supportsTrueCurve}}}get supportsSplitFeatureWorkflow(){return this.data.supportsSplitFeatureWorkflow}get viewGraphic(){return this._sketchViewModel?this._sketchGraphicClone:this.data.edits.feature??this.fullFeature}getUpdating(){return!!this._sketchViewModel?.updating}async commit(){this.removeHandles(b.sketchGraphics);try{const e=this.data.edits.stagedForDelete;await super.commit();const t=this._layerViewEditSession;e?t?.rollback():t?.commit()}catch(e){throw await this._configureSketchViewModel(),new t("editor-workflow:failed-to-commit","An error occurred when sending the updates to the service",{error:e})}}async start(){return await super.start(),await this._initializeSketchViewModel()}_initializeFormViewModel(){super._initializeFormViewModel(),this.addHandles([this._formViewModel.on("values-change",y({filter:e=>e===this.fullFeature,forEachValueChange:(e,t)=>this._layerViewEditSession?.setAttribute(e,t)})),a(()=>this._formViewModel.activeFeature?.sourceLayer,e=>this._sketchGraphicClone.sourceLayer=e)])}_configureHighlight(){const{edits:e,layerView:t}=this.data;p(t)&&this.addHandles(t.highlight(e.feature),b.highlights)}async _configureSketchViewModel(){const{_sketchLayer:e,_sketchViewModel:t}=this;if(!t||!e)return;const{data:i,_formViewModel:s,_sketchGraphicClone:a}=this,{edits:r,viewModel:o}=i,l=r.feature,{view:d}=o,n=k(l),h=await f({feature:l,featureClone:a,visualVariableAttributes:n,sketchLayer:e,sketchViewModel:t,getUpdateOptions:()=>this.sketchUpdateOptions,view:d,onUpdate:({geometry:e,attributes:t},i)=>{r.updateAttributes(t),r.updateGeometry(e);const a=s.activeFeature;if(a&&(a.geometry=e),null!=n.rotation){const{field:e}=n.rotation;this._updatingHandles.consumePromise(s.setFieldValue(e,t[e]))}if(null!=n.size){const{field:e}=n.size;this._updatingHandles.consumePromise(s.setFieldValue(e,t[e]))}("undo"===i.type||"redo"===i.type||"update"===i.type&&null!=i.toolEventInfo&&V(i.toolEventInfo.type))&&a&&s.notifyGeometriesChanged([a])},addUpdatingPromise:e=>{this._updatingHandles.consumePromise(e)},addHandle:e=>{this.addHandles(e,b.sketchGraphics)}});this.addHandles(h,b.sketchGraphics),t.addHandles(h)}async _initializeSketchViewModel(){const{data:e,_sketchGraphicClone:t}=this,{readOnly:o}=e,l=e.edits.feature,{capabilities:n,layer:p}=e.editorItem,u=e.viewModel.view;if(this.removeHandles([b.highlights,b.sketchGraphics,b.sketchViewModel]),!n.update.geometry||o||this.curveUpdatesDisabled)return{enter:async()=>{this.hasHandles(b.highlights)||this._configureHighlight()},exit:()=>this.removeHandles([b.highlights])};const m=new d({elevationInfo:p.elevationInfo,internal:!0,listMode:"hide",title:"updateFeaturesWorkflow-internal"}),w=new M({allowDeleteKey:!1,layer:m,sketchOptions:e.sketchOptions,snappingManager:e.snappingManager,useLegacyCreateTools:e.viewModel.useLegacyCreateTools,updateOnGraphicClick:!1,cancelUpdateOnClickAway:!1,defaultUpdateOptions:this.sketchUpdateOptions,view:u});return this._sketchLayer=m,this._sketchViewModel=w,u?.map.add(m),await(u?.whenLayerView(m)),this.addHandles([i(()=>{u?.destroyed||u?.map.remove(m),m.destroyed||m.destroy(),this._sketchViewModel=s(w)}),a(()=>this.sketchUpdateOptions,e=>{w.defaultUpdateOptions=e,g(w,e)},r)],b.sketchViewModel),await h(t,"2d"===u?.type?u.scale:null),this.addHandles([await c(m,u,l,t)]),{enter:async()=>{this.hasHandles(b.sketchGraphics)||await this._updatingHandles.addPromise(this._configureSketchViewModel())},exit:()=>this.removeHandles([b.sketchGraphics]),viewModel:w}}_onFullFeatureLoaded(e){super._onFullFeatureLoaded(e);const t=this._sketchGraphicClone=_(e),{edits:i,layerView:s}=this.data;i.updateGeometry(e.geometry),i.trackChanges(),v(s)&&(this._layerViewEditSession=s.createInteractiveEditSession(t))}static async create(e){const t=new S({data:await u.create(e),onCommit:this._onCommitFactory(e.applyEdits,e.applyAttachmentEdits)});return t._set("steps",this._createWorkflowSteps(t)),t}get test(){}};e([o()],U.prototype,"curveResizeDisabled",null),e([o()],U.prototype,"curveUpdatesDisabled",null),e([o()],U.prototype,"sketchUpdateOptions",null),e([o()],U.prototype,"supportsSplitFeatureWorkflow",null),e([o()],U.prototype,"_layerViewEditSession",void 0),e([o()],U.prototype,"_sketchGraphicClone",void 0),e([o()],U.prototype,"_sketchLayer",void 0),e([o()],U.prototype,"_sketchViewModel",void 0),U=S=e([l("esri.widgets.Editor.UpdateFeatureWorkflow")],U);export{U as UpdateFeatureWorkflow,b as handleKeys};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import
|
|
2
|
+
import{__decorate as e}from"tslib";import t from"../../core/Collection.js";import r from"../../core/Error.js";import o from"../../core/Logger.js";import{destroyMaybe as i}from"../../core/maybe.js";import{whenOnce as s}from"../../core/reactiveUtils.js";import{property as a,subclass as n}from"../../core/accessorSupport/decorators.js";import{isSceneLayer as l,isTable as d}from"../../layers/support/layerUtils.js";import u from"../BatchAttributeForm/BatchAttributeFormViewModel.js";import p from"./UpdateFeaturesWorkflowData.js";import c from"./Workflow.js";import{handleFormValuesChangeEvent as h,whenEditorLayerView as f,findEditorItemForLayer as m}from"./workflowUtils.js";import{MultipleSourceLayersError as g}from"./support/errors.js";import{SketchController as y}from"./support/SketchController.js";var w;const F=()=>o.getLogger("esri.widgets.Editor.UpdateFeaturesWorkflow"),v=Symbol();let b=w=class extends c{constructor(e){super(e),this.type="update-features",this._formViewModel=null,this._sketchController=null}async initialize(){this._initializeFormViewModel();try{await this._updatingHandles.addPromise((async()=>{const{fullFeatures:e}=await this.data.when();this._formViewModel.features=new t(e),this._initializeVisuals(e)})())}catch(e){this.cancel({force:!0,error:new r("update-features-workflow:initialize","Failed to initialize the workflow data.",e)})}}destroy(){this._sketchController=i(this._sketchController),this._formViewModel.destroy()}get curveUpdatesDisabled(){return this.data.curveUpdatesDisabled}get features(){return this.data.features}get featureInfos(){return this.data.featureInfos}get formViewModel(){return this._formViewModel}get hasInvalidFormTemplate(){return this.data.editorItems.some(e=>e.hasInvalidFormTemplate)}get hasPendingEdits(){const{data:e}=this;return e.fullFeatures.some(t=>!!e.getPendingEditsForFeature(t)?.modified)}get parent(){return this.data.parent}get saveActionLabel(){return"update"}get selectedFeature(){return this.data.selectedFeature}get sketchUpdateOptions(){const{data:e}=this,t=e.fullFeatures,r=_(e),o=e.getEditorItemForLayer(r),i=!this.selectedFeature||t.length>1;return{multipleSelectionEnabled:!1,reshapeOptions:{enableCreateCurveFromStraightEdge:!l(r)&&!!o?.capabilities.supportsTrueCurve},tool:i?"move":void 0}}get sketchViewModel(){return this._sketchController?.viewModel}get supportsMergeFeaturesWorkflow(){const e=this.data,{fullFeatures:t,layers:r}=e;return!(1!==r.length||t.length<2)&&(!this.curveUpdatesDisabled&&!!e.getEditorItemForLayer(r[0])?.supportsMergeFeaturesWorkflow)}getUpdating(){return!!this._sketchController?.updating}get viewGraphics(){return this._sketchController?.sketchGraphics??this.data.fullFeatures}static create(e){const{applyEdits:t,applyEditsFeatureService:r,...o}=e,{features:i,featureInfos:s,viewModel:a}=o,n=new Set;function l(e){const t=m(a.editorItems,e);t&&n.add(t)}s?.length?s.forEach(({layer:e})=>l(e)):i?.length&&(F().warn("editor:update-features-workflow-data-features","UpdateFeaturesWorkflow: 'features' is deprecrated, use 'featureInfos'"),i.forEach(e=>l(e.sourceLayer??e.layer)));const d=Array.from(n),u=new w({data:new p({...o,editorItems:d}),onCommit:E(e.applyEdits)});return u._set("steps",M()),u}async deleteAndCommit(){return this.data.stageDelete(),this.commit()}async enter(){}exit(e){}async reset(){}async save(){const{formViewModel:e}=this;await e.submit(),e.valid&&await super.save()}async start(){await super.start(),await s(()=>!this.updating);const e=this._sketchController;if(e)return e;const{data:t}=this,{view:r}=t.viewModel,o=_(t);return!r||d(o)?{enter:async()=>{},exit:()=>{}}:{enter:()=>this._initializeHighlights(t.fullFeatures,o,r),exit:()=>this.removeHandles(v)}}_initializeFormViewModel(){const{data:e}=this,t=e.viewModel.view,r=e.getEditorItemForLayer(_(e)),o=r?.layerInfo?[r.layerInfo]:null,i=new u({editType:"UPDATE",map:t?.map,readOnly:!1===r?.capabilities.update.attributes,spatialReference:t?.spatialReference,timeZone:e.timeZone,layerInfos:o});this._formViewModel=i,this.addHandles(i.on("values-change",h({forEachFeature:(t,r)=>{const o=e.getPendingEditsForFeature(t);if(o){for(const{fieldName:e,value:t}of r)o.setAttribute(e,t);this._sketchController?.notifyAttributesChanged(t,r)}}})));const s=t=>{e.getPendingEditsForFeature(t.feature)?.setAttachmentEdits(t.attachmentEdits)};this.addHandles(i.on("attachments-change",s))}async _initializeHighlights(e,t,r){const o=await f(r,t);this.addHandles(o.highlight(e),v)}_initializeSketchController(e,t,r){const{data:o}=this,i=new y({defaultUpdateOptions:this.sketchUpdateOptions,sourceLayer:t,view:r,features:e,useLegacyCreateTools:o.viewModel.useLegacyCreateTools,onGeometriesUpdated:e=>{const t=[];for(const{feature:r,geometry:i}of e)o.getPendingEditsForFeature(r)?.updateGeometry(i),t.push(r);this._formViewModel.notifyGeometriesChanged(t)},onVisualVariableAttributesUpdated:()=>{F().warnOnce("editor:batch-update-visual-variables","UpdateFeaturesWorkflow does not currently support modifying visual variables through the scale and rotate tools.")}});this._sketchController=i}_initializeVisuals(e){const{data:t}=this,{view:r}=t.viewModel;if(!r)return;const o=_(t);if(d(o))return;const i=t.getEditorItemForLayer(o);i?.capabilities.update.geometry&&!this.curveUpdatesDisabled&&this._initializeSketchController(e,o,r)}};e([a()],b.prototype,"curveUpdatesDisabled",null),e([a()],b.prototype,"features",null),e([a()],b.prototype,"featureInfos",null),e([a()],b.prototype,"formViewModel",null),e([a()],b.prototype,"hasInvalidFormTemplate",null),e([a()],b.prototype,"hasPendingEdits",null),e([a()],b.prototype,"parent",null),e([a()],b.prototype,"saveActionLabel",null),e([a()],b.prototype,"selectedFeature",null),e([a()],b.prototype,"sketchUpdateOptions",null),e([a()],b.prototype,"sketchViewModel",null),e([a()],b.prototype,"supportsMergeFeaturesWorkflow",null),e([a()],b.prototype,"type",void 0),e([a()],b.prototype,"viewGraphics",null),e([a()],b.prototype,"_formViewModel",void 0),e([a()],b.prototype,"_sketchController",void 0),b=w=e([n("esri.widgets.Editor.UpdateFeaturesWorkflow")],b);const k=b;function M(){return[{id:"editing-features",async setUp(){},async tearDown(){}}]}function E(e){return async t=>{const r=_(t),o=[],i=[];for(const e of t.fullFeatures){const r=t.getPendingEditsForFeature(e),s=r?.stagedForDelete;if(!r?.modified&&!s)continue;const a=e.clone();if(!r?.attributesModified||s){const t=e.sourceLayer;if(!t){F().warn("Feature has no sourceLayer. It will not be included in any applyEdits payload.");continue}const r=t.objectIdField;if(a.attributes={[r]:e.getAttribute(r)},"scene"===t.type&&null!=t.infoFor3D){const r=t.associatedLayer?.globalIdField;null!=r&&a.setAttribute(r,e.getAttribute(r))}}r?.geometryModified&&!s||(a.geometry=null),s?i.push(a):(r?.attributesModified||r?.geometryModified)&&o.push(a)}if(0===o.length&&0===i.length)return void F().warn("No edits to apply. Workflow will finish without sending an applyEdits request.");const s={};o.length&&(s.updateFeatures=o),i.length&&(s.deleteFeatures=i),await e(r,s)}}function _(e){if(e.layers.length>1)throw new g;return e.layers[0]}export{k as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as
|
|
2
|
+
import{__decorate as t}from"tslib";import e from"../../core/Collection.js";import i from"../../core/Error.js";import{makeHandle as a,abortHandle as r}from"../../core/handleUtils.js";import o from"../../core/Logger.js";import{isAborted as s}from"../../core/promiseUtils.js";import{watch as l}from"../../core/reactiveUtils.js";import{property as n,subclass as d}from"../../core/accessorSupport/decorators.js";import h from"../../views/draw/support/HighlightHelper.js";import{temporaryHighlightName as c}from"../../views/support/HighlightDefaults.js";import m from"../BatchAttributeForm/BatchAttributeFormViewModel.js";import u from"./UpdateRecordWorkflowData.js";import p from"./Workflow.js";import{fetchFullFeatures as f,handleFormValuesChangeEvent as g}from"./workflowUtils.js";import{toAttachmentEdit as w,toEditAttachmentsPayload as y}from"./support/attachmentUtils.js";var b;const v={exit:Symbol()};let A=class extends p{static{b=this}constructor(t){super(t),this._highlightHelper=null,this.fullFeature=null,this.type="update-table-record"}initialize(){const{data:t}=this,{edits:e}=t,{view:l}=t.viewModel,n=e.feature;l&&(this._highlightHelper=new h({view:l,highlightName:c}),this.addHandles(a(()=>this._highlightHelper?.removeAll())));const d=new AbortController;this.addHandles(r(d)),this._updatingHandles.consumePromise(f([n],n.sourceLayer,t.viewModel.view.spatialReference,d.signal).then(([t])=>{s(d)||(this._onFullFeatureLoaded(t),this._initializeFormViewModel())},t=>(o.getLogger(this).error("initialize()","Failed to fetch full feature for update workflow.",t),this.cancel({force:!0,error:new i("editor:failed-to-fetch-full-feature","Failed to retrieve all information for this feature. The update cannot proceed.",{detail:{error:t}})}))))}get allowSave(){return!this.data.readOnly&&this.hasPendingEdits&&!this.updating}get editorItem(){return this.data.editorItem}get formViewModel(){return this._formViewModel}get hasInvalidFormTemplate(){return this.data.editorItem.hasInvalidFormTemplate}get hasPendingEdits(){return this.data.edits.modified&&!this.data.readOnly}get layer(){return this.data.editorItem.layer}get parent(){return this.data.parent}get saveActionLabel(){return"update"}get shouldShowAttachments(){return this.editorItem.capabilities.attachments.enabled}get shouldAllowAttachmentEditing(){return this.editorItem.capabilities.update.attachments.enabled}get reliesOnOwnerAdminPrivileges(){const t=this.editorItem.capabilities;return t.update.reliesOnOwnerAdminPrivileges||t.delete.reliesOnOwnerAdminPrivileges}async enter(){this._configureAttachmentsViewModel()}exit(t){this.removeHandles(v.exit)}async start(){return await super.start(),null}_configureAttachmentsViewModel(){const{data:t,fullFeature:e}=this,{attachmentsCapabilities:i,viewModel:r}=t,{attachmentsViewModel:o}=r,s=t.readOnly?{editing:!1}:i;o.set({capabilities:s,graphic:e,filesEnabled:!1,mode:"view"}),this.addHandles([a(()=>o.fileInfos.removeAll()),l(()=>o.mode,t=>{switch(t){case"add":this.go("adding-attachment");break;case"edit":this.go("editing-attachment")}})],v.exit)}_initializeFormViewModel(){const{association:t,edits:i,viewModel:{view:a},readOnly:r,editorItem:o}=this.data,{fullFeature:s}=this,n=o.layerInfo?[o.layerInfo]:null,d=this._formViewModel=new m({activeFeatureIndex:0,attachmentsEnabled:!0,editType:"UPDATE",features:new e([s]),highlightHelper:this._highlightHelper,layerInfos:n,map:a?.map,readOnly:r,spatialReference:a.spatialReference,timeZone:a?.timeZone,callbacks:this.data.formCallbacks});t&&d.setActiveAssociation(t);const{initialFeature:h}=i;h&&d.overrideOriginalFeature(s,h),this.addHandles([d.on("values-change",g({filter:t=>t===s,forEachFeature:()=>{i.updateAttributes(d.getValues(s)),s.attributes=i.feature.attributes}})),d.on("attachments-change",t=>i.setAttachmentEdits(t.attachmentEdits)),l(()=>a?.timeZone,t=>d.timeZone=t)])}_onFullFeatureLoaded(t){this.fullFeature=t;const{edits:e}=this.data;e.updateAttributes(t.attributes),e.trackChanges()}static async create(t){const e=new b({data:await u.create(t),onCommit:this._onCommitFactory(t.applyEdits,t.applyAttachmentEdits)});return e._set("steps",this._createWorkflowSteps(e)),e}static _createWorkflowSteps(t){const{attachmentsViewModel:e}=t.data.viewModel;return[{id:"editing-attributes",async setUp(){},async tearDown(){}},{id:"adding-attachment",async setUp(){},async tearDown(){e.mode="view"}},{id:"editing-attachment",async setUp(){},async tearDown(){e.mode="view"}}]}static{this._onCommitFactory=(t,e)=>async i=>{const{edits:a,editorItem:r}=i,{feature:o}=a;if(!o)return;const s=o.sourceLayer,l=o.clone();if(!a.attributesModified||a.stagedForDelete){const t=s.objectIdField;if(l.attributes={[t]:o.getAttribute(t)},"scene"===s.type&&null!=s.infoFor3D){const t=s.associatedLayer?.globalIdField;null!=t&&l.setAttribute(t,o.getAttribute(t))}}const n=r.supportsGlobalIds&&"globalIdField"in s;if(n){const t=s.globalIdField;null!=t&&l.setAttribute(t,o.getAttribute(t))}a.geometryModified&&!a.stagedForDelete||(l.geometry=null);const d=a.stagedForDelete?"deleteFeatures":"updateFeatures",h=[],c=[],m=[],u={[d]:[l]};let p;a.attachmentsModified&&(a.attachmentEdits.forEach(t=>{t.adds.forEach(t=>h.push(w(t))),t.updates.forEach(t=>c.push(w(t))),t.deletes.forEach(t=>m.push(t.globalId))}),n&&(p={globalIdUsed:!0},h.length&&(u.addAttachments=h),c.length&&(u.updateAttachments=c),m.length&&(u.deleteAttachments=m)));await t(s,u,p)&&a.attachmentsModified&&!n&&await e(s,y(o,a.attachmentEdits))}}get test(){return{formViewModel:this._formViewModel}}};t([n()],A.prototype,"_formViewModel",void 0),t([n()],A.prototype,"allowSave",null),t([n()],A.prototype,"editorItem",null),t([n()],A.prototype,"formViewModel",null),t([n()],A.prototype,"fullFeature",void 0),t([n()],A.prototype,"hasInvalidFormTemplate",null),t([n()],A.prototype,"hasPendingEdits",null),t([n()],A.prototype,"layer",null),t([n()],A.prototype,"parent",null),t([n()],A.prototype,"saveActionLabel",null),t([n()],A.prototype,"shouldShowAttachments",null),t([n()],A.prototype,"shouldAllowAttachmentEditing",null),t([n()],A.prototype,"reliesOnOwnerAdminPrivileges",null),A=b=t([d("esri.widgets.Editor.UpdateRecordWorkflow")],A);export{A as UpdateRecordWorkflow,v as handleKeys};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import t from"../../Graphic.js";import{remove as i}from"../../core/arrayUtils.js";import o from"../../core/Error.js";import{makeHandle as a}from"../../core/handleUtils.js";import r from"../../core/Logger.js";import{abortMaybe as s}from"../../core/maybe.js";import{onAbort as n,createAbortError as l,throwIfAborted as d,debounce as c}from"../../core/promiseUtils.js";import p from"../../core/Queue.js";import{whenOnce as u,watch as w,sync as h,on as f,when as g}from"../../core/reactiveUtils.js";import{last as v}from"../../core/SetUtils.js";import{property as k,subclass as m}from"../../core/accessorSupport/decorators.js";import{getGraphicLayer as y}from"../../graphic/graphicOriginUtils.js";import{isEditableLayer as W}from"../../layers/support/editableLayers.js";import{isSubtypeSublayer as A,isSubtypeGroupLayer as _,isTable as b}from"../../layers/support/layerUtils.js";import{findUtilityNetwork as S,isGraphicForRelatableFeatureSupportedLayer as M}from"../../popup/support/featureUtils.js";import{createFeatureServices as C}from"../../rest/featureService/utils.js";import F from"../../views/draw/support/HighlightHelper.js";import{ViewEventPriorities as U}from"../../views/input/InputManager.js";import{temporaryHighlightName as R}from"../../views/support/HighlightDefaults.js";import{isAssociationsLayerUnion as E}from"../BatchAttributeForm/batchAttributeFormUtils.js";import I from"./CreateFeaturesWorkflow.js";import j from"./MergeFeaturesWorkflow.js";import P from"./SplitFeatureWorkflow.js";import V from"./UpdateFeaturesWorkflow.js";import{UpdateFeatureWorkflow as N}from"./UpdateFeatureWorkflow.js";import{UpdateRecordWorkflow as O}from"./UpdateRecordWorkflow.js";import T from"./UpdateWorkflowData.js";import x from"./Workflow.js";import{findEditorItemForLayer as D,isSplitFeatureWorkflow as L,workflowInfluencesOutcomeOfParent as H,isAnyUpdateLeafWorkflow as z,isUpdateRecordWorkflow as B,isParentWorkflow as G,findEditorItemForLayerOrThrow as q,createWorkflowSteps as Q,fetchCandidates as $,isUpdateFeaturesWorkflowOptions as J,toFeatureInfos as K,isMergeWorkflowOptions as X,isSplitWorkflowOptions as Y}from"./workflowUtils.js";import{assertFeaturesAreFromSameLayer as Z}from"./support/errors.js";var ee;let te=ee=class extends x{constructor(e){super(e),this._workflowStack=new p(v),this._sketchStack=new p(v),this.data=void 0,this.type="update"}destroy(){this._drainWorkflowStack(e=>e.cancel({force:!0}))}get formViewModel(){return this.activeWorkflow?.formViewModel}get activeUtilityNetworkAssociationAddAssociationViewModel(){return"add-association"===this.activeWorkflow?.type?this.activeWorkflow.utilityNetworkAssociationAddAssociationViewModel:null}get activeSketchViewModel(){return this._sketchStack.peek()?.viewModel}get canDeleteAssociation(){const{formViewModel:e}=this;return!!(this.activeWorkflow&&this.data.viewModel.view?.map&&e)&&!(!e.activeAssociation||!E(e.activeFeature?.sourceLayer))}get activeWorkflow(){return this._workflowStack.last()}getUpdating(){return this._updatingHandles.updating||!!this.activeWorkflow?.updating}get hasPreviousStep(){return this._stepIndex>0||this.nestedWorkflowCount>1||this.activeWorkflow?.hasPreviousStep||"view"!==this.data.viewModel.attachmentsViewModel.mode||!!this.activeWorkflow?.formViewModel?.canGoBack}get hasUpdatableCandidates(){const{candidates:e,viewModel:t}=this.data;return e.some(({layer:e})=>D(t.editorItems,e)?.supportsUpdateWorkflow)}get nestedWorkflowCount(){return this._workflowStack.length}get shouldShowAttachments(){return this.activeWorkflow?.shouldShowAttachments??!1}get shouldAllowAttachmentEditing(){return this.activeWorkflow?.shouldAllowAttachmentEditing??!1}get hasPendingEdits(){return Array.from(this._workflowStack).some(e=>e.hasPendingEdits)}get helpMessage(){return this.activeWorkflow?.helpMessage?this.activeWorkflow.helpMessage:"awaiting-feature-to-update"===this.stepId?"select":void 0}get noticeMessage(){return this.activeWorkflow?.noticeMessage}get reliesOnOwnerAdminPrivileges(){return this.activeWorkflow?.reliesOnOwnerAdminPrivileges??!1}get hasInvalidFormTemplate(){return this.activeWorkflow?.hasInvalidFormTemplate??!1}get curveResizeDisabled(){return this.activeWorkflow?.curveResizeDisabled??!1}get curveUpdatesDisabled(){return this.activeWorkflow?.curveUpdatesDisabled??!1}async back(e=()=>Promise.resolve(!0)){const{activeWorkflow:t}=this,i=t?.formViewModel;if("add-association"===t?.type){const{activeUtilityNetworkAssociationAddAssociationViewModel:e}=this;if(e?.filterOptionsVisible)return void(e.filterOptionsVisible=!1);if(e?.featureSpatialItems.length)return void e.reset()}if(i?.canGoBack)await i.goBack();else if("create-features"===t?.type&&t.hasPreviousStep)await t.previous({cancelCurrentStep:!0});else{if(L(t)&&t.hasPreviousStep)return await t.back();if(t){if(t.hasPendingEdits){if(!await e())return}t.hasPreviousStep?await t.previous({cancelCurrentStep:!0}):await this.cancelActiveWorkflow({force:!0})}else this.hasPreviousStep?await this.previous({cancelCurrentStep:!0}):await this.cancel({force:!0})}}async cancelActiveWorkflow(e){await(this.activeWorkflow?.cancel(e)),await this._popWorkflowAndReconcile()}async commit(){await this._drainWorkflowStack(e=>e.commit()),await super.commit()}static create(e){const{startAt:t,applyEdits:i,applyEditsFeatureService:o,...a}=e,r=new ee({data:new T({applyEditsCallback:i,applyEditsFeatureServiceCallback:o,...a}),onCommit:async()=>{}});return r._set("steps",this._createWorkflowSteps(r,t)),r}async save(e){const{formViewModel:t}=this;if(t&&(await t.submit(),!t.valid))return;if(this.nestedWorkflowCount<2)return await this.commit();const{activeWorkflow:i}=this;if(await(i?.commit(e)),!H(i))return void await this._popWorkflowAndReconcile();this._popWorkflow();const o=this._workflowStack.peek();if(o&&o===i?.parent&&(await o.cancel(),this._popWorkflow(),0===this.nestedWorkflowCount))return await this.commit();await this._reconcileWorkflowStack()}async startCreatingRelatedRecord(e){const t=this._makeUpdatingResolver();try{const t=this._createNestedCreateFeaturesWorkflow(e);await this._pushWorkflowAndReconcile(t)}catch(i){throw new o("editor:unable-to-start-creating","Could not begin updating the provided feature or table record.",{error:i})}finally{t.resolve()}}async startMergingFeatures(e,t){const i=this._makeUpdatingResolver();try{const i=await this._createNestedMergeFeaturesWorkflow(e,t);await this._pushWorkflowAndReconcile(i)}catch(a){throw new o("editor:unable-to-start-merging","Could not begin merging the provided features.",{error:a})}finally{i.resolve()}}async startSplittingFeature(e,t){const i=this._makeUpdatingResolver();try{const i=await this._createNestedSplitFeatureWorkflow(e,t);await this._pushWorkflowAndReconcile(i)}catch(a){throw new o("editor:unable-to-start-splitting","Could not begin splitting the provided feature.",{error:a})}finally{i.resolve()}}async startUpdatingSingle(e,t){const i=this._makeUpdatingResolver();try{const i=await this._createNestedUpdateWorkflow(e,t);await this._pushWorkflowAndReconcile(i)}catch(a){throw new o("editor:unable-to-start-updating","Could not begin updating the provided feature or table record.",{error:a})}finally{i.resolve()}}async startUpdatingMultiple(e,t){const i=this._makeUpdatingResolver();try{const i=await this._createNestedUpdateFeaturesWorkflow(e,t);await this._pushWorkflowAndReconcile(i)}catch(a){throw new o("editor:unable-to-start-updating","Could not begin updating the provided features or table records.",{error:a})}finally{i.resolve()}}async startAddAssociation(e){const t=this._makeUpdatingResolver();try{const t=await this._createNestedAddAssociationWorkflow(e);await this._pushWorkflowAndReconcile(t)}catch(i){throw new o("editor:unable-to-start-updating","Could not begin updating the provided feature or table record.",{error:i})}finally{t.resolve()}}async deleteActiveFeatures(){const{activeWorkflow:e}=this;if(!e)throw new o("editor:nothing-to-delete","There is no feature to delete");const t=z(e);if(t){e.data.stageDelete();const t=B(e)?e.data.edits.feature?[e.data.edits.feature]:[]:e.data.features;this._removeFeaturesFromCandidates(t)}else await e.cancel();this.nestedWorkflowCount<2?t?await this.commit():await this.cancel({force:!0}):(t&&await e.commit(),await this._popWorkflowAndReconcile(),await this._returnToPageWithContent())}async deleteActiveAssociation(){if(!this.canDeleteAssociation)throw new o("editor:nothing-to-delete","There is no association to delete");await this._deleteActiveAssociation(),await this._popWorkflowAndReconcile(),await this._returnToPageWithContent()}async cancelAll(){await this._drainWorkflowStack(e=>e.cancel({force:!0}))}async _deleteActiveAssociation(){const{formViewModel:e}=this;if(!e)throw new o("editing:failed-to-delete-association","The active workflow does not support editing associations");const{activeAssociation:t,activeFeature:i}=e,{applyEditsFeatureServiceCallback:a,viewModel:r}=this.data,{sourceLayer:s}=i,n=A(s)&&s.parent?s.parent:s,l=C([n]),d=l.values().next().value?.featureService;if(!d)throw new o("editor:failed-to-delete-association","Could not retrieve feature service needed to delete association");await(d?.load());const c=r.view.map,p=S(c,n);await(p?.networkSystemLayers.loadAssociationsTable());const u=p?.generateDeleteAssociations([t]);if(!u)throw new o("editor:failed-to-delete-association","Could not create payload needed to delete association");const w=p?.gdbVersion??void 0;await a(d,[u],{gdbVersion:w,globalIdUsed:!0})}_removeFeaturesFromCandidates(e){const{candidates:t}=this.data;if(0!==t.length&&0!==e.length)for(const o of e)i(t,o)}async _returnToPageWithContent(){const{formViewModel:e}=this;if(!e?.activeAssociationsInput)return;const{activeAssociationsInput:t}=e;await t.refresh(),t.associatedLayer&&!t.associatedFeatures?.length&&e.setActiveAssociationsLayer(null),t.associatedFeatureInfos.size||e.setActiveAssociationsInput(null)}_createNestedCreateFeaturesWorkflow(e){const{relatedLayer:t}=e,{addAttachmentsCallback:i,applyEditsCallback:a,applyEditsFeatureServiceCallback:r,sketchOptions:s,snappingManager:n,viewModel:l}=this.data;if(!W(t))throw new o("editor:unsupported-layer","Editing is not supported on the provided layer");const d=this._getCreationInfoForNestedCreateFeaturesWorkflow(e),c=d.template||d.initialFeature?"creating-features":"awaiting-feature-creation-info",p=G(this.activeWorkflow)?this.activeWorkflow:void 0;return I.create({addAttachmentsCallback:i,applyEdits:a,applyEditsFeatureService:r,creationInfo:d,isNested:!0,parent:p,sketchOptions:s,snappingManager:n,startAt:c,viewModel:l})}_getCreationInfoForNestedCreateFeaturesWorkflow(e){const{relatedLayer:i}=e;if(!W(i)||_(i))throw new o("editor:unsupported-layer","Editing is not supported on the provided layer");const{viewModel:a}=this.data,r={layer:i,maxFeatures:1},s=this._makeRelatedRecordAttributes(e),n=a.getTemplatesForLayer(i);return n?.length>0?(r.attributeOverrides=s,1===n.length&&(r.template=n[0])):r.initialFeature=new t({sourceLayer:i,attributes:s}),r}async _createNestedUpdateWorkflow(e,t={}){const i=b(e.sourceLayer)?O:N,{applyEditsCallback:o,applyEditsFeatureServiceCallback:a,sketchOptions:r,snappingManager:s,viewModel:n}=this.data,l=G(this.activeWorkflow)?this.activeWorkflow:void 0,d=await i.create({feature:e,parent:l,sketchOptions:r,snappingManager:s,viewModel:n,applyEdits:o,applyEditsFeatureService:a,formCallbacks:{addRelatedRecord:e=>{this.startCreatingRelatedRecord(e)},editRelatedRecord:({relatedFeature:e,readOnly:t})=>{this.startUpdatingSingle(e,{readOnly:t})},editAssociatedFeature:async({feature:e,association:t})=>await this.startUpdatingSingle(e,{association:t}),addAssociation:e=>{this.startAddAssociation(e)}},...t});return await u(()=>!d.updating),d}async _createNestedUpdateFeaturesWorkflow(e,t={}){const{applyEditsCallback:i,applyEditsFeatureServiceCallback:o,viewModel:a}=this.data,r=V.create({applyEdits:i,applyEditsFeatureService:o,featureInfos:e,viewModel:a,...t});return await u(()=>!r.updating),r}async _createNestedAddAssociationWorkflow(e){const{feature:t,associationType:i,utilityNetwork:a}=e,{AddAssociationWorkflow:r}=await import("./AddAssociationWorkflow.js"),{applyEditsCallback:s,applyEditsFeatureServiceCallback:n,viewModel:l}=this.data,d=G(this.activeWorkflow)?this.activeWorkflow:void 0,{formViewModel:c}=this,p=c?.activeAssociationsInput;if(!p)throw new o("editing:unable-to-add-association","There is no active association input in the current workflow's form.");const w=await r.create({utilityNetwork:a,associationType:i,feature:t,parent:d,viewModel:l,associationsInput:p,applyEdits:s,applyEditsFeatureService:n});return await u(()=>!w.updating),w}async _createNestedMergeFeaturesWorkflow(e,t){const{applyEditsCallback:i,applyEditsFeatureServiceCallback:o,viewModel:a}=this.data;Z(e);const r=q(this.data.viewModel.editorItems,y(e[0])),s=G(this.activeWorkflow)?this.activeWorkflow:void 0,n=await j.create({applyEdits:i,applyEditsFeatureService:o,editorItem:r,features:e,parent:s,viewModel:a,...t});return await u(()=>!n.updating),n}async _createNestedSplitFeatureWorkflow(e,t){const{applyEditsCallback:i,applyEditsFeatureServiceCallback:o,sketchOptions:a,snappingManager:r,viewModel:s}=this.data,n=G(this.activeWorkflow)?this.activeWorkflow:void 0,l=q(s.editorItems,e.sourceLayer),d=P.create({applyEdits:i,applyEditsFeatureService:o,editorItem:l,feature:e,parent:n,sketchOptions:a,snappingManager:r,viewModel:s,...t});return await u(()=>!d.updating),d}async _drainWorkflowStack(e){const t=this._workflowStack,i=[];for(const o of t){const t=e(o).finally(()=>o.destroy());this._updatingHandles.consumePromise(t),i.push(t)}await Promise.all(i),this._workflowStack.clear(),this._sketchStack.clear()}_makeUpdatingResolver(){const e=Promise.withResolvers();return this._updatingHandles.consumePromise(e.promise),e}_makeRelatedRecordAttributes(e){const{parentFeature:t,relatedLayer:i,relationshipId:o}=e;if(!M(t))return;const a=i.relationships?.find(e=>e.id===o);if(!a)return void this._logContinuingWithoutRelationshipWarning("relationship-not-found","Could not begin creating a related record because the relationship specified could not be found on the destination layer.");if("origin"===a.role)return void this._logContinuingWithoutRelationshipWarning("unsupported-role","Creating new related records in the 'origin' table of a relationship is not yet supported");const r=t.sourceLayer;a.relatedTableId!==r.layerId&&this._logContinuingWithoutRelationshipWarning("invalid-argument-combination","The given parent feature does not belong to the relationship designated by the given relationship ID.");const s=r.relationships?.find(e=>e.id===o);if(!s)return void this._logContinuingWithoutRelationshipWarning("relationship-not-found","Could not begin creating a related record because the relationship specified could not be found on the origin layer.");const n=ie(r,s),l=t.getAttribute(n);l||this._logContinuingWithoutRelationshipWarning("no-key-on-origin-feature","The given parent feature does not have a value for the relationship's origin primary key field.");const d=ie(i,a);return{[d]:l}}_popWorkflow(){this._workflowStack.pop()?.destroy(),this._sketchStack.pop()}async _popWorkflowAndReconcile(){this._popWorkflow();const e=await this._reconcileWorkflowStack();if(e.failureCount>0)throw new o("editor:next-workflow-failed","Popped the top workflow, but the next workflow in the stack failed to activate",e)}async _pushWorkflowAndReconcile(e){const t=this._workflowRequiresSketchViewModel(e);this.activeWorkflow?.exit({removeSketchHandles:t});const i=this._sketchStack,a=await(e?.start()),r=i.peek();a?(r?.exit(),i.push(a)):i.push(this._cloneSketchController(r)),this._workflowStack.push(e);const s=await this._reconcileWorkflowStack();if(s.failureCount>0)throw new o("editor:failed-to-start-updating-feature","Failed to enter the provided workflow.",s)}async _reconcileWorkflowStack(){const e=this._workflowStack,t=this._sketchStack;try{const i=e.peek();return await(i?.enter()),await(t.peek()?.enter()),{activeWorkflow:i,failureCount:0}}catch(i){e.pop().destroy(),t.pop();const{activeWorkflow:o,failureCount:a}=await this._reconcileWorkflowStack();return{activeWorkflow:o,failureCount:a+1}}}_cloneSketchController(e){return{enter:e?.enter??(async()=>{}),exit:e?.exit??(async()=>{}),viewModel:e?.viewModel}}_workflowRequiresSketchViewModel(e){const{type:t}=e;return"update-feature"===t||"create-features"===t&&!b(e.data.creationInfo?.layer)}static _createWorkflowSteps(e,t="awaiting-feature-to-update"){const{data:i}=e;return Q(["awaiting-feature-to-update","awaiting-update-feature-candidate","editing-existing-feature","adding-attachment","editing-attachment"],t,{"awaiting-feature-to-update":()=>({id:"awaiting-feature-to-update",async setUp(){const{spinnerViewModel:t}=i.viewModel,o=i.viewModel.view;o.activeTool=null;let r=null;e.addHandles(a(()=>{r=s(r)}),this.id),i.rootFeatures.removeAll(),i.candidates=[];const c=o.on("immediate-click",async a=>{const s=Promise.withResolvers();e._updatingHandles.consumePromise(s.promise);try{t.location=a.mapPoint,t.visible=!0,r?.abort();const{editorItems:s}=i.viewModel;r=new AbortController;const c=await a.defer(()=>new Promise((e,t)=>{n(r?.signal,()=>t(l())),e($(s,o,a,r?.signal))}));if(d(r),i.candidates=c.filter(e=>"fulfilled"===e.status).flatMap(e=>e.value).filter(e=>!e.isAggregate),t.visible=1===i.candidates.length,0===i.candidates.length)return;if(a.stopPropagation(),1===i.candidates.length){const{rootFeatures:o}=i;o.removeAll(),o.add(i.candidates[0]),e.go("editing-existing-feature").catch(()=>{}).then(()=>t.visible=!1)}else e.next()}finally{s.resolve()}},U.TOOL),p=g(()=>null!=o.activeTool,()=>e.cancel({force:!0}),{once:!0});o.focus(),e.addHandles([c,p],this.id)},async tearDown(){0===i.candidates.length&&(i.viewModel.spinnerViewModel.visible=!1),e.removeHandles(this.id)}}),"awaiting-update-feature-candidate":()=>({id:"awaiting-update-feature-candidate",async setUp(){i.rootFeatures.removeAll();const{view:t}=i.viewModel;if(!t)return;const o=new F({view:t,highlightName:R});e.addHandles([f(()=>i.rootFeatures,"change",({added:e,removed:t})=>{t.forEach(e=>o.remove(e)),e.forEach(e=>o.add(e))},h),a(()=>o.removeAll())],this.id)},async tearDown(){e.removeHandles(this.id)}}),"editing-existing-feature":()=>({id:"editing-existing-feature",async setUp(){await oe(e);const{data:t}=e;t.viewModel.spinnerViewModel.visible=!1;const i=c(async()=>{await u(()=>!e.updating),e.previous()});e.addHandles([w(()=>e.nestedWorkflowCount,(e,t)=>{0===e&&0!==t&&i()},h)],this.id)},async tearDown(){await e.cancelAll(),e.removeHandles(this.id)}}),"adding-attachment":()=>({id:"adding-attachment",parent:"editing-existing-feature",async setUp(){},async tearDown(){i.viewModel.attachmentsViewModel.mode="view"}}),"editing-attachment":()=>({id:"editing-attachment",parent:"editing-existing-feature",async setUp(){},async tearDown(){i.viewModel.attachmentsViewModel.mode="view"}})})}_logContinuingWithoutRelationshipWarning(e,t){r.getLogger(this).warn(`editor:${e}`,t,"The create operation will be allowed to proceed, but the resulting feature may not be related to the given parent feature.")}};function ie(e,{keyField:t}){return e.getField(t)?.name??t}async function oe(e){const{data:t}=e,{rootWorkflowOptions:i}=t;if(J(i)){const{rootFeatureInfos:a}=t,r=a.length>0?a:K(t.rootFeatures.toArray());if(0===r.length)throw new o("editing:invalid-parameter","Must supply `rootFeatureInfos` or `rootFeatures` when root workflow type is 'update-multiple'");return await e.startUpdatingMultiple(r,i.props)}const{rootFeatures:a}=t,r=a.getItemAt(0);if(!r)throw new o("editor:no-feature-specified","Cannot setup the 'updating-existing-feature' step until one or more root features are provided");X(i)?await e.startMergingFeatures(a.toArray(),i.props):Y(i)?await e.startSplittingFeature(r,i.props):await e.startUpdatingSingle(r)}e([k()],te.prototype,"formViewModel",null),e([k()],te.prototype,"activeUtilityNetworkAssociationAddAssociationViewModel",null),e([k()],te.prototype,"activeSketchViewModel",null),e([k()],te.prototype,"canDeleteAssociation",null),e([k()],te.prototype,"activeWorkflow",null),e([k()],te.prototype,"data",void 0),e([k()],te.prototype,"hasPreviousStep",null),e([k()],te.prototype,"hasUpdatableCandidates",null),e([k()],te.prototype,"nestedWorkflowCount",null),e([k()],te.prototype,"shouldShowAttachments",null),e([k()],te.prototype,"shouldAllowAttachmentEditing",null),e([k()],te.prototype,"hasPendingEdits",null),e([k()],te.prototype,"helpMessage",null),e([k()],te.prototype,"noticeMessage",null),e([k()],te.prototype,"reliesOnOwnerAdminPrivileges",null),e([k()],te.prototype,"hasInvalidFormTemplate",null),e([k()],te.prototype,"curveResizeDisabled",null),e([k()],te.prototype,"curveUpdatesDisabled",null),te=ee=e([m("esri.widgets.Editor.UpdateWorkflow")],te);const ae=te;export{ae as default};
|
|
2
|
+
import{__decorate as e}from"tslib";import t from"../../Graphic.js";import{remove as i}from"../../core/arrayUtils.js";import a from"../../core/Error.js";import{makeHandle as o}from"../../core/handleUtils.js";import r from"../../core/Logger.js";import{abortMaybe as s}from"../../core/maybe.js";import{onAbort as n,createAbortError as l,throwIfAborted as c,debounce as d}from"../../core/promiseUtils.js";import p from"../../core/Queue.js";import{whenOnce as u,watch as w,sync as h,on as f,when as g}from"../../core/reactiveUtils.js";import{last as v}from"../../core/SetUtils.js";import{property as k,subclass as m}from"../../core/accessorSupport/decorators.js";import{getGraphicLayer as y}from"../../graphic/graphicOriginUtils.js";import{isEditableLayer as W}from"../../layers/support/editableLayers.js";import{isSubtypeSublayer as A,isSubtypeGroupLayer as _,isTable as b}from"../../layers/support/layerUtils.js";import{findUtilityNetwork as S,isGraphicForRelatableFeatureSupportedLayer as M}from"../../popup/support/featureUtils.js";import{createFeatureServices as C}from"../../rest/featureService/utils.js";import F from"../../views/draw/support/HighlightHelper.js";import{ViewEventPriorities as U}from"../../views/input/InputManager.js";import{temporaryHighlightName as E}from"../../views/support/HighlightDefaults.js";import{isAssociationsLayerUnion as R}from"../BatchAttributeForm/batchAttributeFormUtils.js";import I from"./CreateFeaturesWorkflow.js";import j from"./MergeFeaturesWorkflow.js";import P from"./SplitFeatureWorkflow.js";import V from"./UpdateFeaturesWorkflow.js";import{UpdateFeatureWorkflow as N}from"./UpdateFeatureWorkflow.js";import{UpdateRecordWorkflow as O}from"./UpdateRecordWorkflow.js";import T from"./UpdateWorkflowData.js";import x from"./Workflow.js";import{findEditorItemForLayer as D,isSplitFeatureWorkflow as L,workflowInfluencesOutcomeOfParent as H,isAnyUpdateLeafWorkflow as z,isUpdateRecordWorkflow as B,isParentWorkflow as G,findEditorItemForLayerOrThrow as q,createWorkflowSteps as Q,fetchCandidates as $,isUpdateFeaturesWorkflowOptions as J,toFeatureInfos as K,isMergeWorkflowOptions as X,isSplitWorkflowOptions as Y}from"./workflowUtils.js";import{assertFeaturesAreFromSameLayer as Z}from"./support/errors.js";var ee;let te=ee=class extends x{constructor(e){super(e),this._workflowStack=new p(v),this._sketchStack=new p(v),this.data=void 0,this.type="update"}destroy(){this._drainWorkflowStack(e=>e.cancel({force:!0}))}get formViewModel(){return this.activeWorkflow?.formViewModel}get activeUtilityNetworkAssociationAddAssociationViewModel(){return"add-association"===this.activeWorkflow?.type?this.activeWorkflow.utilityNetworkAssociationAddAssociationViewModel:null}get activeSketchViewModel(){return this._sketchStack.peek()?.viewModel}get canDeleteAssociation(){const{formViewModel:e}=this;return!!(this.activeWorkflow&&this.data.viewModel.view?.map&&e)&&!(!e.activeAssociation||!R(e.activeFeature?.sourceLayer))}get activeWorkflow(){return this._workflowStack.last()}getUpdating(){return this._updatingHandles.updating||!!this.activeWorkflow?.updating}get hasPreviousStep(){return this._stepIndex>0||this.nestedWorkflowCount>1||this.activeWorkflow?.hasPreviousStep||"view"!==this.data.viewModel.attachmentsViewModel.mode||!!this.activeWorkflow?.formViewModel?.canGoBack}get hasUpdatableCandidates(){const{candidates:e,viewModel:t}=this.data;return e.some(({layer:e})=>D(t.editorItems,e)?.supportsUpdateWorkflow)}get nestedWorkflowCount(){return this._workflowStack.length}get shouldShowAttachments(){return this.activeWorkflow?.shouldShowAttachments??!1}get shouldAllowAttachmentEditing(){return this.activeWorkflow?.shouldAllowAttachmentEditing??!1}get hasPendingEdits(){return Array.from(this._workflowStack).some(e=>e.hasPendingEdits)}get helpMessage(){return this.activeWorkflow?.helpMessage?this.activeWorkflow.helpMessage:"awaiting-feature-to-update"===this.stepId?"select":void 0}get noticeMessage(){return this.activeWorkflow?.noticeMessage}get reliesOnOwnerAdminPrivileges(){return this.activeWorkflow?.reliesOnOwnerAdminPrivileges??!1}get hasInvalidFormTemplate(){return this.activeWorkflow?.hasInvalidFormTemplate??!1}get curveResizeDisabled(){return this.activeWorkflow?.curveResizeDisabled??!1}get curveUpdatesDisabled(){return this.activeWorkflow?.curveUpdatesDisabled??!1}async back(e=()=>Promise.resolve(!0)){const{activeWorkflow:t}=this,i=t?.formViewModel;if("add-association"===t?.type){const{activeUtilityNetworkAssociationAddAssociationViewModel:e}=this;if(e?.filterOptionsVisible)return void(e.filterOptionsVisible=!1);if(e?.featureSpatialItems.length)return void e.reset()}if(i?.canGoBack)await i.goBack();else if("create-features"===t?.type&&t.hasPreviousStep)await t.previous({cancelCurrentStep:!0});else{if(L(t)&&t.hasPreviousStep)return await t.back();if(t){if(t.hasPendingEdits){if(!await e())return}t.hasPreviousStep?await t.previous({cancelCurrentStep:!0}):await this.cancelActiveWorkflow({force:!0})}else this.hasPreviousStep?await this.previous({cancelCurrentStep:!0}):await this.cancel({force:!0})}}async cancelActiveWorkflow(e){await(this.activeWorkflow?.cancel(e)),await this._popWorkflowAndReconcile()}async commit(){await this._drainWorkflowStack(e=>e.commit()),await super.commit()}static create(e){const{startAt:t,applyEdits:i,applyEditsFeatureService:a,applyAttachmentEdits:o,...r}=e,s=new ee({data:new T({applyEditsCallback:i,applyEditsFeatureServiceCallback:a,applyAttachmentEditsCallback:o,...r}),onCommit:async()=>{}});return s._set("steps",this._createWorkflowSteps(s,t)),s}async save(e){const{formViewModel:t}=this;if(t&&(await t.submit(),!t.valid))return;if(this.nestedWorkflowCount<2)return await this.commit();const{activeWorkflow:i}=this;if(await(i?.commit(e)),!H(i))return void await this._popWorkflowAndReconcile();this._popWorkflow();const a=this._workflowStack.peek();if(a&&a===i?.parent&&(await a.cancel(),this._popWorkflow(),0===this.nestedWorkflowCount))return await this.commit();await this._reconcileWorkflowStack()}async startCreatingRelatedRecord(e){const t=this._makeUpdatingResolver();try{const t=this._createNestedCreateFeaturesWorkflow(e);await this._pushWorkflowAndReconcile(t)}catch(i){throw new a("editor:unable-to-start-creating","Could not begin updating the provided feature or table record.",{error:i})}finally{t.resolve()}}async startMergingFeatures(e,t){const i=this._makeUpdatingResolver();try{const i=await this._createNestedMergeFeaturesWorkflow(e,t);await this._pushWorkflowAndReconcile(i)}catch(o){throw new a("editor:unable-to-start-merging","Could not begin merging the provided features.",{error:o})}finally{i.resolve()}}async startSplittingFeature(e,t){const i=this._makeUpdatingResolver();try{const i=await this._createNestedSplitFeatureWorkflow(e,t);await this._pushWorkflowAndReconcile(i)}catch(o){throw new a("editor:unable-to-start-splitting","Could not begin splitting the provided feature.",{error:o})}finally{i.resolve()}}async startUpdatingSingle(e,t){const i=this._makeUpdatingResolver();try{const i=await this._createNestedUpdateWorkflow(e,t);await this._pushWorkflowAndReconcile(i)}catch(o){throw new a("editor:unable-to-start-updating","Could not begin updating the provided feature or table record.",{error:o})}finally{i.resolve()}}async startUpdatingMultiple(e,t){const i=this._makeUpdatingResolver();try{const i=await this._createNestedUpdateFeaturesWorkflow(e,t);await this._pushWorkflowAndReconcile(i)}catch(o){throw new a("editor:unable-to-start-updating","Could not begin updating the provided features or table records.",{error:o})}finally{i.resolve()}}async startAddAssociation(e){const t=this._makeUpdatingResolver();try{const t=await this._createNestedAddAssociationWorkflow(e);await this._pushWorkflowAndReconcile(t)}catch(i){throw new a("editor:unable-to-start-updating","Could not begin updating the provided feature or table record.",{error:i})}finally{t.resolve()}}async deleteActiveFeatures(){const{activeWorkflow:e}=this;if(!e)throw new a("editor:nothing-to-delete","There is no feature to delete");const t=z(e);if(t){e.data.stageDelete();const t=B(e)?e.data.edits.feature?[e.data.edits.feature]:[]:e.data.features;this._removeFeaturesFromCandidates(t)}else await e.cancel();this.nestedWorkflowCount<2?t?await this.commit():await this.cancel({force:!0}):(t&&await e.commit(),await this._popWorkflowAndReconcile(),await this._returnToPageWithContent())}async deleteActiveAssociation(){if(!this.canDeleteAssociation)throw new a("editor:nothing-to-delete","There is no association to delete");await this._deleteActiveAssociation(),await this._popWorkflowAndReconcile(),await this._returnToPageWithContent()}async cancelAll(){await this._drainWorkflowStack(e=>e.cancel({force:!0}))}async _deleteActiveAssociation(){const{formViewModel:e}=this;if(!e)throw new a("editing:failed-to-delete-association","The active workflow does not support editing associations");const{activeAssociation:t,activeFeature:i}=e,{applyEditsFeatureServiceCallback:o,viewModel:r}=this.data,{sourceLayer:s}=i,n=A(s)&&s.parent?s.parent:s,l=C([n]),c=l.values().next().value?.featureService;if(!c)throw new a("editor:failed-to-delete-association","Could not retrieve feature service needed to delete association");await(c?.load());const d=r.view.map,p=S(d,n);await(p?.networkSystemLayers.loadAssociationsTable());const u=p?.generateDeleteAssociations([t]);if(!u)throw new a("editor:failed-to-delete-association","Could not create payload needed to delete association");const w=p?.gdbVersion??void 0;await o(c,[u],{gdbVersion:w,globalIdUsed:!0})}_removeFeaturesFromCandidates(e){const{candidates:t}=this.data;if(0!==t.length&&0!==e.length)for(const a of e)i(t,a)}async _returnToPageWithContent(){const{formViewModel:e}=this;if(!e?.activeAssociationsInput)return;const{activeAssociationsInput:t}=e;await t.refresh(),t.associatedLayer&&!t.associatedFeatures?.length&&e.setActiveAssociationsLayer(null),t.associatedFeatureInfos.size||e.setActiveAssociationsInput(null)}_createNestedCreateFeaturesWorkflow(e){const{relatedLayer:t}=e,{addAttachmentsCallback:i,applyEditsCallback:o,applyEditsFeatureServiceCallback:r,sketchOptions:s,snappingManager:n,viewModel:l}=this.data;if(!W(t))throw new a("editor:unsupported-layer","Editing is not supported on the provided layer");const c=this._getCreationInfoForNestedCreateFeaturesWorkflow(e),d=c.template||c.initialFeature?"creating-features":"awaiting-feature-creation-info",p=G(this.activeWorkflow)?this.activeWorkflow:void 0;return I.create({addAttachmentsCallback:i,applyEdits:o,applyEditsFeatureService:r,creationInfo:c,isNested:!0,parent:p,sketchOptions:s,snappingManager:n,startAt:d,viewModel:l})}_getCreationInfoForNestedCreateFeaturesWorkflow(e){const{relatedLayer:i}=e;if(!W(i)||_(i))throw new a("editor:unsupported-layer","Editing is not supported on the provided layer");const{viewModel:o}=this.data,r={layer:i,maxFeatures:1},s=this._makeRelatedRecordAttributes(e),n=o.getTemplatesForLayer(i);return n?.length>0?(r.attributeOverrides=s,1===n.length&&(r.template=n[0])):r.initialFeature=new t({sourceLayer:i,attributes:s}),r}async _createNestedUpdateWorkflow(e,t={}){const i=b(e.sourceLayer)?O:N,{applyEditsCallback:a,applyEditsFeatureServiceCallback:o,applyAttachmentEditsCallback:r,sketchOptions:s,snappingManager:n,viewModel:l}=this.data,c=G(this.activeWorkflow)?this.activeWorkflow:void 0,d=await i.create({feature:e,parent:c,sketchOptions:s,snappingManager:n,viewModel:l,applyEdits:a,applyEditsFeatureService:o,applyAttachmentEdits:r,formCallbacks:{addRelatedRecord:e=>{this.startCreatingRelatedRecord(e)},editRelatedRecord:({relatedFeature:e,readOnly:t})=>{this.startUpdatingSingle(e,{readOnly:t})},editAssociatedFeature:async({feature:e,association:t})=>await this.startUpdatingSingle(e,{association:t}),addAssociation:e=>{this.startAddAssociation(e)}},...t});return await u(()=>!d.updating),d}async _createNestedUpdateFeaturesWorkflow(e,t={}){const{applyEditsCallback:i,applyEditsFeatureServiceCallback:a,viewModel:o}=this.data,r=V.create({applyEdits:i,applyEditsFeatureService:a,featureInfos:e,viewModel:o,...t});return await u(()=>!r.updating),r}async _createNestedAddAssociationWorkflow(e){const{feature:t,associationType:i,utilityNetwork:o}=e,{AddAssociationWorkflow:r}=await import("./AddAssociationWorkflow.js"),{applyEditsCallback:s,applyEditsFeatureServiceCallback:n,viewModel:l}=this.data,c=G(this.activeWorkflow)?this.activeWorkflow:void 0,{formViewModel:d}=this,p=d?.activeAssociationsInput;if(!p)throw new a("editing:unable-to-add-association","There is no active association input in the current workflow's form.");const w=await r.create({utilityNetwork:o,associationType:i,feature:t,parent:c,viewModel:l,associationsInput:p,applyEdits:s,applyEditsFeatureService:n});return await u(()=>!w.updating),w}async _createNestedMergeFeaturesWorkflow(e,t){const{applyEditsCallback:i,applyEditsFeatureServiceCallback:a,viewModel:o}=this.data;Z(e);const r=q(this.data.viewModel.editorItems,y(e[0])),s=G(this.activeWorkflow)?this.activeWorkflow:void 0,n=await j.create({applyEdits:i,applyEditsFeatureService:a,editorItem:r,features:e,parent:s,viewModel:o,...t});return await u(()=>!n.updating),n}async _createNestedSplitFeatureWorkflow(e,t){const{applyEditsCallback:i,applyEditsFeatureServiceCallback:a,sketchOptions:o,snappingManager:r,viewModel:s}=this.data,n=G(this.activeWorkflow)?this.activeWorkflow:void 0,l=q(s.editorItems,e.sourceLayer),c=P.create({applyEdits:i,applyEditsFeatureService:a,editorItem:l,feature:e,parent:n,sketchOptions:o,snappingManager:r,viewModel:s,...t});return await u(()=>!c.updating),c}async _drainWorkflowStack(e){const t=this._workflowStack,i=[];for(const a of t){const t=e(a).finally(()=>a.destroy());this._updatingHandles.consumePromise(t),i.push(t)}await Promise.all(i),this._workflowStack.clear(),this._sketchStack.clear()}_makeUpdatingResolver(){const e=Promise.withResolvers();return this._updatingHandles.consumePromise(e.promise),e}_makeRelatedRecordAttributes(e){const{parentFeature:t,relatedLayer:i,relationshipId:a}=e;if(!M(t))return;const o=i.relationships?.find(e=>e.id===a);if(!o)return void this._logContinuingWithoutRelationshipWarning("relationship-not-found","Could not begin creating a related record because the relationship specified could not be found on the destination layer.");if("origin"===o.role)return void this._logContinuingWithoutRelationshipWarning("unsupported-role","Creating new related records in the 'origin' table of a relationship is not yet supported");const r=t.sourceLayer;o.relatedTableId!==r.layerId&&this._logContinuingWithoutRelationshipWarning("invalid-argument-combination","The given parent feature does not belong to the relationship designated by the given relationship ID.");const s=r.relationships?.find(e=>e.id===a);if(!s)return void this._logContinuingWithoutRelationshipWarning("relationship-not-found","Could not begin creating a related record because the relationship specified could not be found on the origin layer.");const n=ie(r,s),l=t.getAttribute(n);l||this._logContinuingWithoutRelationshipWarning("no-key-on-origin-feature","The given parent feature does not have a value for the relationship's origin primary key field.");const c=ie(i,o);return{[c]:l}}_popWorkflow(){this._workflowStack.pop()?.destroy(),this._sketchStack.pop()}async _popWorkflowAndReconcile(){this._popWorkflow();const e=await this._reconcileWorkflowStack();if(e.failureCount>0)throw new a("editor:next-workflow-failed","Popped the top workflow, but the next workflow in the stack failed to activate",e)}async _pushWorkflowAndReconcile(e){const t=this._workflowRequiresSketchViewModel(e);this.activeWorkflow?.exit({removeSketchHandles:t});const i=this._sketchStack,o=await(e?.start()),r=i.peek();o?(r?.exit(),i.push(o)):i.push(this._cloneSketchController(r)),this._workflowStack.push(e);const s=await this._reconcileWorkflowStack();if(s.failureCount>0)throw new a("editor:failed-to-start-updating-feature","Failed to enter the provided workflow.",s)}async _reconcileWorkflowStack(){const e=this._workflowStack,t=this._sketchStack;try{const i=e.peek();return await(i?.enter()),await(t.peek()?.enter()),{activeWorkflow:i,failureCount:0}}catch(i){e.pop().destroy(),t.pop();const{activeWorkflow:a,failureCount:o}=await this._reconcileWorkflowStack();return{activeWorkflow:a,failureCount:o+1}}}_cloneSketchController(e){return{enter:e?.enter??(async()=>{}),exit:e?.exit??(async()=>{}),viewModel:e?.viewModel}}_workflowRequiresSketchViewModel(e){const{type:t}=e;return"update-feature"===t||"create-features"===t&&!b(e.data.creationInfo?.layer)}static _createWorkflowSteps(e,t="awaiting-feature-to-update"){const{data:i}=e;return Q(["awaiting-feature-to-update","awaiting-update-feature-candidate","editing-existing-feature","adding-attachment","editing-attachment"],t,{"awaiting-feature-to-update":()=>({id:"awaiting-feature-to-update",async setUp(){const{spinnerViewModel:t}=i.viewModel,a=i.viewModel.view;a.activeTool=null;let r=null;e.addHandles(o(()=>{r=s(r)}),this.id),i.rootFeatures.removeAll(),i.candidates=[];const d=a.on("immediate-click",async o=>{const s=Promise.withResolvers();e._updatingHandles.consumePromise(s.promise);try{t.location=o.mapPoint,t.visible=!0,r?.abort();const{editorItems:s}=i.viewModel;r=new AbortController;const d=await o.defer(()=>new Promise((e,t)=>{n(r?.signal,()=>t(l())),e($(s,a,o,r?.signal))}));if(c(r),i.candidates=d.filter(e=>"fulfilled"===e.status).flatMap(e=>e.value).filter(e=>!e.isAggregate),t.visible=1===i.candidates.length,0===i.candidates.length)return;if(o.stopPropagation(),1===i.candidates.length){const{rootFeatures:a}=i;a.removeAll(),a.add(i.candidates[0]),e.go("editing-existing-feature").catch(()=>{}).then(()=>t.visible=!1)}else e.next()}finally{s.resolve()}},U.TOOL),p=g(()=>null!=a.activeTool,()=>e.cancel({force:!0}),{once:!0});a.focus(),e.addHandles([d,p],this.id)},async tearDown(){0===i.candidates.length&&(i.viewModel.spinnerViewModel.visible=!1),e.removeHandles(this.id)}}),"awaiting-update-feature-candidate":()=>({id:"awaiting-update-feature-candidate",async setUp(){i.rootFeatures.removeAll();const{view:t}=i.viewModel;if(!t)return;const a=new F({view:t,highlightName:E});e.addHandles([f(()=>i.rootFeatures,"change",({added:e,removed:t})=>{t.forEach(e=>a.remove(e)),e.forEach(e=>a.add(e))},h),o(()=>a.removeAll())],this.id)},async tearDown(){e.removeHandles(this.id)}}),"editing-existing-feature":()=>({id:"editing-existing-feature",async setUp(){await ae(e);const{data:t}=e;t.viewModel.spinnerViewModel.visible=!1;const i=d(async()=>{await u(()=>!e.updating),e.previous()});e.addHandles([w(()=>e.nestedWorkflowCount,(e,t)=>{0===e&&0!==t&&i()},h)],this.id)},async tearDown(){await e.cancelAll(),e.removeHandles(this.id)}}),"adding-attachment":()=>({id:"adding-attachment",parent:"editing-existing-feature",async setUp(){},async tearDown(){i.viewModel.attachmentsViewModel.mode="view"}}),"editing-attachment":()=>({id:"editing-attachment",parent:"editing-existing-feature",async setUp(){},async tearDown(){i.viewModel.attachmentsViewModel.mode="view"}})})}_logContinuingWithoutRelationshipWarning(e,t){r.getLogger(this).warn(`editor:${e}`,t,"The create operation will be allowed to proceed, but the resulting feature may not be related to the given parent feature.")}};function ie(e,{keyField:t}){return e.getField(t)?.name??t}async function ae(e){const{data:t}=e,{rootWorkflowOptions:i}=t;if(J(i)){const{rootFeatureInfos:o}=t,r=o.length>0?o:K(t.rootFeatures.toArray());if(0===r.length)throw new a("editing:invalid-parameter","Must supply `rootFeatureInfos` or `rootFeatures` when root workflow type is 'update-multiple'");return await e.startUpdatingMultiple(r,i.props)}const{rootFeatures:o}=t,r=o.getItemAt(0);if(!r)throw new a("editor:no-feature-specified","Cannot setup the 'updating-existing-feature' step until one or more root features are provided");X(i)?await e.startMergingFeatures(o.toArray(),i.props):Y(i)?await e.startSplittingFeature(r,i.props):await e.startUpdatingSingle(r)}e([k()],te.prototype,"formViewModel",null),e([k()],te.prototype,"activeUtilityNetworkAssociationAddAssociationViewModel",null),e([k()],te.prototype,"activeSketchViewModel",null),e([k()],te.prototype,"canDeleteAssociation",null),e([k()],te.prototype,"activeWorkflow",null),e([k()],te.prototype,"data",void 0),e([k()],te.prototype,"hasPreviousStep",null),e([k()],te.prototype,"hasUpdatableCandidates",null),e([k()],te.prototype,"nestedWorkflowCount",null),e([k()],te.prototype,"shouldShowAttachments",null),e([k()],te.prototype,"shouldAllowAttachmentEditing",null),e([k()],te.prototype,"hasPendingEdits",null),e([k()],te.prototype,"helpMessage",null),e([k()],te.prototype,"noticeMessage",null),e([k()],te.prototype,"reliesOnOwnerAdminPrivileges",null),e([k()],te.prototype,"hasInvalidFormTemplate",null),e([k()],te.prototype,"curveResizeDisabled",null),e([k()],te.prototype,"curveUpdatesDisabled",null),te=ee=e([m("esri.widgets.Editor.UpdateWorkflow")],te);const oe=te;export{oe as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as t}from"tslib";import o from"../../core/Accessor.js";import e from"../../core/Collection.js";import{property as
|
|
2
|
+
import{__decorate as t}from"tslib";import o from"../../core/Accessor.js";import e from"../../core/Collection.js";import{property as s,subclass as r}from"../../core/accessorSupport/decorators.js";import i from"../../views/interactive/sketch/SketchOptions.js";let p=class extends o{constructor(t){super(t),this.addAttachmentsCallback=null,this.applyEditsCallback=null,this.applyEditsFeatureServiceCallback=null,this.applyAttachmentEditsCallback=null,this.candidates=[],this.rootFeatures=new e,this.rootFeatureInfos=[],this.rootWorkflowOptions={type:"update-single"},this.sketchOptions=new i,this.snappingManager=null,this.viewModel=null}};t([s()],p.prototype,"addAttachmentsCallback",void 0),t([s()],p.prototype,"applyEditsCallback",void 0),t([s()],p.prototype,"applyEditsFeatureServiceCallback",void 0),t([s()],p.prototype,"applyAttachmentEditsCallback",void 0),t([s()],p.prototype,"candidates",void 0),t([s()],p.prototype,"rootFeatures",void 0),t([s()],p.prototype,"rootFeatureInfos",void 0),t([s()],p.prototype,"rootWorkflowOptions",void 0),t([s({constructOnly:!0})],p.prototype,"sketchOptions",void 0),t([s()],p.prototype,"snappingManager",void 0),t([s()],p.prototype,"viewModel",void 0),p=t([r("esri.widgets.Editor.UpdateWorkflowData")],p);const a=p;export{a as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
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,isUpdateFeatureWorkflow as s,isUpdateFeaturesWorkflow as a}from"../workflowUtils.js";import{loadFooterActionsComponents as l,FooterActions as r}from"./FooterActions.js";import c from"./MergeFeaturesList.js";import{loadNoticesComponents as u,Notices as p}from"./Notices.js";import{loadPanelContentComponents as m,PanelContentSection as d,PanelContentSectionGroup as f,PanelContent as g}from"./PanelContent.js";import k from"./PendingFeatureList.js";import{loadCalciteComponents as
|
|
2
|
+
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,isUpdateFeatureWorkflow as s,isUpdateFeaturesWorkflow as a}from"../workflowUtils.js";import{loadFooterActionsComponents as l,FooterActions as r}from"./FooterActions.js";import c from"./MergeFeaturesList.js";import{loadNoticesComponents as u,Notices as p}from"./Notices.js";import{loadPanelContentComponents as m,PanelContentSection as d,PanelContentSectionGroup as f,PanelContent as g}from"./PanelContent.js";import k from"./PendingFeatureList.js";import{loadCalciteComponents as b}from"../../support/componentsUtils.js";import{tsx as w,tsxFragment as v}from"../../support/widget.js";import{classes as h}from"../../support/widgetUtils.js";const y=()=>Promise.all([b({"action-bar":()=>import("@esri/calcite-components/dist/components/calcite-action-bar"),action:()=>import("@esri/calcite-components/dist/components/calcite-action")}),l(),u(),m()]);function F(e){const{editorViewModel:s,formWidget:a,headingLevel:l,messages:u,renderSketchToolbar:m}=e,{activeFeatureCount:b,activeLeafWorkflow:h,activeWorkflow:y,formViewModel:F}=s;if(!h||!y||!F)return null;const j=o(h)&&!h.data.selectedPendingFeature||i(h)&&!h.activeFeature,L=n(h),A=F.activeForm.inputs,S=o(h)&&A.every(e=>!e.visible),B=null!=s.formViewModel?.activeAssociationsInput,T=!j&&!S&&!B,V=S||o(h)&&!T&&!B,z=S?w(d,null,w(k,{headingLevel:l,key:"pending-feature-list",workflow:h})):w(v,null,w(p,{activeFeatureCount:b,messages:u,workflow:y}),L?w(d,{class:t.mergeFeaturesListSection,key:"panel-section-merge"},w(c,{headingLevel:l,key:"merge-features-list",workflow:h})):void 0,w(d,{key:"panel-content-section-main"},w(f,null,j?w(k,{headingLevel:l,key:"pending-feature-list",workflow:h}):a.render())));return w(v,null,T?C(h,e):void 0,V?m?.():void 0,w(g,{key:"attribute-panel-content"},z),w(r,{buttons:M(e)}))}function C(e,o){const i=[],n="3d"===o.editorViewModel.view?.type,{visibleElements:l}=o,r="s";if(l.zoomToButton&&o.editorViewModel.canZoomTo&&i.push(w("calcite-action",{alignment:"center",icon:"zoom-to-object",key:"zoom-to-button",scale:r,text:o.messages.zoomTo,title:o.messages.zoomTo,onclick:()=>o.editorViewModel.zoomTo()})),l.splitButton&&s(e)&&e.supportsSplitFeatureWorkflow&&!n&&o.onSplit){const{onSplit:e,messages:t}=o;i.push(w("calcite-action",{icon:"split-geometry",key:"split-button",scale:r,text:t.split,title:t.split,onclick:e}))}if(l.mergeButton&&a(e)&&e.supportsMergeFeaturesWorkflow&&!n&&o.onMerge){const{onMerge:e,messages:t}=o;i.push(w("calcite-action",{icon:"merge",key:"merge-button",scale:r,text:t.mergeFeatures,title:t.mergeFeatures,onclick:e}))}return i.length>0?w("calcite-action-bar",{class:h(t.sketchContainer,t.updateActionBar),"data-testid":"update-feature-panel-action-bar",expandDisabled:!0,layout:"horizontal",scale:r},i):void 0}function M({editorViewModel:t,formWidget:o,messages:i,messagesCommon:n,onDelete:s,onDeleteAssociation:a,onSave:l}){const{activeFeatureCount:r,activeLeafWorkflow:c,syncing:u}=t;if(!c)return[];const{page:p}=t;if("viewing-associated-features"===p||"viewing-associated-layers"===p)return[{appearance:"outline",onClick:()=>{c.formViewModel?.goBack()},disabled:u,label:n.cancel,type:"button"}];const m=t.formViewModel,d=o.footerButtonInfos;if(m&&"default"!==m.page&&d.length)return d.map(({appearance:e,disabled:t,form:o,icon:i,kind:n,label:s,onclick:a})=>({appearance:e,disabled:t,form:o,icon:i,kind:n,label:s,onClick:a,type:"button"}));const f=[],g=r>1?i.multiFeature:i.singleFeature,k=!c.allowSave||u,b=e(g[c.saveActionLabel],{count:r});f.push({appearance:"solid",onClick:l,disabled:k,kind:"brand",label:b,type:"button"});const w={appearance:"outline",disabled:u,kind:"danger",label:e(g.delete,{count:r}),type:"button"};return t.shouldShowDeleteButton&&!t.formHasAssociation&&s&&f.push({...w,onClick:s}),t.formHasAssociation&&!t.shouldShowDeleteButton&&a&&f.push({...w,onClick:a,label:i.deleteAssociationTitle}),t.formHasAssociation&&t.shouldShowDeleteButton&&a&&s&&f.push({...w,primaryLabel:n.delete,primaryText:n.delete,onClick:s,dropdownItems:[{onClick:a,label:i.deleteAssociationTitle}],type:"split-button"}),f}export{F as UpdateFeaturePanelContent,y as loadUpdateFeaturePanelContentComponents};
|