@arcgis/core 4.34.0-next.12 → 4.34.0-next.14
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/Components/stringUtils.d.ts +6 -0
- package/applications/Components/stringUtils.js +5 -0
- package/arcade/Dictionary.js +1 -1
- package/arcade/Feature.js +1 -1
- package/arcade/arcadeAsyncRuntime.js +1 -1
- package/arcade/arcadeCompiler.js +1 -1
- package/arcade/arcadeRuntime.js +1 -1
- package/arcade/containerUtils.js +1 -1
- package/arcade/deepClone.js +1 -1
- package/arcade/featureSetUtils.js +1 -1
- package/arcade/featureset/actions/Adapted.js +1 -1
- package/arcade/featureset/sources/FeatureLayerDynamic.js +1 -1
- package/arcade/functions/convertdirection.js +1 -1
- package/arcade/functions/date.js +1 -1
- package/arcade/functions/feature.js +1 -1
- package/arcade/functions/featuresetbase.js +1 -1
- package/arcade/functions/featuresetgeom.js +1 -1
- package/arcade/functions/featuresetstats.js +1 -1
- package/arcade/functions/featuresetstring.js +1 -1
- package/arcade/functions/fieldStats.js +1 -1
- package/arcade/functions/geomasync.js +1 -1
- package/arcade/functions/geometry.js +1 -1
- package/arcade/functions/geomsync.js +1 -1
- package/arcade/functions/knowledgegraph.js +1 -1
- package/arcade/functions/maths.js +1 -1
- package/arcade/functions/stats.js +1 -1
- package/arcade/functions/string.js +1 -1
- package/arcade/geometry/constructors.js +1 -1
- package/arcade/geometry/functions.js +1 -1
- package/arcade/languageUtils.js +1 -1
- package/arcade.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/0229c573fa8a2fff2d8b.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/{9f964467f7353039dd9c.js → 0b21651eb93efe9ce089.js} +1 -1
- package/assets/esri/core/workers/chunks/{e0ae33206f519b159b49.js → 0eeb0dce918e4827309a.js} +1 -1
- package/assets/esri/core/workers/chunks/0ff6f15d46d7ddf6fe4d.js +1 -0
- package/assets/esri/core/workers/chunks/{e385a27fd1ac2123a05f.js → 178260e8a263f2f1584f.js} +1 -1
- package/assets/esri/core/workers/chunks/{28b1819bf744ce957dfd.js → 17fcdaeb42e932712096.js} +2 -2
- package/assets/esri/core/workers/chunks/{28b1819bf744ce957dfd.js.LICENSE.txt → 17fcdaeb42e932712096.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/{3ae2e9f469020f777d9f.js → 183a7dec68c8ba6eb3d6.js} +1 -1
- package/assets/esri/core/workers/chunks/{52c34d6ecd9d45a33e69.js → 275a724c18bd15591e3c.js} +1 -1
- package/assets/esri/core/workers/chunks/29fb64826bb1351aca8d.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/{0039dee1337160366112.js → 3145218abe59b5e99ff8.js} +1 -1
- package/assets/esri/core/workers/chunks/{dea3e131bbd48cc48e1a.js → 369978472cc9ee6a00b5.js} +1 -1
- package/assets/esri/core/workers/chunks/{539541dec5fcf3b657aa.js → 3f58da371633967a61ca.js} +1 -1
- package/assets/esri/core/workers/chunks/{d0372bac0c5f4fbed468.js → 3f59a73f9a758095976f.js} +1 -1
- package/assets/esri/core/workers/chunks/{f48eb59b94ba8b7d4d72.js → 4079e307a0fce4516aa4.js} +1 -1
- package/assets/esri/core/workers/chunks/{a2e9141ff4efd13413a1.js → 4a805e7a57d25c4b595f.js} +2 -2
- package/assets/esri/core/workers/chunks/53ff5b7691ba1444358e.js +1 -0
- package/assets/esri/core/workers/chunks/54f981fe0f8851767be9.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/{a6fb75929e456f87f804.js → 58b2dc0ec977af7413b0.js} +1 -1
- package/assets/esri/core/workers/chunks/{92a5dccb328229a9336b.js → 58f92100b1b2343111c6.js} +1 -1
- package/assets/esri/core/workers/chunks/5cc5f32b474ee723e192.js +1 -0
- package/assets/esri/core/workers/chunks/5dcc8fa321f0a7c49f36.js +1 -0
- package/assets/esri/core/workers/chunks/64f5f27e7c5649d79cbc.js +1 -0
- package/assets/esri/core/workers/chunks/64fc44f99486c7ffe6fa.js +1 -0
- package/assets/esri/core/workers/chunks/658e82c9b722852e02d0.js +1 -0
- package/assets/esri/core/workers/chunks/{6b0ae9ccdd1acef5b5b4.js → 679d7baea233faf3fdbc.js} +1 -1
- package/assets/esri/core/workers/chunks/73ddb356121add556994.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/8a87c181b85d0b86b9bb.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/8b93cd4132934b0d7d39.js +1 -0
- package/assets/esri/core/workers/chunks/97b69fec3e87f11210ba.js +1 -0
- package/assets/esri/core/workers/chunks/{fda48126f67e80034404.js → 998819aade3898f52414.js} +1 -1
- package/assets/esri/core/workers/chunks/9a87c367ee5ba44f3081.js +1 -0
- package/assets/esri/core/workers/chunks/{427318722815bef1496b.js → a08ce98672ab94d19613.js} +1 -1
- package/assets/esri/core/workers/chunks/{6d90887dc605261dd7b3.js → a250a5c6e055e33bd25c.js} +1 -1
- package/assets/esri/core/workers/chunks/aad9a693813b47a51530.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/b72137c63b7f2a525d9e.js +1 -0
- package/assets/esri/core/workers/chunks/b8c8acf75e09014d8346.js +1 -0
- package/assets/esri/core/workers/chunks/c2264451d12f1fbaad22.js +1 -0
- package/assets/esri/core/workers/chunks/c6c86cbe65a58c3093ae.js +1 -0
- package/assets/esri/core/workers/chunks/{562800b0af52a38a311b.js → cf25f487fe4eb1579aee.js} +1 -1
- package/assets/esri/core/workers/chunks/e717832326d1b1f817d3.js +1 -0
- package/assets/esri/core/workers/chunks/{bd2dcc55ac3418421ee5.js → f20ba89ac21f05b7020c.js} +1 -1
- package/assets/esri/core/workers/chunks/f3b51aa0a1a8fc3b231c.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/{a41f9b6deff08196566e.js → fa894be8cfb6ed485df9.js} +1 -1
- package/assets/esri/core/workers/chunks/fe3703ec198cbfebec30.js +1 -0
- package/assets/esri/themes/base/widgets/_BuildingPhasePicker.scss +7 -1
- package/assets/esri/themes/base/widgets/_TimeSlider.scss +1 -0
- 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/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/Directions/t9n/Directions_ar.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_bg.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_bs.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_ca.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_cs.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_da.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_de.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_el.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_es.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_et.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_fi.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_fr.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_he.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_hr.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_hu.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_id.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_it.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_ja.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_ko.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_lt.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_lv.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_nl.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_no.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_pl.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_pt-BR.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_pt-PT.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_ro.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_ru.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_sk.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_sl.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_sr.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_sv.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_th.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_tr.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_uk.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_vi.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_zh-CN.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_zh-HK.json +1 -1
- package/assets/esri/widgets/Directions/t9n/Directions_zh-TW.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_ar.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_bg.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_bs.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_ca.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_cs.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_da.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_de.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_el.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_es.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_et.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_fi.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_fr.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_he.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_hr.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_hu.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_id.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_it.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_ja.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_ko.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_lt.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_lv.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_nl.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_no.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_pl.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_pt-BR.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_pt-PT.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_ro.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_ru.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_sk.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_sl.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_sr.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_sv.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_th.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_tr.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_uk.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_vi.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_zh-CN.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_zh-HK.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_zh-TW.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_ar.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_bg.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_bs.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_ca.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_cs.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_da.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_de.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_el.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_es.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_et.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_fi.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_fr.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_he.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_hr.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_hu.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_id.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_it.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_ja.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_ko.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_lt.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_lv.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_nl.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_no.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_pl.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_pt-BR.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_pt-PT.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_ro.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_ru.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_sk.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_sl.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_sr.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_sv.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_th.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_tr.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_uk.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_vi.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_zh-CN.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_zh-HK.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_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/Search/t9n/Search_ar.json +1 -1
- package/assets/esri/widgets/Search/t9n/Search_bg.json +1 -1
- package/assets/esri/widgets/Search/t9n/Search_bs.json +1 -1
- package/assets/esri/widgets/Search/t9n/Search_ca.json +1 -1
- package/assets/esri/widgets/Search/t9n/Search_cs.json +1 -1
- package/assets/esri/widgets/Search/t9n/Search_da.json +1 -1
- package/assets/esri/widgets/Search/t9n/Search_de.json +1 -1
- package/assets/esri/widgets/Search/t9n/Search_el.json +1 -1
- package/assets/esri/widgets/Search/t9n/Search_es.json +1 -1
- package/assets/esri/widgets/Search/t9n/Search_et.json +1 -1
- package/assets/esri/widgets/Search/t9n/Search_fi.json +1 -1
- package/assets/esri/widgets/Search/t9n/Search_fr.json +1 -1
- package/assets/esri/widgets/Search/t9n/Search_he.json +1 -1
- package/assets/esri/widgets/Search/t9n/Search_hr.json +1 -1
- package/assets/esri/widgets/Search/t9n/Search_hu.json +1 -1
- package/assets/esri/widgets/Search/t9n/Search_id.json +1 -1
- package/assets/esri/widgets/Search/t9n/Search_it.json +1 -1
- package/assets/esri/widgets/Search/t9n/Search_ja.json +1 -1
- package/assets/esri/widgets/Search/t9n/Search_ko.json +1 -1
- package/assets/esri/widgets/Search/t9n/Search_lt.json +1 -1
- package/assets/esri/widgets/Search/t9n/Search_lv.json +1 -1
- package/assets/esri/widgets/Search/t9n/Search_nl.json +1 -1
- package/assets/esri/widgets/Search/t9n/Search_no.json +1 -1
- package/assets/esri/widgets/Search/t9n/Search_pl.json +1 -1
- package/assets/esri/widgets/Search/t9n/Search_pt-BR.json +1 -1
- package/assets/esri/widgets/Search/t9n/Search_pt-PT.json +1 -1
- package/assets/esri/widgets/Search/t9n/Search_ro.json +1 -1
- package/assets/esri/widgets/Search/t9n/Search_ru.json +1 -1
- package/assets/esri/widgets/Search/t9n/Search_sk.json +1 -1
- package/assets/esri/widgets/Search/t9n/Search_sl.json +1 -1
- package/assets/esri/widgets/Search/t9n/Search_sr.json +1 -1
- package/assets/esri/widgets/Search/t9n/Search_sv.json +1 -1
- package/assets/esri/widgets/Search/t9n/Search_th.json +1 -1
- package/assets/esri/widgets/Search/t9n/Search_tr.json +1 -1
- package/assets/esri/widgets/Search/t9n/Search_uk.json +1 -1
- package/assets/esri/widgets/Search/t9n/Search_vi.json +1 -1
- package/assets/esri/widgets/Search/t9n/Search_zh-CN.json +1 -1
- package/assets/esri/widgets/Search/t9n/Search_zh-HK.json +1 -1
- package/assets/esri/widgets/Search/t9n/Search_zh-TW.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_ar.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_bg.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_bs.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_ca.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_cs.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_da.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_de.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_el.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_es.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_et.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_fi.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_fr.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_he.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_hr.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_hu.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_id.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_it.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_ja.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_ko.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_lt.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_lv.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_nl.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_no.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_pl.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_pt-BR.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_pt-PT.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_ro.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_ru.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_sk.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_sl.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_sr.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_sv.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_th.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_tr.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_uk.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_vi.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_zh-CN.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_zh-HK.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_zh-TW.json +1 -1
- package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_ar.json +1 -1
- package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_bg.json +1 -1
- package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_bs.json +1 -1
- package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_ca.json +1 -1
- package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_cs.json +1 -1
- package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_da.json +1 -1
- package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_de.json +1 -1
- package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_el.json +1 -1
- package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_es.json +1 -1
- package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_et.json +1 -1
- package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_fi.json +1 -1
- package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_fr.json +1 -1
- package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_he.json +1 -1
- package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_hr.json +1 -1
- package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_hu.json +1 -1
- package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_id.json +1 -1
- package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_it.json +1 -1
- package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_ja.json +1 -1
- package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_ko.json +1 -1
- package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_lt.json +1 -1
- package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_lv.json +1 -1
- package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_nl.json +1 -1
- package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_no.json +1 -1
- package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_pl.json +1 -1
- package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_pt-BR.json +1 -1
- package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_pt-PT.json +1 -1
- package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_ro.json +1 -1
- package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_ru.json +1 -1
- package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_sk.json +1 -1
- package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_sl.json +1 -1
- package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_sr.json +1 -1
- package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_sv.json +1 -1
- package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_th.json +1 -1
- package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_tr.json +1 -1
- package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_uk.json +1 -1
- package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_vi.json +1 -1
- package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_zh-CN.json +1 -1
- package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_zh-HK.json +1 -1
- package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_zh-TW.json +1 -1
- package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_ar.json +1 -1
- package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_bg.json +1 -1
- package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_bs.json +1 -1
- package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_ca.json +1 -1
- package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_cs.json +1 -1
- package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_da.json +1 -1
- package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_de.json +1 -1
- package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_el.json +1 -1
- package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_es.json +1 -1
- package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_et.json +1 -1
- package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_fi.json +1 -1
- package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_fr.json +1 -1
- package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_he.json +1 -1
- package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_hr.json +1 -1
- package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_hu.json +1 -1
- package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_id.json +1 -1
- package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_it.json +1 -1
- package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_ja.json +1 -1
- package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_ko.json +1 -1
- package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_lt.json +1 -1
- package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_lv.json +1 -1
- package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_nl.json +1 -1
- package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_no.json +1 -1
- package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_pl.json +1 -1
- package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_pt-BR.json +1 -1
- package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_pt-PT.json +1 -1
- package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_ro.json +1 -1
- package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_ru.json +1 -1
- package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_sk.json +1 -1
- package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_sl.json +1 -1
- package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_sr.json +1 -1
- package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_sv.json +1 -1
- package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_th.json +1 -1
- package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_tr.json +1 -1
- package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_uk.json +1 -1
- package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_vi.json +1 -1
- package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_zh-CN.json +1 -1
- package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_zh-HK.json +1 -1
- package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_zh-TW.json +1 -1
- package/chunks/PointRenderer.glsl.js +2 -2
- package/chunks/aiServices.js +1 -1
- package/chunks/array.js +1 -1
- package/chunks/languageUtils.js +1 -1
- package/config.js +1 -1
- package/core/urlUtils.js +1 -1
- package/geometry/support/MeshTexture.js +1 -1
- package/geometry/support/coordsUtils.js +1 -1
- package/interfaces.d.ts +343 -99
- package/kernel.js +1 -1
- package/layers/CatalogLayer.js +1 -1
- package/layers/FeatureLayer.js +1 -1
- package/layers/VideoLayer.js +1 -1
- package/layers/graphics/sources/FeatureLayerSource.js +1 -1
- package/layers/knowledgeGraph/KnowledgeGraphSublayer.js +1 -1
- package/layers/mixins/ArcGISImageService.js +1 -1
- package/layers/mixins/FeatureLayerBase.js +1 -1
- package/layers/support/PlaybackInfo.d.ts +4 -0
- package/layers/support/arcgisLayers.js +1 -1
- package/layers/support/fetchService.js +1 -1
- package/layers/support/layerUtils.js +1 -1
- package/layers/support/rasterDatasets/FunctionRaster.js +1 -1
- package/networks/CircuitManager.js +1 -1
- package/networks/UnitIdentifierManager.js +1 -1
- package/package.json +2 -2
- package/portal/support/layersLoader.js +1 -1
- package/portal/support/loadUtils.js +1 -1
- package/portal/support/portalLayers.js +1 -1
- package/renderers/support/rendererConversion.js +1 -1
- package/rest/networks/circuits/alterCircuit.js +1 -1
- package/rest/networks/circuits/createCircuit.js +1 -1
- package/rest/networks/circuits/deleteCircuits.js +1 -1
- package/rest/networks/circuits/support/CircuitVerifyResult.js +1 -1
- package/rest/networks/circuits/support/EditCircuitsResult.js +5 -0
- package/rest/networks/circuits/support/ExportCircuitsResult.js +1 -1
- package/rest/networks/circuits/support/VerifyCircuitsResult.js +1 -1
- package/rest/networks/support/utils.js +5 -0
- package/rest/networks/unitIdentifiers/insertGap.js +1 -1
- package/rest/networks/unitIdentifiers/reset.js +1 -1
- package/rest/networks/unitIdentifiers/resize.js +1 -1
- package/rest/networks/unitIdentifiers/support/EditUnitIdentifiersResult.js +5 -0
- package/support/arcadeUtils.js +1 -1
- package/support/popupUtils.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/support/symbolConversion.js +1 -1
- package/views/2d/engine/flow/dataUtils.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/FeatureInstanceStore.js +1 -1
- package/views/2d/layers/FeatureLayerView2D.js +1 -1
- package/views/3d/FocusAreasView.js +1 -1
- package/views/3d/interactive/measurementTools/directLineMeasurement3D/DirectLineMeasurement3DTool.js +1 -1
- package/views/3d/layers/FeatureLikeLayerView3D.js +1 -1
- package/views/3d/layers/FlowSubView3D.js +1 -1
- package/views/3d/layers/GraphicsLayerView3D.js +1 -1
- package/views/3d/layers/I3SMeshViewLabeler.js +1 -1
- package/views/3d/layers/ImageryLayerView3D.js +1 -1
- package/views/3d/layers/ImageryTileLayerView3D.js +1 -1
- package/views/3d/layers/RouteLayerView3D.js +1 -1
- package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
- package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
- package/views/3d/layers/graphics/Graphics3DGraphicsPipeline.js +1 -1
- package/views/3d/layers/graphics/Graphics3DSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/GraphicsProcessor.js +1 -1
- package/views/3d/layers/graphics/Labeler.js +1 -1
- package/views/3d/state/controllers/PinchAndPanControllerGlobal.js +1 -1
- package/views/3d/state/controllers/PinchAndPanControllerLocal.js +1 -1
- package/views/3d/state/controllers/RotateController.js +1 -1
- package/views/3d/state/controllers/ZoomControllerGlobal.js +1 -1
- package/views/3d/state/controllers/ZoomControllerLocal.js +1 -1
- package/views/3d/state/controllers/ZoomStepControllerGlobal.js +1 -1
- package/views/3d/state/controllers/ZoomStepControllerLocal.js +1 -1
- package/views/3d/state/utils/navigationUtils.js +1 -1
- package/views/3d/support/DisplayQualityProfile.js +1 -1
- package/views/3d/support/QualitySettings.js +1 -1
- package/views/3d/support/flow/FlowSubViewExtent3D.js +5 -0
- package/views/3d/support/flow/FlowSubViewTiles3D.js +5 -0
- package/views/3d/support/flow/loadUtils.js +1 -1
- package/views/3d/support/sunUtils.js +1 -1
- package/views/3d/terrain/OverlayManager.js +1 -1
- package/views/3d/terrain/TerrainSurface.js +1 -1
- package/views/3d/terrain/TileRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
- package/views/3d/webgl-engine/lib/textureUtils.js +1 -1
- package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
- package/views/3d/webgl-engine/parts/RenderView.js +1 -1
- package/views/ToolViewManager.js +1 -1
- package/views/View2D.js +1 -1
- package/views/Viewport2DMixin.js +1 -1
- package/views/layers/BuildingSceneLayerView.js +1 -1
- package/views/layers/PointCloudLayerView.js +1 -1
- package/views/layers/SceneLayerView.js +1 -1
- package/views/support/layerViewUtils.js +1 -1
- package/views/ui/UI.js +1 -1
- package/views/webgl/FramebufferObject.js +1 -1
- package/views/webgl/Parameters.js +1 -1
- package/widgets/BasemapLayerList.js +1 -1
- package/widgets/CatalogLayerList.js +1 -1
- package/widgets/Editor/EditorViewModel.js +1 -1
- package/widgets/Editor/UpdateFeaturesWorkflow.js +1 -1
- package/widgets/Editor/UpdateWorkflow.js +1 -1
- package/widgets/Editor/UpdateWorkflowData.js +1 -1
- package/widgets/Editor/workflowUtils.js +1 -1
- package/widgets/Editor.js +1 -1
- package/widgets/Expand.js +1 -1
- package/widgets/Feature/FeatureUtilityNetworkAssociationList.js +1 -1
- package/widgets/Feature/FeatureViewModel.js +1 -1
- package/widgets/Feature/support/arcadeFeatureUtils.js +1 -1
- package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/FeatureFormUtilityNetworkAssociationList.js +1 -1
- package/widgets/FeatureForm/FieldInput.js +1 -1
- package/widgets/FeatureForm/UtilityNetworkAssociationInput.js +1 -1
- package/widgets/FeatureForm/featureFormUtils.js +1 -1
- package/widgets/LayerList/LayerListItem.js +1 -1
- package/widgets/LayerList.js +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/components/OrientedImageryVideoViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/imageMeasurementUtils.js +1 -1
- package/widgets/OrientedImageryViewer.js +1 -1
- package/widgets/Print.js +1 -1
- package/widgets/Search.js +1 -1
- package/widgets/ShadowCast/ShadowCastViewModel.js +1 -1
- package/widgets/Sketch/support/ResponsiveToolbar/ResponsiveToolbar.js +1 -1
- package/widgets/Sketch/support/ResponsiveToolbar/SplitButton.js +1 -1
- package/widgets/Sketch.js +1 -1
- package/widgets/TableList.js +1 -1
- package/widgets/TimeSlider.js +1 -1
- package/widgets/support/GridControls/GridControlsViewModel.js +1 -1
- package/widgets/support/SelectionList/FeatureItem.js +1 -1
- package/widgets/support/SelectionList/GroupLayerItem.js +1 -1
- package/widgets/support/SelectionList/LayerItem.js +1 -1
- package/widgets/support/SelectionList/SelectionListViewModel.js +1 -1
- package/widgets/support/SelectionList/selectionListUtils.js +1 -1
- package/widgets/support/SelectionList.js +1 -1
- package/widgets/support/SelectionToolbar/SelectionToolbarViewModel.js +1 -1
- package/widgets/support/SelectionToolbar.js +1 -1
- package/widgets/support/Selector2D/SelectionOperation.js +1 -1
- package/widgets/support/Selector2D/selectorUtils.js +1 -1
- package/widgets/support/UtilityNetworkAssociations/FeatureUtilityNetworkAssociationsViewModel.js +1 -1
- package/assets/esri/core/workers/chunks/2dc54925d473a959119c.js +0 -1
- package/assets/esri/core/workers/chunks/464c15b2779f9b803a06.js +0 -1
- package/assets/esri/core/workers/chunks/543b8dc8baa21b99147b.js +0 -1
- package/assets/esri/core/workers/chunks/5d3246b8fc50f9d9e2c4.js +0 -1
- package/assets/esri/core/workers/chunks/5d50a8d0427eab0a2514.js +0 -1
- package/assets/esri/core/workers/chunks/7a2189614f2dad49ffcd.js +0 -1
- package/assets/esri/core/workers/chunks/91d484960df25ec9554b.js +0 -1
- package/assets/esri/core/workers/chunks/9cd55043f3d789f41815.js +0 -1
- package/assets/esri/core/workers/chunks/b09539a4b491a90a6bbe.js +0 -1
- package/assets/esri/core/workers/chunks/b6c3a2d93a59df9a1418.js +0 -1
- package/assets/esri/core/workers/chunks/c45a314ace9725aa250e.js +0 -1
- package/assets/esri/core/workers/chunks/c6fa79ce324122e08dbb.js +0 -1
- package/assets/esri/core/workers/chunks/cbbbaccc0d3683e1c0fe.js +0 -1
- package/assets/esri/core/workers/chunks/e7a440476cd1eb4c6547.js +0 -1
- package/assets/esri/core/workers/chunks/e9993d4f2bfdc434fbcc.js +0 -1
- package/assets/esri/core/workers/chunks/eb23ce385b0d18959c7c.js +0 -1
- package/views/3d/support/flow/StreamlinesStyle3D.js +0 -5
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import e from"../../Color.js";import t from"../../Graphic.js";import{isSome as r,equals as n,addMany as a}from"../../core/arrayUtils.js";import{createTask as o}from"../../core/asyncUtils.js";import"../../core/has.js";import i from"../../core/Error.js";import{handlesGroup as s,makeHandle as l,abortHandle as c}from"../../core/handleUtils.js";import{clone as u}from"../../core/lang.js";import p from"../../core/Logger.js";import{getOrCreateMapValue as d}from"../../core/MapUtils.js";import{debounce as f,isPromiseLike as y,throwIfAborted as m,whenOrAbort as h}from"../../core/promiseUtils.js";import{watch as g,on as b,whenOnce as w}from"../../core/reactiveUtils.js";import{px2pt as v}from"../../core/screenUtils.js";import{diff as I}from"../../core/accessorSupport/diffUtils.js";import{isSharedTemplateOrMetadata as T,isSharedGroupTemplate as S,isSharedTemplate as j,isSharedPresetTemplate as F,isStandardFeatureTemplate as k,isSharedFeatureTemplate as A}from"../../editing/templateUtils.js";import{getSharedTemplateProvider as U}from"../../editing/sharedTemplates/SharedTemplateProvider.js";import V from"../../layers/GraphicsLayer.js";import{featureHasFields as L,fixFields as M,getDisplayFieldName as O}from"../../layers/support/fieldUtils.js";import{isSubtypeSublayer as x}from"../../layers/support/layerUtils.js";import{calculateTolerance as z}from"../../renderers/support/clickToleranceUtils.js";import{meterIn as q}from"../../renderers/support/lengthUtils.js";import{isRenderer as P}from"../../renderers/support/typeUtils.js";import{getTransformationType as E,TransformationType as C}from"../../renderers/visualVariables/support/sizeVariableUtils.js";import R from"../../symbols/SimpleFillSymbol.js";import D from"../../symbols/SimpleLineSymbol.js";import G from"../../symbols/SimpleMarkerSymbol.js";import{to3D as B}from"../../symbols/support/symbolConversion.js";import{getDisplayedSymbol as N}from"../../symbols/support/symbolUtils.js";import{getServices as Z}from"../../undoredo/support/Services.js";import{GraphicState as W}from"../../views/3d/layers/graphics/GraphicState.js";import{defaultDrawingMode as Q}from"../../views/draw/DrawingMode.js";import{createQueryGeometry as $}from"../../views/support/drapedUtils.js";import{filterGraphicHits as J,hitTestSelectSimilarDistance as H}from"../../views/support/hitTestSelectUtils.js";import{dependencySort as K}from"./support/dependencySort.js";import{isDrawGraphicTool as X}from"../Sketch/support/sketchUtils.js";const Y=()=>p.getLogger("esri.widgets.Editor.workflowUtils");function _(e){return!!e&&"features"in e}function ee(e){return null!=e&&"create-features"===e.type}function te(e){return null!=e&&"update-features"===e.type}function re(e){return null!=e&&/update-/.test(e.type)&&"fullFeature"in e}function ne(e){return null!=e&&"update"===e.type}function ae(e){if(!(e&&"renderer"in e&&pe(e.renderer)))return{rotation:null,size:null};const t=e.renderer.getVisualVariablesForType("rotation").filter((e=>(!e.axis||"heading"===e.axis)&&e.field&&!e.valueExpression)),r=e.renderer.getVisualVariablesForType("size").filter((e=>e.field&&!e.useSymbolValue&&!e.valueExpression&&E(e)===C.RealWorldSize));return{rotation:1===t.length?t[0]:null,size:1===r.length?r[0]:null}}function oe(e){const t=e.sourceLayer;if(!(t&&"renderer"in t&&pe(t.renderer)))return{rotation:null,size:null};const{rotation:r,size:n}=ae(t);let a=null,o=null;if(r){const e=t.fields?.filter((e=>e.name===r.field)),n=1===e?.length?e[0]:null;a=ie(r,n)}if(n){const e=t.fields?.filter((e=>e.name===n.field)),r=1===e?.length?e[0]:null;o=ce(n,r)}return{rotation:a,size:o}}function ie(e,t){const r="heading"===(e.axis||"heading")&&"arithmetic"===e.rotationType?-1:1,n=t?.type??"double",a={initial:0,current:0};return{field:e.field,fieldType:n,getDefaultValue:()=>Promise.resolve(0),getValue:e=>(a.current=a.initial-r*e,ue((a.current+360)%360,n)),setInitialValue:e=>{a.initial=e,a.current=0},isUpdatingInteractively:!1,rotationType:e.rotationType??"geographic"}}function se(e,t){switch(t){case"width":return e[0];case"depth":return e[1];case"height":return e[2];default:return e[2]||e[1]||e[0]}}async function le(e,t,r){if(null==t)return 0;const{symbol:n}=B(t);if(null==n||"web-style"===n.type||"cim"===n.type)return 0;const a=n.symbolLayers.at(0);if(!a)return 0;switch(a.type){case"icon":{const{computeIconLayerResourceSize:e}=await import("../../symbols/support/symbolLayerUtils.js");return Math.min(Xe.icon,(await e(a,Xe.icon))[0])||Xe.icon}case"text":return Xe.text;case"line":return Xe.line;case"object":{const{computeObjectLayerResourceSize:t}=await import("../../symbols/support/symbolLayerUtils.js");return se(await t(a,e.scale/Xe.viewScaleSizeFactor),r)}case"path":case"extrude":return e.scale/Xe.viewScaleSizeFactor;default:return 0}}function ce(e,t){const r=e.axis,n=t?.type??"double",a={initial:0,current:0},o=q[e.valueUnit]??1;let i;return i="area"===e.valueRepresentation?e=>(e*o/2)**2*Math.PI:"radius"===e.valueRepresentation||"distance"===e.valueRepresentation?e=>e*o/2:e=>e*o,{field:e.field,fieldType:n,getDefaultValue:async(e,t)=>ue(i(await le(t,e,r)),n),getValue:(e,t)=>(a.initial||(a.initial=t.pixelSizeAt(t.center)),a.current=a.initial*e,ue(a.current,n)),setInitialValue:e=>{a.initial=e,a.current=0},isUpdatingInteractively:!1,displayUnit:et(e.valueUnit),axis:e.axis}}function ue(e,t){switch(t){case"small-integer":case"integer":case"long":return Math.round(e);case"double":case"single":return e;default:return 0}}function pe(e){if(!P(e))return!1;switch(e?.type){case"class-breaks":case"simple":case"unique-value":case"dot-density":case"dictionary":case"pie-chart":return!0;default:return!1}}async function de(e,t,r){const n=await N(e,{useSourceLayer:!0,ignoreGraphicSymbol:!0,webStyleCache:t,scale:r});null!=I(e.symbol,n)&&(e.symbol=n)}function fe(e,t){if(!e||!t)throw new Error("no geometry type");if("multipatch"===e)return{tool:"mesh",createOptions:{mode:"hybrid"}};const r=new Map;r.set("circle",{mode:"freehand"}),r.set("rectangle",{mode:"freehand"});const n={mode:Q,optionsPerTool:r};if(T(t)){const a=t.defaultTool,o=S(t)?t.definition?.inputGeometryType??e:e;switch(a){case"freehand":case"stream-line":return{tool:"polyline"===o?"freehandPolyline":"freehandPolygon",createOptions:n};case"autocomplete-freehand-polygons":case"stream-polygon":return{tool:"freehandPolygon",createOptions:n};case"autocomplete-polygons":case"difference-polygon":case"create-structures":case"polygon":case"trace":return{tool:"polygon"===o?"polygon":"polyline",createOptions:n};case"circle":return r.get("circle").preserveAspectRatio=!0,{tool:"circle",createOptions:n};case"ellipse":return r.get("circle").preserveAspectRatio=!1,{tool:"circle",createOptions:n};case"create-points-along-line":case"multipoint":return{tool:"multipoint",createOptions:n};case"line":case"radial-line":case"right-angle-line":case"split":case"two-point-line":return{tool:"polyline",createOptions:n};case"rectangle":case"regular-polygon":case"right-angle-polygon":return{tool:"rectangle",createOptions:n};case"elevation-point-from-contour":case"elevation-point-from-dem":case"parcel-seed":case"point":case"point-and-rotation":case"point-at-end-of-line":return{tool:"point",createOptions:n}}}else{const a=t.drawingTool;if("circle"===a||"ellipse"===a)return r.get("circle").preserveAspectRatio="circle"===a,{tool:"circle",createOptions:n};if("rectangle"===a)return{tool:"rectangle",createOptions:n};if("freehand"===a)return{tool:"polygon"===e?"freehandPolygon":"freehandPolyline",createOptions:n}}return{tool:e,createOptions:n}}async function ye(e,t,r){const{creationInfo:n,fullTemplate:a}=t;if(!n)throw new i("featureworkflow","No creation info provided.");const o=n.layer,s=Oe(a,n.attributeOverrides),{view:l}=e,c="2d"===l?.type;S(a)||F(a)||await xe(e,o,s,r,c?l.scale:null);const{capabilities:u}=o;e.layer.elevationInfo=o.elevationInfo;const p=fe(o.geometryType,a);e.defaultCreateOptions={graphicProperties:{attributes:s,sourceLayer:o},mode:p.createOptions.mode,optionsPerTool:p.createOptions.optionsPerTool,preserveAspectRatio:p.createOptions.preserveAspectRatio,hasZ:u.data.supportsZ,defaultZ:(c?u.editing.zDefault:null)??e.defaultCreateOptions.defaultZ},null==n.geometryToPlace?await e.create(p.tool):await e.place(n.geometryToPlace,{graphicProperties:{attributes:s,sourceLayer:o}})}async function me(e){return s([await he(e),await ge(e)])}async function he({creationAttributes:e,data:t,sketchViewModel:r,view:n,webStyleCache:a}){const{creationInfo:o}=t,{fullTemplate:i}=t;if(!o||"2d"!==n?.type||S(i)||F(i))return null;const s=f((t=>xe(r,o.layer,e,a,t)));return g((()=>n.scale),(e=>s(e)))}async function ge({data:t,sketchViewModel:r,view:n}){const{templateExecutorInfo:a}=t;if(!a)return null;const o=r.activeComponent;if(!n||!X(o))return Y().error(new i("featureworkflow","Failed to set up template feedback.")),null;const c=new V({effect:"saturate(0.6) opacity(0.8)",listMode:"hide",title:"Shared Template Feedback Graphics"});n.map?.add(c);const{executor:u,serviceLayersById:p}=a,d=n.theme?.accentColor??new e([255,165,0,1]);return s([b((()=>o),["cursor-update","vertex-add"],(()=>{c.removeAll();const e=o.graphic?.geometry;if(!e||!be(e))return;const t=u(e,"digitizing");if(!y(t))for(const r of t.edits){const e=p.get(r.id);if(e&&r.addFeatures&&0!==r.addFeatures.length)for(const t of e)if(!t.isTable)for(const e of r.addFeatures){const t=we(e,d);t&&c.add(t)}}})),l((()=>{n.map.remove(c),c.destroy()}))])}function be(e){switch(e.type){case"point":case"multipoint":return!0;case"polyline":return e.paths[0].length>1;case"polygon":{const t=e.rings[0];return n(t.at(0),t.at(-1))?t.length>2:t.length>1}default:return!1}}function we(e,r){let n=null;switch(e.geometry?.type){case"point":case"multipoint":n=new G({angle:0,color:r,outline:new D({cap:"round",color:r,join:"round",miterLimit:1,style:"solid",width:1}),path:"undefined",size:8,style:"circle",xoffset:0,yoffset:0});break;case"polygon":n=new R({color:r,outline:new D({cap:"round",color:r,join:"round",miterLimit:1,style:"solid",width:3}),style:"none"});break;case"polyline":n=new D({cap:"round",color:r,join:"round",miterLimit:1,style:"solid",width:2});break;default:return null}return new t({geometry:e.geometry,symbol:n,attributes:{...e.attributes}})}async function ve(e,t){const r=await Z(t).load(),n=x(e)?e.parent:e;return r.tablesAndLayersLookup.get(n)}async function Ie(e,t){const r=await ve(e,t);if(!r)return new Map;const n=new Map;for(const a of r.layersAndTables)d(n,a.layerId,(()=>[])).push(a);return n}function Te(e){const t=e.objectIdField,r=e.globalIdField??"";return{id:e.layerId,identifierFields:{objectIdField:t,globalIdField:r},addFeatures:[],deleteAttachments:[],addAttachments:[],deleteFeatures:[],updateFeatures:[]}}function Se(e){const{edits:t,serviceInfo:n,view:a,findOriginalFeature:o}=e,i=je(n.layersAndTables),s=n.layersAndTables.toArray(),{allEditData:l,editDataByLayerIdMap:c,editDataByIdMap:u}=ke(t,i,o),p=Ae(l,Fe(s,c),c);if(a&&Le(l,p,a),0===p.length)return t;const d=K(p,{continueOnCircularDependency:!0}).map((e=>u.get(e))).filter(r),f=new Map;for(const r of d)f.set(r.uniqueId,r);const y=[];for(const r of l)f.has(r.uniqueId)||y.push(r);const m=[];let h=null;for(const r of d){const{layer:e}=r;switch(null==h?h=Te(e):h.id!==e.layerId&&(m.push(h),h=Te(e)),r.operationType){case"add":case"modify":h.addFeatures.push(r.after);break;case"delete":h.deleteFeatures.push(r.before)}}null!==h&&m.push(h);for(const r of y){const e=r.layer.layerId,t=m.find((t=>t.id===e))??Te(r.layer);switch(m.includes(t)||m.push(t),r.operationType){case"add":t.addFeatures.push(r.after);break;case"modify":t.updateFeatures.push(r.after);break;case"delete":t.deleteFeatures.push(r.before);break;case"deleteAttachment":t.deleteAttachments.push(r.attachmentId);break;case"addAttachment":t.addAttachments.push(r.attachment)}}for(const r of m)void 0!==r.deleteAttachments&&0===r.deleteAttachments.length&&delete r.deleteAttachments,void 0!==r.addAttachments&&0===r.addAttachments.length&&delete r.addAttachments;return m}function je(e){const t=new Map;for(const r of e)t.set(r.layerId,r);return t}function Fe(e,t){const r=new Map;for(const n of e)for(const e of n.relationships??[])if(r.set(Ue(n,e),""),t.has(e.relatedTableId)){const a=t.get(e.relatedTableId);if(a.length>0)for(const t of a[0].layer.relationships??[])if(t.id===e.id){r.set(Ue(n,e),t.keyField);break}}return r}function ke(e,t,r){const n=new Map,a=[],o=new Map;let s=1;for(const l of e){const e=[],c=t.get(l.id);if(!c)throw new i("featureworkflow",`Failed to prepare applyEdits payload. Layer with id ${l.id} not found.`);for(const t of l.addFeatures??[])e.push({uniqueId:"T"+s++,operationType:"add",layer:c,after:t});for(const t of l.deleteFeatures??[])e.push({uniqueId:"T"+s++,operationType:"delete",before:t,layer:c});for(const t of l.deleteAttachments??[])e.push({uniqueId:"T"+s++,operationType:"deleteAttachment",attachmentId:t,layer:c});for(const t of l.addAttachments??[])e.push({uniqueId:"T"+s++,operationType:"addAttachment",attachment:t,layer:c});for(const t of l.updateFeatures??[])e.push({uniqueId:"T"+s++,operationType:"modify",before:r(t),after:t,layer:c});n.set(c.layerId,e);for(const t of e)a.push(t),o.set(t.uniqueId,t)}return{allEditData:a,editDataByIdMap:o,editDataByLayerIdMap:n}}function Ae(e,t,r){const n=[];for(const a of e){const e=a.layer.relationships??[],{uniqueId:o}=a;for(const i of e){const e=i.keyField;if("origin"===i.role){const s=r.get(i.relatedTableId);if(!s||0===s.length)continue;const l=Ue(a.layer,i),c=t.get(l);if(void 0===c||""===c)continue;switch(a.operationType){case"add":for(const t of s)t!==a&&("add"!==t.operationType&&"modify"!==t.operationType||t.after.attributes[c]===a.after.attributes[e]&&n.push([o,t.uniqueId]));break;case"modify":if(a.before.attributes[e]!==a.after.attributes[e])for(const t of s){const r=t.uniqueId;t!==a&&("delete"===t.operationType?t.before.attributes[c]===a.before.attributes[e]?n.push([r,o]):t.before.attributes[c]===a.after.attributes[e]&&n.push([o,r]):"add"===t.operationType?t.after.attributes[c]===a.after.attributes[e]?n.push([o,r]):t.after.attributes[c]===a.before.attributes[e]&&n.push([r,o]):"modify"===t.operationType&&(t.before.attributes[c]!==t.after.attributes[c]?t.after.attributes[c]===a.after.attributes[e]?n.push([o,r]):n.push([r,o]):n.push([o,r])))}break;case"delete":for(const t of s)t!==a&&("delete"!==t.operationType&&"modify"!==t.operationType||t.before.attributes[c]===a.before.attributes[e]&&n.push([t.uniqueId,o]))}}}}return n}function Ue(e,t){return`${e.layerId}:${t.id}`}function Ve(e,t){return!!(t?.map&&"utilityNetworks"in t.map&&t.map.utilityNetworks?.length&&t.map.utilityNetworks.some((t=>!(!t.loaded||!e.url?.startsWith(t.featureServiceUrl)||e.layerId!==t.networkSystemLayers.associationsTableId))))}function Le(e,t,r){const n=[];for(const o of e)Ve(o.layer,r)&&n.push(o);if(0===n.length)return;let a=[];for(const o of n){const r=o.layer;switch(o.operationType){case"delete":a=[...Me(o.before.attributes[r.fieldsIndex.get("fromglobalid").name],e),...Me(o.before.attributes[r.fieldsIndex.get("toglobalid").name],e)];for(const e of a)t.push([o.uniqueId,e.uniqueId]);break;case"add":a=[...Me(o.after.attributes[r.fieldsIndex.get("fromglobalid").name],e),...Me(o.after.attributes[r.fieldsIndex.get("toglobalid").name],e)];for(const e of a)t.push([e.uniqueId,o.uniqueId])}}}function Me(e,t){const r=[],n=t.filter((({layer:e})=>""!==e.globalIdField&&null!=e.globalIdField));for(const a of n){const t=a.layer.globalIdField;("before"in a&&a.before?.attributes[t]===e||"after"in a&&a.after?.attributes[t]===e)&&r.push(a)}return r}function Oe(e,t={}){return S(e)||F(e)?{}:k(e)?{...e.prototype.attributes,...t}:A(e)?{...e.definition?.defaultValues,...t}:{...t}}async function xe(e,r,n,a,o){const i=new t({sourceLayer:r,attributes:n}),{rotation:s,size:l}=oe(i);let c=await N(i,{useSourceLayer:!0,webStyleCache:a,scale:o}),u=!1;for(const t of[l,s]){if(null==t)continue;null==n[t.field]&&(n[t.field]=await t.getDefaultValue(c,e.view),u=!0)}switch(u&&(c=await N(i,{useSourceLayer:!0,webStyleCache:a,scale:o})),c?.type){case"simple-fill":case"polygon-3d":e.polygonSymbol=c;break;case"simple-line":case"line-3d":e.polylineSymbol=c;break;case"simple-marker":case"picture-marker":case"point-3d":case"cim":e.pointSymbol=c;break;case"mesh-3d":e.meshSymbol=c}ze(e.tooltipOptions,l,s)}function ze(e,t,r){e.visualVariables=null!=t||null!=r?{size:null!=t?{unit:t.displayUnit,axis:t.axis,valueType:t.fieldType}:null,rotation:null!=r?{valueType:r.fieldType,rotationType:r.rotationType??"geographic"}:null}:null}function qe(e,t){return e?.find((e=>e.layer===t))}async function Pe(e,t,r,n){switch(t.type){case"3d":return Ee(e,t,r,n);case"2d":return Ce(e,t,r,n)}}async function Ee(e,t,r,n){if(0===e.length)return[];const{updatable:o,graphicsByLayer:i}=await r.defer((async()=>{const{results:a}=await h(H(t,r),n),o=new Map,i=e=>{const t=e.layer,r=o.get(t);if(!r){const e=new Array;return o.set(t,e),e}return r};J(a).forEach((({graphic:e})=>i(e).push(e)));const s=e.filter((({capabilities:e,layer:t})=>e.update.enabled&&o.has(t)));return 0!==s.length&&r.stopPropagation(),{updatable:s,graphicsByLayer:o}}));return h(Promise.allSettled(o.map((async({layer:e})=>{const t=i.get(e),r=Re(e);if(t.every((e=>L(e,r))))return t;const o=[];for(const n of t){o.push(n.getObjectId());const e=Object.keys(n.attributes);a(r,e)}const s=e.createQuery();return s.returnGeometry=!1,s.objectIds=o,s.outFields=M(e.fieldsIndex,r),e.queryFeatures(s,{signal:n}).then((({features:e})=>e))}))),n)}async function Ce(e,t,r,n){if(0===e.length)return[];const{mapPoint:a}=r;if(null==a)return[];let o=null;const i=await r.defer((async()=>{const{results:a}=await h(t.hitTest(r),n);if(0===a.length)return[];const i=new Set;o=J(a),o.forEach((({graphic:e})=>e&&i.add(e.layer)));const s=e.filter((e=>i.has(e.layer)&&e.supportsUpdateWorkflow));return s.length>0&&r.stopPropagation(),s}));return h(Promise.allSettled(i.map((async({layer:e})=>{const i=e.createQuery();i.returnGeometry=!0,i.outFields=Re(e);const s="renderer"in e?z({renderer:e.renderer,pointerType:r.pointerType}):0;i.geometry=$(a,s,t),i.outSpatialReference=t.spatialReference;const{features:l}=await e.queryFeatures(i,{signal:n});return o?.forEach((({graphic:t})=>{t.layer!==e||l.some((e=>e.getObjectId()===t.getObjectId()))||l.push(t)})),l}))),n)}function Re(e){return M(e.fieldsIndex,[e.objectIdField,O({displayField:"displayField"in e?e.displayField:null,fields:e.fields})])}async function De(e,t,n,a){const o=t.createQuery();o.objectIds=e.map((e=>e.getObjectId())).filter(r),o.outFields=["*"],o.returnM=t.capabilities.data.supportsM,o.returnZ=t.capabilities.data.supportsZ,"scene"===t.type&&null!=t.infoFor3D||(o.outSpatialReference=n);const i=await t.queryFeatures(o,{signal:a});return m(a),i.features}function Ge(e){const t=new Map;for(const r of e){const e=r.sourceLayer,n=x(e)?e.parent:e;d(t,n,(()=>[])).push(r)}return t}async function Be(e){const{graphic:t,sketchViewModel:r,sourceLayer:n,visualVariables:a}=e;await Ne(e);const o={multipleSelectionEnabled:!1};return"point"===n.geometryType&&(o.enableRotation=null!=a.rotation,o.enableScaling=null!=a.size),r.update(t,o)}async function Ne(e){const{graphic:t,sketchViewModel:r,sourceLayer:n,visualVariables:a,webStyleCache:o}=e;let i=!1;const{rotation:s,size:l}=a;for(const c of[s,l]){if(null==c)continue;const e=t.getAttribute(c.field);if(null!=e)c.setInitialValue(e);else{const e=await c.getDefaultValue(t.symbol,r.view);c.setInitialValue(e),t.setAttribute(c.field,e),i=!0}}if(i){const e="2d"===r.view?.type?r.view.scale:null;await de(t,o,e)}ze(r.tooltipOptions,l,s),r.layer.elevationInfo=n.elevationInfo}function Ze(e){return null==e||"rotate-start"!==e.type&&"rotate"!==e.type&&"rotate-stop"!==e.type?null:e}function We(e){return null==e||"scale-start"!==e.type&&"scale"!==e.type&&"scale-stop"!==e.type?null:e}function Qe(e,t,r,n){if(null==t.geometry||"point"!==t.geometry?.type)return!1;const a=t.attributes;let o=!1;const i=n.rotation,s=Ze(r.toolEventInfo);if(null!=i&&null!=s){const{field:r,getValue:n}=i;if("rotate-stop"===s.type)i.isUpdatingInteractively=!1,i.setInitialValue(t.getAttribute(r));else{i.isUpdatingInteractively=!0;const l=n(s.angle,e);l!==a[r]&&(t.setAttribute(r,l),o=!0)}}const l=n.size,c=We(r.toolEventInfo);if(null!=l&&null!=c){const{field:r,getValue:n}=l;if("scale-stop"===c.type)l.isUpdatingInteractively=!1,l.setInitialValue(t.getAttribute(r));else{l.isUpdatingInteractively=!0;const i=n(c.xScale,e);i!==a[r]&&(t.setAttribute(r,i),o=!0)}}return o}async function $e({feature:e,featureClone:t,visualVariableAttributes:r,sketchViewModel:n,view:a,onUpdate:o,webStyleCache:i,addUpdatingPromise:u,addHandle:p}){await de(t,i,"2d"===a.type?a.scale:null);let d=null;if("2d"===n?.view?.type){const e=f((e=>de(t,i,e)));d=g((()=>n?.view?.scale),(t=>e(t)))}const y=t.sourceLayer,m=nt(a,y);await Be({graphic:t,sketchViewModel:n,sourceLayer:y,visualVariables:r,webStyleCache:i});let h=null;m.then((e=>h=e)).catch((()=>{}));const b=r.size,v=r.rotation,I=g((()=>e.attributes),(async e=>{let r=!1;for(const n in e){const a=e[n];a!==t.getAttribute(n)&&(t.setAttribute(n,a),null==b||b.isUpdatingInteractively||b.field!==n||b.setInitialValue(a),null==v||v.isUpdatingInteractively||v.field!==n||v.setInitialValue(a),(null==h||h.requiredFields.includes(n))&&(r=!0))}r&&await de(t,i,"2d"===a.type?a.scale:null)})),T=n.on("update",(async e=>{const t=e.graphics[0],s={graphic:t,sketchViewModel:n,sourceLayer:y,visualVariables:r,webStyleCache:i};if("complete"===e.state){if(null===a.activeTool)return Be(s);const e=new AbortController,t=c(e);return p(t),u(w((()=>null===a.activeTool),e.signal).then((async()=>{if(!e.signal.aborted)return e.abort(),Be(s)})))}Qe(a,t,e,r)&&await de(t,i,"2d"===a.type?a.scale:null),o(ot(t),e)})),S=n.on(["undo","redo"],(async e=>{o(ot(e.graphics[0]),e)}));return s([S,T,l((()=>n.cancel())),I,d])}async function Je(e,t,r){const n=e.view;e.layer.add(r);const a=t.sourceLayer,i=t.layer,c=t.getAttribute(i.objectIdField);let u=null;function p(e){u?.abort(),u=o((async t=>{const r=await nt(n,a);m(t),r.setVisibility?.(c,e)}))}return await Ke(n,r),p(!1),s([He(n,r,(e=>p(!e))),l((async()=>{p(!0);try{if(!n.destroyed){const e=await nt(n,a).catch((()=>{}));e&&!e.destroyed&&await w((()=>!e.updating))}}finally{e.layer.remove(r)}}))])}function He(e,t,r){if("3d"===e.type){const n=new W({graphic:t});return s([e.trackGraphicState(n),g((()=>n.displaying),r)])}return g((()=>t.visible),r)}async function Ke(e,t){if("3d"===e.type){const r=new W({graphic:t}),n=e.trackGraphicState(r);await w((()=>r.displaying||r.error)),n.remove()}else await w((()=>t.visible))}const Xe={icon:v(24),text:v(12),line:v(1),viewScaleSizeFactor:100};function Ye(e,t,r){let n=!1;return e.filter((e=>!!n||(n=e===t,n))).map((e=>r[e]()))}function _e(e,t){e.viewModel.syncFeatureTemplates();const r=e.creationInfo;if("awaiting-feature-creation-info"===t[0].id&&r){const n=r.layer,a=e.viewModel.getTemplatesForLayer(n);1===a.length&&"scene"!==n.type&&(r.template=a[0],t.shift())}return t}function et(e){return"unknown"===e?null:e}function tt(e){e.filesEnabled=!0,e.mode="view",e.capabilities={editing:!0,operations:{add:!0,update:!0,delete:!0}}}const rt=e=>/-stop/.test(e)||/vertex-/.test(e),nt=(e,t)=>{const r="subtype-sublayer"===t.type?t.parent:t;return e.whenLayerView(r)};function at(e){return"createInteractiveEditSession"in e}function ot(e){const t=e.geometry;if("mesh"===t?.type){const r=e.cloneShallow();return r.attributes=u(e.attributes),r.geometry=t.cloneShallow(),r.geometry.transform=t.transform?.clone()??null,r}return e.clone()}function it(e){const t=e.cursor;return e.cursor="progress",l((()=>e.cursor=t))}async function st(e,t){const{template:r}=e;if(null==r)return null;if(j(r))return r.load();if(T(r)){const e=(await import("../../editing/sharedTemplates/SharedTemplate.js")).default,n=U(t,{makeSharedTemplateFromJSON:t=>e.fromJSON(t)}),a=await n.getTemplates({templateIds:[r.templateId],featureService:r.featureService});if(0===a.length)throw new i("editor:failed-to-load-template","Unable to load the provided template");return a[0].load()}return r}function lt(e){for(const t of e){const{destinationGraphic:e,destinationField:r,sourceGraphic:n,sourceField:a}=t;e.setAttribute(r,n.getAttribute(a))}}function ct(e){const t=e.templateExecutorInfo?.completionResults;return t?.length?(t.forEach((e=>lt(e.relationships))),t.flatMap((e=>e.edits))):null}function ut(e){if(null==e)return[];if(te(e))return e.data.layers;const t=ne(e)?e.activeWorkflow:e,r=t?.layer;return r?[r]:[]}export{Le as appendAllUtilityNetworkAssociationRelationships,_e as avoidFeatureTemplateSelectionWithOnlyOneItem,at as canCreateInteractiveEditSession,ot as cloneGraphicExceptMesh,je as createLayerIdMap,Fe as createRelationshipKeyMap,fe as createToolFromGeometryType,Ye as createWorkflowSteps,Pe as fetchCandidates,De as fetchFullFeatures,Ae as findAllDependencies,Me as findChangesByGlobalId,qe as findLayerInfo,Ue as generateHashForRelationship,Oe as getCreationAttributes,st as getFullTemplateForCreationInfo,ut as getLayersFromWorkflow,ie as getRotationVariableAttribute,ct as getServiceEditsFromWorkflowData,ve as getServiceInfoForLayer,Ie as getServiceLayersById,ce as getSizeVariableAttribute,oe as getVisualVariableAttributes,ae as getVisualVariablesForLayer,Ge as groupFeaturesByLayer,_ as isBatchAttributeFormViewModel,ee as isCreateFeaturesWorkflow,rt as isTerminalUpdateEventType,te as isUpdateFeaturesWorkflow,re as isUpdateRecordWorkflow,ne as isUpdateWorkflow,Ve as isUtilityNetworkAssociationsTable,Se as orderEditsByRelationshipDependencies,tt as prepareAttachmentsForCreateFeaturesWorkflow,lt as setRelationshipFields,$e as setUpGeometryUpdate,me as setUpSketchCreateWatchers,Ne as setVisualVariablesAndElevationInfoForUpdate,it as showProgressCursor,Xe as sizeDefaults,et as sizeVariableUnitToLengthUnit,ye as startCreatingNewFeature,Be as startUpdatingFeatureGeometry,Je as swapForEditingSession,de as updateGraphicSymbolWhenRequired,Qe as visualVariableInteractiveUpdate,nt as whenEditorLayerView,Ke as whenGraphicDisplayed};
|
|
5
|
+
import e from"../../Color.js";import t from"../../Graphic.js";import{isSome as r,equals as n,addMany as a}from"../../core/arrayUtils.js";import{createTask as o}from"../../core/asyncUtils.js";import"../../core/has.js";import i from"../../core/Error.js";import{handlesGroup as s,makeHandle as l,abortHandle as c}from"../../core/handleUtils.js";import{clone as u}from"../../core/lang.js";import p from"../../core/Logger.js";import{getOrCreateMapValue as d}from"../../core/MapUtils.js";import{debounce as f,isPromiseLike as y,throwIfAborted as m,whenOrAbort as h}from"../../core/promiseUtils.js";import{watch as g,on as b,whenOnce as w}from"../../core/reactiveUtils.js";import{px2pt as v}from"../../core/screenUtils.js";import{diff as I}from"../../core/accessorSupport/diffUtils.js";import{isSharedTemplateOrMetadata as T,isSharedGroupTemplate as S,isSharedTemplate as j,isSharedPresetTemplate as F,isStandardFeatureTemplate as k,isSharedFeatureTemplate as A}from"../../editing/templateUtils.js";import{getSharedTemplateProvider as U}from"../../editing/sharedTemplates/SharedTemplateProvider.js";import V from"../../layers/GraphicsLayer.js";import{featureHasFields as L,fixFields as M,getDisplayFieldName as O}from"../../layers/support/fieldUtils.js";import{isSubtypeSublayer as x}from"../../layers/support/layerUtils.js";import{calculateTolerance as z}from"../../renderers/support/clickToleranceUtils.js";import{meterIn as q}from"../../renderers/support/lengthUtils.js";import{isRenderer as P}from"../../renderers/support/typeUtils.js";import{getTransformationType as E,TransformationType as C}from"../../renderers/visualVariables/support/sizeVariableUtils.js";import R from"../../symbols/SimpleFillSymbol.js";import D from"../../symbols/SimpleLineSymbol.js";import G from"../../symbols/SimpleMarkerSymbol.js";import{to3D as B}from"../../symbols/support/symbolConversion.js";import{getDisplayedSymbol as N}from"../../symbols/support/symbolUtils.js";import{getServices as Z}from"../../undoredo/support/Services.js";import{GraphicState as W}from"../../views/3d/layers/graphics/GraphicState.js";import{defaultDrawingMode as Q}from"../../views/draw/DrawingMode.js";import{createQueryGeometry as $}from"../../views/support/drapedUtils.js";import{filterGraphicHits as J,hitTestSelectSimilarDistance as H}from"../../views/support/hitTestSelectUtils.js";import{dependencySort as K}from"./support/dependencySort.js";import{isDrawGraphicTool as X}from"../Sketch/support/sketchUtils.js";const Y=()=>p.getLogger("esri.widgets.Editor.workflowUtils");function _(e){return!!e&&"features"in e}function ee(e){return null!=e&&"create-features"===e.type}function te(e){return null!=e&&"update-features"===e.type}function re(e){return null!=e&&/update-/.test(e.type)&&"fullFeature"in e}function ne(e){return null!=e&&"update"===e.type}function ae(e){if(!(e&&"renderer"in e&&pe(e.renderer)))return{rotation:null,size:null};const t=e.renderer.getVisualVariablesForType("rotation").filter((e=>(!e.axis||"heading"===e.axis)&&e.field&&!e.valueExpression)),r=e.renderer.getVisualVariablesForType("size").filter((e=>e.field&&!e.useSymbolValue&&!e.valueExpression&&E(e)===C.RealWorldSize));return{rotation:1===t.length?t[0]:null,size:1===r.length?r[0]:null}}function oe(e){const t=e.sourceLayer;if(!(t&&"renderer"in t&&pe(t.renderer)))return{rotation:null,size:null};const{rotation:r,size:n}=ae(t);let a=null,o=null;if(r){const e=t.fields?.filter((e=>e.name===r.field)),n=1===e?.length?e[0]:null;a=ie(r,n)}if(n){const e=t.fields?.filter((e=>e.name===n.field)),r=1===e?.length?e[0]:null;o=ce(n,r)}return{rotation:a,size:o}}function ie(e,t){const r="heading"===(e.axis||"heading")&&"arithmetic"===e.rotationType?-1:1,n=t?.type??"double",a={initial:0,current:0};return{field:e.field,fieldType:n,getDefaultValue:()=>Promise.resolve(0),getValue:e=>(a.current=a.initial-r*e,ue((a.current+360)%360,n)),setInitialValue:e=>{a.initial=e,a.current=0},isUpdatingInteractively:!1,rotationType:e.rotationType??"geographic"}}function se(e,t){switch(t){case"width":return e[0];case"depth":return e[1];case"height":return e[2];default:return e[2]||e[1]||e[0]}}async function le(e,t,r){if(null==t)return 0;const{symbol:n}=B(t);if(null==n||"web-style"===n.type||"cim"===n.type)return 0;const a=n.symbolLayers.at(0);if(!a)return 0;switch(a.type){case"icon":{const{computeIconLayerResourceSize:e}=await import("../../symbols/support/symbolLayerUtils.js");return Math.min(Xe.icon,(await e(a,Xe.icon))[0])||Xe.icon}case"text":return Xe.text;case"line":return Xe.line;case"object":{const{computeObjectLayerResourceSize:t}=await import("../../symbols/support/symbolLayerUtils.js");return se(await t(a,e.scale/Xe.viewScaleSizeFactor),r)}case"path":case"extrude":return e.scale/Xe.viewScaleSizeFactor;default:return 0}}function ce(e,t){const r=e.axis,n=t?.type??"double",a={initial:0,current:0},o=q[e.valueUnit]??1;let i;return i="area"===e.valueRepresentation?e=>(e*o/2)**2*Math.PI:"radius"===e.valueRepresentation||"distance"===e.valueRepresentation?e=>e*o/2:e=>e*o,{field:e.field,fieldType:n,getDefaultValue:async(e,t)=>ue(i(await le(t,e,r)),n),getValue:(e,t)=>(a.initial||(a.initial=t.pixelSizeAt(t.center)),a.current=a.initial*e,ue(a.current,n)),setInitialValue:e=>{a.initial=e,a.current=0},isUpdatingInteractively:!1,displayUnit:et(e.valueUnit),axis:e.axis}}function ue(e,t){switch(t){case"small-integer":case"integer":case"long":return Math.round(e);case"double":case"single":return e;default:return 0}}function pe(e){if(!P(e))return!1;switch(e?.type){case"class-breaks":case"simple":case"unique-value":case"dot-density":case"dictionary":case"pie-chart":return!0;default:return!1}}async function de(e,t,r){const n=await N(e,{useSourceLayer:!0,ignoreGraphicSymbol:!0,webStyleCache:t,scale:r});null!=I(e.symbol,n)&&(e.symbol=n)}function fe(e,t){if(!e||!t)throw new Error("no geometry type");if("multipatch"===e)return{tool:"mesh",createOptions:{mode:"hybrid"}};const r=new Map;r.set("circle",{mode:"freehand"}),r.set("rectangle",{mode:"freehand"});const n={mode:Q,optionsPerTool:r};if(T(t)){const a=t.defaultTool,o=S(t)?t.definition?.inputGeometryType??e:e;switch(a){case"freehand":case"stream-line":return{tool:"polyline"===o?"freehandPolyline":"freehandPolygon",createOptions:n};case"autocomplete-freehand-polygons":case"stream-polygon":return{tool:"freehandPolygon",createOptions:n};case"autocomplete-polygons":case"difference-polygon":case"create-structures":case"polygon":case"trace":return{tool:"polygon"===o?"polygon":"polyline",createOptions:n};case"circle":return r.get("circle").preserveAspectRatio=!0,{tool:"circle",createOptions:n};case"ellipse":return r.get("circle").preserveAspectRatio=!1,{tool:"circle",createOptions:n};case"create-points-along-line":case"multipoint":return{tool:"multipoint",createOptions:n};case"line":case"radial-line":case"right-angle-line":case"split":case"two-point-line":return{tool:"polyline",createOptions:n};case"rectangle":case"regular-polygon":case"right-angle-polygon":return{tool:"rectangle",createOptions:n};case"elevation-point-from-contour":case"elevation-point-from-dem":case"parcel-seed":case"point":case"point-and-rotation":case"point-at-end-of-line":return{tool:"point",createOptions:n}}}else{const a=t.drawingTool;if("circle"===a||"ellipse"===a)return r.get("circle").preserveAspectRatio="circle"===a,{tool:"circle",createOptions:n};if("rectangle"===a)return{tool:"rectangle",createOptions:n};if("freehand"===a)return{tool:"polygon"===e?"freehandPolygon":"freehandPolyline",createOptions:n}}return{tool:e,createOptions:n}}async function ye(e,t,r){const{creationInfo:n,fullTemplate:a}=t;if(!n)throw new i("featureworkflow","No creation info provided.");const o=n.layer,s=Oe(a,n.attributeOverrides),{view:l}=e,c="2d"===l?.type;S(a)||F(a)||await xe(e,o,s,r,c?l.scale:null);const{capabilities:u}=o;e.layer.elevationInfo=o.elevationInfo;const p=fe(o.geometryType,a);e.defaultCreateOptions={graphicProperties:{attributes:s,sourceLayer:o},mode:p.createOptions.mode,optionsPerTool:p.createOptions.optionsPerTool,preserveAspectRatio:p.createOptions.preserveAspectRatio,hasZ:u.data.supportsZ,defaultZ:(c?u.editing.zDefault:null)??e.defaultCreateOptions.defaultZ},null==n.geometryToPlace?await e.create(p.tool):await e.place(n.geometryToPlace,{graphicProperties:{attributes:s,sourceLayer:o}})}async function me(e){return s([await he(e),await ge(e)])}async function he({creationAttributes:e,data:t,sketchViewModel:r,view:n,webStyleCache:a}){const{creationInfo:o}=t,{fullTemplate:i}=t;if(!o||"2d"!==n?.type||S(i)||F(i))return null;const s=f((t=>xe(r,o.layer,e,a,t)));return g((()=>n.scale),(e=>s(e)))}async function ge({data:t,sketchViewModel:r,view:n}){const{templateExecutorInfo:a}=t;if(!a)return null;const o=r.activeComponent;if(!n||!X(o))return Y().error(new i("featureworkflow","Failed to set up template feedback.")),null;const c=new V({effect:"saturate(0.6) opacity(0.8)",listMode:"hide",title:"Shared Template Feedback Graphics"});n.map?.add(c);const{executor:u,serviceLayersById:p}=a,d=n.theme?.accentColor??new e([255,165,0,1]);return s([b((()=>o),["cursor-update","vertex-add"],(()=>{c.removeAll();const e=o.graphic?.geometry;if(!e||!be(e))return;const t=u(e,"digitizing");if(!y(t))for(const r of t.edits){const e=p.get(r.id);if(e&&r.addFeatures&&0!==r.addFeatures.length)for(const t of e)if(!t.isTable)for(const e of r.addFeatures){const t=we(e,d);t&&c.add(t)}}})),l((()=>{n.map.remove(c),c.destroy()}))])}function be(e){switch(e.type){case"point":case"multipoint":return!0;case"polyline":return e.paths[0].length>1;case"polygon":{const t=e.rings[0];return n(t.at(0),t.at(-1))?t.length>2:t.length>1}default:return!1}}function we(e,r){let n=null;switch(e.geometry?.type){case"point":case"multipoint":n=new G({angle:0,color:r,outline:new D({cap:"round",color:r,join:"round",miterLimit:1,style:"solid",width:1}),path:"undefined",size:8,style:"circle",xoffset:0,yoffset:0});break;case"polygon":n=new R({color:r,outline:new D({cap:"round",color:r,join:"round",miterLimit:1,style:"solid",width:3}),style:"none"});break;case"polyline":n=new D({cap:"round",color:r,join:"round",miterLimit:1,style:"solid",width:2});break;default:return null}return new t({geometry:e.geometry,symbol:n,attributes:{...e.attributes}})}async function ve(e,t){const r=await Z(t).load(),n=x(e)?e.parent:e;return r.tablesAndLayersLookup.get(n)}async function Ie(e,t){const r=await ve(e,t);if(!r)return new Map;const n=new Map;for(const a of r.layersAndTables)d(n,a.layerId,(()=>[])).push(a);return n}function Te(e){const t=e.objectIdField,r=e.globalIdField??"";return{id:e.layerId,identifierFields:{objectIdField:t,globalIdField:r},addFeatures:[],deleteAttachments:[],addAttachments:[],deleteFeatures:[],updateFeatures:[]}}function Se(e){const{edits:t,serviceInfo:n,view:a,findOriginalFeature:o}=e,i=je(n.layersAndTables),s=n.layersAndTables.toArray(),{allEditData:l,editDataByLayerIdMap:c,editDataByIdMap:u}=ke(t,i,o),p=Ae(l,Fe(s,c),c);if(a&&Le(l,p,a),0===p.length)return t;const d=K(p,{continueOnCircularDependency:!0}).map((e=>u.get(e))).filter(r),f=new Map;for(const r of d)f.set(r.uniqueId,r);const y=[];for(const r of l)f.has(r.uniqueId)||y.push(r);const m=[];let h=null;for(const r of d){const{layer:e}=r;switch(null==h?h=Te(e):h.id!==e.layerId&&(m.push(h),h=Te(e)),r.operationType){case"add":case"modify":h.addFeatures.push(r.after);break;case"delete":h.deleteFeatures.push(r.before)}}null!==h&&m.push(h);for(const r of y){const e=r.layer.layerId,t=m.find((t=>t.id===e))??Te(r.layer);switch(m.includes(t)||m.push(t),r.operationType){case"add":t.addFeatures.push(r.after);break;case"modify":t.updateFeatures.push(r.after);break;case"delete":t.deleteFeatures.push(r.before);break;case"deleteAttachment":t.deleteAttachments.push(r.attachmentId);break;case"addAttachment":t.addAttachments.push(r.attachment)}}for(const r of m)void 0!==r.deleteAttachments&&0===r.deleteAttachments.length&&delete r.deleteAttachments,void 0!==r.addAttachments&&0===r.addAttachments.length&&delete r.addAttachments;return m}function je(e){const t=new Map;for(const r of e)t.set(r.layerId,r);return t}function Fe(e,t){const r=new Map;for(const n of e)for(const e of n.relationships??[])if(r.set(Ue(n,e),""),t.has(e.relatedTableId)){const a=t.get(e.relatedTableId);if(a.length>0)for(const t of a[0].layer.relationships??[])if(t.id===e.id){r.set(Ue(n,e),t.keyField);break}}return r}function ke(e,t,r){const n=new Map,a=[],o=new Map;let s=1;for(const l of e){const e=[],c=t.get(l.id);if(!c)throw new i("featureworkflow",`Failed to prepare applyEdits payload. Layer with id ${l.id} not found.`);for(const t of l.addFeatures??[])e.push({uniqueId:"T"+s++,operationType:"add",layer:c,after:t});for(const t of l.deleteFeatures??[])e.push({uniqueId:"T"+s++,operationType:"delete",before:t,layer:c});for(const t of l.deleteAttachments??[])e.push({uniqueId:"T"+s++,operationType:"deleteAttachment",attachmentId:t,layer:c});for(const t of l.addAttachments??[])e.push({uniqueId:"T"+s++,operationType:"addAttachment",attachment:t,layer:c});for(const t of l.updateFeatures??[])e.push({uniqueId:"T"+s++,operationType:"modify",before:r(t),after:t,layer:c});n.set(c.layerId,e);for(const t of e)a.push(t),o.set(t.uniqueId,t)}return{allEditData:a,editDataByIdMap:o,editDataByLayerIdMap:n}}function Ae(e,t,r){const n=[];for(const a of e){const e=a.layer.relationships??[],{uniqueId:o}=a;for(const i of e){const e=i.keyField;if("origin"===i.role){const s=r.get(i.relatedTableId);if(!s||0===s.length)continue;const l=Ue(a.layer,i),c=t.get(l);if(void 0===c||""===c)continue;switch(a.operationType){case"add":for(const t of s)t!==a&&("add"!==t.operationType&&"modify"!==t.operationType||t.after.attributes[c]===a.after.attributes[e]&&n.push([o,t.uniqueId]));break;case"modify":if(a.before.attributes[e]!==a.after.attributes[e])for(const t of s){const r=t.uniqueId;t!==a&&("delete"===t.operationType?t.before.attributes[c]===a.before.attributes[e]?n.push([r,o]):t.before.attributes[c]===a.after.attributes[e]&&n.push([o,r]):"add"===t.operationType?t.after.attributes[c]===a.after.attributes[e]?n.push([o,r]):t.after.attributes[c]===a.before.attributes[e]&&n.push([r,o]):"modify"===t.operationType&&(t.before.attributes[c]!==t.after.attributes[c]?t.after.attributes[c]===a.after.attributes[e]?n.push([o,r]):n.push([r,o]):n.push([o,r])))}break;case"delete":for(const t of s)t!==a&&("delete"!==t.operationType&&"modify"!==t.operationType||t.before.attributes[c]===a.before.attributes[e]&&n.push([t.uniqueId,o]))}}}}return n}function Ue(e,t){return`${e.layerId}:${t.id}`}function Ve(e,t){return!!(t?.map&&"utilityNetworks"in t.map&&t.map.utilityNetworks?.length&&t.map.utilityNetworks.some((t=>!(!t.loaded||!e.url?.startsWith(t.featureServiceUrl)||e.layerId!==t.networkSystemLayers.associationsTableId))))}function Le(e,t,r){const n=[];for(const o of e)Ve(o.layer,r)&&n.push(o);if(0===n.length)return;let a=[];for(const o of n){const r=o.layer;switch(o.operationType){case"delete":a=[...Me(o.before.attributes[r.fieldsIndex.get("fromglobalid").name],e),...Me(o.before.attributes[r.fieldsIndex.get("toglobalid").name],e)];for(const e of a)t.push([o.uniqueId,e.uniqueId]);break;case"add":a=[...Me(o.after.attributes[r.fieldsIndex.get("fromglobalid").name],e),...Me(o.after.attributes[r.fieldsIndex.get("toglobalid").name],e)];for(const e of a)t.push([e.uniqueId,o.uniqueId])}}}function Me(e,t){const r=[],n=t.filter((({layer:e})=>""!==e.globalIdField&&null!=e.globalIdField));for(const a of n){const t=a.layer.globalIdField;("before"in a&&a.before?.attributes[t]===e||"after"in a&&a.after?.attributes[t]===e)&&r.push(a)}return r}function Oe(e,t={}){return S(e)||F(e)?{}:k(e)?{...e.prototype.attributes,...t}:A(e)?{...e.definition?.defaultValues,...t}:{...t}}async function xe(e,r,n,a,o){const i=new t({sourceLayer:r,attributes:n}),{rotation:s,size:l}=oe(i);let c=await N(i,{useSourceLayer:!0,webStyleCache:a,scale:o}),u=!1;for(const t of[l,s]){if(null==t)continue;null==n[t.field]&&(n[t.field]=await t.getDefaultValue(c,e.view),u=!0)}switch(u&&(c=await N(i,{useSourceLayer:!0,webStyleCache:a,scale:o})),c?.type){case"simple-fill":case"polygon-3d":e.polygonSymbol=c;break;case"simple-line":case"line-3d":e.polylineSymbol=c;break;case"simple-marker":case"picture-marker":case"point-3d":case"cim":e.pointSymbol=c;break;case"mesh-3d":e.meshSymbol=c}ze(e.tooltipOptions,l,s)}function ze(e,t,r){e.visualVariables=null!=t||null!=r?{size:null!=t?{unit:t.displayUnit,axis:t.axis,valueType:t.fieldType}:null,rotation:null!=r?{valueType:r.fieldType,rotationType:r.rotationType??"geographic"}:null}:null}function qe(e,t){return e?.find((e=>e.layer===t))}async function Pe(e,t,r,n){switch(t.type){case"3d":return Ee(e,t,r,n);case"2d":return Ce(e,t,r,n)}}async function Ee(e,t,r,n){if(0===e.length)return[];const{updatable:o,graphicsByLayer:i}=await r.defer((async()=>{const{results:a}=await h(H(t,r),n),o=new Map,i=e=>{const t=e.layer,r=o.get(t);if(!r){const e=new Array;return o.set(t,e),e}return r};J(a).forEach((({graphic:e})=>i(e).push(e)));const s=e.filter((({capabilities:e,layer:t})=>e.update.enabled&&o.has(t)));return 0!==s.length&&r.stopPropagation(),{updatable:s,graphicsByLayer:o}}));return h(Promise.allSettled(o.map((async({layer:e})=>{const t=i.get(e),r=Re(e);if(t.every((e=>L(e,r))))return t;const o=[];for(const n of t){o.push(n.getObjectId());const e=Object.keys(n.attributes);a(r,e)}const s=e.createQuery();return s.returnGeometry=!1,s.objectIds=o,s.outFields=M(e.fieldsIndex,r),e.queryFeatures(s,{signal:n}).then((({features:e})=>e))}))),n)}async function Ce(e,t,r,n){if(0===e.length)return[];const{mapPoint:a}=r;if(null==a)return[];let o=null;const i=await r.defer((async()=>{const{results:a}=await h(t.hitTest(r),n);if(0===a.length)return[];const i=new Set;o=J(a),o.forEach((({graphic:e})=>e&&i.add(e.layer)));const s=e.filter((e=>i.has(e.layer)&&e.supportsUpdateWorkflow));return s.length>0&&r.stopPropagation(),s}));return h(Promise.allSettled(i.map((async({layer:e})=>{const i=e.createQuery();i.returnGeometry=!0,i.outFields=Re(e);const s="renderer"in e?z({renderer:e.renderer,pointerType:r.pointerType}):0;i.geometry=$(a,s,t),i.outSpatialReference=t.spatialReference;const{features:l}=await e.queryFeatures(i,{signal:n});return o?.forEach((({graphic:t})=>{t.layer!==e||l.some((e=>e.getObjectId()===t.getObjectId()))||l.push(t)})),l}))),n)}function Re(e){return M(e.fieldsIndex,[e.objectIdField,O({displayField:"displayField"in e?e.displayField:null,fields:e.fields})])}async function De(e,t,n,a){const o=t.createQuery();o.objectIds=e.map((e=>e.getObjectId())).filter(r),o.outFields=["*"],o.returnM=t.capabilities.data.supportsM,o.returnZ=t.capabilities.data.supportsZ,"scene"===t.type&&null!=t.infoFor3D||(o.outSpatialReference=n);const i=await t.queryFeatures(o,{signal:a});return m(a),i.features}function Ge(e){const t=new Map;for(const r of e){const e=r.sourceLayer,n=x(e)?e.parent:e;d(t,n,(()=>[])).push(r)}return t}async function Be(e){const{graphic:t,sketchViewModel:r,sourceLayer:n,visualVariables:a}=e;await Ne(e);const o={multipleSelectionEnabled:!1};return"point"===n.geometryType&&(o.enableRotation=null!=a.rotation,o.enableScaling=null!=a.size),r.update(t,o)}async function Ne(e){const{graphic:t,sketchViewModel:r,sourceLayer:n,visualVariables:a,webStyleCache:o}=e;let i=!1;const{rotation:s,size:l}=a;for(const c of[s,l]){if(null==c)continue;const e=t.getAttribute(c.field);if(null!=e)c.setInitialValue(e);else{const e=await c.getDefaultValue(t.symbol,r.view);c.setInitialValue(e),t.setAttribute(c.field,e),i=!0}}if(i){const e="2d"===r.view?.type?r.view.scale:null;await de(t,o,e)}ze(r.tooltipOptions,l,s),r.layer.elevationInfo=n.elevationInfo}function Ze(e){return null==e||"rotate-start"!==e.type&&"rotate"!==e.type&&"rotate-stop"!==e.type?null:e}function We(e){return null==e||"scale-start"!==e.type&&"scale"!==e.type&&"scale-stop"!==e.type?null:e}function Qe(e,t,r,n){if(null==t.geometry||"point"!==t.geometry?.type)return!1;const a=t.attributes;let o=!1;const i=n.rotation,s=Ze(r.toolEventInfo);if(null!=i&&null!=s){const{field:r,getValue:n}=i;if("rotate-stop"===s.type)i.isUpdatingInteractively=!1,i.setInitialValue(t.getAttribute(r));else{i.isUpdatingInteractively=!0;const l=n(s.angle,e);l!==a[r]&&(t.setAttribute(r,l),o=!0)}}const l=n.size,c=We(r.toolEventInfo);if(null!=l&&null!=c){const{field:r,getValue:n}=l;if("scale-stop"===c.type)l.isUpdatingInteractively=!1,l.setInitialValue(t.getAttribute(r));else{l.isUpdatingInteractively=!0;const i=n(c.xScale,e);i!==a[r]&&(t.setAttribute(r,i),o=!0)}}return o}async function $e({feature:e,featureClone:t,visualVariableAttributes:r,sketchViewModel:n,view:a,onUpdate:o,webStyleCache:i,addUpdatingPromise:u,addHandle:p}){await de(t,i,"2d"===a.type?a.scale:null);let d=null;if("2d"===n?.view?.type){const e=f((e=>de(t,i,e)));d=g((()=>n?.view?.scale),(t=>e(t)))}const y=t.sourceLayer,m=nt(a,y);await Be({graphic:t,sketchViewModel:n,sourceLayer:y,visualVariables:r,webStyleCache:i});let h=null;m.then((e=>h=e)).catch((()=>{}));const b=r.size,v=r.rotation,I=g((()=>e.attributes),(async e=>{let r=!1;for(const n in e){const a=e[n];a!==t.getAttribute(n)&&(t.setAttribute(n,a),null==b||b.isUpdatingInteractively||b.field!==n||b.setInitialValue(a),null==v||v.isUpdatingInteractively||v.field!==n||v.setInitialValue(a),(null==h||h.requiredFields.includes(n))&&(r=!0))}r&&await de(t,i,"2d"===a.type?a.scale:null)})),T=n.on("update",(async e=>{const t=e.graphics[0],s={graphic:t,sketchViewModel:n,sourceLayer:y,visualVariables:r,webStyleCache:i};if("complete"===e.state){if(null===a.activeTool)return Be(s);const e=new AbortController,t=c(e);return p(t),u(w((()=>null===a.activeTool),e.signal).then((async()=>{if(!e.signal.aborted)return e.abort(),Be(s)})))}Qe(a,t,e,r)&&await de(t,i,"2d"===a.type?a.scale:null),o(ot(t),e)})),S=n.on(["undo","redo"],(async e=>{o(ot(e.graphics[0]),e)}));return s([S,T,l((()=>n.cancel())),I,d])}async function Je(e,t,r){const n=e.view;e.layer.add(r);const a=t.sourceLayer,i=t.layer,c=t.getAttribute(i.objectIdField);let u=null;function p(e){u?.abort(),u=o((async t=>{const r=await nt(n,a);m(t),r.setVisibility?.(c,e)}))}return await Ke(n,r),p(!1),s([He(n,r,(e=>p(!e))),l((async()=>{p(!0);try{if(!n.destroyed){const e=await nt(n,a).catch((()=>{}));e&&!e.destroyed&&await w((()=>!e.updating))}}finally{e.layer.remove(r)}}))])}function He(e,t,r){if("3d"===e.type){const n=new W({graphic:t});return s([e.trackGraphicState(n),g((()=>n.displaying),r)])}return g((()=>t.visible),r)}async function Ke(e,t){if("3d"===e.type){const r=new W({graphic:t}),n=e.trackGraphicState(r);await w((()=>r.displaying||r.error)),n.remove()}else await w((()=>t.visible))}const Xe={icon:v(24),text:v(12),line:v(1),viewScaleSizeFactor:100};function Ye(e,t,r){let n=!1;return e.filter((e=>!!n||(n=e===t,n))).map((e=>r[e]()))}function _e(e,t){e.viewModel.syncFeatureTemplates();const r=e.creationInfo;if("awaiting-feature-creation-info"===t[0].id&&r){const n=r.layer,a=e.viewModel.getTemplatesForLayer(n);1===a.length&&"scene"!==n.type&&(r.template=a[0],t.shift())}return t}function et(e){return"unknown"===e?null:e}function tt(e){e.filesEnabled=!0,e.mode="view",e.capabilities={editing:!0,operations:{add:!0,update:!0,delete:!0}}}const rt=e=>/-stop/.test(e)||/vertex-/.test(e),nt=(e,t)=>{const r="subtype-sublayer"===t.type?t.parent:t;return e.whenLayerView(r)};function at(e){return"createInteractiveEditSession"in e}function ot(e){const t=e.geometry;if("mesh"===t?.type){const r=e.cloneShallow();return r.attributes=u(e.attributes),r.geometry=t.cloneShallow(),r.geometry.transform=t.transform?.clone()??null,r}return e.clone()}function it(e){const t=e.cursor;return e.cursor="progress",l((()=>e.cursor=t))}async function st(e,t){const{template:r}=e;if(null==r)return null;if(j(r))return r.load();if(T(r)){const e=(await import("../../editing/sharedTemplates/SharedTemplate.js")).default,n=U(t,{makeSharedTemplateFromJSON:t=>e.fromJSON(t)}),a=await n.getTemplates({templateIds:[r.templateId],featureService:r.featureService});if(0===a.length)throw new i("editor:failed-to-load-template","Unable to load the provided template");return a[0].load()}return r}function lt(e){for(const t of e){const{destinationGraphic:e,destinationField:r,sourceGraphic:n,sourceField:a}=t;e.setAttribute(r,n.getAttribute(a))}}function ct(e){const t=e.templateExecutorInfo?.completionResults;return t?.length?(t.forEach((e=>lt(e.relationships))),t.flatMap((e=>e.edits))):null}function ut(e){if(null==e)return[];if(te(e))return e.data.layers;const t=ne(e)?e.activeWorkflow:e,r=t?.layer;return r?[r]:[]}function pt(){return new i("editing:multiple-layers-not-supported","UpdateFeaturesWorkflow does not support updating features from multiple layers.")}export{Le as appendAllUtilityNetworkAssociationRelationships,_e as avoidFeatureTemplateSelectionWithOnlyOneItem,at as canCreateInteractiveEditSession,ot as cloneGraphicExceptMesh,je as createLayerIdMap,Fe as createRelationshipKeyMap,fe as createToolFromGeometryType,Ye as createWorkflowSteps,Pe as fetchCandidates,De as fetchFullFeatures,Ae as findAllDependencies,Me as findChangesByGlobalId,qe as findLayerInfo,Ue as generateHashForRelationship,Oe as getCreationAttributes,st as getFullTemplateForCreationInfo,ut as getLayersFromWorkflow,ie as getRotationVariableAttribute,ct as getServiceEditsFromWorkflowData,ve as getServiceInfoForLayer,Ie as getServiceLayersById,ce as getSizeVariableAttribute,oe as getVisualVariableAttributes,ae as getVisualVariablesForLayer,Ge as groupFeaturesByLayer,_ as isBatchAttributeFormViewModel,ee as isCreateFeaturesWorkflow,rt as isTerminalUpdateEventType,te as isUpdateFeaturesWorkflow,re as isUpdateRecordWorkflow,ne as isUpdateWorkflow,Ve as isUtilityNetworkAssociationsTable,pt as makeMultipleSourceLayersError,Se as orderEditsByRelationshipDependencies,tt as prepareAttachmentsForCreateFeaturesWorkflow,lt as setRelationshipFields,$e as setUpGeometryUpdate,me as setUpSketchCreateWatchers,Ne as setVisualVariablesAndElevationInfoForUpdate,it as showProgressCursor,Xe as sizeDefaults,et as sizeVariableUnitToLengthUnit,ye as startCreatingNewFeature,Be as startUpdatingFeatureGeometry,Je as swapForEditingSession,de as updateGraphicSymbolWhenRequired,Qe as visualVariableInteractiveUpdate,nt as whenEditorLayerView,Ke as whenGraphicDisplayed};
|
package/widgets/Editor.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../chunks/tslib.es6.js";import"../intl.js";import{deprecatedFunction as t}from"../core/deprecate.js";import s from"../core/Logger.js";import{destroyMaybe as i,abortMaybe as o,mappedFind as a}from"../core/maybe.js";import{createResolver as r}from"../core/promiseUtils.js";import{watch as n,on as l,when as c,initial as d}from"../core/reactiveUtils.js";import{property as h}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/RandomLCG.js";import{subclass as m}from"../core/accessorSupport/decorators/subclass.js";import{UpdatingHandles as p}from"../core/support/UpdatingHandles.js";import u from"../views/interactive/sketch/SketchValueOptions.js";import g from"./Attachments.js";import w from"./BatchAttributeForm.js";import _ from"./FeatureForm.js";import v from"./FeatureTemplates.js";import f from"./Spinner.js";import y from"./Widget.js";import{VisibleElements as b}from"./BatchAttributeForm/VisibleElements.js";import{css as k}from"./Editor/css.js";import A from"./Editor/EditorViewModel.js";import{isModelUpload as F}from"./Editor/modelUploadUtils.js";import M from"./Editor/VisibleElements.js";import{isBatchAttributeFormViewModel as T}from"./Editor/workflowUtils.js";import{loadCreateFeaturesPanelContentComponents as C,CreateFeaturesPanelContent as L}from"./Editor/components/CreateFeaturesPanelContent.js";import{loadFeatureListComponents as S,FeatureList as E}from"./Editor/components/FeatureList.js";import{loadFooterActionsComponents as W,FooterActions as P}from"./Editor/components/FooterActions.js";import{loadNoticesComponents as I,Notice as j}from"./Editor/components/Notices.js";import{loadPanelContentComponents as U,PanelContent as V,PanelContentSection as D,PanelContentMessage as B}from"./Editor/components/PanelContent.js";import{PanelToolbar as O,loadPanelToolbarComponents as x}from"./Editor/components/PanelToolbar.js";import{loadPromptComponents as N,Prompt as z}from"./Editor/components/Prompt.js";import{loadUpdateFeaturePanelContentComponents as H,UpdateFeaturePanelContent as G}from"./Editor/components/UpdateFeaturePanelContent.js";import{loadUploadDetailsComponents as R,UploadDetails as q}from"./Editor/components/UploadDetails.js";import{VisibleElements as Z,SelectionToolVisibilityMap as K,CreateToolVisibilityMap as $}from"./Sketch/VisibleElements.js";import{loadCalciteComponents as J}from"./support/componentsUtils.js";import{globalCss as Q}from"./support/globalCss.js";import{incrementHeadingLevel as X,Heading as Y}from"./support/Heading.js";import{renderItem as ee}from"./support/ItemList.js";import{connectDelayedLoading as te}from"./support/loaderUtils.js";import se from"./support/SelectionList.js";import ie from"./support/SelectionToolbar.js";import"./support/widgetUtils.js";import{messageBundle as oe}from"./support/decorators/messageBundle.js";import{vmEvent as ae}from"./support/decorators/vmEvent.js";import{tsx as re}from"./support/jsxFactory.js";import ne from"./support/SelectionList/VisibleElements.js";import le from"./support/SelectionToolbar/VisibleElements.js";import{substitute as ce}from"../intl/substitute.js";const de=Symbol("sketch-setup-handles");let he=class extends y{constructor(e,t){super(e,t),this._batchAttributeForm=new w({visibleElements:new b({loadingIndicator:!1})}),this._featureForm=new _,this._sketchToolbar=null,this._attachments=new g({visibleElements:{addSubmitButton:!1,cancelAddButton:!1,cancelUpdateButton:!1,deleteButton:!1,errorMessage:!1,progressBar:!1,updateButton:!1}}),this._associationItemList=null,this._associationSettings=null,this._featureTemplates=new v({enableListScroll:!1,renderItemContentEnd:e=>e.supportsUpload?re("calcite-icon",{class:k.templateItemContentEnd,icon:"upload-to",key:"upload-icon"}):null,renderItemLabel:e=>e.label,renderCustomGroupContent:e=>this._renderCustomTemplateGroupContent(e)}),this._filterText="",this._prompt=null,this._spinner=new f,this._loading=!1,this._selectionList=new se({displayMode:"layer",itemActionConfigs:this._selectionListItemActionConfigs,onListItemSelect:({item:e})=>this._onSelectionListItemSelect(e),visibleElements:new ne({header:!1})}),this._selectionToolbar=new ie({persistSelection:!1,returnGeometry:!1,visibleElements:new le({chip:!1})}),this._updatingHandles=new p,this.headingLevel=4,this.messages=null,this.messagesCommon=null,this.messagesTemplates=null,this.messagesFeature=null,this.supportingWidgetDefaults=null,this.viewModel=new A,this.visibleElements=new M,this._renderAttachments=()=>this._attachments.render(),this._renderFeatureForm=()=>this._featureForm.render(),this._renderBatchAttributeForm=()=>this._batchAttributeForm.render(),this._renderFeatureTemplates=()=>this._featureTemplates.render(),this._renderSelectionList=()=>this._selectionList.render(),this._renderSelectionToolbar=()=>this._selectionToolbar.render(),this._renderSketch=()=>this._sketchToolbar?re("div",{class:k.sketchContainer,key:"editor-sketch-container"},this._sketchToolbar?.render()):void 0,this._renderSelectIcon=()=>re("calcite-icon",{icon:"cursor",slot:"content-start"}),this.EditorPanel=({heading:e,key:t,selected:s},...i)=>{const{visibleElements:o}=this;return re("calcite-flow-item",{closable:!1,heading:e,headingLevel:this.headingLevel,key:t,loading:this._loading,selected:s,onCalciteFlowItemBack:this._onBack},o.zoomToButton&&this.viewModel.canZoomTo?re("calcite-action",{alignment:"center",appearance:"transparent",icon:"zoom-to-object",key:"zoom-to-button",onclick:()=>this.viewModel.zoomTo(),slot:"header-actions-end",text:this.messages.zoomTo,title:this.messages.zoomTo}):null,o.settingsMenu?re(O,{editorViewModel:this.viewModel,messagesCommon:this.messagesCommon,visibleElements:o}):null,...i)},this._showDiscardEditsPrompt=()=>{const{messages:e,activeWorkflow:t}=this,s={title:e.cancelEditTitle,message:e.cancelEditWarningMessage,yesLabel:e.discardEdits,noLabel:e.continueEditing};return"create-features"===t?.type&&F(t.data.creationInfo)?this._showPromptAndWait("success"===t.data.upload?.state?e.modelUploads.cancelPlacementPrompt:e.modelUploads.cancelUploadPrompt):"update"===t?.type&&t.activeFeatureFormViewModel?.activeAssociation?this._showPromptAndWait({...s,message:e.cancelAssociationEditWarning}):this._showPromptAndWait(s)},this._showGenericCancelPrompt=()=>{const{messages:e,messagesCommon:t}=this;return this._showPromptAndWait({title:e.cancelRequestTitle,message:e.cancelRequestWarningMessage,yesLabel:t.form.yes,noLabel:t.form.no})},this._showPrompt=e=>{this._prompt?.cancel?.(),this._prompt=e},this._clearPrompt=()=>{this._prompt=null},this._onSave=()=>{this.viewModel.saveWorkflow()},this._onDelete=()=>{const e=this.viewModel.activeFeatureCount,t=e>1?this.messages.multiFeature:this.messages.singleFeature;this._showPrompt({title:t.deleteWarningTitle,message:t.deleteWarningMessage,context:"danger",actions:{primary:{label:ce(t.delete,{count:e}),action:()=>{this.deleteFeatures(),this._clearPrompt()}},secondary:{label:t.keep,action:this._clearPrompt}}})},this._onDeleteAssociation=()=>{const{messages:e,messagesCommon:t}=this;this._showPrompt({title:e.deleteAssociationTitle,message:e.deleteAssociationMessage,context:"danger",actions:{primary:{label:t.delete,action:()=>{this.deleteAssociationFromWorkflow(),this._clearPrompt()}},secondary:{label:e.keepAssociation,action:this._clearPrompt}}})},this._onToggleUpdateWorkflow=()=>this.viewModel.toggleUpdateWorkflow(),this._onBack=e=>(e?.stopPropagation(),this.viewModel.back()),this._onAttachmentAdd=()=>{const{activeWorkflow:e}=this.viewModel;e&&("create-features"===e.type||"update"===e.type&&"create-features"===e.activeWorkflow?.type?(this._attachments.addFile(),e.back()):this._attachments.addAttachment().then((()=>e.back())))},this._onAttachmentUpdate=()=>{const{activeWorkflow:e}=this.viewModel;e&&("create-features"===e.type?(this._attachments.updateFile(),e.back()):this._attachments.updateAttachment().then((()=>e.back())))},this._onAttachmentDelete=()=>{const{messages:e,messagesCommon:t}=this;this._showPrompt({title:e.deleteAttachmentWarningTitle,message:e.deleteAttachmentWarningMessage,context:"danger",actions:{primary:{label:t.delete,action:this._onAttachmentDeleteConfirm},secondary:{label:e.keepAttachment,action:this._clearPrompt}}})},this._onAttachmentDeleteConfirm=async()=>{const e=this._attachments,{activeWorkflow:t}=this.viewModel;t&&("create-features"===t.type?e.deleteFile():(await e.deleteAttachment(e.viewModel.activeAttachmentInfo),this._clearPrompt()),await t.back(),this._clearPrompt())},this._onAttachmentsError=e=>{this._showPrompt({title:this.messages.errorWarningTitle,message:e.message,context:"warning",actions:{primary:{label:this.messagesCommon.form.ok,action:this._clearPrompt}}})}}initialize(){this._featureForm.showPrompt=this._showPrompt,this._featureForm.clearPrompt=this._clearPrompt,this.addHandles([n((()=>X(this.headingLevel)),(e=>{this._featureForm.headingLevel=e,this._featureTemplates.headingLevel=e}),d),l((()=>this.viewModel.activeWorkflow),"cancel-request",(({controller:e})=>{(this.viewModel.hasPendingEdits?this._showDiscardEditsPrompt():this._showGenericCancelPrompt()).then((t=>t?e.allow():e.deny()))})),c((()=>this.viewModel.formViewModel),(e=>{T(e)?this._batchAttributeForm.viewModel=e:this._featureForm.viewModel=e}),d),c((()=>this.viewModel.utilityNetworkAssociationAddAssociationViewModel),(e=>{this._associationItemList?this._associationItemList.viewModel=e:this._updatingHandles.addPromise(this._initializeAssociationItemList(e))}),d),c((()=>this.viewModel.utilityNetworkAssociationAddAssociationViewModel?.association),(()=>{this._setUpAssociationSettings()})),n((()=>[this.viewModel,this.viewModel?.attachmentsViewModel,this.viewModel?.featureTemplatesViewModel,this.viewModel?.spinnerViewModel,this.viewModel?.selectionListViewModel,this.viewModel?.selectionToolbarViewModel]),(([e,t,s,i,o,a])=>{this._attachments.viewModel=t,this._featureTemplates.viewModel=s,this._spinner.viewModel=i,this._selectionList.viewModel=o,this._selectionToolbar.viewModel=a,e.showDiscardEditsPrompt=this._showDiscardEditsPrompt}),d),n((()=>this.view),((e,t)=>{const s=`editor-${this.id}-spinner`;t?.ui.remove(this._spinner,s),e?.ui.add(this._spinner,{key:s,position:"manual"}),this._associationItemList&&(this._associationItemList.view=e)}),d),n((()=>[this.supportingWidgetDefaults,this.viewModel.sketchViewModel]),(([e])=>{e&&(this._featureForm.set(e.featureForm),this._attachments.set(e.attachments),this._featureTemplates.set(e.featureTemplates),this.viewModel.sketchViewModel?.set(e.sketch))}),d),c((()=>this._attachments?.error),(e=>this._onAttachmentsError(e))),c((()=>this._selectionListItemActionConfigs),(()=>{this._selectionList.itemActionConfigs=this._selectionListItemActionConfigs})),c((()=>this.viewModel?.failures),(e=>{const{messages:t}=this,[{error:s,retry:i,cancel:o}]=e;this._showPrompt({title:t.errorWarningTitle,message:ce(t.errorWarningMessageTemplate,{errorMessage:s.message}),context:"warning",actions:{primary:{label:t.retry,action:()=>{i(),this._clearPrompt()}},secondary:{label:t.ignore,action:()=>{o(),this._clearPrompt()}}}})})),n((()=>this.viewModel?.state),(e=>{switch(e){case"awaiting-feature-to-update":case"ready":case"disabled":this._filterText="",this._featureTemplates.filterText=""}})),n((()=>this.viewModel.featureFormDisabled),(e=>this._featureForm.disabled=e)),n((()=>this.visibleElements.sketch),(()=>this._setupSketch()),d),te({getLoading:()=>{const{viewModel:e}=this;return e.syncing||e.updating||this._attachments.submitting||this._updatingHandles.updating},setEffectiveLoading:e=>{this._loading=e}})])}destroy(){this._associationItemList?.destroy(),this._associationSettings?.destroy(),this._selectionList.destroy(),this._selectionToolbar.destroy(),this._attachments.destroy(),this._batchAttributeForm.destroy(),this._featureForm.destroy(),this._featureTemplates.destroy(),this._spinner.destroy(),this._sketchToolbar=i(this._sketchToolbar),this._sketchImportAbortController=o(this._sketchImportAbortController)}loadDependencies(){return Promise.all([J({action:()=>import("@esri/calcite-components/dist/components/calcite-action"),flow:()=>import("@esri/calcite-components/dist/components/calcite-flow"),"flow-item":()=>import("@esri/calcite-components/dist/components/calcite-flow-item"),icon:()=>import("@esri/calcite-components/dist/components/calcite-icon"),list:()=>import("@esri/calcite-components/dist/components/calcite-list")}),C(),S(),W(),I(),U(),x(),N(),H(),R()])}get _deleteButtonCommonInfo(){return{appearance:"outline",kind:"danger"}}get _selectionListItemActionConfigs(){const{messages:e}=this;return[{label:e?.batchEditing?.editThisFeature,icon:"edit-attributes",type:"feature",callback:({item:e})=>this._onSelectionListMenuItemSelect(e)},{label:e?.batchEditing?.editTheseFeatures,icon:"edit-attributes",type:"layer",callback:({item:e})=>this._onSelectionListMenuItemSelect(e)}]}get activeWorkflow(){return this.viewModel.activeWorkflow}get effectiveSelectionManager(){return this.viewModel.effectiveSelectionManager}get hideTemplatesForInactiveLayers(){return this.viewModel.hideTemplatesForInactiveLayers}set hideTemplatesForInactiveLayers(e){this.viewModel.hideTemplatesForInactiveLayers=e}get icon(){return"pencil"}set icon(e){this._overrideIfSome("icon",e)}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get labelOptions(){return this.viewModel.labelOptions}set labelOptions(e){this.viewModel.labelOptions=e}get layerInfos(){return this.viewModel.layerInfos}set layerInfos(e){this.viewModel.layerInfos=e}get snappingOptions(){return this.viewModel.snappingOptions}set snappingOptions(e){this.viewModel.snappingOptions=e}get tooltipOptions(){return this.viewModel.tooltipOptions}set tooltipOptions(e){this.viewModel.tooltipOptions=e}get valueOptions(){return this.viewModel.valueOptions}set valueOptions(e){this.viewModel.valueOptions=e}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}startCreateFeaturesWorkflowAtFeatureTypeSelection(){return this.viewModel.startCreateFeaturesWorkflowAtFeatureTypeSelection()}startCreateFeaturesWorkflowAtFeatureCreation(e){return this.viewModel.startCreateFeaturesWorkflowAtFeatureCreation(e)}startCreateFeaturesWorkflowAtFeatureEdit(e){return this.viewModel.startCreateFeaturesWorkflowAtFeatureEdit(e)}startUpdateFeaturesWorkflow(e){return this.viewModel.startUpdateFeaturesWorkflow(e)}startUpdateWorkflowAtFeatureSelection(){return this.viewModel.startUpdateWorkflowAtFeatureSelection()}startUpdateWorkflowAtMultipleFeatureSelection(e){return this.viewModel.startUpdateWorkflowAtMultipleFeatureSelection(e)}startUpdateWorkflowAtFeatureEdit(e){return this.viewModel.startUpdateWorkflowAtFeatureEdit(e)}startUpdateWorkflowWithActiveSelection(){return this.viewModel.startUpdateWorkflowWithActiveSelection()}deleteFeatureFromWorkflow(){return t(s.getLogger(this),"Editor.deleteFeatureFromWorkflow is deprecated. Use Editor.deleteFeatures instead.",{version:"4.33",replacement:"Editor.deleteFeatures",warnOnce:!0}),this.deleteFeatures()}async deleteFeatures(){await this.viewModel.deleteFeatures()}deleteAssociationFromWorkflow(){return this.viewModel.deleteAssociationFromWorkflow()}cancelWorkflow(e){return this.viewModel.cancelWorkflow(e)}render(){const{visibleElements:e,viewModel:t}=this,s=this.classes(k.base,Q.widget,Q.panel);if(!t)return re("div",{class:s,key:"empty"});const{pageStack:i}=t,o=i.length-1,a=i.map(((e,t)=>this._renderPage(e,t===o)));return re("div",{class:s,key:"base"},e.flow?re("calcite-flow",{inert:!!this._prompt,key:"flow"},a):a,this._prompt?re(z,{...this._prompt,headingLevel:this.headingLevel}):void 0)}_renderPage(e,t){const s={selected:t};switch(e){case"disabled":break;case"ready":return this._renderReady(s);case"viewing-selection-list":return this._renderSelectionListPage(s);case"awaiting-feature-creation-info":return this._renderAwaitingFeatureCreationInfo(s);case"creating-features-upload-details":return this._renderUploadDetails(s);case"creating-features":return this._renderCreatingFeatures(s);case"editing-existing-feature":case"editing-features":case"editing-attributes":return this._renderUpdateFeature(s);case"awaiting-update-feature-candidate":return this._renderFeatureList(s);case"adding-attachment":return this._renderAttachmentAdding(s);case"editing-attachment":return this._renderAttachmentEditing(s);case"viewing-associated-layers":case"viewing-associated-features":return this._renderViewAssociatedLayers(s);case"add-association-select-layer":case"add-association-select-feature":return this._renderSelectFeature(s);case"add-association-create-association":return this._renderAddAssociation(s)}return re("div",{key:"empty-page"})}_renderAwaitingFeatureCreationInfo(e){const{EditorPanel:t,messages:s}=this;return re(t,{heading:s.selectTemplate,key:"templates-panel",...e},re(V,{key:"feature-templates"},re(D,null,this._renderFeatureTemplates())))}_renderUploadDetails(e){const{EditorPanel:t,activeWorkflow:s,messages:i}=this;if("create-features"!==s?.type)return null;const o=s.data.upload;return o?re(t,{heading:i.createFeatures,key:"upload-details-panel",...e},re(q,{helpMessage:this._helpMessage,messages:i,upload:o})):null}_renderCreatingFeatures(e){const{EditorPanel:t,activeWorkflow:s,messages:i,messagesCommon:o,headingLevel:a,viewModel:r}=this;if(!s)return null;const n="create-features"===s.type&&s.numPendingFeatures>0||"update"===s.type&&"create-features"===s?.activeWorkflow?.type&&s.activeWorkflow?.numPendingFeatures>0;return re(t,{heading:i.createFeatures,key:"create-features-panel",...e},n?re(G,{editorViewModel:r,headingLevel:a,messages:i,messagesCommon:o,renderAttachments:this._renderAttachments,renderBatchAttributeForm:this._renderBatchAttributeForm,renderFeatureForm:this._renderFeatureForm,renderSketchToolbar:this._renderSketch,onDelete:this._onDelete,onDeleteAssociation:this._onDeleteAssociation,onSave:this._onSave}):re(L,{helpMessage:this._helpMessage,renderSketchToolbar:this._renderSketch}))}_renderUpdateFeature(e){const{EditorPanel:t,messages:s,messagesCommon:i,headingLevel:o,viewModel:a}=this,r=a.activeFeatureCount>1?s.multiFeature.editPanelTitle:s.singleFeature.editPanelTitle;return re(t,{heading:r,key:"update-feature-panel",...e},re(G,{editorViewModel:a,headingLevel:o,messages:s,messagesCommon:i,renderAttachments:this._renderAttachments,renderBatchAttributeForm:this._renderBatchAttributeForm,renderFeatureForm:this._renderFeatureForm,onDelete:this._onDelete,onDeleteAssociation:this._onDeleteAssociation,onSave:this._onSave}))}_getAssociationTypeTitle(e){const{messages:t}=this;if(!e)return t.singleFeature.editPanelTitle;if(e.title)return e.title;const{messagesFeature:s}=this;switch(e.type){case"attachment":return s.associationsAttachments;case"connectivity":return s.associationsConnectivity;case"structure":return s.associationsStructure;case"content":return s.associationsContents;case"container":return s.associationsContainer}}_getAddAssociationTypeTitle(e){const{messages:t}=this;if(!e)return t.singleFeature.editPanelTitle;const s=t.associations;switch(e.type){case"attachment":return s.addAttachment;case"connectivity":return s.addConnectivity;case"structure":return s.addStructure;case"content":return s.addContent;case"container":return s.addContainer}}async _initializeAssociationItemList(e){const t=(await import("./FeatureForm/FeatureFormUtilityNetworkAssociations/UtilityNetworkAssociationItemList.js")).default;this._associationItemList=new t({view:this.view,viewModel:e})}async _initializeAssociationSettings(){const e=new(0,(await import("./FeatureForm/FeatureFormUtilityNetworkAssociations/UtilityNetworkAssociationSettings.js")).default);return this._associationSettings=e,e}_renderViewAssociatedLayers(e){const{EditorPanel:t,messages:s,messagesCommon:i,headingLevel:o,viewModel:a}=this,r=a.featureFormViewModel?.activeAssociationInput?.activeAssociationType,n=this._getAssociationTypeTitle(r);return re(t,{heading:n,key:"viewing-associated-layers-panel",...e},re(G,{editorViewModel:a,headingLevel:o,messages:s,messagesCommon:i,renderAttachments:this._renderAttachments,renderBatchAttributeForm:this._renderBatchAttributeForm,renderFeatureForm:this._renderFeatureForm,renderSketchToolbar:this._renderSketch,onDelete:this._onDelete,onDeleteAssociation:this._onDeleteAssociation,onSave:this._onSave}))}_renderSelectFeature(e){const{_associationItemList:t,EditorPanel:s,viewModel:i,messagesCommon:o}=this,a=i.utilityNetworkAssociationAddAssociationViewModel,r=this._getAddAssociationTypeTitle(a?.associationType),n="ready"!==a?.state||this.viewModel.featureFormDisabled;return t?re(s,{heading:r,key:"add-association-select-feature",...e},re(V,{key:"select-feature"},re(D,null,t.render())),re(P,{buttons:[t.filterOptionsVisible?{appearance:"solid",label:o.apply,disabled:n,onClick:()=>t.applyFilterOptions(),type:"button"}:void 0,{appearance:"outline",label:o.cancel,disabled:n,onClick:()=>{"update"===i.activeWorkflow?.type&&(a?.reset(),i.activeWorkflow.cancelActiveWorkflow())},type:"button"}]})):re(s,{heading:r,key:"add-association-select-feature",...e})}async _setUpAssociationSettings(){const{viewModel:e}=this,t=this._associationSettings??await this._updatingHandles.addPromise(this._initializeAssociationSettings()),s=e.utilityNetworkAssociationAddAssociationViewModel,i="update"===e.activeWorkflow?.type?e.activeWorkflow:null,o=i?i.activeWorkflow:null,a="add-association"===o?.type?o.sourceFeatureItem:null,r=s?.selectedFeature,n=s?.association,l=s?.utilityNetwork;a&&r&&n&&l&&(t.sourceFeature=a,t.targetFeature=r,t.association=n,t.utilityNetwork=l)}_renderAddAssociation(e){const{_associationSettings:t,EditorPanel:s,viewModel:i,messagesCommon:o}=this;if(!t)return null;const a=i.utilityNetworkAssociationAddAssociationViewModel,r=this._getAddAssociationTypeTitle(a?.associationType),n="ready"!==a?.state;return re(s,{heading:r,key:"add-association",...e},re(V,{key:"add-association-content"},re(D,null,t.render())),re(P,{buttons:[{label:o.add,disabled:n||!a.canAddAssociation,onClick:()=>this._onSave(),type:"button"},{appearance:"outline",label:o.cancel,disabled:n,onClick:()=>{"update"===i.activeWorkflow?.type&&i.activeWorkflow.cancelActiveWorkflow()},type:"button"}]}))}_renderCustomTemplateGroupContent(e){const{messages:t,viewModel:s}=this,i=a(e.group.items,(e=>s.itemHasInvalidFormTemplate(e)?t.formFieldCreateError:void 0));return i?re(j,{kind:"warning",message:i}):null}_renderAttachmentAdding(e){const{EditorPanel:t,_attachments:s,messages:i,messagesCommon:o}=this;return re(t,{heading:i.addAttachment,key:"attachment-adding-panel",...e},re(V,{key:"attachments"},this._renderAttachments()),re(P,{buttons:[{label:s.submitting?o.cancel:o.add,disabled:s.submitting||!s.selectedFile,onClick:this._onAttachmentAdd,type:"button"}]}))}_renderSelectionListPage(e){const{_selectionList:t,messages:s,EditorPanel:i}=this,{batchUpdateActions:o}=this.visibleElements;return re(i,{heading:s.widgetLabel,key:"selection-list-panel",...e},this.visibleElements.selectionToolbar&&"3d"!==this.view?.type?re("div",{class:k.selectionToolbarContainer},this._renderSelectionToolbar()):void 0,re(V,{key:"selection-list"},re(D,null,this._renderSelectionList())),re(P,{buttons:[o?{label:ce(s.batchEditing.editCount,{count:t.visibleFeatureCount}),disabled:t.visibleLayerCount>1,onClick:()=>this.startUpdateWorkflowWithActiveSelection(),type:"button"}:void 0],notice:o&&t.visibleLayerCount>1?{text:s.batchEditing.selectOneLayer,icon:"information"}:void 0}))}_renderAttachmentEditing(e){const{EditorPanel:t,_attachments:s,activeWorkflow:i,messages:o,messagesCommon:a}=this;return i?re(t,{heading:o.editAttachment,key:"attachment-editing-panel",...e},re(V,{key:"attachments"},this._renderAttachments()),i.shouldAllowAttachmentEditing?re(P,{buttons:[{label:a.update,disabled:s.submitting||!s.selectedFile,onClick:this._onAttachmentUpdate,type:"button"},{...this._deleteButtonCommonInfo,onClick:this._onAttachmentDelete,disabled:s.submitting,label:a.delete,type:"button"}]}):void 0):null}_renderReady(e){const{EditorPanel:t,messages:s,viewModel:i,visibleElements:o}=this,a=this._helpMessage;return re(t,{heading:s.widgetLabel,key:"landing-panel",...e},re(V,{key:"landing-content"},i.editorItems.length?[o.editFeaturesSection?re(D,{key:"edit-actions"},this._renderUpdateActions()):null,o.createFeaturesSection&&i.canCreateVisible?re(D,{key:"create-actions"},this._renderCreateActions()):null]:re(B,{key:"no-content"},s.noEditableLayers)),a?re("div",{class:k.helpMessage,key:"footer-actions",slot:"footer"},a):void 0)}get _helpMessage(){const{activeWorkflow:e,messages:t,view:s}=this,i=e?.helpMessage;return i?t["3d"===s?.type?"helpMessages3d":"helpMessages2d"]?.[i]:void 0}_renderUpdateActions(){const{messages:e,messagesCommon:t,viewModel:s}=this,i={id:"select",label:t.select};return re("div",{class:k.updateActions,key:"update-actions"},re(Y,{level:X(this.headingLevel)},e.editFeatures),this.visibleElements.selectionToolbar&&"3d"!==this.view?.type?re("div",{class:k.selectionToolbarContainer},this._renderSelectionToolbar()):re("calcite-list",{class:k.updateActionsList,label:e.editFeaturesList,selectionAppearance:"border",selectionMode:"single"},ee({disabled:!s.canUpdateVisible,grouped:!1,item:i,selectedItem:"awaiting-feature-to-update"===s.activeWorkflow?.stepId?i:void 0,renderIcon:this._renderSelectIcon,onItemSelect:this._onToggleUpdateWorkflow})))}_renderCreateActions(){return re("div",{key:"create-actions"},re(Y,{level:X(this.headingLevel)},this.messages.createFeatures),re("div",{class:k.featureTemplatesContainer,key:"templates"},this._renderFeatureTemplates()))}_renderFeatureList(e){const{EditorPanel:t,viewModel:s}=this,{activeWorkflow:i}=s;if("update"!==i?.type)return null;const o=i.data.candidates,a=ce(this.messages.multipleFeaturesTemplate,{total:o.length});return re(t,{heading:a,key:"feature-list",...e},re(E,{editorItems:s.editorItems,editorMessages:this.messages,filterText:this._filterText,id:this.id,messagesTemplates:this.messagesTemplates,workflow:i,onFilterTextChange:e=>this._filterText=e,onSelectFeature:(e,t)=>s.selectFeature(e,t),onZoomTo:e=>s.zoomTo(e)}))}_showPromptAndWait({title:e,message:t,yesLabel:s,noLabel:i}){const o=r(),{view:a}=this,n=a?.focused;return this._showPrompt({title:e,message:t,context:"danger",actions:{primary:{label:s,action:()=>o.resolve(!0)},secondary:{label:i,action:()=>o.resolve(!1)}}}),o.promise.finally((()=>{this._clearPrompt(),n&&a?.focus()}))}async _onSelectionListItemSelect(e){await this.viewModel.onSelectionListItemSelect(e)}async _onSelectionListMenuItemSelect(e){await this.viewModel.onSelectionListMenuItemSelect(e)}async _setupSketch(){if(!!!this.visibleElements.sketch)return this._sketchImportAbortController=o(this._sketchImportAbortController),this._sketchToolbar=i(this._sketchToolbar),void this.removeHandles(de);if(this._sketchImportAbortController)return;const e=new AbortController;this._sketchImportAbortController=e;const t=await import("./Sketch.js");if(!e.signal.aborted)try{this._sketchToolbar=new t.default({toolbarKind:"docked",contextualToolLocation:"inline-end",scale:"s",visibleElements:new Z({deleteButton:!1,settingsMenu:!1,directionModePicker:!1,selectionCountLabel:!1,duplicateButton:!1,createTools:new $({freehandPolygon:!0,freehandPolyline:!0}),selectionTools:new K({"lasso-selection":!1,"rectangle-selection":!1})})}),this.addHandles([n((()=>this.viewModel.activeLeafWorkflow?.availableCreateTools),(e=>{this._sketchToolbar&&(this._sketchToolbar.availableCreateTools=e)}),d),n((()=>this.visibleElements.undoRedoButtons),(e=>{this._sketchToolbar&&(this._sketchToolbar.visibleElements.undoRedoMenu=e)}),d),c((()=>this.viewModel?.sketchViewModel),(e=>{this._sketchToolbar&&(this._sketchToolbar.viewModel=e)}),d)],de)}finally{this._sketchImportAbortController=null}}get test(){return{sketch:this._sketchToolbar,showPrompt:this._showPromptAndWait.bind(this)}}};e([h()],he.prototype,"_batchAttributeForm",void 0),e([h()],he.prototype,"_featureForm",void 0),e([h()],he.prototype,"_sketchToolbar",void 0),e([h()],he.prototype,"_attachments",void 0),e([h()],he.prototype,"_associationItemList",void 0),e([h()],he.prototype,"_associationSettings",void 0),e([h()],he.prototype,"_featureTemplates",void 0),e([h()],he.prototype,"_filterText",void 0),e([h()],he.prototype,"_prompt",void 0),e([h()],he.prototype,"_spinner",void 0),e([h()],he.prototype,"_deleteButtonCommonInfo",null),e([h()],he.prototype,"_loading",void 0),e([h()],he.prototype,"_selectionList",void 0),e([h()],he.prototype,"_selectionListItemActionConfigs",null),e([h()],he.prototype,"_selectionToolbar",void 0),e([h({readOnly:!0})],he.prototype,"activeWorkflow",null),e([h()],he.prototype,"effectiveSelectionManager",null),e([h()],he.prototype,"headingLevel",void 0),e([h()],he.prototype,"hideTemplatesForInactiveLayers",null),e([h()],he.prototype,"icon",null),e([h()],he.prototype,"label",null),e([h()],he.prototype,"labelOptions",null),e([h()],he.prototype,"layerInfos",null),e([h(),oe("esri/widgets/Editor/t9n/Editor")],he.prototype,"messages",void 0),e([h(),oe("esri/t9n/common")],he.prototype,"messagesCommon",void 0),e([h(),oe("esri/widgets/FeatureTemplates/t9n/FeatureTemplates")],he.prototype,"messagesTemplates",void 0),e([h(),oe("esri/widgets/Feature/t9n/Feature")],he.prototype,"messagesFeature",void 0),e([h()],he.prototype,"snappingOptions",null),e([h()],he.prototype,"tooltipOptions",null),e([h()],he.prototype,"supportingWidgetDefaults",void 0),e([h({type:u,nonNullable:!0})],he.prototype,"valueOptions",null),e([h()],he.prototype,"view",null),e([h(),ae(["sketch-create","sketch-delete","sketch-update","workflow-cancel","workflow-commit"])],he.prototype,"viewModel",void 0),e([h({type:M,nonNullable:!0})],he.prototype,"visibleElements",void 0),e([h()],he.prototype,"_helpMessage",null),he=e([m("esri.widgets.Editor")],he);const me=he;export{me as default};
|
|
5
|
+
import{_ as e}from"../chunks/tslib.es6.js";import"../intl.js";import{deprecatedFunction as t}from"../core/deprecate.js";import s from"../core/Logger.js";import{destroyMaybe as i,abortMaybe as o,mappedFind as a}from"../core/maybe.js";import{createResolver as r}from"../core/promiseUtils.js";import{watch as n,on as l,when as c,initial as d}from"../core/reactiveUtils.js";import{property as h}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/RandomLCG.js";import{subclass as m}from"../core/accessorSupport/decorators/subclass.js";import{UpdatingHandles as p}from"../core/support/UpdatingHandles.js";import u from"../views/interactive/sketch/SketchValueOptions.js";import g from"./Attachments.js";import w from"./BatchAttributeForm.js";import _ from"./FeatureForm.js";import v from"./FeatureTemplates.js";import f from"./Spinner.js";import y from"./Widget.js";import{VisibleElements as b}from"./BatchAttributeForm/VisibleElements.js";import{css as k}from"./Editor/css.js";import A from"./Editor/EditorViewModel.js";import{isModelUpload as F}from"./Editor/modelUploadUtils.js";import M from"./Editor/VisibleElements.js";import{isBatchAttributeFormViewModel as T}from"./Editor/workflowUtils.js";import{loadCreateFeaturesPanelContentComponents as C,CreateFeaturesPanelContent as L}from"./Editor/components/CreateFeaturesPanelContent.js";import{loadFeatureListComponents as E,FeatureList as S}from"./Editor/components/FeatureList.js";import{loadFooterActionsComponents as W,FooterActions as P}from"./Editor/components/FooterActions.js";import{loadNoticesComponents as I,Notice as j}from"./Editor/components/Notices.js";import{loadPanelContentComponents as U,PanelContent as V,PanelContentSection as D,PanelContentMessage as B}from"./Editor/components/PanelContent.js";import{PanelToolbar as O,loadPanelToolbarComponents as x}from"./Editor/components/PanelToolbar.js";import{loadPromptComponents as N,Prompt as z}from"./Editor/components/Prompt.js";import{loadUpdateFeaturePanelContentComponents as H,UpdateFeaturePanelContent as R}from"./Editor/components/UpdateFeaturePanelContent.js";import{loadUploadDetailsComponents as G,UploadDetails as q}from"./Editor/components/UploadDetails.js";import{VisibleElements as Z,SelectionToolVisibilityMap as K,CreateToolVisibilityMap as $}from"./Sketch/VisibleElements.js";import{loadCalciteComponents as J}from"./support/componentsUtils.js";import{globalCss as Q}from"./support/globalCss.js";import{incrementHeadingLevel as X,Heading as Y}from"./support/Heading.js";import{renderItem as ee}from"./support/ItemList.js";import{connectDelayedLoading as te}from"./support/loaderUtils.js";import se from"./support/SelectionList.js";import ie from"./support/SelectionToolbar.js";import"./support/widgetUtils.js";import{messageBundle as oe}from"./support/decorators/messageBundle.js";import{vmEvent as ae}from"./support/decorators/vmEvent.js";import{tsx as re}from"./support/jsxFactory.js";import ne from"./support/SelectionList/VisibleElements.js";import le from"./support/SelectionToolbar/VisibleElements.js";import{substitute as ce}from"../intl/substitute.js";const de=Symbol("sketch-setup-handles");let he=class extends y{constructor(e,t){super(e,t),this._batchAttributeForm=new w({visibleElements:new b({loadingIndicator:!1})}),this._featureForm=new _,this._sketchToolbar=null,this._attachments=new g({visibleElements:{addSubmitButton:!1,cancelAddButton:!1,cancelUpdateButton:!1,deleteButton:!1,errorMessage:!1,progressBar:!1,updateButton:!1}}),this._associationItemList=null,this._associationSettings=null,this._featureTemplates=new v({enableListScroll:!1,renderItemContentEnd:e=>e.supportsUpload?re("calcite-icon",{class:k.templateItemContentEnd,icon:"upload-to",key:"upload-icon"}):null,renderItemLabel:e=>e.label,renderCustomGroupContent:e=>this._renderCustomTemplateGroupContent(e)}),this._filterText="",this._prompt=null,this._spinner=new f,this._loading=!1,this._selectionList=new se({displayMode:"layer",itemActionConfigs:this._selectionListItemActionConfigs,onListItemSelect:({item:e})=>this._onSelectionListItemSelect(e),visibleElements:new ne({header:!1})}),this._selectionToolbar=new ie({visibleElements:new le({chip:!1})}),this._updatingHandles=new p,this.headingLevel=4,this.messages=null,this.messagesCommon=null,this.messagesTemplates=null,this.messagesFeature=null,this.supportingWidgetDefaults=null,this.viewModel=new A,this.visibleElements=new M,this._renderAttachments=()=>this._attachments.render(),this._renderFeatureForm=()=>this._featureForm.render(),this._renderBatchAttributeForm=()=>this._batchAttributeForm.render(),this._renderFeatureTemplates=()=>this._featureTemplates.render(),this._renderSelectionList=()=>this._selectionList.render(),this._renderSelectionToolbar=()=>this._selectionToolbar.render(),this._renderSketch=()=>this._sketchToolbar?re("div",{class:k.sketchContainer,key:"editor-sketch-container"},this._sketchToolbar?.render()):void 0,this._renderSelectIcon=()=>re("calcite-icon",{icon:"cursor",slot:"content-start"}),this.EditorPanel=({heading:e,key:t,selected:s},...i)=>{const{visibleElements:o}=this;return re("calcite-flow-item",{closable:!1,heading:e,headingLevel:this.headingLevel,key:t,loading:this._loading,selected:s,onCalciteFlowItemBack:this._onBack},o.zoomToButton&&this.viewModel.canZoomTo?re("calcite-action",{alignment:"center",appearance:"transparent",icon:"zoom-to-object",key:"zoom-to-button",onclick:()=>this.viewModel.zoomTo(),slot:"header-actions-end",text:this.messages.zoomTo,title:this.messages.zoomTo}):null,o.settingsMenu?re(O,{editorViewModel:this.viewModel,messagesCommon:this.messagesCommon,visibleElements:o}):null,...i)},this._showDiscardEditsPrompt=()=>{const{messages:e,activeWorkflow:t}=this,s={title:e.cancelEditTitle,message:e.cancelEditWarningMessage,yesLabel:e.discardEdits,noLabel:e.continueEditing};return"create-features"===t?.type&&F(t.data.creationInfo)?this._showPromptAndWait("success"===t.data.upload?.state?e.modelUploads.cancelPlacementPrompt:e.modelUploads.cancelUploadPrompt):"update"===t?.type&&t.activeFeatureFormViewModel?.activeAssociation?this._showPromptAndWait({...s,message:e.cancelAssociationEditWarning}):this._showPromptAndWait(s)},this._showGenericCancelPrompt=()=>{const{messages:e,messagesCommon:t}=this;return this._showPromptAndWait({title:e.cancelRequestTitle,message:e.cancelRequestWarningMessage,yesLabel:t.form.yes,noLabel:t.form.no})},this._showPrompt=e=>{this._prompt?.cancel?.(),this._prompt=e},this._clearPrompt=()=>{this._prompt=null},this._onSave=()=>{this.viewModel.saveWorkflow()},this._onDelete=()=>{const e=this.viewModel.activeFeatureCount,t=e>1?this.messages.multiFeature:this.messages.singleFeature;this._showPrompt({title:t.deleteWarningTitle,message:t.deleteWarningMessage,context:"danger",actions:{primary:{label:ce(t.delete,{count:e}),action:()=>{this.deleteFeatures(),this._clearPrompt()}},secondary:{label:t.keep,action:this._clearPrompt}}})},this._onDeleteAssociation=()=>{const{messages:e,messagesCommon:t}=this;this._showPrompt({title:e.deleteAssociationTitle,message:e.deleteAssociationMessage,context:"danger",actions:{primary:{label:t.delete,action:()=>{this.deleteAssociationFromWorkflow(),this._clearPrompt()}},secondary:{label:e.keepAssociation,action:this._clearPrompt}}})},this._onToggleUpdateWorkflow=()=>this.viewModel.toggleUpdateWorkflow(),this._onBack=e=>(e?.stopPropagation(),this.viewModel.back()),this._onAttachmentAdd=()=>{const{activeWorkflow:e}=this.viewModel;e&&("create-features"===e.type||"update"===e.type&&"create-features"===e.activeWorkflow?.type?(this._attachments.addFile(),e.back()):this._attachments.addAttachment().then((()=>e.back())))},this._onAttachmentUpdate=()=>{const{activeWorkflow:e}=this.viewModel;e&&("create-features"===e.type?(this._attachments.updateFile(),e.back()):this._attachments.updateAttachment().then((()=>e.back())))},this._onAttachmentDelete=()=>{const{messages:e,messagesCommon:t}=this;this._showPrompt({title:e.deleteAttachmentWarningTitle,message:e.deleteAttachmentWarningMessage,context:"danger",actions:{primary:{label:t.delete,action:this._onAttachmentDeleteConfirm},secondary:{label:e.keepAttachment,action:this._clearPrompt}}})},this._onAttachmentDeleteConfirm=async()=>{const e=this._attachments,{activeWorkflow:t}=this.viewModel;t&&("create-features"===t.type?e.deleteFile():(await e.deleteAttachment(e.viewModel.activeAttachmentInfo),this._clearPrompt()),await t.back(),this._clearPrompt())},this._onAttachmentsError=e=>{this._showPrompt({title:this.messages.errorWarningTitle,message:e.message,context:"warning",actions:{primary:{label:this.messagesCommon.form.ok,action:this._clearPrompt}}})}}initialize(){this._featureForm.showPrompt=this._showPrompt,this._featureForm.clearPrompt=this._clearPrompt,this.addHandles([n((()=>X(this.headingLevel)),(e=>{this._featureForm.headingLevel=e,this._featureTemplates.headingLevel=e}),d),l((()=>this.viewModel.activeWorkflow),"cancel-request",(({controller:e})=>{(this.viewModel.hasPendingEdits?this._showDiscardEditsPrompt():this._showGenericCancelPrompt()).then((t=>t?e.allow():e.deny()))})),c((()=>this.viewModel.formViewModel),(e=>{T(e)?this._batchAttributeForm.viewModel=e:this._featureForm.viewModel=e}),d),c((()=>this.viewModel.utilityNetworkAssociationAddAssociationViewModel),(e=>{this._associationItemList?this._associationItemList.viewModel=e:this._updatingHandles.addPromise(this._initializeAssociationItemList(e))}),d),c((()=>this.viewModel.utilityNetworkAssociationAddAssociationViewModel?.association),(()=>{this._setUpAssociationSettings()})),n((()=>[this.viewModel,this.viewModel?.attachmentsViewModel,this.viewModel?.featureTemplatesViewModel,this.viewModel?.spinnerViewModel,this.viewModel?.selectionListViewModel,this.viewModel?.selectionToolbarViewModel]),(([e,t,s,i,o,a])=>{this._attachments.viewModel=t,this._featureTemplates.viewModel=s,this._spinner.viewModel=i,this._selectionList.viewModel=o,this._selectionToolbar.viewModel=a,e.showDiscardEditsPrompt=this._showDiscardEditsPrompt}),d),n((()=>this.view),((e,t)=>{const s=`editor-${this.id}-spinner`;t?.ui.remove(this._spinner,s),e?.ui.add(this._spinner,{key:s,position:"manual"}),this._associationItemList&&(this._associationItemList.view=e)}),d),n((()=>[this.supportingWidgetDefaults,this.viewModel.sketchViewModel]),(([e])=>{e&&(this._featureForm.set(e.featureForm),this._attachments.set(e.attachments),this._featureTemplates.set(e.featureTemplates),this.viewModel.sketchViewModel?.set(e.sketch))}),d),c((()=>this._attachments?.error),(e=>this._onAttachmentsError(e))),c((()=>this._selectionListItemActionConfigs),(()=>{this._selectionList.itemActionConfigs=this._selectionListItemActionConfigs})),c((()=>this.viewModel?.failures),(e=>{const{messages:t}=this,[{error:s,retry:i,cancel:o}]=e;this._showPrompt({title:t.errorWarningTitle,message:ce(t.errorWarningMessageTemplate,{errorMessage:s.message}),context:"warning",actions:{primary:{label:t.retry,action:()=>{i(),this._clearPrompt()}},secondary:{label:t.ignore,action:()=>{o(),this._clearPrompt()}}}})})),n((()=>this.viewModel?.state),(e=>{switch(e){case"awaiting-feature-to-update":case"ready":case"disabled":this._filterText="",this._featureTemplates.filterText=""}})),n((()=>this.viewModel.featureFormDisabled),(e=>this._featureForm.disabled=e)),n((()=>this.visibleElements.sketch),(()=>this._setupSketch()),d),te({getLoading:()=>{const{viewModel:e}=this;return e.syncing||e.updating||this._attachments.submitting||this._updatingHandles.updating},setEffectiveLoading:e=>{this._loading=e}})])}destroy(){this._associationItemList?.destroy(),this._associationSettings?.destroy(),this._selectionList.destroy(),this._selectionToolbar.destroy(),this._attachments.destroy(),this._batchAttributeForm.destroy(),this._featureForm.destroy(),this._featureTemplates.destroy(),this._spinner.destroy(),this._sketchToolbar=i(this._sketchToolbar),this._sketchImportAbortController=o(this._sketchImportAbortController)}loadDependencies(){return Promise.all([J({action:()=>import("@esri/calcite-components/dist/components/calcite-action"),flow:()=>import("@esri/calcite-components/dist/components/calcite-flow"),"flow-item":()=>import("@esri/calcite-components/dist/components/calcite-flow-item"),icon:()=>import("@esri/calcite-components/dist/components/calcite-icon"),list:()=>import("@esri/calcite-components/dist/components/calcite-list")}),C(),E(),W(),I(),U(),x(),N(),H(),G()])}get _deleteButtonCommonInfo(){return{appearance:"outline",kind:"danger"}}get _selectionListItemActionConfigs(){const{messages:e}=this;return[{label:e?.batchEditing?.editThisFeature,icon:"edit-attributes",type:"feature",callback:({item:e})=>this._onSelectionListMenuItemSelect(e)},{label:e?.batchEditing?.editTheseFeatures,icon:"edit-attributes",type:"layer",callback:({item:e})=>this._onSelectionListMenuItemSelect(e)}]}get activeWorkflow(){return this.viewModel.activeWorkflow}get effectiveSelectionManager(){return this.viewModel.effectiveSelectionManager}get hideTemplatesForInactiveLayers(){return this.viewModel.hideTemplatesForInactiveLayers}set hideTemplatesForInactiveLayers(e){this.viewModel.hideTemplatesForInactiveLayers=e}get icon(){return"pencil"}set icon(e){this._overrideIfSome("icon",e)}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get labelOptions(){return this.viewModel.labelOptions}set labelOptions(e){this.viewModel.labelOptions=e}get layerInfos(){return this.viewModel.layerInfos}set layerInfos(e){this.viewModel.layerInfos=e}get snappingOptions(){return this.viewModel.snappingOptions}set snappingOptions(e){this.viewModel.snappingOptions=e}get tooltipOptions(){return this.viewModel.tooltipOptions}set tooltipOptions(e){this.viewModel.tooltipOptions=e}get valueOptions(){return this.viewModel.valueOptions}set valueOptions(e){this.viewModel.valueOptions=e}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}startCreateFeaturesWorkflowAtFeatureTypeSelection(){return this.viewModel.startCreateFeaturesWorkflowAtFeatureTypeSelection()}startCreateFeaturesWorkflowAtFeatureCreation(e){return this.viewModel.startCreateFeaturesWorkflowAtFeatureCreation(e)}startCreateFeaturesWorkflowAtFeatureEdit(e){return this.viewModel.startCreateFeaturesWorkflowAtFeatureEdit(e)}startUpdateFeaturesWorkflow(e){return this.viewModel.startUpdateFeaturesWorkflow(e)}startUpdateWorkflowAtFeatureSelection(){return this.viewModel.startUpdateWorkflowAtFeatureSelection()}startUpdateWorkflowAtMultipleFeatureSelection(e){return this.viewModel.startUpdateWorkflowAtMultipleFeatureSelection(e)}startUpdateWorkflowAtFeatureEdit(e){return this.viewModel.startUpdateWorkflowAtFeatureEdit(e)}async startUpdateWorkflowWithActiveSelection(){const e=this._selectionList.filteredFeatureItems?.map((e=>e.graphic));await this.viewModel.startUpdateWorkflowWithActiveSelection(e)}deleteFeatureFromWorkflow(){return t(s.getLogger(this),"Editor.deleteFeatureFromWorkflow is deprecated. Use Editor.deleteFeatures instead.",{version:"4.33",replacement:"Editor.deleteFeatures",warnOnce:!0}),this.deleteFeatures()}async deleteFeatures(){await this.viewModel.deleteFeatures()}deleteAssociationFromWorkflow(){return this.viewModel.deleteAssociationFromWorkflow()}cancelWorkflow(e){return this.viewModel.cancelWorkflow(e)}render(){const{visibleElements:e,viewModel:t}=this,s=this.classes(k.base,Q.widget,Q.panel);if(!t)return re("div",{class:s,key:"empty"});const{pageStack:i}=t,o=i.length-1,a=i.map(((e,t)=>this._renderPage(e,t===o)));return re("div",{class:s,key:"base"},e.flow?re("calcite-flow",{inert:!!this._prompt,key:"flow"},a):a,this._prompt?re(z,{...this._prompt,headingLevel:this.headingLevel}):void 0)}_renderPage(e,t){const s={selected:t};switch(e){case"disabled":break;case"ready":return this._renderReady(s);case"viewing-selection-list":return this._renderSelectionListPage(s);case"awaiting-feature-creation-info":return this._renderAwaitingFeatureCreationInfo(s);case"creating-features-upload-details":return this._renderUploadDetails(s);case"creating-features":return this._renderCreatingFeatures(s);case"editing-existing-feature":case"editing-features":case"editing-attributes":return this._renderUpdateFeature(s);case"awaiting-update-feature-candidate":return this._renderFeatureList(s);case"adding-attachment":return this._renderAttachmentAdding(s);case"editing-attachment":return this._renderAttachmentEditing(s);case"viewing-associated-layers":case"viewing-associated-features":return this._renderViewAssociatedLayers(s);case"add-association-select-layer":case"add-association-select-feature":return this._renderSelectFeature(s);case"add-association-create-association":return this._renderAddAssociation(s)}return re("div",{key:"empty-page"})}_renderAwaitingFeatureCreationInfo(e){const{EditorPanel:t,messages:s}=this;return re(t,{heading:s.selectTemplate,key:"templates-panel",...e},re(V,{key:"feature-templates"},re(D,null,this._renderFeatureTemplates())))}_renderUploadDetails(e){const{EditorPanel:t,activeWorkflow:s,messages:i}=this;if("create-features"!==s?.type)return null;const o=s.data.upload;return o?re(t,{heading:i.createFeatures,key:"upload-details-panel",...e},re(q,{helpMessage:this._helpMessage,messages:i,upload:o})):null}_renderCreatingFeatures(e){const{EditorPanel:t,activeWorkflow:s,messages:i,messagesCommon:o,headingLevel:a,viewModel:r}=this;if(!s)return null;const n="create-features"===s.type&&s.numPendingFeatures>0||"update"===s.type&&"create-features"===s?.activeWorkflow?.type&&s.activeWorkflow?.numPendingFeatures>0;return re(t,{heading:i.createFeatures,key:"create-features-panel",...e},n?re(R,{editorViewModel:r,headingLevel:a,messages:i,messagesCommon:o,renderAttachments:this._renderAttachments,renderBatchAttributeForm:this._renderBatchAttributeForm,renderFeatureForm:this._renderFeatureForm,renderSketchToolbar:this._renderSketch,onDelete:this._onDelete,onDeleteAssociation:this._onDeleteAssociation,onSave:this._onSave}):re(L,{helpMessage:this._helpMessage,renderSketchToolbar:this._renderSketch}))}_renderUpdateFeature(e){const{EditorPanel:t,messages:s,messagesCommon:i,headingLevel:o,viewModel:a}=this,r=a.activeFeatureCount>1?s.multiFeature.editPanelTitle:s.singleFeature.editPanelTitle;return re(t,{heading:r,key:"update-feature-panel",...e},re(R,{editorViewModel:a,headingLevel:o,messages:s,messagesCommon:i,renderAttachments:this._renderAttachments,renderBatchAttributeForm:this._renderBatchAttributeForm,renderFeatureForm:this._renderFeatureForm,onDelete:this._onDelete,onDeleteAssociation:this._onDeleteAssociation,onSave:this._onSave}))}_getAssociationTypeTitle(e){const{messages:t}=this;if(!e)return t.singleFeature.editPanelTitle;if(e.title)return e.title;const{messagesFeature:s}=this;switch(e.type){case"attachment":return s.associationsAttachments;case"connectivity":return s.associationsConnectivity;case"structure":return s.associationsStructure;case"content":return s.associationsContents;case"container":return s.associationsContainer}}_getAddAssociationTypeTitle(e){const{messages:t}=this;if(!e)return t.singleFeature.editPanelTitle;const s=t.associations;switch(e.type){case"attachment":return s.addAttachment;case"connectivity":return s.addConnectivity;case"structure":return s.addStructure;case"content":return s.addContent;case"container":return s.addContainer}}async _initializeAssociationItemList(e){const t=(await import("./FeatureForm/FeatureFormUtilityNetworkAssociations/UtilityNetworkAssociationItemList.js")).default;this._associationItemList=new t({view:this.view,viewModel:e})}async _initializeAssociationSettings(){const e=new(0,(await import("./FeatureForm/FeatureFormUtilityNetworkAssociations/UtilityNetworkAssociationSettings.js")).default);return this._associationSettings=e,e}_renderViewAssociatedLayers(e){const{EditorPanel:t,messages:s,messagesCommon:i,headingLevel:o,viewModel:a}=this,r=a.featureFormViewModel?.activeAssociationInput?.activeAssociationType,n=this._getAssociationTypeTitle(r);return re(t,{heading:n,key:"viewing-associated-layers-panel",...e},re(R,{editorViewModel:a,headingLevel:o,messages:s,messagesCommon:i,renderAttachments:this._renderAttachments,renderBatchAttributeForm:this._renderBatchAttributeForm,renderFeatureForm:this._renderFeatureForm,renderSketchToolbar:this._renderSketch,onDelete:this._onDelete,onDeleteAssociation:this._onDeleteAssociation,onSave:this._onSave}))}_renderSelectFeature(e){const{_associationItemList:t,EditorPanel:s,viewModel:i,messagesCommon:o}=this,a=i.utilityNetworkAssociationAddAssociationViewModel,r=this._getAddAssociationTypeTitle(a?.associationType),n="ready"!==a?.state||this.viewModel.featureFormDisabled;return t?re(s,{heading:r,key:"add-association-select-feature",...e},re(V,{key:"select-feature"},re(D,null,t.render())),re(P,{buttons:[t.filterOptionsVisible?{appearance:"solid",label:o.apply,disabled:n,onClick:()=>t.applyFilterOptions(),type:"button"}:void 0,{appearance:"outline",label:o.cancel,disabled:n,onClick:()=>{"update"===i.activeWorkflow?.type&&(a?.reset(),i.activeWorkflow.cancelActiveWorkflow())},type:"button"}]})):re(s,{heading:r,key:"add-association-select-feature",...e})}async _setUpAssociationSettings(){const{viewModel:e}=this,t=this._associationSettings??await this._updatingHandles.addPromise(this._initializeAssociationSettings()),s=e.utilityNetworkAssociationAddAssociationViewModel,i="update"===e.activeWorkflow?.type?e.activeWorkflow:null,o=i?i.activeWorkflow:null,a="add-association"===o?.type?o.sourceFeatureItem:null,r=s?.selectedFeature,n=s?.association,l=s?.utilityNetwork;a&&r&&n&&l&&(t.sourceFeature=a,t.targetFeature=r,t.association=n,t.utilityNetwork=l)}_renderAddAssociation(e){const{_associationSettings:t,EditorPanel:s,viewModel:i,messagesCommon:o}=this;if(!t)return null;const a=i.utilityNetworkAssociationAddAssociationViewModel,r=this._getAddAssociationTypeTitle(a?.associationType),n="ready"!==a?.state;return re(s,{heading:r,key:"add-association",...e},re(V,{key:"add-association-content"},re(D,null,t.render())),re(P,{buttons:[{label:o.add,disabled:n||!a.canAddAssociation,onClick:()=>this._onSave(),type:"button"},{appearance:"outline",label:o.cancel,disabled:n,onClick:()=>{"update"===i.activeWorkflow?.type&&i.activeWorkflow.cancelActiveWorkflow()},type:"button"}]}))}_renderCustomTemplateGroupContent(e){const{messages:t,viewModel:s}=this,i=a(e.group.items,(e=>s.itemHasInvalidFormTemplate(e)?t.formFieldCreateError:void 0));return i?re(j,{kind:"warning",message:i}):null}_renderAttachmentAdding(e){const{EditorPanel:t,_attachments:s,messages:i,messagesCommon:o}=this;return re(t,{heading:i.addAttachment,key:"attachment-adding-panel",...e},re(V,{key:"attachments"},this._renderAttachments()),re(P,{buttons:[{label:s.submitting?o.cancel:o.add,disabled:s.submitting||!s.selectedFile,onClick:this._onAttachmentAdd,type:"button"}]}))}_renderSelectionListPage(e){const{_selectionList:t,messages:s,EditorPanel:i}=this,{batchUpdateActions:o}=this.visibleElements;return re(i,{heading:s.widgetLabel,key:"selection-list-panel",...e},this.visibleElements.selectionToolbar&&"3d"!==this.view?.type?re("div",{class:k.selectionToolbarContainer},this._renderSelectionToolbar()):void 0,re(V,{key:"selection-list"},re(D,null,this._renderSelectionList())),re(P,{buttons:[o?{label:ce(s.batchEditing.editCount,{count:t.visibleFeatureCount}),disabled:t.visibleLayerCount>1||0===t.visibleFeatureCount,onClick:()=>this.startUpdateWorkflowWithActiveSelection(),type:"button"}:void 0],notice:o&&t.visibleLayerCount>1?{text:s.batchEditing.selectOneLayer,icon:"information"}:void 0}))}_renderAttachmentEditing(e){const{EditorPanel:t,_attachments:s,activeWorkflow:i,messages:o,messagesCommon:a}=this;return i?re(t,{heading:o.editAttachment,key:"attachment-editing-panel",...e},re(V,{key:"attachments"},this._renderAttachments()),i.shouldAllowAttachmentEditing?re(P,{buttons:[{label:a.update,disabled:s.submitting||!s.selectedFile,onClick:this._onAttachmentUpdate,type:"button"},{...this._deleteButtonCommonInfo,onClick:this._onAttachmentDelete,disabled:s.submitting,label:a.delete,type:"button"}]}):void 0):null}_renderReady(e){const{EditorPanel:t,messages:s,viewModel:i,visibleElements:o}=this,a=this._helpMessage;return re(t,{heading:s.widgetLabel,key:"landing-panel",...e},re(V,{key:"landing-content"},i.editorItems.length?[o.editFeaturesSection?re(D,{key:"edit-actions"},this._renderUpdateActions()):null,o.createFeaturesSection&&i.canCreateVisible?re(D,{key:"create-actions"},this._renderCreateActions()):null]:re(B,{key:"no-content"},s.noEditableLayers)),a?re("div",{class:k.helpMessage,key:"footer-actions",slot:"footer"},a):void 0)}get _helpMessage(){const{activeWorkflow:e,messages:t,view:s}=this,i=e?.helpMessage;return i?t["3d"===s?.type?"helpMessages3d":"helpMessages2d"]?.[i]:void 0}_renderUpdateActions(){const{messages:e,messagesCommon:t,viewModel:s}=this,i={id:"select",label:t.select};return re("div",{class:k.updateActions,key:"update-actions"},re(Y,{level:X(this.headingLevel)},e.editFeatures),this.visibleElements.selectionToolbar&&"3d"!==this.view?.type?re("div",{class:k.selectionToolbarContainer},this._renderSelectionToolbar()):re("calcite-list",{class:k.updateActionsList,label:e.editFeaturesList,selectionAppearance:"border",selectionMode:"single"},ee({disabled:!s.canUpdateVisible,grouped:!1,item:i,selectedItem:"awaiting-feature-to-update"===s.activeWorkflow?.stepId?i:void 0,renderIcon:this._renderSelectIcon,onItemSelect:this._onToggleUpdateWorkflow})))}_renderCreateActions(){return re("div",{key:"create-actions"},re(Y,{level:X(this.headingLevel)},this.messages.createFeatures),re("div",{class:k.featureTemplatesContainer,key:"templates"},this._renderFeatureTemplates()))}_renderFeatureList(e){const{EditorPanel:t,viewModel:s}=this,{activeWorkflow:i}=s;if("update"!==i?.type)return null;const o=i.data.candidates,a=ce(this.messages.multipleFeaturesTemplate,{total:o.length});return re(t,{heading:a,key:"feature-list",...e},re(S,{editorItems:s.editorItems,editorMessages:this.messages,filterText:this._filterText,id:this.id,messagesTemplates:this.messagesTemplates,workflow:i,onFilterTextChange:e=>this._filterText=e,onSelectFeature:(e,t)=>s.selectFeature(e,t),onZoomTo:e=>s.zoomTo(e)}))}_showPromptAndWait({title:e,message:t,yesLabel:s,noLabel:i}){const o=r(),{view:a}=this,n=a?.focused;return this._showPrompt({title:e,message:t,context:"danger",actions:{primary:{label:s,action:()=>o.resolve(!0)},secondary:{label:i,action:()=>o.resolve(!1)}}}),o.promise.finally((()=>{this._clearPrompt(),n&&a?.focus()}))}async _onSelectionListItemSelect(e){await this.viewModel.onSelectionListItemSelect(e)}async _onSelectionListMenuItemSelect(e){await this.viewModel.onSelectionListMenuItemSelect(e)}async _setupSketch(){if(!!!this.visibleElements.sketch)return this._sketchImportAbortController=o(this._sketchImportAbortController),this._sketchToolbar=i(this._sketchToolbar),void this.removeHandles(de);if(this._sketchImportAbortController)return;const e=new AbortController;this._sketchImportAbortController=e;const t=await import("./Sketch.js");if(!e.signal.aborted)try{this._sketchToolbar=new t.default({toolbarKind:"docked",contextualToolLocation:"inline-end",scale:"s",visibleElements:new Z({deleteButton:!1,settingsMenu:!1,directionModePicker:!1,selectionCountLabel:!1,duplicateButton:!1,createTools:new $({freehandPolygon:!0,freehandPolyline:!0}),selectionTools:new K({"lasso-selection":!1,"rectangle-selection":!1})})}),this.addHandles([n((()=>this.viewModel.activeLeafWorkflow?.availableCreateTools),(e=>{this._sketchToolbar&&(this._sketchToolbar.availableCreateTools=e)}),d),n((()=>this.visibleElements.undoRedoButtons),(e=>{this._sketchToolbar&&(this._sketchToolbar.visibleElements.undoRedoMenu=e)}),d),c((()=>this.viewModel?.sketchViewModel),(e=>{this._sketchToolbar&&(this._sketchToolbar.viewModel=e)}),d)],de)}finally{this._sketchImportAbortController=null}}get test(){return{sketch:this._sketchToolbar,showPrompt:this._showPromptAndWait.bind(this)}}};e([h()],he.prototype,"_batchAttributeForm",void 0),e([h()],he.prototype,"_featureForm",void 0),e([h()],he.prototype,"_sketchToolbar",void 0),e([h()],he.prototype,"_attachments",void 0),e([h()],he.prototype,"_associationItemList",void 0),e([h()],he.prototype,"_associationSettings",void 0),e([h()],he.prototype,"_featureTemplates",void 0),e([h()],he.prototype,"_filterText",void 0),e([h()],he.prototype,"_prompt",void 0),e([h()],he.prototype,"_spinner",void 0),e([h()],he.prototype,"_deleteButtonCommonInfo",null),e([h()],he.prototype,"_loading",void 0),e([h()],he.prototype,"_selectionList",void 0),e([h()],he.prototype,"_selectionListItemActionConfigs",null),e([h()],he.prototype,"_selectionToolbar",void 0),e([h({readOnly:!0})],he.prototype,"activeWorkflow",null),e([h()],he.prototype,"effectiveSelectionManager",null),e([h()],he.prototype,"headingLevel",void 0),e([h()],he.prototype,"hideTemplatesForInactiveLayers",null),e([h()],he.prototype,"icon",null),e([h()],he.prototype,"label",null),e([h()],he.prototype,"labelOptions",null),e([h()],he.prototype,"layerInfos",null),e([h(),oe("esri/widgets/Editor/t9n/Editor")],he.prototype,"messages",void 0),e([h(),oe("esri/t9n/common")],he.prototype,"messagesCommon",void 0),e([h(),oe("esri/widgets/FeatureTemplates/t9n/FeatureTemplates")],he.prototype,"messagesTemplates",void 0),e([h(),oe("esri/widgets/Feature/t9n/Feature")],he.prototype,"messagesFeature",void 0),e([h()],he.prototype,"snappingOptions",null),e([h()],he.prototype,"tooltipOptions",null),e([h()],he.prototype,"supportingWidgetDefaults",void 0),e([h({type:u,nonNullable:!0})],he.prototype,"valueOptions",null),e([h()],he.prototype,"view",null),e([h(),ae(["sketch-create","sketch-delete","sketch-update","workflow-cancel","workflow-commit"])],he.prototype,"viewModel",void 0),e([h({type:M,nonNullable:!0})],he.prototype,"visibleElements",void 0),e([h()],he.prototype,"_helpMessage",null),he=e([m("esri.widgets.Editor")],he);const me=he;export{me as default};
|
package/widgets/Expand.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../chunks/tslib.es6.js";import{watch as t,initial as o}from"../core/reactiveUtils.js";import{property as n}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/Logger.js";import"../core/RandomLCG.js";import{subclass as s}from"../core/accessorSupport/decorators/subclass.js";import i from"./Widget.js";import l from"./Expand/ExpandViewModel.js";import{loadCalciteComponents as r}from"./support/componentsUtils.js";import{globalCss as a}from"./support/globalCss.js";import{isWidget as p,hasDomNode as c}from"./support/widget.js";import{messageBundle as d}from"./support/decorators/messageBundle.js";import{tsx as h}from"./support/jsxFactory.js";const u="esri-expand",m={base:u,toggle:`${u}__toggle`,popoverContent:`${u}__popover-content`,panel:`${u}__panel`,panelContent:`${u}__panel-content`,sheet:`${u}__sheet`,contentContainer:`${u}__content-container`,icon:"esri-collapse__icon",iconFlip:"esri-collapse__icon-flip",iconNumber:`${u}__icon-number`},g="chevrons-left",_="chevrons-right";let v=class extends i{constructor(e,t){super(e,t),this.closeOnEsc=!0,this.collapseTooltip="",this.content="",this.expandTooltip="",this.focusTrapDisabled=!1,this.iconNumber=0,this.messages=null,this.messagesCommon=null,this.mode="auto",this.placement=null,this.viewModel=new l,this.toggle=()=>{this.viewModel.expanded=!this.viewModel.expanded},this._handlePopoverClose=e=>{e.target===this._popoverEl&&(this.viewModel.expanded=e.currentTarget.open)},this._handleSheetClose=e=>{this.viewModel.expanded=e.currentTarget.open},this._handlePanelClose=e=>{this.viewModel.expanded=!e.currentTarget.closed},this._handleKeyDown=e=>{this.viewModel.expanded&&"Escape"===e.key&&!this._willCloseOnEsc(e)&&e.preventDefault()},this._storeToggleActionEl=e=>{this._toggleActionEl=e},this._storePopoverEl=e=>{this._popoverEl=e}}initialize(){this.addHandles(t((()=>this.viewModel?.view?.size),(()=>this._popoverEl?.reposition()),o))}loadDependencies(){return r({action:()=>import("@esri/calcite-components/dist/components/calcite-action"),icon:()=>import("@esri/calcite-components/dist/components/calcite-icon"),panel:()=>import("@esri/calcite-components/dist/components/calcite-panel"),popover:()=>import("@esri/calcite-components/dist/components/calcite-popover"),sheet:()=>import("@esri/calcite-components/dist/components/calcite-sheet")})}get expandTitle(){const{expanded:e,messagesCommon:t,collapseTooltip:o,expandTooltip:n}=this;return(e?o||t?.collapse:n||t?.expand)??""}get _displaySheet(){switch(this.mode){case"drawer":return!0;case"auto":return"xsmall"===this.viewModel.view?.widthBreakpoint;default:return!1}}get autoCollapse(){return this.viewModel.autoCollapse}set autoCollapse(e){this.viewModel.autoCollapse=e}get collapseIcon(){return _}set collapseIcon(e){this._overrideIfSome("collapseIcon",e)}get expanded(){return this.viewModel.expanded}set expanded(e){this.viewModel.expanded=e}get expandIcon(){return"object"==typeof this.content&&"icon"in this.content&&this.content.icon?this.content.icon:g}set expandIcon(e){this._overrideIfSome("expandIcon",e)}get group(){return this.viewModel.group}set group(e){this.viewModel.group=e}get icon(){return null}get label(){return"object"==typeof this.content&&"label"in this.content&&this.content.label?this.content.label:this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}expand(){this.viewModel.expanded=!0}collapse(){this.viewModel.expanded=!1}render(){const{_displaySheet:e,_toggleActionEl:t,viewModel:{expanded:o},label:n,placement:s}=this;return h("div",{class:this.classes(m.base,a.widget)},this._renderToggle(),e?h("calcite-sheet",{class:m.sheet,heightScale:"l",label:n,onkeydown:this._handleKeyDown,open:o,position:"block-end",onCalciteSheetClose:this._handleSheetClose},h("calcite-panel",{class:m.panel,closable:!0,closed:!o,heading:n,onkeydown:this._handleKeyDown,onCalcitePanelClose:this._handlePanelClose},h("div",{class:m.panelContent},this._renderContent()))):t?h("calcite-popover",{afterCreate:this._storePopoverEl,afterUpdate:this._storePopoverEl,focusTrapDisabled:this.focusTrapDisabled,label:n,onkeydown:this._handleKeyDown,open:o,overlayPositioning:"fixed",placement:s??this._getPlacement(),referenceElement:t,onCalcitePopoverClose:this._handlePopoverClose},h("div",{class:m.popoverContent},this._renderContent())):null)}_getPlacement(){const{container:e,view:t}=this,o=e&&t?t.ui.getPosition(e):null;if(!o||"manual"===o)return"auto";const[n,s]=o.split("-");return`${"right"===s?"left":"right"}-${"bottom"===n?"end":"start"}`}_willCloseOnEsc(e){const{closeOnEsc:t}=this;return"function"==typeof t?t(e):t}_renderBadgeNumber(){const{expanded:e,iconNumber:t}=this;return t&&!e?h("span",{class:m.iconNumber,key:"expand__icon-number"},t):null}_renderToggleButton(){const{expanded:e,expandTitle:t,expandIcon:o,collapseIcon:n}=this,s=e?n:o,i=s===g||s===_;return h("calcite-action",{afterCreate:this._storeToggleActionEl,afterUpdate:this._storeToggleActionEl,class:a.widgetButton,onclick:this.toggle,scale:"s",text:t,title:t},s?h("calcite-icon",{class:this.classes(m.icon,i&&m.iconFlip),icon:s,scale:"s"}):null)}_renderToggle(){return h("div",{class:m.toggle},this._renderToggleButton(),this._renderBadgeNumber())}_renderContent(){const{content:e}=this;return"string"==typeof e?h("div",{class:m.contentContainer,innerHTML:e,key:"content__string"}):p(e)?h("div",{class:m.contentContainer,key:"content__widget"}
|
|
5
|
+
import{_ as e}from"../chunks/tslib.es6.js";import{watch as t,initial as o}from"../core/reactiveUtils.js";import{property as n}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/Logger.js";import"../core/RandomLCG.js";import{subclass as s}from"../core/accessorSupport/decorators/subclass.js";import i from"./Widget.js";import l from"./Expand/ExpandViewModel.js";import{loadCalciteComponents as r}from"./support/componentsUtils.js";import{globalCss as a}from"./support/globalCss.js";import{isWidget as p,hasDomNode as c}from"./support/widget.js";import{messageBundle as d}from"./support/decorators/messageBundle.js";import{tsx as h}from"./support/jsxFactory.js";const u="esri-expand",m={base:u,toggle:`${u}__toggle`,popoverContent:`${u}__popover-content`,panel:`${u}__panel`,panelContent:`${u}__panel-content`,sheet:`${u}__sheet`,contentContainer:`${u}__content-container`,icon:"esri-collapse__icon",iconFlip:"esri-collapse__icon-flip",iconNumber:`${u}__icon-number`},g="chevrons-left",_="chevrons-right";let v=class extends i{constructor(e,t){super(e,t),this.closeOnEsc=!0,this.collapseTooltip="",this.content="",this.expandTooltip="",this.focusTrapDisabled=!1,this.iconNumber=0,this.messages=null,this.messagesCommon=null,this.mode="auto",this.placement=null,this.viewModel=new l,this.toggle=()=>{this.viewModel.expanded=!this.viewModel.expanded},this._handlePopoverClose=e=>{e.target===this._popoverEl&&(this.viewModel.expanded=e.currentTarget.open)},this._handleSheetClose=e=>{this.viewModel.expanded=e.currentTarget.open},this._handlePanelClose=e=>{this.viewModel.expanded=!e.currentTarget.closed},this._handleKeyDown=e=>{this.viewModel.expanded&&"Escape"===e.key&&!this._willCloseOnEsc(e)&&e.preventDefault()},this._storeToggleActionEl=e=>{this._toggleActionEl=e},this._storePopoverEl=e=>{this._popoverEl=e}}initialize(){this.addHandles(t((()=>this.viewModel?.view?.size),(()=>this._popoverEl?.reposition()),o))}loadDependencies(){return r({action:()=>import("@esri/calcite-components/dist/components/calcite-action"),icon:()=>import("@esri/calcite-components/dist/components/calcite-icon"),panel:()=>import("@esri/calcite-components/dist/components/calcite-panel"),popover:()=>import("@esri/calcite-components/dist/components/calcite-popover"),sheet:()=>import("@esri/calcite-components/dist/components/calcite-sheet")})}get expandTitle(){const{expanded:e,messagesCommon:t,collapseTooltip:o,expandTooltip:n}=this;return(e?o||t?.collapse:n||t?.expand)??""}get _displaySheet(){switch(this.mode){case"drawer":return!0;case"auto":return"xsmall"===this.viewModel.view?.widthBreakpoint;default:return!1}}get autoCollapse(){return this.viewModel.autoCollapse}set autoCollapse(e){this.viewModel.autoCollapse=e}get collapseIcon(){return _}set collapseIcon(e){this._overrideIfSome("collapseIcon",e)}get expanded(){return this.viewModel.expanded}set expanded(e){this.viewModel.expanded=e}get expandIcon(){return"object"==typeof this.content&&"icon"in this.content&&this.content.icon?this.content.icon:g}set expandIcon(e){this._overrideIfSome("expandIcon",e)}get group(){return this.viewModel.group}set group(e){this.viewModel.group=e}get icon(){return null}get label(){return"object"==typeof this.content&&"label"in this.content&&this.content.label?this.content.label:this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}expand(){this.viewModel.expanded=!0}collapse(){this.viewModel.expanded=!1}render(){const{_displaySheet:e,_toggleActionEl:t,viewModel:{expanded:o},label:n,placement:s}=this;return h("div",{class:this.classes(m.base,a.widget)},this._renderToggle(),e?h("calcite-sheet",{class:m.sheet,heightScale:"l",label:n,onkeydown:this._handleKeyDown,open:o,position:"block-end",onCalciteSheetClose:this._handleSheetClose},h("calcite-panel",{class:m.panel,closable:!0,closed:!o,heading:n,onkeydown:this._handleKeyDown,onCalcitePanelClose:this._handlePanelClose},h("div",{class:m.panelContent},this._renderContent()))):t?h("calcite-popover",{afterCreate:this._storePopoverEl,afterUpdate:this._storePopoverEl,focusTrapDisabled:this.focusTrapDisabled,label:n,onkeydown:this._handleKeyDown,open:o,overlayPositioning:"fixed",placement:s??this._getPlacement(),referenceElement:t,onCalcitePopoverClose:this._handlePopoverClose},h("div",{class:m.popoverContent},this._renderContent())):null)}_getPlacement(){const{container:e,view:t}=this,o=e&&t?t.ui.getPosition(e):null;if(!o||"manual"===o)return"auto";const[n,s]=o.split("-");return`${"right"===s?"left":"right"}-${"bottom"===n?"end":"start"}`}_willCloseOnEsc(e){const{closeOnEsc:t}=this;return"function"==typeof t?t(e):t}_renderBadgeNumber(){const{expanded:e,iconNumber:t}=this;return t&&!e?h("span",{class:m.iconNumber,key:"expand__icon-number"},t):null}_renderToggleButton(){const{expanded:e,expandTitle:t,expandIcon:o,collapseIcon:n}=this,s=e?n:o,i=s===g||s===_;return h("calcite-action",{afterCreate:this._storeToggleActionEl,afterUpdate:this._storeToggleActionEl,class:a.widgetButton,onclick:this.toggle,scale:"s",text:t,title:t},s?h("calcite-icon",{class:this.classes(m.icon,i&&m.iconFlip),icon:s,scale:"s"}):null)}_renderToggle(){return h("div",{class:m.toggle},this._renderToggleButton(),this._renderBadgeNumber())}_renderContent(){const{content:e}=this;return"string"==typeof e?h("div",{class:m.contentContainer,innerHTML:e,key:"content__string"}):p(e)?h("div",{afterCreate:t=>e.container=t,class:m.contentContainer,key:"content__widget"}):e instanceof HTMLElement?h("div",{afterCreate:this._attachToNode,bind:e,class:m.contentContainer,key:"content__html-element"}):c(e)?h("div",{afterCreate:this._attachToNode,bind:e.domNode,class:m.contentContainer,key:"content__node"}):null}_attachToNode(e){const t=this;e.appendChild(t)}};e([n({readOnly:!0})],v.prototype,"expandTitle",null),e([n()],v.prototype,"_toggleActionEl",void 0),e([n()],v.prototype,"_displaySheet",null),e([n()],v.prototype,"autoCollapse",null),e([n()],v.prototype,"closeOnEsc",void 0),e([n()],v.prototype,"collapseIcon",null),e([n()],v.prototype,"collapseTooltip",void 0),e([n()],v.prototype,"content",void 0),e([n()],v.prototype,"expanded",null),e([n()],v.prototype,"expandIcon",null),e([n()],v.prototype,"expandTooltip",void 0),e([n()],v.prototype,"focusTrapDisabled",void 0),e([n()],v.prototype,"group",null),e([n()],v.prototype,"icon",null),e([n()],v.prototype,"iconNumber",void 0),e([n()],v.prototype,"label",null),e([n(),d("esri/widgets/Expand/t9n/Expand")],v.prototype,"messages",void 0),e([n(),d("esri/t9n/common")],v.prototype,"messagesCommon",void 0),e([n()],v.prototype,"mode",void 0),e([n()],v.prototype,"placement",void 0),e([n()],v.prototype,"view",null),e([n({type:l})],v.prototype,"viewModel",void 0),v=e([s("esri.widgets.Expand")],v);const w=v;export{w as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../chunks/tslib.es6.js";import"../../intl.js";import{stripHTML as t}from"../../core/string.js";import{property as i}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as s}from"../../core/accessorSupport/decorators/subclass.js";import
|
|
5
|
+
import{_ as e}from"../../chunks/tslib.es6.js";import"../../intl.js";import{stripHTML as t}from"../../core/string.js";import{property as i}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as s}from"../../core/accessorSupport/decorators/subclass.js";import o from"./FeatureUtilityNetworkAssociations/VisibleElements.js";import{loadCalciteComponents as l}from"../support/componentsUtils.js";import{globalCss as r}from"../support/globalCss.js";import"../support/widgetUtils.js";import{tsx as n,tsxFragment as a}from"../support/jsxFactory.js";import c from"../support/UtilityNetworkAssociations/FeatureUtilityNetworkAssociationsViewModel.js";import d from"../support/UtilityNetworkAssociations/UtilityNetworkAssociationList.js";import{formatPercentAlong as p}from"../support/UtilityNetworkAssociations/utils/formatPercentAlong.js";import{isConnectivity as u}from"../support/UtilityNetworkAssociations/utils/isConnectivity.js";import{isConnectivityMidspan as m}from"../support/UtilityNetworkAssociations/utils/isConnectivityMidspan.js";import{substitute as h}from"../../intl/substitute.js";var w;const y="esri-feature-utility-network-associations",f={base:y,listItemHidden:`${y}__list-item--hidden`},b="nested";let v=w=class extends d{constructor(e,t){super(e,t),this.description=null,this.flowItems=null,this.flowType="feature-utility-network-association-type",this.listType=null,this.parentFeatureViewModel=null,this.title=null,this.viewModel=new c,this.visibleElements=new o}initialize(){this.setUpObserver()}loadDependencies(){return l({chip:()=>import("@esri/calcite-components/dist/components/calcite-chip"),icon:()=>import("@esri/calcite-components/dist/components/calcite-icon"),list:()=>import("@esri/calcite-components/dist/components/calcite-list"),"list-item":()=>import("@esri/calcite-components/dist/components/calcite-list-item"),tooltip:()=>import("@esri/calcite-components/dist/components/calcite-tooltip")})}destroy(){this.tooltipReferenceMap.clear()}render(){const e=this.viewModel.associationViewModels,{state:t,showAllEnabled:i}=this.viewModel,{state:s}=this.parentFeatureViewModel??{};return n("div",{class:this.classes(f.base,r.widget)},"loading"===t||"querying"===t||"loading"===s?this.renderLoading():n("calcite-list",{displayMode:b,label:this.selectedLayer?.title??this.messagesCommon.untitled},i&&this.selectedLayer?n(a,null,this.renderFilter(),this.renderFeatureCountWarning(),this._renderAssociatedFeatureListPage(),this.renderFeatureObserver()):Array.from(e.keys(),(t=>this._renderTypeList(t,e.get(t))))))}_showAllAssociations(e){const{flowItems:t,viewModel:i,description:s}=this;if(!t||!e)return;i.showAllEnabled=!0;const l=new w({selectedLayer:e,title:e?.title,flowItems:t,parentFeatureViewModel:this.parentFeatureViewModel,featureVisibleElements:this.featureVisibleElements,description:s,visibleElements:new o({title:!1,description:!1}),viewModel:i});t.push(l)}_renderAssociatedFeatureListPage(){const e=this.viewModel.associationViewModels.get(this.selectedLayer).filter((e=>e.title.toLowerCase().includes(this.filterText))).slice(0,this.endIndex);return[...this._renderTooltips(e),...this._renderAssociatedFeatureList(e)]}_renderItemTooltip(e){const{tooltipReferenceMap:t}=this;return u(e.association)?n("calcite-tooltip",{key:`tooltip-${e.featureViewModel.uid}`,overlayPositioning:"fixed",referenceElement:t.get(e.featureViewModel.uid)},this.getConnectivityTooltip(e.association.associationType)):null}_renderAssociatedFeature(e){const{featureViewModel:i,title:s}=e,o="loading"===i.state,l=this._findFlowItem(i),r=l<0&&this._isParentFeature(i),a=r||l>=0;return n("calcite-list-item",{class:o?f.listItemHidden:void 0,description:t(e.terminalName??""),key:`associated-feature-type-${i.uid}`,label:t(s),onCalciteListItemSelect:()=>this._handleFeatureClick(r,l,i)},u(e.association)?this.renderConnectivityIcon(e.association.associationType,e.featureViewModel.uid):null,m(e.association)?n("calcite-chip",{label:p(e.association),scale:"s",slot:"content-end"},p(e.association)):null,this._renderChevronIconNode(a))}async _selectAssociation(e){const{flowItems:t,featureVisibleElements:i}=this;if(!t)return;e.abilities={utilityNetworkAssociationsContent:!0};const{default:s}=await import("../Feature.js");t.push(new s({flowItems:t,flowType:"feature-association",viewModel:e,visibleElements:i}))}_handleFeatureClick(e,t,i){if(e)this.flowItems.drain((e=>{"showAllEnabled"in e.viewModel&&(e.viewModel.showAllEnabled=!1),e.viewModel=null,e.destroy()}));else if(t<0||!this.flowItems)this._selectAssociation(i);else for(;this.flowItems.length>t+1;){const e=this.flowItems.pop();e&&("showAllEnabled"in e.viewModel&&(e.viewModel.showAllEnabled=!1),e.viewModel=null,e.destroy())}}_featureViewModelMatch(e,t){const i=e.graphic,s=i?.layer;let o=null;"subtype-sublayer"===s?.type&&s.parent?o=s.parent.globalIdField??null:s&&"globalIdField"in s&&(o=s.globalIdField);const l=o?i?.attributes[o]:null,r=t.graphic,n=r?.layer;let a=null;"subtype-sublayer"===n?.type&&n.parent?a=n.parent.globalIdField??null:n&&"globalIdField"in n&&(a=n.globalIdField);const c=a?r?.attributes[a]:null;return l&&c&&l===c}_isParentFeature(e){const t=this.flowItems?.getItemAt(0);if(!t)return!1;const i=t.parentFeatureViewModel;return this._featureViewModelMatch(i,e)}_findFlowItem(e){return this.flowItems?.findIndex((t=>{if("feature-association"!==t.flowType)return!1;const i=t.viewModel;return this._featureViewModelMatch(i,e)}))??-1}_renderTooltips(e){return e.toArray().map((e=>this._renderItemTooltip(e)))}_renderAssociatedFeatureList(e){return e.toArray().map((e=>this._renderAssociatedFeature(e)))}_renderChevronIconNode(e){return n("calcite-icon",{flipRtl:!0,icon:e?"move-up":"chevron-right",scale:"s",slot:"content-end"})}_renderTypeList(e,t){const{messagesFeature:i}=this,{displayCount:s}=this.viewModel,o=t.slice(0,s),l=o.length<t.length;return n("calcite-list-item",{expanded:!0,key:"show-all",label:e.title,value:e.id},n("calcite-chip",{label:String(t.length),scale:"s",slot:"content-end"},t.length),n("calcite-list",{group:e.id,label:e.title??""},[this._renderTooltips(o),this._renderAssociatedFeatureList(o)],l?n("calcite-list-item",{description:h(i?.numberRecords,{number:t.length.toString()}),key:"show-all-item",label:i.showAll,onCalciteListItemSelect:()=>this._showAllAssociations(e)},n("calcite-icon",{icon:"list",scale:"s",slot:"content-end"})):null))}};e([i()],v.prototype,"description",void 0),e([i()],v.prototype,"featureVisibleElements",void 0),e([i()],v.prototype,"flowItems",void 0),e([i()],v.prototype,"flowType",void 0),e([i()],v.prototype,"listType",void 0),e([i()],v.prototype,"parentFeatureViewModel",void 0),e([i()],v.prototype,"title",void 0),e([i({type:c})],v.prototype,"viewModel",void 0),e([i({type:o,nonNullable:!0})],v.prototype,"visibleElements",void 0),v=w=e([s("esri.widgets.Feature.FeatureUtilityNetworkAssociationList")],v);const g=v;export{g as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../chunks/tslib.es6.js";import t from"../../Graphic.js";import{FeatureSetQueryInterceptor as i}from"../../arcade/featureset/support/FeatureSetQueryInterceptor.js";import s from"../../core/Accessor.js";import{isSome as o}from"../../core/arrayUtils.js";import{createTask as r}from"../../core/asyncUtils.js";import a from"../../core/Collection.js";import n from"../../core/Identifiable.js";import l from"../../core/Logger.js";import{abortMaybe as p}from"../../core/maybe.js";import{eachAlways as c,isAbortError as d,throwIfAborted as h}from"../../core/promiseUtils.js";import{watch as u,when as m,initial as f,on as _,whenOnce as y}from"../../core/reactiveUtils.js";import{throttle as g}from"../../core/throttle.js";import{property as b}from"../../core/accessorSupport/decorators/property.js";import{cast as w}from"../../core/accessorSupport/decorators/cast.js";import"../../core/has.js";import{subclass as v}from"../../core/accessorSupport/decorators/subclass.js";import A from"../../geometry/Point.js";import I from"../../geometry/SpatialReference.js";import M from"../../popup/content/TextContent.js";import{getFeaturePopupTitle as x}from"../../support/popupUtils.js";import{system as T}from"../../time/constants.js";import C from"./FeatureAttachments/FeatureAttachmentsViewModel.js";import F from"./FeatureContent/FeatureContentViewModel.js";import E from"./FeatureExpression/FeatureExpressionViewModel.js";import V from"./FeatureFields/FeatureFieldsViewModel.js";import j from"./FeatureMedia/FeatureMediaViewModel.js";import k from"./FeatureRelationship/FeatureRelationshipViewModel.js";import{compileExpressionInfos as P,formatArcadeValue as R}from"./support/arcadeFeatureUtils.js";import{preLayerQueryCallback as L,preRequestCallback as O,createFieldInfoMap as U,getAllFieldInfos as N,getSourceLayer as Z,querySourceLayer as B,queryUpdatedFeature as S,isRelatableFeatureSupportedLayer as H,isAssociatedFeatureSupportedLayer as D,substituteFieldsInLinksAndAttributes as G,isExpressionField as q,isRelatedField as z,formatEditInfo as Q,graphicCallback as J,formatAttributes as K}from"./support/featureUtils.js";import{queryLayerInfos as W,queryRelatedFeatures as X,setRelatedFeatures as Y,getRelatedFieldInfo as $,createRelatedInfo as ee,updateRelatedInfo as te}from"./support/relatedFeatureUtils.js";import ie from"../support/UtilityNetworkAssociations/FeatureUtilityNetworkAssociationsViewModel.js";var se;const oe=1,re="content-view-models",ae="relationship-view-models",ne="association-view-models",le={attachmentsContent:!0,chartAnimation:!0,customContent:!0,expressionContent:!0,fieldsContent:!0,mediaContent:!0,textContent:!0,relationshipContent:!0,utilityNetworkAssociationsContent:!0};let pe=class extends(n.IdentifiableMixin(s)){static{se=this}constructor(e){super(e),this._error=null,this._graphicChangedTask=null,this._evaluateExpressionAttributesTask=null,this._associationVMAbortController=null,this._expressionAttributes=null,this._graphicExpressionAttributes=null,this.abilities={...le},this.content=null,this.contentViewModels=[],this.description=null,this.defaultPopupTemplateEnabled=!1,this.formattedAttributes=null,this.lastEditInfo=null,this.location=null,this.relatedInfos=new Map,this.title="",this.view=null,this._graphicChangedThrottled=g(this._graphicChanged,(()=>this.notifyChange("waitingForContent")),oe,this),this._isAllowedContentType=e=>{const{abilities:t}=this;return"attachments"===e.type&&!!t.attachmentsContent||"custom"===e.type&&!!t.customContent||"fields"===e.type&&!!t.fieldsContent||"media"===e.type&&!!t.mediaContent||"text"===e.type&&!!t.textContent||"expression"===e.type&&!!t.expressionContent||"relationship"===e.type&&!!t.relationshipContent||"utility-network-associations"===e.type&&!!t.utilityNetworkAssociationsContent},this._evaluateExpressionAttributesThrottled=g(this._evaluateExpressionAttributes,(()=>this.notifyChange("waitingForContent")),oe,this),this.addHandles([u((()=>[this.graphic,this._effectivePopupTemplate,this.abilities,this.timeZone]),(()=>this._graphicChangedThrottled()),f),m((()=>{if(!this._graphicChangedTask?.finished||null==this._graphicChangedTask.value)return null;const e=this._graphicChangedTask.value,t=e?.expressionInfos?.dependencies;return[e,t?.has("view-scale")?this.view?.scale:null,t?.has("view-time-extent")?this.view?.timeExtent?.start:null,t?.has("view-time-extent")?this.view?.timeExtent?.end:null]}),(([e])=>this._evaluateExpressionAttributesThrottled(e)))])}initialize(){this.addHandles([this._graphicChangedThrottled,this._evaluateExpressionAttributesThrottled])}destroy(){this._clear(),this._graphicChangedTask=p(this._graphicChangedTask),this._evaluateExpressionAttributesTask=p(this._evaluateExpressionAttributesTask),this._error=null,this.graphic=null,this._destroyContentViewModels(),this.relatedInfos.clear()}static{this.interceptor=new i(L,O)}get _effectivePopupTemplate(){return null!=this.graphic?this.graphic.getEffectivePopupTemplate(this.defaultPopupTemplateEnabled):null}get _fieldInfoMap(){return U(N(this._effectivePopupTemplate),this._sourceLayer)}get _sourceLayer(){return Z(this.graphic)}castAbilities(e){return{...le,...e}}get isFeatureFromTable(){return this._sourceLayer?.isTable||!1}get state(){return this.graphic?this._error?"error":this.waitingForContent?"loading":"ready":"disabled"}set graphic(e){this._set("graphic",e?.clone()??null)}get spatialReference(){return this.view?.spatialReference??null}set spatialReference(e){this._override("spatialReference",e)}get timeZone(){return this.view?.timeZone??T}set timeZone(e){this._overrideIfSome("timeZone",e)}get map(){return this.view?.map||null}set map(e){this._override("map",e)}get waitingForContent(){const{_graphicChangedThrottled:e,_evaluateExpressionAttributesThrottled:t,_graphicChangedTask:i,_evaluateExpressionAttributesTask:s,_associationVMAbortController:o}=this;return e.hasPendingUpdates()||t.hasPendingUpdates()||null!=i&&!i.finished||null!=s&&!s.finished||!!o}setActiveMedia(e,t){const i=this.contentViewModels[e];i instanceof j&&i.setActiveMedia(t)}nextMedia(e){const t=this.contentViewModels[e];t instanceof j&&t.next()}previousMedia(e){const t=this.contentViewModels[e];t instanceof j&&t.previous()}async updateGeometry(){const{graphic:e,spatialReference:t,_sourceLayer:i}=this;await(i?.load());const s=i?.objectIdField;if(!s||!e||!i)return;const o=e?.attributes?.[s];if(null==o)return;const r=[o];if(!e.geometry){const s=await B({layer:i,graphic:e,outFields:[],objectIds:r,returnGeometry:!0,spatialReference:t}),o=s?.geometry;o&&(e.geometry=o)}}_clear(){this._set("title",""),this._set("content",null),this._set("formattedAttributes",null)}_graphicChanged(){this._evaluateExpressionAttributesTask=p(this._evaluateExpressionAttributesTask),this._graphicChangedTask=p(this._graphicChangedTask),this._graphicChangedTask=r((async e=>{this._error=null,this._clear();const{graphic:t}=this;try{if(!t)return null;const{_sourceLayer:i,_effectivePopupTemplate:s}=this,o=this.spatialReference;await S({graphic:t,popupTemplate:s,layer:i,spatialReference:o},{signal:e});const[{value:r},{value:a}]=await c([this._getContent(),this._getTitle()]),[,{value:n}]=await c([this._checkForRelatedFeatures({signal:e}),P(s?.expressionInfos,t)]);return{expressionInfos:n,content:r,title:a}}catch(i){throw d(i)||(this._error=i,l.getLogger(this).error("error","The popupTemplate could not be displayed for this feature.",{error:i,graphic:t,popupTemplate:this._effectivePopupTemplate})),i}}))}_compileContentElement(e,t){return"attachments"===e.type?this._compileAttachments(e,t):"custom"===e.type?this._compileCustom(e,t):"fields"===e.type?this._compileFields(e,t):"media"===e.type?this._compileMedia(e,t):"text"===e.type?this._compileText(e,t):"expression"===e.type?this._compileExpression(e,t):"relationship"===e.type?this._compileRelationship(e,t):"utility-network-associations"===e.type?this._compileUtilityNetworkAssociation(e,t):void 0}_compileContent(e){if(this._destroyContentViewModels(),this.graphic)return Array.isArray(e)?e.filter(this._isAllowedContentType).map(((e,t)=>this._compileContentElement(e,t))).filter(o):"string"==typeof e?this._compileText(new M({text:e}),0).text:e}_destroyContentViewModels(){this.removeHandles(ae),this.removeHandles(re),this.contentViewModels.forEach((e=>e&&!e.destroyed&&e.destroy())),this._set("contentViewModels",[])}_matchesFeature(e,t){const i=e?.graphic?.getObjectId(),s=t?.getObjectId();return null!=i&&null!=s&&i===s}_setRelatedFeaturesViewModels({relatedFeatureViewModels:e,relatedFeatures:t,map:i}){const{view:s,spatialReference:o,timeZone:r}=this;t?.filter(Boolean).forEach((t=>{e.some((e=>this._matchesFeature(e,t)))||e.add(new se({abilities:{relationshipContent:!1},map:i,view:s,spatialReference:o,timeZone:r,graphic:t}))})),e.forEach((i=>{const s=t?.find((e=>this._matchesFeature(i,e)));s||e.remove(i)}))}_setExpressionContentVM(e,t){const i=this.formattedAttributes,{contentElement:s,contentElementViewModel:o}=e,r=s?.type;o&&r&&("fields"===r&&(this._createFieldsFormattedAttributes({contentElement:s,contentElementIndex:t,formattedAttributes:i}),o.set(this._createFieldsVMParams(s,t))),"media"===r&&(this._createMediaFormattedAttributes({contentElement:s,contentElementIndex:t,formattedAttributes:i}),o.set(this._createMediaVMParams(s,t))),"text"===r&&o.set(this._createTextVMParams(s)))}_compileRelationship(e,t){const{displayCount:i,orderByFields:s,relationshipId:o,title:r,description:a}=e,{_sourceLayer:n,graphic:l,map:p}=this;if(!H(n))return;const c=new k({displayCount:i,graphic:l,orderByFields:s,relationshipId:o,layer:n,map:p,...this._compileTitleAndDesc({title:r,description:a})});return this.contentViewModels[t]=c,this.addHandles(_((()=>c.relatedFeatures),"change",(()=>this._setRelatedFeaturesViewModels(c))),ae),e}_matchesGlobalFeature(e,t){const i=e?.association.globalId,s=t?.association.globalId;return null!=i&&null!=s&&i===s}async _setUpUtilityNetworkAssociationsViewModels(e,t,i){const{view:s,spatialReference:o,timeZone:r}=this;e.forEach(((i,s)=>{const o=t.get(s);o?i.forEach((t=>{o.find((e=>this._matchesGlobalFeature(t,e)))||(i.remove(t),0===i.length&&e.delete(s))})):(i.removeAll(),e.delete(s))})),t.forEach(((t,n)=>{const l=e.get(n)||new a;t?.filter(Boolean).forEach((e=>{l.some((t=>this._matchesGlobalFeature(t,e)))||l.add({association:e.association,featureViewModel:new se({abilities:{utilityNetworkAssociationsContent:!1},map:i,view:s,spatialReference:o,timeZone:r,graphic:e.feature}),terminalName:e.terminalName})})),e.set(n,l)}));const n=new AbortController;this._associationVMAbortController=n,await this._sortListObjectsByTitle(e,{signal:n.signal}),this._associationVMAbortController===n&&(this._associationVMAbortController=null)}async _sortListObjectsByTitle(e,t){for(const i of e.values()){const e=i.map((e=>y((()=>"ready"===e.featureViewModel.state),t?.signal)));await Promise.all(e),i.sort(this._compareByFeatureTitle)}}_compareByFeatureTitle(e,t){const i=x(e.featureViewModel),s=x(t.featureViewModel);return i.localeCompare(s,void 0,{numeric:!0})}_compileUtilityNetworkAssociation(e,t){const{displayCount:i,title:s,description:o,associationTypes:r}=e,{_sourceLayer:a,graphic:n,map:l}=this;if(!D(a))return;const p=new ie({graphic:n,displayCount:i,associationTypes:r,layer:a,map:l,...this._compileTitleAndDesc({title:s,description:o})});return this.contentViewModels[t]=p,this.addHandles([u((()=>p.associationFeatures.values()),(()=>this._setUpUtilityNetworkAssociationsViewModels(p.associationViewModels,p.associationFeatures,p.map)))],ne),e}_compileExpression(e,t){const{expressionInfo:i}=e,{graphic:s,map:o,spatialReference:r,view:a,location:n}=this,l=new E({expressionInfo:i,graphic:s,interceptor:se.interceptor,map:o,spatialReference:r,view:a,location:n});return this.contentViewModels[t]=l,this.addHandles(u((()=>l.contentElementViewModel),(()=>this._setExpressionContentVM(l,t)),f),re),e}_compileAttachments(e,t){const{graphic:i}=this,{description:s,title:o,orderByFields:r}=e;return this.contentViewModels[t]=new C({graphic:i,orderByFields:r,...this._compileTitleAndDesc({title:o,description:s})}),e}_compileCustom(e,t){const{graphic:i}=this,{creator:s,destroyer:o}=e;return this.contentViewModels[t]=new F({graphic:i,creator:s,destroyer:o}),e}_compileTitleAndDesc({title:e,description:t}){const{_fieldInfoMap:i,_sourceLayer:s,graphic:o,formattedAttributes:r}=this,a=o?.attributes,n=this._expressionAttributes,l=r.global;return{title:G({attributes:a,fieldInfoMap:i,globalAttributes:l,expressionAttributes:n,layer:s,text:e}),description:G({attributes:a,fieldInfoMap:i,globalAttributes:l,expressionAttributes:n,layer:s,text:t})}}_createFieldsVMParams(e,t){const i=this._effectivePopupTemplate,s=this.formattedAttributes,o={...s?.global,...s?.content[t]},r=e?.fieldInfos||i?.fieldInfos,a=r?.filter((({fieldName:e})=>!!e&&(q(e)||z(e)||o.hasOwnProperty(e)))),n=i?.expressionInfos,{description:l,title:p}=e;return{attributes:o,expressionInfos:n,fieldInfos:a,...this._compileTitleAndDesc({title:p,description:l})}}_compileFields(e,t){const i=e.clone(),s=new V(this._createFieldsVMParams(e,t));return this.contentViewModels[t]=s,i.fieldInfos=s.formattedFieldInfos.slice(),i}_createMediaVMParams(e,t){const{abilities:i,graphic:s,_fieldInfoMap:o,_effectivePopupTemplate:r,relatedInfos:a,_sourceLayer:n,_expressionAttributes:l}=this,p=this.formattedAttributes,c=s?.attributes??{},{description:d,mediaInfos:h,title:u}=e;return{abilities:{chartAnimation:i.chartAnimation},activeMediaInfoIndex:e.activeMediaInfoIndex||0,attributes:c,isAggregate:s?.isAggregate,layer:n,fieldInfoMap:o,formattedAttributes:{...p?.global,...p?.content[t]},expressionAttributes:l,mediaInfos:h,popupTemplate:r,relatedInfos:a,...this._compileTitleAndDesc({title:u,description:d})}}_compileMedia(e,t){const i=e.clone(),s=new j(this._createMediaVMParams(e,t));return i.mediaInfos=s.formattedMediaInfos.slice(),this.contentViewModels[t]=s,i}_createTextVMParams(e){const{graphic:t,_fieldInfoMap:i,_sourceLayer:s,_expressionAttributes:o}=this;if(e&&e.text){const r=t?.attributes??{},a=this.formattedAttributes?.global??{};e.text=G({attributes:r,fieldInfoMap:i,globalAttributes:a,expressionAttributes:o,layer:s,text:e.text})}return{graphic:t,creator:e.text}}_compileText(e,t){const i=e.clone();return this.contentViewModels[t]=new F(this._createTextVMParams(i)),i}_compileLastEditInfo(){const{_effectivePopupTemplate:e,_sourceLayer:t,graphic:i,timeZone:s}=this;if(!e)return;const{lastEditInfoEnabled:o}=e,r=t?.editFieldsInfo;return o&&r?Q(r,i?.attributes,s,t):void 0}_compileTitle(e){const{_fieldInfoMap:t,_sourceLayer:i,graphic:s,_expressionAttributes:o}=this,r=s?.attributes??{},a=this.formattedAttributes?.global??{};return G({attributes:r,fieldInfoMap:t,globalAttributes:a,expressionAttributes:o,layer:i,text:e})}async _getTitle(){const{_effectivePopupTemplate:e,graphic:t}=this;return t?J({type:"title",value:e?.title,event:{graphic:t}}):null}async _getContent(){const{_effectivePopupTemplate:e,graphic:t}=this;return t?J({type:"content",value:e?.content,event:{graphic:t}}):null}_evaluateExpressionAttributes({title:e,content:t,expressionInfos:i}){this._evaluateExpressionAttributesTask=p(this._evaluateExpressionAttributesTask),this._evaluateExpressionAttributesTask=r((async s=>{const{graphic:o,map:r,view:a,spatialReference:n,location:p}=this;try{if(!o)return;let l;if(null!=i){const e=[];for(const[t,l]of i.expressions.entries())null!=l?e.push(l.evaluate({graphic:o,interceptor:se.interceptor,location:p,map:r,options:{signal:s},spatialReference:n,view:a}).then((e=>[t,R(e)])).catch((()=>[t,void 0]))):e.push(Promise.resolve([t,void 0]));l=Object.fromEntries(await Promise.all(e)),h(s)}this._expressionAttributes=l,this._graphicExpressionAttributes={...o.attributes,...l},this._set("formattedAttributes",this._createFormattedAttributes(t)),this._set("title",this._compileTitle(e)),this._set("lastEditInfo",this._compileLastEditInfo()||null),this._set("content",this._compileContent(t)||null)}catch(c){d(c)||(this._error=c,l.getLogger(this).error("error","The popupTemplate could not be displayed for this feature.",{error:c,graphic:o,popupTemplate:this._effectivePopupTemplate}))}}))}_createMediaFormattedAttributes({contentElement:e,contentElementIndex:t,formattedAttributes:i}){const{_effectivePopupTemplate:s,graphic:o,relatedInfos:r,_sourceLayer:a,_fieldInfoMap:n,_graphicExpressionAttributes:l,timeZone:p}=this;i.content[t]=K({fieldInfos:s?.fieldInfos,graphic:o,attributes:{...l,...e.attributes},layer:a,fieldInfoMap:n,relatedInfos:r,timeZone:p})}_createFieldsFormattedAttributes({contentElement:e,contentElementIndex:t,formattedAttributes:i}){if(e.fieldInfos){const{graphic:s,relatedInfos:o,_sourceLayer:r,_fieldInfoMap:a,_graphicExpressionAttributes:n,timeZone:l}=this;i.content[t]=K({fieldInfos:e.fieldInfos,graphic:s,attributes:{...n,...e.attributes},layer:r,fieldInfoMap:a,relatedInfos:o,timeZone:l})}}_createFormattedAttributes(e){const{_effectivePopupTemplate:t,graphic:i,relatedInfos:s,_sourceLayer:o,_fieldInfoMap:r,_graphicExpressionAttributes:a,timeZone:n}=this,l=t?.fieldInfos,p={global:K({fieldInfos:l,graphic:i,attributes:a,layer:o,fieldInfoMap:r,relatedInfos:s,timeZone:n}),content:[]};return Array.isArray(e)&&e.forEach(((e,t)=>{"fields"===e.type&&this._createFieldsFormattedAttributes({contentElement:e,contentElementIndex:t,formattedAttributes:p}),"media"===e.type&&this._createMediaFormattedAttributes({contentElement:e,contentElementIndex:t,formattedAttributes:p})})),p}_checkForRelatedFeatures(e){const{graphic:t,_effectivePopupTemplate:i}=this;return this._queryRelatedInfos(t,N(i),e)}async _queryRelatedInfos(e,t,i){const{relatedInfos:s,_sourceLayer:o}=this;s.clear();const r=null!=o?.associatedLayer?await(o?.associatedLayer.load(i)):o;if(!r||!e)return;const a=t.filter((e=>!!e.fieldName&&z(e.fieldName)));if(!a?.length)return;t.forEach((e=>this._configureRelatedInfo(e,r)));const n=await W({relatedInfos:s,layer:r},i);Object.keys(n).forEach((e=>{const t=s.get(e.toString()),i=n[e]?.value;t&&i&&(t.layerInfo=i.data)}));const l=await X({graphic:e,relatedInfos:s,layer:r},i);Object.keys(l).forEach((e=>{Y(l[e]?.value,s.get(e.toString()))}))}_configureRelatedInfo(e,t){const{relatedInfos:i}=this,s=$(e.fieldName||"");if(!s)return;const{layerId:o,fieldName:r}=s;if(!o)return;const a=i.get(o.toString())||ee(o,t);a&&(te({relatedInfo:a,fieldName:r,fieldInfo:e}),this.relatedInfos.set(o,a))}};e([b()],pe.prototype,"_error",void 0),e([b()],pe.prototype,"_graphicChangedTask",void 0),e([b()],pe.prototype,"_evaluateExpressionAttributesTask",void 0),e([b()],pe.prototype,"_associationVMAbortController",void 0),e([b({readOnly:!0})],pe.prototype,"_effectivePopupTemplate",null),e([b({readOnly:!0})],pe.prototype,"_fieldInfoMap",null),e([b({readOnly:!0})],pe.prototype,"_sourceLayer",null),e([b()],pe.prototype,"abilities",void 0),e([w("abilities")],pe.prototype,"castAbilities",null),e([b({readOnly:!0})],pe.prototype,"content",void 0),e([b({readOnly:!0})],pe.prototype,"contentViewModels",void 0),e([b()],pe.prototype,"description",void 0),e([b({type:Boolean})],pe.prototype,"defaultPopupTemplateEnabled",void 0),e([b({readOnly:!0})],pe.prototype,"isFeatureFromTable",null),e([b({readOnly:!0})],pe.prototype,"state",null),e([b({readOnly:!0})],pe.prototype,"formattedAttributes",void 0),e([b({type:t,value:null})],pe.prototype,"graphic",null),e([b({readOnly:!0})],pe.prototype,"lastEditInfo",void 0),e([b({type:A})],pe.prototype,"location",void 0),e([b({readOnly:!0})],pe.prototype,"relatedInfos",void 0),e([b({type:I})],pe.prototype,"spatialReference",null),e([b()],pe.prototype,"timeZone",null),e([b({readOnly:!0})],pe.prototype,"title",void 0),e([b()],pe.prototype,"map",null),e([b({readOnly:!0})],pe.prototype,"waitingForContent",null),e([b()],pe.prototype,"view",void 0),pe=se=e([v("esri.widgets.Feature.FeatureViewModel")],pe);export{pe as default};
|
|
5
|
+
import{_ as e}from"../../chunks/tslib.es6.js";import t from"../../Graphic.js";import{FeatureSetQueryInterceptor as i}from"../../arcade/featureset/support/FeatureSetQueryInterceptor.js";import s from"../../core/Accessor.js";import{isSome as o}from"../../core/arrayUtils.js";import{createTask as r}from"../../core/asyncUtils.js";import a from"../../core/Collection.js";import n from"../../core/Identifiable.js";import l from"../../core/Logger.js";import{abortMaybe as p}from"../../core/maybe.js";import{eachAlways as c,isAbortError as d,throwIfAborted as h}from"../../core/promiseUtils.js";import{watch as u,when as f,initial as m,on as _}from"../../core/reactiveUtils.js";import{throttle as y}from"../../core/throttle.js";import{property as g}from"../../core/accessorSupport/decorators/property.js";import{cast as b}from"../../core/accessorSupport/decorators/cast.js";import"../../core/has.js";import{subclass as v}from"../../core/accessorSupport/decorators/subclass.js";import w from"../../geometry/Point.js";import A from"../../geometry/SpatialReference.js";import I from"../../popup/content/TextContent.js";import{system as x}from"../../time/constants.js";import M from"./FeatureAttachments/FeatureAttachmentsViewModel.js";import T from"./FeatureContent/FeatureContentViewModel.js";import F from"./FeatureExpression/FeatureExpressionViewModel.js";import C from"./FeatureFields/FeatureFieldsViewModel.js";import E from"./FeatureMedia/FeatureMediaViewModel.js";import V from"./FeatureRelationship/FeatureRelationshipViewModel.js";import{compileExpressionInfos as j,formatArcadeValue as k}from"./support/arcadeFeatureUtils.js";import{preLayerQueryCallback as P,preRequestCallback as R,createFieldInfoMap as L,getAllFieldInfos as O,getSourceLayer as N,querySourceLayer as U,queryUpdatedFeature as Z,isRelatableFeatureSupportedLayer as B,isAssociatedFeatureSupportedLayer as S,substituteFieldsInLinksAndAttributes as H,isExpressionField as D,isRelatedField as G,formatEditInfo as q,graphicCallback as z,formatAttributes as Q}from"./support/featureUtils.js";import{queryLayerInfos as J,queryRelatedFeatures as K,setRelatedFeatures as W,getRelatedFieldInfo as X,createRelatedInfo as Y,updateRelatedInfo as $}from"./support/relatedFeatureUtils.js";import ee from"../support/UtilityNetworkAssociations/FeatureUtilityNetworkAssociationsViewModel.js";var te;const ie=1,se="content-view-models",oe="relationship-view-models",re="association-view-models",ae={attachmentsContent:!0,chartAnimation:!0,customContent:!0,expressionContent:!0,fieldsContent:!0,mediaContent:!0,textContent:!0,relationshipContent:!0,utilityNetworkAssociationsContent:!0};let ne=class extends(n.IdentifiableMixin(s)){static{te=this}constructor(e){super(e),this._error=null,this._graphicChangedTask=null,this._evaluateExpressionAttributesTask=null,this._associationVMAbortController=null,this._expressionAttributes=null,this._graphicExpressionAttributes=null,this.abilities={...ae},this.content=null,this.contentViewModels=[],this.description=null,this.defaultPopupTemplateEnabled=!1,this.formattedAttributes=null,this.lastEditInfo=null,this.location=null,this.relatedInfos=new Map,this.title="",this.view=null,this._graphicChangedThrottled=y(this._graphicChanged,(()=>this.notifyChange("waitingForContent")),ie,this),this._isAllowedContentType=e=>{const{abilities:t}=this;return"attachments"===e.type&&!!t.attachmentsContent||"custom"===e.type&&!!t.customContent||"fields"===e.type&&!!t.fieldsContent||"media"===e.type&&!!t.mediaContent||"text"===e.type&&!!t.textContent||"expression"===e.type&&!!t.expressionContent||"relationship"===e.type&&!!t.relationshipContent||"utility-network-associations"===e.type&&!!t.utilityNetworkAssociationsContent},this._evaluateExpressionAttributesThrottled=y(this._evaluateExpressionAttributes,(()=>this.notifyChange("waitingForContent")),ie,this),this.addHandles([u((()=>[this.graphic,this._effectivePopupTemplate,this.abilities,this.timeZone]),(()=>this._graphicChangedThrottled()),m),f((()=>{if(!this._graphicChangedTask?.finished||null==this._graphicChangedTask.value)return null;const e=this._graphicChangedTask.value,t=e?.expressionInfos?.dependencies;return[e,t?.has("view-scale")?this.view?.scale:null,t?.has("view-time-extent")?this.view?.timeExtent?.start:null,t?.has("view-time-extent")?this.view?.timeExtent?.end:null]}),(([e])=>this._evaluateExpressionAttributesThrottled(e)))])}initialize(){this.addHandles([this._graphicChangedThrottled,this._evaluateExpressionAttributesThrottled])}destroy(){this._clear(),this._graphicChangedTask=p(this._graphicChangedTask),this._evaluateExpressionAttributesTask=p(this._evaluateExpressionAttributesTask),this._error=null,this.graphic=null,this._destroyContentViewModels(),this.relatedInfos.clear()}static{this.interceptor=new i(P,R)}get _effectivePopupTemplate(){return null!=this.graphic?this.graphic.getEffectivePopupTemplate(this.defaultPopupTemplateEnabled):null}get _fieldInfoMap(){return L(O(this._effectivePopupTemplate),this._sourceLayer)}get _sourceLayer(){return N(this.graphic)}castAbilities(e){return{...ae,...e}}get isFeatureFromTable(){return this._sourceLayer?.isTable||!1}get state(){return this.graphic?this._error?"error":this.waitingForContent?"loading":"ready":"disabled"}set graphic(e){this._set("graphic",e?.clone()??null)}get spatialReference(){return this.view?.spatialReference??null}set spatialReference(e){this._override("spatialReference",e)}get timeZone(){return this.view?.timeZone??x}set timeZone(e){this._overrideIfSome("timeZone",e)}get map(){return this.view?.map||null}set map(e){this._override("map",e)}get waitingForContent(){const{_graphicChangedThrottled:e,_evaluateExpressionAttributesThrottled:t,_graphicChangedTask:i,_evaluateExpressionAttributesTask:s,_associationVMAbortController:o}=this;return e.hasPendingUpdates()||t.hasPendingUpdates()||null!=i&&!i.finished||null!=s&&!s.finished||!!o}setActiveMedia(e,t){const i=this.contentViewModels[e];i instanceof E&&i.setActiveMedia(t)}nextMedia(e){const t=this.contentViewModels[e];t instanceof E&&t.next()}previousMedia(e){const t=this.contentViewModels[e];t instanceof E&&t.previous()}async updateGeometry(){const{graphic:e,spatialReference:t,_sourceLayer:i}=this;await(i?.load());const s=i?.objectIdField;if(!s||!e||!i)return;const o=e?.attributes?.[s];if(null==o)return;const r=[o];if(!e.geometry){const s=await U({layer:i,graphic:e,outFields:[],objectIds:r,returnGeometry:!0,spatialReference:t}),o=s?.geometry;o&&(e.geometry=o)}}_clear(){this._set("title",""),this._set("content",null),this._set("formattedAttributes",null)}_graphicChanged(){this._evaluateExpressionAttributesTask=p(this._evaluateExpressionAttributesTask),this._graphicChangedTask=p(this._graphicChangedTask),this._graphicChangedTask=r((async e=>{this._error=null,this._clear();const{graphic:t}=this;try{if(!t)return null;const{_sourceLayer:i,_effectivePopupTemplate:s}=this,o=this.spatialReference;await Z({graphic:t,popupTemplate:s,layer:i,spatialReference:o},{signal:e});const[{value:r},{value:a}]=await c([this._getContent(),this._getTitle()]),[,{value:n}]=await c([this._checkForRelatedFeatures({signal:e}),j(s?.expressionInfos,t)]);return{expressionInfos:n,content:r,title:a}}catch(i){throw d(i)||(this._error=i,l.getLogger(this).error("error","The popupTemplate could not be displayed for this feature.",{error:i,graphic:t,popupTemplate:this._effectivePopupTemplate})),i}}))}_compileContentElement(e,t){return"attachments"===e.type?this._compileAttachments(e,t):"custom"===e.type?this._compileCustom(e,t):"fields"===e.type?this._compileFields(e,t):"media"===e.type?this._compileMedia(e,t):"text"===e.type?this._compileText(e,t):"expression"===e.type?this._compileExpression(e,t):"relationship"===e.type?this._compileRelationship(e,t):"utility-network-associations"===e.type?this._compileUtilityNetworkAssociation(e,t):void 0}_compileContent(e){if(this._destroyContentViewModels(),this.graphic)return Array.isArray(e)?e.filter(this._isAllowedContentType).map(((e,t)=>this._compileContentElement(e,t))).filter(o):"string"==typeof e?this._compileText(new I({text:e}),0).text:e}_destroyContentViewModels(){this.removeHandles(oe),this.removeHandles(se),this.contentViewModels.forEach((e=>e&&!e.destroyed&&e.destroy())),this._set("contentViewModels",[])}_matchesFeature(e,t){const i=e?.graphic?.getObjectId(),s=t?.getObjectId();return null!=i&&null!=s&&i===s}_setRelatedFeaturesViewModels({relatedFeatureViewModels:e,relatedFeatures:t,map:i}){const{view:s,spatialReference:o,timeZone:r}=this;t?.filter(Boolean).forEach((t=>{e.some((e=>this._matchesFeature(e,t)))||e.add(new te({abilities:{relationshipContent:!1},map:i,view:s,spatialReference:o,timeZone:r,graphic:t}))})),e.forEach((i=>{const s=t?.find((e=>this._matchesFeature(i,e)));s||e.remove(i)}))}_setExpressionContentVM(e,t){const i=this.formattedAttributes,{contentElement:s,contentElementViewModel:o}=e,r=s?.type;o&&r&&("fields"===r&&(this._createFieldsFormattedAttributes({contentElement:s,contentElementIndex:t,formattedAttributes:i}),o.set(this._createFieldsVMParams(s,t))),"media"===r&&(this._createMediaFormattedAttributes({contentElement:s,contentElementIndex:t,formattedAttributes:i}),o.set(this._createMediaVMParams(s,t))),"text"===r&&o.set(this._createTextVMParams(s)))}_compileRelationship(e,t){const{displayCount:i,orderByFields:s,relationshipId:o,title:r,description:a}=e,{_sourceLayer:n,graphic:l,map:p}=this;if(!B(n))return;const c=new V({displayCount:i,graphic:l,orderByFields:s,relationshipId:o,layer:n,map:p,...this._compileTitleAndDesc({title:r,description:a})});return this.contentViewModels[t]=c,this.addHandles(_((()=>c.relatedFeatures),"change",(()=>this._setRelatedFeaturesViewModels(c))),oe),e}_matchesGlobalFeature(e,t){const i=e?.association.globalId,s=t?.association.globalId;return null!=i&&null!=s&&i===s}async _setUpUtilityNetworkAssociationsViewModels(e,t,i){const{view:s,spatialReference:o,timeZone:r}=this;e.forEach(((i,s)=>{const o=t.get(s);o?i.forEach((t=>{o.find((e=>this._matchesGlobalFeature(t,e)))||(i.remove(t),0===i.length&&e.delete(s))})):(i.removeAll(),e.delete(s))})),t.forEach(((t,n)=>{const l=e.get(n)||new a;t?.filter(Boolean).forEach((e=>{if(!l.some((t=>this._matchesGlobalFeature(t,e)))){const{association:t,feature:a,terminalName:n,title:p}=e;l.add({title:p,association:t,featureViewModel:new te({abilities:{utilityNetworkAssociationsContent:!1},map:i,view:s,spatialReference:o,timeZone:r,graphic:a}),terminalName:n})}})),e.set(n,l)})),this._sortListObjectsByTitle(e)}async _sortListObjectsByTitle(e){for(const t of e.values())t.sort(this._compareByFeatureTitle)}_compareByFeatureTitle(e,t){return e.title.localeCompare(t.title,void 0,{numeric:!0})}_compileUtilityNetworkAssociation(e,t){const{displayCount:i,title:s,description:o,associationTypes:r}=e,{_sourceLayer:a,graphic:n,map:l}=this;if(!S(a))return;const p=new ee({graphic:n,displayCount:i,associationTypes:r,layer:a,map:l,...this._compileTitleAndDesc({title:s,description:o})});return this.contentViewModels[t]=p,this.addHandles([u((()=>p.associationFeatures.values()),(()=>this._setUpUtilityNetworkAssociationsViewModels(p.associationViewModels,p.associationFeatures,p.map)))],re),e}_compileExpression(e,t){const{expressionInfo:i}=e,{graphic:s,map:o,spatialReference:r,view:a,location:n}=this,l=new F({expressionInfo:i,graphic:s,interceptor:te.interceptor,map:o,spatialReference:r,view:a,location:n});return this.contentViewModels[t]=l,this.addHandles(u((()=>l.contentElementViewModel),(()=>this._setExpressionContentVM(l,t)),m),se),e}_compileAttachments(e,t){const{graphic:i}=this,{description:s,title:o,orderByFields:r}=e;return this.contentViewModels[t]=new M({graphic:i,orderByFields:r,...this._compileTitleAndDesc({title:o,description:s})}),e}_compileCustom(e,t){const{graphic:i}=this,{creator:s,destroyer:o}=e;return this.contentViewModels[t]=new T({graphic:i,creator:s,destroyer:o}),e}_compileTitleAndDesc({title:e,description:t}){const{_fieldInfoMap:i,_sourceLayer:s,graphic:o,formattedAttributes:r}=this,a=o?.attributes,n=this._expressionAttributes,l=r.global;return{title:H({attributes:a,fieldInfoMap:i,globalAttributes:l,expressionAttributes:n,layer:s,text:e}),description:H({attributes:a,fieldInfoMap:i,globalAttributes:l,expressionAttributes:n,layer:s,text:t})}}_createFieldsVMParams(e,t){const i=this._effectivePopupTemplate,s=this.formattedAttributes,o={...s?.global,...s?.content[t]},r=e?.fieldInfos||i?.fieldInfos,a=r?.filter((({fieldName:e})=>!!e&&(D(e)||G(e)||o.hasOwnProperty(e)))),n=i?.expressionInfos,{description:l,title:p}=e;return{attributes:o,expressionInfos:n,fieldInfos:a,...this._compileTitleAndDesc({title:p,description:l})}}_compileFields(e,t){const i=e.clone(),s=new C(this._createFieldsVMParams(e,t));return this.contentViewModels[t]=s,i.fieldInfos=s.formattedFieldInfos.slice(),i}_createMediaVMParams(e,t){const{abilities:i,graphic:s,_fieldInfoMap:o,_effectivePopupTemplate:r,relatedInfos:a,_sourceLayer:n,_expressionAttributes:l}=this,p=this.formattedAttributes,c=s?.attributes??{},{description:d,mediaInfos:h,title:u}=e;return{abilities:{chartAnimation:i.chartAnimation},activeMediaInfoIndex:e.activeMediaInfoIndex||0,attributes:c,isAggregate:s?.isAggregate,layer:n,fieldInfoMap:o,formattedAttributes:{...p?.global,...p?.content[t]},expressionAttributes:l,mediaInfos:h,popupTemplate:r,relatedInfos:a,...this._compileTitleAndDesc({title:u,description:d})}}_compileMedia(e,t){const i=e.clone(),s=new E(this._createMediaVMParams(e,t));return i.mediaInfos=s.formattedMediaInfos.slice(),this.contentViewModels[t]=s,i}_createTextVMParams(e){const{graphic:t,_fieldInfoMap:i,_sourceLayer:s,_expressionAttributes:o}=this;if(e&&e.text){const r=t?.attributes??{},a=this.formattedAttributes?.global??{};e.text=H({attributes:r,fieldInfoMap:i,globalAttributes:a,expressionAttributes:o,layer:s,text:e.text})}return{graphic:t,creator:e.text}}_compileText(e,t){const i=e.clone();return this.contentViewModels[t]=new T(this._createTextVMParams(i)),i}_compileLastEditInfo(){const{_effectivePopupTemplate:e,_sourceLayer:t,graphic:i,timeZone:s}=this;if(!e)return;const{lastEditInfoEnabled:o}=e,r=t?.editFieldsInfo;return o&&r?q(r,i?.attributes,s,t):void 0}_compileTitle(e){const{_fieldInfoMap:t,_sourceLayer:i,graphic:s,_expressionAttributes:o}=this,r=s?.attributes??{},a=this.formattedAttributes?.global??{};return H({attributes:r,fieldInfoMap:t,globalAttributes:a,expressionAttributes:o,layer:i,text:e})}async _getTitle(){const{_effectivePopupTemplate:e,graphic:t}=this;return t?z({type:"title",value:e?.title,event:{graphic:t}}):null}async _getContent(){const{_effectivePopupTemplate:e,graphic:t}=this;return t?z({type:"content",value:e?.content,event:{graphic:t}}):null}_evaluateExpressionAttributes({title:e,content:t,expressionInfos:i}){this._evaluateExpressionAttributesTask=p(this._evaluateExpressionAttributesTask),this._evaluateExpressionAttributesTask=r((async s=>{const{graphic:o,map:r,view:a,spatialReference:n,location:p}=this;try{if(!o)return;let l;if(null!=i){const e=[];for(const[t,l]of i.expressions.entries())null!=l?e.push(l.evaluate({graphic:o,interceptor:te.interceptor,location:p,map:r,options:{signal:s},spatialReference:n,view:a}).then((e=>[t,k(e)])).catch((()=>[t,void 0]))):e.push(Promise.resolve([t,void 0]));l=Object.fromEntries(await Promise.all(e)),h(s)}this._expressionAttributes=l,this._graphicExpressionAttributes={...o.attributes,...l},this._set("formattedAttributes",this._createFormattedAttributes(t)),this._set("title",this._compileTitle(e)),this._set("lastEditInfo",this._compileLastEditInfo()||null),this._set("content",this._compileContent(t)||null)}catch(c){d(c)||(this._error=c,l.getLogger(this).error("error","The popupTemplate could not be displayed for this feature.",{error:c,graphic:o,popupTemplate:this._effectivePopupTemplate}))}}))}_createMediaFormattedAttributes({contentElement:e,contentElementIndex:t,formattedAttributes:i}){const{_effectivePopupTemplate:s,graphic:o,relatedInfos:r,_sourceLayer:a,_fieldInfoMap:n,_graphicExpressionAttributes:l,timeZone:p}=this;i.content[t]=Q({fieldInfos:s?.fieldInfos,graphic:o,attributes:{...l,...e.attributes},layer:a,fieldInfoMap:n,relatedInfos:r,timeZone:p})}_createFieldsFormattedAttributes({contentElement:e,contentElementIndex:t,formattedAttributes:i}){if(e.fieldInfos){const{graphic:s,relatedInfos:o,_sourceLayer:r,_fieldInfoMap:a,_graphicExpressionAttributes:n,timeZone:l}=this;i.content[t]=Q({fieldInfos:e.fieldInfos,graphic:s,attributes:{...n,...e.attributes},layer:r,fieldInfoMap:a,relatedInfos:o,timeZone:l})}}_createFormattedAttributes(e){const{_effectivePopupTemplate:t,graphic:i,relatedInfos:s,_sourceLayer:o,_fieldInfoMap:r,_graphicExpressionAttributes:a,timeZone:n}=this,l=t?.fieldInfos,p={global:Q({fieldInfos:l,graphic:i,attributes:a,layer:o,fieldInfoMap:r,relatedInfos:s,timeZone:n}),content:[]};return Array.isArray(e)&&e.forEach(((e,t)=>{"fields"===e.type&&this._createFieldsFormattedAttributes({contentElement:e,contentElementIndex:t,formattedAttributes:p}),"media"===e.type&&this._createMediaFormattedAttributes({contentElement:e,contentElementIndex:t,formattedAttributes:p})})),p}_checkForRelatedFeatures(e){const{graphic:t,_effectivePopupTemplate:i}=this;return this._queryRelatedInfos(t,O(i),e)}async _queryRelatedInfos(e,t,i){const{relatedInfos:s,_sourceLayer:o}=this;s.clear();const r=null!=o?.associatedLayer?await(o?.associatedLayer.load(i)):o;if(!r||!e)return;const a=t.filter((e=>!!e.fieldName&&G(e.fieldName)));if(!a?.length)return;t.forEach((e=>this._configureRelatedInfo(e,r)));const n=await J({relatedInfos:s,layer:r},i);Object.keys(n).forEach((e=>{const t=s.get(e.toString()),i=n[e]?.value;t&&i&&(t.layerInfo=i.data)}));const l=await K({graphic:e,relatedInfos:s,layer:r},i);Object.keys(l).forEach((e=>{W(l[e]?.value,s.get(e.toString()))}))}_configureRelatedInfo(e,t){const{relatedInfos:i}=this,s=X(e.fieldName||"");if(!s)return;const{layerId:o,fieldName:r}=s;if(!o)return;const a=i.get(o.toString())||Y(o,t);a&&($({relatedInfo:a,fieldName:r,fieldInfo:e}),this.relatedInfos.set(o,a))}};e([g()],ne.prototype,"_error",void 0),e([g()],ne.prototype,"_graphicChangedTask",void 0),e([g()],ne.prototype,"_evaluateExpressionAttributesTask",void 0),e([g()],ne.prototype,"_associationVMAbortController",void 0),e([g({readOnly:!0})],ne.prototype,"_effectivePopupTemplate",null),e([g({readOnly:!0})],ne.prototype,"_fieldInfoMap",null),e([g({readOnly:!0})],ne.prototype,"_sourceLayer",null),e([g()],ne.prototype,"abilities",void 0),e([b("abilities")],ne.prototype,"castAbilities",null),e([g({readOnly:!0})],ne.prototype,"content",void 0),e([g({readOnly:!0})],ne.prototype,"contentViewModels",void 0),e([g()],ne.prototype,"description",void 0),e([g({type:Boolean})],ne.prototype,"defaultPopupTemplateEnabled",void 0),e([g({readOnly:!0})],ne.prototype,"isFeatureFromTable",null),e([g({readOnly:!0})],ne.prototype,"state",null),e([g({readOnly:!0})],ne.prototype,"formattedAttributes",void 0),e([g({type:t,value:null})],ne.prototype,"graphic",null),e([g({readOnly:!0})],ne.prototype,"lastEditInfo",void 0),e([g({type:w})],ne.prototype,"location",void 0),e([g({readOnly:!0})],ne.prototype,"relatedInfos",void 0),e([g({type:A})],ne.prototype,"spatialReference",null),e([g()],ne.prototype,"timeZone",null),e([g({readOnly:!0})],ne.prototype,"title",void 0),e([g()],ne.prototype,"map",null),e([g({readOnly:!0})],ne.prototype,"waitingForContent",null),e([g()],ne.prototype,"view",void 0),ne=te=e([v("esri.widgets.Feature.FeatureViewModel")],ne);export{ne as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{isSupportedLayer as e}from"../../../arcade/featureset/support/shared.js";import r from"../../../core/Logger.js";import t from"../../../layers/FeatureLayer.js";import{applyTextFormattingHTML as a,htmlEntities as n}from"./featureUtils.js";import{globalCss as s}from"../../support/globalCss.js";const
|
|
5
|
+
import{isSupportedLayer as e}from"../../../arcade/featureset/support/shared.js";import r from"../../../core/Logger.js";import t from"../../../layers/FeatureLayer.js";import{applyTextFormattingHTML as a,htmlEntities as n}from"./featureUtils.js";import{globalCss as s}from"../../support/globalCss.js";const i="esri.widgets.Feature.support.arcadeFeatureUtils",o=()=>r.getLogger(i);function c(e){return"string"==typeof e?a(n(e)):Array.isArray(e)?p(e):"esri.arcade.Dictionary"===e?.declaredClass?u(e):e}function p(e){return`<ul class="esri-widget__list">${e.map((e=>`<li>${"string"==typeof e?a(n(e)):e}</li>`)).join("")}</ul>`}function u(e){const r=e.keys().map((r=>{const t=e.field(r);return`<tr><th>${r}</th><td>${"string"==typeof t?a(n(t)):t}</td></tr>`})).join("");return`<table class="${s.table}">${r}</table>`}async function l(){const[e,r]=await Promise.all([import("../../../arcade.js"),import("../../../arcade/arcade.js")]);return{executor:e,syntaxUtils:r}}function d(e){return"createQuery"in e&&"queryFeatures"in e}async function y({graphic:e,view:r,options:t}){const{isAggregate:a,layer:n}=e;if(!a||!n||"2d"!==r?.type)return[];const s=await r.whenLayerView(n);if(!d(s))return[];const i=s.createQuery(),o=e.getObjectId();i.aggregateIds=null!=o?[o]:[];const{features:c}=await s.queryFeatures(i,t);return c}function f({layer:e,aggregatedFeatures:r,interceptor:a}){const{fields:n,objectIdField:s,geometryType:i,spatialReference:o,displayField:c}=e;return new t({fields:n,objectIdField:s,geometryType:i,spatialReference:o,displayField:c,interceptor:a,..."feature"===e.type?{templates:e.templates,typeIdField:e.typeIdField,types:e.types}:null,source:r})}function g(e){const r="esri.views.3d.layers.VoxelGraphic"===e.declaredClass;return e.isAggregate?"popup-feature-reduction":r?"popup-voxel":"popup"}function w(e){return{scale:e?.scale,timeProperties:{currentStart:e?.timeExtent?.start,currentEnd:e?.timeExtent?.end,startIncluded:!0,endIncluded:!0}}}function m(e){return{$voxel:e}}async function x(e,r,t,a,n){let s=null;if(n.has("$aggregatedfeatures")){const n=await y({graphic:e,view:r,options:t}),i=e.sourceLayer||e.layer;s=f({layer:i,aggregatedFeatures:n,interceptor:a})}return{vars:{$feature:e,$aggregatedFeatures:s,$view:w(r)},[Symbol.dispose]:()=>s?.[Symbol.dispose]()}}function v(r,t,a,n){const s=(r.sourceLayer||r.layer)??void 0;return{$feature:r,$layer:null!=s&&e(s)?s:"scene"===s?.type&&null!=s.associatedLayer?s.associatedLayer:void 0,$map:t,$datastore:s?.url,$userInput:a,$graph:"knowledge-graph-sublayer"===s?.type?s?.parentCompositeLayer?.knowledgeGraph:void 0,$view:w(n)}}async function h(e,{graphic:r,map:t,location:a,view:n,options:s,interceptor:i,arcadeExecutor:o}){switch(e){case"popup":return{vars:v(r,t,a,n),[Symbol.dispose](){}};case"popup-feature-reduction":{const e=new Set(o.variablesUsed);return await x(r,n,s,i,e)}case"popup-voxel":return{vars:m(r),[Symbol.dispose](){}};default:throw new Error(`Unexpected profile name ${e}`)}}async function $({expressionInfo:e,arcade:{executor:r,syntaxUtils:t},graphic:a}){const n=e?.expression;if(!n)return null;const s=g(a),i=r.createArcadeProfile(s);let c;try{c=await r.createArcadeExecutor(n,i)}catch(u){return o().error("arcade-executor-error",{error:u,expressionInfo:e}),null}const p=new Set;return c.variablesUsed.includes("$view")&&(t.scriptUsesViewProperties(c.syntaxTree,["scale"])&&p.add("view-scale"),t.scriptUsesViewProperties(c.syntaxTree,["timeProperties"])&&p.add("view-time-extent")),{dependencies:p,async evaluate({graphic:r,interceptor:t,location:a,map:n,options:i,spatialReference:p,view:l}){const d=await h(s,{graphic:r,map:n,location:a,view:l,options:i,interceptor:t,arcadeExecutor:c}),y={abortSignal:i?.signal??void 0,interceptor:t??void 0,rawOutput:!0,spatialReference:p??void 0,timeZone:l?.timeZone,console(...e){o().info(...e)}};try{return await c.executeAsync(d.vars,y)}catch(u){if(i?.signal?.aborted)return;return void o().error("arcade-execution-error",{error:u,graphic:r,expressionInfo:e})}finally{d[Symbol.dispose]()}}}}async function b(e,r){if(!e?.length)return{dependencies:new Set,expressions:new Map};const t=await l(),a=new Set,n=new Map;for(const s of e){const e=await $({expressionInfo:s,arcade:t,graphic:r});n.set(`expression/${s.name}`,e),e?.dependencies.forEach((e=>a.add(e)))}return{dependencies:a,expressions:n}}export{$ as compileExpression,b as compileExpressionInfos,c as formatArcadeValue,l as loadArcade};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as t}from"../../../chunks/tslib.es6.js";import"../../../intl.js";import{stripHTML as e}from"../../../core/string.js";import{property as
|
|
5
|
+
import{_ as t}from"../../../chunks/tslib.es6.js";import"../../../intl.js";import{stripHTML as e}from"../../../core/string.js";import{property as i}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as s}from"../../../core/accessorSupport/decorators/subclass.js";import o from"../UtilityNetworkAssociationInput.js";import{AssociationDetails as r}from"./AssociationDetails.js";import a from"./VisibleElements.js";import{loadCalciteComponents as n}from"../../support/componentsUtils.js";import{globalCss as c}from"../../support/globalCss.js";import{Heading as l}from"../../support/Heading.js";import"../../support/widgetUtils.js";import{messageBundle as d}from"../../support/decorators/messageBundle.js";import{tsx as p,tsxFragment as u}from"../../support/jsxFactory.js";import m from"../../support/UtilityNetworkAssociations/FeatureUtilityNetworkAssociationsViewModel.js";import h from"../../support/UtilityNetworkAssociations/UtilityNetworkAssociationList.js";import{formatPercentAlong as y}from"../../support/UtilityNetworkAssociations/utils/formatPercentAlong.js";import{isConnectivity as g}from"../../support/UtilityNetworkAssociations/utils/isConnectivity.js";import{isConnectivityMidspan as f}from"../../support/UtilityNetworkAssociations/utils/isConnectivityMidspan.js";import{substitute as F}from"../../../intl/substitute.js";const v="esri-feature-form-utility-network-association-list",_={base:v,header:`${v}__header`,headingContent:`${v}__heading-content`,listContainer:`${v}__list-container`};let L=class extends h{constructor(t,e){super(t,e),this._isLoadingSelectFeature=!1,this.associationInput=null,this.headingLevel=5,this.messagesFeatureForm=null,this.onSelectLayer=()=>{},this.onSelectFeature=async()=>{},this.onAddAssociation=()=>{},this.viewModel=new m,this.visibleElements=new a}initialize(){this.setUpObserver()}loadDependencies(){return n({chip:()=>import("@esri/calcite-components/dist/components/calcite-chip"),fab:()=>import("@esri/calcite-components/dist/components/calcite-fab"),icon:()=>import("@esri/calcite-components/dist/components/calcite-icon"),list:()=>import("@esri/calcite-components/dist/components/calcite-list"),"list-item":()=>import("@esri/calcite-components/dist/components/calcite-list-item"),tooltip:()=>import("@esri/calcite-components/dist/components/calcite-tooltip")})}get associatedFeatureCount(){const{associationInput:t}=this;if(!t)return 0;const{associatedFeatureInfos:e,associatedLayer:i}=t,s=i?e.get(i):null;return s?s.length:0}render(){const{associationInput:t}=this;if(!t)return p("div",{class:this.classes(_.base,c.widget)});const{associatedLayer:e}=t,{state:i}=this.viewModel;return p("div",{class:this.classes(_.base,c.widget)},"loading"===i||"querying"===i?this.renderLoading():e?this._renderFeatureList(t,e):this._renderLayerList(t))}_renderLayerList(t){const{associatedFeatureInfos:e,editable:i}=t;return p("div",{class:_.listContainer},p("calcite-list",{label:this.messagesFeatureForm?.associations.associatedLayers},Array.from(e.keys(),(e=>this._renderLayerItem(t,e)))),i?p("calcite-fab",{appearance:"outline-fill",icon:"plus",key:`${t.uid}-add-button`,kind:"neutral",onclick:()=>this.onAddAssociation({feature:t.feature,associationType:t.activeAssociationType,utilityNetwork:t.utilityNetwork}),text:this.messagesCommon.add,textEnabled:!0}):null)}_renderFeatureList(t,e){return p(u,null,this._renderHeader(t,e),p("div",{class:_.listContainer},this.renderFeatureCountWarning(),p("calcite-list",{label:this.messagesFeatureForm?.associations.associatedFeatures},this._renderAssociatedFeatureListPage(t,e),this.renderFeatureObserver())))}_renderLayerTitle(t){return t.title?p(l,{key:"title",level:this.headingLevel},p("div",{class:_.headingContent},p("calcite-icon",{icon:"layer"}),t.title)):null}_renderTotal(t,e){const{messagesFeature:i}=this,{associatedFeatureInfos:s}=t,o=s.get(e),r=F(i?.numberRecords,{number:o?.length??"0"});return p("div",{key:e.id},r)}_renderHeader(t,e){const{messagesFeatureForm:i}=this,{activeAssociationType:s,featureItem:o,feature:a}=t;return p("div",{class:_.header,key:"filter"},this.visibleElements.associationDetails?p(r,{associationType:s?.type,feature:a,heading:o?.label,messages:i.associations}):void 0,this._renderLayerTitle(e),this.renderFilter(),this._renderTotal(t,e))}_renderAssociatedFeatureListPage(t,e){const{filterText:i,endIndex:s}=this,o=t.associatedFeatureInfos.get(e)?.filter((t=>t.title?.toLowerCase().includes(i)??!1)).slice(0,s).toArray()??[];return[...this._renderTooltips(o),...this._renderAssociatedFeatureList(o)]}_renderItemTooltip(t){const{tooltipReferenceMap:e}=this,i=t.feature.uid.toString();return g(t.association)?p("calcite-tooltip",{key:`tooltip-${i}`,overlayPositioning:"fixed",referenceElement:e.get(i)},this.getConnectivityTooltip(t.association.associationType)):null}_renderAssociatedFeature(t){const i=this.messagesCommon.untitled,s=t.title||i,o=t.feature.uid.toString();return p("calcite-list-item",{description:e(t.terminalName??""),key:`associated-feature-type-${o}`,label:e(s),onCalciteListItemSelect:()=>this._selectAssociation(t)},g(t.association)?this.renderConnectivityIcon(t.association.associationType,o):null,f(t.association)?p("calcite-chip",{label:y(t.association),scale:"s",slot:"content-end"},y(t.association)):null,p("calcite-icon",{flipRtl:!0,icon:"chevron-right",scale:"s",slot:"content-end"}))}_renderTooltips(t){return t.map((t=>this._renderItemTooltip(t)))}_renderAssociatedFeatureList(t){return t.map((t=>this._renderAssociatedFeature(t)))}_renderLayerItem(t,e){const{associatedFeatureInfos:i}=t,s=i.get(e)?.length??0;return p("calcite-list-item",{expanded:!0,key:`${e.id}-show-all`,label:e.title??this.messagesCommon.untitled,value:e.id,onCalciteListItemSelect:()=>this._showAllAssociations(e)},p("calcite-chip",{label:s.toString(),scale:"s",slot:"content-end"},s),p("calcite-icon",{flipRtl:!0,icon:"chevron-right",scale:"s",slot:"content-end"}))}async _selectAssociation(t){this._isLoadingSelectFeature||(this._isLoadingSelectFeature=!0,await this.onSelectFeature({feature:t.feature,association:t.association}),this._isLoadingSelectFeature=!1)}_showAllAssociations(t){this.onSelectLayer({layer:t,associationInput:this.associationInput})}};t([i()],L.prototype,"associatedFeatureCount",null),t([i({type:o})],L.prototype,"associationInput",void 0),t([i()],L.prototype,"headingLevel",void 0),t([i(),d("esri/widgets/FeatureForm/t9n/FeatureForm")],L.prototype,"messagesFeatureForm",void 0),t([i({constructOnly:!0})],L.prototype,"onSelectLayer",void 0),t([i({constructOnly:!0})],L.prototype,"onSelectFeature",void 0),t([i({constructOnly:!0})],L.prototype,"onAddAssociation",void 0),t([i({type:m})],L.prototype,"viewModel",void 0),t([i({type:a,nonNullable:!0})],L.prototype,"visibleElements",void 0),L=t([s("esri.widgets.FeatureForm.FeatureFormUtilityNetworkAssociations.FeatureFormUtilityNetworkAssociationList")],L);const A=L;export{A as default};
|