@arcgis/core 5.1.0-next.106 → 5.1.0-next.108
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/analysis/ShadowCastAnalysis.d.ts +2 -1
- package/applications/SceneViewer/sceneViewerUtils.js +1 -1
- package/arcgisGlobal.d.ts +5 -0
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{b7a81fd4994eabba1869.js → 0c8e6ccb5a8174718d62.js} +1 -1
- package/assets/esri/core/workers/chunks/{be817be7c81fb630122f.js → 17604cbd4d24158e2c16.js} +1 -1
- package/assets/esri/core/workers/chunks/{065dd2fdc834146423c7.js → 33ec193e6d7a0cb9d8dd.js} +1 -1
- package/assets/esri/core/workers/chunks/4e13d639419ac64f7563.js +1 -0
- package/assets/esri/core/workers/chunks/4f9ea7544b2d0e88a05c.js +1 -0
- package/assets/esri/core/workers/chunks/{15920af0c4f46773b06e.js → 502c3da8c49bf885f51d.js} +1 -1
- package/assets/esri/core/workers/chunks/518046d2b95a7590a092.js +1 -0
- package/assets/esri/core/workers/chunks/{aaad0d3e82ed917d3886.js → 547dc6ccb989bd962661.js} +1 -1
- package/assets/esri/core/workers/chunks/{bd59cb5abc67e46f1b2c.js → 55334ad3618899cdbf78.js} +2 -2
- package/assets/esri/core/workers/chunks/{d859c046a3ea42530bff.js → 56d9d3f108ff6e719dd4.js} +1 -1
- package/assets/esri/core/workers/chunks/{770611659b38066a6228.js → 5a85cbc04c64091d7f46.js} +1 -1
- package/assets/esri/core/workers/chunks/75a7de23c05435ec7649.js +1 -0
- package/assets/esri/core/workers/chunks/7b66691d133dabd87ce6.js +1 -0
- package/assets/esri/core/workers/chunks/91c0de3950991d81b7f2.js +1 -0
- package/assets/esri/core/workers/chunks/9234a293d61e134f121f.js +1 -0
- package/assets/esri/core/workers/chunks/{a8ae00e06f98e04aee8e.js → ac408c62565e2c8b5975.js} +1 -1
- package/assets/esri/core/workers/chunks/{f7fe17a22390a24d6df8.js → b69d1d528e271568cbd8.js} +2 -2
- package/assets/esri/core/workers/chunks/{0cc74bc3772be51cabc1.js → bbaf8baa3ca6195467e4.js} +1 -1
- package/assets/esri/core/workers/chunks/{7ce60331f94ee0a5d674.js → beff5b4e15edee12bd4c.js} +33 -41
- package/assets/esri/core/workers/chunks/{b9850fe7dcdaed0c327c.js → cdb48d198145493f76f3.js} +1 -1
- package/assets/esri/core/workers/chunks/{63ea4191d441efd2f146.js → d4014213c476bf8099af.js} +1 -1
- package/assets/esri/core/workers/chunks/{740588250eaffb7301fd.js → e1340232962cf576d37e.js} +1 -1
- package/assets/esri/geometry/support/pe-wasm.wasm +0 -0
- package/assets/esri/libs/lyr3d/lyr3DMain.wasm +0 -0
- package/assets/esri/libs/lyr3d/lyr3DWorker.wasm +0 -0
- package/assets/esri/themes/base/widgets/_Sketch.scss +1 -24
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_ar.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_bg.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_bs.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_ca.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_cs.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_da.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_de.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_el.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_es.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_et.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_fi.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_fr.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_he.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_hr.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_hu.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_id.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_it.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_ja.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_ko.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_lt.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_lv.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_nl.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_no.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_pl.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_pt-BR.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_pt-PT.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_ro.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_ru.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_sk.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_sl.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_sr.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_sv.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_th.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_tr.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_uk.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_vi.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_zh-CN.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_zh-HK.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_zh-TW.json +1 -1
- package/assets/esri/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/BatchAttributeForm/t9n/BatchAttributeForm.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ar.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_bg.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_bs.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ca.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_cs.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_da.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_de.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_el.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_en.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_es.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_et.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_fi.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_fr.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_he.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_hr.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_hu.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_id.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_it.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ja.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ko.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_lt.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_lv.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_nl.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_no.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_pl.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_pt-BR.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_pt-PT.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ro.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ru.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sk.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sl.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sr.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sv.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_th.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_tr.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_uk.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_vi.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_zh-CN.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_zh-HK.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_zh-TW.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable.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_en.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_es.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_et.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_fi.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_fr.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_he.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_hr.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_hu.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_id.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_it.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ja.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ko.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_lt.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_lv.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_nl.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_no.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_pl.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_pt-BR.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_pt-PT.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ro.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ru.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sk.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sl.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sr.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sv.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_th.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_tr.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_uk.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_vi.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_zh-CN.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_zh-HK.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_zh-TW.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ar.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_bg.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_bs.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ca.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_cs.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_da.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_de.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_el.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_es.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_et.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_fi.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_fr.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_he.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_hr.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_hu.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_id.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_it.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ja.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ko.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_lt.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_lv.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_nl.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_no.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pl.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pt-BR.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pt-PT.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ro.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ru.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sk.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sl.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sr.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sv.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_th.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_tr.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_uk.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_vi.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-CN.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-HK.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-TW.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_ar.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_bg.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_bs.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_ca.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_cs.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_da.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_de.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_el.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_en.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_es.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_et.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_fi.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_fr.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_he.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_hr.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_hu.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_id.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_it.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_ja.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_ko.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_lt.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_lv.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_nl.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_no.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_pl.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_pt-BR.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_pt-PT.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_ro.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_ru.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_sk.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_sl.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_sr.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_sv.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_th.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_tr.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_uk.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_vi.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_zh-CN.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_zh-HK.json +1 -1
- package/assets/esri/widgets/Sketch/t9n/Sketch_zh-TW.json +1 -1
- package/chunks/Fog.glsl.js +3 -3
- package/chunks/GlobalIllumination.glsl.js +12 -12
- package/chunks/GlowComposition.glsl.js +38 -56
- package/chunks/OITBlend.glsl.js +7 -7
- package/chunks/OITBlendEmission.glsl.js +4 -4
- package/chunks/OITDimOpaque.glsl.js +8 -3
- package/chunks/SimpleAtmosphere.glsl.js +3 -3
- package/chunks/lyr3DWorker.js +1 -1
- package/chunks/pe-wasm.js +1 -1
- package/config.js +1 -1
- package/core/workers/workers.js +1 -1
- package/geometry/support/WKIDUnitConversion.js +1 -1
- package/identity/IdentityManagerBase.js +1 -1
- package/kernel.js +1 -1
- package/layers/Lyr3DWasmPerSceneView.js +1 -1
- package/layers/raster/datasets/MRFRaster.js +1 -1
- package/layers/video/VideoController.js +1 -1
- package/package.json +3 -3
- package/rest/networks/circuits/support/CircuitVerifyResult.js +1 -1
- package/rest/networks/circuits/support/VerifyCircuitsResult.js +1 -1
- package/support/revision.js +1 -1
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/layers/MapImageLayerView2D.js +1 -1
- package/views/2d/layers/RouteLayerView2D.js +1 -1
- package/views/2d/layers/TileLayerView2D.js +1 -1
- package/views/2d/layers/features/sources/strategies/support/queryAdapters.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReader.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightAuthoringUtils.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightIntersectionResult.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightRayIntersector.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightTool.js +1 -1
- package/views/3d/analysis/ShadowCast/ShadowCastTooltip.js +1 -1
- package/views/3d/analysis/ShadowCastAnalysisView3D.d.ts +3 -1
- package/views/3d/analysis/ShadowCastAnalysisView3D.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedConfiguration.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedEditTool.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedObserverManipulatedObject3D.js +2 -0
- package/views/3d/analysis/Viewshed/ViewshedPlacementController.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedTool.js +1 -1
- package/views/3d/analysis/Viewshed/viewshedSubToolUtils.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementShiftTool.js +1 -1
- package/views/3d/environment/FoggyWeather.js +1 -1
- package/views/3d/layers/BuildingComponentSublayerView3D.js +1 -1
- package/views/3d/layers/BuildingSceneLayerView3D.js +1 -1
- package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/layers/MapImageLayerView3D.js +1 -1
- package/views/3d/layers/TileLayerView3D.js +1 -1
- package/views/3d/layers/i3s/Intersector.js +1 -1
- package/views/3d/layers/support/PopupSceneLayerView.js +1 -1
- package/views/3d/layers/support/SublayerPopupHighlightHelper3D.js +1 -1
- package/views/3d/support/ResourceController.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatIntersectionHandler.js +1 -1
- package/views/3d/support/popupHitTest.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentDrawParameters.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterialRepository.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/collections/Component/SourceGeometry.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexNormal.glsl.js +4 -12
- package/views/3d/webgl-engine/effects/blit/Blit.js +1 -1
- package/views/3d/webgl-engine/effects/fog/Fog.js +1 -1
- package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.js +1 -1
- package/views/3d/webgl-engine/effects/glow/Glow.js +1 -1
- package/views/3d/webgl-engine/effects/glow/GlowCompositionTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/effects/transparency/OITBlend.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/transparency/OITBlendEmission.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/transparency/OITDimOpaque.glsl.js +1 -1
- package/views/3d/webgl-engine/lib/RenderFeature.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
- package/views/3d/webgl-engine/parts/RenderView.js +1 -1
- package/views/PopupView.js +1 -1
- package/views/SceneView.js +1 -1
- package/views/View2D.js +1 -1
- package/views/draw/DrawTool.d.ts +77 -0
- package/views/draw/support/editingSessionUtils.js +1 -1
- package/views/draw/support/managers/PluginLifecycleManager.d.ts +10 -0
- package/views/interactive/InteractiveToolBase.d.ts +11 -0
- package/views/interactive/editGeometry/interfaces.d.ts +8 -0
- package/views/interactive/interfaces.d.ts +20 -0
- package/views/layers/FeatureLikeLayerView.js +1 -1
- package/views/layers/ImageryLayerView.js +1 -1
- package/views/layers/ImageryTileLayerView.js +1 -1
- package/views/layers/WMSLayerView.js +1 -1
- package/views/layers/support/MapServiceLayerViewHelper.js +1 -1
- package/views/webgl/capabilities/load.js +1 -1
- package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.d.ts +26 -1
- package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js +1 -1
- package/widgets/BatchAttributeForm/batchAttributeFormUtils.js +1 -1
- package/widgets/BatchAttributeForm/inputs/BatchFormInputs.js +1 -1
- package/widgets/BatchAttributeForm/inputs/FieldInput.d.ts +5 -44
- package/widgets/BatchAttributeForm/inputs/FieldInput.js +1 -1
- package/widgets/BatchAttributeForm/inputs/UtilityNetworkAssociationsElementInput.js +1 -1
- package/widgets/BatchAttributeForm/inputs/support/inputUtils.js +1 -1
- package/widgets/BatchAttributeForm/inputs/support/multipleChoiceInputUtils.js +2 -0
- package/widgets/BatchAttributeForm/types.d.ts +7 -0
- package/widgets/BatchAttributeForm.js +1 -1
- package/widgets/CoordinateConversion/CoordinateConversionViewModel.d.ts +9 -1
- package/widgets/CoordinateConversion/CoordinateConversionViewModel.js +1 -1
- package/widgets/FeatureForm.js +1 -1
- package/widgets/FeatureTable/Grid/Column.js +1 -1
- package/widgets/FeatureTable/Grid/types.d.ts +21 -1
- package/widgets/FeatureTable.js +1 -1
- package/widgets/Sketch/SketchViewModel.d.ts +67 -2
- package/widgets/Sketch/SketchViewModel.js +1 -1
- package/widgets/Sketch/VisibleElements.d.ts +19 -1
- package/widgets/Sketch/VisibleElements.js +1 -1
- package/widgets/Sketch/support/OperationHandle.js +1 -1
- package/widgets/Sketch/support/PluginManager.d.ts +12 -0
- package/widgets/Sketch/support/PluginManager.js +1 -1
- package/widgets/Sketch.js +1 -1
- package/widgets/support/SelectionToolbar/SelectionToolbarViewModel.d.ts +81 -0
- package/widgets/support/SelectionToolbar/types.d.ts +4 -0
- package/assets/esri/core/workers/chunks/2a2e97918524e0f436d7.js +0 -1
- package/assets/esri/core/workers/chunks/2b3a8a53cd68f666676b.js +0 -1
- package/assets/esri/core/workers/chunks/2ecb21c402cdd8c82533.js +0 -1
- package/assets/esri/core/workers/chunks/7e02e5c6979090fe3ea7.js +0 -1
- package/assets/esri/core/workers/chunks/dcba6c766eee8b90381a.js +0 -1
- package/assets/esri/core/workers/chunks/f9324420f2c6ac240f63.js +0 -1
- package/assets/esri/core/workers/chunks/fae2c8f053927559fff0.js +0 -1
- /package/assets/esri/core/workers/chunks/{bd59cb5abc67e46f1b2c.js.LICENSE.txt → 55334ad3618899cdbf78.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{f7fe17a22390a24d6df8.js.LICENSE.txt → b69d1d528e271568cbd8.js.LICENSE.txt} +0 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/** @internal */
|
|
2
|
+
export interface ManipulatorEvents {}
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* An interface that must be implemented by the 2D and 3D implementations of manipulators
|
|
6
|
+
* for them to be usable by the tool view manager.
|
|
7
|
+
*
|
|
8
|
+
* The general characteristics of a manipulator are that it:
|
|
9
|
+
* - updates one or many parameters of an interactive tool
|
|
10
|
+
* - follows the input pointer when you drag it, unless it's constrained along an axis
|
|
11
|
+
* - does not change in size when you zoom in and out
|
|
12
|
+
* - is visible and responsive even when occluded by other geometry in the scene
|
|
13
|
+
* - is not affected by scene lighting and does not cast shadows
|
|
14
|
+
* - causes updates to the mouse cursor (e.g. arrow -> hand icon) when hovered over or interacted with
|
|
15
|
+
* - may change appearance when hovered over or interacted with
|
|
16
|
+
* - may support being moved by one of multiple pointers (i.e. multi-touch)
|
|
17
|
+
*
|
|
18
|
+
* @internal
|
|
19
|
+
*/
|
|
20
|
+
export interface Manipulator<Events extends ManipulatorEvents = ManipulatorEvents> {}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import"../../core/has.js";import t from"../../core/Logger.js";import{throwIfAborted as i}from"../../core/promiseUtils.js";import{watch as r,syncAndInitial as s,on as l,whenOnce as a}from"../../core/reactiveUtils.js";import{sqlOr as n,sqlIn as o,sqlAnd as u}from"../../core/sql.js";import{property as d,subclass as p}from"../../core/accessorSupport/decorators.js";import{getPopupProvider as f}from"../../graphic/getPopupProvider.js";import{getFeatureIdInfoFieldNames as h}from"../../layers/graphics/data/FeatureIdInfo.js";import{systemIsSpatialFieldName as y}from"../../layers/knowledgeGraph/constants.js";import{getEffectiveDisplayFilter as m}from"../../layers/support/displayFilterUtils.js";import c from"../../layers/support/FeatureEffect.js";import F from"../../layers/support/FeatureFilter.js";import{getSignedInUser as g,layerRequiresGeometryZM as I}from"../../layers/support/featureLayerUtils.js";import{fetchFeaturePopupFeatures as b,loadFeaturePopupArcadeModules as v}from"../../layers/support/featurePopupQueryUtils.js";import{fixFields as w,unpackFieldNames as x,collectLabelingFields as E,collectElevationFields as R,collectFilterFields as q,collectFeatureReductionFields as _,collectOrderByInfos as j,collectFields as O,collectTrackInfoFields as C,collectDisplayFilterFields as k,collectField as P,featureHasFields as U}from"../../layers/support/fieldUtils.js";import{getFloorFilterClause as T}from"../../layers/support/floorFilterUtils.js";import{collectRelativeTimeFields as L}from"../../layers/support/relativeTimeQueryUtils.js";import{getUtilityNetworkFields as Z}from"../../networks/support/networkFieldUtils.js";import S from"../../rest/support/Query.js";import{createFeatureIdInfo as M}from"../2d/layers/features/layerAdapters/featureServiceUtils.js";import D from"./LayerView.js";import{getFetchPopupTemplate as N,getRequiredFields as Q}from"./support/popupUtils.js";import{WhereClauseVisitor as G}from"./support/WhereClauseVisitor.js";let H=class extends D{constructor(){super(...arguments),this._updatingRequiredPromise=null,this._defaultReturnZ=!1,this.hasZ=!1,this.hasM=!1,this.filter=null,this.layer=null,this.requiresCurrentUser=!1,this.requiredFields=[],this.view=null}initialize(){this.addHandles([r(()=>{const e=this.layer,t=this.view;return[e&&"elevationInfo"in e?e.elevationInfo?.featureExpressionInfo:null,e&&"displayField"in e?e.displayField:null,e&&"timeInfo"in e&&e.timeInfo,e&&"renderer"in e&&e.renderer,e&&"returnZ"in e&&e.returnZ,e&&"returnM"in e&&e.returnM,e&&"capabilities"in e&&e.capabilities,e&&"labelingInfo"in e&&e.labelingInfo,e&&"floorInfo"in e&&e.floorInfo,t?.requiredFieldsOptions?.featureTitleFields&&e&&"featureTitleFields"in e&&e.featureTitleFields,t?.requiredFieldsOptions?.utilityNetworkFields&&Z(t,e),e&&"displayFilterInfo"in e&&e.displayFilterInfo,this.displayFilterEnabled,this.filter,this.featureEffect,this.timeExtent,"knowledge-graph-sublayer"===e?.type&&"link-chart"===e.parentCompositeLayer?.type&&e.parentCompositeLayer.linkChart?.linkChartProperties.nonspatialDataDisplay?.mode]},()=>this._handleChange(),s),l(()=>this.view?.floors,"change",()=>this._handleChange()),l(()=>(this.layer&&"displayFilterInfo"in this.layer?this.layer.displayFilterInfo:null)?.filters,"change",()=>this._handleChange()),l(()=>this.layer&&"sublayers"in this.layer?this.layer.sublayers:null,"change",()=>this._handleChange())])}get availableFields(){if(!this.layer)return[];const{layer:e,layer:{fieldsIndex:t},requiredFields:i}=this;return"outFields"in e&&e.outFields?w(t,[...x(t,e.outFields),...i]):w(t,i)}get displayFilterEnabled(){return(this.view?.displayFilterEnabled??!0)&&(!("displayFilterEnabled"in this.layer)||(this.layer?.displayFilterEnabled??!0))}get effectiveDisplayFilter(){const e=this.layer;return"displayFilterInfo"in e&&this.displayFilterEnabled&&e.displayFilterInfo?m(e.displayFilterInfo,this.view):null}get effectiveDisplayFilterClause(){const e=this.effectiveDisplayFilter?.where??null;return e&&this.hasHighlight?n(e,o(this.layer.objectIdField,this.highlightIds)):e}get featureEffect(){return this.layer&&"featureEffect"in this.layer?this.layer.featureEffect:null}set featureEffect(e){this._override("featureEffect",e)}get highlightOptions(){}set highlightOptions(e){}get maximumNumberOfFeatures(){return 0}set maximumNumberOfFeatures(e){t.getLogger(this).error("#maximumNumberOfFeatures=","Setting maximum number of features is not supported")}get maximumNumberOfFeaturesExceeded(){return!1}get signedInUser(){return this.layer?.url?g(this.layer.url):Promise.resolve(null)}createQuery(){const e={outFields:["*"],returnGeometry:!0,outSpatialReference:this.view.spatialReference},t=null!=this.filter?this.filter.createQuery(e):new S(e);return"floorInfo"in this.layer&&this.layer.floorInfo&&(t.where=u(t.where,T(this))),this.displayFilterEnabled&&(t.where=u(t.where,this.effectiveDisplayFilter?.where)),null!=this.timeExtent&&(t.timeExtent=null!=t.timeExtent?t.timeExtent.intersection(this.timeExtent):this.timeExtent.clone()),t}createAggregateQuery(){const e={outFields:["*"],returnGeometry:!0,outSpatialReference:this.view.spatialReference};return new S(e)}async fetchPopupFeaturesFromGraphics(e,t){const i=[],r=new Set;for(const l of e){const e=f(l.origin),s=N(e,{...t,checkPopupEnabled:!0});s&&(i.push(l),r.add(s))}if(0===i.length||0===r.size)return[];const s=await this._createPopupQuery(r,t);return await b(this.layer,i,s,{hasRequiredFields:(e,t)=>this._popupFeatureHasRequiredFields(e,t),...t})}_handleChange(){const e=Promise.all([a(()=>!("reloading"in this.layer&&this.layer.reloading)),this._updateRequiredFields(),this._updateClientWhereClauseRequirements(),this._updateHasZM()]).then(()=>{});return this._updatingRequiredPromise=e,e.then(()=>{this._updatingRequiredPromise===e&&(this._updatingRequiredPromise=null)}),e}async _updateClientWhereClauseRequirements(){if(!this.layer||!this.view)return;const{layer:e}=this,i=new G(e.fieldsIndex);if(i.visitFilter(this.filter),"featureReduction"in e&&i.visitFeatureReduction(e.featureReduction),"labelingInfo"in e&&i.visitLabelingInfo(e.labelsVisible,e.labelingInfo),"trackInfo"in e&&i.visitTrackInfo(e.trackInfo),"2d"===this.view.type&&(i.visitFilter(this.featureEffect?.filter),"featureReduction"in e&&i.visitFeatureReduction(e.featureReduction),"displayFilterInfo"in e&&i.visitDisplayFilter(this.displayFilterEnabled,e.displayFilterInfo)),"subtype-group"===e.type)for(const t of e.sublayers)i.visitLabelingInfo(t.labelsVisible,t.labelingInfo);"definitionExpression"in e&&"capabilities"in e&&e.capabilities?.query.relativeTimeBinWindow&&i.visitRelativeTimeQuery(e.definitionExpression);try{const e=await i.finish();this._set("requiresCurrentUser",e.requiresCurrentUser)}catch(r){t.getLogger(this).error(r)}}async _updateRequiredFields(){if(!this.layer||!this.view)return;const e="3d"===this.view.type,{layer:i,layer:{fieldsIndex:r}}=this,s="renderer"in i&&i.renderer,l="orderBy"in i&&i.orderBy,a="featureReduction"in i?i.featureReduction:null,n=new Set,o=[s?s.collectRequiredFields(n,r):null,E(n,i),e&&"elevationInfo"in i?R(n,i):null,null!=this.filter?q(n,i,this.filter):null,e||null==this.featureEffect?null:q(n,i,this.featureEffect.filter),!e&&a?_(n,i,a):null,!e&&l?j(n,i,l):null,"definitionExpression"in i&&"capabilities"in i&&i.capabilities?.query.relativeTimeBinWindow?L(n,i.fieldsIndex,i.definitionExpression):null];if("timeInfo"in i&&i.timeInfo&&this.timeExtent&&O(n,i.fieldsIndex,[i.timeInfo.startField,i.timeInfo.endField]),"timeInfo"in i&&i.timeInfo&&"trackInfo"in i&&i.trackInfo){const{trackInfo:e}=i;O(n,i.fieldsIndex,[i.timeInfo.trackIdField]),"feature"!==i.type&&"startTimeField"!==e.timeField||O(n,i.fieldsIndex,[i.timeInfo.startField]),"endTimeField"===e.timeField&&O(n,i.fieldsIndex,[i.timeInfo.endField]),await C(n,i)}if("floorInfo"in i&&i.floorInfo&&O(n,i.fieldsIndex,[i.floorInfo.floorField]),"featureTitleFields"in i&&this.view?.requiredFieldsOptions?.featureTitleFields&&i.featureTitleFields&&O(n,i.fieldsIndex,i.featureTitleFields),"feature"===i.type&&i.globalIdField&&this.view?.requiredFieldsOptions?.globalIdField&&O(n,i.fieldsIndex,[i.globalIdField]),"feature"!==i.type&&"subtype-group"!==i.type||!this.view?.requiredFieldsOptions?.utilityNetworkFields||O(n,i.fieldsIndex,Z(this.view,i)),this.displayFilterEnabled&&"displayFilterInfo"in i&&o.push(k(n,i,i.displayFilterInfo)),"feature"===i.type&&e&&null!=i.infoFor3D&&(null==i.globalIdField&&t.getLogger(this).error("globalIdField missing on 3DObjectFeatureLayer"),O(n,i.fieldsIndex,[i.globalIdField])),"subtype-group"===i.type){P(n,r,i.subtypeField);const e=i.sublayers.map(e=>Promise.all([e.renderer?.collectRequiredFields(n,r),E(n,e)]));o.push(Promise.all(e))}if("catalog-footprint"===i.type&&i.parent){const e=i.parent;O(n,r,[e.itemNameField,e.itemSourceField,e.itemTypeField,e.maxScaleField,e.minScaleField])}"knowledge-graph-sublayer"===i.type&&"link-chart"===i.parentCompositeLayer?.type&&P(n,r,y);const u=await Promise.allSettled(o);if(e)P(n,r,i.objectIdField);else for(const t of h(M(i)))P(n,r,t);e&&"displayField"in i&&i.displayField&&P(n,r,i.displayField);for(const p of u)"rejected"===p.status&&t.getLogger(this).error(p.reason);const d=Array.from(n).sort();this._set("requiredFields",d)}async _updateHasZM(){const{layer:e}=this;if(!e||!this.view)return;let t=!1,i=!1;if("capabilities"in e&&e.capabilities){const{data:r}=e.capabilities;t=r.supportsZ,i=r.supportsM}this._set("hasZ",t),this._set("hasM",i);const{returnZ:r,returnM:s}=await I(e);t&&=r??this._defaultReturnZ,i&&=s??!1,this.hasZ!==t&&this._set("hasZ",t),this.hasM!==i&&this._set("hasM",i)}_popupFeatureHasRequiredFields(e,t){return U(e,t)}async _createPopupQuery(e,t){const r=this.layer.createQuery(),s=new Set;let l="point"===this.layer.geometryType;for(const a of e){if(!l){const e=await v(a);i(t),l=(e&&e.arcadeUtils.hasGeometryOperations(a))??!1}const e=await Q(this.layer,a);i(t);for(const t of e)s.add(t)}return r.where="1=1",r.returnGeometry=l,r.returnZ=l,r.returnM=l,r.outFields=Array.from(s),r.outSpatialReference=this.view.spatialReference,"floorInfo"in this.layer&&this.layer.floorInfo&&(r.where=u(r.where,T(this))),r}canResume(){return!!super.canResume()&&(null==this.timeExtent||!this.timeExtent.isEmpty)}getTest(){}get test(){}};e([d()],H.prototype,"_updatingRequiredPromise",void 0),e([d()],H.prototype,"_defaultReturnZ",void 0),e([d({readOnly:!0})],H.prototype,"availableFields",null),e([d({readOnly:!0})],H.prototype,"hasZ",void 0),e([d({readOnly:!0})],H.prototype,"hasM",void 0),e([d({readOnly:!0})],H.prototype,"displayFilterEnabled",null),e([d({readOnly:!0})],H.prototype,"effectiveDisplayFilter",null),e([d({readOnly:!0})],H.prototype,"effectiveDisplayFilterClause",null),e([d({type:c})],H.prototype,"featureEffect",null),e([d({type:F})],H.prototype,"filter",void 0),e([d()],H.prototype,"layer",void 0),e([d({type:Number})],H.prototype,"maximumNumberOfFeatures",null),e([d({readOnly:!0,type:Boolean})],H.prototype,"maximumNumberOfFeaturesExceeded",null),e([d()],H.prototype,"requiresCurrentUser",void 0),e([d({readOnly:!0})],H.prototype,"requiredFields",void 0),e([d({readOnly:!0})],H.prototype,"signedInUser",null),e([d()],H.prototype,"view",void 0),H=e([p("esri.views.layers.FeatureLikeLayerView")],H);export{H as default};
|
|
2
|
+
import{__decorate as e}from"tslib";import"../../core/has.js";import t from"../../core/Logger.js";import{throwIfAborted as i}from"../../core/promiseUtils.js";import{watch as r,syncAndInitial as s,on as l,whenOnce as a}from"../../core/reactiveUtils.js";import{sqlOr as n,sqlIn as o,sqlAnd as u}from"../../core/sql.js";import{property as d,subclass as p}from"../../core/accessorSupport/decorators.js";import{getPopupProvider as f}from"../../graphic/getPopupProvider.js";import{getFeatureIdInfoFieldNames as h}from"../../layers/graphics/data/FeatureIdInfo.js";import{systemIsSpatialFieldName as y}from"../../layers/knowledgeGraph/constants.js";import{getEffectiveDisplayFilter as m}from"../../layers/support/displayFilterUtils.js";import c from"../../layers/support/FeatureEffect.js";import F from"../../layers/support/FeatureFilter.js";import{getSignedInUser as g,layerRequiresGeometryZM as I}from"../../layers/support/featureLayerUtils.js";import{fetchFeaturePopupFeatures as b,loadFeaturePopupArcadeModules as v}from"../../layers/support/featurePopupQueryUtils.js";import{fixFields as w,unpackFieldNames as x,collectLabelingFields as E,collectElevationFields as R,collectFilterFields as q,collectFeatureReductionFields as _,collectOrderByInfos as j,collectFields as O,collectTrackInfoFields as C,collectDisplayFilterFields as k,collectField as P,featureHasFields as U}from"../../layers/support/fieldUtils.js";import{getFloorFilterClause as T}from"../../layers/support/floorFilterUtils.js";import{collectRelativeTimeFields as L}from"../../layers/support/relativeTimeQueryUtils.js";import{getUtilityNetworkFields as Z}from"../../networks/support/networkFieldUtils.js";import S from"../../rest/support/Query.js";import{createFeatureIdInfo as M}from"../2d/layers/features/layerAdapters/featureServiceUtils.js";import D from"./LayerView.js";import{getFetchPopupTemplate as N,getRequiredFields as Q}from"./support/popupUtils.js";import{WhereClauseVisitor as H}from"./support/WhereClauseVisitor.js";let B=class extends D{constructor(){super(...arguments),this._updatingRequiredPromise=null,this._defaultReturnZ=!1,this.hasZ=!1,this.hasM=!1,this.filter=null,this.layer=null,this.requiresCurrentUser=!1,this.requiredFields=[],this.view=null}initialize(){this.addHandles([r(()=>{const e=this.layer,t=this.view;return[e&&"elevationInfo"in e?e.elevationInfo?.featureExpressionInfo:null,e&&"displayField"in e?e.displayField:null,e&&"timeInfo"in e&&e.timeInfo,e&&"renderer"in e&&e.renderer,e&&"returnZ"in e&&e.returnZ,e&&"returnM"in e&&e.returnM,e&&"capabilities"in e&&e.capabilities,e&&"labelingInfo"in e&&e.labelingInfo,e&&"floorInfo"in e&&e.floorInfo,t?.requiredFieldsOptions?.featureTitleFields&&e&&"featureTitleFields"in e&&e.featureTitleFields,t?.requiredFieldsOptions?.utilityNetworkFields&&Z(t,e),e&&"displayFilterInfo"in e&&e.displayFilterInfo,this.displayFilterEnabled,this.filter,this.featureEffect,this.timeExtent,"knowledge-graph-sublayer"===e?.type&&"link-chart"===e.parentCompositeLayer?.type&&e.parentCompositeLayer.linkChart?.linkChartProperties.nonspatialDataDisplay?.mode]},()=>this._handleChange(),s),l(()=>this.view?.floors,"change",()=>this._handleChange()),l(()=>(this.layer&&"displayFilterInfo"in this.layer?this.layer.displayFilterInfo:null)?.filters,"change",()=>this._handleChange()),l(()=>this.layer&&"sublayers"in this.layer?this.layer.sublayers:null,"change",()=>this._handleChange())])}get availableFields(){if(!this.layer)return[];const{layer:e,layer:{fieldsIndex:t},requiredFields:i}=this;return"outFields"in e&&e.outFields?w(t,[...x(t,e.outFields),...i]):w(t,i)}get displayFilterEnabled(){return(this.view?.displayFilterEnabled??!0)&&(!("displayFilterEnabled"in this.layer)||(this.layer?.displayFilterEnabled??!0))}get effectiveDisplayFilter(){const e=this.layer;return"displayFilterInfo"in e&&this.displayFilterEnabled&&e.displayFilterInfo?m(e.displayFilterInfo,this.view):null}get effectiveDisplayFilterClause(){const e=this.effectiveDisplayFilter?.where??null;return e&&this.hasHighlight?n(e,o(this.layer.objectIdField,this.highlightIds)):e}get featureEffect(){return this.layer&&"featureEffect"in this.layer?this.layer.featureEffect:null}set featureEffect(e){this._override("featureEffect",e)}get highlightOptions(){}set highlightOptions(e){}get maximumNumberOfFeatures(){return 0}set maximumNumberOfFeatures(e){t.getLogger(this).error("#maximumNumberOfFeatures=","Setting maximum number of features is not supported")}get maximumNumberOfFeaturesExceeded(){return!1}get signedInUser(){return this.layer?.url?g(this.layer.url):Promise.resolve(null)}createQuery(){const e={outFields:["*"],returnGeometry:!0,outSpatialReference:this.view.spatialReference},t=null!=this.filter?this.filter.createQuery(e):new S(e);return"floorInfo"in this.layer&&this.layer.floorInfo&&(t.where=u(t.where,T(this))),this.displayFilterEnabled&&(t.where=u(t.where,this.effectiveDisplayFilter?.where)),null!=this.timeExtent&&(t.timeExtent=null!=t.timeExtent?t.timeExtent.intersection(this.timeExtent):this.timeExtent.clone()),t}createAggregateQuery(){const e={outFields:["*"],returnGeometry:!0,outSpatialReference:this.view.spatialReference};return new S(e)}async patchFeaturesForPopup(e,t){const i=[],r=new Set;for(const l of e){const e=f(l.origin),s=N(e,{...t,checkPopupEnabled:!0});s&&(i.push(l),r.add(s))}if(0===i.length||0===r.size)return[];const s=await this._createPopupQuery(r,t);return await b(this.layer,i,s,{hasRequiredFields:(e,t)=>this._popupFeatureHasRequiredFields(e,t),...t})}_handleChange(){const e=Promise.all([a(()=>!("reloading"in this.layer&&this.layer.reloading)),this._updateRequiredFields(),this._updateClientWhereClauseRequirements(),this._updateHasZM()]).then(()=>{});return this._updatingRequiredPromise=e,e.then(()=>{this._updatingRequiredPromise===e&&(this._updatingRequiredPromise=null)}),e}async _updateClientWhereClauseRequirements(){if(!this.layer||!this.view)return;const{layer:e}=this,i=new H(e.fieldsIndex);if(i.visitFilter(this.filter),"featureReduction"in e&&i.visitFeatureReduction(e.featureReduction),"labelingInfo"in e&&i.visitLabelingInfo(e.labelsVisible,e.labelingInfo),"trackInfo"in e&&i.visitTrackInfo(e.trackInfo),"2d"===this.view.type&&(i.visitFilter(this.featureEffect?.filter),"featureReduction"in e&&i.visitFeatureReduction(e.featureReduction),"displayFilterInfo"in e&&i.visitDisplayFilter(this.displayFilterEnabled,e.displayFilterInfo)),"subtype-group"===e.type)for(const t of e.sublayers)i.visitLabelingInfo(t.labelsVisible,t.labelingInfo);"definitionExpression"in e&&"capabilities"in e&&e.capabilities?.query.relativeTimeBinWindow&&i.visitRelativeTimeQuery(e.definitionExpression);try{const e=await i.finish();this._set("requiresCurrentUser",e.requiresCurrentUser)}catch(r){t.getLogger(this).error(r)}}async _updateRequiredFields(){if(!this.layer||!this.view)return;const e="3d"===this.view.type,{layer:i,layer:{fieldsIndex:r}}=this,s="renderer"in i&&i.renderer,l="orderBy"in i&&i.orderBy,a="featureReduction"in i?i.featureReduction:null,n=new Set,o=[s?s.collectRequiredFields(n,r):null,E(n,i),e&&"elevationInfo"in i?R(n,i):null,null!=this.filter?q(n,i,this.filter):null,e||null==this.featureEffect?null:q(n,i,this.featureEffect.filter),!e&&a?_(n,i,a):null,!e&&l?j(n,i,l):null,"definitionExpression"in i&&"capabilities"in i&&i.capabilities?.query.relativeTimeBinWindow?L(n,i.fieldsIndex,i.definitionExpression):null];if("timeInfo"in i&&i.timeInfo&&this.timeExtent&&O(n,i.fieldsIndex,[i.timeInfo.startField,i.timeInfo.endField]),"timeInfo"in i&&i.timeInfo&&"trackInfo"in i&&i.trackInfo){const{trackInfo:e}=i;O(n,i.fieldsIndex,[i.timeInfo.trackIdField]),"feature"!==i.type&&"startTimeField"!==e.timeField||O(n,i.fieldsIndex,[i.timeInfo.startField]),"endTimeField"===e.timeField&&O(n,i.fieldsIndex,[i.timeInfo.endField]),await C(n,i)}if("floorInfo"in i&&i.floorInfo&&O(n,i.fieldsIndex,[i.floorInfo.floorField]),"featureTitleFields"in i&&this.view?.requiredFieldsOptions?.featureTitleFields&&i.featureTitleFields&&O(n,i.fieldsIndex,i.featureTitleFields),"feature"===i.type&&i.globalIdField&&this.view?.requiredFieldsOptions?.globalIdField&&O(n,i.fieldsIndex,[i.globalIdField]),"feature"!==i.type&&"subtype-group"!==i.type||!this.view?.requiredFieldsOptions?.utilityNetworkFields||O(n,i.fieldsIndex,Z(this.view,i)),this.displayFilterEnabled&&"displayFilterInfo"in i&&o.push(k(n,i,i.displayFilterInfo)),"feature"===i.type&&e&&null!=i.infoFor3D&&(null==i.globalIdField&&t.getLogger(this).error("globalIdField missing on 3DObjectFeatureLayer"),O(n,i.fieldsIndex,[i.globalIdField])),"subtype-group"===i.type){P(n,r,i.subtypeField);const e=i.sublayers.map(e=>Promise.all([e.renderer?.collectRequiredFields(n,r),E(n,e)]));o.push(Promise.all(e))}if("catalog-footprint"===i.type&&i.parent){const e=i.parent;O(n,r,[e.itemNameField,e.itemSourceField,e.itemTypeField,e.maxScaleField,e.minScaleField])}"knowledge-graph-sublayer"===i.type&&"link-chart"===i.parentCompositeLayer?.type&&P(n,r,y);const u=await Promise.allSettled(o);if(e)P(n,r,i.objectIdField);else for(const t of h(M(i)))P(n,r,t);e&&"displayField"in i&&i.displayField&&P(n,r,i.displayField);for(const p of u)"rejected"===p.status&&t.getLogger(this).error(p.reason);const d=Array.from(n).sort();this._set("requiredFields",d)}async _updateHasZM(){const{layer:e}=this;if(!e||!this.view)return;let t=!1,i=!1;if("capabilities"in e&&e.capabilities){const{data:r}=e.capabilities;t=r.supportsZ,i=r.supportsM}this._set("hasZ",t),this._set("hasM",i);const{returnZ:r,returnM:s}=await I(e);t&&=r??this._defaultReturnZ,i&&=s??!1,this.hasZ!==t&&this._set("hasZ",t),this.hasM!==i&&this._set("hasM",i)}_popupFeatureHasRequiredFields(e,t){return U(e,t)}async _createPopupQuery(e,t){const r=this.layer.createQuery(),s=new Set;let l="point"===this.layer.geometryType;for(const a of e){if(!l){const e=await v(a);i(t),l=(e&&e.arcadeUtils.hasGeometryOperations(a))??!1}const e=await Q(this.layer,a);i(t);for(const t of e)s.add(t)}return r.where="1=1",r.returnGeometry=l,r.returnZ=l,r.returnM=l,r.outFields=Array.from(s),r.outSpatialReference=this.view.spatialReference,"floorInfo"in this.layer&&this.layer.floorInfo&&(r.where=u(r.where,T(this))),r}canResume(){return!!super.canResume()&&(null==this.timeExtent||!this.timeExtent.isEmpty)}getTest(){}get test(){}};e([d()],B.prototype,"_updatingRequiredPromise",void 0),e([d()],B.prototype,"_defaultReturnZ",void 0),e([d({readOnly:!0})],B.prototype,"availableFields",null),e([d({readOnly:!0})],B.prototype,"hasZ",void 0),e([d({readOnly:!0})],B.prototype,"hasM",void 0),e([d({readOnly:!0})],B.prototype,"displayFilterEnabled",null),e([d({readOnly:!0})],B.prototype,"effectiveDisplayFilter",null),e([d({readOnly:!0})],B.prototype,"effectiveDisplayFilterClause",null),e([d({type:c})],B.prototype,"featureEffect",null),e([d({type:F})],B.prototype,"filter",void 0),e([d()],B.prototype,"layer",void 0),e([d({type:Number})],B.prototype,"maximumNumberOfFeatures",null),e([d({readOnly:!0,type:Boolean})],B.prototype,"maximumNumberOfFeaturesExceeded",null),e([d()],B.prototype,"requiresCurrentUser",void 0),e([d({readOnly:!0})],B.prototype,"requiredFields",void 0),e([d({readOnly:!0})],B.prototype,"signedInUser",null),e([d()],B.prototype,"view",void 0),B=e([p("esri.views.layers.FeatureLikeLayerView")],B);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"../../core/Error.js";import{throwIfAborted as r}from"../../core/promiseUtils.js";import{property as s}from"../../core/accessorSupport/decorators.js";import o from"../../geometry/Point.js";import{load as i,getSourceScale as a}from"../../layers/raster/functions/rasterProjectionHelper.js";import p from"../../layers/support/FieldsIndex.js";import{rasterFieldPrefix as n}from"../../layers/support/rasterFieldUtils.js";import{combineTimeExtent as l}from"../../layers/support/timeSupport.js";import m from"../../rest/support/Query.js";import u from"./LayerView.js";import{getFetchPopupTemplate as c}from"./support/popupUtils.js";class y extends u{constructor(...e){super(...e),this.view=null}get timeExtent(){return l(this.layer,this.view?.timeExtent,this._get("timeExtent"))}async
|
|
2
|
+
import{__decorate as e}from"tslib";import t from"../../core/Error.js";import{throwIfAborted as r}from"../../core/promiseUtils.js";import{property as s}from"../../core/accessorSupport/decorators.js";import o from"../../geometry/Point.js";import{load as i,getSourceScale as a}from"../../layers/raster/functions/rasterProjectionHelper.js";import p from"../../layers/support/FieldsIndex.js";import{rasterFieldPrefix as n}from"../../layers/support/rasterFieldUtils.js";import{combineTimeExtent as l}from"../../layers/support/timeSupport.js";import m from"../../rest/support/Query.js";import u from"./LayerView.js";import{getFetchPopupTemplate as c}from"./support/popupUtils.js";class y extends u{constructor(...e){super(...e),this.view=null}get timeExtent(){return l(this.layer,this.view?.timeExtent,this._get("timeExtent"))}async fetchPopupFeaturesAtTarget(e,s){const{layer:i}=this;if(!e)throw new t("imagerylayerview:fetchPopupFeatures","Nothing to fetch without area",{layer:i});const{popupEnabled:a}=i,l=c(i,s);if(!a||null==l)return[];const u=await l.getRequiredFields(null,{index:new p(i.rasterFields),partitions:new Map([["$pixel",i.rasterFields.filter(e=>e.name.startsWith(n)).map(e=>e.name)],["$imageCollectionItem",i.fields.map(e=>e.name)]])});r(s);const y=new m;y.timeExtent=this.timeExtent,y.geometry=e,y.outFields=u,y.outSpatialReference=e.spatialReference;const{resolution:f,spatialReference:d}=this.view,h="2d"===this.view.type?new o(f,f,d):new o(.5*f,.5*f,d),{returnTopmostRaster:w,showNoDataRecords:R}=l.layerOptions||{returnTopmostRaster:!0,showNoDataRecords:!1},x={returnDomainValues:!0,returnTopmostRaster:w,pixelSize:h,showNoDataRecords:R,signal:s?.signal};return i.queryVisibleRasters(y,x)}async getSourceScale(){return await i(),await this.layer.load(),a(this.layer.serviceRasterInfo,this.view.spatialReference)}canResume(){return!!super.canResume()&&!this.timeExtent?.isEmpty}}e([s()],y.prototype,"layer",void 0),e([s()],y.prototype,"suspended",void 0),e([s({readOnly:!0})],y.prototype,"timeExtent",null),e([s()],y.prototype,"view",void 0);export{y 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"../../Graphic.js";import r from"../../core/Error.js";import{makeHandle as i}from"../../core/handleUtils.js";import{property as a}from"../../core/accessorSupport/decorators.js";import{isFunctionRaster as s}from"../../layers/raster/datasets/datasetUtils.js";import{getDefaultDatumTransformationForDataset as n,projectDatasetExtent as l,getSourceScale as o}from"../../layers/raster/functions/rasterProjectionHelper.js";import{addMultidimensionalFieldValues as u,commonRasterFieldNames as p,rasterFieldPrefix as c}from"../../layers/support/rasterFieldUtils.js";import{combineTimeExtent as m}from"../../layers/support/timeSupport.js";import f from"./LayerView.js";import{getFetchPopupTemplate as y}from"./support/popupUtils.js";class h extends f{constructor(...t){super(...t),this.layer=null,this.tileInfo=null}get fullExtent(){try{return this.layer.loaded?this._getFullExtent():null}catch{return null}}get timeExtent(){return m(this.layer,this.view?.timeExtent,this._get("timeExtent"))}get hasTilingEffects(){const{renderer:t}=this.layer;return!!("raster-stretch"===t?.type&&t.dynamicRangeAdjustment&&!("min-max"===t.stretchType||"standard-deviation"===t.stretchType))}get datumTransformation(){try{return this.layer.loaded?n(this.layer.fullExtent,this.view.spatialReference,!0):null}catch{return null}}supportsSpatialReference(t){try{return!this.layer.loaded||!!l(this.layer.serviceRasterInfo,t)}catch{return!1}}async
|
|
2
|
+
import{__decorate as t}from"tslib";import e from"../../Graphic.js";import r from"../../core/Error.js";import{makeHandle as i}from"../../core/handleUtils.js";import{property as a}from"../../core/accessorSupport/decorators.js";import{isFunctionRaster as s}from"../../layers/raster/datasets/datasetUtils.js";import{getDefaultDatumTransformationForDataset as n,projectDatasetExtent as l,getSourceScale as o}from"../../layers/raster/functions/rasterProjectionHelper.js";import{addMultidimensionalFieldValues as u,commonRasterFieldNames as p,rasterFieldPrefix as c}from"../../layers/support/rasterFieldUtils.js";import{combineTimeExtent as m}from"../../layers/support/timeSupport.js";import f from"./LayerView.js";import{getFetchPopupTemplate as y}from"./support/popupUtils.js";class h extends f{constructor(...t){super(...t),this.layer=null,this.tileInfo=null}get fullExtent(){try{return this.layer.loaded?this._getFullExtent():null}catch{return null}}get timeExtent(){return m(this.layer,this.view?.timeExtent,this._get("timeExtent"))}get hasTilingEffects(){const{renderer:t}=this.layer;return!!("raster-stretch"===t?.type&&t.dynamicRangeAdjustment&&!("min-max"===t.stretchType||"standard-deviation"===t.stretchType))}get datumTransformation(){try{return this.layer.loaded?n(this.layer.fullExtent,this.view.spatialReference,!0):null}catch{return null}}supportsSpatialReference(t){try{return!this.layer.loaded||!!l(this.layer.serviceRasterInfo,t)}catch{return!1}}async fetchPopupFeaturesAtTarget(t,i){const{layer:a}=this;if(!t)throw new r("imageryTileLayerView:fetchPopupFeatures","Nothing to fetch without area",{layer:a});const{popupEnabled:n}=a,l=y(a,i);if(!n||null==l)return[];const o=[],{value:m,magdirValue:f,processedValue:h}=await a.identify(t,{timeExtent:this.timeExtent,signal:i?.signal});let d="";if(m?.length){d="imagery-tile"===a.type&&a.hasStandardTime()&&null!=m[0]?m.map(t=>a.getStandardTimeValue(t)).join(", "):m.join(", ");const t={ObjectId:0};t[p.servicePixelValue]="imagery-tile"===a.type&&s(a.raster)?h?.join(", "):d,t[p.rawServicePixelValue]=d;const r=a.raster?.rasterInfo??a.serviceRasterInfo,i=r?.attributeTable;if(null!=i){const{fields:e,features:r}=i,a=e.find(({name:t})=>"value"===t.toLowerCase()),s=t[p.servicePixelValue],n=a?r.find(t=>String(t.attributes[a.name])===s):null;if(n)for(const i in n.attributes)if(n.attributes.hasOwnProperty(i)){t[c+i]=n.attributes[i]}}const n=r?.dataType;"vector-magdir"!==n&&"vector-uv"!==n||(t[p.magnitude]=f?.[0],t[p.direction]=f?.[1]);const{multidimensionalDefinition:l}=this.layer.normalizeRasterFetchOptions({timeExtent:this.timeExtent});u(a.rasterFields,t,l);const{graphicOrigin:y}=a,g=new e({geometry:this.fullExtent?.clone(),attributes:t,layer:a,origin:y,sourceLayer:a});o.push(g)}return o}highlight(t,e){return i()}async getSourceScale(){return await this.layer.load(),o(this.layer.serviceRasterInfo,this.view.spatialReference)}_getFullExtent(){return l(this.layer.serviceRasterInfo,this.view.spatialReference)}}t([a()],h.prototype,"fullExtent",null),t([a()],h.prototype,"layer",void 0),t([a({readOnly:!0})],h.prototype,"timeExtent",null),t([a()],h.prototype,"tileInfo",void 0),t([a({readOnly:!0})],h.prototype,"hasTilingEffects",null),t([a()],h.prototype,"datumTransformation",null);export{h 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{destroyMaybe as r}from"../../core/maybe.js";import{throwIfAborted as o}from"../../core/promiseUtils.js";import{property as s,subclass as i}from"../../core/accessorSupport/decorators.js";import{ExportWMSImageParameters as a}from"../../layers/support/ExportWMSImageParameters.js";import{combineTimeExtent as p}from"../../layers/support/timeSupport.js";const m=m=>{const n=m;let h=class extends n{initialize(){this.exportImageParameters=new a({layer:this.layer})}destroy(){this.exportImageParameters=r(this.exportImageParameters)}get exportImageVersion(){return this.exportImageParameters?.commitProperty("version"),this.commitProperty("timeExtent"),(this._get("exportImageVersion")||0)+1}get timeExtent(){return p(this.layer,this.view?.timeExtent,this._get("timeExtent"))}async
|
|
2
|
+
import{__decorate as e}from"tslib";import t from"../../core/Error.js";import{destroyMaybe as r}from"../../core/maybe.js";import{throwIfAborted as o}from"../../core/promiseUtils.js";import{property as s,subclass as i}from"../../core/accessorSupport/decorators.js";import{ExportWMSImageParameters as a}from"../../layers/support/ExportWMSImageParameters.js";import{combineTimeExtent as p}from"../../layers/support/timeSupport.js";const m=m=>{const n=m;let h=class extends n{initialize(){this.exportImageParameters=new a({layer:this.layer})}destroy(){this.exportImageParameters=r(this.exportImageParameters)}get exportImageVersion(){return this.exportImageParameters?.commitProperty("version"),this.commitProperty("timeExtent"),(this._get("exportImageVersion")||0)+1}get timeExtent(){return p(this.layer,this.view?.timeExtent,this._get("timeExtent"))}async fetchPopupFeaturesAtTarget(e,r){const{layer:s}=this;if(!e)throw new t("wmslayerview:fetchPopupFeatures","Nothing to fetch without geometry",{layer:s});const{popupEnabled:i}=s;if(!i)throw new t("wmslayerview:fetchPopupFeatures","popupEnabled should be true",{popupEnabled:i});const a=this.createFetchPopupFeaturesQuery(e);if(!a)return[];const{extent:p,width:m,height:n,x:h,y:u}=a;if(!(p&&m&&n))throw new t("wmslayerview:fetchPopupFeatures","WMSLayer does not support fetching features.",{extent:p,width:m,height:n});const y=await s.fetchFeatureInfo(p,m,n,h,u);return o(r),y}};return e([s()],h.prototype,"exportImageParameters",void 0),e([s({readOnly:!0})],h.prototype,"exportImageVersion",null),e([s()],h.prototype,"layer",void 0),e([s({readOnly:!0})],h.prototype,"timeExtent",null),h=e([i("esri.views.layers.WMSLayerView")],h),h};export{m as WMSLayerView};
|
|
@@ -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"../../../Color.js";import r from"../../../core/Accessor.js";import{isSome as i}from"../../../core/arrayUtils.js";import s from"../../../core/Error.js";import has from"../../../core/has.js";import{getOrCreateMapValue as o}from"../../../core/MapUtils.js";import{debounce as a,throwIfAborted as l,ignoreAbortErrors as n}from"../../../core/promiseUtils.js";import{on as p}from"../../../core/reactiveUtils.js";import{sqlAnd as u}from"../../../core/sql.js";import{getMetersPerUnitForSR as c}from"../../../core/units.js";import{property as h,subclass as y}from"../../../core/accessorSupport/decorators.js";import d from"../../../geometry/Extent.js";import{getResolutionForScale as m}from"../../../geometry/support/scaleUtils.js";import{collectFields as f}from"../../../layers/support/fieldUtils.js";import{getLayerFloorFilterClause as g}from"../../../layers/support/floorFilterUtils.js";import{calculateTolerance as b}from"../../../renderers/support/clickToleranceUtils.js";import{identify as w}from"../../../rest/identify.js";import v from"../../../rest/support/IdentifyParameters.js";import{loadArcade as x}from"../../../support/loadArcade.js";import _ from"../../../symbols/SimpleMarkerSymbol.js";import{getRequiredFields as F,getFetchPopupTemplate as G}from"./popupUtils.js";let S=null;function j(e,t){return"tile"===t.type||"map-image"===t.type}let P=class extends r{constructor(e){super(e),this._featuresResolutions=new WeakMap,this.highlightGraphics=null,this.highlightGraphicUpdated=null,this.updateHighlightedFeatures=a(async e=>{this.destroyed||await this.updatingHandles.consumePromise(this._updateHighlightedFeaturesGeometries(e))})}initialize(){const e=e=>{for(const t of e){const{sourceLayer:e}=t;null!=e&&"geometryType"in e&&"point"===e.geometryType&&t.visible&&(t.visible=!1,this.highlightGraphicUpdated?.({graphic:t,property:"visible",oldValue:!0,newValue:!1}))}this.updatingHandles.consumePromise(this._updateHighlightedFeaturesSymbols(e)),n(this.updateHighlightedFeatures(this._highlightGeometriesResolution))};this.addHandles([p(()=>this.highlightGraphics,"change",t=>e(t.added),{onListenerAdd:t=>e(t)})])}async
|
|
2
|
+
import{__decorate as e}from"tslib";import t from"../../../Color.js";import r from"../../../core/Accessor.js";import{isSome as i}from"../../../core/arrayUtils.js";import s from"../../../core/Error.js";import has from"../../../core/has.js";import{getOrCreateMapValue as o}from"../../../core/MapUtils.js";import{debounce as a,throwIfAborted as l,ignoreAbortErrors as n}from"../../../core/promiseUtils.js";import{on as p}from"../../../core/reactiveUtils.js";import{sqlAnd as u}from"../../../core/sql.js";import{getMetersPerUnitForSR as c}from"../../../core/units.js";import{property as h,subclass as y}from"../../../core/accessorSupport/decorators.js";import d from"../../../geometry/Extent.js";import{getResolutionForScale as m}from"../../../geometry/support/scaleUtils.js";import{collectFields as f}from"../../../layers/support/fieldUtils.js";import{getLayerFloorFilterClause as g}from"../../../layers/support/floorFilterUtils.js";import{calculateTolerance as b}from"../../../renderers/support/clickToleranceUtils.js";import{identify as w}from"../../../rest/identify.js";import v from"../../../rest/support/IdentifyParameters.js";import{loadArcade as x}from"../../../support/loadArcade.js";import _ from"../../../symbols/SimpleMarkerSymbol.js";import{getRequiredFields as F,getFetchPopupTemplate as G}from"./popupUtils.js";let S=null;function j(e,t){return"tile"===t.type||"map-image"===t.type}let P=class extends r{constructor(e){super(e),this._featuresResolutions=new WeakMap,this.highlightGraphics=null,this.highlightGraphicUpdated=null,this.updateHighlightedFeatures=a(async e=>{this.destroyed||await this.updatingHandles.consumePromise(this._updateHighlightedFeaturesGeometries(e))})}initialize(){const e=e=>{for(const t of e){const{sourceLayer:e}=t;null!=e&&"geometryType"in e&&"point"===e.geometryType&&t.visible&&(t.visible=!1,this.highlightGraphicUpdated?.({graphic:t,property:"visible",oldValue:!0,newValue:!1}))}this.updatingHandles.consumePromise(this._updateHighlightedFeaturesSymbols(e)),n(this.updateHighlightedFeatures(this._highlightGeometriesResolution))};this.addHandles([p(()=>this.highlightGraphics,"change",t=>e(t.added),{onListenerAdd:t=>e(t)})])}async fetchPopupFeaturesAtTarget(e,t){const{layerView:{layer:r,view:{scale:i}}}=this;if(!e)throw new s("fetchPopupFeatures:invalid-geometry","Nothing to fetch without geometry",{layer:r});const o=V(r.sublayers,i,t);if(!o.length)return[];const a=await R(r,o);if(!((r.capabilities?.operations?.supportsIdentify??!0)&&r.version>=10.5)&&!a)throw new s("fetchPopupFeatures:not-supported","query operation is disabled for this service",{layer:r});return a?this._fetchPopupFeaturesUsingQueries(e,o,t):this._fetchPopupFeaturesUsingIdentify(e,o,t)}clearHighlights(){this.highlightGraphics?.removeAll()}async _updateHighlightedFeaturesSymbols(e){for(const t of e)this._updateSymbology(t)}_updateSymbology(e){if("point"===e.geometry?.type)return this._updatePointSymbology(e)}_setGraphicSymbol(e,t){if(!t)return;const r=e.symbol;e.symbol=t,this.highlightGraphicUpdated?.({graphic:e,property:"symbol",oldValue:r,newValue:t})}_updatePointSymbology(e){const r=e.sourceLayer&&"renderer"in e.sourceLayer&&e.sourceLayer.renderer,{highlightGraphicUpdated:i,highlightGraphics:s,layerView:{view:o}}=this,a=e=>{e.visible||(e.visible=!0,i?.({graphic:e,property:"visible",oldValue:!1,newValue:!0}))};r&&"getSymbolAsync"in r?r.getSymbolAsync(e).then(async i=>{i||=new _;let l=null;const n="visualVariables"in r?r.visualVariables?.find(e=>"size"===e.type):void 0;n&&(S||(S=(await import("../../../renderers/visualVariables/support/visualVariableUtils.js")).getSize),l=S(n,e,{view:o.type,scale:o.scale,shape:"simple-marker"===i.type?i.style:null})),l||="width"in i&&"height"in i&&null!=i.width&&null!=i.height?Math.max(i.width,i.height):"size"in i?i.size:16,s?.includes(e)&&(this._setGraphicSymbol(e,new _({style:"square",size:l,color:new t([255,255,255,1/255]),xoffset:"xoffset"in i?i.xoffset:0,yoffset:"yoffset"in i?i.yoffset:0})),a(e))}):a(e)}get _updateContext(){const{layerView:{layer:e},highlightGraphics:t,highlightGraphicUpdated:r}=this;return r&&t?.length&&e.capabilities.operations.supportsQuery?{highlightGraphicUpdated:r,highlightGraphics:t}:null}get highlightFeaturesActive(){return!!this._updateContext}async _updateHighlightedFeaturesGeometries(e){this._highlightGeometriesResolution=e;const t=this._updateContext;if(!t)return;const r=this._getTargetResolution(e),i=new Map,{highlightGraphics:s,highlightGraphicUpdated:a}=t;for(const u of s)if(!this._featuresResolutions.has(u)||this._featuresResolutions.get(u)>r){const e=u.sourceLayer;o(i,e,()=>new Map).set(u.getObjectId(),u)}const{layerView:{view:l}}=this,n=Array.from(i,([e,t])=>{const i=e.createQuery();return i.objectIds=[...t.keys()],i.outFields=[e.objectIdField],i.returnGeometry=!0,i.maxAllowableOffset=r,i.outSpatialReference=l.spatialReference,e.queryFeatures(i)}),p=await Promise.all(n);if(!this.destroyed)for(const{features:o}of p)for(const e of o){const t=e.sourceLayer,o=i.get(t).get(e.getObjectId());if(o&&s.includes(o)){const t=o.geometry;o.geometry=e.geometry,a({graphic:o,property:"geometry",oldValue:t,newValue:o.geometry}),this._featuresResolutions.set(o,r)}}}_getTargetResolution(e){const t=e*c(this.layerView.view.spatialReference),r=t/16;return r<=10?0:e/t*r}async _fetchPopupFeaturesUsingIdentify(e,t,r){const i=await this._createIdentifyParameters(e,t,r);if(null==i)return[];const{results:s}=await w(this.layerView.layer.parsedUrl,i,r);return s.map(e=>e.feature)}async _createIdentifyParameters(e,t,r){const{floors:i,layer:s,timeExtent:o,view:{spatialReference:a,scale:l}}=this.layerView;if(!t.length)return null;await Promise.all(t.map(({sublayer:e})=>e.load(r).catch(()=>{})));const n=Math.min(has("mapservice-popup-identify-max-tolerance"),s.allSublayers.reduce((e,t)=>t.renderer?b({renderer:t.renderer,pointerType:r?.pointerType}):e,2)),p=this.createFetchPopupFeaturesQueryGeometry(e,n),u=m(l,a),c=Math.round(p.width/u),h=new d({xmin:p.center.x-u*c,ymin:p.center.y-u*c,xmax:p.center.x+u*c,ymax:p.center.y+u*c,spatialReference:p.spatialReference});return new v({floors:i,gdbVersion:"gdbVersion"in s?s.gdbVersion:void 0,geometry:e,height:c,layerOption:"popup",mapExtent:h,returnGeometry:!0,spatialReference:a,sublayers:s.sublayers,timeExtent:o,tolerance:n,width:c})}async _fetchPopupFeaturesUsingQueries(e,t,r){const{layerView:{floors:s,timeExtent:o}}=this,a=t.map(async({sublayer:t,popupTemplate:i})=>{if(await t.load(r).catch(()=>{}),t.capabilities&&!t.capabilities.operations.supportsQuery)return[];const a=t.createQuery(),n=b({renderer:t.renderer,pointerType:r?.pointerType}),p=this.createFetchPopupFeaturesQueryGeometry(e,n),c=new Set,[h]=await Promise.all([F(t,i),t.renderer?.collectRequiredFields(c,t.fieldsIndex)]);l(r),f(c,t.fieldsIndex,h);const y=Array.from(c).sort();a.geometry=p,a.outFields=y,a.timeExtent=o;const d=g(s,t);if(a.where=u(a.where,d),t.capabilities?.query.supportsOrderBy&&t.orderBy?.[0]){const e=t.orderBy[0],r=!e.valueExpression&&e.field,i="ascending"===e.order?"asc":"desc";r&&(a.orderByFields=[`${r} ${i}`])}const m=this._getTargetResolution(p.width/n),w=await U(i);l(r);const v="point"===t.geometryType||w&&w.arcadeUtils.hasGeometryOperations(i);v||(a.maxAllowableOffset=m);let{features:x}=await t.queryFeatures(a,r);const _=v?0:m;x=await A(t,x,r);for(const e of x)this._featuresResolutions.set(e,_);return x});return(await Promise.allSettled(a)).reduce((e,t)=>"fulfilled"===t.status?[...e,...t.value]:e,[]).filter(i)}};function V(e,t,r){const i=[];if(!e)return i;const s=e=>{const o=0===e.minScale||t<=e.minScale,a=0===e.maxScale||t>=e.maxScale;if(e.visible&&o&&a)if(e.sublayers)e.sublayers.forEach(s);else if(e.popupEnabled){const t=G(e,{...r,defaultPopupTemplateEnabled:!1});null!=t&&i.unshift({sublayer:e,popupTemplate:t})}};return e.map(s),i}function U(e){return e.expressionInfos?.length||Array.isArray(e.content)&&e.content.some(e=>"expression"===e.type)?x():Promise.resolve()}async function R(e,t){if(e.capabilities?.operations?.supportsQuery)return!0;try{return await Promise.any(t.map(({sublayer:e})=>e.load().then(()=>e.capabilities.operations.supportsQuery)))}catch{return!1}}async function A(e,t,r){const i=e.renderer;return i&&"defaultSymbol"in i&&!i.defaultSymbol&&(t=i.valueExpression?await Promise.all(t.map(e=>i.getSymbolAsync(e,r).then(t=>t?e:null))).then(e=>e.filter(e=>null!=e)):t.filter(e=>null!=i.getSymbol(e))),t}e([h({constructOnly:!0})],P.prototype,"createFetchPopupFeaturesQueryGeometry",void 0),e([h({constructOnly:!0})],P.prototype,"layerView",void 0),e([h({constructOnly:!0})],P.prototype,"highlightGraphics",void 0),e([h({constructOnly:!0})],P.prototype,"highlightGraphicUpdated",void 0),e([h({constructOnly:!0})],P.prototype,"updatingHandles",void 0),e([h()],P.prototype,"_updateContext",null),P=e([y("esri.views.layers.support.MapServiceLayerViewHelper")],P);export{P as MapServiceLayerViewHelper,V as collectPopupProviders,j as isMapServiceLayerView};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
function _(_,E){if(E.compressedTextureETC)return null;const R=_.getExtension("WEBGL_compressed_texture_etc");return R?{COMPRESSED_R11_EAC:R.COMPRESSED_R11_EAC,COMPRESSED_SIGNED_R11_EAC:R.COMPRESSED_SIGNED_R11_EAC,COMPRESSED_RG11_EAC:R.COMPRESSED_RG11_EAC,COMPRESSED_SIGNED_RG11_EAC:R.COMPRESSED_SIGNED_RG11_EAC,COMPRESSED_RGB8_ETC2:R.COMPRESSED_RGB8_ETC2,COMPRESSED_SRGB8_ETC2:R.COMPRESSED_SRGB8_ETC2,COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:R.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2,COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:R.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2,COMPRESSED_RGBA8_ETC2_EAC:R.COMPRESSED_RGBA8_ETC2_EAC,COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:R.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC}:null}function E(_,E){if(E.compressedTextureS3TC)return null;const R=_.getExtension("WEBGL_compressed_texture_s3tc");return R?{COMPRESSED_RGB_S3TC_DXT1:R.COMPRESSED_RGB_S3TC_DXT1_EXT,COMPRESSED_RGBA_S3TC_DXT1:R.COMPRESSED_RGBA_S3TC_DXT1_EXT,COMPRESSED_RGBA_S3TC_DXT3:R.COMPRESSED_RGBA_S3TC_DXT3_EXT,COMPRESSED_RGBA_S3TC_DXT5:R.COMPRESSED_RGBA_S3TC_DXT5_EXT}:null}function R(_,E){
|
|
2
|
+
function _(_,E){if(E.compressedTextureETC)return null;const R=_.getExtension("WEBGL_compressed_texture_etc");return R?{COMPRESSED_R11_EAC:R.COMPRESSED_R11_EAC,COMPRESSED_SIGNED_R11_EAC:R.COMPRESSED_SIGNED_R11_EAC,COMPRESSED_RG11_EAC:R.COMPRESSED_RG11_EAC,COMPRESSED_SIGNED_RG11_EAC:R.COMPRESSED_SIGNED_RG11_EAC,COMPRESSED_RGB8_ETC2:R.COMPRESSED_RGB8_ETC2,COMPRESSED_SRGB8_ETC2:R.COMPRESSED_SRGB8_ETC2,COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:R.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2,COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:R.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2,COMPRESSED_RGBA8_ETC2_EAC:R.COMPRESSED_RGBA8_ETC2_EAC,COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:R.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC}:null}function E(_,E){if(E.compressedTextureS3TC)return null;const R=_.getExtension("WEBGL_compressed_texture_s3tc");return R?{COMPRESSED_RGB_S3TC_DXT1:R.COMPRESSED_RGB_S3TC_DXT1_EXT,COMPRESSED_RGBA_S3TC_DXT1:R.COMPRESSED_RGBA_S3TC_DXT1_EXT,COMPRESSED_RGBA_S3TC_DXT3:R.COMPRESSED_RGBA_S3TC_DXT3_EXT,COMPRESSED_RGBA_S3TC_DXT5:R.COMPRESSED_RGBA_S3TC_DXT5_EXT}:null}function R(_,E){return E.drawBuffersIndexed?null:_.getExtension("OES_draw_buffers_indexed")}function t(_,E){if(E.textureFilterAnisotropic)return null;const R=_.getExtension("EXT_texture_filter_anisotropic")||_.getExtension("MOZ_EXT_texture_filter_anisotropic")||_.getExtension("WEBKIT_EXT_texture_filter_anisotropic");return R?{MAX_TEXTURE_MAX_ANISOTROPY:R.MAX_TEXTURE_MAX_ANISOTROPY_EXT,TEXTURE_MAX_ANISOTROPY:R.TEXTURE_MAX_ANISOTROPY_EXT}:null}function e(_,E){const R=!E.colorBufferHalfFloat&&_.getExtension("EXT_color_buffer_half_float")||!E.colorBufferFloat&&_.getExtension("EXT_color_buffer_float"),t=!E.colorBufferFloat&&_.getExtension("EXT_color_buffer_float"),e=!E.floatBlend&&!E.colorBufferFloat&&_.getExtension("EXT_float_blend");return R||t||e?{textureFloat:!!t,textureHalfFloat:!!R,floatBlend:!!e,R16F:_.R16F,RG16F:_.RG16F,RGBA16F:_.RGBA16F,R32F:_.R32F,RG32F:_.RG32F,RGBA32F:_.RGBA32F,R11F_G11F_B10F:_.R11F_G11F_B10F,RGB16F:_.RGB16F}:null}function S(_,E,R,t,e){if(t)return!0;if(E[R])return!1;for(const S of e)if(_.getExtension(S))return!0;return!1}function n(_,E){if(E.textureNorm16)return null;const R=_.getExtension("EXT_texture_norm16");return R?{R16:R.R16_EXT,RG16:R.RG16_EXT,RGB16:R.RGB16_EXT,RGBA16:R.RGBA16_EXT,R16_SNORM:R.R16_SNORM_EXT,RG16_SNORM:R.RG16_SNORM_EXT,RGB16_SNORM:R.RGB16_SNORM_EXT,RGBA16_SNORM:R.RGBA16_SNORM_EXT}:null}export{S as loadBooleanExtension,e as loadColorBufferFloat,_ as loadCompressedTextureETC,E as loadCompressedTextureS3TC,R as loadDrawBuffersIndexed,t as loadTextureFilterAnisotropicCapability,n as loadTextureNorm16};
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import type Graphic from "../../Graphic.js";
|
|
2
2
|
import type EsriMap from "../../Map.js";
|
|
3
3
|
import type Collection from "../../core/Collection.js";
|
|
4
|
+
import type UtilityNetworkAssociationType from "../../popup/support/UtilityNetworkAssociationType.js";
|
|
4
5
|
import type AttachmentInfo from "../../rest/query/support/AttachmentInfo.js";
|
|
5
6
|
import type AttachmentElementInput from "./inputs/AttachmentElementInput.js";
|
|
6
7
|
import type BatchFormInputs from "./inputs/BatchFormInputs.js";
|
|
7
8
|
import type FieldInput from "./inputs/FieldInput.js";
|
|
9
|
+
import type UtilityNetworkAssociationsElementInput from "./inputs/UtilityNetworkAssociationsElementInput.js";
|
|
8
10
|
import type { EventedAccessor } from "../../core/Evented.js";
|
|
9
11
|
import type { FieldValue } from "../../layers/support/fieldUtils.js";
|
|
10
12
|
import type { TimeZone } from "../../time/types.js";
|
|
11
|
-
import type { AttachmentsChangeEvent, AttributeFormSupportedLayerInfo, AttributeFormSupportedLayerUnion, BatchAttributeFormMode, BatchAttributeFormState, SelectedAttachmentIdentifier, SelectedAttachmentDetails, SubmitEvent, ValueChangeEvent } from "./types.js";
|
|
13
|
+
import type { AssociationsLayerUnion, AttachmentsChangeEvent, AttributeFormSupportedLayerInfo, AttributeFormSupportedLayerUnion, BatchAttributeFormMode, BatchAttributeFormState, SelectedAttachmentIdentifier, SelectedAttachmentDetails, SubmitEvent, ValueChangeEvent } from "./types.js";
|
|
12
14
|
import type { FormInput } from "./inputs/types.js";
|
|
13
15
|
import type { EditType } from "../support/forms/types.js";
|
|
14
16
|
|
|
@@ -302,6 +304,29 @@ export default class BatchAttributeFormViewModel extends EventedAccessor {
|
|
|
302
304
|
* @internal
|
|
303
305
|
*/
|
|
304
306
|
goHome(): Promise<void>;
|
|
307
|
+
/**
|
|
308
|
+
* Used to specify a specific input to view associated layers for.
|
|
309
|
+
* Related to the 'viewing-associated-layers' page.
|
|
310
|
+
*
|
|
311
|
+
* @param input - A reference to the input to display associated layers for.
|
|
312
|
+
* @internal
|
|
313
|
+
*/
|
|
314
|
+
setActiveAssociationsInput(input: UtilityNetworkAssociationsElementInput | null | undefined): void;
|
|
315
|
+
/**
|
|
316
|
+
* Used to specify a layer to view associated features for.
|
|
317
|
+
* Related to the 'viewing-associated-features' page.
|
|
318
|
+
*
|
|
319
|
+
* @param layer - A reference to a specific layer.
|
|
320
|
+
* @internal
|
|
321
|
+
*/
|
|
322
|
+
setActiveAssociationsLayer(layer: AssociationsLayerUnion | null | undefined): void;
|
|
323
|
+
/**
|
|
324
|
+
* Used to filter the types of associations displayed in the 'viewing-associated-layers' page.
|
|
325
|
+
*
|
|
326
|
+
* @param type - A reference to a specific type of association.
|
|
327
|
+
* @internal
|
|
328
|
+
*/
|
|
329
|
+
setActiveAssociationType(type: UtilityNetworkAssociationType | null | undefined): void;
|
|
305
330
|
/**
|
|
306
331
|
* @param value - Selected attachment identifier, or `null`/`undefined` to clear the selection.
|
|
307
332
|
* @internal
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{pushIfSome as t}from"../../core/arrayUtils.js";import{createTask as s}from"../../core/asyncUtils.js";import a from"../../core/Collection.js";import n from"../../core/Error.js";import{EventedAccessor as i}from"../../core/Evented.js";import r from"../../core/Logger.js";import{getOrCreateMapValue as o}from"../../core/MapUtils.js";import{abortMaybe as l,destroyMaybe as h}from"../../core/maybe.js";import{throwIfAborted as p,isAbortError as c}from"../../core/promiseUtils.js";import m from"../../core/ReactiveMap.js";import{on as u,sync as d,watch as f,syncAndInitial as g,whenOnce as y}from"../../core/reactiveUtils.js";import{property as v,subclass as A}from"../../core/accessorSupport/decorators.js";import{UpdatingHandles as _}from"../../core/support/UpdatingHandles.js";import F from"../../geometry/SpatialReference.js";import{getGraphicLayer as I}from"../../graphic/graphicOriginUtils.js";import{system as x}from"../../time/constants.js";import{getAttachmentKey as w}from"./attachmentUtils.js";import{createReactiveGraphic as E,isAttributeFormSupportedLayerWithAttachments as C,layerSupportsQueryAttachments as M,queryAttachmentsForElements as k}from"./batchAttributeFormUtils.js";import{ArcadeExecutorProvider as b}from"./expressions/ArcadeExecutorProvider.js";import{ExpressionsManager as T}from"./expressions/ExpressionsManager.js";import{ExpressionsModel as V}from"./expressions/ExpressionsModel.js";import j from"./inputs/BatchFormInputs.js";import{createBatchFormInputsFromBatchFormTemplate as H}from"./inputs/support/createBatchFormInputs.js";import{isGroupInput as L,isFieldInput as S}from"./inputs/support/inputUtils.js";import B from"./templates/BatchFormTemplate.js";import{getLayerContingentValuesMetaData as R}from"./templates/support/contingentValuesUtils.js";import{createBatchFormTemplate as G}from"./templates/support/createBatchFormTemplate.js";import{isExcludedFromSharedForm as U,isGroupElementTemplate as W}from"./templates/support/templateUtils.js";import{isEmptyValue as N}from"../support/forms/formUtils.js";function O(e,t){return e?.find(e=>e.layer===t)}let Z=class extends i{constructor(e){super(e),this._attachmentCache=new m,this.activeFeatureIndex=-1,this.disabled=!1,this.editType="NA",this.features=new a,this._hasAsyncArcadeExpressions=!1,this.maximumFeatureCount=2e3,this.maximumFeatureCountWithComplexForms=50,this.map=null,this.pageStack=[],this.readOnly=!1,this.spatialReference=null,this.submitHasBeenAttempted=!1,this.timeZone=null,this.userHasChangedValues=!1,this.layerInfos=null,this._arcadeExecutorProvider=new b,this._activeFormInputsByElementId=new Map,this._emptyForm=new j({inputs:[]}),this._emptyFormTemplate=new B({elements:[]}),this._featureFormMap=new Map,this._prepareTask=null,this._reactiveGraphicLookup=new m,this._updatingHandles=new _,this._layerTemplateMap=new m,this._layerContingentValuesMap=new m,this._workingFeatures=new a,this._expressionsManager=new T({arcadeContext:{editType:"NA",spatialReference:null,map:null,timeZone:x}}),this.sharedForm=this._emptyForm,this.sharedFormTemplate=this._emptyFormTemplate}initialize(){this.addHandles([u(()=>this.features,"after-changes",()=>{this.goHome(),this.notifyChange("layers"),this._prepare()},d),f(()=>[this.features,this.map,this.timeZone,this.editType],()=>this._prepare(),d),f(()=>this.activeForm,()=>{this.goHome(),this._activeFormInputsByElementId.clear(),this._syncAttachments()},d),f(()=>this.activeFeature,()=>{this.goHome(),this._syncAttachments()},d),f(()=>this.page,e=>{const t=[...this.pageStack];if(t.includes(e))for(;t.length&&t.at(-1)!==e;)t.pop();else t.push(e);this.pageStack=t},g)]),this._prepare()}destroy(){this._prepareTask=l(this._prepareTask),this._workingFeatures.destroyAll(),h(this._expressionsManager),this._updatingHandles.destroy(),this._reactiveGraphicLookup=new m,this._emptyForm.destroy(),this._emptyFormTemplate.destroy()}get activeFeature(){const e=this.activeFeatureIndex;return e<0?null:this.features.at(e)}get activeForm(){if("batch"===this.mode)return this.sharedForm;const e=this._workingFeatures.at(this.activeFeatureIndex);if(!e)return this._emptyForm;const t=this._featureFormMap.get(e);if(t)return t;const s=this._makeBatchFormInputsForFeature(e);return s!==this._emptyForm&&this._featureFormMap.set(e,s),s}get activeLayer(){const{activeFeature:e}=this;if(!e)return null;return I(e)??null}get calculating(){return this._expressionsManager.calculating}get expressionsManager(){return this._expressionsManager}get expressionEvaluationFailed(){return this._expressionsManager.expressionEvaluationFailed}get hasNonActiveInvalidFeatures(){if("batch"===this.mode)return!1;const{activeFeature:e}=this;return this.invalidFeatures.some(t=>t!==e)}get hasAsyncArcadeExpressions(){return this._hasAsyncArcadeExpressions}get hasTooManyFeatures(){return this._workingFeatures.length>this.maximumFeatureCount}get hasTooManyComplexFeatures(){return this._workingFeatures.length>this.maximumFeatureCountWithComplexForms&&this.hasAsyncArcadeExpressions}get invalidFeatures(){return this.sharedForm.invalidFeatures}get hasVisibleInputs(){return this.visibleInputs.length>0}get hasLayersWithContingentValues(){for(const e of this.layers){const t=this._layerContingentValuesMap.get(e);if(t&&t.size>0)return!0}return!1}get visibleInputs(){return this.activeForm.inputs.filter(e=>e.visible)}get noVisibleElementsReason(){if(this.hasVisibleInputs)return null;if(0===this.activeForm.inputs.length)return"noElements";const e=new Set;for(const t of this.activeForm.inputs)switch(t.visibilityCode){case"hidden:not-in-all-layers":case"hidden:no-domain-in-common":e.add("noElementsInCommon");break;case"hidden:field-definition":case"hidden:group-visibility-expression:all-features":case"hidden:visibility-expression:all-features":e.add("allElementsHidden");break;case"hidden:group-visibility-expression:some-features":case"hidden:visibility-expression:some-features":return"elementsHiddenInSome"}return e.has("allElementsHidden")?"allElementsHidden":"noElementsInCommon"}get page(){return this.selectedAttachmentAddElementId?"adding-attachments":this.selectedAttachment?"viewing-attachment-details":"default"}get status(){const e=this._prepareTask;return null==e?"not-loaded":e.finished?null!=e.error?"failed":"loaded":"loading"}get submittable(){return this.valid,!0}get updating(){return this._updatingHandles.updating||this.calculating}get valid(){return this.sharedForm.valid&&Array.from(this._featureFormMap.values()).every(e=>e.valid)}get layers(){const e=new Set;return this.features.forEach(t=>{const s=I(t);s&&e.add(s)}),Array.from(e)}get mode(){return this.activeFeatureIndex>-1?"single":"batch"}submit(){this.submitHasBeenAttempted=!0,this.emit("submit",{name:"submit",results:this._makeSubmitResults(),valid:this.valid})}get selectedAttachment(){return this._get("selectedAttachment")??null}set selectedAttachment(e){this._set("selectedAttachment",e),null!=e&&(this.selectedAttachmentAddElementId=null)}get selectedAttachmentAddElementId(){return this._get("selectedAttachmentAddElementId")??null}set selectedAttachmentAddElementId(e){this._set("selectedAttachmentAddElementId",e)}get selectedAttachmentAddInput(){const e=this.selectedAttachmentAddElementId,t=this.activeForm;return e&&t&&t.allAttachmentElementInputs.find(t=>t.template.elementId===e)||null}get selectedAttachmentDetails(){const e=this.selectedAttachment,t=this.activeForm;if(!e||!t)return null;const s=t.allAttachmentElementInputs.find(t=>t.template.elementId===e.elementId);if(!s)return null;const a=s.attachments.findIndex(t=>w(t)===e.attachmentKey);if(-1===a)return null;return{attachment:s.attachments[a],input:s}}findFieldInput(e){if(null==e)return;const t=this._activeFormInputsByElementId;if(t.has(e))return t.get(e);const s=this.activeForm.allFieldInputs.find(t=>t.template.elementId===e);return void 0!==s?(t.set(e,s),s):void 0}getFirstVisibleInvalidFieldInput(){if(this.hasVisibleInputs&&!this.activeForm.valid)for(const e of this.visibleInputs){if(L(e)){const t=e.inputs.find(e=>S(e)&&!e.valid);if(t)return{input:t,groupInput:e}}if(S(e)&&!e.valid)return{input:e}}}getFieldInputValue(e){return this.findFieldInput(e)?.value}getValues(e){const t=this._reactiveGraphicLookup.get(e);if(!t)throw new n("feature-not-found","The given feature is not present in the BatchAttributeForm");return{...t.attributes}}async goBack(){const{page:e}=this;"viewing-attachment-details"!==e?"adding-attachments"!==e||this.setSelectedAttachmentAddElementId(null):this.setSelectedAttachment(null)}async goHome(){this.setSelectedAttachment(null),this.setSelectedAttachmentAddElementId(null)}notifyGeometriesChanged(e){const t=[];for(const s of e){const e=this._reactiveGraphicLookup.get(s);e&&(t.push(e),e.geometry=s.geometry)}this._expressionsManager.runGeometryDependentExpressions(t)}async setFieldInputValue(e,t){const s=new Set(this.invalidFeatures);await e.setValueFromUser(t),this.userHasChangedValues=!0,this._trackValidityChange(s),this.emit("value-change",{features:e.features.toArray().map(e=>e.source),fieldName:e.fieldName,name:"value-change",value:t})}async setValue(e,t){const s=this.findFieldInput(e);if(null==s)throw new n("no-FieldInput-found",`Cannot set the value of FieldInput with ID: ${e} because none was found in the active form`);await this.setFieldInputValue(s,t)}async stageAddAttachments(e,t){if(0===t.length)return[];const s=this._findAttachmentInput(e);if(!s)return[];const a=await s.stageAddAttachments(t,this._expressionsManager.arcadeContext);return 0===a.length||(this.userHasChangedValues=!0,this._emitAttachmentsChange(s)),a}stageDeleteAttachment(e,t){const s=this._findAttachmentInput(e);if(!s)return;const a=this._findAttachment(s,t);a&&(s.stageDeleteAttachment(a),this.userHasChangedValues=!0,this._emitAttachmentsChange(s))}stageRenameAttachment(e,t,s){const a=this._findAttachmentInput(e);if(!a)return;const n=this._findAttachment(a,t);n&&0!==s.trim().length&&(a.stageRenameAttachment(n,s.trim()),this.userHasChangedValues=!0,this._emitAttachmentsChange(a))}async stageReplaceAttachment(e,t,s){const a=this._findAttachmentInput(e);if(!a)return;const n=this._findAttachment(a,t);n&&(await a.stageReplaceAttachment(n,s,this._expressionsManager.arcadeContext),this.userHasChangedValues=!0,this._emitAttachmentsChange(a))}clearAttachmentChanges(e){const t=this._findAttachmentInput(e);t&&(t.clearAttachmentChanges(),this._emitAttachmentsChange(t))}setSelectedAttachment(e){this.selectedAttachment=e??null}setSelectedAttachmentAddElementId(e){this.selectedAttachmentAddElementId=e??null}userChangesHaveMadeFeatureInvalid(e){return!!this._reactiveGraphicLookup.get(e)?.userChangesHaveMadeInvalid}async _trackValidityChange(e){await y(()=>!1===this.calculating);const t=this.invalidFeatures;for(const s of t)!1===e.has(s)&&this._reactiveGraphicLookup.has(s)&&(this._reactiveGraphicLookup.get(s).userChangesHaveMadeInvalid=!0)}validate(){return!1}_makeBatchFormInputsForFeature(e){const t=this._layerTemplateMap.get(e.layer);return t?H(t,{allFeatures:new a([e]),expressionsManager:this._expressionsManager,map:this.map}):this._emptyForm}_makeSubmitResults(){const e=new Map;for(const[s,a]of this._reactiveGraphicLookup){const n=[],i=[],r=this._featureFormMap.get(a)?.allAttachmentElementInputs??[];for(const e of r)t(n,e.toSubmitEdits()),e.valid||i.push(e.template.elementId);e.set(s,{feature:s,values:{...a.attributes},invalidFields:[],attachmentEdits:n,invalidAttachmentElementIds:i})}for(const t of this.sharedForm.allFieldInputs)for(const s of t.invalidFeatures)e.get(s)?.invalidFields.push(t.fieldName);return Array.from(e.values())}_findAttachmentInput(e){const t=this.activeForm.allAttachmentElementInputs.find(t=>t.template.elementId===e);return t||r.getLogger(this).error(`Attachment input not found for elementId '${e}'`),t}_findAttachment(e,t){const s=e.findAttachment(t);return s||r.getLogger(this).error(`Attachment '${t}' not found for attachment element '${e.template.elementId}'`),s}_makeAttachmentEdits(e){const s=[];for(const a of e.allAttachmentElementInputs)t(s,a.toSubmitEdits());return s}_emitAttachmentsChange(e){const t=e.single.feature;if(!t)return;const s=this._featureFormMap.get(t);this.emit("attachments-change",{name:"attachments-change",feature:t.source,attachmentEdits:this._makeAttachmentEdits(s??this.activeForm),valid:this.valid})}_prepare(){this._hasAsyncArcadeExpressions=!1,this._prepareTask=l(this._prepareTask),this._updateWorkingFeatures(),h(this._expressionsManager),this.userHasChangedValues=!1,this._expressionsManager=new T({arcadeContext:{editType:this.editType,spatialReference:this.spatialReference??F.WebMercator,map:this.map,timeZone:this.timeZone||"system"}});const{layers:e}=this;if(0===e.length)return;const t=s(async t=>{try{p(t);const s=new Map;for(const n of e){const e=await R(n);if(p(t),e){const t=e.fieldGroups.flatMap(e=>e.fields);this._layerContingentValuesMap.set(n,new Set(t))}else this._layerContingentValuesMap.set(n,new Set);const a=O(this.layerInfos,n),i=await G(n,{arcadeExecutorProvider:this._arcadeExecutorProvider,formTimeZone:this.timeZone},a?.formTemplate);p(t),this._layerTemplateMap.set(n,i);const r=i.getExpressionExecutorsForLayer(n);if(this._expressionsManager.layerExpressionsModelMap.set(n,new V({preserveFieldValuesWhenHidden:i.preserveFieldValuesWhenHidden,executorMap:r})),!this._hasAsyncArcadeExpressions)for(const t of r.keys()){const e=r.get(t);if(this._hasAsyncArcadeExpressions=!0===(e.editableExpression?.isAsync||e.requiredExpression?.isAsync||e.valueExpression?.isAsync||e.visibilityExpression?.isAsync),this._hasAsyncArcadeExpressions)break}for(const t of i.elements){if(U(t))continue;const e=t.clone();W(e)&&(e.elements=e.elements.filter(e=>!U(e)));const{elementId:a}=e;s.has(a)?s.get(a).foldIn(e):s.set(a,e)}}if(this.hasTooManyComplexFeatures)throw new n("too-many-features-with-complex-forms","There are too many features to load into the form with the configured complexity");if(this.hasTooManyFeatures)throw new n("too-many-features","There are too many features to load into the form.");const a=new B({elements:Array.from(s.values())});this.sharedFormTemplate=a,this.sharedForm=H(a,{allFeatures:this._workingFeatures,expressionsManager:this._expressionsManager,map:this.map}),await this._expressionsManager.runAllExpressions(this._workingFeatures.toArray())}catch(s){throw c(s)||r.getLogger(this).error("Failed preparing form",s),s}});this._updatingHandles.consumePromise(t.promise),this._prepareTask=t}_updateWorkingFeatures(){this._workingFeatures.destroyAll();for(const t of this._featureFormMap.values())t.destroy();this._featureFormMap.clear(),this._attachmentCache.clear();const{features:e}=this;if(this._reactiveGraphicLookup=new m,0!==e.length){this._workingFeatures.addMany(e.map(E));for(const e of this._workingFeatures)this._reactiveGraphicLookup.set(e.source,e)}}async _syncAttachments(){const{activeFeature:e,activeLayer:t,activeForm:s}=this;if(!(e&&s&&C(t)&&M(t)))return;const a=e.getObjectId();if(null==a)return;const n=this._attachmentCache.get(t),i=s.allAttachmentElementInputs;if(!i.length)return;let r;if(n){const e=n.get(a);e&&(r=e)}if(!r){r=await k(t,a,i);o(this._attachmentCache,t,()=>new m).set(a,r)}for(const o of i)o.applyFetchedAttachments(z(o,r))}};e([v()],Z.prototype,"_attachmentCache",void 0),e([v({readOnly:!0})],Z.prototype,"activeFeature",null),e([v()],Z.prototype,"activeFeatureIndex",void 0),e([v({readOnly:!0})],Z.prototype,"activeForm",null),e([v({readOnly:!0})],Z.prototype,"activeLayer",null),e([v()],Z.prototype,"disabled",void 0),e([v()],Z.prototype,"calculating",null),e([v()],Z.prototype,"editType",void 0),e([v()],Z.prototype,"features",void 0),e([v()],Z.prototype,"expressionEvaluationFailed",null),e([v()],Z.prototype,"hasNonActiveInvalidFeatures",null),e([v()],Z.prototype,"hasAsyncArcadeExpressions",null),e([v()],Z.prototype,"_hasAsyncArcadeExpressions",void 0),e([v()],Z.prototype,"invalidFeatures",null),e([v()],Z.prototype,"hasVisibleInputs",null),e([v()],Z.prototype,"hasLayersWithContingentValues",null),e([v()],Z.prototype,"maximumFeatureCount",void 0),e([v()],Z.prototype,"maximumFeatureCountWithComplexForms",void 0),e([v()],Z.prototype,"visibleInputs",null),e([v()],Z.prototype,"map",void 0),e([v()],Z.prototype,"noVisibleElementsReason",null),e([v()],Z.prototype,"page",null),e([v()],Z.prototype,"pageStack",void 0),e([v()],Z.prototype,"readOnly",void 0),e([v()],Z.prototype,"spatialReference",void 0),e([v()],Z.prototype,"submitHasBeenAttempted",void 0),e([v()],Z.prototype,"timeZone",void 0),e([v()],Z.prototype,"updating",null),e([v()],Z.prototype,"valid",null),e([v()],Z.prototype,"layers",null),e([v()],Z.prototype,"mode",null),e([v()],Z.prototype,"sharedForm",void 0),e([v()],Z.prototype,"sharedFormTemplate",void 0),e([v()],Z.prototype,"selectedAttachment",null),e([v()],Z.prototype,"selectedAttachmentAddElementId",null),e([v()],Z.prototype,"selectedAttachmentAddInput",null),e([v()],Z.prototype,"selectedAttachmentDetails",null),e([v()],Z.prototype,"userHasChangedValues",void 0),e([v()],Z.prototype,"layerInfos",void 0),e([v()],Z.prototype,"_arcadeExecutorProvider",void 0),e([v()],Z.prototype,"_prepareTask",void 0),e([v()],Z.prototype,"_reactiveGraphicLookup",void 0),e([v()],Z.prototype,"_layerTemplateMap",void 0),e([v()],Z.prototype,"_layerContingentValuesMap",void 0),e([v()],Z.prototype,"_workingFeatures",void 0),e([v()],Z.prototype,"_expressionsManager",void 0),Z=e([A("esri.widgets.BatchAttributeForm.BatchAttributeFormViewModel")],Z);const D=Z;function P(e){return null!=e&&e.trim().length>0}function $(e,t){const s=e.keywords;return P(s)&&s.toLowerCase()===t}function z(e,t){const s="attachment"===e.input?.type?e.input.attachmentAssociationType:"exact",a=e.attachmentKeyword;if("any"===s)return t;if("exactOrNone"===s){if(N(a))return t.filter(e=>!P(e.keywords));const e=a.toLowerCase();return t.filter(t=>!P(t.keywords)||$(t,e))}if(N(a))return t;const n=a.toLowerCase();return t.filter(e=>$(e,n))}export{D as default};
|
|
2
|
+
import{__decorate as t}from"tslib";import{pushIfSome as e}from"../../core/arrayUtils.js";import{createTask as s}from"../../core/asyncUtils.js";import i from"../../core/Collection.js";import a from"../../core/Error.js";import{EventedAccessor as n}from"../../core/Evented.js";import r from"../../core/Logger.js";import{getOrCreateMapValue as o}from"../../core/MapUtils.js";import{abortMaybe as l,destroyMaybe as h}from"../../core/maybe.js";import{throwIfAborted as c,isAbortError as p}from"../../core/promiseUtils.js";import u from"../../core/ReactiveMap.js";import{on as m,sync as d,watch as f,syncAndInitial as g,whenOnce as y}from"../../core/reactiveUtils.js";import{property as v,subclass as A}from"../../core/accessorSupport/decorators.js";import{UpdatingHandles as _}from"../../core/support/UpdatingHandles.js";import F from"../../geometry/SpatialReference.js";import{getGraphicLayer as I}from"../../graphic/graphicOriginUtils.js";import{system as x}from"../../time/constants.js";import{getAttachmentKey as w}from"./attachmentUtils.js";import{createReactiveGraphic as E,isAttributeFormSupportedLayerWithAttachments as C,layerSupportsQueryAttachments as M,queryAttachmentsForElements as k}from"./batchAttributeFormUtils.js";import{ArcadeExecutorProvider as b}from"./expressions/ArcadeExecutorProvider.js";import{ExpressionsManager as T}from"./expressions/ExpressionsManager.js";import{ExpressionsModel as V}from"./expressions/ExpressionsModel.js";import j from"./inputs/BatchFormInputs.js";import{createBatchFormInputsFromBatchFormTemplate as H}from"./inputs/support/createBatchFormInputs.js";import{isGroupInput as L,isFieldInput as S}from"./inputs/support/inputUtils.js";import B from"./templates/BatchFormTemplate.js";import{getLayerContingentValuesMetaData as R}from"./templates/support/contingentValuesUtils.js";import{createBatchFormTemplate as G}from"./templates/support/createBatchFormTemplate.js";import{isExcludedFromSharedForm as U,isGroupElementTemplate as W}from"./templates/support/templateUtils.js";import{isEmptyValue as N}from"../support/forms/formUtils.js";function O(t,e){return t?.find(t=>t.layer===e)}let Z=class extends n{constructor(t){super(t),this._attachmentCache=new u,this.activeFeatureIndex=-1,this.disabled=!1,this.editType="NA",this.features=new i,this._hasAsyncArcadeExpressions=!1,this.maximumFeatureCount=2e3,this.maximumFeatureCountWithComplexForms=50,this.map=null,this.pageStack=[],this.readOnly=!1,this.spatialReference=null,this.submitHasBeenAttempted=!1,this.timeZone=null,this.userHasChangedValues=!1,this.layerInfos=null,this._arcadeExecutorProvider=new b,this._activeAssociationsInput=null,this._activeFormInputsByElementId=new Map,this._emptyForm=new j({inputs:[]}),this._emptyFormTemplate=new B({elements:[]}),this._featureFormMap=new Map,this._prepareTask=null,this._reactiveGraphicLookup=new u,this._updatingHandles=new _,this._layerTemplateMap=new u,this._layerContingentValuesMap=new u,this._workingFeatures=new i,this._expressionsManager=new T({arcadeContext:{editType:"NA",spatialReference:null,map:null,timeZone:x}}),this.sharedForm=this._emptyForm,this.sharedFormTemplate=this._emptyFormTemplate}initialize(){this.addHandles([m(()=>this.features,"after-changes",()=>{this.goHome(),this.notifyChange("layers"),this._prepare()},d),f(()=>[this.features,this.map,this.timeZone,this.editType],()=>this._prepare(),d),f(()=>this.activeForm,()=>{this.goHome(),this._activeFormInputsByElementId.clear(),this._syncAttachments()},d),f(()=>this.activeFeature,()=>{this.goHome(),this._syncAttachments()},d),f(()=>this.page,t=>{const e=[...this.pageStack];if(e.includes(t))for(;e.length&&e.at(-1)!==t;)e.pop();else e.push(t);this.pageStack=e},g)]),this._prepare()}destroy(){this._prepareTask=l(this._prepareTask),this._workingFeatures.destroyAll(),h(this._expressionsManager),this._updatingHandles.destroy(),this._reactiveGraphicLookup=new u,this._emptyForm.destroy(),this._emptyFormTemplate.destroy()}get activeFeature(){const t=this.activeFeatureIndex;return t<0?null:this.features.at(t)}get activeForm(){if("batch"===this.mode)return this.sharedForm;const t=this._workingFeatures.at(this.activeFeatureIndex);if(!t)return this._emptyForm;const e=this._featureFormMap.get(t);if(e)return e;const s=this._makeBatchFormInputsForFeature(t);return s!==this._emptyForm&&this._featureFormMap.set(t,s),s}get activeLayer(){const{activeFeature:t}=this;if(!t)return null;return I(t)??null}get activeAssociationsInput(){return this._activeAssociationsInput}get calculating(){return this._expressionsManager.calculating}get expressionsManager(){return this._expressionsManager}get expressionEvaluationFailed(){return this._expressionsManager.expressionEvaluationFailed}get hasNonActiveInvalidFeatures(){if("batch"===this.mode)return!1;const{activeFeature:t}=this;return this.invalidFeatures.some(e=>e!==t)}get hasAsyncArcadeExpressions(){return this._hasAsyncArcadeExpressions}get hasTooManyFeatures(){return this._workingFeatures.length>this.maximumFeatureCount}get hasTooManyComplexFeatures(){return this._workingFeatures.length>this.maximumFeatureCountWithComplexForms&&this.hasAsyncArcadeExpressions}get invalidFeatures(){return this.sharedForm.invalidFeatures}get hasVisibleInputs(){return this.visibleInputs.length>0}get hasLayersWithContingentValues(){for(const t of this.layers){const e=this._layerContingentValuesMap.get(t);if(e&&e.size>0)return!0}return!1}get visibleInputs(){return this.activeForm.inputs.filter(t=>t.visible)}get noVisibleElementsReason(){if(this.hasVisibleInputs)return null;if(0===this.activeForm.inputs.length)return"noElements";const t=new Set;for(const e of this.activeForm.inputs)switch(e.visibilityCode){case"hidden:not-in-all-layers":case"hidden:no-domain-in-common":t.add("noElementsInCommon");break;case"hidden:field-definition":case"hidden:group-visibility-expression:all-features":case"hidden:visibility-expression:all-features":t.add("allElementsHidden");break;case"hidden:group-visibility-expression:some-features":case"hidden:visibility-expression:some-features":return"elementsHiddenInSome"}return t.has("allElementsHidden")?"allElementsHidden":"noElementsInCommon"}get page(){return this.selectedAttachmentAddElementId?"adding-attachments":this.selectedAttachment?"viewing-attachment-details":this.activeAssociationsInput?.associatedLayer?"viewing-associated-features":this.activeAssociationsInput?"viewing-associated-layers":"default"}get status(){const t=this._prepareTask;return null==t?"not-loaded":t.finished?null!=t.error?"failed":"loaded":"loading"}get submittable(){return this.valid,!0}get updating(){return this._updatingHandles.updating||this.calculating}get valid(){return this.sharedForm.valid&&Array.from(this._featureFormMap.values()).every(t=>t.valid)}get layers(){const t=new Set;return this.features.forEach(e=>{const s=I(e);s&&t.add(s)}),Array.from(t)}get mode(){return this.activeFeatureIndex>-1?"single":"batch"}submit(){this.submitHasBeenAttempted=!0,this.emit("submit",{name:"submit",results:this._makeSubmitResults(),valid:this.valid})}get selectedAttachment(){return this._get("selectedAttachment")??null}set selectedAttachment(t){this._set("selectedAttachment",t),null!=t&&(this.selectedAttachmentAddElementId=null)}get selectedAttachmentAddElementId(){return this._get("selectedAttachmentAddElementId")??null}set selectedAttachmentAddElementId(t){this._set("selectedAttachmentAddElementId",t)}get selectedAttachmentAddInput(){const t=this.selectedAttachmentAddElementId,e=this.activeForm;return t&&e&&e.allAttachmentElementInputs.find(e=>e.template.elementId===t)||null}get selectedAttachmentDetails(){const t=this.selectedAttachment,e=this.activeForm;if(!t||!e)return null;const s=e.allAttachmentElementInputs.find(e=>e.template.elementId===t.elementId);if(!s)return null;const i=s.attachments.findIndex(e=>w(e)===t.attachmentKey);if(-1===i)return null;return{attachment:s.attachments[i],input:s}}findFieldInput(t){if(null==t)return;const e=this._activeFormInputsByElementId;if(e.has(t))return e.get(t);const s=this.activeForm.allFieldInputs.find(e=>e.template.elementId===t);return void 0!==s?(e.set(t,s),s):void 0}getFirstVisibleInvalidFieldInput(){if(this.hasVisibleInputs&&!this.activeForm.valid)for(const t of this.visibleInputs){if(L(t)){const e=t.inputs.find(t=>S(t)&&!t.valid);if(e)return{input:e,groupInput:t}}if(S(t)&&!t.valid)return{input:t}}}getFieldInputValue(t){return this.findFieldInput(t)?.value}getValues(t){const e=this._reactiveGraphicLookup.get(t);if(!e)throw new a("feature-not-found","The given feature is not present in the BatchAttributeForm");return{...e.attributes}}async goBack(){const{page:t}=this;"viewing-attachment-details"!==t?"adding-attachments"!==t?"viewing-associated-features"!==t?"viewing-associated-layers"!==t||this.setActiveAssociationsInput(null):this.setActiveAssociationsLayer(null):this.setSelectedAttachmentAddElementId(null):this.setSelectedAttachment(null)}async goHome(){this.setSelectedAttachment(null),this.setActiveAssociationsLayer(null),this.setActiveAssociationsInput(null),this.setSelectedAttachmentAddElementId(null)}notifyGeometriesChanged(t){const e=[];for(const s of t){const t=this._reactiveGraphicLookup.get(s);t&&(e.push(t),t.geometry=s.geometry)}this._expressionsManager.runGeometryDependentExpressions(e)}async setFieldInputValue(t,e){const s=new Set(this.invalidFeatures);await t.setValueFromUser(e),this.userHasChangedValues=!0,this._trackValidityChange(s),this.emit("value-change",{features:t.features.toArray().map(t=>t.source),fieldName:t.fieldName,name:"value-change",value:e})}async setValue(t,e){const s=this.findFieldInput(t);if(null==s)throw new a("no-FieldInput-found",`Cannot set the value of FieldInput with ID: ${t} because none was found in the active form`);await this.setFieldInputValue(s,e)}async stageAddAttachments(t,e){if(0===e.length)return[];const s=this._findAttachmentInput(t);if(!s)return[];const i=await s.stageAddAttachments(e,this._expressionsManager.arcadeContext);return 0===i.length||(this.userHasChangedValues=!0,this._emitAttachmentsChange(s)),i}stageDeleteAttachment(t,e){const s=this._findAttachmentInput(t);if(!s)return;const i=this._findAttachment(s,e);i&&(s.stageDeleteAttachment(i),this.userHasChangedValues=!0,this._emitAttachmentsChange(s))}stageRenameAttachment(t,e,s){const i=this._findAttachmentInput(t);if(!i)return;const a=this._findAttachment(i,e);a&&0!==s.trim().length&&(i.stageRenameAttachment(a,s.trim()),this.userHasChangedValues=!0,this._emitAttachmentsChange(i))}async stageReplaceAttachment(t,e,s){const i=this._findAttachmentInput(t);if(!i)return;const a=this._findAttachment(i,e);a&&(await i.stageReplaceAttachment(a,s,this._expressionsManager.arcadeContext),this.userHasChangedValues=!0,this._emitAttachmentsChange(i))}clearAttachmentChanges(t){const e=this._findAttachmentInput(t);e&&(e.clearAttachmentChanges(),this._emitAttachmentsChange(e))}setActiveAssociationsInput(t){this._activeAssociationsInput=t}setActiveAssociationsLayer(t){this._activeAssociationsInput?.setAssociatedLayer(t)}setActiveAssociationType(t){this._activeAssociationsInput?.setActiveAssociationType(t)}setSelectedAttachment(t){this.selectedAttachment=t??null}setSelectedAttachmentAddElementId(t){this.selectedAttachmentAddElementId=t??null}userChangesHaveMadeFeatureInvalid(t){return!!this._reactiveGraphicLookup.get(t)?.userChangesHaveMadeInvalid}async _trackValidityChange(t){await y(()=>!1===this.calculating);const e=this.invalidFeatures;for(const s of e)!1===t.has(s)&&this._reactiveGraphicLookup.has(s)&&(this._reactiveGraphicLookup.get(s).userChangesHaveMadeInvalid=!0)}validate(){return!1}_makeBatchFormInputsForFeature(t){const e=this._layerTemplateMap.get(t.layer);return e?H(e,{allFeatures:new i([t]),expressionsManager:this._expressionsManager,map:this.map}):this._emptyForm}_makeSubmitResults(){const t=new Map;for(const[s,i]of this._reactiveGraphicLookup){const a=[],n=[],r=this._featureFormMap.get(i)?.allAttachmentElementInputs??[];for(const t of r)e(a,t.toSubmitEdits()),t.valid||n.push(t.template.elementId);t.set(s,{feature:s,values:{...i.attributes},invalidFields:[],attachmentEdits:a,invalidAttachmentElementIds:n})}for(const e of this.sharedForm.allFieldInputs)for(const s of e.invalidFeatures)t.get(s)?.invalidFields.push(e.fieldName);return Array.from(t.values())}_findAttachmentInput(t){const e=this.activeForm.allAttachmentElementInputs.find(e=>e.template.elementId===t);return e||r.getLogger(this).error(`Attachment input not found for elementId '${t}'`),e}_findAttachment(t,e){const s=t.findAttachment(e);return s||r.getLogger(this).error(`Attachment '${e}' not found for attachment element '${t.template.elementId}'`),s}_makeAttachmentEdits(t){const s=[];for(const i of t.allAttachmentElementInputs)e(s,i.toSubmitEdits());return s}_emitAttachmentsChange(t){const e=t.single.feature;if(!e)return;const s=this._featureFormMap.get(e);this.emit("attachments-change",{name:"attachments-change",feature:e.source,attachmentEdits:this._makeAttachmentEdits(s??this.activeForm),valid:this.valid})}_prepare(){this._hasAsyncArcadeExpressions=!1,this._prepareTask=l(this._prepareTask),this._updateWorkingFeatures(),h(this._expressionsManager),this.userHasChangedValues=!1,this._expressionsManager=new T({arcadeContext:{editType:this.editType,spatialReference:this.spatialReference??F.WebMercator,map:this.map,timeZone:this.timeZone||"system"}});const{layers:t}=this;if(0===t.length)return;const e=s(async e=>{try{c(e);const s=new Map;for(const a of t){const t=await R(a);if(c(e),t){const e=t.fieldGroups.flatMap(t=>t.fields);this._layerContingentValuesMap.set(a,new Set(e))}else this._layerContingentValuesMap.set(a,new Set);const i=O(this.layerInfos,a),n=await G(a,{arcadeExecutorProvider:this._arcadeExecutorProvider,formTimeZone:this.timeZone},i?.formTemplate);c(e),this._layerTemplateMap.set(a,n);const r=n.getExpressionExecutorsForLayer(a);if(this._expressionsManager.layerExpressionsModelMap.set(a,new V({preserveFieldValuesWhenHidden:n.preserveFieldValuesWhenHidden,executorMap:r})),!this._hasAsyncArcadeExpressions)for(const e of r.keys()){const t=r.get(e);if(this._hasAsyncArcadeExpressions=!0===(t.editableExpression?.isAsync||t.requiredExpression?.isAsync||t.valueExpression?.isAsync||t.visibilityExpression?.isAsync),this._hasAsyncArcadeExpressions)break}for(const e of n.elements){if(U(e))continue;const t=e.clone();W(t)&&(t.elements=t.elements.filter(t=>!U(t)));const{elementId:i}=t;s.has(i)?s.get(i).foldIn(t):s.set(i,t)}}if(this.hasTooManyComplexFeatures)throw new a("too-many-features-with-complex-forms","There are too many features to load into the form with the configured complexity");if(this.hasTooManyFeatures)throw new a("too-many-features","There are too many features to load into the form.");const i=new B({elements:Array.from(s.values())});this.sharedFormTemplate=i,this.sharedForm=H(i,{allFeatures:this._workingFeatures,expressionsManager:this._expressionsManager,map:this.map}),await this._expressionsManager.runAllExpressions(this._workingFeatures.toArray())}catch(s){throw p(s)||r.getLogger(this).error("Failed preparing form",s),s}});this._updatingHandles.consumePromise(e.promise),this._prepareTask=e}_updateWorkingFeatures(){this._workingFeatures.destroyAll();for(const e of this._featureFormMap.values())e.destroy();this._featureFormMap.clear(),this._attachmentCache.clear();const{features:t}=this;if(this._reactiveGraphicLookup=new u,0!==t.length){this._workingFeatures.addMany(t.map(E));for(const t of this._workingFeatures)this._reactiveGraphicLookup.set(t.source,t)}}async _syncAttachments(){const{activeFeature:t,activeLayer:e,activeForm:s}=this;if(!(t&&s&&C(e)&&M(e)))return;const i=t.getObjectId();if(null==i)return;const a=this._attachmentCache.get(e),n=s.allAttachmentElementInputs;if(!n.length)return;let r;if(a){const t=a.get(i);t&&(r=t)}if(!r){r=await k(e,i,n);o(this._attachmentCache,e,()=>new u).set(i,r)}for(const o of n)o.applyFetchedAttachments(z(o,r))}};t([v()],Z.prototype,"_attachmentCache",void 0),t([v({readOnly:!0})],Z.prototype,"activeFeature",null),t([v()],Z.prototype,"activeFeatureIndex",void 0),t([v({readOnly:!0})],Z.prototype,"activeForm",null),t([v({readOnly:!0})],Z.prototype,"activeLayer",null),t([v()],Z.prototype,"activeAssociationsInput",null),t([v()],Z.prototype,"disabled",void 0),t([v()],Z.prototype,"calculating",null),t([v()],Z.prototype,"editType",void 0),t([v()],Z.prototype,"features",void 0),t([v()],Z.prototype,"expressionEvaluationFailed",null),t([v()],Z.prototype,"hasNonActiveInvalidFeatures",null),t([v()],Z.prototype,"hasAsyncArcadeExpressions",null),t([v()],Z.prototype,"_hasAsyncArcadeExpressions",void 0),t([v()],Z.prototype,"invalidFeatures",null),t([v()],Z.prototype,"hasVisibleInputs",null),t([v()],Z.prototype,"hasLayersWithContingentValues",null),t([v()],Z.prototype,"maximumFeatureCount",void 0),t([v()],Z.prototype,"maximumFeatureCountWithComplexForms",void 0),t([v()],Z.prototype,"visibleInputs",null),t([v()],Z.prototype,"map",void 0),t([v()],Z.prototype,"noVisibleElementsReason",null),t([v()],Z.prototype,"page",null),t([v()],Z.prototype,"pageStack",void 0),t([v()],Z.prototype,"readOnly",void 0),t([v()],Z.prototype,"spatialReference",void 0),t([v()],Z.prototype,"submitHasBeenAttempted",void 0),t([v()],Z.prototype,"timeZone",void 0),t([v()],Z.prototype,"updating",null),t([v()],Z.prototype,"valid",null),t([v()],Z.prototype,"layers",null),t([v()],Z.prototype,"mode",null),t([v()],Z.prototype,"sharedForm",void 0),t([v()],Z.prototype,"sharedFormTemplate",void 0),t([v()],Z.prototype,"selectedAttachment",null),t([v()],Z.prototype,"selectedAttachmentAddElementId",null),t([v()],Z.prototype,"selectedAttachmentAddInput",null),t([v()],Z.prototype,"selectedAttachmentDetails",null),t([v()],Z.prototype,"userHasChangedValues",void 0),t([v()],Z.prototype,"layerInfos",void 0),t([v()],Z.prototype,"_arcadeExecutorProvider",void 0),t([v()],Z.prototype,"_activeAssociationsInput",void 0),t([v()],Z.prototype,"_prepareTask",void 0),t([v()],Z.prototype,"_reactiveGraphicLookup",void 0),t([v()],Z.prototype,"_layerTemplateMap",void 0),t([v()],Z.prototype,"_layerContingentValuesMap",void 0),t([v()],Z.prototype,"_workingFeatures",void 0),t([v()],Z.prototype,"_expressionsManager",void 0),Z=t([A("esri.widgets.BatchAttributeForm.BatchAttributeFormViewModel")],Z);const D=Z;function P(t){return null!=t&&t.trim().length>0}function $(t,e){const s=t.keywords;return P(s)&&s.toLowerCase()===e}function z(t,e){const s="attachment"===t.input?.type?t.input.attachmentAssociationType:"exact",i=t.attachmentKeyword;if("any"===s)return e;if("exactOrNone"===s){if(N(i))return e.filter(t=>!P(t.keywords));const t=i.toLowerCase();return e.filter(e=>!P(e.keywords)||$(e,t))}if(N(i))return e;const a=i.toLowerCase();return e.filter(t=>$(t,a))}export{D as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{substitute as e}from"../../intl.js";import t from"../../rest/support/AttachmentQuery.js";import{ReactiveGraphic as i}from"./ReactiveGraphic.js";import{isMultipleChoiceFieldInput as n}from"./inputs/support/inputUtils.js";import{getIntlOptionsForField as
|
|
2
|
+
import{substitute as e}from"../../intl.js";import t from"../../rest/support/AttachmentQuery.js";import{ReactiveGraphic as i}from"./ReactiveGraphic.js";import{isMultipleChoiceFieldInput as n}from"./inputs/support/inputUtils.js";import{getIntlOptionsForField as r}from"../support/dateUtils.js";import{isEmptyValue as o,getRangeErrorMessage as a,shouldUseScientificNotation as s,scientificNumberFormatOptions as l,numberFormatOptions as u}from"../support/forms/formUtils.js";const c=(e,t)=>null!=e&&e.input?.type===t;function d(e){return new i({source:e})}function p(t,i,o,c){const{dataType:d,minLength:p}=t,f=o?.validationErrors;if(!f||!i)return null;if("batch-attribute-form-validation::features-have-different-errors"===i)return f.invalidBatchFormType;if("input-validation-error::cannot-be-empty"===i)return f.cannotBeNull;if("domain-validation-error::value-out-of-range"===i||"numeric-range-validation-error::out-of-range"===i){const{field:i,range:n}=t,o={type:"date",intlOptions:{timeZone:"date"===i.type&&c?c:void 0,...r(i)}},p=a(n,f);return e(p,n,{format:{max:"date"===d?o:null!=n.max&&s(n.max)?l:u,min:"date"===d?o:null!=n.min&&s(n.min)?l:u}})}return"domain-validation-error::invalid-coded-value"===i?f.invalidCodedValue:"type-validation-error::invalid-type"===i?f.invalidType:"length-validation-error::too-short"===i?e(f.tooShort,{min:p}):"multiple-choice-validation-error::too-few-selected-choices"===i&&n(t)?e(f.tooFewSelectedChoices,{min:t.input.minimumChoices}):"multiple-choice-validation-error::too-many-selected-choices"===i&&n(t)?e(f.tooManySelectedChoices,{max:t.input.maximumChoices}):null}function f(e,t,i){const n=i?.validationErrors;if(!n)return null;let r=null;for(const o of e.invalidHiddenInputs)switch(o.effectiveVisibilityCode){case"hidden:visibility-expression:all-features":case"hidden:group-visibility-expression:all-features":case"hidden:field-definition":return"single"===t?n.nonVisibleError_changeValues:n.nonVisibleError_checkIndividualFeatures;case"hidden:no-domain-in-common":case"hidden:visibility-expression:some-features":case"hidden:group-visibility-expression:some-features":case"hidden:not-in-all-layers":r=n.nonVisibleError_checkIndividualFeatures;break;case"visible":continue;default:o.effectiveVisibilityCode}return r}function m(e){return null!=e&&"object"==typeof e&&"type"in e&&("feature"===e.type||"geojson"===e.type||"knowledge-graph-sublayer"===e.type||"oriented-imagery"===e.type||"scene"===e.type||"subtype-sublayer"===e.type)}function y(e){return!!m(e)||!!(null!=e&&"object"==typeof e&&"type"in e&&e.type&&"id"in e&&e.id&&"fields"in e&&e.fields&&"fieldsIndex"in e&&e.fieldsIndex&&"objectIdField"in e&&e.objectIdField&&"capabilities"in e&&"getField"in e&&e.getField)}function h(e){return y(e)&&"queryAttachments"in e}function v(e){return null!=e&&"object"==typeof e&&"type"in e&&("feature"===e.type||"subtype-sublayer"===e.type)}function b(e){if(!h(e))return!1;const t=e?.effectiveCapabilities??e?.capabilities;return!(!t?.data?.supportsAttachment||!t.operations.supportsQueryAttachments)}async function g(e,i,n){const r=new Set;let a=!1;for(const t of n){if("attachment"===t.input?.type&&("any"===t.input.attachmentAssociationType||"exactOrNone"===t.input.attachmentAssociationType)){a=!0;break}if(o(t.attachmentKeyword)){a=!0;break}r.add(t.attachmentKeyword)}const s=r.size&&!a?Array.from(r):void 0,l=new t({objectIds:[i],where:"1=1",returnMetadata:!0,keywords:s});e.capabilities?.query?.supportsCacheHint&&(l.cacheHint=!0);return(await e.queryAttachments(l))[i]??[]}function w(e,t,i,n){const r=e.get(t)?.get(i)??[];if(!n?.length)return r;const o=new Set(n.map(e=>e.toLowerCase()));return r.filter(e=>o.has(e.keywords.toLowerCase()))}export{d as createReactiveGraphic,w as getAttachmentsForKeywords,f as getHiddenFieldsValidationErrorMessage,p as getVisibleFieldInputValidationErrorMessage,v as isAssociationsLayerUnion,y as isAttributeFormSupportedLayer,m as isAttributeFormSupportedLayerUnion,h as isAttributeFormSupportedLayerWithAttachments,c as isElementTemplateWithInputType,b as layerSupportsQueryAttachments,g as queryAttachmentsForElements};
|
|
@@ -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/Accessor.js";import{property as l,subclass as i}from"../../../core/accessorSupport/decorators.js";import{
|
|
2
|
+
import{__decorate as t}from"tslib";import e from"../../../core/Accessor.js";import{property as l,subclass as i}from"../../../core/accessorSupport/decorators.js";import{deepFilterInputs as n,isFieldInput as s,isAttachmentElementInput as r,isEditableInput as p,isUtilityNetworkAssociationsElementInput as o}from"./support/inputUtils.js";let u=class extends e{constructor(t){super(t),this.inputs=[],this.template=null}get allFieldInputs(){return n(this.inputs,s)}get allAttachmentElementInputs(){return n(this.inputs,r)}get allEditableInputs(){return n(this.inputs,p)}get allUtilityNetworkAssociationsElementInputs(){return n(this.inputs,o)}get description(){return this.template?.description??null}get hasInvalidHiddenInputs(){return this.invalidHiddenInputs.length>0}get invalidFeatures(){return Array.from(new Set(this.allFieldInputs.flatMap(t=>t.invalidFeatures)))}get invalidHiddenInputs(){return this.allFieldInputs.filter(t=>!t.valid&&!t.effectiveVisible)}get title(){return this.template?.title??null}get valid(){return this.allEditableInputs.every(t=>t.valid)}};t([l()],u.prototype,"allFieldInputs",null),t([l()],u.prototype,"allAttachmentElementInputs",null),t([l()],u.prototype,"allEditableInputs",null),t([l()],u.prototype,"allUtilityNetworkAssociationsElementInputs",null),t([l()],u.prototype,"description",null),t([l()],u.prototype,"inputs",void 0),t([l()],u.prototype,"hasInvalidHiddenInputs",null),t([l()],u.prototype,"invalidFeatures",null),t([l()],u.prototype,"invalidHiddenInputs",null),t([l()],u.prototype,"template",void 0),t([l()],u.prototype,"title",null),t([l()],u.prototype,"valid",null),u=t([i("esri.widgets.BatchAttributeForm.inputs.BatchFormInputs")],u);const a=u;export{a as default};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type Graphic from "../../../Graphic.js";
|
|
2
2
|
import type Field from "../../../layers/support/Field.js";
|
|
3
|
-
import type BatchAttributeFormViewModel from "../BatchAttributeFormViewModel.js";
|
|
4
3
|
import type EditableInput from "./EditableInput.js";
|
|
5
4
|
import type GroupInput from "./GroupInput.js";
|
|
6
5
|
import type { Input } from "../../../form/elements/inputs.js";
|
|
@@ -23,13 +22,6 @@ export interface MultipleChoiceOtherChoiceRenderState {}
|
|
|
23
22
|
* @see [BatchFormInputs](https://developers.arcgis.com/javascript/latest/references/core/widgets/BatchAttributeForm/inputs/BatchFormInputs/)
|
|
24
23
|
*/
|
|
25
24
|
export default class FieldInput extends EditableInput<any> {
|
|
26
|
-
/**
|
|
27
|
-
* Clears stored inline other-choice state associated with a batch attribute form view model.
|
|
28
|
-
*
|
|
29
|
-
* @param viewModel - The view model whose inline other-choice state should be cleared.
|
|
30
|
-
* @param options - Additional options for clearing stored state. When `includeDraftValues` is `true`, clears stored draft values in addition to explicit checked state.
|
|
31
|
-
*/
|
|
32
|
-
static clearMultipleChoiceOtherChoiceStateForViewModel(viewModel: BatchAttributeFormViewModel | null, options?: { includeDraftValues?: boolean; }): void;
|
|
33
25
|
constructor(properties: FieldInputProperties);
|
|
34
26
|
/**
|
|
35
27
|
* The type of data displayed by the field input. Possible values are listed below.
|
|
@@ -78,6 +70,11 @@ export default class FieldInput extends EditableInput<any> {
|
|
|
78
70
|
get maxLength(): number;
|
|
79
71
|
/** The minimum length of the input. If no length is specified, the value is `-1`. */
|
|
80
72
|
get minLength(): number;
|
|
73
|
+
/** The checked state derived from the current other-choice values across all features. */
|
|
74
|
+
get multipleChoiceOtherChoiceCheckboxState(): {
|
|
75
|
+
checked: boolean;
|
|
76
|
+
indeterminate: boolean;
|
|
77
|
+
};
|
|
81
78
|
/** Indicates whether the field is required. This property will be true if it is required for any associated layers of the input. */
|
|
82
79
|
get required(): boolean;
|
|
83
80
|
/** The type of input. */
|
|
@@ -90,35 +87,12 @@ export default class FieldInput extends EditableInput<any> {
|
|
|
90
87
|
get userHasChangedValue(): boolean;
|
|
91
88
|
/** Indicates whether the field has any validation errors. Evaluates to `true` only if the value of this field is valid for all features. */
|
|
92
89
|
get valid(): boolean;
|
|
93
|
-
/**
|
|
94
|
-
* Indicates whether a stored inline other-choice draft value can be restored.
|
|
95
|
-
*
|
|
96
|
-
* @param value - The draft value to evaluate.
|
|
97
|
-
* @returns `true` if the value can be restored; otherwise, `false`.
|
|
98
|
-
*/
|
|
99
|
-
canRestoreMultipleChoiceOtherChoiceDraftValue(value: FieldValue | undefined): boolean;
|
|
100
90
|
/**
|
|
101
91
|
* Returns the explicit inline other-choice checked state, if one has been stored.
|
|
102
92
|
*
|
|
103
93
|
* @returns The explicit checked state, or `undefined` if the state has not been set.
|
|
104
94
|
*/
|
|
105
95
|
getExplicitMultipleChoiceOtherChoiceCheckedState(): boolean | undefined;
|
|
106
|
-
/**
|
|
107
|
-
* Returns the checked state derived from the current other-choice values across all features.
|
|
108
|
-
*
|
|
109
|
-
* @returns The checked and indeterminate state for the inline other-choice checkbox.
|
|
110
|
-
*/
|
|
111
|
-
getMultipleChoiceOtherChoiceCheckboxState(): {
|
|
112
|
-
checked: boolean;
|
|
113
|
-
indeterminate: boolean;
|
|
114
|
-
};
|
|
115
|
-
/**
|
|
116
|
-
* Returns the stored inline other-choice draft value for a feature, if present.
|
|
117
|
-
*
|
|
118
|
-
* @param feature - The feature whose draft other-choice value should be returned.
|
|
119
|
-
* @returns The stored draft value, or `undefined` if no draft value exists for the feature.
|
|
120
|
-
*/
|
|
121
|
-
getMultipleChoiceOtherChoiceDraftValue(feature: object): FieldValue | undefined;
|
|
122
96
|
/**
|
|
123
97
|
* Returns the current render state for inline multiple-choice "Other" controls.
|
|
124
98
|
*
|
|
@@ -140,22 +114,9 @@ export default class FieldInput extends EditableInput<any> {
|
|
|
140
114
|
* @param isChecked - Indicates whether the inline other-choice checkbox is checked.
|
|
141
115
|
*/
|
|
142
116
|
setExplicitMultipleChoiceOtherChoiceCheckedState(isChecked: boolean): void;
|
|
143
|
-
/**
|
|
144
|
-
* Stores inline other-choice draft values from the current other-choice field values on the provided features.
|
|
145
|
-
*
|
|
146
|
-
* @param features - The features from which to read current other-choice field values.
|
|
147
|
-
*/
|
|
148
|
-
setMultipleChoiceOtherChoiceDraftValuesFromFeatures(features: Pick<Graphic, "getAttribute">[]): void;
|
|
149
117
|
/**
|
|
150
118
|
* @param value
|
|
151
119
|
* @internal
|
|
152
120
|
*/
|
|
153
121
|
setValueFromUser(value: FieldValue): Promise<void>;
|
|
154
|
-
/**
|
|
155
|
-
* Stores the same inline other-choice draft value for the provided features.
|
|
156
|
-
*
|
|
157
|
-
* @param features - The features whose draft other-choice values should be updated.
|
|
158
|
-
* @param value - The draft value to store for each feature.
|
|
159
|
-
*/
|
|
160
|
-
stashMultipleChoiceOtherChoiceDraftValueForFeatures(features: object[], value: FieldValue): void;
|
|
161
122
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{isSome as t}from"../../../core/arrayUtils.js";import{property as i,subclass as l}from"../../../core/accessorSupport/decorators.js";import{isMultipleChoiceInput as r}from"../../../form/elements/inputs/inputUtils.js";import o from"../../../layers/support/CodedValue.js";import n from"../../../layers/support/CodedValueDomain.js";import{getDomainRange as s,dateTimeFieldValuesToNumericRange as a,isDomainValidForField as u}from"../../../layers/support/domainUtils.js";import{isNumericField as h,isStringField as p,isTimeOnlyField as c,getFieldRange as m,isDateOnlyField as d,isTimestampOffsetField as f}from"../../../layers/support/fieldUtils.js";import{supportsFieldConfiguration as C}from"../../../layers/support/layerUtils.js";import g from"../../../layers/support/RangeDomain.js";import{isAnyDateField as y}from"../../../smartMapping/support/utils.js";import{isNumber as b}from"../../../support/guards.js";import x from"./EditableInput.js";import{visibilityCodeToBoolean as v,differentValuesString as V,isFieldInputWithShowNoValueOptionInput as M}from"./support/inputUtils.js";import{isEmptyValue as _,getMaxLength as O,getMinLength as F,dateIsValid as S,validateFormValue as w}from"../../support/forms/formUtils.js";const E="esri_BatchAttributeForm_other_choice_checked",D=new WeakMap;let k=class extends x{constructor(e){super(e),this.group=null,this.type="field",this.userHasChangedValue=!1,this._hasIntersectionWithElementFieldDomain=!1}get compositeError(){if(this.valid)return null;const{errors:e}=this;if(e.length<this.features.length)return"batch-attribute-form-validation::features-have-different-errors";const t=e[0];for(const i of e)if(i.error!==t.error)return"batch-attribute-form-validation::features-have-different-errors";return t.error}get dataType(){const{field:e}=this;return h(e)?"number":p(e)?"text":y(e)||c(e)?"date":"unsupported"}get domain(){const e=this._allDomains.toArray();return this.calculateDomain(e)}get distinctValues(){if(this.featuresHaveSameValue)return[this.value];const e=new Set;for(const t of this.features)e.add(t.getAttribute(this.fieldName));return Array.from(e)}get editable(){return!!this.field.editable&&(this._evaluatedEditableExpression??!0)}get label(){const e=this.template;if(null!=e.label&&""!==e.label)return e.label;const{field:t,layers:i}=this;if(1===i.length){const e=i[0];if(C(e)){const i=e.getFieldAlias(t.name);if(null!=i&&""!==i)return i}}return t.alias||t.name}get effectiveVisible(){return v(this.effectiveVisibilityCode)}get effectiveVisibilityCode(){const{visibilityCode:e}=this;if("visible"!==e)return e;const{group:t}=this;if(null==t)return e;const i=t.visibilityCode;return"hidden:visibility-expression:all-features"===i?"hidden:group-visibility-expression:all-features":"hidden:visibility-expression:some-features"===i?"hidden:group-visibility-expression:some-features":e}get errors(){return this._validate()}get featuresHaveSameValue(){const{fieldName:e}=this,t=this.features.at(0)?.getAttribute(e);return this.features.every(i=>i.getAttribute(e)===t)}get field(){return this.template.field}get fieldName(){return this.field.name}get input(){return this.template.input}get multipleChoiceInput(){const{input:e}=this;return e&&r(e)?e:null}get multipleChoiceChoices(){const{multipleChoiceInput:e}=this;if(!e)return null;const t=[],i=new Set;for(const l of e.choices){const{value:e}=l;i.has(e)||(i.add(e),t.push(l))}return t}get multipleChoiceValues(){return this.multipleChoiceChoices?.map(e=>e.value)??null}get multipleChoiceOtherChoiceFieldName(){return this.multipleChoiceInput?.otherChoice?.fieldName??null}get multipleChoiceOtherChoiceHint(){return this.multipleChoiceInput?.otherChoice?.hint??""}get multipleChoiceOtherChoiceLabel(){return this.multipleChoiceInput?.otherChoice?.label??null}get hasMultipleChoiceOtherChoiceField(){const{multipleChoiceOtherChoiceFieldName:e}=this;return!!e&&this.layers.every(t=>null!=t.getField(e))}get shouldShowMultipleChoiceOtherChoice(){return null!=this.multipleChoiceInput?.otherChoice&&this.hasMultipleChoiceOtherChoiceField}set shouldShowMultipleChoiceOtherChoice(e){this._overrideIfSome("shouldShowMultipleChoiceOtherChoice",e)}get multipleChoiceOtherChoiceValue(){const{multipleChoiceOtherChoiceFieldName:e}=this;if(!e||!this.shouldShowMultipleChoiceOtherChoice)return null;const t=this.features.map(t=>t.getAttribute(e));if(0===t.length)return null;const[i]=t;return t.every(e=>e===i)?i:V}get multipleChoiceOtherChoiceMaxLength(){const{multipleChoiceOtherChoiceFieldName:e}=this;if(!e||!this.shouldShowMultipleChoiceOtherChoice)return;let t;for(const i of this.layers){const l=i.getField(e)?.length;null==l||l<0||(t=null==t?l:Math.min(t,l))}return t}getMultipleChoiceOtherChoiceRenderState(e){const t=this.multipleChoiceOtherChoiceFieldName??void 0,i=this.shouldShowMultipleChoiceOtherChoice,l=this.multipleChoiceOtherChoiceValue,r=i?this.getMultipleChoiceOtherChoiceCheckboxState():{checked:!1,indeterminate:!1},o=i?this.getExplicitMultipleChoiceOtherChoiceCheckedState():void 0,n=void 0===o?r:{checked:o,indeterminate:!1};return{fieldName:t,hint:this.multipleChoiceOtherChoiceHint,label:this.multipleChoiceOtherChoiceLabel??e,shouldShow:i,checkboxState:n,value:l,normalizedValue:l===E?"":l,maxLength:this.multipleChoiceOtherChoiceMaxLength}}getMultipleChoiceOtherChoiceCheckboxState(){const e=this.multipleChoiceOtherChoiceFieldName;if(!e)return{checked:!1,indeterminate:!1};const t=this.features.map(t=>t.getAttribute(e));return{checked:t.length>0&&t.every(e=>!_(e)),indeterminate:t.some(e=>!_(e))&&t.some(e=>_(e))}}initializeExplicitMultipleChoiceOtherChoiceCheckedState(){this.hasExplicitMultipleChoiceOtherChoiceCheckedState()||this.setExplicitMultipleChoiceOtherChoiceCheckedState(this.getMultipleChoiceOtherChoiceCheckboxState().checked)}hasExplicitMultipleChoiceOtherChoiceCheckedState(){return void 0!==this.getExplicitMultipleChoiceOtherChoiceCheckedState()}getExplicitMultipleChoiceOtherChoiceCheckedState(){const e=this._multipleChoiceOtherChoiceStateKey;if(e)return this._multipleChoiceOtherChoiceCheckedStateStore.get(e)}setExplicitMultipleChoiceOtherChoiceCheckedState(e){const t=this._multipleChoiceOtherChoiceStateKey;t&&this._multipleChoiceOtherChoiceCheckedStateStore.set(t,e)}stashMultipleChoiceOtherChoiceDraftValueForFeatures(e,t){const i=this._multipleChoiceOtherChoiceStateKey;if(i)for(const l of e)l.stashAttribute(i,t)}setMultipleChoiceOtherChoiceDraftValuesFromFeatures(e){const t=this._multipleChoiceOtherChoiceStateKey,i=this.multipleChoiceOtherChoiceFieldName;if(t&&i)for(const l of e)l.stashAttribute(t,l.getAttribute(i))}getMultipleChoiceOtherChoiceDraftValue(e){const t=this._multipleChoiceOtherChoiceStateKey;if(t)return e.getStashedAttribute(t)}canRestoreMultipleChoiceOtherChoiceDraftValue(e){return!(null==e||""===e||e===E||e===V)}static clearMultipleChoiceOtherChoiceStateForViewModel(e,t={}){const{includeDraftValues:i=!1}=t;if(!e)return;const l=new Set;for(const r of e.sharedForm.allFieldInputs)l.add(r.expressionsManager);for(const r of e.activeForm.allFieldInputs)l.add(r.expressionsManager);for(const r of l)D.get(r)?.clear();if(i){const t=new Set;for(const i of e.sharedForm.allFieldInputs)for(const e of i.features)t.add(e);for(const e of t)e.clearStashedAttributes()}}get invalidFeatures(){return this.errors.map(e=>e.feature)}get _multipleChoiceOtherChoiceStateKey(){const e=this.multipleChoiceOtherChoiceFieldName;return e?`${this.template.elementId}:${e}`:null}get _multipleChoiceOtherChoiceCheckedStateStore(){const e=this.expressionsManager;if(!e)return new Map;let t=D.get(e);return t||(t=new Map,D.set(e,t)),t}get isSubtypeField(){return this.layers.some(e=>{if(e&&"subtypeField"in e){const{subtypeField:t,fieldsIndex:i}=e;return(i.get(t)?.name??t)===this.fieldName}return!1})}get showNoValueOptionEnabled(){const{input:e}=this;return!this.required&&(!M(e)||!0===e?.showNoValueOption)}get showNoValueLabel(){const{input:e}=this;return M(e)?e?.noValueOptionLabel:null}get includeTime(){const{template:e,field:t}=this;return"date"===this.dataType&&("time-only"===t.type||"date-only"!==t.type&&("datetime-picker"!==e.input?.type||e.input.includeTime))}get includeTimeOffset(){if("timestamp-offset"!==this.field.type)return!1;const{input:e}=this;return!e||"timestampoffset-picker"===e.type&&e.includeTimeOffset}get maxLength(){return O({dataType:this.dataType,field:this.field,input:this.input})}get minLength(){return F({dataType:this.dataType,field:this.field,input:this.input})}get range(){if("date"===this.dataType)return this._dateRange;const{domain:e,field:t}=this;if(e){const i=s(t,e);return{max:i?.max,min:i?.min}}const i=this._allDomains.toArray().every(e=>!e)?m(t):null;return{max:i?.max===Number.MAX_VALUE?null:i?.max??null,min:i?.min===-Number.MAX_VALUE?null:i?.min??null}}get required(){if(!this.editable)return!1;if(!this.field.nullable||this.isSubtypeField)return!0;const e=this.visible&&!1!==this.group?.visible,t=this._evaluatedRequiredExpression;return!(!e||null==t)&&t}get submittable(){return(!this.required||!this.distinctValues.some(e=>_(e)))&&!!this.valid}get valid(){return 0===this.errors.length}get value(){return this.featuresHaveSameValue?this.features.at(0)?.getAttribute(this.fieldName)??null:V}get visibilityCode(){return this.field.visible?this._fieldShouldHaveDomain&&null==this.domain?"hidden:no-domain-in-common":this._baseVisibilityCode:"hidden:field-definition"}get codedValueDomainOptions(){return"coded-value"===this.domain?.type?this.domain.codedValues.map(({name:e,code:t})=>({name:e,value:t})):[]}get codedValueOptions(){const e=this.codedValueDomainOptions,{value:t}=this,i=null==t||t===V||e.some(e=>e.value===t)?[]:[{name:`${t}`,value:t}];return[e,i]}get _evaluatedRequiredExpression(){let e=!1,t=!0;const i=this.template;for(const l of this.features){if(null==i.getExpressionExecutorsForLayer(l.layer)?.requiredExpression)continue;t=!1;const r=this._lookupEvaluatedExpression(l,"required");"success"===r?.status?e=e||!0===r.result:e=!0}return t?null:e}get _allDomains(){const e=this.template.domain;return this.features.map(t=>{const i=t.layer.getFieldDomain(this.fieldName,{feature:t.plainGraphic});return"range"===i?.type||"range"===e?.type?i??this.template.domain:i})}get _fieldShouldHaveDomain(){return!!this._hasIntersectionWithElementFieldDomain||this._allDomains.some(t)}get _dateFormRange(){if("date"!==this.dataType)return{};const{input:e}=this;if(!e)return{};const{type:t}=e;let i={};if("date-picker"!==t&&"time-picker"!==t&&"timestampoffset-picker"!==t||(i=a(this.field,e.max,e.min)),"datetime-picker"===t){const{max:t,min:l}=e;i={max:null!=t&&S(t)?t.getTime():null,min:null!=l&&S(l)?l.getTime():null}}return{min:i.min,max:i.max,rawMax:i?.rawMax??null,rawMin:i?.rawMin??null}}get _dateRange(){const{_dateFormRange:e,template:t,field:i,domain:l}=this;if("date"!==this.dataType)return{};if(!l)return this._fieldShouldHaveDomain?{}:e;const r=s(i,l);if(!r)return e;const{max:o,min:n,rawMax:a,rawMin:u}=e,{type:h}=t.field;if("date"===h){const{max:e,min:t}=r;return{max:b(o)&&(null===e||null!=e&&o<=e)?o:e??null,min:b(n)&&(null===t||null!=t&&n>=t)?n:t??null}}if("date-only"===h||"time-only"===h||"timestamp-offset"===h){const{max:e,min:t,rawMax:i,rawMin:l}=r,s=b(o)&&a&&(null==e||o<e),h=b(n)&&u&&(null==t||n>t);return{max:s?o:e,min:h?n:t,rawMax:s?a:i,rawMin:h?u:l}}return{}}async setValueFromUser(e){this.userHasChangedValue=!0;const t=[],i=this.fieldName;for(const l of this.features)l.getAttribute(i)!==e&&t.push(l);this._setValue(e),await this.expressionsManager.valueChanged(i,t)}_setValue(e){const{fieldName:t}=this;for(const i of this.features)i.setAttribute(t,e)}_validate(){const{dataType:e,fieldName:t,maxLength:i,minLength:l,range:r}=this,o=[],{multipleChoiceInput:n}=this;for(const s of this.features){const{layer:a}=s,u=a.getField(t)??this.field,h=a.getFieldDomain(t,{feature:s.plainGraphic}),p=this.calculateDomain([h]),c=this._requiredForFeature(s),m=s.getAttribute(t),d=w(m,{dataType:e,domain:p,field:u,maxLength:i,minLength:l,multipleChoice:n,range:r,required:c});d&&o.push({error:d,feature:s.source})}return o}_editableForFeature(e){if(!this.field.editable)return!1;if(null==this.template.getExpressionExecutorsForLayer(e.layer)?.editableExpression)return!0;const t=this._lookupEvaluatedExpression(e,"editable");return"success"===t?.status&&!0===t.result}_effectiveVisibleFeature(e){if(this.group&&!this.group.visibleForFeature(e))return!1;if(null==this.template.getExpressionExecutorsForLayer(e.layer)?.visibilityExpression)return!0;const t=this._lookupEvaluatedExpression(e,"visibility");return"success"===t?.status&&!0===t.result}_requiredForFeature(e){if(!this._editableForFeature(e))return!1;if(!this.field.nullable||this.isSubtypeField)return!0;const t=this._effectiveVisibleFeature(e);if(null==this.template.getExpressionExecutorsForLayer(e.layer)?.requiredExpression)return!1;const i=this._lookupEvaluatedExpression(e,"required");return"success"!==i?.status?t:t&&!0===i.result}calculateDomain(e){const t=e.find(e=>null!=e),i=this.template.domain;if(!t)return i&&u(this.field,i)?i:null;switch(t.type){case"coded-value":if(e.some(e=>!e)){if(!i)return null;e=e.filter(e=>null!==e)}break;case"range":e=e.filter(e=>null!==e)}if(!e.every(e=>e?.type===t?.type))return null;let l=null;switch(t?.type){case"range":l=this._intersectRangeDomains(e);break;case"coded-value":l=this._intersectCodedValueDomains(e)}return l}_intersectCodedValueDomains(e){if(!e.length)return null;const t=new Map(e[0].codedValues.map(({code:e,name:t})=>[e,t])),i=this.template.domain?new Map(this.template.domain.codedValues.map(({code:e,name:t})=>[e,t])):null;for(const o of e)for(const[e,i]of t){o.codedValues.some(t=>t.code===e&&t.name===i)||t.delete(e)}let l=t;if(i){l=new Map;for(const[e,r]of i)t.has(e)&&l.set(e,r)}const r=Array.from(l.entries()).map(([e,t])=>new o({code:e,name:t}));return r.length?new n({codedValues:r}):null}_intersectRangeDomains(e){if(!e.length)return null;let t=e[0];for(let l=1;l<e.length;l++){if(!t)return null;t=this._findMinMaxValuesBetweenTwoDomains(t,e[l])}if(t&&!u(this.field,t))return null;const{domain:i}=this.template;if(t&&i&&i instanceof g){const e=this._findMinMaxValuesBetweenTwoDomains(t,i);return this._hasIntersectionWithElementFieldDomain=!!e,e}return t}_getMinMaxFromRangeDomain(e){const t=e.minValue,i=e.maxValue,{field:l}=this;return d(l)||c(l)||f(l)?a(l,i,t):{min:null!=t&&"number"==typeof t?t:null,max:null!=i&&"number"==typeof i?i:null}}_findMinMaxValuesBetweenTwoDomains(e,t){const i=new g,l=this._getMinMaxFromRangeDomain(e),r=this._getMinMaxFromRangeDomain(t),{field:o}=this,n=this._getValidRangeValue(l.min,-1/0),s=this._getValidRangeValue(l.max,1/0),a=this._getValidRangeValue(r.min,-1/0),u=this._getValidRangeValue(r.max,1/0);return i.minValue=Math.max(n,a),i.maxValue=Math.min(s,u),i.minValue===-1/0||i.maxValue===1/0||i.minValue>i.maxValue?null:((d(o)||c(o)||f(o))&&(i.minValue=Number(l.min)>Number(r.min)?l.rawMin:r.rawMin,i.maxValue=Number(l.max)<Number(r.max)?l.rawMax:r.rawMax),i.name="intersection",i)}_getValidRangeValue(e,t){return b(e)?e:t}};e([i()],k.prototype,"dataType",null),e([i()],k.prototype,"domain",null),e([i()],k.prototype,"distinctValues",null),e([i()],k.prototype,"editable",null),e([i()],k.prototype,"label",null),e([i()],k.prototype,"effectiveVisible",null),e([i()],k.prototype,"effectiveVisibilityCode",null),e([i()],k.prototype,"errors",null),e([i()],k.prototype,"featuresHaveSameValue",null),e([i()],k.prototype,"field",null),e([i()],k.prototype,"fieldName",null),e([i()],k.prototype,"group",void 0),e([i()],k.prototype,"input",null),e([i()],k.prototype,"multipleChoiceInput",null),e([i()],k.prototype,"multipleChoiceChoices",null),e([i()],k.prototype,"multipleChoiceValues",null),e([i()],k.prototype,"multipleChoiceOtherChoiceFieldName",null),e([i()],k.prototype,"multipleChoiceOtherChoiceHint",null),e([i()],k.prototype,"multipleChoiceOtherChoiceLabel",null),e([i()],k.prototype,"hasMultipleChoiceOtherChoiceField",null),e([i()],k.prototype,"shouldShowMultipleChoiceOtherChoice",null),e([i()],k.prototype,"multipleChoiceOtherChoiceValue",null),e([i()],k.prototype,"multipleChoiceOtherChoiceMaxLength",null),e([i()],k.prototype,"invalidFeatures",null),e([i()],k.prototype,"_multipleChoiceOtherChoiceCheckedStateStore",null),e([i()],k.prototype,"isSubtypeField",null),e([i()],k.prototype,"showNoValueOptionEnabled",null),e([i()],k.prototype,"showNoValueLabel",null),e([i()],k.prototype,"includeTime",null),e([i()],k.prototype,"includeTimeOffset",null),e([i()],k.prototype,"maxLength",null),e([i()],k.prototype,"minLength",null),e([i()],k.prototype,"range",null),e([i()],k.prototype,"required",null),e([i()],k.prototype,"submittable",null),e([i({readOnly:!0})],k.prototype,"type",void 0),e([i()],k.prototype,"userHasChangedValue",void 0),e([i()],k.prototype,"valid",null),e([i()],k.prototype,"value",null),e([i()],k.prototype,"visibilityCode",null),e([i()],k.prototype,"_evaluatedRequiredExpression",null),e([i()],k.prototype,"_hasIntersectionWithElementFieldDomain",void 0),e([i()],k.prototype,"_allDomains",null),e([i()],k.prototype,"_fieldShouldHaveDomain",null),e([i()],k.prototype,"_dateFormRange",null),e([i()],k.prototype,"_dateRange",null),k=e([l("esri.widgets.BatchAttributeForm.inputs.FieldInput")],k);const N=k;export{N as default};
|
|
2
|
+
import{__decorate as e}from"tslib";import{isSome as t}from"../../../core/arrayUtils.js";import{getOrCreateMapValue as i}from"../../../core/MapUtils.js";import{property as l,subclass as r}from"../../../core/accessorSupport/decorators.js";import{isMultipleChoiceInput as o}from"../../../form/elements/inputs/inputUtils.js";import n from"../../../layers/support/CodedValue.js";import s from"../../../layers/support/CodedValueDomain.js";import{getDomainRange as a,dateTimeFieldValuesToNumericRange as u,isDomainValidForField as h}from"../../../layers/support/domainUtils.js";import{isNumericField as p,isStringField as c,isTimeOnlyField as m,getFieldRange as d,isDateOnlyField as f,isTimestampOffsetField as C}from"../../../layers/support/fieldUtils.js";import{supportsFieldConfiguration as g}from"../../../layers/support/layerUtils.js";import y from"../../../layers/support/RangeDomain.js";import{isAnyDateField as b}from"../../../smartMapping/support/utils.js";import{isNumber as x}from"../../../support/guards.js";import v from"./EditableInput.js";import{visibilityCodeToBoolean as V,differentValuesString as O,isFieldInputWithShowNoValueOptionInput as M}from"./support/inputUtils.js";import{otherChoiceCheckedPlaceholderValue as _,multipleChoiceOtherChoiceCheckedStateByExpressionsManager as F}from"./support/multipleChoiceInputUtils.js";import{isEmptyValue as S,getMaxLength as w,getMinLength as E,dateIsValid as k,validateFormValue as D}from"../../support/forms/formUtils.js";let N=class extends v{constructor(e){super(e),this.group=null,this.type="field",this.userHasChangedValue=!1,this._hasIntersectionWithElementFieldDomain=!1}get compositeError(){if(this.valid)return null;const{errors:e}=this;if(e.length<this.features.length)return"batch-attribute-form-validation::features-have-different-errors";const t=e[0];for(const i of e)if(i.error!==t.error)return"batch-attribute-form-validation::features-have-different-errors";return t.error}get dataType(){const{field:e}=this;return p(e)?"number":c(e)?"text":b(e)||m(e)?"date":"unsupported"}get domain(){const e=this._allDomains.toArray();return this.calculateDomain(e)}get distinctValues(){if(this.featuresHaveSameValue)return[this.value];const e=new Set;for(const t of this.features)e.add(t.getAttribute(this.fieldName));return Array.from(e)}get editable(){return!!this.field.editable&&(this._evaluatedEditableExpression??!0)}get label(){const e=this.template;if(null!=e.label&&""!==e.label)return e.label;const{field:t,layers:i}=this;if(1===i.length){const e=i[0];if(g(e)){const i=e.getFieldAlias(t.name);if(null!=i&&""!==i)return i}}return t.alias||t.name}get effectiveVisible(){return V(this.effectiveVisibilityCode)}get effectiveVisibilityCode(){const{visibilityCode:e}=this;if("visible"!==e)return e;const{group:t}=this;if(null==t)return e;const i=t.visibilityCode;return"hidden:visibility-expression:all-features"===i?"hidden:group-visibility-expression:all-features":"hidden:visibility-expression:some-features"===i?"hidden:group-visibility-expression:some-features":e}get errors(){return this._validate()}get featuresHaveSameValue(){const{fieldName:e}=this,t=this.features.at(0)?.getAttribute(e);return this.features.every(i=>i.getAttribute(e)===t)}get field(){return this.template.field}get fieldName(){return this.field.name}get input(){return this.template.input}get multipleChoiceInput(){const{input:e}=this;return e&&o(e)?e:null}get multipleChoiceChoices(){const{multipleChoiceInput:e}=this;if(!e)return null;const t=new Map;for(const i of e.choices)t.has(i.value)||t.set(i.value,i);return Array.from(t.values())}get multipleChoiceValues(){return this.multipleChoiceChoices?.map(e=>e.value)??null}get multipleChoiceOtherChoiceFieldName(){return this.multipleChoiceInput?.otherChoice?.fieldName??null}get multipleChoiceOtherChoiceHint(){return this.multipleChoiceInput?.otherChoice?.hint??""}get multipleChoiceOtherChoiceLabel(){return this.multipleChoiceInput?.otherChoice?.label??null}get hasMultipleChoiceOtherChoiceField(){const{multipleChoiceOtherChoiceFieldName:e}=this;return!!e&&this.layers.every(t=>null!=t.getField(e))}get shouldShowMultipleChoiceOtherChoice(){return null!=this.multipleChoiceInput?.otherChoice&&this.hasMultipleChoiceOtherChoiceField}set shouldShowMultipleChoiceOtherChoice(e){this._overrideIfSome("shouldShowMultipleChoiceOtherChoice",e)}get multipleChoiceOtherChoiceValue(){const{multipleChoiceOtherChoiceFieldName:e}=this;if(!e||!this.shouldShowMultipleChoiceOtherChoice)return null;const t=this.features.map(t=>t.getAttribute(e));if(0===t.length)return null;const[i]=t;return t.every(e=>e===i)?i:O}get multipleChoiceOtherChoiceMaxLength(){const{multipleChoiceOtherChoiceFieldName:e}=this;if(!e||!this.shouldShowMultipleChoiceOtherChoice)return;let t;for(const i of this.layers){const l=i.getField(e)?.length;null==l||l<0||(t=null==t?l:Math.min(t,l))}return t}getMultipleChoiceOtherChoiceRenderState(e){const t=this.multipleChoiceOtherChoiceFieldName??void 0,i=this.shouldShowMultipleChoiceOtherChoice,l=this.multipleChoiceOtherChoiceValue,r=i?this.multipleChoiceOtherChoiceCheckboxState:{checked:!1,indeterminate:!1},o=i?this.getExplicitMultipleChoiceOtherChoiceCheckedState():void 0,n=void 0===o?r:{checked:o,indeterminate:!1};return{fieldName:t,hint:this.multipleChoiceOtherChoiceHint,label:this.multipleChoiceOtherChoiceLabel??e,shouldShow:i,checkboxState:n,value:l,normalizedValue:l===_?"":l,maxLength:this.multipleChoiceOtherChoiceMaxLength}}get multipleChoiceOtherChoiceCheckboxState(){const e=this.multipleChoiceOtherChoiceFieldName;if(!e)return{checked:!1,indeterminate:!1};const t=this.features.map(t=>t.getAttribute(e));return{checked:t.length>0&&t.every(e=>!S(e)),indeterminate:t.some(e=>!S(e))&&t.some(e=>S(e))}}initializeExplicitMultipleChoiceOtherChoiceCheckedState(){this.hasExplicitMultipleChoiceOtherChoiceCheckedState()||this.setExplicitMultipleChoiceOtherChoiceCheckedState(this.multipleChoiceOtherChoiceCheckboxState.checked)}hasExplicitMultipleChoiceOtherChoiceCheckedState(){return void 0!==this.getExplicitMultipleChoiceOtherChoiceCheckedState()}getExplicitMultipleChoiceOtherChoiceCheckedState(){const e=this._multipleChoiceOtherChoiceCheckedStateKey;if(e)return this._multipleChoiceOtherChoiceCheckedStateStore.get(e)}setExplicitMultipleChoiceOtherChoiceCheckedState(e){const t=this._multipleChoiceOtherChoiceCheckedStateKey;t&&this._multipleChoiceOtherChoiceCheckedStateStore.set(t,e)}stashMultipleChoiceOtherChoiceDraftValueForFeatures(e,t){const i=this.multipleChoiceOtherChoiceFieldName;if(i)for(const l of e)l.stashAttribute(i,t)}setMultipleChoiceOtherChoiceDraftValuesFromFeatures(e){const t=this.multipleChoiceOtherChoiceFieldName;if(t)for(const i of e)i.stashAttribute(t,i.getAttribute(t))}getMultipleChoiceOtherChoiceDraftValue(e){const t=this.multipleChoiceOtherChoiceFieldName;if(t)return e.getStashedAttribute(t)}get invalidFeatures(){return this.errors.map(e=>e.feature)}get _multipleChoiceOtherChoiceCheckedStateKey(){return null!=this.multipleChoiceOtherChoiceFieldName?this.template.elementId:null}get _multipleChoiceOtherChoiceCheckedStateStore(){const e=this.expressionsManager;return e?i(F,e,()=>new Map):new Map}get isSubtypeField(){return this.layers.some(e=>{if(e&&"subtypeField"in e){const{subtypeField:t,fieldsIndex:i}=e;return(i.get(t)?.name??t)===this.fieldName}return!1})}get showNoValueOptionEnabled(){const{input:e}=this;return!this.required&&(!M(e)||!0===e?.showNoValueOption)}get showNoValueLabel(){const{input:e}=this;return M(e)?e?.noValueOptionLabel:null}get includeTime(){const{template:e,field:t}=this;return"date"===this.dataType&&("time-only"===t.type||"date-only"!==t.type&&("datetime-picker"!==e.input?.type||e.input.includeTime))}get includeTimeOffset(){if("timestamp-offset"!==this.field.type)return!1;const{input:e}=this;return!e||"timestampoffset-picker"===e.type&&e.includeTimeOffset}get maxLength(){return w({dataType:this.dataType,field:this.field,input:this.input})}get minLength(){return E({dataType:this.dataType,field:this.field,input:this.input})}get range(){if("date"===this.dataType)return this._dateRange;const{domain:e,field:t}=this;if(e){const i=a(t,e);return{max:i?.max,min:i?.min}}const i=this._allDomains.toArray().every(e=>!e)?d(t):null;return{max:i?.max===Number.MAX_VALUE?null:i?.max??null,min:i?.min===-Number.MAX_VALUE?null:i?.min??null}}get required(){if(!this.editable)return!1;if(!this.field.nullable||this.isSubtypeField)return!0;const e=this.visible&&!1!==this.group?.visible,t=this._evaluatedRequiredExpression;return!(!e||null==t)&&t}get submittable(){return(!this.required||!this.distinctValues.some(e=>S(e)))&&!!this.valid}get valid(){return 0===this.errors.length}get value(){return this.featuresHaveSameValue?this.features.at(0)?.getAttribute(this.fieldName)??null:O}get visibilityCode(){return this.field.visible?this._fieldShouldHaveDomain&&null==this.domain?"hidden:no-domain-in-common":this._baseVisibilityCode:"hidden:field-definition"}get codedValueDomainOptions(){return"coded-value"===this.domain?.type?this.domain.codedValues.map(({name:e,code:t})=>({name:e,value:t})):[]}get codedValueOptions(){const e=this.codedValueDomainOptions,{value:t}=this,i=null==t||t===O||e.some(e=>e.value===t)?[]:[{name:`${t}`,value:t}];return[e,i]}get _evaluatedRequiredExpression(){let e=!1,t=!0;const i=this.template;for(const l of this.features){if(null==i.getExpressionExecutorsForLayer(l.layer)?.requiredExpression)continue;t=!1;const r=this._lookupEvaluatedExpression(l,"required");"success"===r?.status?e=e||!0===r.result:e=!0}return t?null:e}get _allDomains(){const e=this.template.domain;return this.features.map(t=>{const i=t.layer.getFieldDomain(this.fieldName,{feature:t.plainGraphic});return"range"===i?.type||"range"===e?.type?i??this.template.domain:i})}get _fieldShouldHaveDomain(){return!!this._hasIntersectionWithElementFieldDomain||this._allDomains.some(t)}get _dateFormRange(){if("date"!==this.dataType)return{};const{input:e}=this;if(!e)return{};const{type:t}=e;let i={};if("date-picker"!==t&&"time-picker"!==t&&"timestampoffset-picker"!==t||(i=u(this.field,e.max,e.min)),"datetime-picker"===t){const{max:t,min:l}=e;i={max:null!=t&&k(t)?t.getTime():null,min:null!=l&&k(l)?l.getTime():null}}return{min:i.min,max:i.max,rawMax:i?.rawMax??null,rawMin:i?.rawMin??null}}get _dateRange(){const{_dateFormRange:e,template:t,field:i,domain:l}=this;if("date"!==this.dataType)return{};if(!l)return this._fieldShouldHaveDomain?{}:e;const r=a(i,l);if(!r)return e;const{max:o,min:n,rawMax:s,rawMin:u}=e,{type:h}=t.field;if("date"===h){const{max:e,min:t}=r;return{max:x(o)&&(null===e||null!=e&&o<=e)?o:e??null,min:x(n)&&(null===t||null!=t&&n>=t)?n:t??null}}if("date-only"===h||"time-only"===h||"timestamp-offset"===h){const{max:e,min:t,rawMax:i,rawMin:l}=r,a=x(o)&&s&&(null==e||o<e),h=x(n)&&u&&(null==t||n>t);return{max:a?o:e,min:h?n:t,rawMax:a?s:i,rawMin:h?u:l}}return{}}async setValueFromUser(e){this.userHasChangedValue=!0;const t=[],i=this.fieldName;for(const l of this.features)l.getAttribute(i)!==e&&t.push(l);this._setValue(e),await this.expressionsManager.valueChanged(i,t)}_setValue(e){const{fieldName:t}=this;for(const i of this.features)i.setAttribute(t,e)}_validate(){const{dataType:e,fieldName:t,maxLength:i,minLength:l,range:r}=this,o=[],{multipleChoiceInput:n}=this;for(const s of this.features){const{layer:a}=s,u=a.getField(t)??this.field,h=a.getFieldDomain(t,{feature:s.plainGraphic}),p=this.calculateDomain([h]),c=this._requiredForFeature(s),m=s.getAttribute(t),d=D(m,{dataType:e,domain:p,field:u,maxLength:i,minLength:l,multipleChoice:n,range:r,required:c});d&&o.push({error:d,feature:s.source})}return o}_editableForFeature(e){if(!this.field.editable)return!1;if(null==this.template.getExpressionExecutorsForLayer(e.layer)?.editableExpression)return!0;const t=this._lookupEvaluatedExpression(e,"editable");return"success"===t?.status&&!0===t.result}_effectiveVisibleFeature(e){if(this.group&&!this.group.visibleForFeature(e))return!1;if(null==this.template.getExpressionExecutorsForLayer(e.layer)?.visibilityExpression)return!0;const t=this._lookupEvaluatedExpression(e,"visibility");return"success"===t?.status&&!0===t.result}_requiredForFeature(e){if(!this._editableForFeature(e))return!1;if(!this.field.nullable||this.isSubtypeField)return!0;const t=this._effectiveVisibleFeature(e);if(null==this.template.getExpressionExecutorsForLayer(e.layer)?.requiredExpression)return!1;const i=this._lookupEvaluatedExpression(e,"required");return"success"!==i?.status?t:t&&!0===i.result}calculateDomain(e){const t=e.find(e=>null!=e),i=this.template.domain;if(!t)return i&&h(this.field,i)?i:null;switch(t.type){case"coded-value":if(e.some(e=>!e)){if(!i)return null;e=e.filter(e=>null!==e)}break;case"range":e=e.filter(e=>null!==e)}if(!e.every(e=>e?.type===t?.type))return null;let l=null;switch(t?.type){case"range":l=this._intersectRangeDomains(e);break;case"coded-value":l=this._intersectCodedValueDomains(e)}return l}_intersectCodedValueDomains(e){if(!e.length)return null;const t=new Map(e[0].codedValues.map(({code:e,name:t})=>[e,t])),i=this.template.domain?new Map(this.template.domain.codedValues.map(({code:e,name:t})=>[e,t])):null;for(const o of e)for(const[e,i]of t){o.codedValues.some(t=>t.code===e&&t.name===i)||t.delete(e)}let l=t;if(i){l=new Map;for(const[e,r]of i)t.has(e)&&l.set(e,r)}const r=Array.from(l.entries()).map(([e,t])=>new n({code:e,name:t}));return r.length?new s({codedValues:r}):null}_intersectRangeDomains(e){if(!e.length)return null;let t=e[0];for(let l=1;l<e.length;l++){if(!t)return null;t=this._findMinMaxValuesBetweenTwoDomains(t,e[l])}if(t&&!h(this.field,t))return null;const{domain:i}=this.template;if(t&&i&&i instanceof y){const e=this._findMinMaxValuesBetweenTwoDomains(t,i);return this._hasIntersectionWithElementFieldDomain=!!e,e}return t}_getMinMaxFromRangeDomain(e){const t=e.minValue,i=e.maxValue,{field:l}=this;return f(l)||m(l)||C(l)?u(l,i,t):{min:null!=t&&"number"==typeof t?t:null,max:null!=i&&"number"==typeof i?i:null}}_findMinMaxValuesBetweenTwoDomains(e,t){const i=new y,l=this._getMinMaxFromRangeDomain(e),r=this._getMinMaxFromRangeDomain(t),{field:o}=this,n=this._getValidRangeValue(l.min,-1/0),s=this._getValidRangeValue(l.max,1/0),a=this._getValidRangeValue(r.min,-1/0),u=this._getValidRangeValue(r.max,1/0);return i.minValue=Math.max(n,a),i.maxValue=Math.min(s,u),i.minValue===-1/0||i.maxValue===1/0||i.minValue>i.maxValue?null:((f(o)||m(o)||C(o))&&(i.minValue=Number(l.min)>Number(r.min)?l.rawMin:r.rawMin,i.maxValue=Number(l.max)<Number(r.max)?l.rawMax:r.rawMax),i.name="intersection",i)}_getValidRangeValue(e,t){return x(e)?e:t}};e([l()],N.prototype,"dataType",null),e([l()],N.prototype,"domain",null),e([l()],N.prototype,"distinctValues",null),e([l()],N.prototype,"editable",null),e([l()],N.prototype,"label",null),e([l()],N.prototype,"effectiveVisible",null),e([l()],N.prototype,"effectiveVisibilityCode",null),e([l()],N.prototype,"errors",null),e([l()],N.prototype,"featuresHaveSameValue",null),e([l()],N.prototype,"field",null),e([l()],N.prototype,"fieldName",null),e([l()],N.prototype,"group",void 0),e([l()],N.prototype,"input",null),e([l()],N.prototype,"multipleChoiceInput",null),e([l()],N.prototype,"multipleChoiceChoices",null),e([l()],N.prototype,"multipleChoiceValues",null),e([l()],N.prototype,"multipleChoiceOtherChoiceFieldName",null),e([l()],N.prototype,"multipleChoiceOtherChoiceHint",null),e([l()],N.prototype,"multipleChoiceOtherChoiceLabel",null),e([l()],N.prototype,"hasMultipleChoiceOtherChoiceField",null),e([l()],N.prototype,"shouldShowMultipleChoiceOtherChoice",null),e([l()],N.prototype,"multipleChoiceOtherChoiceValue",null),e([l()],N.prototype,"multipleChoiceOtherChoiceMaxLength",null),e([l()],N.prototype,"multipleChoiceOtherChoiceCheckboxState",null),e([l()],N.prototype,"invalidFeatures",null),e([l()],N.prototype,"_multipleChoiceOtherChoiceCheckedStateStore",null),e([l()],N.prototype,"isSubtypeField",null),e([l()],N.prototype,"showNoValueOptionEnabled",null),e([l()],N.prototype,"showNoValueLabel",null),e([l()],N.prototype,"includeTime",null),e([l()],N.prototype,"includeTimeOffset",null),e([l()],N.prototype,"maxLength",null),e([l()],N.prototype,"minLength",null),e([l()],N.prototype,"range",null),e([l()],N.prototype,"required",null),e([l()],N.prototype,"submittable",null),e([l({readOnly:!0})],N.prototype,"type",void 0),e([l()],N.prototype,"userHasChangedValue",void 0),e([l()],N.prototype,"valid",null),e([l()],N.prototype,"value",null),e([l()],N.prototype,"visibilityCode",null),e([l()],N.prototype,"_evaluatedRequiredExpression",null),e([l()],N.prototype,"_hasIntersectionWithElementFieldDomain",void 0),e([l()],N.prototype,"_allDomains",null),e([l()],N.prototype,"_fieldShouldHaveDomain",null),e([l()],N.prototype,"_dateFormRange",null),e([l()],N.prototype,"_dateRange",null),N=e([r("esri.widgets.BatchAttributeForm.inputs.FieldInput")],N);const A=N;export{A 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{
|
|
2
|
+
import{__decorate as t}from"tslib";import{ignoreAbortErrors as e}from"../../../core/promiseUtils.js";import{watch as i,sync as o,on as s}from"../../../core/reactiveUtils.js";import{generateUID as r}from"../../../core/uid.js";import{property as a,subclass as l}from"../../../core/accessorSupport/decorators.js";import{isAssociationsLayerUnion as n}from"../batchAttributeFormUtils.js";import p from"./EditableInput.js";import u from"./SingleFeatureInputAdapter.js";import d from"../../support/UtilityNetworkAssociations/FeatureUtilityNetworkAssociationsViewModel.js";let y=class extends p{constructor(t){super(t),this._associatedLayer=null,this.featureItem=null,this.group=null,this.map=null,this.single=new u({input:this}),this.type="utilityNetworkAssociations",this.viewModel=new d({source:"featureForm"})}initialize(){this.viewModel.set({associationTypes:this.associationTypes,description:this.description,graphic:this.feature?.plainGraphic,layer:this.associationLayer,map:this.map,title:this.label}),this.addHandles([i(()=>this.associatedLayer,t=>this.showAllAssociatedFeatures(null!=t),o),s(()=>this._editableLayer,"edits",()=>this.refresh())])}get _editableLayer(){const{associatedLayer:t}=this;return"subtype-sublayer"===t?.type?t.parent:t}get activeAssociationType(){return this.viewModel.activeAssociationType}get associatedFeatures(){const{associatedLayer:t}=this;return t?this.associatedFeatureInfos.get(t):void 0}get associatedFeatureInfos(){const{utilityNetwork:t,viewModel:{associationFeatures:e}}=this,i=new Map;return e.size&&t?(e.forEach((t,e)=>{n(e)&&i.set(e,t)}),i):i}get associatedLayer(){return this._associatedLayer}get associationLayer(){const{layer:t}=this;return n(t)?t:null}get associationTypes(){return this.template.associationTypes}get canAddAssociation(){return!(!this.utilityNetwork||!this.loaded)&&this.editable}get feature(){return this.single.feature}get featureCount(){return this.viewModel.featureCount}get layer(){return this.single.layer}get loaded(){const t=this.viewModel.state;return"loading"!==t&&"disabled"!==t}get showAllEnabled(){return this.viewModel.showAllEnabled}get uid(){return r()}get updating(){const{state:t}=this.viewModel;return"loading"===t||"querying"===t}get utilityNetwork(){return this.viewModel.utilityNetwork}async refresh(){await e(this.viewModel.refresh())}setAssociatedLayer(t){this._associatedLayer=t}setActiveAssociationType(t){this.viewModel.activeAssociationType=t}showAllAssociatedFeatures(t){this.viewModel.showAllEnabled=t}};t([a()],y.prototype,"_associatedLayer",void 0),t([a()],y.prototype,"_editableLayer",null),t([a()],y.prototype,"activeAssociationType",null),t([a()],y.prototype,"associatedFeatures",null),t([a()],y.prototype,"associatedFeatureInfos",null),t([a()],y.prototype,"associatedLayer",null),t([a()],y.prototype,"associationLayer",null),t([a()],y.prototype,"associationTypes",null),t([a()],y.prototype,"canAddAssociation",null),t([a()],y.prototype,"feature",null),t([a()],y.prototype,"featureItem",void 0),t([a()],y.prototype,"featureCount",null),t([a()],y.prototype,"group",void 0),t([a()],y.prototype,"layer",null),t([a()],y.prototype,"loaded",null),t([a()],y.prototype,"map",void 0),t([a()],y.prototype,"showAllEnabled",null),t([a({readOnly:!0})],y.prototype,"single",void 0),t([a({readOnly:!0})],y.prototype,"type",void 0),t([a()],y.prototype,"uid",null),t([a()],y.prototype,"updating",null),t([a()],y.prototype,"utilityNetwork",null),t([a()],y.prototype,"viewModel",void 0),y=t([l("esri.widgets.BatchAttributeForm.inputs.UtilityNetworkAssociationsElementInput")],y);const c=y;export{c as default};
|