@arcgis/core 5.1.0-next.64 → 5.1.0-next.66
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/Camera.d.ts +1 -1
- package/Ground.d.ts +7 -7
- package/PopupTemplate.d.ts +8 -8
- package/WebDocument2D.js +1 -1
- package/WebScene.d.ts +1 -1
- package/WebScene.js +1 -1
- package/analysis/AreaMeasurementAnalysis.d.ts +1 -1
- package/analysis/DirectLineMeasurementAnalysis.d.ts +1 -1
- package/analysis/LengthDimension.d.ts +4 -4
- package/analysis/ShadowCastAnalysis.d.ts +3 -3
- package/analysis/SliceAnalysis.d.ts +1 -1
- package/analysis/SlicePlane.d.ts +1 -1
- package/applications/Components/featureUtils.d.ts +24 -0
- package/applications/Components/featureUtils.js +1 -1
- package/applications/KnowledgeStudio/generalSdkInternalAccess.d.ts +11 -1
- package/applications/KnowledgeStudio/generalSdkInternalAccess.js +1 -1
- package/applications/WebEditor/drawToolZSnapping.d.ts +17 -0
- package/applications/WebEditor/drawToolZSnapping.js +2 -0
- package/arcade/Dictionary.js +1 -1
- package/arcade/Feature.js +1 -1
- package/arcade/Pixel.js +1 -1
- package/arcade/Voxel.js +1 -1
- package/arcade/geometry/wkt.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/01be1315c60810651783.js +1 -0
- package/assets/esri/core/workers/chunks/02e8fc598ee09cf1b678.js +1 -0
- package/assets/esri/core/workers/chunks/0d650b0d090a425c9c18.js +1 -0
- package/assets/esri/core/workers/chunks/0e90e9ea1ad587eb3495.js +1 -0
- package/assets/esri/core/workers/chunks/0f196ec93925dfefc69a.js +1 -0
- package/assets/esri/core/workers/chunks/12294f8c32c34788b6de.js +1 -0
- package/assets/esri/core/workers/chunks/13a8346abe5509167578.js +1 -0
- package/assets/esri/core/workers/chunks/1515824f11ef5ab95378.js +1 -0
- package/assets/esri/core/workers/chunks/151c2766a4cacc6adbd6.js +1 -0
- package/assets/esri/core/workers/chunks/155f57fe9886ef322e2a.js +1 -0
- package/assets/esri/core/workers/chunks/170f4d83555d238e365b.js +1 -0
- package/assets/esri/core/workers/chunks/171cca726a763c770469.js +1 -0
- package/assets/esri/core/workers/chunks/17445fd8048966617d49.js +1 -0
- package/assets/esri/core/workers/chunks/1761dc5799850ca7b66c.js +1 -0
- package/assets/esri/core/workers/chunks/17d54e77001ccb48a258.js +1 -0
- package/assets/esri/core/workers/chunks/19afacc9a741038e4bfb.js +1 -0
- package/assets/esri/core/workers/chunks/1d8777266fb1c5cfca55.js +1 -0
- package/assets/esri/core/workers/chunks/1f16bc8c02d8c4b2f693.js +1 -0
- package/assets/esri/core/workers/chunks/1f76c06af4682c85bc21.js +1 -0
- package/assets/esri/core/workers/chunks/{9eef3cd5f519c8ae88c0.js → 205e957ffd7e95f530f7.js} +1 -1
- package/assets/esri/core/workers/chunks/{fa6e1ad099b43a6f5501.js → 21a8e2a11ffacc226e2b.js} +1 -1
- package/assets/esri/core/workers/chunks/{811b378fa5bf8a4d3d66.js → 224461c1d9755966d0b6.js} +1 -1
- package/assets/esri/core/workers/chunks/27262083d37fe623ca9c.js +1 -0
- package/assets/esri/core/workers/chunks/2a3145a595d19391bb8a.js +1 -0
- package/assets/esri/core/workers/chunks/2a65bbe6c63c384cbf5f.js +1 -0
- package/assets/esri/core/workers/chunks/2fa69ca3ba8c442dd7d6.js +1 -0
- package/assets/esri/core/workers/chunks/314140e2e9b813191907.js +1 -0
- package/assets/esri/core/workers/chunks/32e22d6eee9fed1f70b0.js +1 -0
- package/assets/esri/core/workers/chunks/{af40e2e6eaf3d2226812.js → 3464a38e758c687a28d4.js} +1 -1
- package/assets/esri/core/workers/chunks/38816f95e801f1c5bbad.js +1 -0
- package/assets/esri/core/workers/chunks/3f8e8f83ebda07d29ca8.js +1 -0
- package/assets/esri/core/workers/chunks/41396724040180d2537f.js +1 -0
- package/assets/esri/core/workers/chunks/{66baacbef23291eab853.js → 413d2fa54508e6f42c74.js} +1 -1
- package/assets/esri/core/workers/chunks/{32e9e92bbbd000fbbaf7.js → 4141a3a93732996601e8.js} +2 -2
- package/assets/esri/core/workers/chunks/41e59d75ccb51a238739.js +1 -0
- package/assets/esri/core/workers/chunks/44016e1176629c36bc11.js +1 -0
- package/assets/esri/core/workers/chunks/468c70e5fdb61dfaad80.js +1 -0
- package/assets/esri/core/workers/chunks/4d069a0ebadb9c53b550.js +1 -0
- package/assets/esri/core/workers/chunks/4e7b084f7104deea1ddb.js +1 -0
- package/assets/esri/core/workers/chunks/{9c72127de7afcbaafbaf.js → 51852ef71ac04954fdae.js} +1 -1
- package/assets/esri/core/workers/chunks/549a51dedcc49f366e53.js +1 -0
- package/assets/esri/core/workers/chunks/{42e084704dea6e4135b6.js → 54c0306082d30d59cba2.js} +1 -1
- package/assets/esri/core/workers/chunks/56036327e721f9c42b33.js +1 -0
- package/assets/esri/core/workers/chunks/57cdd5d4ae073d5ca725.js +1 -0
- package/assets/esri/core/workers/chunks/5b9257c5359fa05f4f28.js +1 -0
- package/assets/esri/core/workers/chunks/5d574079f0e96e883aab.js +1 -0
- package/assets/esri/core/workers/chunks/5d967bcf71c05ddb1ab6.js +1 -0
- package/assets/esri/core/workers/chunks/5fccb372b4d5ee2f64cc.js +1 -0
- package/assets/esri/core/workers/chunks/61778185d702da468b00.js +1 -0
- package/assets/esri/core/workers/chunks/61794a861a9209b72622.js +1 -0
- package/assets/esri/core/workers/chunks/61b49cdaf288f36f9288.js +1 -0
- package/assets/esri/core/workers/chunks/{8ea67b502f9355dab7e9.js → 621ea864e2774f160d1c.js} +1 -1
- package/assets/esri/core/workers/chunks/{9d289cee96e7c7fe1029.js → 62a2da0ffc67f98445c1.js} +1 -1
- package/assets/esri/core/workers/chunks/{254898b41cabe313b6ce.js → 62d96b012c2d6f601863.js} +1 -1
- package/assets/esri/core/workers/chunks/644dd906bee3ef465ec0.js +1 -0
- package/assets/esri/core/workers/chunks/66692d6edc1bd96645e2.js +1 -0
- package/assets/esri/core/workers/chunks/679086351352756b33c9.js +1 -0
- package/assets/esri/core/workers/chunks/681e97ebbf9c69c410c6.js +1 -0
- package/assets/esri/core/workers/chunks/69520cad347947b09f21.js +1 -0
- package/assets/esri/core/workers/chunks/{c86b15f6a18880f921cd.js → 6a567755b67c06d16f21.js} +1 -1
- package/assets/esri/core/workers/chunks/{fdf4c1f202cfddf0f226.js → 6d11ec355e5474b2968b.js} +1 -1
- package/assets/esri/core/workers/chunks/6e7bb6d3e739527116a4.js +1 -0
- package/assets/esri/core/workers/chunks/751f3cfb000045ac78bb.js +1 -0
- package/assets/esri/core/workers/chunks/{64ad6130de549083caba.js → 789357e0f79823f145dd.js} +1 -1
- package/assets/esri/core/workers/chunks/{b6d94cbd1c5adad2f247.js → 78fbfc03d9b827c3f767.js} +1 -1
- package/assets/esri/core/workers/chunks/79df97e3f5975b42dc4d.js +1 -0
- package/assets/esri/core/workers/chunks/{25e4568a3ff76f48ac5e.js → 7a56c836c89a8b978800.js} +1 -1
- package/assets/esri/core/workers/chunks/7e97684e851274efd11f.js +1 -0
- package/assets/esri/core/workers/chunks/7e9b790fe01b89acdf6d.js +1 -0
- package/assets/esri/core/workers/chunks/7fb9a5bc22d7581f1d20.js +1 -0
- package/assets/esri/core/workers/chunks/{5c1abb46b9937a050c32.js → 7ffcd308087c35adda04.js} +1 -1
- package/assets/esri/core/workers/chunks/84eb889b9cce35dac2e5.js +1 -0
- package/assets/esri/core/workers/chunks/891d97d0da6361d63679.js +1 -0
- package/assets/esri/core/workers/chunks/8a0f254d45d00b293479.js +1 -0
- package/assets/esri/core/workers/chunks/8ede12f54b215c52cf3c.js +1 -0
- package/assets/esri/core/workers/chunks/8fed6becd107d2ed9bbd.js +1 -0
- package/assets/esri/core/workers/chunks/90cef6f96df7dc27db39.js +1 -0
- package/assets/esri/core/workers/chunks/921c30b7f4dfc3e018d9.js +1 -0
- package/assets/esri/core/workers/chunks/927773ed23b1fc245bf7.js +1 -0
- package/assets/esri/core/workers/chunks/{b056b4c79bcd542dd1d2.js → 9622a83b29acb768fcb5.js} +1 -1
- package/assets/esri/core/workers/chunks/97062996e1e4196cfa7c.js +1 -0
- package/assets/esri/core/workers/chunks/97210bcb5e3cf3ac961b.js +1 -0
- package/assets/esri/core/workers/chunks/{f550fc8c078ebd47d7a3.js → 97e15e66e55d9149fd48.js} +1 -1
- package/assets/esri/core/workers/chunks/9c819ebdc98ed8b6afcf.js +1 -0
- package/assets/esri/core/workers/chunks/9dfd00972c12a4adc15d.js +1 -0
- package/assets/esri/core/workers/chunks/9fab410b9fa668dc498b.js +1 -0
- package/assets/esri/core/workers/chunks/a118de5a163ae42bee60.js +1 -0
- package/assets/esri/core/workers/chunks/a4b6fdbc995be03d2afb.js +1 -0
- package/assets/esri/core/workers/chunks/a59db907ec1e31002100.js +1 -0
- package/assets/esri/core/workers/chunks/a5b395e518e4c5fc95d0.js +1414 -0
- package/assets/esri/core/workers/chunks/a5d9dbb1fef8c4465943.js +1 -0
- package/assets/esri/core/workers/chunks/{62c2757f5dc4aaca2df8.js → a73e8b80760dc88f926f.js} +1 -1
- package/assets/esri/core/workers/chunks/a96692514dcaa50340dd.js +1 -0
- package/assets/esri/core/workers/chunks/b4fb4484fa39eede1f62.js +1 -0
- package/assets/esri/core/workers/chunks/b50a42a9f96515beb929.js +1 -0
- package/assets/esri/core/workers/chunks/b8acb6c2538053c01cc6.js +1 -0
- package/assets/esri/core/workers/chunks/b8bf3e8b8b870f69f231.js +1 -0
- package/assets/esri/core/workers/chunks/b8e85b7d5eed6e7c79b5.js +1 -0
- package/assets/esri/core/workers/chunks/{fd629a3ab558adf52617.js → bc2c7cb99e227ddbd3a6.js} +1 -1
- package/assets/esri/core/workers/chunks/bc85bb82cfcbc216fa31.js +1 -0
- package/assets/esri/core/workers/chunks/{354351ab3fc79dedf9a8.js → bcb8a25438c66815e37a.js} +1 -1
- package/assets/esri/core/workers/chunks/be1e4c3ec53fc92a26f1.js +1 -0
- package/assets/esri/core/workers/chunks/be4d13088a557b7de4b1.js +1 -0
- package/assets/esri/core/workers/chunks/bf758d57091fa534c1f8.js +1 -0
- package/assets/esri/core/workers/chunks/bfd516c37fb717e14d71.js +1 -0
- package/assets/esri/core/workers/chunks/c22945637a40355fbe61.js +1 -0
- package/assets/esri/core/workers/chunks/c25a58d9f94aaa96957d.js +1 -0
- package/assets/esri/core/workers/chunks/c4e936879c6cb25cf586.js +1 -0
- package/assets/esri/core/workers/chunks/c6a43f748dbf8bac4bb5.js +1 -0
- package/assets/esri/core/workers/chunks/cb9185ed31109781fe59.js +1 -0
- package/assets/esri/core/workers/chunks/d21fdd67477800101f3b.js +1 -0
- package/assets/esri/core/workers/chunks/d264aed5dbe09e34040f.js +1 -0
- package/assets/esri/core/workers/chunks/d315098b038a96084ff5.js +1 -0
- package/assets/esri/core/workers/chunks/d4465fd3319d0b6a26cc.js +1 -0
- package/assets/esri/core/workers/chunks/{13eb0162d95b4d27389c.js → d598d08dbf2796742e8c.js} +1 -1
- package/assets/esri/core/workers/chunks/d5c7ebfd5c2ca635a7a8.js +1 -0
- package/assets/esri/core/workers/chunks/{d4368e281c12fa7c17c5.js → d635f97b7b82a37482d6.js} +1 -1
- package/assets/esri/core/workers/chunks/d7b92bd9198dd3b27eb5.js +1 -0
- package/assets/esri/core/workers/chunks/d83ac66478a419e08af6.js +1 -0
- package/assets/esri/core/workers/chunks/d8dde0d1759e009b8373.js +1 -0
- package/assets/esri/core/workers/chunks/d94dfb2ce31e59b3306b.js +1 -0
- package/assets/esri/core/workers/chunks/{8166ad6bbd7d7a8f91cf.js → deddf6ae4498a3d0d0e5.js} +1 -1
- package/assets/esri/core/workers/chunks/{45f1e682668cffc00b44.js → e0df7554b1679168663d.js} +1 -1
- package/assets/esri/core/workers/chunks/e0fcb5fa0e9f21fde2b6.js +1 -0
- package/assets/esri/core/workers/chunks/e305ced975d885c28e7e.js +1 -0
- package/assets/esri/core/workers/chunks/e3c60b7df2740e600066.js +1 -0
- package/assets/esri/core/workers/chunks/e611cd03eee4fae7c413.js +1 -0
- package/assets/esri/core/workers/chunks/e64a92b6f4075616f40f.js +1 -0
- package/assets/esri/core/workers/chunks/e78b442417f6a903b9b1.js +1 -0
- package/assets/esri/core/workers/chunks/{ba72989749543122a6fe.js → e9f2b573f482718306e6.js} +1 -1
- package/assets/esri/core/workers/chunks/ea6d3b7c7d720aa7bc94.js +1 -0
- package/assets/esri/core/workers/chunks/eab1b45ab5a802e29f8c.js +1 -0
- package/assets/esri/core/workers/chunks/eb7392799a01c2a8497a.js +1 -0
- package/assets/esri/core/workers/chunks/{c17c3453d014dc73fe0b.js → ef013a77950c1902de11.js} +1 -1
- package/assets/esri/core/workers/chunks/ef0fe4e1a9e960a74c60.js +1 -0
- package/assets/esri/core/workers/chunks/efbbcf467b2a27a92b85.js +1 -0
- package/assets/esri/core/workers/chunks/f201edf9b68717a6106d.js +1 -0
- package/assets/esri/core/workers/chunks/f43a63094190d2074cd0.js +1 -0
- package/assets/esri/core/workers/chunks/f59f1db572be1f19887f.js +1 -0
- package/assets/esri/core/workers/chunks/{dc07dc1cd30edc0c4193.js → f62e42659b406435573d.js} +1 -1
- package/assets/esri/core/workers/chunks/fa160a2a5dc9f5a7c34b.js +1 -0
- package/assets/esri/core/workers/chunks/fa7ae035472540999721.js +1 -0
- package/assets/esri/core/workers/chunks/fe3b42eadcdd9ba54f05.js +1 -0
- package/assets/esri/core/workers/chunks/fee31d9297648219375d.js +1 -0
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_ar.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_bg.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_bs.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_ca.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_cs.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_da.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_de.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_el.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_es.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_et.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_fi.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_fr.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_he.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_hr.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_hu.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_id.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_it.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_ja.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_ko.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_lt.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_lv.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_nl.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_no.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_pl.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_pt-BR.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_pt-PT.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_ro.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_ru.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_sk.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_sl.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_sr.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_sv.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_th.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_tr.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_uk.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_vi.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_zh-CN.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_zh-HK.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_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/chunks/ComponentShader.glsl.js +1 -1
- package/chunks/DefaultMaterial.glsl.js +1 -1
- package/chunks/GaussianSplat.glsl.js +14 -2
- package/chunks/OITDim.glsl.js +3 -2
- package/chunks/Path.glsl.js +1 -1
- package/chunks/RealisticTree.glsl.js +1 -1
- package/chunks/ShadowCastAccumulate.glsl.js +2 -2
- package/chunks/ShadowHighlight.glsl.js +3 -3
- package/chunks/ShadowHighlightBuffer.glsl.js +1 -1
- package/chunks/Terrain.glsl.js +1 -1
- package/chunks/Water.glsl.js +1 -1
- package/config.js +1 -1
- package/core/timeUtils.js +1 -1
- package/core/workers/Connection.js +1 -1
- package/effects/FocusAreas.d.ts +1 -1
- package/form/elements/FieldElement.d.ts +3 -3
- package/form/elements/GroupElement.d.ts +1 -1
- package/form/elements/TextElement.d.ts +1 -1
- package/form/elements/inputs/ComboBoxInput.d.ts +1 -1
- package/form/elements/inputs/DateTimeOffsetPickerInput.d.ts +1 -1
- package/form/elements/inputs/DateTimeOffsetPickerInput.js +1 -1
- package/form/elements/inputs/Input.d.ts +1 -1
- package/form/elements/inputs/RadioButtonsInput.d.ts +1 -1
- package/form/elements/inputs/SwitchInput.d.ts +1 -1
- package/form/elements/inputs/inputUtils.js +1 -1
- package/form/elements/inputs.js +1 -1
- package/geometry/Mesh.d.ts +7 -7
- package/geometry/operators/alphaShapeOperator.d.ts +1 -1
- package/geometry/operators/areaOperator.d.ts +1 -1
- package/geometry/operators/bufferOperator.d.ts +1 -1
- package/geometry/operators/centroidOperator.d.ts +1 -1
- package/geometry/operators/clipOperator.d.ts +1 -1
- package/geometry/operators/containsOperator.d.ts +1 -1
- package/geometry/operators/convexHullOperator.d.ts +1 -1
- package/geometry/operators/crossesOperator.d.ts +1 -1
- package/geometry/operators/cutOperator.d.ts +1 -1
- package/geometry/operators/densifyOperator.d.ts +1 -1
- package/geometry/operators/differenceOperator.d.ts +1 -1
- package/geometry/operators/disjointOperator.d.ts +1 -1
- package/geometry/operators/distanceOperator.d.ts +1 -1
- package/geometry/operators/generalizeOperator.d.ts +1 -1
- package/geometry/operators/geodesicProximityOperator.d.ts +1 -1
- package/geometry/operators/geodeticDistanceOperator.d.ts +1 -1
- package/geometry/operators/geodeticUtilsOperator.d.ts +2 -2
- package/geometry/operators/graphicBufferOperator.d.ts +1 -1
- package/geometry/operators/intersectionOperator.d.ts +1 -1
- package/geometry/operators/intersectsOperator.d.ts +1 -1
- package/geometry/operators/isNearOperator.d.ts +1 -1
- package/geometry/operators/lengthOperator.d.ts +1 -1
- package/geometry/operators/locateBetweenOperator.d.ts +1 -1
- package/geometry/operators/multiPartToSinglePartOperator.d.ts +1 -1
- package/geometry/operators/offsetOperator.d.ts +5 -5
- package/geometry/operators/overlapsOperator.d.ts +1 -1
- package/geometry/operators/proximityOperator.d.ts +1 -1
- package/geometry/operators/simplifyOGCOperator.d.ts +1 -1
- package/geometry/operators/simplifyOperator.d.ts +1 -1
- package/geometry/operators/support/Transformation.d.ts +6 -6
- package/geometry/operators/symmetricDifferenceOperator.d.ts +1 -1
- package/geometry/operators/touchesOperator.d.ts +1 -1
- package/geometry/operators/unionOperator.d.ts +1 -1
- package/geometry/operators/withinOperator.d.ts +1 -1
- package/geometry/support/MeshMaterialMetallicRoughness.d.ts +1 -1
- package/geometry/support/spatialReferenceUtils.js +1 -1
- package/geometry/support/vcsData.js +2 -0
- package/geometry/support/vcsLookup.js +2 -0
- package/interfaces.d.ts +4 -2
- package/intl.js +1 -1
- package/kernel.js +1 -1
- package/layers/BuildingSceneLayer.d.ts +4 -4
- package/layers/CSVLayer.d.ts +2 -2
- package/layers/CatalogLayer.d.ts +2 -2
- package/layers/ElevationLayer.d.ts +1 -1
- package/layers/FeatureLayer.d.ts +9 -2
- package/layers/FeatureLayer.js +1 -1
- package/layers/GeoJSONLayer.d.ts +2 -2
- package/layers/GeoRSSLayer.d.ts +1 -1
- package/layers/GraphicsLayer.d.ts +2 -2
- package/layers/ImageryLayer.d.ts +3 -3
- package/layers/ImageryTileLayer.d.ts +2 -2
- package/layers/IntegratedMesh3DTilesLayer.d.ts +6 -6
- package/layers/IntegratedMeshLayer.d.ts +7 -7
- package/layers/MapImageLayer.d.ts +1 -1
- package/layers/MediaLayer.d.ts +1 -1
- package/layers/OGCFeatureLayer.d.ts +2 -2
- package/layers/PointCloudLayer.d.ts +1 -1
- package/layers/SceneLayer.d.ts +9 -9
- package/layers/StreamLayer.d.ts +2 -2
- package/layers/SubtypeGroupLayer.js +1 -1
- package/layers/VectorTileLayer.d.ts +2 -2
- package/layers/VideoLayer.d.ts +1 -1
- package/layers/VoxelLayer.d.ts +8 -8
- package/layers/VoxelWasmPerSceneView.js +1 -1
- package/layers/WFSLayer.d.ts +6 -6
- package/layers/catalog/CatalogFootprintLayer.d.ts +1 -1
- package/layers/graphics/data/AttributesBuilder.js +1 -1
- package/layers/graphics/sources/geojson/GeoJSONSourceWorker.js +1 -1
- package/layers/graphics/sources/support/MemorySourceWorker.js +1 -1
- package/layers/mixins/ArcGISImageService.js +1 -1
- package/layers/mixins/BlendLayer.d.ts +6 -6
- package/layers/pointCloudFilters/PointCloudReturnFilter.d.ts +1 -1
- package/layers/pointCloudFilters/PointCloudValueFilter.d.ts +1 -1
- package/layers/support/DimensionalDefinition.d.ts +2 -2
- package/layers/support/FeatureEffect.d.ts +4 -4
- package/layers/support/FeatureFilter.d.ts +17 -17
- package/layers/support/FeatureReductionBinning.d.ts +1 -1
- package/layers/support/FeatureReductionCluster.d.ts +9 -9
- package/layers/support/FeatureReductionSelection.d.ts +1 -1
- package/layers/support/LabelClass.d.ts +2 -2
- package/layers/support/RasterFunction.d.ts +1 -1
- package/layers/support/SceneFilter.d.ts +2 -2
- package/layers/support/SceneModification.d.ts +3 -3
- package/layers/support/SymbolLayerDrawing.d.ts +15 -0
- package/layers/support/SymbolLayerDrawing.js +2 -0
- package/layers/support/capabilities.js +1 -1
- package/layers/support/featureLayerUtils.js +1 -1
- package/layers/support/serviceCapabilitiesUtils.js +1 -1
- package/layers/types.d.ts +6 -0
- package/networks/support/jsonTypes.d.ts +36 -11
- package/package.json +4 -4
- package/popup/Feature.d.ts +20 -10
- package/popup/Feature.js +1 -1
- package/popup/Features.d.ts +82 -227
- package/popup/Features.js +1 -1
- package/popup/content/AttachmentsContent.d.ts +1 -1
- package/popup/content/BarChartMediaInfo.d.ts +1 -1
- package/popup/content/ColumnChartMediaInfo.d.ts +1 -1
- package/popup/content/FieldsContent.d.ts +1 -1
- package/popup/content/ImageMediaInfo.d.ts +1 -1
- package/popup/content/LineChartMediaInfo.d.ts +1 -1
- package/popup/content/MediaContent.d.ts +1 -1
- package/popup/content/PieChartMediaInfo.d.ts +1 -1
- package/popup/content/RelationshipContent.d.ts +1 -1
- package/popup/content/TextContent.d.ts +1 -1
- package/popup/support/FeatureAbilities.d.ts +45 -9
- package/popup/support/featureUtils.js +1 -1
- package/popup/types.d.ts +126 -8
- package/portal/schemas/definitions.js +1 -1
- package/renderers/ClassBreaksRenderer.d.ts +1 -1
- package/renderers/DictionaryRenderer.d.ts +1 -1
- package/renderers/DotDensityRenderer.d.ts +3 -3
- package/renderers/FlowRenderer.d.ts +5 -5
- package/renderers/HeatmapRenderer.d.ts +3 -3
- package/renderers/PieChartRenderer.d.ts +1 -1
- package/renderers/RasterShadedReliefRenderer.d.ts +1 -1
- package/renderers/Renderer.d.ts +4 -4
- package/renderers/SimpleRenderer.d.ts +2 -2
- package/renderers/UniqueValueRenderer.d.ts +2 -2
- package/renderers/VectorFieldRenderer.d.ts +1 -1
- package/renderers/mixins/VisualVariablesMixin.d.ts +12 -12
- package/renderers/visualVariables/ColorVariable.d.ts +1 -1
- package/renderers/visualVariables/OpacityVariable.d.ts +1 -1
- package/renderers/visualVariables/RotationVariable.d.ts +1 -1
- package/renderers/visualVariables/SizeVariable.d.ts +1 -1
- package/renderers/visualVariables/VisualVariable.d.ts +1 -1
- package/rest/query/support/AttachmentInfo.d.ts +1 -1
- package/rest/support/AttributeBinsQuery.d.ts +8 -8
- package/rest/support/AutoIntervalBinParameters.d.ts +1 -1
- package/rest/support/DateBinParameters.d.ts +1 -1
- package/rest/support/FixedBoundariesBinParameters.d.ts +1 -1
- package/rest/support/FixedIntervalBinParameters.d.ts +1 -1
- package/rest/support/Query.d.ts +8 -8
- package/rest/support/TopFeaturesQuery.d.ts +8 -8
- package/smartMapping/labels/clusters.d.ts +1 -1
- package/smartMapping/popup/clusters.d.ts +2 -2
- package/smartMapping/popup/templates.d.ts +1 -1
- package/smartMapping/raster/renderers/flow.d.ts +2 -2
- package/smartMapping/renderers/color.d.ts +12 -12
- package/smartMapping/renderers/predominance.d.ts +3 -3
- package/smartMapping/renderers/relationship.d.ts +15 -15
- package/smartMapping/renderers/univariateColorSize.d.ts +4 -4
- package/smartMapping/statistics/support/utils.js +1 -1
- package/smartMapping/support/adapters/support/utils.js +1 -1
- package/smartMapping/symbology/color.d.ts +4 -4
- package/smartMapping/symbology/flow.d.ts +2 -2
- package/smartMapping/symbology/types.d.ts +18 -18
- package/support/actions/ActionButton.d.ts +1 -1
- package/support/basemapDefinitions.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/CIMSymbol.d.ts +1 -1
- package/symbols/ExtrudeSymbol3DLayer.d.ts +1 -1
- package/symbols/FillSymbol3DLayer.d.ts +3 -3
- package/symbols/IconSymbol3DLayer.d.ts +1 -1
- package/symbols/LabelSymbol3D.d.ts +2 -2
- package/symbols/LineStyleMarker3D.d.ts +7 -7
- package/symbols/LineSymbol3D.d.ts +2 -2
- package/symbols/LineSymbol3DLayer.d.ts +7 -7
- package/symbols/LineSymbolMarker.d.ts +6 -6
- package/symbols/MarkerSymbol.d.ts +1 -1
- package/symbols/MeshSymbol3D.d.ts +2 -2
- package/symbols/ObjectSymbol3DLayer.d.ts +1 -1
- package/symbols/PathSymbol3DLayer.d.ts +14 -14
- package/symbols/PictureFillSymbol.d.ts +1 -1
- package/symbols/PictureMarkerSymbol.d.ts +1 -1
- package/symbols/PointSymbol3D.d.ts +3 -3
- package/symbols/PolygonSymbol3D.d.ts +5 -5
- package/symbols/SimpleFillSymbol.d.ts +8 -8
- package/symbols/SimpleLineSymbol.d.ts +20 -20
- package/symbols/SimpleMarkerSymbol.d.ts +7 -7
- package/symbols/Symbol3DLayer.d.ts +16 -16
- package/symbols/TextSymbol.d.ts +1 -1
- package/symbols/TextSymbol3DLayer.d.ts +1 -1
- package/symbols/WaterSymbol3DLayer.d.ts +3 -3
- package/symbols/WebStyleSymbol.d.ts +12 -12
- package/symbols/callouts/Callout3D.d.ts +1 -1
- package/symbols/callouts/LineCallout3D.d.ts +3 -3
- package/symbols/cim/cimAnalyzer.js +1 -1
- package/symbols/cim/types.d.ts +29 -23
- package/symbols/edges/Edges3D.d.ts +1 -1
- package/symbols/edges/SolidEdges3D.d.ts +1 -1
- package/symbols/patterns/LineStylePattern3D.d.ts +11 -11
- package/symbols/patterns/StylePattern3D.d.ts +8 -8
- package/symbols/support/ElevationInfo.d.ts +2 -2
- package/symbols/support/IconSymbol3DLayerResource.d.ts +6 -6
- package/symbols/support/ObjectSymbol3DLayerResource.d.ts +7 -7
- package/symbols/support/Symbol3DEmissive.d.ts +2 -2
- package/symbols/support/Symbol3DVerticalOffset.d.ts +2 -2
- package/views/2d/engine/Stage.js +1 -1
- package/views/2d/engine/flow/FlowStrategy.js +1 -1
- package/views/2d/engine/flow/styles/Imagery.js +1 -1
- package/views/2d/engine/flow/styles/Particles.js +1 -1
- package/views/2d/engine/flow/styles/Stack.js +1 -1
- package/views/2d/engine/flow/styles/Streamlines.js +1 -1
- package/views/2d/engine/vectorTiles/VTLPainter3D.js +1 -1
- package/views/2d/engine/vectorTiles/style/StyleLayer.js +1 -1
- package/views/2d/engine/webgl/AttributeStoreView.js +1 -1
- package/views/2d/engine/webgl/FeatureDisplayList.js +1 -1
- package/views/2d/engine/webgl/Painter.js +1 -1
- package/views/2d/engine/webgl/VideoScreenRenderer.js +1 -1
- package/views/2d/engine/webgl/effects/FeatureEffect.js +1 -1
- package/views/2d/engine/webgl/effects/HighlightEffect.js +1 -1
- package/views/2d/engine/webgl/effects/highlight/HighlightSurfaces.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/FeatureInstanceStore.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/GraphicInstanceStore.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/TextureStatisticsTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/blend/BlendTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/bloom/BloomTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/blur/BlurTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/dotDensity/DotDensityResources.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/dotDensity/DotDensityTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/drop-shadow/DropShadowTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/heatmap/HeatmapResources.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/heatmap/HeatmapTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/RasterColorizerTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/RasterHighlightTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/BaseRasterProcessorTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/textureUtils.js +1 -1
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/layers/BaseLayerViewGL2D.d.ts +2 -2
- package/views/2d/layers/BaseLayerViewGL2D.js +1 -1
- package/views/2d/layers/ImageryTileLayerView2D.js +1 -1
- package/views/2d/layers/features/FeatureContainer.js +1 -1
- package/views/2d/layers/features/layerAdapters/FeatureLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/SubtypeGroupLayerAdapter.js +1 -1
- package/views/2d/layers/features/schema/processor/SimpleProcessorSchema.js +1 -1
- package/views/2d/layers/features/schema/processor/symbols/ComplexSymbolSchema.js +1 -1
- package/views/2d/layers/imagery/BaseImageryTileSubView2D.js +1 -1
- package/views/2d/layers/support/DisplayGL.js +1 -1
- package/views/2d/types.d.ts +3 -3
- package/views/3d/FocusAreasView.js +1 -1
- package/views/3d/analysis/Slice/sliceToolUtils.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedSubTool.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedTool.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillController.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillVisualization.js +1 -1
- package/views/3d/environment/CloudyWeather.d.ts +1 -1
- package/views/3d/environment/Environment.d.ts +4 -4
- package/views/3d/environment/FoggyWeather.d.ts +1 -1
- package/views/3d/environment/RainyWeather.d.ts +1 -1
- package/views/3d/environment/SnowyWeather.d.ts +1 -1
- package/views/3d/environment/SunLighting.d.ts +1 -1
- package/views/3d/environment/SunnyWeather.d.ts +1 -1
- package/views/3d/environment/VirtualLighting.d.ts +1 -1
- package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
- package/views/3d/layers/graphics/extrudeUtils.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatIntersectionHandler.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatTextureAtlas.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianTile.js +1 -1
- package/views/3d/support/renderInfoUtils/polygon.js +1 -1
- package/views/3d/terrain/support/MultiSizeFramebuffer.js +1 -1
- package/views/3d/webgl/ManagedFBO.js +1 -1
- package/views/3d/webgl/RenderNode.d.ts +2 -2
- package/views/3d/webgl-engine/core/FBOCache.js +1 -1
- package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js +18 -5
- package/views/3d/webgl-engine/core/shaderLibrary/shading/ShadowmapFiltering.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/shading/calculateUVZShadow.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/shading/calculateUVZShadowFromDepth.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/RenderPluginManager.js +1 -1
- package/views/3d/webgl-engine/effects/clouds/CloudsRenderer.js +1 -1
- package/views/3d/webgl-engine/effects/clouds/NoiseTextureAtlas.js +1 -1
- package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizerNode.js +1 -1
- package/views/3d/webgl-engine/effects/focusArea/FocusAreaMaskNode.js +1 -1
- package/views/3d/webgl-engine/effects/highlight/Highlight.js +1 -1
- package/views/3d/webgl-engine/effects/transparency/OITBlend.js +1 -1
- package/views/3d/webgl-engine/effects/transparency/OITDim.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/transparency/OITDimTechniqueConfiguration.js +2 -0
- package/views/3d/webgl-engine/lib/CutFillComputationRenderNode.js +1 -1
- package/views/3d/webgl-engine/lib/CutFillVisualizationRenderNode.js +1 -1
- package/views/3d/webgl-engine/lib/DrapedHeatmapRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/materials/PolygonOffset.js +1 -1
- package/views/3d/webgl-engine/shaders/GaussianSplat.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/GaussianSplatTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadowCastAccumulate.glsl.js +1 -1
- package/views/3d/webgl.d.ts +1 -1
- package/views/Magnifier.d.ts +3 -3
- package/views/MapView.d.ts +7 -7
- package/views/SceneView.d.ts +16 -16
- package/views/View.d.ts +17 -3
- package/views/View.js +1 -1
- package/views/draw/DrawTool.js +1 -1
- package/views/draw/support/InteractiveHandle.js +1 -1
- package/views/draw/support/Reshape.js +1 -1
- package/views/draw/support/drawUtils.js +1 -1
- package/views/draw/support/reshapeTooltipUtils.js +1 -1
- package/views/draw/support/types.d.ts +9 -1
- package/views/interactive/sketch/SketchLabelOptions.d.ts +1 -1
- package/views/interactive/sketch/SketchTooltipOptions.d.ts +1 -1
- package/views/interactive/snapping/SnappingOptions.d.ts +7 -7
- package/views/layers/FeatureLikeLayerView.js +1 -1
- package/views/layers/LineOfSightLayerView.d.ts +3 -2
- package/views/support/HighlightOptions.d.ts +1 -1
- package/views/support/imageReprojection.js +1 -1
- package/views/types.d.ts +59 -2
- package/views/ui/DefaultUI.d.ts +2 -2
- package/views/webgl/FramebufferObject.js +1 -1
- package/views/webgl/RenderingContext.js +1 -1
- package/views/webgl/Texture.js +1 -1
- package/views/webgl/testFloatBufferBlend.js +1 -1
- package/views/webgl/testSVGPremultipliedAlpha.js +1 -1
- package/webscene/Environment.d.ts +10 -10
- package/webscene/Glow.d.ts +1 -1
- package/webscene/background/ColorBackground.d.ts +1 -1
- package/widgets/AreaMeasurement2D.d.ts +1 -1
- package/widgets/AreaMeasurement3D.d.ts +2 -2
- package/widgets/Attachments.d.ts +1 -1
- package/widgets/Attribution.d.ts +1 -1
- package/widgets/BasemapGallery.d.ts +1 -1
- package/widgets/BasemapLayerList.d.ts +3 -3
- package/widgets/BasemapToggle.d.ts +1 -1
- package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js +1 -1
- package/widgets/BatchAttributeForm/expressions/ExpressionsManager.js +1 -1
- package/widgets/BatchAttributeForm/inputs/FieldInput.js +1 -1
- package/widgets/Bookmarks/BookmarksVisibleElements.d.ts +1 -1
- package/widgets/Bookmarks.d.ts +2 -2
- package/widgets/BuildingExplorer.d.ts +1 -1
- package/widgets/CatalogLayerList.d.ts +3 -3
- package/widgets/Compass.d.ts +2 -2
- package/widgets/CoordinateConversion.d.ts +1 -1
- package/widgets/Daylight.d.ts +5 -5
- package/widgets/DirectLineMeasurement3D.d.ts +2 -2
- package/widgets/Directions.d.ts +4 -4
- package/widgets/DistanceMeasurement2D.d.ts +1 -1
- package/widgets/Editor/CreateFeaturesWorkflow.d.ts +1 -1
- package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
- package/widgets/Editor/UpdateFeatureWorkflow.js +1 -1
- package/widgets/Editor/UpdateFeaturesWorkflow.js +1 -1
- package/widgets/Editor/UpdateWorkflow.js +1 -1
- package/widgets/Editor/Workflow.js +1 -1
- package/widgets/Editor.d.ts +8 -8
- package/widgets/ElevationProfile/ElevationProfileLineGround.d.ts +1 -1
- package/widgets/ElevationProfile/ElevationProfileLineInput.d.ts +1 -1
- package/widgets/ElevationProfile/ElevationProfileLineView.d.ts +1 -1
- package/widgets/ElevationProfile.d.ts +3 -3
- package/widgets/Expand.d.ts +1 -1
- package/widgets/Feature/FeatureViewModel.d.ts +14 -4
- package/widgets/Feature/FeatureViewModel.js +1 -1
- package/widgets/FeatureForm/FieldInput.js +1 -1
- package/widgets/FeatureForm.d.ts +1 -1
- package/widgets/FeatureTable/ActionColumn.d.ts +2 -2
- package/widgets/FeatureTable/AttachmentsColumn.d.ts +1 -1
- package/widgets/FeatureTable/FeatureTableViewModel.d.ts +3 -3
- package/widgets/FeatureTable/Grid/GroupColumn.d.ts +1 -1
- package/widgets/FeatureTable/RelationshipColumn.d.ts +1 -1
- package/widgets/FeatureTable/VisibleElements.d.ts +1 -1
- package/widgets/FeatureTable.d.ts +10 -10
- package/widgets/FeatureTemplates/FeatureTemplatesViewModel.d.ts +5 -5
- package/widgets/FeatureTemplates.d.ts +8 -8
- package/widgets/Features/FeaturesViewModel.d.ts +18 -7
- package/widgets/Features/FeaturesViewModel.js +1 -1
- package/widgets/Features/FeaturesVisibleElements.d.ts +2 -2
- package/widgets/Features.d.ts +1 -1
- package/widgets/Features.js +1 -1
- package/widgets/FloorFilter/FloorFilterViewModel.js +1 -1
- package/widgets/FloorFilter.d.ts +2 -2
- package/widgets/Histogram.d.ts +2 -2
- package/widgets/HistogramRangeSlider.d.ts +1 -1
- package/widgets/Home.d.ts +1 -1
- package/widgets/LayerList/ListItemPanel.d.ts +1 -1
- package/widgets/LayerList.d.ts +4 -4
- package/widgets/Legend.d.ts +8 -8
- package/widgets/LineOfSight.d.ts +1 -1
- package/widgets/Locate.d.ts +2 -2
- package/widgets/Measurement.d.ts +1 -1
- package/widgets/NavigationToggle/NavigationToggleViewModel.d.ts +1 -1
- package/widgets/NavigationToggle.d.ts +3 -3
- package/widgets/Popup/PopupViewModel.d.ts +2 -1
- package/widgets/Popup/PopupViewModel.js +1 -1
- package/widgets/Popup/PopupVisibleElements.d.ts +2 -2
- package/widgets/Popup.d.ts +18 -9
- package/widgets/Popup.js +1 -1
- package/widgets/Print/CustomTemplate.d.ts +1 -1
- package/widgets/Print/TemplateOptions.d.ts +4 -4
- package/widgets/ScaleRangeSlider.d.ts +1 -1
- package/widgets/Search/SearchViewModel.d.ts +4 -4
- package/widgets/Search.d.ts +5 -5
- package/widgets/ShadowCast.d.ts +3 -3
- package/widgets/Sketch/SketchViewModel.d.ts +39 -39
- package/widgets/Sketch.d.ts +43 -43
- package/widgets/Slice.d.ts +2 -2
- package/widgets/Slider/SliderViewModel.d.ts +2 -2
- package/widgets/Slider.d.ts +9 -9
- package/widgets/Swipe/SwipeViewModel.d.ts +1 -1
- package/widgets/Swipe.d.ts +2 -2
- package/widgets/TableList/ListItemPanel.d.ts +1 -1
- package/widgets/TableList.d.ts +1 -1
- package/widgets/TimeSlider/TimeSliderViewModel.d.ts +10 -10
- package/widgets/TimeSlider/TimeSliderViewModel.js +1 -1
- package/widgets/TimeSlider/types.d.ts +1 -1
- package/widgets/TimeSlider.d.ts +13 -13
- package/widgets/Track.d.ts +2 -2
- package/widgets/UtilityNetworkAssociations.d.ts +3 -3
- package/widgets/UtilityNetworkTrace/UtilityNetworkTraceFeature.js +1 -1
- package/widgets/UtilityNetworkTrace.d.ts +4 -4
- package/widgets/UtilityNetworkValidateTopology.d.ts +1 -1
- package/widgets/ValuePicker.d.ts +5 -5
- package/widgets/VideoPlayer.d.ts +1 -1
- package/widgets/smartMapping/ClassedColorSlider.d.ts +1 -1
- package/widgets/smartMapping/ClassedSizeSlider.d.ts +1 -1
- package/widgets/smartMapping/ColorSizeSlider.d.ts +2 -2
- package/widgets/smartMapping/ColorSlider.d.ts +1 -1
- package/widgets/smartMapping/HeatmapSlider.d.ts +1 -1
- package/widgets/smartMapping/OpacitySlider.d.ts +1 -1
- package/widgets/smartMapping/SizeSlider.d.ts +1 -1
- package/widgets/smartMapping/SmartMappingSliderBase.d.ts +4 -4
- package/widgets/smartMapping/SmartMappingSliderViewModel.d.ts +6 -6
- package/widgets/support/GridControls.d.ts +1 -1
- package/widgets/support/SnappingControls/VisibleElements.d.ts +1 -1
- package/widgets/support/SnappingControls.d.ts +6 -6
- package/assets/esri/core/workers/chunks/02aaeaa988e9e7d65a7f.js +0 -1
- package/assets/esri/core/workers/chunks/05c8d2c0362af4511d86.js +0 -1
- package/assets/esri/core/workers/chunks/06868e4f52de9d918255.js +0 -1
- package/assets/esri/core/workers/chunks/06c0b93e276cfc1fb7ac.js +0 -1
- package/assets/esri/core/workers/chunks/0888baa99c9007ad63bc.js +0 -1
- package/assets/esri/core/workers/chunks/0de66f13e84830a654fb.js +0 -1
- package/assets/esri/core/workers/chunks/0f597c690e5c60fe944b.js +0 -1
- package/assets/esri/core/workers/chunks/0f8736242544f9e9a57a.js +0 -1
- package/assets/esri/core/workers/chunks/0ff12fe9e358100668d9.js +0 -1
- package/assets/esri/core/workers/chunks/11a8541f3909f9ffb000.js +0 -1
- package/assets/esri/core/workers/chunks/13a009229c96ecb7b04f.js +0 -1
- package/assets/esri/core/workers/chunks/185f59f90070d5d6ac94.js +0 -1
- package/assets/esri/core/workers/chunks/190bc75254bc0542a6be.js +0 -1
- package/assets/esri/core/workers/chunks/1af247c86d1c4ae8fef3.js +0 -1
- package/assets/esri/core/workers/chunks/2339465190c9d5ede25f.js +0 -1
- package/assets/esri/core/workers/chunks/23eb204d3cb818adea32.js +0 -1
- package/assets/esri/core/workers/chunks/241ef4a1bea20b49d812.js +0 -1
- package/assets/esri/core/workers/chunks/2669a7195f1de21a9cf3.js +0 -1
- package/assets/esri/core/workers/chunks/2a2d5f9ea42cb2eee9c6.js +0 -1
- package/assets/esri/core/workers/chunks/2a7e7a497823e9f05aa3.js +0 -1
- package/assets/esri/core/workers/chunks/2aaeaf022af8493281dc.js +0 -1
- package/assets/esri/core/workers/chunks/2d92ba11781a3cfc3a78.js +0 -1
- package/assets/esri/core/workers/chunks/31e0bfc2cab055aebf9a.js +0 -1
- package/assets/esri/core/workers/chunks/32360a55d1836b2a737e.js +0 -1
- package/assets/esri/core/workers/chunks/330da3828eefd8d72d3f.js +0 -1
- package/assets/esri/core/workers/chunks/34acecd7a314fed12335.js +0 -1
- package/assets/esri/core/workers/chunks/34fe4570eef9e73839b8.js +0 -1
- package/assets/esri/core/workers/chunks/368b4c0a5eecbb06feac.js +0 -1
- package/assets/esri/core/workers/chunks/37729578a7c4cf15eded.js +0 -1
- package/assets/esri/core/workers/chunks/3af1e2f0b3d30c58d0c2.js +0 -1
- package/assets/esri/core/workers/chunks/3c155efd5768003a91eb.js +0 -1
- package/assets/esri/core/workers/chunks/3d4bb59ab2f644f4d675.js +0 -1
- package/assets/esri/core/workers/chunks/3f0d9fdd8c37605dd85d.js +0 -1
- package/assets/esri/core/workers/chunks/48eca6f51112ba80bd3b.js +0 -1
- package/assets/esri/core/workers/chunks/4b5737021a149aa786af.js +0 -1
- package/assets/esri/core/workers/chunks/55214e1d9f3d98fa7ed9.js +0 -1
- package/assets/esri/core/workers/chunks/55a0b69cf034ac32fc25.js +0 -1
- package/assets/esri/core/workers/chunks/576a1784e93c5406e657.js +0 -1
- package/assets/esri/core/workers/chunks/59289867cce97da74e39.js +0 -1
- package/assets/esri/core/workers/chunks/5a6d6082c5bcb1a80eda.js +0 -1
- package/assets/esri/core/workers/chunks/5a9620cb66c8e64e4668.js +0 -1
- package/assets/esri/core/workers/chunks/5c6e5f22450dd0583074.js +0 -1
- package/assets/esri/core/workers/chunks/5eeb6d3a7b815d41621e.js +0 -1
- package/assets/esri/core/workers/chunks/5f06a57b4f7d7de16bbf.js +0 -1
- package/assets/esri/core/workers/chunks/5f2e246ffcbdedea4de5.js +0 -1
- package/assets/esri/core/workers/chunks/5ff41f43e57be0557541.js +0 -1414
- package/assets/esri/core/workers/chunks/6b32b3f98872771ff81e.js +0 -1
- package/assets/esri/core/workers/chunks/6be9d00839002f24fafd.js +0 -1
- package/assets/esri/core/workers/chunks/6c72dbd5275bffde1583.js +0 -1
- package/assets/esri/core/workers/chunks/6c886f19875291d02407.js +0 -1
- package/assets/esri/core/workers/chunks/75f7c1f600c4051bc905.js +0 -1
- package/assets/esri/core/workers/chunks/77f6659e400064d38130.js +0 -1
- package/assets/esri/core/workers/chunks/78c7eace6ec3fa5c7413.js +0 -1
- package/assets/esri/core/workers/chunks/7cee28575fd57430cf02.js +0 -1
- package/assets/esri/core/workers/chunks/82e0691995d821137d5f.js +0 -1
- package/assets/esri/core/workers/chunks/8435b6bf356959009b76.js +0 -1
- package/assets/esri/core/workers/chunks/8677865189081e0b83bc.js +0 -1
- package/assets/esri/core/workers/chunks/86f70bd786d6d57fde69.js +0 -1
- package/assets/esri/core/workers/chunks/8878ab87ef7961fafae8.js +0 -1
- package/assets/esri/core/workers/chunks/8a893f23827769d42092.js +0 -1
- package/assets/esri/core/workers/chunks/8d1d0c3f0532aa98487d.js +0 -1
- package/assets/esri/core/workers/chunks/8e68b4628e9616356c34.js +0 -1
- package/assets/esri/core/workers/chunks/8edae79554843dd77ada.js +0 -1
- package/assets/esri/core/workers/chunks/9032c040b214b5af775b.js +0 -1
- package/assets/esri/core/workers/chunks/909ef35fa33be2b6da41.js +0 -1
- package/assets/esri/core/workers/chunks/90b7acc70adba193b215.js +0 -1
- package/assets/esri/core/workers/chunks/91718795fc4ca6516ac7.js +0 -1
- package/assets/esri/core/workers/chunks/92d4e962284e13ba2fc5.js +0 -1
- package/assets/esri/core/workers/chunks/94f80c46ccf5e19038b8.js +0 -1
- package/assets/esri/core/workers/chunks/979c2f52b6d6e1e8241b.js +0 -1
- package/assets/esri/core/workers/chunks/97f10efb0fe05bedcebd.js +0 -1
- package/assets/esri/core/workers/chunks/98f5bf1b91f3696b2fce.js +0 -1
- package/assets/esri/core/workers/chunks/9c52d4b54dfdb69dee29.js +0 -1
- package/assets/esri/core/workers/chunks/9de8149ae0a0726a4ab2.js +0 -1
- package/assets/esri/core/workers/chunks/9def5d17b94e5db71883.js +0 -1
- package/assets/esri/core/workers/chunks/9f272445c285ee9abb7b.js +0 -1
- package/assets/esri/core/workers/chunks/a10be7eb05a007fff1ed.js +0 -1
- package/assets/esri/core/workers/chunks/a32c87b89567a9fd1efc.js +0 -1
- package/assets/esri/core/workers/chunks/a3b29eca5807978fb2a3.js +0 -1
- package/assets/esri/core/workers/chunks/a446dff865332268625a.js +0 -1
- package/assets/esri/core/workers/chunks/a5bf2718c02a0e645013.js +0 -1
- package/assets/esri/core/workers/chunks/a6d166058e3025bb280e.js +0 -1
- package/assets/esri/core/workers/chunks/a8e111a5cfd6151d5dbb.js +0 -1
- package/assets/esri/core/workers/chunks/aed45f7e7eee154a21b8.js +0 -1
- package/assets/esri/core/workers/chunks/af3bd661b355eed3da21.js +0 -1
- package/assets/esri/core/workers/chunks/b0f2ce61d3cad413898e.js +0 -1
- package/assets/esri/core/workers/chunks/b2b77598048818c957b7.js +0 -1
- package/assets/esri/core/workers/chunks/b744b950999b92393e37.js +0 -1
- package/assets/esri/core/workers/chunks/b75165880704efccc47c.js +0 -1
- package/assets/esri/core/workers/chunks/ba9e107edc2027238be3.js +0 -1
- package/assets/esri/core/workers/chunks/bc3b22dc08c147b8d425.js +0 -1
- package/assets/esri/core/workers/chunks/c08e9914deb1dc62bc0f.js +0 -1
- package/assets/esri/core/workers/chunks/c0bb53d8d58ad18334d3.js +0 -1
- package/assets/esri/core/workers/chunks/c0d453f93af2d4a6ce64.js +0 -1
- package/assets/esri/core/workers/chunks/c9a42d86185a0ad35dd1.js +0 -1
- package/assets/esri/core/workers/chunks/cbb50415f7de8746ee1a.js +0 -1
- package/assets/esri/core/workers/chunks/d23dd7da45a7aa341540.js +0 -1
- package/assets/esri/core/workers/chunks/d2801df3fa44dee15ec8.js +0 -1
- package/assets/esri/core/workers/chunks/d53b31c9056f82831bc0.js +0 -1
- package/assets/esri/core/workers/chunks/d626e08d23330d84413b.js +0 -1
- package/assets/esri/core/workers/chunks/db6e03fe8dd316f5005f.js +0 -1
- package/assets/esri/core/workers/chunks/de79645e559a2d1ffa67.js +0 -1
- package/assets/esri/core/workers/chunks/e2779965db231fb666a5.js +0 -1
- package/assets/esri/core/workers/chunks/e4e2f059c52674dcae5b.js +0 -1
- package/assets/esri/core/workers/chunks/ec21311584e4fb13e510.js +0 -1
- package/assets/esri/core/workers/chunks/eca45cd479f7fd28ca6e.js +0 -1
- package/assets/esri/core/workers/chunks/ee8cd91c27e9cdfc3b2e.js +0 -1
- package/assets/esri/core/workers/chunks/efdd75896ca53eb6242f.js +0 -1
- package/assets/esri/core/workers/chunks/f1c348cf2a1e35da9b20.js +0 -1
- package/assets/esri/core/workers/chunks/f4053e4e2d6e678db48a.js +0 -1
- package/assets/esri/core/workers/chunks/f4d577ff61da7964e08a.js +0 -1
- package/assets/esri/core/workers/chunks/f7da652f8dab57677cc3.js +0 -1
- package/assets/esri/core/workers/chunks/fe92f54e45fd21ccd75f.js +0 -1
- package/assets/esri/core/workers/chunks/fee1d873127dca02459f.js +0 -1
- package/assets/esri/core/workers/chunks/ff31936236dd9b1acb24.js +0 -1
- /package/assets/esri/core/workers/chunks/{32e9e92bbbd000fbbaf7.js.LICENSE.txt → 4141a3a93732996601e8.js.LICENSE.txt} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import t from"../../core/Collection.js";import r from"../../core/Error.js";import o from"../../core/Logger.js";import{destroyMaybe as i}from"../../core/maybe.js";import{whenOnce as s}from"../../core/reactiveUtils.js";import{property as a,subclass as n}from"../../core/accessorSupport/decorators.js";import{isSceneLayer as l,isTable as u}from"../../layers/support/layerUtils.js";import d from"../BatchAttributeForm/BatchAttributeFormViewModel.js";import p from"./UpdateFeaturesWorkflowData.js";import c from"./Workflow.js";import{whenEditorLayerView as f,findEditorItemForLayer as h}from"./workflowUtils.js";import{MultipleSourceLayersError as m}from"./support/errors.js";import{SketchController as g}from"./support/SketchController.js";var y;const w=()=>o.getLogger("esri.widgets.Editor.UpdateFeaturesWorkflow"),F=Symbol();let v=y=class extends c{constructor(e){super(e),this.type="update-features",this._formViewModel=null,this._sketchController=null}async initialize(){this._initializeFormViewModel();try{await this._updatingHandles.addPromise((async()=>{const{fullFeatures:e}=await this.data.when();this._formViewModel.features=new t(e),this._initializeVisuals(e)})())}catch(e){this.cancel({force:!0,error:new r("update-features-workflow:initialize","Failed to initialize the workflow data.",e)})}}destroy(){this._sketchController=i(this._sketchController),this._formViewModel.destroy()}get curveUpdatesDisabled(){return this.data.curveUpdatesDisabled}get features(){return this.data.features}get featureInfos(){return this.data.featureInfos}get formViewModel(){return this._formViewModel}get hasInvalidFormTemplate(){return this.data.editorItems.some(e=>e.hasInvalidFormTemplate)}get hasPendingEdits(){const{data:e}=this;return e.fullFeatures.some(t=>!!e.getPendingEditsForFeature(t)?.modified)}get parent(){return this.data.parent}get saveActionLabel(){return"update"}get selectedFeature(){return this.data.selectedFeature}get sketchUpdateOptions(){const{data:e}=this,t=e.fullFeatures,r=M(e),o=e.getEditorItemForLayer(r),i=!this.selectedFeature||t.length>1;return{multipleSelectionEnabled:!1,reshapeOptions:{enableCreateCurveFromStraightEdge:!l(r)&&!!o?.capabilities.supportsTrueCurve},tool:i?"move":void 0}}get sketchViewModel(){return this._sketchController?.viewModel}get supportsMergeFeaturesWorkflow(){const e=this.data,{fullFeatures:t,layers:r}=e;return!(1!==r.length||t.length<2)&&(!this.curveUpdatesDisabled&&!!e.getEditorItemForLayer(r[0])?.supportsMergeFeaturesWorkflow)}
|
|
2
|
+
import{__decorate as e}from"tslib";import t from"../../core/Collection.js";import r from"../../core/Error.js";import o from"../../core/Logger.js";import{destroyMaybe as i}from"../../core/maybe.js";import{whenOnce as s}from"../../core/reactiveUtils.js";import{property as a,subclass as n}from"../../core/accessorSupport/decorators.js";import{isSceneLayer as l,isTable as u}from"../../layers/support/layerUtils.js";import d from"../BatchAttributeForm/BatchAttributeFormViewModel.js";import p from"./UpdateFeaturesWorkflowData.js";import c from"./Workflow.js";import{whenEditorLayerView as f,findEditorItemForLayer as h}from"./workflowUtils.js";import{MultipleSourceLayersError as m}from"./support/errors.js";import{SketchController as g}from"./support/SketchController.js";var y;const w=()=>o.getLogger("esri.widgets.Editor.UpdateFeaturesWorkflow"),F=Symbol();let v=y=class extends c{constructor(e){super(e),this.type="update-features",this._formViewModel=null,this._sketchController=null}async initialize(){this._initializeFormViewModel();try{await this._updatingHandles.addPromise((async()=>{const{fullFeatures:e}=await this.data.when();this._formViewModel.features=new t(e),this._initializeVisuals(e)})())}catch(e){this.cancel({force:!0,error:new r("update-features-workflow:initialize","Failed to initialize the workflow data.",e)})}}destroy(){this._sketchController=i(this._sketchController),this._formViewModel.destroy()}get curveUpdatesDisabled(){return this.data.curveUpdatesDisabled}get features(){return this.data.features}get featureInfos(){return this.data.featureInfos}get formViewModel(){return this._formViewModel}get hasInvalidFormTemplate(){return this.data.editorItems.some(e=>e.hasInvalidFormTemplate)}get hasPendingEdits(){const{data:e}=this;return e.fullFeatures.some(t=>!!e.getPendingEditsForFeature(t)?.modified)}get parent(){return this.data.parent}get saveActionLabel(){return"update"}get selectedFeature(){return this.data.selectedFeature}get sketchUpdateOptions(){const{data:e}=this,t=e.fullFeatures,r=M(e),o=e.getEditorItemForLayer(r),i=!this.selectedFeature||t.length>1;return{multipleSelectionEnabled:!1,reshapeOptions:{enableCreateCurveFromStraightEdge:!l(r)&&!!o?.capabilities.supportsTrueCurve},tool:i?"move":void 0}}get sketchViewModel(){return this._sketchController?.viewModel}get supportsMergeFeaturesWorkflow(){const e=this.data,{fullFeatures:t,layers:r}=e;return!(1!==r.length||t.length<2)&&(!this.curveUpdatesDisabled&&!!e.getEditorItemForLayer(r[0])?.supportsMergeFeaturesWorkflow)}getUpdating(){return!!this._sketchController?.updating}get viewGraphics(){return this._sketchController?.sketchGraphics??this.data.fullFeatures}async commit(){const{data:e,_formViewModel:t}=this;for(const r of e.fullFeatures)E(e.getPendingEditsForFeature(r),t.getValues(r));await super.commit()}static create(e){const{applyEdits:t,applyEditsFeatureService:r,...o}=e,{features:i,featureInfos:s,viewModel:a}=o,n=new Set;function l(e){const t=h(a.editorItems,e);t&&n.add(t)}s?.length?s.forEach(({layer:e})=>l(e)):i?.length&&(w().warn("editor:update-features-workflow-data-features","UpdateFeaturesWorkflow: 'features' is deprecrated, use 'featureInfos'"),i.forEach(e=>l(e.sourceLayer??e.layer)));const u=Array.from(n),d=new y({data:new p({...o,editorItems:u}),onCommit:_(e.applyEdits)});return d._set("steps",k()),d}async deleteAndCommit(){return this.data.stageDelete(),this.commit()}async enter(){}exit(e){}async reset(){}async save(){const{formViewModel:e}=this;e.submit(),e.valid&&await super.save()}async start(){await super.start(),await s(()=>!this.updating);const e=this._sketchController;if(e)return e;const{data:t}=this,{view:r}=t.viewModel,o=M(t);return!r||u(o)?{enter:async()=>{},exit:()=>{}}:{enter:()=>this._initializeHighlights(t.fullFeatures,o,r),exit:()=>this.removeHandles(F)}}_initializeFormViewModel(){const{data:e}=this,t=e.viewModel.view,r=e.getEditorItemForLayer(M(e)),o=r?.layerInfo?[r.layerInfo]:null,i=new d({editType:"UPDATE",map:t?.map,readOnly:!1===r?.capabilities.update.attributes,spatialReference:t?.spatialReference,timeZone:e.timeZone,layerInfos:o});this._formViewModel=i,this.addHandles(i.on("value-change",t=>{for(const r of t.features)e.getPendingEditsForFeature(r)?.setAttribute(t.fieldName,t.value);this._sketchController?.notifyAttributesChanged(t)}))}async _initializeHighlights(e,t,r){const o=await f(r,t);this.addHandles(o.highlight(e),F)}_initializeSketchController(e,t,r){const{data:o}=this,i=new g({defaultUpdateOptions:this.sketchUpdateOptions,sourceLayer:t,view:r,features:e,useLegacyCreateTools:o.viewModel.useLegacyCreateTools,onGeometriesUpdated:e=>{const t=[];for(const{feature:r,geometry:i}of e)o.getPendingEditsForFeature(r)?.updateGeometry(i),t.push(r);this._formViewModel.notifyGeometriesChanged(t)},onVisualVariableAttributesUpdated:()=>{w().warnOnce("editor:batch-update-visual-variables","UpdateFeaturesWorkflow does not currently support modifying visual variables through the scale and rotate tools.")}});this._sketchController=i}_initializeVisuals(e){const{data:t}=this,{view:r}=t.viewModel;if(!r)return;const o=M(t);if(u(o))return;const i=t.getEditorItemForLayer(o);i?.capabilities.update.geometry&&!this.curveUpdatesDisabled&&this._initializeSketchController(e,o,r)}};e([a()],v.prototype,"curveUpdatesDisabled",null),e([a()],v.prototype,"features",null),e([a()],v.prototype,"featureInfos",null),e([a()],v.prototype,"formViewModel",null),e([a()],v.prototype,"hasInvalidFormTemplate",null),e([a()],v.prototype,"hasPendingEdits",null),e([a()],v.prototype,"parent",null),e([a()],v.prototype,"saveActionLabel",null),e([a()],v.prototype,"selectedFeature",null),e([a()],v.prototype,"sketchUpdateOptions",null),e([a()],v.prototype,"sketchViewModel",null),e([a()],v.prototype,"supportsMergeFeaturesWorkflow",null),e([a()],v.prototype,"type",void 0),e([a()],v.prototype,"viewGraphics",null),e([a()],v.prototype,"_formViewModel",void 0),e([a()],v.prototype,"_sketchController",void 0),v=y=e([n("esri.widgets.Editor.UpdateFeaturesWorkflow")],v);const b=v;function k(){return[{id:"editing-features",async setUp(){},async tearDown(){}}]}function _(e){return async t=>{const r=M(t),o=[],i=[];for(const e of t.fullFeatures){const r=t.getPendingEditsForFeature(e),s=r?.stagedForDelete;if(!r?.modified&&!s)continue;const a=e.clone();if(!r?.attributesModified||s){const t=e.sourceLayer;if(!t){w().warn("Feature has no sourceLayer. It will not be included in any applyEdits payload.");continue}const r=t.objectIdField;if(a.attributes={[r]:e.getAttribute(r)},"scene"===t.type&&null!=t.infoFor3D){const r=t.associatedLayer?.globalIdField;null!=r&&a.setAttribute(r,e.getAttribute(r))}}r?.geometryModified&&!s||(a.geometry=null),s?i.push(a):o.push(a)}if(o.length+i.length===0)return void w().warn("No edits to apply. Workflow will finish without sending an applyEdits request.");const s={updateFeatures:o.length>0?o:void 0,deleteFeatures:i.length>0?i:void 0};await e(r,s)}}function M(e){if(e.layers.length>1)throw new m;return e.layers[0]}function E(e,t){if(!e||!e.feature)return;const{attributes:r}=e.feature;Object.keys(t).some(e=>t[e]!==r[e])&&e.updateAttributes(t)}export{b as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import t from"../../Graphic.js";import{remove as i}from"../../core/arrayUtils.js";import o from"../../core/Error.js";import{makeHandle as a}from"../../core/handleUtils.js";import r from"../../core/Logger.js";import{abortMaybe as s}from"../../core/maybe.js";import{onAbort as n,createAbortError as l,throwIfAborted as d,debounce as c}from"../../core/promiseUtils.js";import p from"../../core/Queue.js";import{whenOnce as u,watch as w,sync as h,on as f,when as g}from"../../core/reactiveUtils.js";import{last as v}from"../../core/SetUtils.js";import{property as k,subclass as m}from"../../core/accessorSupport/decorators.js";import{getGraphicLayer as y}from"../../graphic/graphicOriginUtils.js";import{isEditableLayer as W}from"../../layers/support/editableLayers.js";import{isFeatureLayer as A,isSubtypeSublayer as _,isSubtypeGroupLayer as b,isTable as S}from"../../layers/support/layerUtils.js";import{findUtilityNetwork as C,isGraphicForRelatableFeatureSupportedLayer as M}from"../../popup/support/featureUtils.js";import{createFeatureServices as F}from"../../rest/featureService/utils.js";import R from"../../views/draw/support/HighlightHelper.js";import{ViewEventPriorities as U}from"../../views/input/InputManager.js";import{temporaryHighlightName as E}from"../../views/support/HighlightDefaults.js";import I from"./CreateFeaturesWorkflow.js";import j from"./MergeFeaturesWorkflow.js";import V from"./SplitFeatureWorkflow.js";import P from"./UpdateFeaturesWorkflow.js";import{UpdateFeatureWorkflow as L}from"./UpdateFeatureWorkflow.js";import{UpdateRecordWorkflow as N}from"./UpdateRecordWorkflow.js";import O from"./UpdateWorkflowData.js";import T from"./Workflow.js";import{isFeatureFormViewModel as x,findEditorItemForLayer as D,isSplitFeatureWorkflow as H,workflowInfluencesOutcomeOfParent as z,isAnyUpdateLeafWorkflow as q,isUpdateRecordWorkflow as G,isParentWorkflow as Q,findEditorItemForLayerOrThrow as $,createWorkflowSteps as B,fetchCandidates as J,isUpdateFeaturesWorkflowOptions as K,toFeatureInfos as X,isMergeWorkflowOptions as Y,isSplitWorkflowOptions as Z}from"./workflowUtils.js";import{assertFeaturesAreFromSameLayer as ee}from"./support/errors.js";var te;let ie=te=class extends T{constructor(e){super(e),this._workflowStack=new p(v),this._sketchStack=new p(v),this.data=void 0,this.type="update"}destroy(){this._drainWorkflowStack(e=>e.cancel({force:!0}))}get formViewModel(){return this.activeWorkflow?.formViewModel}get activeUtilityNetworkAssociationAddAssociationViewModel(){return"add-association"===this.activeWorkflow?.type?this.activeWorkflow.utilityNetworkAssociationAddAssociationViewModel:null}get activeSketchViewModel(){return this._sketchStack.peek()?.viewModel}get canDeleteAssociation(){const{formViewModel:e}=this;if(!this.activeWorkflow||!this.data.viewModel.view?.map||!x(e))return!1;const{activeAssociation:t,feature:i}=e;return!(!t||!i?.sourceLayer||!A(i?.sourceLayer)&&!_(i?.sourceLayer))}get activeWorkflow(){return this._workflowStack.last()}get updating(){return this._updatingHandles.updating||!!this.activeWorkflow?.updating}get hasPreviousStep(){const e=this.activeWorkflow?.formViewModel;return this._stepIndex>0||this.nestedWorkflowCount>1||this.activeWorkflow?.hasPreviousStep||"view"!==this.data.viewModel.attachmentsViewModel.mode||x(e)&&(null!=e.relationshipId||null!=e.associationId||null!=e.associatedLayer)}get hasUpdatableCandidates(){const{candidates:e,viewModel:t}=this.data;return e.some(({layer:e})=>D(t.editorItems,e)?.supportsUpdateWorkflow)}get nestedWorkflowCount(){return this._workflowStack.length}get shouldShowAttachments(){return this.activeWorkflow?.shouldShowAttachments??!1}get shouldAllowAttachmentEditing(){return this.activeWorkflow?.shouldAllowAttachmentEditing??!1}get hasPendingEdits(){return Array.from(this._workflowStack).some(e=>e.hasPendingEdits)}get helpMessage(){return this.activeWorkflow?.helpMessage?this.activeWorkflow.helpMessage:"awaiting-feature-to-update"===this.stepId?"select":void 0}get noticeMessage(){return this.activeWorkflow?.noticeMessage}get reliesOnOwnerAdminPrivileges(){return this.activeWorkflow?.reliesOnOwnerAdminPrivileges??!1}get hasInvalidFormTemplate(){return this.activeWorkflow?.hasInvalidFormTemplate??!1}get curveResizeDisabled(){return this.activeWorkflow?.curveResizeDisabled??!1}get curveUpdatesDisabled(){return this.activeWorkflow?.curveUpdatesDisabled??!1}async back(e=()=>Promise.resolve(!0)){const{activeWorkflow:t}=this,i=t?.formViewModel;if(x(i)){if(i?.activeRelationshipInput){const e=i.activeRelationshipInput;if(e.activeCategory)return void(e.activeCategory=null);if(null!=i.relationshipId)return void(i.relationshipId=null);if(e.showAllEnabled)return void(e.showAllEnabled=!1)}if("add-association"===t?.type){const{activeUtilityNetworkAssociationAddAssociationViewModel:e}=this;if(e?.filterOptionsVisible)return void(e.filterOptionsVisible=!1);e?.featureSpatialItems.length&&e.reset()}if(null!=i?.associatedLayer)return void(i.associatedLayer=null);if(null!=i?.associationId)return void(i.associationId=null)}if("create-features"===t?.type&&t.hasPreviousStep)await t.previous({cancelCurrentStep:!0});else{if(H(t)&&t.hasPreviousStep)return await t.back();if(t){if(t.hasPendingEdits){if(!await e())return}t.hasPreviousStep?await t.previous({cancelCurrentStep:!0}):await this.cancelActiveWorkflow({force:!0})}else this.hasPreviousStep?await this.previous({cancelCurrentStep:!0}):await this.cancel({force:!0})}}async cancelActiveWorkflow(e){await(this.activeWorkflow?.cancel(e)),await this._popWorkflowAndReconcile()}async commit(){await this._drainWorkflowStack(e=>e.commit()),await super.commit()}static create(e){const{startAt:t,applyEdits:i,applyEditsFeatureService:o,...a}=e,r=new te({data:new O({applyEditsCallback:i,applyEditsFeatureServiceCallback:o,...a}),onCommit:async()=>{}});return r._set("steps",this._createWorkflowSteps(r,t)),r}async save(e){const{formViewModel:t}=this;if(t&&(t.submit(),!t.submittable||x(t)&&ae(t)))return;if(this.nestedWorkflowCount<2)return await this.commit();const{activeWorkflow:i}=this;if(await(i?.commit(e)),!z(i))return void await this._popWorkflowAndReconcile();this._popWorkflow();const o=this._workflowStack.peek();if(o&&o===i?.parent&&(await o.cancel(),this._popWorkflow(),0===this.nestedWorkflowCount))return await this.commit();await this._reconcileWorkflowStack()}async startCreatingRelatedRecord(e){const t=this._makeUpdatingResolver();try{const t=this._createNestedCreateFeaturesWorkflow(e);await this._pushWorkflowAndReconcile(t)}catch(i){throw new o("editor:unable-to-start-creating","Could not begin updating the provided feature or table record.",{error:i})}finally{t.resolve()}}async startMergingFeatures(e,t){const i=this._makeUpdatingResolver();try{const i=await this._createNestedMergeFeaturesWorkflow(e,t);await this._pushWorkflowAndReconcile(i)}catch(a){throw new o("editor:unable-to-start-merging","Could not begin merging the provided features.",{error:a})}finally{i.resolve()}}async startSplittingFeature(e,t){const i=this._makeUpdatingResolver();try{const i=await this._createNestedSplitFeatureWorkflow(e,t);await this._pushWorkflowAndReconcile(i)}catch(a){throw new o("editor:unable-to-start-splitting","Could not begin splitting the provided feature.",{error:a})}finally{i.resolve()}}async startUpdatingSingle(e,t){const i=this._makeUpdatingResolver();try{const i=await this._createNestedUpdateWorkflow(e,t);await this._pushWorkflowAndReconcile(i)}catch(a){throw new o("editor:unable-to-start-updating","Could not begin updating the provided feature or table record.",{error:a})}finally{i.resolve()}}async startUpdatingMultiple(e,t){const i=this._makeUpdatingResolver();try{const i=await this._createNestedUpdateFeaturesWorkflow(e,t);await this._pushWorkflowAndReconcile(i)}catch(a){throw new o("editor:unable-to-start-updating","Could not begin updating the provided features or table records.",{error:a})}finally{i.resolve()}}async startAddAssociation(e,t,i){const a=this._makeUpdatingResolver();try{const o=await this._createNestedAddAssociationWorkflow(e,t,i);await this._pushWorkflowAndReconcile(o)}catch(r){throw new o("editor:unable-to-start-updating","Could not begin updating the provided feature or table record.",{error:r})}finally{a.resolve()}}async deleteActiveFeatures(){const{activeWorkflow:e}=this;if(!e)throw new o("editor:nothing-to-delete","There is no feature to delete");const t=q(e);if(t){e.data.stageDelete();const t=G(e)?e.data.edits.feature?[e.data.edits.feature]:[]:e.data.features;this._removeFeaturesFromCandidates(t)}else await e.cancel();this.nestedWorkflowCount<2?t?await this.commit():await this.cancel({force:!0}):(t&&await e.commit(),await this._popWorkflowAndReconcile(),await this._returnToPageWithContent())}async deleteActiveAssociation(){if(!this.canDeleteAssociation)throw new o("editor:nothing-to-delete","There is no association to delete");await this._deleteActiveAssociation(),await this._popWorkflowAndReconcile(),await this._returnToPageWithContent()}async cancelAll(){await this._drainWorkflowStack(e=>e.cancel({force:!0}))}async _deleteActiveAssociation(){const{formViewModel:e}=this;if(!x(e))throw new o("editing:failed-to-delete-association","The active workflow does not support editing associations");const{activeAssociation:t,feature:i}=e,{applyEditsFeatureServiceCallback:a,viewModel:r}=this.data,{sourceLayer:s}=i,n=_(s)&&s.parent?s.parent:s,l=F([n]),d=l.values().next().value?.featureService;if(!d)throw new o("editor:failed-to-delete-association","Could not retrieve feature service needed to delete association");await(d?.load());const c=r.view.map,p=C(c,n);await(p?.networkSystemLayers.loadAssociationsTable());const u=p?.generateDeleteAssociations([t]);if(!u)throw new o("editor:failed-to-delete-association","Could not create payload needed to delete association");const w=p?.gdbVersion??void 0;await a(d,[u],{gdbVersion:w,globalIdUsed:!0})}_removeFeaturesFromCandidates(e){const{candidates:t}=this.data;if(0!==t.length&&0!==e.length)for(const o of e)i(t,o)}async _returnToPageWithContent(){const{formViewModel:e}=this;if(!x(e)||!e?.activeAssociationInput)return;const{activeAssociationInput:t,associationId:i}=e;await t.refresh(),t.associatedLayer&&!t.associatedFeatures?.length&&(e.associatedLayer=null),null==i||t.associatedFeatureInfos.size||(e.associationId=null)}_createNestedCreateFeaturesWorkflow(e){const{relatedLayer:t}=e,{addAttachmentsCallback:i,applyEditsCallback:a,applyEditsFeatureServiceCallback:r,sketchOptions:s,snappingManager:n,viewModel:l}=this.data;if(!W(t))throw new o("editor:unsupported-layer","Editing is not supported on the provided layer");const d=this._getCreationInfoForNestedCreateFeaturesWorkflow(e),c=d.template||d.initialFeature?"creating-features":"awaiting-feature-creation-info",p=Q(this.activeWorkflow)?this.activeWorkflow:void 0;return I.create({addAttachmentsCallback:i,applyEdits:a,applyEditsFeatureService:r,creationInfo:d,isNested:!0,parent:p,sketchOptions:s,snappingManager:n,startAt:c,viewModel:l})}_getCreationInfoForNestedCreateFeaturesWorkflow(e){const{relatedLayer:i}=e;if(!W(i)||b(i))throw new o("editor:unsupported-layer","Editing is not supported on the provided layer");const{viewModel:a}=this.data,r={layer:i,maxFeatures:1},s=this._makeRelatedRecordAttributes(e),n=a.getTemplatesForLayer(i);return n?.length>0?(r.attributeOverrides=s,1===n.length&&(r.template=n[0])):r.initialFeature=new t({sourceLayer:i,attributes:s}),r}async _createNestedUpdateWorkflow(e,t={}){const i=S(e.sourceLayer)?N:L,{applyEditsCallback:o,applyEditsFeatureServiceCallback:a,sketchOptions:r,snappingManager:s,viewModel:n}=this.data,l=Q(this.activeWorkflow)?this.activeWorkflow:void 0,d=await i.create({feature:e,parent:l,sketchOptions:r,snappingManager:s,viewModel:n,applyEdits:o,applyEditsFeatureService:a,featureFormCallbacks:{addRelatedRecord:e=>{this.startCreatingRelatedRecord(e)},editRelatedRecord:({relatedFeature:e,readOnly:t})=>{this.startUpdatingSingle(e,{readOnly:t})},selectAssociatedFeature:async({feature:e,association:t})=>await this.startUpdatingSingle(e,{association:t}),addAssociation:e=>{this.startAddAssociation(e.feature,e.utilityNetwork,e.associationType)}},...t});return await u(()=>!d.updating),d}async _createNestedUpdateFeaturesWorkflow(e,t={}){const{applyEditsCallback:i,applyEditsFeatureServiceCallback:o,viewModel:a}=this.data,r=P.create({applyEdits:i,applyEditsFeatureService:o,featureInfos:e,viewModel:a,...t});return await u(()=>!r.updating),r}async _createNestedAddAssociationWorkflow(e,t,i){const{AddAssociationWorkflow:a}=await import("./AddAssociationWorkflow.js"),{applyEditsCallback:r,applyEditsFeatureServiceCallback:s,viewModel:n}=this.data,l=Q(this.activeWorkflow)?this.activeWorkflow:void 0,{formViewModel:d}=this,c=x(d)?d.activeAssociationInput:null;if(!c)throw new o("editing:unable-to-add-association","There is no active association input in the current workflow's form.");const p=await a.create({utilityNetwork:t,associationType:i,feature:e,parent:l,viewModel:n,associationInput:c,applyEdits:r,applyEditsFeatureService:s});return await u(()=>!p.updating),p}async _createNestedMergeFeaturesWorkflow(e,t){const{applyEditsCallback:i,applyEditsFeatureServiceCallback:o,viewModel:a}=this.data;ee(e);const r=$(this.data.viewModel.editorItems,y(e[0])),s=Q(this.activeWorkflow)?this.activeWorkflow:void 0,n=await j.create({applyEdits:i,applyEditsFeatureService:o,editorItem:r,features:e,parent:s,viewModel:a,...t});return await u(()=>!n.updating),n}async _createNestedSplitFeatureWorkflow(e,t){const{applyEditsCallback:i,applyEditsFeatureServiceCallback:o,sketchOptions:a,snappingManager:r,viewModel:s}=this.data,n=Q(this.activeWorkflow)?this.activeWorkflow:void 0,l=$(s.editorItems,e.sourceLayer),d=V.create({applyEdits:i,applyEditsFeatureService:o,editorItem:l,feature:e,parent:n,sketchOptions:a,snappingManager:r,viewModel:s,...t});return await u(()=>!d.updating),d}async _drainWorkflowStack(e){const t=this._workflowStack,i=[];for(const o of t){const t=e(o).finally(()=>o.destroy());this._updatingHandles.consumePromise(t),i.push(t)}await Promise.all(i),this._workflowStack.clear(),this._sketchStack.clear()}_makeUpdatingResolver(){const e=Promise.withResolvers();return this._updatingHandles.consumePromise(e.promise),e}_makeRelatedRecordAttributes(e){const{parentFeature:t,relatedLayer:i,relationshipId:o}=e;if(!M(t))return;const a=i.relationships?.find(e=>e.id===o);if(!a)return void this._logContinuingWithoutRelationshipWarning("relationship-not-found","Could not begin creating a related record because the relationship specified could not be found on the destination layer.");if("origin"===a.role)return void this._logContinuingWithoutRelationshipWarning("unsupported-role","Creating new related records in the 'origin' table of a relationship is not yet supported");const r=t.sourceLayer;a.relatedTableId!==r.layerId&&this._logContinuingWithoutRelationshipWarning("invalid-argument-combination","The given parent feature does not belong to the relationship designated by the given relationship ID.");const s=r.relationships?.find(e=>e.id===o);if(!s)return void this._logContinuingWithoutRelationshipWarning("relationship-not-found","Could not begin creating a related record because the relationship specified could not be found on the origin layer.");const n=oe(r,s),l=t.getAttribute(n);l||this._logContinuingWithoutRelationshipWarning("no-key-on-origin-feature","The given parent feature does not have a value for the relationship's origin primary key field.");const d=oe(i,a);return{[d]:l}}_popWorkflow(){this._workflowStack.pop()?.destroy(),this._sketchStack.pop()}async _popWorkflowAndReconcile(){this._popWorkflow();const e=await this._reconcileWorkflowStack();if(e.failureCount>0)throw new o("editor:next-workflow-failed","Popped the top workflow, but the next workflow in the stack failed to activate",e)}async _pushWorkflowAndReconcile(e){const t=this._workflowRequiresSketchViewModel(e);this.activeWorkflow?.exit({removeSketchHandles:t});const i=this._sketchStack,a=await(e?.start()),r=i.peek();a?(r?.exit(),i.push(a)):i.push(this._cloneSketchController(r)),this._workflowStack.push(e);const s=await this._reconcileWorkflowStack();if(s.failureCount>0)throw new o("editor:failed-to-start-updating-feature","Failed to enter the provided workflow.",s)}async _reconcileWorkflowStack(){const e=this._workflowStack,t=this._sketchStack;try{const i=e.peek();return await(i?.enter()),await(t.peek()?.enter()),{activeWorkflow:i,failureCount:0}}catch(i){e.pop().destroy(),t.pop();const{activeWorkflow:o,failureCount:a}=await this._reconcileWorkflowStack();return{activeWorkflow:o,failureCount:a+1}}}_cloneSketchController(e){return{enter:e?.enter??(async()=>{}),exit:e?.exit??(async()=>{}),viewModel:e?.viewModel}}_workflowRequiresSketchViewModel(e){const{type:t}=e;return"update-feature"===t||"create-features"===t&&!S(e.data.creationInfo?.layer)}static _createWorkflowSteps(e,t="awaiting-feature-to-update"){const{data:i}=e;return B(["awaiting-feature-to-update","awaiting-update-feature-candidate","editing-existing-feature","adding-attachment","editing-attachment"],t,{"awaiting-feature-to-update":()=>({id:"awaiting-feature-to-update",async setUp(){const{spinnerViewModel:t}=i.viewModel,o=i.viewModel.view;o.activeTool=null;let r=null;e.addHandles(a(()=>{r=s(r)}),this.id),i.rootFeatures.removeAll(),i.candidates=[];const c=o.on("immediate-click",async a=>{const s=Promise.withResolvers();e._updatingHandles.consumePromise(s.promise);try{t.location=a.mapPoint,t.visible=!0,r?.abort();const{editorItems:s}=i.viewModel;r=new AbortController;const c=await a.defer(()=>new Promise((e,t)=>{n(r?.signal,()=>t(l())),e(J(s,o,a,r?.signal))}));if(d(r),i.candidates=c.filter(e=>"fulfilled"===e.status).flatMap(e=>e.value).filter(e=>!e.isAggregate),t.visible=1===i.candidates.length,0===i.candidates.length)return;if(a.stopPropagation(),1===i.candidates.length){const{rootFeatures:o}=i;o.removeAll(),o.add(i.candidates[0]),e.go("editing-existing-feature").catch(()=>{}).then(()=>t.visible=!1)}else e.next()}finally{s.resolve()}},U.TOOL),p=g(()=>null!=o.activeTool,()=>e.cancel({force:!0}),{once:!0});o.focus(),e.addHandles([c,p],this.id)},async tearDown(){0===i.candidates.length&&(i.viewModel.spinnerViewModel.visible=!1),e.removeHandles(this.id)}}),"awaiting-update-feature-candidate":()=>({id:"awaiting-update-feature-candidate",async setUp(){i.rootFeatures.removeAll();const{view:t}=i.viewModel;if(!t)return;const o=new R({view:t,highlightName:E});e.addHandles([f(()=>i.rootFeatures,"change",({added:e,removed:t})=>{t.forEach(e=>o.remove(e)),e.forEach(e=>o.add(e))},h),a(()=>o.removeAll())],this.id)},async tearDown(){e.removeHandles(this.id)}}),"editing-existing-feature":()=>({id:"editing-existing-feature",async setUp(){await re(e);const{data:t}=e;t.viewModel.spinnerViewModel.visible=!1;const i=c(async()=>{await u(()=>!e.updating),e.previous()});e.addHandles([w(()=>e.nestedWorkflowCount,(e,t)=>{0===e&&0!==t&&i()},h)],this.id)},async tearDown(){await e.cancelAll(),e.removeHandles(this.id)}}),"adding-attachment":()=>({id:"adding-attachment",parent:"editing-existing-feature",async setUp(){},async tearDown(){i.viewModel.attachmentsViewModel.mode="view"}}),"editing-attachment":()=>({id:"editing-attachment",parent:"editing-existing-feature",async setUp(){},async tearDown(){i.viewModel.attachmentsViewModel.mode="view"}})})}_logContinuingWithoutRelationshipWarning(e,t){r.getLogger(this).warn(`editor:${e}`,t,"The create operation will be allowed to proceed, but the resulting feature may not be related to the given parent feature.")}};function oe(e,{keyField:t}){return e.getField(t)?.name??t}function ae(e){if(e.pendingSubtypeChoice)return!0;const t=e.getValues();return e.validateContingencyConstraints(t,{includeIncompleteViolations:!0}).length>0}async function re(e){const{data:t}=e,{rootWorkflowOptions:i}=t;if(K(i)){const{rootFeatureInfos:a}=t,r=a.length>0?a:X(t.rootFeatures.toArray());if(0===r.length)throw new o("editing:invalid-parameter","Must supply `rootFeatureInfos` or `rootFeatures` when root workflow type is 'update-multiple'");return await e.startUpdatingMultiple(r,i.props)}const{rootFeatures:a}=t,r=a.getItemAt(0);if(!r)throw new o("editor:no-feature-specified","Cannot setup the 'updating-existing-feature' step until one or more root features are provided");Y(i)?await e.startMergingFeatures(a.toArray(),i.props):Z(i)?await e.startSplittingFeature(r,i.props):await e.startUpdatingSingle(r)}e([k()],ie.prototype,"formViewModel",null),e([k()],ie.prototype,"activeUtilityNetworkAssociationAddAssociationViewModel",null),e([k()],ie.prototype,"activeSketchViewModel",null),e([k()],ie.prototype,"canDeleteAssociation",null),e([k()],ie.prototype,"activeWorkflow",null),e([k()],ie.prototype,"updating",null),e([k()],ie.prototype,"data",void 0),e([k()],ie.prototype,"hasPreviousStep",null),e([k()],ie.prototype,"hasUpdatableCandidates",null),e([k()],ie.prototype,"nestedWorkflowCount",null),e([k()],ie.prototype,"shouldShowAttachments",null),e([k()],ie.prototype,"shouldAllowAttachmentEditing",null),e([k()],ie.prototype,"hasPendingEdits",null),e([k()],ie.prototype,"helpMessage",null),e([k()],ie.prototype,"noticeMessage",null),e([k()],ie.prototype,"reliesOnOwnerAdminPrivileges",null),e([k()],ie.prototype,"hasInvalidFormTemplate",null),e([k()],ie.prototype,"curveResizeDisabled",null),e([k()],ie.prototype,"curveUpdatesDisabled",null),ie=te=e([m("esri.widgets.Editor.UpdateWorkflow")],ie);const se=ie;export{se as default};
|
|
2
|
+
import{__decorate as e}from"tslib";import t from"../../Graphic.js";import{remove as i}from"../../core/arrayUtils.js";import o from"../../core/Error.js";import{makeHandle as a}from"../../core/handleUtils.js";import r from"../../core/Logger.js";import{abortMaybe as s}from"../../core/maybe.js";import{onAbort as n,createAbortError as l,throwIfAborted as d,debounce as c}from"../../core/promiseUtils.js";import p from"../../core/Queue.js";import{whenOnce as u,watch as w,sync as h,on as f,when as g}from"../../core/reactiveUtils.js";import{last as v}from"../../core/SetUtils.js";import{property as k,subclass as m}from"../../core/accessorSupport/decorators.js";import{getGraphicLayer as y}from"../../graphic/graphicOriginUtils.js";import{isEditableLayer as W}from"../../layers/support/editableLayers.js";import{isFeatureLayer as A,isSubtypeSublayer as _,isSubtypeGroupLayer as b,isTable as S}from"../../layers/support/layerUtils.js";import{findUtilityNetwork as C,isGraphicForRelatableFeatureSupportedLayer as M}from"../../popup/support/featureUtils.js";import{createFeatureServices as F}from"../../rest/featureService/utils.js";import R from"../../views/draw/support/HighlightHelper.js";import{ViewEventPriorities as U}from"../../views/input/InputManager.js";import{temporaryHighlightName as E}from"../../views/support/HighlightDefaults.js";import I from"./CreateFeaturesWorkflow.js";import j from"./MergeFeaturesWorkflow.js";import V from"./SplitFeatureWorkflow.js";import P from"./UpdateFeaturesWorkflow.js";import{UpdateFeatureWorkflow as L}from"./UpdateFeatureWorkflow.js";import{UpdateRecordWorkflow as N}from"./UpdateRecordWorkflow.js";import O from"./UpdateWorkflowData.js";import T from"./Workflow.js";import{isFeatureFormViewModel as x,findEditorItemForLayer as D,isSplitFeatureWorkflow as H,workflowInfluencesOutcomeOfParent as z,isAnyUpdateLeafWorkflow as q,isUpdateRecordWorkflow as G,isParentWorkflow as Q,findEditorItemForLayerOrThrow as $,createWorkflowSteps as B,fetchCandidates as J,isUpdateFeaturesWorkflowOptions as K,toFeatureInfos as X,isMergeWorkflowOptions as Y,isSplitWorkflowOptions as Z}from"./workflowUtils.js";import{assertFeaturesAreFromSameLayer as ee}from"./support/errors.js";var te;let ie=te=class extends T{constructor(e){super(e),this._workflowStack=new p(v),this._sketchStack=new p(v),this.data=void 0,this.type="update"}destroy(){this._drainWorkflowStack(e=>e.cancel({force:!0}))}get formViewModel(){return this.activeWorkflow?.formViewModel}get activeUtilityNetworkAssociationAddAssociationViewModel(){return"add-association"===this.activeWorkflow?.type?this.activeWorkflow.utilityNetworkAssociationAddAssociationViewModel:null}get activeSketchViewModel(){return this._sketchStack.peek()?.viewModel}get canDeleteAssociation(){const{formViewModel:e}=this;if(!this.activeWorkflow||!this.data.viewModel.view?.map||!x(e))return!1;const{activeAssociation:t,feature:i}=e;return!(!t||!i?.sourceLayer||!A(i?.sourceLayer)&&!_(i?.sourceLayer))}get activeWorkflow(){return this._workflowStack.last()}getUpdating(){return this._updatingHandles.updating||!!this.activeWorkflow?.updating}get hasPreviousStep(){const e=this.activeWorkflow?.formViewModel;return this._stepIndex>0||this.nestedWorkflowCount>1||this.activeWorkflow?.hasPreviousStep||"view"!==this.data.viewModel.attachmentsViewModel.mode||x(e)&&(null!=e.relationshipId||null!=e.associationId||null!=e.associatedLayer)}get hasUpdatableCandidates(){const{candidates:e,viewModel:t}=this.data;return e.some(({layer:e})=>D(t.editorItems,e)?.supportsUpdateWorkflow)}get nestedWorkflowCount(){return this._workflowStack.length}get shouldShowAttachments(){return this.activeWorkflow?.shouldShowAttachments??!1}get shouldAllowAttachmentEditing(){return this.activeWorkflow?.shouldAllowAttachmentEditing??!1}get hasPendingEdits(){return Array.from(this._workflowStack).some(e=>e.hasPendingEdits)}get helpMessage(){return this.activeWorkflow?.helpMessage?this.activeWorkflow.helpMessage:"awaiting-feature-to-update"===this.stepId?"select":void 0}get noticeMessage(){return this.activeWorkflow?.noticeMessage}get reliesOnOwnerAdminPrivileges(){return this.activeWorkflow?.reliesOnOwnerAdminPrivileges??!1}get hasInvalidFormTemplate(){return this.activeWorkflow?.hasInvalidFormTemplate??!1}get curveResizeDisabled(){return this.activeWorkflow?.curveResizeDisabled??!1}get curveUpdatesDisabled(){return this.activeWorkflow?.curveUpdatesDisabled??!1}async back(e=()=>Promise.resolve(!0)){const{activeWorkflow:t}=this,i=t?.formViewModel;if(x(i)){if(i?.activeRelationshipInput){const e=i.activeRelationshipInput;if(e.activeCategory)return void(e.activeCategory=null);if(null!=i.relationshipId)return void(i.relationshipId=null);if(e.showAllEnabled)return void(e.showAllEnabled=!1)}if("add-association"===t?.type){const{activeUtilityNetworkAssociationAddAssociationViewModel:e}=this;if(e?.filterOptionsVisible)return void(e.filterOptionsVisible=!1);e?.featureSpatialItems.length&&e.reset()}if(null!=i?.associatedLayer)return void(i.associatedLayer=null);if(null!=i?.associationId)return void(i.associationId=null)}if("create-features"===t?.type&&t.hasPreviousStep)await t.previous({cancelCurrentStep:!0});else{if(H(t)&&t.hasPreviousStep)return await t.back();if(t){if(t.hasPendingEdits){if(!await e())return}t.hasPreviousStep?await t.previous({cancelCurrentStep:!0}):await this.cancelActiveWorkflow({force:!0})}else this.hasPreviousStep?await this.previous({cancelCurrentStep:!0}):await this.cancel({force:!0})}}async cancelActiveWorkflow(e){await(this.activeWorkflow?.cancel(e)),await this._popWorkflowAndReconcile()}async commit(){await this._drainWorkflowStack(e=>e.commit()),await super.commit()}static create(e){const{startAt:t,applyEdits:i,applyEditsFeatureService:o,...a}=e,r=new te({data:new O({applyEditsCallback:i,applyEditsFeatureServiceCallback:o,...a}),onCommit:async()=>{}});return r._set("steps",this._createWorkflowSteps(r,t)),r}async save(e){const{formViewModel:t}=this;if(t&&(t.submit(),!t.submittable||x(t)&&ae(t)))return;if(this.nestedWorkflowCount<2)return await this.commit();const{activeWorkflow:i}=this;if(await(i?.commit(e)),!z(i))return void await this._popWorkflowAndReconcile();this._popWorkflow();const o=this._workflowStack.peek();if(o&&o===i?.parent&&(await o.cancel(),this._popWorkflow(),0===this.nestedWorkflowCount))return await this.commit();await this._reconcileWorkflowStack()}async startCreatingRelatedRecord(e){const t=this._makeUpdatingResolver();try{const t=this._createNestedCreateFeaturesWorkflow(e);await this._pushWorkflowAndReconcile(t)}catch(i){throw new o("editor:unable-to-start-creating","Could not begin updating the provided feature or table record.",{error:i})}finally{t.resolve()}}async startMergingFeatures(e,t){const i=this._makeUpdatingResolver();try{const i=await this._createNestedMergeFeaturesWorkflow(e,t);await this._pushWorkflowAndReconcile(i)}catch(a){throw new o("editor:unable-to-start-merging","Could not begin merging the provided features.",{error:a})}finally{i.resolve()}}async startSplittingFeature(e,t){const i=this._makeUpdatingResolver();try{const i=await this._createNestedSplitFeatureWorkflow(e,t);await this._pushWorkflowAndReconcile(i)}catch(a){throw new o("editor:unable-to-start-splitting","Could not begin splitting the provided feature.",{error:a})}finally{i.resolve()}}async startUpdatingSingle(e,t){const i=this._makeUpdatingResolver();try{const i=await this._createNestedUpdateWorkflow(e,t);await this._pushWorkflowAndReconcile(i)}catch(a){throw new o("editor:unable-to-start-updating","Could not begin updating the provided feature or table record.",{error:a})}finally{i.resolve()}}async startUpdatingMultiple(e,t){const i=this._makeUpdatingResolver();try{const i=await this._createNestedUpdateFeaturesWorkflow(e,t);await this._pushWorkflowAndReconcile(i)}catch(a){throw new o("editor:unable-to-start-updating","Could not begin updating the provided features or table records.",{error:a})}finally{i.resolve()}}async startAddAssociation(e,t,i){const a=this._makeUpdatingResolver();try{const o=await this._createNestedAddAssociationWorkflow(e,t,i);await this._pushWorkflowAndReconcile(o)}catch(r){throw new o("editor:unable-to-start-updating","Could not begin updating the provided feature or table record.",{error:r})}finally{a.resolve()}}async deleteActiveFeatures(){const{activeWorkflow:e}=this;if(!e)throw new o("editor:nothing-to-delete","There is no feature to delete");const t=q(e);if(t){e.data.stageDelete();const t=G(e)?e.data.edits.feature?[e.data.edits.feature]:[]:e.data.features;this._removeFeaturesFromCandidates(t)}else await e.cancel();this.nestedWorkflowCount<2?t?await this.commit():await this.cancel({force:!0}):(t&&await e.commit(),await this._popWorkflowAndReconcile(),await this._returnToPageWithContent())}async deleteActiveAssociation(){if(!this.canDeleteAssociation)throw new o("editor:nothing-to-delete","There is no association to delete");await this._deleteActiveAssociation(),await this._popWorkflowAndReconcile(),await this._returnToPageWithContent()}async cancelAll(){await this._drainWorkflowStack(e=>e.cancel({force:!0}))}async _deleteActiveAssociation(){const{formViewModel:e}=this;if(!x(e))throw new o("editing:failed-to-delete-association","The active workflow does not support editing associations");const{activeAssociation:t,feature:i}=e,{applyEditsFeatureServiceCallback:a,viewModel:r}=this.data,{sourceLayer:s}=i,n=_(s)&&s.parent?s.parent:s,l=F([n]),d=l.values().next().value?.featureService;if(!d)throw new o("editor:failed-to-delete-association","Could not retrieve feature service needed to delete association");await(d?.load());const c=r.view.map,p=C(c,n);await(p?.networkSystemLayers.loadAssociationsTable());const u=p?.generateDeleteAssociations([t]);if(!u)throw new o("editor:failed-to-delete-association","Could not create payload needed to delete association");const w=p?.gdbVersion??void 0;await a(d,[u],{gdbVersion:w,globalIdUsed:!0})}_removeFeaturesFromCandidates(e){const{candidates:t}=this.data;if(0!==t.length&&0!==e.length)for(const o of e)i(t,o)}async _returnToPageWithContent(){const{formViewModel:e}=this;if(!x(e)||!e?.activeAssociationInput)return;const{activeAssociationInput:t,associationId:i}=e;await t.refresh(),t.associatedLayer&&!t.associatedFeatures?.length&&(e.associatedLayer=null),null==i||t.associatedFeatureInfos.size||(e.associationId=null)}_createNestedCreateFeaturesWorkflow(e){const{relatedLayer:t}=e,{addAttachmentsCallback:i,applyEditsCallback:a,applyEditsFeatureServiceCallback:r,sketchOptions:s,snappingManager:n,viewModel:l}=this.data;if(!W(t))throw new o("editor:unsupported-layer","Editing is not supported on the provided layer");const d=this._getCreationInfoForNestedCreateFeaturesWorkflow(e),c=d.template||d.initialFeature?"creating-features":"awaiting-feature-creation-info",p=Q(this.activeWorkflow)?this.activeWorkflow:void 0;return I.create({addAttachmentsCallback:i,applyEdits:a,applyEditsFeatureService:r,creationInfo:d,isNested:!0,parent:p,sketchOptions:s,snappingManager:n,startAt:c,viewModel:l})}_getCreationInfoForNestedCreateFeaturesWorkflow(e){const{relatedLayer:i}=e;if(!W(i)||b(i))throw new o("editor:unsupported-layer","Editing is not supported on the provided layer");const{viewModel:a}=this.data,r={layer:i,maxFeatures:1},s=this._makeRelatedRecordAttributes(e),n=a.getTemplatesForLayer(i);return n?.length>0?(r.attributeOverrides=s,1===n.length&&(r.template=n[0])):r.initialFeature=new t({sourceLayer:i,attributes:s}),r}async _createNestedUpdateWorkflow(e,t={}){const i=S(e.sourceLayer)?N:L,{applyEditsCallback:o,applyEditsFeatureServiceCallback:a,sketchOptions:r,snappingManager:s,viewModel:n}=this.data,l=Q(this.activeWorkflow)?this.activeWorkflow:void 0,d=await i.create({feature:e,parent:l,sketchOptions:r,snappingManager:s,viewModel:n,applyEdits:o,applyEditsFeatureService:a,featureFormCallbacks:{addRelatedRecord:e=>{this.startCreatingRelatedRecord(e)},editRelatedRecord:({relatedFeature:e,readOnly:t})=>{this.startUpdatingSingle(e,{readOnly:t})},selectAssociatedFeature:async({feature:e,association:t})=>await this.startUpdatingSingle(e,{association:t}),addAssociation:e=>{this.startAddAssociation(e.feature,e.utilityNetwork,e.associationType)}},...t});return await u(()=>!d.updating),d}async _createNestedUpdateFeaturesWorkflow(e,t={}){const{applyEditsCallback:i,applyEditsFeatureServiceCallback:o,viewModel:a}=this.data,r=P.create({applyEdits:i,applyEditsFeatureService:o,featureInfos:e,viewModel:a,...t});return await u(()=>!r.updating),r}async _createNestedAddAssociationWorkflow(e,t,i){const{AddAssociationWorkflow:a}=await import("./AddAssociationWorkflow.js"),{applyEditsCallback:r,applyEditsFeatureServiceCallback:s,viewModel:n}=this.data,l=Q(this.activeWorkflow)?this.activeWorkflow:void 0,{formViewModel:d}=this,c=x(d)?d.activeAssociationInput:null;if(!c)throw new o("editing:unable-to-add-association","There is no active association input in the current workflow's form.");const p=await a.create({utilityNetwork:t,associationType:i,feature:e,parent:l,viewModel:n,associationInput:c,applyEdits:r,applyEditsFeatureService:s});return await u(()=>!p.updating),p}async _createNestedMergeFeaturesWorkflow(e,t){const{applyEditsCallback:i,applyEditsFeatureServiceCallback:o,viewModel:a}=this.data;ee(e);const r=$(this.data.viewModel.editorItems,y(e[0])),s=Q(this.activeWorkflow)?this.activeWorkflow:void 0,n=await j.create({applyEdits:i,applyEditsFeatureService:o,editorItem:r,features:e,parent:s,viewModel:a,...t});return await u(()=>!n.updating),n}async _createNestedSplitFeatureWorkflow(e,t){const{applyEditsCallback:i,applyEditsFeatureServiceCallback:o,sketchOptions:a,snappingManager:r,viewModel:s}=this.data,n=Q(this.activeWorkflow)?this.activeWorkflow:void 0,l=$(s.editorItems,e.sourceLayer),d=V.create({applyEdits:i,applyEditsFeatureService:o,editorItem:l,feature:e,parent:n,sketchOptions:a,snappingManager:r,viewModel:s,...t});return await u(()=>!d.updating),d}async _drainWorkflowStack(e){const t=this._workflowStack,i=[];for(const o of t){const t=e(o).finally(()=>o.destroy());this._updatingHandles.consumePromise(t),i.push(t)}await Promise.all(i),this._workflowStack.clear(),this._sketchStack.clear()}_makeUpdatingResolver(){const e=Promise.withResolvers();return this._updatingHandles.consumePromise(e.promise),e}_makeRelatedRecordAttributes(e){const{parentFeature:t,relatedLayer:i,relationshipId:o}=e;if(!M(t))return;const a=i.relationships?.find(e=>e.id===o);if(!a)return void this._logContinuingWithoutRelationshipWarning("relationship-not-found","Could not begin creating a related record because the relationship specified could not be found on the destination layer.");if("origin"===a.role)return void this._logContinuingWithoutRelationshipWarning("unsupported-role","Creating new related records in the 'origin' table of a relationship is not yet supported");const r=t.sourceLayer;a.relatedTableId!==r.layerId&&this._logContinuingWithoutRelationshipWarning("invalid-argument-combination","The given parent feature does not belong to the relationship designated by the given relationship ID.");const s=r.relationships?.find(e=>e.id===o);if(!s)return void this._logContinuingWithoutRelationshipWarning("relationship-not-found","Could not begin creating a related record because the relationship specified could not be found on the origin layer.");const n=oe(r,s),l=t.getAttribute(n);l||this._logContinuingWithoutRelationshipWarning("no-key-on-origin-feature","The given parent feature does not have a value for the relationship's origin primary key field.");const d=oe(i,a);return{[d]:l}}_popWorkflow(){this._workflowStack.pop()?.destroy(),this._sketchStack.pop()}async _popWorkflowAndReconcile(){this._popWorkflow();const e=await this._reconcileWorkflowStack();if(e.failureCount>0)throw new o("editor:next-workflow-failed","Popped the top workflow, but the next workflow in the stack failed to activate",e)}async _pushWorkflowAndReconcile(e){const t=this._workflowRequiresSketchViewModel(e);this.activeWorkflow?.exit({removeSketchHandles:t});const i=this._sketchStack,a=await(e?.start()),r=i.peek();a?(r?.exit(),i.push(a)):i.push(this._cloneSketchController(r)),this._workflowStack.push(e);const s=await this._reconcileWorkflowStack();if(s.failureCount>0)throw new o("editor:failed-to-start-updating-feature","Failed to enter the provided workflow.",s)}async _reconcileWorkflowStack(){const e=this._workflowStack,t=this._sketchStack;try{const i=e.peek();return await(i?.enter()),await(t.peek()?.enter()),{activeWorkflow:i,failureCount:0}}catch(i){e.pop().destroy(),t.pop();const{activeWorkflow:o,failureCount:a}=await this._reconcileWorkflowStack();return{activeWorkflow:o,failureCount:a+1}}}_cloneSketchController(e){return{enter:e?.enter??(async()=>{}),exit:e?.exit??(async()=>{}),viewModel:e?.viewModel}}_workflowRequiresSketchViewModel(e){const{type:t}=e;return"update-feature"===t||"create-features"===t&&!S(e.data.creationInfo?.layer)}static _createWorkflowSteps(e,t="awaiting-feature-to-update"){const{data:i}=e;return B(["awaiting-feature-to-update","awaiting-update-feature-candidate","editing-existing-feature","adding-attachment","editing-attachment"],t,{"awaiting-feature-to-update":()=>({id:"awaiting-feature-to-update",async setUp(){const{spinnerViewModel:t}=i.viewModel,o=i.viewModel.view;o.activeTool=null;let r=null;e.addHandles(a(()=>{r=s(r)}),this.id),i.rootFeatures.removeAll(),i.candidates=[];const c=o.on("immediate-click",async a=>{const s=Promise.withResolvers();e._updatingHandles.consumePromise(s.promise);try{t.location=a.mapPoint,t.visible=!0,r?.abort();const{editorItems:s}=i.viewModel;r=new AbortController;const c=await a.defer(()=>new Promise((e,t)=>{n(r?.signal,()=>t(l())),e(J(s,o,a,r?.signal))}));if(d(r),i.candidates=c.filter(e=>"fulfilled"===e.status).flatMap(e=>e.value).filter(e=>!e.isAggregate),t.visible=1===i.candidates.length,0===i.candidates.length)return;if(a.stopPropagation(),1===i.candidates.length){const{rootFeatures:o}=i;o.removeAll(),o.add(i.candidates[0]),e.go("editing-existing-feature").catch(()=>{}).then(()=>t.visible=!1)}else e.next()}finally{s.resolve()}},U.TOOL),p=g(()=>null!=o.activeTool,()=>e.cancel({force:!0}),{once:!0});o.focus(),e.addHandles([c,p],this.id)},async tearDown(){0===i.candidates.length&&(i.viewModel.spinnerViewModel.visible=!1),e.removeHandles(this.id)}}),"awaiting-update-feature-candidate":()=>({id:"awaiting-update-feature-candidate",async setUp(){i.rootFeatures.removeAll();const{view:t}=i.viewModel;if(!t)return;const o=new R({view:t,highlightName:E});e.addHandles([f(()=>i.rootFeatures,"change",({added:e,removed:t})=>{t.forEach(e=>o.remove(e)),e.forEach(e=>o.add(e))},h),a(()=>o.removeAll())],this.id)},async tearDown(){e.removeHandles(this.id)}}),"editing-existing-feature":()=>({id:"editing-existing-feature",async setUp(){await re(e);const{data:t}=e;t.viewModel.spinnerViewModel.visible=!1;const i=c(async()=>{await u(()=>!e.updating),e.previous()});e.addHandles([w(()=>e.nestedWorkflowCount,(e,t)=>{0===e&&0!==t&&i()},h)],this.id)},async tearDown(){await e.cancelAll(),e.removeHandles(this.id)}}),"adding-attachment":()=>({id:"adding-attachment",parent:"editing-existing-feature",async setUp(){},async tearDown(){i.viewModel.attachmentsViewModel.mode="view"}}),"editing-attachment":()=>({id:"editing-attachment",parent:"editing-existing-feature",async setUp(){},async tearDown(){i.viewModel.attachmentsViewModel.mode="view"}})})}_logContinuingWithoutRelationshipWarning(e,t){r.getLogger(this).warn(`editor:${e}`,t,"The create operation will be allowed to proceed, but the resulting feature may not be related to the given parent feature.")}};function oe(e,{keyField:t}){return e.getField(t)?.name??t}function ae(e){if(e.pendingSubtypeChoice)return!0;const t=e.getValues();return e.validateContingencyConstraints(t,{includeIncompleteViolations:!0}).length>0}async function re(e){const{data:t}=e,{rootWorkflowOptions:i}=t;if(K(i)){const{rootFeatureInfos:a}=t,r=a.length>0?a:X(t.rootFeatures.toArray());if(0===r.length)throw new o("editing:invalid-parameter","Must supply `rootFeatureInfos` or `rootFeatures` when root workflow type is 'update-multiple'");return await e.startUpdatingMultiple(r,i.props)}const{rootFeatures:a}=t,r=a.getItemAt(0);if(!r)throw new o("editor:no-feature-specified","Cannot setup the 'updating-existing-feature' step until one or more root features are provided");Y(i)?await e.startMergingFeatures(a.toArray(),i.props):Z(i)?await e.startSplittingFeature(r,i.props):await e.startUpdatingSingle(r)}e([k()],ie.prototype,"formViewModel",null),e([k()],ie.prototype,"activeUtilityNetworkAssociationAddAssociationViewModel",null),e([k()],ie.prototype,"activeSketchViewModel",null),e([k()],ie.prototype,"canDeleteAssociation",null),e([k()],ie.prototype,"activeWorkflow",null),e([k()],ie.prototype,"data",void 0),e([k()],ie.prototype,"hasPreviousStep",null),e([k()],ie.prototype,"hasUpdatableCandidates",null),e([k()],ie.prototype,"nestedWorkflowCount",null),e([k()],ie.prototype,"shouldShowAttachments",null),e([k()],ie.prototype,"shouldAllowAttachmentEditing",null),e([k()],ie.prototype,"hasPendingEdits",null),e([k()],ie.prototype,"helpMessage",null),e([k()],ie.prototype,"noticeMessage",null),e([k()],ie.prototype,"reliesOnOwnerAdminPrivileges",null),e([k()],ie.prototype,"hasInvalidFormTemplate",null),e([k()],ie.prototype,"curveResizeDisabled",null),e([k()],ie.prototype,"curveUpdatesDisabled",null),ie=te=e([m("esri.widgets.Editor.UpdateWorkflow")],ie);const se=ie;export{se as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as t}from"tslib";import e from"../../core/Error.js";import{EventedAccessor as s}from"../../core/Evented.js";import{throwIfNotAbortError as i}from"../../core/promiseUtils.js";import{property as n,subclass as o}from"../../core/accessorSupport/decorators.js";import{UpdatingHandles as r}from"../../core/support/UpdatingHandles.js";let a=class extends s{constructor(t){super(t),this._indexHistory=[],this._lastStepIndex=-1,this._stepIndex=-1,this._updatingHandles=new r,this._handleKeys={afterCommit:"after-commit",beforeCommit:"before-commit"},this.data=void 0,this.started=!1,this.steps=[],this.type=null,this._pendingOperation=null}destroy(){this._updatingHandles.destroy()}get curveResizeDisabled(){return!1}get curveUpdatesDisabled(){return!1}get formViewModel(){return null}get hasNextStep(){const{steps:t}=this;return!!(t&&this._stepIndex<t.filter(t=>!t.parent).length-1)}get hasPreviousStep(){return this._stepIndex>0}get reliesOnOwnerAdminPrivileges(){return!1}get hasInvalidFormTemplate(){return!1}get shouldShowAttachments(){return!1}get shouldAllowAttachmentEditing(){return!1}get stepId(){const{steps:t}=this,e=t&&t[this._stepIndex];return e&&e.id}get allowSave(){return!this.updating}get helpMessage(){}get noticeMessage(){}get hasPendingEdits(){return!1}get keyboardCancellationEnabled(){return!0}get saveActionLabel(){return"submit"}get sketchUpdateOptions(){return{}}get updating(){return this._updatingHandles.updating||!!this.formViewModel?.updating}async back(t=()=>Promise.resolve(!0)){if(this.hasPendingEdits){if(!await t())return}this.hasPreviousStep?await this.previous({cancelCurrentStep:!0}):await this.cancel({force:!0})}async cancel(t={force:!0}){return!1!==t.force?this._cancel(t):new Promise((s,i)=>{this.emit("cancel-request",{controller:{allow:()=>{this._cancel({...t,force:!0}).then(s)},deny:()=>i(new e("workflow:cancel-denied","Request to cancel workflow was denied."))}})})}async commit(){this.removeHandles(this._handleKeys.beforeCommit),this.onCommit&&await this.onCommit(this.data),this.removeHandles(this._handleKeys.afterCommit),this.emit("commit")}async go(t){const{steps:e}=this,s=e.findIndex(e=>e.id===t);this._indexHistory.push(this._stepIndex),await this._go(s)}async next(){this._indexHistory.push(this._stepIndex),await this._go(this._stepIndex+1)}async previous(t={cancelCurrentStep:!1}){await this._go(this._indexHistory.pop(),t.cancelCurrentStep)}async reset(){await this._cancel({emitCancelEvent:!1}),await this.start()}async save(t){await this.commit(),await this.reset()}async start(){this._set("started",!0);const t=-1===this._stepIndex?0:this._stepIndex;await this._go(t)}async _cancel({emitCancelEvent:t=!0,error:e}={}){this.started&&(this._set("started",!1),await this._transaction(()=>this.steps[this._stepIndex]?.tearDown({canceled:!0}))),this.removeHandles([this._handleKeys.afterCommit,this._handleKeys.beforeCommit]),this._resetIndexing(t),t&&this.emit("cancel",{error:e})}_go(t=-1,e=!1){return this._transaction(async()=>{const{steps:s}=this;if(!(t<=-1||t>=s.length)){if(!this.started)return this._stepIndex=t,void this._notifyStepProps();this._lastStepIndex>-1&&await s[this._lastStepIndex].tearDown({canceled:e});try{await s[t].setUp()}catch(n){i(n)}this._lastStepIndex=t,this._stepIndex=t,this._notifyStepProps()}})}async _transaction(t){const e=this._pendingOperation,s=Promise.withResolvers(),i=(e??Promise.resolve()).then(()=>s.promise);this._pendingOperation=i,this._updatingHandles.consumePromise(i);try{e&&await e,await t()}finally{s.resolve(),i===this._pendingOperation&&(this._pendingOperation=null)}}_resetIndexing(t=!0){this._stepIndex=-1,this._lastStepIndex=-1,this._indexHistory.length=0,t&&this._notifyStepProps()}_notifyStepProps(){this.notifyChange("stepId"),this.notifyChange("hasPreviousStep"),this.notifyChange("hasNextStep")}};t([n()],a.prototype,"curveResizeDisabled",null),t([n()],a.prototype,"curveUpdatesDisabled",null),t([n()],a.prototype,"data",void 0),t([n()],a.prototype,"formViewModel",null),t([n()],a.prototype,"hasNextStep",null),t([n()],a.prototype,"hasPreviousStep",null),t([n()],a.prototype,"onCommit",void 0),t([n()],a.prototype,"reliesOnOwnerAdminPrivileges",null),t([n()],a.prototype,"hasInvalidFormTemplate",null),t([n()],a.prototype,"shouldShowAttachments",null),t([n()],a.prototype,"shouldAllowAttachmentEditing",null),t([n()],a.prototype,"started",void 0),t([n({readOnly:!0})],a.prototype,"stepId",null),t([n()],a.prototype,"steps",void 0),t([n({readOnly:!0})],a.prototype,"type",void 0),t([n()],a.prototype,"allowSave",null),t([n()],a.prototype,"helpMessage",null),t([n()],a.prototype,"noticeMessage",null),t([n()],a.prototype,"hasPendingEdits",null),t([n()],a.prototype,"keyboardCancellationEnabled",null),t([n()],a.prototype,"sketchUpdateOptions",null),t([n()],a.prototype,"updating",null),a=t([o("esri.widgets.Editor.Workflow")],a);const p=a;export{p as default};
|
|
2
|
+
import{__decorate as t}from"tslib";import e from"../../core/Error.js";import{EventedAccessor as s}from"../../core/Evented.js";import{throwIfNotAbortError as i}from"../../core/promiseUtils.js";import{property as n,subclass as o}from"../../core/accessorSupport/decorators.js";import{UpdatingHandles as r}from"../../core/support/UpdatingHandles.js";let a=class extends s{constructor(t){super(t),this._indexHistory=[],this._lastStepIndex=-1,this._stepIndex=-1,this._updatingHandles=new r,this._handleKeys={afterCommit:"after-commit",beforeCommit:"before-commit"},this.data=void 0,this.started=!1,this.steps=[],this.type=null,this._pendingOperation=null}destroy(){this._updatingHandles.destroy()}get curveResizeDisabled(){return!1}get curveUpdatesDisabled(){return!1}get formViewModel(){return null}get hasNextStep(){const{steps:t}=this;return!!(t&&this._stepIndex<t.filter(t=>!t.parent).length-1)}get hasPreviousStep(){return this._stepIndex>0}get reliesOnOwnerAdminPrivileges(){return!1}get hasInvalidFormTemplate(){return!1}get shouldShowAttachments(){return!1}get shouldAllowAttachmentEditing(){return!1}get stepId(){const{steps:t}=this,e=t&&t[this._stepIndex];return e&&e.id}get allowSave(){return!this.updating}get helpMessage(){}get noticeMessage(){}get hasPendingEdits(){return!1}get keyboardCancellationEnabled(){return!0}get saveActionLabel(){return"submit"}get sketchUpdateOptions(){return{}}get updating(){return this._updatingHandles.updating||!!this.formViewModel?.updating||this.getUpdating()}getUpdating(){return!1}async back(t=()=>Promise.resolve(!0)){if(this.hasPendingEdits){if(!await t())return}this.hasPreviousStep?await this.previous({cancelCurrentStep:!0}):await this.cancel({force:!0})}async cancel(t={force:!0}){return!1!==t.force?this._cancel(t):new Promise((s,i)=>{this.emit("cancel-request",{controller:{allow:()=>{this._cancel({...t,force:!0}).then(s)},deny:()=>i(new e("workflow:cancel-denied","Request to cancel workflow was denied."))}})})}async commit(){this.removeHandles(this._handleKeys.beforeCommit),this.onCommit&&await this.onCommit(this.data),this.removeHandles(this._handleKeys.afterCommit),this.emit("commit")}async go(t){const{steps:e}=this,s=e.findIndex(e=>e.id===t);this._indexHistory.push(this._stepIndex),await this._go(s)}async next(){this._indexHistory.push(this._stepIndex),await this._go(this._stepIndex+1)}async previous(t={cancelCurrentStep:!1}){await this._go(this._indexHistory.pop(),t.cancelCurrentStep)}async reset(){await this._cancel({emitCancelEvent:!1}),await this.start()}async save(t){await this.commit(),await this.reset()}async start(){this._set("started",!0);const t=-1===this._stepIndex?0:this._stepIndex;await this._go(t)}async _cancel({emitCancelEvent:t=!0,error:e}={}){this.started&&(this._set("started",!1),await this._transaction(()=>this.steps[this._stepIndex]?.tearDown({canceled:!0}))),this.removeHandles([this._handleKeys.afterCommit,this._handleKeys.beforeCommit]),this._resetIndexing(t),t&&this.emit("cancel",{error:e})}_go(t=-1,e=!1){return this._transaction(async()=>{const{steps:s}=this;if(!(t<=-1||t>=s.length)){if(!this.started)return this._stepIndex=t,void this._notifyStepProps();this._lastStepIndex>-1&&await s[this._lastStepIndex].tearDown({canceled:e});try{await s[t].setUp()}catch(n){i(n)}this._lastStepIndex=t,this._stepIndex=t,this._notifyStepProps()}})}async _transaction(t){const e=this._pendingOperation,s=Promise.withResolvers(),i=(e??Promise.resolve()).then(()=>s.promise);this._pendingOperation=i,this._updatingHandles.consumePromise(i);try{e&&await e,await t()}finally{s.resolve(),i===this._pendingOperation&&(this._pendingOperation=null)}}_resetIndexing(t=!0){this._stepIndex=-1,this._lastStepIndex=-1,this._indexHistory.length=0,t&&this._notifyStepProps()}_notifyStepProps(){this.notifyChange("stepId"),this.notifyChange("hasPreviousStep"),this.notifyChange("hasNextStep")}};t([n()],a.prototype,"curveResizeDisabled",null),t([n()],a.prototype,"curveUpdatesDisabled",null),t([n()],a.prototype,"data",void 0),t([n()],a.prototype,"formViewModel",null),t([n()],a.prototype,"hasNextStep",null),t([n()],a.prototype,"hasPreviousStep",null),t([n()],a.prototype,"onCommit",void 0),t([n()],a.prototype,"reliesOnOwnerAdminPrivileges",null),t([n()],a.prototype,"hasInvalidFormTemplate",null),t([n()],a.prototype,"shouldShowAttachments",null),t([n()],a.prototype,"shouldAllowAttachmentEditing",null),t([n()],a.prototype,"started",void 0),t([n({readOnly:!0})],a.prototype,"stepId",null),t([n()],a.prototype,"steps",void 0),t([n({readOnly:!0})],a.prototype,"type",void 0),t([n()],a.prototype,"allowSave",null),t([n()],a.prototype,"helpMessage",null),t([n()],a.prototype,"noticeMessage",null),t([n()],a.prototype,"hasPendingEdits",null),t([n()],a.prototype,"keyboardCancellationEnabled",null),t([n()],a.prototype,"sketchUpdateOptions",null),t([n()],a.prototype,"updating",null),a=t([o("esri.widgets.Editor.Workflow")],a);const p=a;export{p as default};
|
package/widgets/Editor.d.ts
CHANGED
|
@@ -127,7 +127,7 @@ export interface EditorEvents extends EditorViewModelEvents {}
|
|
|
127
127
|
* [layerInfos](https://developers.arcgis.com/javascript/latest/references/core/widgets/Editor/#layerInfos) property.
|
|
128
128
|
* This property takes an array of objects which allows configuring the the editing experience for these layers.
|
|
129
129
|
*
|
|
130
|
-
* 
|
|
131
131
|
*
|
|
132
132
|
* Note that the update operations (such as rotate, move, and transform) happen in the map space.
|
|
133
133
|
* This means that, for example in 3D, if a graphic is rotated in a global WGS84 view, its shape and segment lengths change.
|
|
@@ -188,7 +188,7 @@ export interface EditorEvents extends EditorViewModelEvents {}
|
|
|
188
188
|
*
|
|
189
189
|
* See more about the available tooltip inputs and constraints under the [tooltip options](https://developers.arcgis.com/javascript/latest/references/core/views/interactive/sketch/SketchTooltipOptions/) class.
|
|
190
190
|
*
|
|
191
|
-
* 
|
|
192
192
|
*
|
|
193
193
|
* <span id="relationship-editing"></span>
|
|
194
194
|
* ## Relationship editing
|
|
@@ -197,7 +197,7 @@ export interface EditorEvents extends EditorViewModelEvents {}
|
|
|
197
197
|
*
|
|
198
198
|
* Once the form is authored, the [Editor](https://developers.arcgis.com/javascript/latest/references/core/widgets/Editor/) automatically checks if there is a [FormTemplate](https://developers.arcgis.com/javascript/latest/references/core/form/FormTemplate/) set on the editable [layer](https://developers.arcgis.com/javascript/latest/references/core/layers/FeatureLayer/#formTemplate), or the widget's corresponding [LayerInfo](https://developers.arcgis.com/javascript/latest/references/core/widgets/Editor/types/#LayerInfo). If the form's template is not set or is not configured to contain [relationship elements](https://developers.arcgis.com/javascript/latest/references/core/form/elements/RelationshipElement/), the Editor will not display the option to edit the relationship data. Additional considerations when using the Editor to edit related data are provided below.
|
|
199
199
|
*
|
|
200
|
-
* 
|
|
201
201
|
*
|
|
202
202
|
* <details>
|
|
203
203
|
* <summary>Read More</summary>
|
|
@@ -222,7 +222,7 @@ export interface EditorEvents extends EditorViewModelEvents {}
|
|
|
222
222
|
*
|
|
223
223
|
* Once the form is created, the [Editor](https://developers.arcgis.com/javascript/latest/references/core/widgets/Editor/) checks if a [FormTemplate](https://developers.arcgis.com/javascript/latest/references/core/form/FormTemplate/) is assigned to the [layer](https://developers.arcgis.com/javascript/latest/references/core/layers/FeatureLayer/#formTemplate) or the widget's [LayerInfo](https://developers.arcgis.com/javascript/latest/references/core/widgets/Editor/types/#LayerInfo). If the form's template lacks the necessary [association elements](https://developers.arcgis.com/javascript/latest/references/core/form/elements/UtilityNetworkAssociationsElement/), the [Editor](https://developers.arcgis.com/javascript/latest/references/core/widgets/Editor/) will not display associated features or options to edit them. Also, if an associated feature exists on a layer and that layer is not included in the [WebMap](https://developers.arcgis.com/javascript/latest/references/core/WebMap/) being used, the associated feature will not be shown in Editor.
|
|
224
224
|
*
|
|
225
|
-
* 
|
|
226
226
|
*
|
|
227
227
|
* <span id="adding-associations"></span>
|
|
228
228
|
* ### Creating associations
|
|
@@ -244,17 +244,17 @@ export interface EditorEvents extends EditorViewModelEvents {}
|
|
|
244
244
|
*
|
|
245
245
|
* Click "Add" to create the association.
|
|
246
246
|
*
|
|
247
|
-
* 
|
|
248
248
|
*
|
|
249
249
|
* Alternatively, if compatible layers are visible on the map, a feature can be selected on the map using a spatial selection toolbar.
|
|
250
250
|
* Features can be selected at a single point or within a region. Any compatible features at the selected point or within the defined region are displayed in a list.
|
|
251
251
|
* Hover over a feature in the list to highlight it on the map; click a feature in the list to choose the feature to form the association with.
|
|
252
252
|
*
|
|
253
|
-
* 
|
|
254
254
|
*
|
|
255
255
|
* While viewing compatible features on a layer, filters can optionally be used to find a specific feature to form an association with.
|
|
256
256
|
*
|
|
257
|
-
* 
|
|
258
258
|
*
|
|
259
259
|
* <span id="deleting-associations"></span>
|
|
260
260
|
* ### Deleting associations
|
|
@@ -283,7 +283,7 @@ export interface EditorEvents extends EditorViewModelEvents {}
|
|
|
283
283
|
* While viewing associated features on a layer, a search bar can optionally be used to filter by the title of the
|
|
284
284
|
* feature shown in the list.
|
|
285
285
|
*
|
|
286
|
-
* 
|
|
287
287
|
*
|
|
288
288
|
* <span id="date-time"></span>
|
|
289
289
|
* ## Editing date and time
|
|
@@ -28,7 +28,7 @@ export interface ElevationProfileLineGroundProperties extends ElevationProfileLi
|
|
|
28
28
|
* Whenever layers are added or removed from the [Ground](https://developers.arcgis.com/javascript/latest/references/core/Ground/) or their visibility changes, the
|
|
29
29
|
* profile line will be updated.
|
|
30
30
|
*
|
|
31
|
-
* 
|
|
32
32
|
*
|
|
33
33
|
* @deprecated since version 5.0. Use the [Elevation Profile component](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-elevation-profile/) or [ElevationProfileLineGround](https://developers.arcgis.com/javascript/latest/references/core/analysis/ElevationProfile/ElevationProfileLineGround/) from [ElevationProfileAnalysis](https://developers.arcgis.com/javascript/latest/references/core/analysis/ElevationProfileAnalysis/) instead. For information on widget deprecation, read about [Esri's move to web components](https://developers.arcgis.com/javascript/latest/components-transition-plan/).
|
|
34
34
|
* @since 4.18
|
|
@@ -31,7 +31,7 @@ export interface ElevationProfileLineInputProperties extends ElevationProfileLin
|
|
|
31
31
|
* ElevationProfileLineInput only when the input feature is a client-side graphic with z values
|
|
32
32
|
* in a [MapView](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/).
|
|
33
33
|
*
|
|
34
|
-
* 
|
|
35
35
|
* _Profile generated from a line feature with z-values. The orange profile is created with a profile line of type input._
|
|
36
36
|
*
|
|
37
37
|
* @deprecated since version 5.0. Use the [Elevation Profile component](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-elevation-profile/) or [ElevationProfileLineInput](https://developers.arcgis.com/javascript/latest/references/core/analysis/ElevationProfile/ElevationProfileLineInput/) from [ElevationProfileAnalysis](https://developers.arcgis.com/javascript/latest/references/core/analysis/ElevationProfileAnalysis/) instead. For information on widget deprecation, read about [Esri's move to web components](https://developers.arcgis.com/javascript/latest/components-transition-plan/).
|
|
@@ -34,7 +34,7 @@ export interface ElevationProfileLineViewProperties extends ElevationProfileLine
|
|
|
34
34
|
*
|
|
35
35
|
* This profile line type is not supported in a [MapView](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/).
|
|
36
36
|
*
|
|
37
|
-
* 
|
|
38
38
|
* _The purple building profile is the result of a profile line of type view._
|
|
39
39
|
*
|
|
40
40
|
* @deprecated since version 5.0. Use the [Elevation Profile component](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-elevation-profile/) or [ElevationProfileLineScene](https://developers.arcgis.com/javascript/latest/references/core/analysis/ElevationProfile/ElevationProfileLineScene/) from [ElevationProfileAnalysis](https://developers.arcgis.com/javascript/latest/references/core/analysis/ElevationProfileAnalysis/) instead. For information on widget deprecation, read about [Esri's move to web components](https://developers.arcgis.com/javascript/latest/components-transition-plan/).
|
|
@@ -106,7 +106,7 @@ export interface ElevationProfileProperties extends WidgetProperties, Partial<Pi
|
|
|
106
106
|
* Alternatively, the widget allows setting an input graphic programmatically at creation or runtime by setting the
|
|
107
107
|
* [input](https://developers.arcgis.com/javascript/latest/references/core/widgets/ElevationProfile/#input) property.
|
|
108
108
|
*
|
|
109
|
-
* [](https://developers.arcgis.com/javascript/latest/sample-code/widgets-elevation-profile/)
|
|
110
110
|
* _ElevationProfile widget used in a city scene, displaying ground and building profiles. See [Sample - ElevationProfile widget](https://developers.arcgis.com/javascript/latest/sample-code/widgets-elevation-profile/)_
|
|
111
111
|
*
|
|
112
112
|
* The widget can visualize multiple profile lines, depending on the environment (2D versus 3D) and elevation source data:
|
|
@@ -144,10 +144,10 @@ export interface ElevationProfileProperties extends WidgetProperties, Partial<Pi
|
|
|
144
144
|
* Scrolling the chart zooms in to a specific part of the profile chart. When zoomed in, click the minus button to reset the zoom.
|
|
145
145
|
* On touch devices, pinch to zoom in and out.
|
|
146
146
|
*
|
|
147
|
-
* 
|
|
148
148
|
* _Drawing a path to get a ground profile._
|
|
149
149
|
*
|
|
150
|
-
* 
|
|
151
151
|
* _Profile generated from a line feature with z-values shows a paraglide track above ground._
|
|
152
152
|
*
|
|
153
153
|
* How distance values are computed depends on the map's spatial reference:
|
package/widgets/Expand.d.ts
CHANGED
|
@@ -230,7 +230,7 @@ export default class Expand extends Widget {
|
|
|
230
230
|
/**
|
|
231
231
|
* A number to display at the corner of the widget to indicate the number of, for example, open issues or unread notices.
|
|
232
232
|
*
|
|
233
|
-
* 
|
|
234
234
|
*
|
|
235
235
|
* @default 0
|
|
236
236
|
*/
|
|
@@ -113,14 +113,24 @@ export default class FeatureViewModel extends FeatureViewModelSuperclass {
|
|
|
113
113
|
* Enables automatic creation of a popup template for layers that have popups enabled but no
|
|
114
114
|
* popupTemplate defined. Automatic popup templates are supported for layers that
|
|
115
115
|
* support the `createPopupTemplate` method. (Supported for
|
|
116
|
+
* [BuildingComponentSublayer](https://developers.arcgis.com/javascript/latest/references/core/layers/buildingSublayers/BuildingComponentSublayer/),
|
|
117
|
+
* [CatalogFootprintLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/catalog/CatalogFootprintLayer/),
|
|
118
|
+
* [CSVLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/CSVLayer/),
|
|
116
119
|
* [FeatureLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/FeatureLayer/),
|
|
117
120
|
* [GeoJSONLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/GeoJSONLayer/),
|
|
121
|
+
* [ImageryLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/ImageryLayer/)),
|
|
122
|
+
* [ImageryTileLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/ImageryTileLayer/),
|
|
123
|
+
* [KnowledgeGraphSublayer](https://developers.arcgis.com/javascript/latest/references/core/layers/knowledgeGraph/KnowledgeGraphSublayer/),
|
|
118
124
|
* [OGCFeatureLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/OGCFeatureLayer/),
|
|
119
|
-
* [
|
|
120
|
-
* [CSVLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/CSVLayer/),
|
|
125
|
+
* [ParquetLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/ParquetLayer/),
|
|
121
126
|
* [PointCloudLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/PointCloudLayer/),
|
|
122
|
-
* [
|
|
123
|
-
* [
|
|
127
|
+
* [SceneLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/SceneLayer/),
|
|
128
|
+
* [StreamLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/StreamLayer/),
|
|
129
|
+
* [Sublayer](https://developers.arcgis.com/javascript/latest/references/core/layers/support/Sublayer/),
|
|
130
|
+
* [SubtypeSublayer](https://developers.arcgis.com/javascript/latest/references/core/layers/support/SubtypeSublayer/),
|
|
131
|
+
* [VoxelLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/VoxelLayer/),
|
|
132
|
+
* [WCSLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/WCSLayer/), and
|
|
133
|
+
* [WFSLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/WFSLayer/)).
|
|
124
134
|
*
|
|
125
135
|
* @default false
|
|
126
136
|
* @since 4.11
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import t from"../../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{deprecatedModule as n}from"../../core/deprecate.js";import{IdentifiableMixin as l}from"../../core/Identifiable.js";import p from"../../core/Logger.js";import{abortMaybe as c}from"../../core/maybe.js";import{eachAlways as d,isAbortError as h,throwIfAborted as u}from"../../core/promiseUtils.js";import{watch as f,initial as m,when as _,on as y}from"../../core/reactiveUtils.js";import{throttle as g}from"../../core/throttle.js";import{property as b,cast as w,subclass as v}from"../../core/accessorSupport/decorators.js";import A from"../../geometry/Point.js";import I from"../../geometry/SpatialReference.js";import x from"../../popup/content/TextContent.js";import{compileExpressionInfos as M,formatArcadeValue as T}from"../../popup/support/arcadeFeatureUtils.js";import{preLayerQueryCallback as F,preRequestCallback as C,createFieldInfoMap as E,getAllFieldInfos as V,getSourceLayer as k,querySourceLayer as j,queryUpdatedFeature as P,isRelatableFeatureSupportedLayer as R,isAssociatedFeatureSupportedLayer as L,substituteFieldsInLinksAndAttributes as O,isExpressionField as U,isRelatedField as N,formatEditInfo as Z,graphicCallback as D,formatAttributes as B}from"../../popup/support/featureUtils.js";import{queryLayerInfos as H,queryRelatedFeatures as S,setRelatedFeatures as G,getRelatedFieldInfo as q,createRelatedInfo as z,updateRelatedInfo as K}from"../../popup/support/relatedFeatureUtils.js";import{system as W}from"../../time/constants.js";import Q from"./FeatureAttachments/FeatureAttachmentsViewModel.js";import J from"./FeatureContent/FeatureContentViewModel.js";import X from"./FeatureExpression/FeatureExpressionViewModel.js";import Y from"./FeatureFields/FeatureFieldsViewModel.js";import $ from"./FeatureMedia/FeatureMediaViewModel.js";import ee from"./FeatureRelationship/FeatureRelationshipViewModel.js";import te from"../support/UtilityNetworkAssociations/FeatureUtilityNetworkAssociationsViewModel.js";var ie;const se=1,oe="content-view-models",re="relationship-view-models",ae="association-view-models",ne={attachmentsContent:!0,chartAnimation:!0,customContent:!0,expressionContent:!0,fieldsContent:!0,mediaContent:!0,textContent:!0,relationshipContent:!0,utilityNetworkAssociationsContent:!0};let le=class extends(l(s)){static{ie=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={...ne},this.content=null,this.contentViewModels=[],this.description=null,this.defaultPopupTemplateEnabled=!1,this.formattedAttributes=null,this.graphic=null,this.lastEditInfo=null,this.location=null,this.relatedInfos=new Map,this.title="",this.view=null,this._graphicChangedThrottled=g(this._graphicChanged,()=>this.notifyChange("waitingForContent"),se,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"),se,this),e?.suppressDeprecationWarning||n(p.getLogger(this),"esri.widgets.Feature.FeatureViewModel",{version:"5.1",replacement:"Use the Feature component or the @arcgis/core/popup/Feature module instead.",warnOnce:!0}),this.addHandles([f(()=>[this.graphic,this._effectivePopupTemplate,this.abilities,this.timeZone],()=>this._graphicChangedThrottled(),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))])}normalizeCtorArgs(e){const{suppressDeprecationWarning:t,...i}=e??{};return i}initialize(){this.addHandles([this._graphicChangedThrottled,this._evaluateExpressionAttributesThrottled])}destroy(){this._clear(),this._graphicChangedTask=c(this._graphicChangedTask),this._evaluateExpressionAttributesTask=c(this._evaluateExpressionAttributesTask),this._error=null,this.graphic=null,this._destroyContentViewModels(),this.relatedInfos.clear()}static{this.interceptor=new i(F,C)}get _effectivePopupTemplate(){return null!=this.graphic?this.graphic.getEffectivePopupTemplate(this.defaultPopupTemplateEnabled):null}get _fieldInfoMap(){return E(V(this._effectivePopupTemplate),this._sourceLayer)}get _sourceLayer(){return k(this.graphic)}castAbilities(e){return{...ne,...e}}get isFeatureFromTable(){return this._sourceLayer?.isTable||!1}get state(){return this.graphic?this._error?"error":this.waitingForContent?"loading":"ready":"disabled"}get spatialReference(){return this.view?.spatialReference??null}set spatialReference(e){this._override("spatialReference",e)}get timeZone(){return this.view?.timeZone??W}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 $&&i.setActiveMedia(t)}nextMedia(e){const t=this.contentViewModels[e];t instanceof $&&t.next()}previousMedia(e){const t=this.contentViewModels[e];t instanceof $&&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 j({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=c(this._evaluateExpressionAttributesTask),this._graphicChangedTask=c(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 P({graphic:t,popupTemplate:s,layer:i,spatialReference:o},{signal:e});const[{value:r},{value:a}]=await d([this._getContent(),this._getTitle()]),[,{value:n}]=await d([this._checkForRelatedFeatures({signal:e}),M(s?.expressionInfos,t)]);return{expressionInfos:n,content:r,title:a}}catch(i){throw h(i)||(this._error=i,p.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 x({text:e}),0).text:e}_destroyContentViewModels(){this.removeHandles(re),this.removeHandles(oe),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 ie({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(!R(n))return;const c=new ee({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(y(()=>c.relatedFeatures,"change",()=>this._setRelatedFeaturesViewModels(c)),re),e}_matchesGlobalFeature(e,t){return e.association.equals(t.association)}_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,t)=>{if(!l.some(t=>this._matchesGlobalFeature(t,e))){const{association:a,feature:n,terminalName:p,title:c}=e;l.add({title:c,association:a,featureViewModel:new ie({abilities:{utilityNetworkAssociationsContent:!1},map:i,view:s,spatialReference:o,timeZone:r,graphic:n}),terminalName:p},t)}}),e.set(n,l)})}_compileUtilityNetworkAssociation(e,t){const{displayCount:i,title:s,description:o,associationTypes:r}=e,{_sourceLayer:a,graphic:n,map:l}=this;if(!L(a))return;const p=new te({graphic:n,displayCount:i,associationTypes:r,layer:a,map:l,...this._compileTitleAndDesc({title:s,description:o})});return this.contentViewModels[t]=p,this.addHandles([f(()=>p.associationFeatures.values(),()=>this._setUpUtilityNetworkAssociationsViewModels(p.associationViewModels,p.associationFeatures,p.map))],ae),e}_compileExpression(e,t){const{expressionInfo:i}=e,{graphic:s,map:o,spatialReference:r,view:a,location:n}=this,l=new X({expressionInfo:i,graphic:s,interceptor:ie.interceptor,map:o,spatialReference:r,view:a,location:n});return this.contentViewModels[t]=l,this.addHandles(f(()=>l.contentElementViewModel,()=>this._setExpressionContentVM(l,t),m),oe),e}_compileAttachments(e,t){const{graphic:i}=this,{description:s,title:o,orderByFields:r,attachmentKeywords:a,attachmentTypes:n}=e;return this.contentViewModels[t]=new Q({attachmentKeywords:a,attachmentTypes:n,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 J({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:O({attributes:a,fieldInfoMap:i,globalAttributes:l,expressionAttributes:n,layer:s,text:e}),description:O({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,a=e?.fieldInfos||i?.fieldInfos,n=a?.filter(({fieldName:e})=>!!e&&(U(e)||N(e)||o.hasOwnProperty(e))),l=i?.expressionInfos,{description:p,title:c}=e;return{attributes:o,expressionInfos:l,fieldInfos:n,isContentFieldInfos:r,graphic:this.graphic,layer:this._sourceLayer,...this._compileTitleAndDesc({title:c,description:p})}}_compileFields(e,t){const i=e.clone(),s=new Y(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,graphic:s,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 $(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=O({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 J(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?Z(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 O({attributes:r,fieldInfoMap:t,globalAttributes:a,expressionAttributes:o,layer:i,text:e})}async _getTitle(){const{_effectivePopupTemplate:e,graphic:t}=this;return t?D({type:"title",value:e?.title,event:{graphic:t}}):null}async _getContent(){const{_effectivePopupTemplate:e,graphic:t}=this;return t?D({type:"content",value:e?.content,event:{graphic:t}}):null}_evaluateExpressionAttributes({title:e,content:t,expressionInfos:i}){this._evaluateExpressionAttributesTask=c(this._evaluateExpressionAttributesTask),this._evaluateExpressionAttributesTask=r(async s=>{const{graphic:o,map:r,view:a,spatialReference:n,location:l}=this;try{if(!o)return;let p;if(null!=i){const e=[];for(const[t,p]of i.expressions.entries())null!=p?e.push(p.evaluate({graphic:o,interceptor:ie.interceptor,location:l,map:r,options:{signal:s},spatialReference:n,view:a}).then(e=>[t,"string"==typeof e?T(e):e]).catch(()=>[t,void 0])):e.push(Promise.resolve([t,void 0]));p=Object.fromEntries(await Promise.all(e)),u(s)}this._expressionAttributes=p,this._graphicExpressionAttributes={...o.attributes,...p},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){h(c)||(this._error=c,p.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]=B({attributes:{...l,...e.attributes},fieldInfoMap:n,fieldInfos:s?.fieldInfos,graphic:o,layer:a,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]=B({attributes:{...n,...e.attributes},fieldInfoMap:a,fieldInfos:e.fieldInfos,graphic:s,isContentFieldInfos:!0,layer:r,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:B({attributes:a,fieldInfoMap:r,fieldInfos:l,graphic:i,layer:o,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,V(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&&N(e.fieldName));if(!a?.length)return;t.forEach(e=>this._configureRelatedInfo(e,r));const n=await H({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 S({graphic:e,relatedInfos:s,layer:r},i);Object.keys(l).forEach(e=>{G(l[e]?.value,s.get(e.toString()))})}_configureRelatedInfo(e,t){const{relatedInfos:i}=this,s=q(e.fieldName||"");if(!s)return;const{layerId:o,fieldName:r}=s;if(!o)return;const a=i.get(o.toString())||z(o,t);a&&(K({relatedInfo:a,fieldName:r,fieldInfo:e}),this.relatedInfos.set(o,a))}};e([b()],le.prototype,"_error",void 0),e([b()],le.prototype,"_graphicChangedTask",void 0),e([b()],le.prototype,"_evaluateExpressionAttributesTask",void 0),e([b()],le.prototype,"_associationVMAbortController",void 0),e([b({readOnly:!0})],le.prototype,"_effectivePopupTemplate",null),e([b({readOnly:!0})],le.prototype,"_fieldInfoMap",null),e([b({readOnly:!0})],le.prototype,"_sourceLayer",null),e([b()],le.prototype,"abilities",void 0),e([w("abilities")],le.prototype,"castAbilities",null),e([b({readOnly:!0})],le.prototype,"content",void 0),e([b({readOnly:!0})],le.prototype,"contentViewModels",void 0),e([b()],le.prototype,"description",void 0),e([b({type:Boolean})],le.prototype,"defaultPopupTemplateEnabled",void 0),e([b({readOnly:!0})],le.prototype,"isFeatureFromTable",null),e([b({readOnly:!0})],le.prototype,"state",null),e([b({readOnly:!0})],le.prototype,"formattedAttributes",void 0),e([b({type:t})],le.prototype,"graphic",void 0),e([b({readOnly:!0})],le.prototype,"lastEditInfo",void 0),e([b({type:A})],le.prototype,"location",void 0),e([b({readOnly:!0})],le.prototype,"relatedInfos",void 0),e([b({type:I})],le.prototype,"spatialReference",null),e([b()],le.prototype,"timeZone",null),e([b({readOnly:!0})],le.prototype,"title",void 0),e([b()],le.prototype,"map",null),e([b({readOnly:!0})],le.prototype,"waitingForContent",null),e([b()],le.prototype,"view",void 0),le=ie=e([v("esri.widgets.Feature.FeatureViewModel")],le);export{le as default};
|
|
2
|
+
import{__decorate as e}from"tslib";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{deprecatedModule as n}from"../../core/deprecate.js";import{IdentifiableMixin as l}from"../../core/Identifiable.js";import p from"../../core/Logger.js";import{abortMaybe as c}from"../../core/maybe.js";import{eachAlways as d,isAbortError as h,throwIfAborted as u}from"../../core/promiseUtils.js";import{watch as f,initial as m,when as _,on as y}from"../../core/reactiveUtils.js";import{throttle as g}from"../../core/throttle.js";import{property as b,cast as w,subclass as v}from"../../core/accessorSupport/decorators.js";import A from"../../geometry/Point.js";import I from"../../geometry/SpatialReference.js";import x from"../../popup/content/TextContent.js";import{compileExpressionInfos as M,formatArcadeValue as T}from"../../popup/support/arcadeFeatureUtils.js";import{preLayerQueryCallback as F,preRequestCallback as C,createFieldInfoMap as E,getAllFieldInfos as V,getSourceLayer as k,querySourceLayer as j,queryUpdatedFeature as P,isRelatableFeatureSupportedLayer as R,isAssociatedFeatureSupportedLayer as L,substituteFieldsInLinksAndAttributes as O,isExpressionField as U,isRelatedField as N,formatEditInfo as Z,graphicCallback as D,formatAttributes as B}from"../../popup/support/featureUtils.js";import{queryLayerInfos as H,queryRelatedFeatures as S,setRelatedFeatures as G,getRelatedFieldInfo as W,createRelatedInfo as q,updateRelatedInfo as z}from"../../popup/support/relatedFeatureUtils.js";import{system as K}from"../../time/constants.js";import Q from"./FeatureAttachments/FeatureAttachmentsViewModel.js";import J from"./FeatureContent/FeatureContentViewModel.js";import X from"./FeatureExpression/FeatureExpressionViewModel.js";import Y from"./FeatureFields/FeatureFieldsViewModel.js";import $ from"./FeatureMedia/FeatureMediaViewModel.js";import ee from"./FeatureRelationship/FeatureRelationshipViewModel.js";import te from"../support/UtilityNetworkAssociations/FeatureUtilityNetworkAssociationsViewModel.js";var ie;const se=1,oe="content-view-models",re="relationship-view-models",ae="association-view-models",ne={attachmentsContent:!0,chartAnimation:!0,customContent:!0,expressionContent:!0,fieldsContent:!0,mediaContent:!0,textContent:!0,relationshipContent:!0,utilityNetworkAssociationsContent:!0};let le=class extends(l(s)){static{ie=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={...ne},this.content=null,this.contentViewModels=[],this.description=null,this.defaultPopupTemplateEnabled=!1,this.formattedAttributes=null,this.graphic=null,this.lastEditInfo=null,this.location=null,this.relatedInfos=new Map,this.title="",this.view=null,this._graphicChangedThrottled=g(this._graphicChanged,()=>this.notifyChange("waitingForContent"),se,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"),se,this),e?.suppressDeprecationWarning||n(p.getLogger(this),"esri.widgets.Feature.FeatureViewModel",{version:"5.1",replacement:"Use the Feature component or the @arcgis/core/popup/Feature module instead.",warnOnce:!0}),this.addHandles([f(()=>[this.graphic,this._effectivePopupTemplate,this.abilities,this.timeZone],()=>this._graphicChangedThrottled(),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))])}normalizeCtorArgs(e){const{suppressDeprecationWarning:t,...i}=e??{};return i}initialize(){this.addHandles([this._graphicChangedThrottled,this._evaluateExpressionAttributesThrottled])}destroy(){this._clear(),this._graphicChangedTask=c(this._graphicChangedTask),this._evaluateExpressionAttributesTask=c(this._evaluateExpressionAttributesTask),this._error=null,this.graphic=null,this._destroyContentViewModels(),this.relatedInfos.clear()}static{this.interceptor=new i(F,C)}get _effectivePopupTemplate(){return null!=this.graphic?this.graphic.getEffectivePopupTemplate(this.defaultPopupTemplateEnabled):null}get _fieldInfoMap(){return E(V(this._effectivePopupTemplate),this._sourceLayer)}get _sourceLayer(){return k(this.graphic)}castAbilities(e){return{...ne,...e}}get isFeatureFromTable(){return this._sourceLayer?.isTable||!1}get state(){return this.graphic?this._error?"error":this.waitingForContent?"loading":"ready":"disabled"}get spatialReference(){return this.view?.spatialReference??null}set spatialReference(e){this._override("spatialReference",e)}get timeZone(){return this.view?.timeZone??K}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 $&&i.setActiveMedia(t)}nextMedia(e){const t=this.contentViewModels[e];t instanceof $&&t.next()}previousMedia(e){const t=this.contentViewModels[e];t instanceof $&&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 j({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=c(this._evaluateExpressionAttributesTask),this._graphicChangedTask=c(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 P({graphic:t,popupTemplate:s,layer:i,spatialReference:o},{signal:e});const[{value:r},{value:a}]=await d([this._getContent(),this._getTitle()]),[,{value:n}]=await d([this._checkForRelatedFeatures({signal:e}),M(s?.expressionInfos,t)]);return{expressionInfos:n,content:r,title:a}}catch(i){throw h(i)||(this._error=i,p.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 x({text:e}),0).text:e}_destroyContentViewModels(){this.removeHandles(re),this.removeHandles(oe),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 ie({abilities:{relationshipContent:!1},map:i,view:s,spatialReference:o,timeZone:r,graphic:t,suppressDeprecationWarning:!0}))}),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(!R(n))return;const c=new ee({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(y(()=>c.relatedFeatures,"change",()=>this._setRelatedFeaturesViewModels(c)),re),e}_matchesGlobalFeature(e,t){return e.association.equals(t.association)}_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,t)=>{if(!l.some(t=>this._matchesGlobalFeature(t,e))){const{association:a,feature:n,terminalName:p,title:c}=e;l.add({title:c,association:a,featureViewModel:new ie({abilities:{utilityNetworkAssociationsContent:!1},map:i,view:s,spatialReference:o,timeZone:r,graphic:n,suppressDeprecationWarning:!0}),terminalName:p},t)}}),e.set(n,l)})}_compileUtilityNetworkAssociation(e,t){const{displayCount:i,title:s,description:o,associationTypes:r}=e,{_sourceLayer:a,graphic:n,map:l}=this;if(!L(a))return;const p=new te({graphic:n,displayCount:i,associationTypes:r,layer:a,map:l,...this._compileTitleAndDesc({title:s,description:o})});return this.contentViewModels[t]=p,this.addHandles([f(()=>p.associationFeatures.values(),()=>this._setUpUtilityNetworkAssociationsViewModels(p.associationViewModels,p.associationFeatures,p.map))],ae),e}_compileExpression(e,t){const{expressionInfo:i}=e,{graphic:s,map:o,spatialReference:r,view:a,location:n}=this,l=new X({expressionInfo:i,graphic:s,interceptor:ie.interceptor,map:o,spatialReference:r,view:a,location:n});return this.contentViewModels[t]=l,this.addHandles(f(()=>l.contentElementViewModel,()=>this._setExpressionContentVM(l,t),m),oe),e}_compileAttachments(e,t){const{graphic:i}=this,{description:s,title:o,orderByFields:r,attachmentKeywords:a,attachmentTypes:n}=e;return this.contentViewModels[t]=new Q({attachmentKeywords:a,attachmentTypes:n,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 J({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:O({attributes:a,fieldInfoMap:i,globalAttributes:l,expressionAttributes:n,layer:s,text:e}),description:O({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,a=e?.fieldInfos||i?.fieldInfos,n=a?.filter(({fieldName:e})=>!!e&&(U(e)||N(e)||o.hasOwnProperty(e))),l=i?.expressionInfos,{description:p,title:c}=e;return{attributes:o,expressionInfos:l,fieldInfos:n,isContentFieldInfos:r,graphic:this.graphic,layer:this._sourceLayer,...this._compileTitleAndDesc({title:c,description:p})}}_compileFields(e,t){const i=e.clone(),s=new Y(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,graphic:s,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 $(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=O({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 J(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?Z(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 O({attributes:r,fieldInfoMap:t,globalAttributes:a,expressionAttributes:o,layer:i,text:e})}async _getTitle(){const{_effectivePopupTemplate:e,graphic:t}=this;return t?D({type:"title",value:e?.title,event:{graphic:t}}):null}async _getContent(){const{_effectivePopupTemplate:e,graphic:t}=this;return t?D({type:"content",value:e?.content,event:{graphic:t}}):null}_evaluateExpressionAttributes({title:e,content:t,expressionInfos:i}){this._evaluateExpressionAttributesTask=c(this._evaluateExpressionAttributesTask),this._evaluateExpressionAttributesTask=r(async s=>{const{graphic:o,map:r,view:a,spatialReference:n,location:l}=this;try{if(!o)return;let p;if(null!=i){const e=[];for(const[t,p]of i.expressions.entries())null!=p?e.push(p.evaluate({graphic:o,interceptor:ie.interceptor,location:l,map:r,options:{signal:s},spatialReference:n,view:a}).then(e=>[t,"string"==typeof e?T(e):e]).catch(()=>[t,void 0])):e.push(Promise.resolve([t,void 0]));p=Object.fromEntries(await Promise.all(e)),u(s)}this._expressionAttributes=p,this._graphicExpressionAttributes={...o.attributes,...p},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){h(c)||(this._error=c,p.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]=B({attributes:{...l,...e.attributes},fieldInfoMap:n,fieldInfos:s?.fieldInfos,graphic:o,layer:a,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]=B({attributes:{...n,...e.attributes},fieldInfoMap:a,fieldInfos:e.fieldInfos,graphic:s,isContentFieldInfos:!0,layer:r,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:B({attributes:a,fieldInfoMap:r,fieldInfos:l,graphic:i,layer:o,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,V(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&&N(e.fieldName));if(!a?.length)return;t.forEach(e=>this._configureRelatedInfo(e,r));const n=await H({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 S({graphic:e,relatedInfos:s,layer:r},i);Object.keys(l).forEach(e=>{G(l[e]?.value,s.get(e.toString()))})}_configureRelatedInfo(e,t){const{relatedInfos:i}=this,s=W(e.fieldName||"");if(!s)return;const{layerId:o,fieldName:r}=s;if(!o)return;const a=i.get(o.toString())||q(o,t);a&&(z({relatedInfo:a,fieldName:r,fieldInfo:e}),this.relatedInfos.set(o,a))}};e([b()],le.prototype,"_error",void 0),e([b()],le.prototype,"_graphicChangedTask",void 0),e([b()],le.prototype,"_evaluateExpressionAttributesTask",void 0),e([b()],le.prototype,"_associationVMAbortController",void 0),e([b({readOnly:!0})],le.prototype,"_effectivePopupTemplate",null),e([b({readOnly:!0})],le.prototype,"_fieldInfoMap",null),e([b({readOnly:!0})],le.prototype,"_sourceLayer",null),e([b()],le.prototype,"abilities",void 0),e([w("abilities")],le.prototype,"castAbilities",null),e([b({readOnly:!0})],le.prototype,"content",void 0),e([b({readOnly:!0})],le.prototype,"contentViewModels",void 0),e([b()],le.prototype,"description",void 0),e([b({type:Boolean})],le.prototype,"defaultPopupTemplateEnabled",void 0),e([b({readOnly:!0})],le.prototype,"isFeatureFromTable",null),e([b({readOnly:!0})],le.prototype,"state",null),e([b({readOnly:!0})],le.prototype,"formattedAttributes",void 0),e([b({type:t})],le.prototype,"graphic",void 0),e([b({readOnly:!0})],le.prototype,"lastEditInfo",void 0),e([b({type:A})],le.prototype,"location",void 0),e([b({readOnly:!0})],le.prototype,"relatedInfos",void 0),e([b({type:I})],le.prototype,"spatialReference",null),e([b()],le.prototype,"timeZone",null),e([b({readOnly:!0})],le.prototype,"title",void 0),e([b()],le.prototype,"map",null),e([b({readOnly:!0})],le.prototype,"waitingForContent",null),e([b()],le.prototype,"view",void 0),le=ie=e([v("esri.widgets.Feature.FeatureViewModel")],le);export{le as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import t from"../../core/Error.js";import{watch as i,sync as l}from"../../core/reactiveUtils.js";import{property as n,subclass as r}from"../../core/accessorSupport/decorators.js";import{getEffectiveFieldAlias as s}from"../../editing/fieldUtils.js";import{getDomainRange as u,dateTimeFieldValuesToNumericRange as a,validateDomainValue as o}from"../../layers/support/domainUtils.js";import{isFieldVisibleByDefault as p,getLowerCaseEditTrackingFields as d,isNumericField as m,isStringField as h,isTimeOnlyField as f,getFieldRange as y}from"../../layers/support/fieldUtils.js";import{isRelatableFeatureSupportedLayer as c}from"../../popup/support/featureUtils.js";import{isAnyDateField as g}from"../../smartMapping/support/utils.js";import{isNumber as x}from"../../support/guards.js";import v from"./EditableInput.js";import{isFieldElementWithInputType as E,valueIsInvalidSwitchValue as b,isFieldElementWithShowNoValueOptionInput as _}from"./featureFormUtils.js";import{timeResolutionToStepMap as V,isArcadeDate as T,arcadeDateToFieldValue as w}from"../support/dateUtils.js";import{dateIsValid as F,getMaxLength as D,getMinLength as L,validateFormValue as M}from"../support/forms/formUtils.js";let O=class extends v{constructor(e){super(e),this._storedValue=null,this.error=null,this.preservesValueWhenHidden=!0,this.field=null,this.group=null,this.requiredExpressionExecutor=null,this.type="field",this._fieldInputWasVisibleDuringLifetime=!1,this.valueExpressionExecutor=null}initialize(){this.addHandles(i(()=>this.feature,()=>this._fieldInputWasVisibleDuringLifetime=!1,l))}get _dateFormRange(){const{element:e,field:t}=this;if("date"!==this.dataType)return{};const i=e?.domain?u(t,e.domain):null;if(!e?.input)return i??{};const l=e.input,{type:n}=l;let r={};if("date-picker"!==n&&"time-picker"!==n&&"datetimeoffset-picker"!==n||(r=a(t,l.max,l.min)),"datetime-picker"===n){const{max:e,min:t}=l;r={max:null!=e&&F(e)?e.getTime():null,min:null!=t&&F(t)?t.getTime():null}}const{max:s,min:o}=r;if(i){const{max:e,min:t}=i,l=x(e)&&(null==s||null!=s&&e<s),n=x(t)&&(null==o||null!=o&&t>o);return{max:l?e:s??null,min:n?t:o??null,rawMax:l?i.rawMax:r?.rawMax??null,rawMin:n?i.rawMin:r?.rawMin??null}}return{min:o,max:s,rawMax:r?.rawMax??null,rawMin:r?.rawMin??null}}get _dateRange(){const{_dateFormRange:e,field:t}=this;if("date"!==this.dataType)return{};const i=u(t);if(!i)return e;const{max:l,min:n,rawMax:r,rawMin:s}=e;if("date"===t.type){const{max:e,min:t}=i;return{max:x(l)&&(null===e||null!=e&&l<e)?l:e??null,min:x(n)&&(null===t||null!=t&&n>t)?n:t??null}}if("date-only"===t.type||"time-only"===t.type||"timestamp-offset"===t.type){const{max:e,min:t,rawMax:u,rawMin:a}=i,o=x(l)&&r&&(null==e||l<e),p=x(n)&&s&&(null==t||n>t);return{max:o?l:e,min:p?n:t,rawMax:o?r:u,rawMin:p?s:a}}return{max:null,min:null}}get _configAllowsEdits(){const{element:e,layer:t,name:i}=this;if(null!=e)return e.editableExpression?!!this.evaluatedEditableExpression:!1!==e.editable;if(t?.userHasUpdateItemPrivileges)return!0;const l=t&&"popupTemplate"in t?t?.popupTemplate?.fieldInfos?.find(({fieldName:e})=>e===i):null;return l?.isEditable??!0}get _layerAndFieldAllowEdits(){return this.layerAllowsEdits&&this.field?.editable}get _isVisibleByDefault(){const{field:e,layer:t}=this;return!!e?.visible&&p(e,t)}get _isEditTrackingField(){return d(this.layer).includes(this.name?.toLowerCase())}get _shouldUseValueExpression(){return this._layerAndFieldAllowEdits&&!this._configAllowsEdits&&null!=this.valueExpressionExecutor&&this.valueExpressionExecutor.initialExecutionComplete}get isSubtypeField(){const{layer:e}=this;if(e&&"subtypeField"in e){const{subtypeField:t,fieldsIndex:i}=e;return(i.get(t)?.name??t)===this.name}return!1}get valueIsOutOfDomain(){const{domain:e,value:t,field:i}=this;return!(!e||null==t)&&null!==o(i,t,e)}get alias(){return s(this.field,this.layer)}get dataType(){const{field:e}=this;return m(e)?"number":h(e)?"text":g(e)||f(e)?"date":"unsupported"}get dateDataType(){if("date"===this.dataType)return"date"!==this.field.type?"string":"number"}get domain(){const{layer:e,feature:t,name:i,element:l}=this,n=l?.domain;return null!=n&&this._isDomainCompatible(n)?n:e.getFieldDomain(i,{feature:t})}get editable(){return!!this._layerAndFieldAllowEdits&&(this.evaluatedEditableExpression??this._configAllowsEdits)}get evaluatedRequiredExpression(){const{requiredExpressionExecutor:e}=this;return null!=e?!!e.lastEvaluatedValue:null}get evaluatedValueExpression(){const{valueExpressionExecutor:e}=this;return null!=e?e.lastEvaluatedValue:null}get hint(){return this.element?.hint}get includeDate(){return!("date"!==this.dataType||"time-only"===this.field.type)}get includeTime(){const{element:e,field:t}=this;if("date"!==this.dataType)return!1;if("time-only"===t.type)return!0;if("date-only"===t.type)return!1;const i="datetime-picker"===e?.input?.type?e.input.includeTime:void 0;return void 0===i||i}get includeTimeOffset(){if("timestamp-offset"!==this.field.type)return!1;const e=this.element?.input;return!e||"datetimeoffset-picker"===e.type&&e.includeTimeOffset}set initialFeature(e){this._set("initialFeature",e),this.notifyChange("valid")}get inputType(){return this.element?.input?.type}get hasInvalidSwitchValue(){const{element:e}=this,t=E(e,"switch")?e.input:null;return!t||b(this.value,t)}get isRelationshipKeyField(){const{field:e,layer:t}=this;return c(t)&&!!t.relationships?.some(t=>t.keyField===e.name)}get label(){return this.getFormattedLabel(this.element?.label)||this.alias||this.field.name}get maxLength(){return D({dataType:this.dataType,field:this.field,input:this.element?.input})}get minLength(){return L({dataType:this.dataType,field:this.field,input:this.element?.input})}get name(){return this.field?.name}get range(){const{domain:e,element:t,field:i}=this;if("date"===this.dataType)return this._dateRange;const l=u(i,e)||y(i,e),n=l?.max===Number.MAX_VALUE?null:l?.max??null,r=l?.min===-Number.MAX_VALUE?null:l?.min??null;if(!t?.domain||"range"!==t.domain.type)return{max:n,min:r};const{max:s,min:a}=u(i)||{};return{max:null!=s&&(null===n||null!=n&&s<n)?s:n,min:null!=a&&(null===r||null!=r&&a>r)?a:r}}get required(){const{editable:e,evaluatedRequiredExpression:t,field:i,visible:l,isSubtypeField:n}=this;if(!e)return!1;if(!1===i?.nullable)return!0;if(n)return!0;return!(!l||!1===this.group?.visible||null==t)&&t}set required(e){this._overrideIfSome("required",e)}get showNoValueOptionEnabled(){const{element:e}=this;return!this.required&&(!_(e)||e.input.showNoValueOption)}get showNoValueLabel(){const{element:e}=this;return _(e)?e.input.noValueOptionLabel:null}get submittable(){const{field:e,required:t,valid:i,value:l}=this;return(!t||null!=l)&&(!!i||this.initialFeature.getAttribute(e.name)===l)}get timeResolution(){const e=this.element?.input;if(e&&("datetimeoffset-picker"===e.type||"time-picker"===e.type))return e.timeResolution??"minutes"}get timeStep(){return null!=this.timeResolution?V.get(this.timeResolution):void 0}get updating(){const{editableExpressionExecutor:e,valueExpressionExecutor:t,visibilityExpressionExecutor:i,preservesValueWhenHidden:l}=this;return null!=t&&t.updating||null!=e&&e.updating||!1===l&&null!=i&&i.updating}get valid(){const e=this.editable?this._validate():null;return this._set("error",e),null===e}get value(){if(this._fieldInputWasVisibleDuringLifetime=this._fieldInputWasVisibleDuringLifetime||this.visible&&!1!==this.group?.visible,!1===this.preservesValueWhenHidden&&this._fieldInputWasVisibleDuringLifetime&&(!1===this.visibilityExpressionExecutor?.lastEvaluatedValue||!1===this.group?.visibilityExpressionExecutor?.lastEvaluatedValue))return null!==this._storedValue&&this.set("_storedValue",null),null;if(this._shouldUseValueExpression){const e=this.evaluatedValueExpression;return"date"===this.dataType?this._arcadeOutputToDateFieldValue(e):null!=e&&"object"==typeof e?`${e}`:e}return this._storedValue}set value(e){this.notifyChange("evaluatedVisibilityExpression"),this.set("_storedValue",e),this.notifyChange("value"),this.notifyChange("valid")}get visible(){return!this._isEditTrackingField&&(null!=this.evaluatedVisibilityExpression?this.evaluatedVisibilityExpression:null!=this.element&&!1!==this.field?.visible||this._isVisibleByDefault)}_arcadeOutputToDateFieldValue(e){const i=this.field.type;try{if("object"==typeof e){if(null===e)return null;if(T(e))return w(e,i);if("getTime"in e&&"function"==typeof e.getTime&&"date"===i)return parseInt(e.getTime(),10);if("date-only"===i||"time-only"===i||"timestamp-offset"===i)return e.toString()}else{if("string"==typeof e)return"date"===i?parseInt(e,10):e;if("number"==typeof e&&"date"===i)return e}throw new t("feature-form:invalid-date-value","Date value is invalid")}catch{return"date"===i?NaN:""}}_isDomainCompatible(e){const{field:t}=this;if("coded-value"===e?.type){const i=typeof e.codedValues[0].code;if("string"===i&&h(t)||"number"===i&&m(t))return!0}return!!("range"===e?.type&&m(t)||g(t)||f(t))}_validate(){const{dataType:e,domain:t,field:i,minLength:l,range:n,required:r,value:s,maxLength:u}=this;return M(s,{dataType:e,domain:t,field:i,maxLength:u,minLength:l,range:n,required:r})}};e([n()],O.prototype,"_dateFormRange",null),e([n()],O.prototype,"_dateRange",null),e([n()],O.prototype,"_storedValue",void 0),e([n()],O.prototype,"_configAllowsEdits",null),e([n()],O.prototype,"_layerAndFieldAllowEdits",null),e([n()],O.prototype,"_isVisibleByDefault",null),e([n()],O.prototype,"_isEditTrackingField",null),e([n()],O.prototype,"_shouldUseValueExpression",null),e([n()],O.prototype,"isSubtypeField",null),e([n()],O.prototype,"valueIsOutOfDomain",null),e([n()],O.prototype,"alias",null),e([n()],O.prototype,"dataType",null),e([n()],O.prototype,"dateDataType",null),e([n()],O.prototype,"domain",null),e([n()],O.prototype,"editable",null),e([n({readOnly:!0})],O.prototype,"error",void 0),e([n({constructOnly:!0})],O.prototype,"preservesValueWhenHidden",void 0),e([n()],O.prototype,"evaluatedRequiredExpression",null),e([n()],O.prototype,"evaluatedValueExpression",null),e([n()],O.prototype,"field",void 0),e([n()],O.prototype,"group",void 0),e([n({readOnly:!0})],O.prototype,"hint",null),e([n()],O.prototype,"includeDate",null),e([n()],O.prototype,"includeTime",null),e([n()],O.prototype,"includeTimeOffset",null),e([n()],O.prototype,"initialFeature",null),e([n({readOnly:!0})],O.prototype,"inputType",null),e([n()],O.prototype,"hasInvalidSwitchValue",null),e([n()],O.prototype,"isRelationshipKeyField",null),e([n()],O.prototype,"label",null),e([n()],O.prototype,"maxLength",null),e([n()],O.prototype,"minLength",null),e([n({readOnly:!0})],O.prototype,"name",null),e([n()],O.prototype,"range",null),e([n()],O.prototype,"required",null),e([n()],O.prototype,"requiredExpressionExecutor",void 0),e([n()],O.prototype,"showNoValueOptionEnabled",null),e([n()],O.prototype,"submittable",null),e([n()],O.prototype,"timeResolution",null),e([n()],O.prototype,"timeStep",null),e([n({readOnly:!0})],O.prototype,"type",void 0),e([n()],O.prototype,"updating",null),e([n()],O.prototype,"valid",null),e([n({value:null})],O.prototype,"value",null),e([n()],O.prototype,"valueExpressionExecutor",void 0),e([n()],O.prototype,"visible",null),O=e([r("esri.widgets.FeatureForm.FieldInput")],O);const A=O;export{A as default};
|
|
2
|
+
import{__decorate as e}from"tslib";import t from"../../core/Error.js";import{watch as i,sync as l}from"../../core/reactiveUtils.js";import{property as n,subclass as r}from"../../core/accessorSupport/decorators.js";import{getEffectiveFieldAlias as s}from"../../editing/fieldUtils.js";import{getDomainRange as u,dateTimeFieldValuesToNumericRange as a,validateDomainValue as o}from"../../layers/support/domainUtils.js";import{isFieldVisibleByDefault as p,getLowerCaseEditTrackingFields as d,isNumericField as m,isStringField as h,isTimeOnlyField as f,getFieldRange as y}from"../../layers/support/fieldUtils.js";import{isRelatableFeatureSupportedLayer as c}from"../../popup/support/featureUtils.js";import{isAnyDateField as g}from"../../smartMapping/support/utils.js";import{isNumber as x}from"../../support/guards.js";import v from"./EditableInput.js";import{isFieldElementWithInputType as E,valueIsInvalidSwitchValue as b,isFieldElementWithShowNoValueOptionInput as _}from"./featureFormUtils.js";import{timeResolutionToStepMap as V,isArcadeDate as T,arcadeDateToFieldValue as w}from"../support/dateUtils.js";import{dateIsValid as F,getMaxLength as D,getMinLength as L,validateFormValue as M}from"../support/forms/formUtils.js";let O=class extends v{constructor(e){super(e),this._storedValue=null,this.error=null,this.preservesValueWhenHidden=!0,this.field=null,this.group=null,this.requiredExpressionExecutor=null,this.type="field",this._fieldInputWasVisibleDuringLifetime=!1,this.valueExpressionExecutor=null}initialize(){this.addHandles(i(()=>this.feature,()=>this._fieldInputWasVisibleDuringLifetime=!1,l))}get _dateFormRange(){const{element:e,field:t}=this;if("date"!==this.dataType)return{};const i=e?.domain?u(t,e.domain):null;if(!e?.input)return i??{};const l=e.input,{type:n}=l;let r={};if("date-picker"!==n&&"time-picker"!==n&&"timestampoffset-picker"!==n||(r=a(t,l.max,l.min)),"datetime-picker"===n){const{max:e,min:t}=l;r={max:null!=e&&F(e)?e.getTime():null,min:null!=t&&F(t)?t.getTime():null}}const{max:s,min:o}=r;if(i){const{max:e,min:t}=i,l=x(e)&&(null==s||null!=s&&e<s),n=x(t)&&(null==o||null!=o&&t>o);return{max:l?e:s??null,min:n?t:o??null,rawMax:l?i.rawMax:r?.rawMax??null,rawMin:n?i.rawMin:r?.rawMin??null}}return{min:o,max:s,rawMax:r?.rawMax??null,rawMin:r?.rawMin??null}}get _dateRange(){const{_dateFormRange:e,field:t}=this;if("date"!==this.dataType)return{};const i=u(t);if(!i)return e;const{max:l,min:n,rawMax:r,rawMin:s}=e;if("date"===t.type){const{max:e,min:t}=i;return{max:x(l)&&(null===e||null!=e&&l<e)?l:e??null,min:x(n)&&(null===t||null!=t&&n>t)?n:t??null}}if("date-only"===t.type||"time-only"===t.type||"timestamp-offset"===t.type){const{max:e,min:t,rawMax:u,rawMin:a}=i,o=x(l)&&r&&(null==e||l<e),p=x(n)&&s&&(null==t||n>t);return{max:o?l:e,min:p?n:t,rawMax:o?r:u,rawMin:p?s:a}}return{max:null,min:null}}get _configAllowsEdits(){const{element:e,layer:t,name:i}=this;if(null!=e)return e.editableExpression?!!this.evaluatedEditableExpression:!1!==e.editable;if(t?.userHasUpdateItemPrivileges)return!0;const l=t&&"popupTemplate"in t?t?.popupTemplate?.fieldInfos?.find(({fieldName:e})=>e===i):null;return l?.isEditable??!0}get _layerAndFieldAllowEdits(){return this.layerAllowsEdits&&this.field?.editable}get _isVisibleByDefault(){const{field:e,layer:t}=this;return!!e?.visible&&p(e,t)}get _isEditTrackingField(){return d(this.layer).includes(this.name?.toLowerCase())}get _shouldUseValueExpression(){return this._layerAndFieldAllowEdits&&!this._configAllowsEdits&&null!=this.valueExpressionExecutor&&this.valueExpressionExecutor.initialExecutionComplete}get isSubtypeField(){const{layer:e}=this;if(e&&"subtypeField"in e){const{subtypeField:t,fieldsIndex:i}=e;return(i.get(t)?.name??t)===this.name}return!1}get valueIsOutOfDomain(){const{domain:e,value:t,field:i}=this;return!(!e||null==t)&&null!==o(i,t,e)}get alias(){return s(this.field,this.layer)}get dataType(){const{field:e}=this;return m(e)?"number":h(e)?"text":g(e)||f(e)?"date":"unsupported"}get dateDataType(){if("date"===this.dataType)return"date"!==this.field.type?"string":"number"}get domain(){const{layer:e,feature:t,name:i,element:l}=this,n=l?.domain;return null!=n&&this._isDomainCompatible(n)?n:e.getFieldDomain(i,{feature:t})}get editable(){return!!this._layerAndFieldAllowEdits&&(this.evaluatedEditableExpression??this._configAllowsEdits)}get evaluatedRequiredExpression(){const{requiredExpressionExecutor:e}=this;return null!=e?!!e.lastEvaluatedValue:null}get evaluatedValueExpression(){const{valueExpressionExecutor:e}=this;return null!=e?e.lastEvaluatedValue:null}get hint(){return this.element?.hint}get includeDate(){return!("date"!==this.dataType||"time-only"===this.field.type)}get includeTime(){const{element:e,field:t}=this;if("date"!==this.dataType)return!1;if("time-only"===t.type)return!0;if("date-only"===t.type)return!1;const i="datetime-picker"===e?.input?.type?e.input.includeTime:void 0;return void 0===i||i}get includeTimeOffset(){if("timestamp-offset"!==this.field.type)return!1;const e=this.element?.input;return!e||"timestampoffset-picker"===e.type&&e.includeTimeOffset}set initialFeature(e){this._set("initialFeature",e),this.notifyChange("valid")}get inputType(){return this.element?.input?.type}get hasInvalidSwitchValue(){const{element:e}=this,t=E(e,"switch")?e.input:null;return!t||b(this.value,t)}get isRelationshipKeyField(){const{field:e,layer:t}=this;return c(t)&&!!t.relationships?.some(t=>t.keyField===e.name)}get label(){return this.getFormattedLabel(this.element?.label)||this.alias||this.field.name}get maxLength(){return D({dataType:this.dataType,field:this.field,input:this.element?.input})}get minLength(){return L({dataType:this.dataType,field:this.field,input:this.element?.input})}get name(){return this.field?.name}get range(){const{domain:e,element:t,field:i}=this;if("date"===this.dataType)return this._dateRange;const l=u(i,e)||y(i,e),n=l?.max===Number.MAX_VALUE?null:l?.max??null,r=l?.min===-Number.MAX_VALUE?null:l?.min??null;if(!t?.domain||"range"!==t.domain.type)return{max:n,min:r};const{max:s,min:a}=u(i)||{};return{max:null!=s&&(null===n||null!=n&&s<n)?s:n,min:null!=a&&(null===r||null!=r&&a>r)?a:r}}get required(){const{editable:e,evaluatedRequiredExpression:t,field:i,visible:l,isSubtypeField:n}=this;if(!e)return!1;if(!1===i?.nullable)return!0;if(n)return!0;return!(!l||!1===this.group?.visible||null==t)&&t}set required(e){this._overrideIfSome("required",e)}get showNoValueOptionEnabled(){const{element:e}=this;return!this.required&&(!_(e)||e.input.showNoValueOption)}get showNoValueLabel(){const{element:e}=this;return _(e)?e.input.noValueOptionLabel:null}get submittable(){const{field:e,required:t,valid:i,value:l}=this;return(!t||null!=l)&&(!!i||this.initialFeature.getAttribute(e.name)===l)}get timeResolution(){const e=this.element?.input;if(e&&("timestampoffset-picker"===e.type||"time-picker"===e.type))return e.timeResolution??"minutes"}get timeStep(){return null!=this.timeResolution?V.get(this.timeResolution):void 0}get updating(){const{editableExpressionExecutor:e,valueExpressionExecutor:t,visibilityExpressionExecutor:i,preservesValueWhenHidden:l}=this;return null!=t&&t.updating||null!=e&&e.updating||!1===l&&null!=i&&i.updating}get valid(){const e=this.editable?this._validate():null;return this._set("error",e),null===e}get value(){if(this._fieldInputWasVisibleDuringLifetime=this._fieldInputWasVisibleDuringLifetime||this.visible&&!1!==this.group?.visible,!1===this.preservesValueWhenHidden&&this._fieldInputWasVisibleDuringLifetime&&(!1===this.visibilityExpressionExecutor?.lastEvaluatedValue||!1===this.group?.visibilityExpressionExecutor?.lastEvaluatedValue))return null!==this._storedValue&&this.set("_storedValue",null),null;if(this._shouldUseValueExpression){const e=this.evaluatedValueExpression;return"date"===this.dataType?this._arcadeOutputToDateFieldValue(e):null!=e&&"object"==typeof e?`${e}`:e}return this._storedValue}set value(e){this.notifyChange("evaluatedVisibilityExpression"),this.set("_storedValue",e),this.notifyChange("value"),this.notifyChange("valid")}get visible(){return!this._isEditTrackingField&&(null!=this.evaluatedVisibilityExpression?this.evaluatedVisibilityExpression:null!=this.element&&!1!==this.field?.visible||this._isVisibleByDefault)}_arcadeOutputToDateFieldValue(e){const i=this.field.type;try{if("object"==typeof e){if(null===e)return null;if(T(e))return w(e,i);if("getTime"in e&&"function"==typeof e.getTime&&"date"===i)return parseInt(e.getTime(),10);if("date-only"===i||"time-only"===i||"timestamp-offset"===i)return e.toString()}else{if("string"==typeof e)return"date"===i?parseInt(e,10):e;if("number"==typeof e&&"date"===i)return e}throw new t("feature-form:invalid-date-value","Date value is invalid")}catch{return"date"===i?NaN:""}}_isDomainCompatible(e){const{field:t}=this;if("coded-value"===e?.type){const i=typeof e.codedValues[0].code;if("string"===i&&h(t)||"number"===i&&m(t))return!0}return!!("range"===e?.type&&m(t)||g(t)||f(t))}_validate(){const{dataType:e,domain:t,field:i,minLength:l,range:n,required:r,value:s,maxLength:u}=this;return M(s,{dataType:e,domain:t,field:i,maxLength:u,minLength:l,range:n,required:r})}};e([n()],O.prototype,"_dateFormRange",null),e([n()],O.prototype,"_dateRange",null),e([n()],O.prototype,"_storedValue",void 0),e([n()],O.prototype,"_configAllowsEdits",null),e([n()],O.prototype,"_layerAndFieldAllowEdits",null),e([n()],O.prototype,"_isVisibleByDefault",null),e([n()],O.prototype,"_isEditTrackingField",null),e([n()],O.prototype,"_shouldUseValueExpression",null),e([n()],O.prototype,"isSubtypeField",null),e([n()],O.prototype,"valueIsOutOfDomain",null),e([n()],O.prototype,"alias",null),e([n()],O.prototype,"dataType",null),e([n()],O.prototype,"dateDataType",null),e([n()],O.prototype,"domain",null),e([n()],O.prototype,"editable",null),e([n({readOnly:!0})],O.prototype,"error",void 0),e([n({constructOnly:!0})],O.prototype,"preservesValueWhenHidden",void 0),e([n()],O.prototype,"evaluatedRequiredExpression",null),e([n()],O.prototype,"evaluatedValueExpression",null),e([n()],O.prototype,"field",void 0),e([n()],O.prototype,"group",void 0),e([n({readOnly:!0})],O.prototype,"hint",null),e([n()],O.prototype,"includeDate",null),e([n()],O.prototype,"includeTime",null),e([n()],O.prototype,"includeTimeOffset",null),e([n()],O.prototype,"initialFeature",null),e([n({readOnly:!0})],O.prototype,"inputType",null),e([n()],O.prototype,"hasInvalidSwitchValue",null),e([n()],O.prototype,"isRelationshipKeyField",null),e([n()],O.prototype,"label",null),e([n()],O.prototype,"maxLength",null),e([n()],O.prototype,"minLength",null),e([n({readOnly:!0})],O.prototype,"name",null),e([n()],O.prototype,"range",null),e([n()],O.prototype,"required",null),e([n()],O.prototype,"requiredExpressionExecutor",void 0),e([n()],O.prototype,"showNoValueOptionEnabled",null),e([n()],O.prototype,"submittable",null),e([n()],O.prototype,"timeResolution",null),e([n()],O.prototype,"timeStep",null),e([n({readOnly:!0})],O.prototype,"type",void 0),e([n()],O.prototype,"updating",null),e([n()],O.prototype,"valid",null),e([n({value:null})],O.prototype,"value",null),e([n()],O.prototype,"valueExpressionExecutor",void 0),e([n()],O.prototype,"visible",null),O=e([r("esri.widgets.FeatureForm.FieldInput")],O);const A=O;export{A as default};
|
package/widgets/FeatureForm.d.ts
CHANGED
|
@@ -81,7 +81,7 @@ export interface FeatureFormEvents extends FeatureFormViewModelEvents {}
|
|
|
81
81
|
*
|
|
82
82
|
* This widget is intended to be used with [FeatureLayer.applyEdits()](https://developers.arcgis.com/javascript/latest/references/core/layers/FeatureLayer/#applyEdits) method. This enables an end user to update a feature's attribute on an editable feature layer. The UI to submit and apply any updates should be wired up within the application's code.
|
|
83
83
|
*
|
|
84
|
-
* 
|
|
85
85
|
*
|
|
86
86
|
* > [!WARNING]
|
|
87
87
|
* >
|
|
@@ -22,9 +22,9 @@ export interface ActionColumnProperties extends ColumnProperties, Partial<Pick<A
|
|
|
22
22
|
* is invoked whenever the action is clicked. Actions can be configured to dynamically
|
|
23
23
|
* display based on provided conditions.
|
|
24
24
|
*
|
|
25
|
-
* 
|
|
26
26
|
*
|
|
27
|
-
* [](https://developers.arcgis.com/javascript/latest/sample-code/widgets-featuretable-row-highlights/)
|
|
28
28
|
*
|
|
29
29
|
* @since 4.30
|
|
30
30
|
* @see [FeatureTable](https://developers.arcgis.com/javascript/latest/references/core/widgets/FeatureTable/)
|
|
@@ -23,7 +23,7 @@ export interface AttachmentsColumnProperties extends ColumnProperties, Partial<P
|
|
|
23
23
|
* > This class should be used for observing potential changes. It is designed
|
|
24
24
|
* > primarily to read and not interact directly with the attachment columns.
|
|
25
25
|
*
|
|
26
|
-
* 
|
|
27
27
|
*
|
|
28
28
|
* @since 4.30
|
|
29
29
|
* @see [FeatureTable](https://developers.arcgis.com/javascript/latest/references/core/widgets/FeatureTable/)
|
|
@@ -294,7 +294,7 @@ export default class FeatureTableViewModel extends GridViewModel {
|
|
|
294
294
|
* viewing additional information about a feature. This column is displayed as the
|
|
295
295
|
* last column in the table and is only displayed if this property is set.
|
|
296
296
|
*
|
|
297
|
-
* 
|
|
298
298
|
*
|
|
299
299
|
* @since 4.30
|
|
300
300
|
* @see [Calcite Icon Search](https://developers.arcgis.com/calcite-design-system/icons/)
|
|
@@ -352,7 +352,7 @@ export default class FeatureTableViewModel extends GridViewModel {
|
|
|
352
352
|
/**
|
|
353
353
|
* Indicates whether to display the `Attachments` field in the table. It displays the count of attachments per feature and is only applicable if the feature layer [supports attachments](https://developers.arcgis.com/javascript/latest/references/core/layers/FeatureLayer/#capabilities).
|
|
354
354
|
*
|
|
355
|
-
* 
|
|
356
356
|
*
|
|
357
357
|
* @default false
|
|
358
358
|
* @see [FeatureLayer.capabilities.data.supportsAttachment](https://developers.arcgis.com/javascript/latest/references/core/layers/FeatureLayer/#capabilities)
|
|
@@ -453,7 +453,7 @@ export default class FeatureTableViewModel extends GridViewModel {
|
|
|
453
453
|
* > If the service's field is not editable, it is not possible to override its permissions using any of the options above.
|
|
454
454
|
* > [FieldColumnTemplate.editable](https://developers.arcgis.com/javascript/latest/references/core/widgets/FeatureTable/support/FieldColumnTemplate/#editable) can never override what is set on the layer, field, or table.
|
|
455
455
|
*
|
|
456
|
-
* 
|
|
457
457
|
*
|
|
458
458
|
* @default false
|
|
459
459
|
* @since 4.16
|