@arcgis/core 4.34.0-next.99 → 4.34.1
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/ElevationProfile/ElevationProfileLineInput.js +1 -1
- package/analysis/VolumeMeasurement/volumeMeasurementConfiguration.js +1 -1
- package/assets/components/assets/sort-handle/t9n/messages.uk.json +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/00c77f03dd511c6dbff2.js +1 -0
- package/assets/esri/core/workers/chunks/{e5bcc44f3dc6fc90835a.js → 0461ac6ddd44f8da2eec.js} +1 -1
- package/assets/esri/core/workers/chunks/0638a36eaacb56cf89fa.js +1 -0
- package/assets/esri/core/workers/chunks/0f735b0dec173142f3b6.js +2 -0
- package/assets/esri/core/workers/chunks/{a8f998b8ec8c56150479.js.LICENSE.txt → 0f735b0dec173142f3b6.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/{f7c99e9c8d19352af38d.js → 1847e8ac559085949f6d.js} +1 -1
- package/assets/esri/core/workers/chunks/1ae3d331da5baa8e4b6a.js +1 -0
- package/assets/esri/core/workers/chunks/1d807057327ba90ab770.js +1 -0
- package/assets/esri/core/workers/chunks/1dfca37f95f2b968aa54.js +1 -0
- package/assets/esri/core/workers/chunks/{651b9144abb1895cc510.js → 1e848d9da1c61a27cf18.js} +1 -1
- package/assets/esri/core/workers/chunks/{2c72e185b780bbbb1c9f.js → 21f1e12d4e703b59c31c.js} +1 -1
- package/assets/esri/core/workers/chunks/{f5d89b48f62fba78fd10.js → 222c2ae818353539cab2.js} +1 -1
- package/assets/esri/core/workers/chunks/2248c3040e2f9a8b5cbc.js +1 -0
- package/assets/esri/core/workers/chunks/297b11752f9c251cd7be.js +1 -0
- package/assets/esri/core/workers/chunks/2d834d33b73a55a98ba8.js +1 -0
- package/assets/esri/core/workers/chunks/2dce02d199a9625abbd9.js +1 -0
- package/assets/esri/core/workers/chunks/{5d3998e15df273a89078.js → 37897186bfbfa1319ff5.js} +1 -1
- package/assets/esri/core/workers/chunks/378bed624605fe8f62b1.js +1 -0
- package/assets/esri/core/workers/chunks/3a457e718a901a45902e.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/{06e60fc7715d08ede59d.js → 3edffdb0e282ed562ac7.js} +1 -1
- package/assets/esri/core/workers/chunks/4470a3fff217f2bfeec5.js +1 -0
- package/assets/esri/core/workers/chunks/44e40484acb577039c82.js +1 -0
- package/assets/esri/core/workers/chunks/{8f3503b2fb6cd38757b9.js → 458e87902abc24b375da.js} +1 -1
- package/assets/esri/core/workers/chunks/4a38b1402cd48ced5d0f.js +1 -0
- package/assets/esri/core/workers/chunks/524293f92791c55f6e2c.js +1 -0
- package/assets/esri/core/workers/chunks/594761a526629f9aa165.js +1 -0
- package/assets/esri/core/workers/chunks/5e60542f80bdacb6e7af.js +1 -0
- package/assets/esri/core/workers/chunks/616e3d1947eda575a25a.js +1 -0
- package/assets/esri/core/workers/chunks/{86b978a48b539e9fc5b8.js → 618ccc5d922f40fb6597.js} +1 -1
- package/assets/esri/core/workers/chunks/6c96997ca5ea1affa7af.js +1 -0
- package/assets/esri/core/workers/chunks/6d5f36fdd6ff081f30e8.js +1 -0
- package/assets/esri/core/workers/chunks/7010d1eb303a13c72f81.js +1 -0
- package/assets/esri/core/workers/chunks/70c7d3128c9242d10873.js +1 -0
- package/assets/esri/core/workers/chunks/740e6d2831dcb01ee96a.js +1 -0
- package/assets/esri/core/workers/chunks/75535e2e487ed2616acf.js +1 -0
- package/assets/esri/core/workers/chunks/7565b382f6b3d2cb46a3.js +2 -0
- package/assets/esri/core/workers/chunks/{24921d31efa8d222ad2d.js.LICENSE.txt → 7565b382f6b3d2cb46a3.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/{40b81d1c2d53cf598b8e.js → 7786fc1b3779df832e0a.js} +1 -1
- package/assets/esri/core/workers/chunks/7a5c276652e7edf42e73.js +1 -0
- package/assets/esri/core/workers/chunks/{c941d15190fc08523d0d.js → 7a9a0fcf78a1863c5dea.js} +1 -1
- package/assets/esri/core/workers/chunks/80d2182dac1a49cfd923.js +1 -0
- package/assets/esri/core/workers/chunks/81501abaabf10e9bef1b.js +1 -0
- package/assets/esri/core/workers/chunks/{e032f3d2ee19790f8c79.js → 881df4fd1dc594576457.js} +1 -1
- package/assets/esri/core/workers/chunks/8862e6ceabc990ca0031.js +1 -0
- package/assets/esri/core/workers/chunks/8cf2669900bb45cb094a.js +1 -0
- package/assets/esri/core/workers/chunks/98739414c107ad78e4d8.js +1 -0
- package/assets/esri/core/workers/chunks/98ccd88bdb9cb96a7610.js +1 -0
- package/assets/esri/core/workers/chunks/9dc6eeaac94aff385cf9.js +1 -0
- package/assets/esri/core/workers/chunks/9e09b5fd04ff1fb18888.js +1 -0
- package/assets/esri/core/workers/chunks/9e5e05d6430712b0b1bc.js +1 -0
- package/assets/esri/core/workers/chunks/{67d9cfe02613cb73ee37.js → 9ff8ee6ed6b98c03ae7e.js} +2 -2
- package/assets/esri/core/workers/chunks/{67d9cfe02613cb73ee37.js.LICENSE.txt → 9ff8ee6ed6b98c03ae7e.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/aa78b69219d9a0ef1c54.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/af0f82f7efa6e983eca5.js +1 -0
- package/assets/esri/core/workers/chunks/b113d4f6a014863aaf66.js +1 -0
- package/assets/esri/core/workers/chunks/bcf2bda17bda0210f898.js +1 -0
- package/assets/esri/core/workers/chunks/{773d76253588bcf14eaa.js → bd02e9d6c7ba491dd35f.js} +1 -1
- package/assets/esri/core/workers/chunks/be1b8e5ff2b1be26845a.js +1 -0
- package/assets/esri/core/workers/chunks/{142c45ad68eecaf3fc7c.js → bf9b2949894cc2a1e6b3.js} +1 -1
- package/assets/esri/core/workers/chunks/{dfc37c2ce51e6a34fd87.js → c0d787297d2128fe3c38.js} +1 -1
- package/assets/esri/core/workers/chunks/c91ce5fcdd4d0a6514d3.js +1 -0
- package/assets/esri/core/workers/chunks/{ad3e18c4c65aa2cd1ceb.js → cd3b843ffd4010038c74.js} +1 -1
- package/assets/esri/core/workers/chunks/ce16489cf7eb0d78c741.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/d0767001601412f17ada.js +1 -0
- package/assets/esri/core/workers/chunks/{46ef545d2b3b3f4e6d32.js → d391bfbaf0e790cd10d6.js} +2 -2
- package/assets/esri/core/workers/chunks/{46ef545d2b3b3f4e6d32.js.LICENSE.txt → d391bfbaf0e790cd10d6.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/d5fa879de92da4441771.js +1 -0
- package/assets/esri/core/workers/chunks/d6e0528eacee7ea4c1ce.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/d9aee7ee4ab75b446ef1.js +1 -0
- package/assets/esri/core/workers/chunks/{9027f22a04ac2076ff0e.js → dd37db3f2d1072e250d9.js} +1 -1
- package/assets/esri/core/workers/chunks/{50d9f69d5255af4b29bb.js → df5afa06c6deb6b40109.js} +1 -1
- package/assets/esri/core/workers/chunks/e25c4b4a03270d48f408.js +1 -0
- package/assets/esri/core/workers/chunks/e97bffa614ad89105f38.js +1 -0
- package/assets/esri/core/workers/chunks/e9d4cae2144974489d6e.js +1 -0
- package/assets/esri/core/workers/chunks/ee5f0fd5384caa11c986.js +1 -0
- package/assets/esri/core/workers/chunks/f06d185e7defc4272ae7.js +1 -0
- package/assets/esri/core/workers/chunks/f18fdfcb3d5d7851e6fc.js +1 -0
- package/assets/esri/core/workers/chunks/f2f3ce7a0f3e394d27c4.js +1 -0
- package/assets/esri/core/workers/chunks/{b2add7338258ca7c24dd.js → f619ab4a3ff3036641a9.js} +1 -1
- package/assets/esri/core/workers/chunks/f64037a88ab03662dc2a.js +1 -0
- package/assets/esri/core/workers/chunks/f651c05604eab83aef5f.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/{fe3f95fda29e4844b153.js → fa6e59e72c6e1fa79cf8.js} +1 -1
- package/assets/esri/core/workers/chunks/fccd931f95d81ecc57b2.js +1 -0
- package/assets/esri/core/workers/chunks/{4a2bf3c8da24abd8b9e2.js → fd410a56286f9b8a5903.js} +1 -1
- package/assets/esri/libs/parquet/pkg/bundle_bg.wasm +0 -0
- package/assets/esri/themes/base/widgets/_Directions.scss +17 -18
- package/assets/esri/themes/base/widgets/_Editor.scss +36 -2
- package/assets/esri/themes/base/widgets/_FeatureForm.scss +1 -1
- package/assets/esri/themes/base/widgets/_FeatureTable.scss +2 -0
- package/assets/esri/themes/base/widgets/_NavigationToggle.scss +1 -1
- package/assets/esri/themes/base/widgets/_OrientedImageryViewer.scss +4 -4
- package/assets/esri/themes/base/widgets/_UtilityNetworkTrace.scss +17 -4
- package/assets/esri/themes/base/widgets/_Widget.scss +1 -1
- 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/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_ar.json +1 -1
- package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_bg.json +1 -1
- package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_bs.json +1 -1
- package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_ca.json +1 -1
- package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_cs.json +1 -1
- package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_da.json +1 -1
- package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_de.json +1 -1
- package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_el.json +1 -1
- package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_es.json +1 -1
- package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_et.json +1 -1
- package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_fi.json +1 -1
- package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_fr.json +1 -1
- package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_he.json +1 -1
- package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_hr.json +1 -1
- package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_hu.json +1 -1
- package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_id.json +1 -1
- package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_it.json +1 -1
- package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_ja.json +1 -1
- package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_ko.json +1 -1
- package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_lt.json +1 -1
- package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_lv.json +1 -1
- package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_nl.json +1 -1
- package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_no.json +1 -1
- package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_pl.json +1 -1
- package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_pt-BR.json +1 -1
- package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_pt-PT.json +1 -1
- package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_ro.json +1 -1
- package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_ru.json +1 -1
- package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_sk.json +1 -1
- package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_sl.json +1 -1
- package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_sr.json +1 -1
- package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_sv.json +1 -1
- package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_th.json +1 -1
- package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_tr.json +1 -1
- package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_uk.json +1 -1
- package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_vi.json +1 -1
- package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_zh-CN.json +1 -1
- package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_zh-HK.json +1 -1
- package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_zh-TW.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_ar.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_bg.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_bs.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_ca.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_cs.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_da.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_de.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_el.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_es.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_et.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_fi.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_fr.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_he.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_hr.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_hu.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_id.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_it.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_ja.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_ko.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_lt.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_lv.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_nl.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_no.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_pl.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_pt-BR.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_pt-PT.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_ro.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_ru.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_sk.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_sl.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_sr.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_sv.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_th.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_tr.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_uk.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_vi.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_zh-CN.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_zh-HK.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_zh-TW.json +1 -1
- package/assets/esri/widgets/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_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_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/GlowComposition.glsl.js +46 -46
- package/chunks/MultiPathImpl.js +1 -1
- package/chunks/Point2D.js +1 -1
- package/chunks/ShadedColorMaterial.glsl.js +10 -10
- package/chunks/UnitFactory.js +1 -1
- package/chunks/bundle.js +1 -1
- package/config.js +1 -1
- package/copyright.txt +0 -60
- package/core/has.js +1 -1
- package/core/sanitizerUtils.js +1 -1
- package/core/workers/workerFactory.js +1 -1
- package/editing/fieldUtils.js +5 -0
- package/editing/sharedTemplates/executor/support/createFeatureServiceEdit.js +1 -1
- package/editing/templateUtils.js +1 -1
- package/form/FormTemplate.js +1 -1
- package/form/elements/Element.js +1 -1
- package/form/elements/FieldElement.js +1 -1
- package/form/elements/GroupElement.js +1 -1
- package/geometry/operators/gx/operatorOffset.js +1 -1
- package/geometry/operators/support/jsonConverter.js +1 -1
- package/graphic/graphicOriginUtils.js +1 -1
- package/interfaces.d.ts +2075 -256
- package/intl/date.js +1 -1
- package/intl.d.ts +2 -0
- package/intl.js +1 -1
- package/kernel.js +1 -1
- package/layers/FeatureLayer.js +1 -1
- package/layers/IntegratedMesh3DTilesLayer.js +1 -1
- package/layers/OrientedImageryLayer.js +1 -1
- package/layers/ParquetLayer.js +1 -1
- package/layers/PointCloudLayer.js +1 -1
- package/layers/SceneLayer.js +1 -1
- package/layers/VideoLayer.js +1 -1
- package/layers/graphics/controllers/FeatureTileController3D.js +1 -1
- package/layers/graphics/data/QueryEngineResult.js +1 -1
- package/layers/graphics/sources/OGCFeatureSource.js +1 -1
- package/layers/graphics/sources/ParquetSource.js +1 -1
- package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
- package/layers/knowledgeGraph/KnowledgeGraphSublayer.js +1 -1
- package/layers/knowledgeGraph/layerUtils.js +1 -1
- package/layers/mixins/ImageryTileMixin.js +1 -1
- package/layers/mixins/SceneService.js +1 -1
- package/layers/ogc/ogcFeatureUtils.js +1 -1
- package/layers/orientedImagery/core/ExposurePoint.js +1 -1
- package/layers/orientedImagery/transformations/imageToWorld.js +1 -1
- package/layers/support/NumberFieldFormat.js +1 -1
- package/layers/support/SubtypeSublayer.js +1 -1
- package/layers/support/TitleCreator.js +1 -1
- package/layers/support/fieldConfigUtils.js +1 -1
- package/layers/support/fieldFormatUtils.js +1 -1
- package/layers/support/fieldUtils.js +1 -1
- package/layers/support/rasterDatasets/pixelReader.js +1 -1
- package/layers/support/rasterFieldUtils.js +1 -1
- package/layers/support/rasterFunctions/pixelUtils.js +1 -1
- package/layers/video/VideoController.js +1 -1
- package/libs/parquet/parquet.js +1 -1
- package/networks/CircuitManager.d.ts +4 -0
- package/networks/UnitIdentifierManager.d.ts +4 -0
- package/networks/support/Circuit.d.ts +4 -0
- package/networks/support/CircuitLocation.d.ts +4 -0
- package/networks/support/CircuitPath.d.ts +4 -0
- package/networks/support/CircuitPathConnectivityElement.d.ts +4 -0
- package/networks/support/CircuitSection.d.ts +4 -0
- package/networks/support/Subcircuit.d.ts +4 -0
- package/package.json +5 -5
- package/popup/FieldInfo.js +1 -1
- package/portal/Portal.js +1 -1
- package/portal/schemas/definitions.js +1 -1
- package/renderers/support/RasterSymbolizer.js +1 -1
- package/rest/knowledgeGraphService.d.ts +1 -0
- package/rest/networks/circuits/support/CircuitTraceResult.d.ts +4 -0
- package/rest/networks/circuits/support/CircuitVerifyResult.d.ts +4 -0
- package/rest/networks/support/TelecomNetworkElement.d.ts +4 -0
- package/rest/networks/unitIdentifiers/support/UnitQueryResult.d.ts +4 -0
- package/rest/print.js +1 -1
- package/rest/versionManagement/getVersionInfos.js +1 -1
- package/smartMapping/renderers/size.js +1 -1
- package/smartMapping/statistics/histogram.js +1 -1
- package/smartMapping/support/adapters/FeatureLayerAdapter.js +1 -1
- package/smartMapping/support/adapters/InMemoryLayerAdapter.js +1 -1
- package/smartMapping/support/adapters/support/histogramUtils.js +1 -1
- package/smartMapping/support/adapters/support/utils.js +1 -1
- package/smartMapping/support/utils.js +1 -1
- package/support/basemapDefinitions.js +1 -1
- package/support/popupUtils.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/cim/CIMSymbolDrawHelper.js +1 -1
- package/symbols/cim/effects/EffectTaperedPolygon.js +1 -1
- package/symbols/support/symbolUtils.js +1 -1
- package/symbols/support/utils.js +1 -1
- package/time/timeZoneUtils.js +1 -1
- package/undoredo/support/ServiceVersionInfo.js +1 -1
- package/undoredo/support/Services.js +1 -1
- package/views/2d/analysis/ElevationProfile/ElevationProfileLineVisualization2D.js +1 -1
- package/views/2d/engine/Bitmap.js +1 -1
- package/views/2d/engine/flow/dataUtils.js +1 -1
- package/views/2d/engine/vectorTiles/decluttering/SymbolFader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AAnimatedPolyShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedFillShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedLineShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedPolyMeshWriters.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/LineShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/stretch.js +1 -1
- package/views/2d/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiles2D.js +1 -1
- package/views/2d/layers/FeatureLayerView2D.js +1 -1
- package/views/2d/layers/features/FeaturePipelineWorker.js +1 -1
- package/views/2d/layers/features/FeatureSourceEventLog.js +1 -1
- package/views/2d/layers/features/Processor.js +1 -1
- package/views/2d/layers/features/layerAdapters/CatalogFootprintLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/FeatureLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/InMemoryLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/KnowledgeGraphSublayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/OGCFeatureLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/OrientedImageryLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/SubtypeGroupLayerAdapter.js +1 -1
- package/views/2d/layers/features/processor/BinningStrategy.js +1 -1
- package/views/2d/layers/features/processor/ClusterStrategy.js +1 -1
- package/views/2d/layers/features/processor/FeatureUpdateStrategy.js +1 -1
- package/views/2d/layers/features/processor/TrackStrategy.js +1 -1
- package/views/2d/layers/features/schema/ExceedsLimitCache.js +5 -0
- package/views/2d/layers/features/schema/SourceSchema.js +1 -1
- package/views/2d/layers/features/sources/FeatureSource.js +1 -1
- package/views/2d/layers/features/sources/strategies/AFeatureLoadStrategy.js +1 -1
- package/views/2d/layers/features/sources/strategies/ALoadStrategy.js +1 -1
- package/views/2d/layers/features/sources/strategies/FeatureDrillDownTileLoadStrategy.js +1 -1
- package/views/2d/layers/features/sources/strategies/ParquetSnapshotLoadStrategy.js +1 -1
- package/views/2d/layers/features/sources/strategies/ParquetTileLoadStrategy.js +1 -1
- package/views/2d/layers/features/sources/strategies/chunks/Overrides.js +1 -1
- package/views/2d/layers/features/sources/strategies/chunks/SourceChunkStore.js +1 -1
- package/views/2d/layers/features/sources/strategies/constants.js +5 -0
- package/views/2d/layers/features/support/AttributeStore.js +1 -1
- package/views/2d/layers/features/support/FeatureMetadata.js +1 -1
- package/views/2d/layers/graphics/GraphicStore.js +1 -1
- package/views/3d/analysis/Dimension/LengthDimensionSubTool.js +1 -1
- package/views/3d/analysis/ElevationProfile/ElevationProfileGeometryVisualization3D.js +1 -1
- package/views/3d/analysis/ElevationProfile/ElevationProfileLineSceneComputation.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillComputation.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillController.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillVisualization.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementTool.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/volumeMeasurementErrors.js +1 -1
- package/views/3d/interactive/measurementTools/areaMeasurement3D/AreaMeasurement3DTool.js +1 -1
- package/views/3d/interactive/measurementTools/directLineMeasurement3D/DirectLineMeasurement3DTool.js +1 -1
- package/views/3d/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiles3D.js +1 -1
- package/views/3d/layers/FeatureLayerViewBase3D.js +1 -1
- package/views/3d/layers/FlowSubView3D.js +1 -1
- package/views/3d/layers/ImageryTileLayerView3D.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/layers/IntegratedMeshLayerView3D.js +1 -1
- package/views/3d/layers/PointCloudLayerView3D.js +1 -1
- package/views/3d/layers/TiledLayerView3D.js +1 -1
- package/views/3d/layers/graphics/FeatureGraphics3DGraphicsPipeline.js +1 -1
- package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DFeatureStore.js +1 -1
- package/views/3d/layers/graphics/Graphics3DLineSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/defaultSymbolComplexity.js +1 -1
- package/views/3d/layers/graphics/pipeline/Feature3DPipeline.js +1 -1
- package/views/3d/layers/i3s/I3SOverrides.js +1 -1
- package/views/3d/layers/support/FeatureTile.js +1 -1
- package/views/3d/layers/support/FeatureTileFetcher3D.js +1 -1
- package/views/3d/layers/support/FeatureTileFetcher3DContext.js +1 -1
- package/views/3d/layers/support/ImageHighlightHelper3D.js +1 -1
- package/views/3d/layers/support/SampledGeometryMaxDistanceRatio.js +5 -0
- package/views/3d/state/controllers/PinchAndPanControllerGlobal.js +1 -1
- package/views/3d/state/controllers/PinchAndPanControllerLocal.js +1 -1
- package/views/3d/state/controllers/RotateController.js +1 -1
- package/views/3d/state/controllers/ZoomControllerGlobal.js +1 -1
- package/views/3d/state/controllers/ZoomControllerLocal.js +1 -1
- package/views/3d/state/controllers/ZoomStepControllerGlobal.js +1 -1
- package/views/3d/state/controllers/ZoomStepControllerLocal.js +1 -1
- package/views/3d/state/utils/navigationUtils.js +1 -1
- package/views/3d/support/DisplayQualityProfile.js +1 -1
- package/views/3d/support/QualitySettings.js +1 -1
- package/views/3d/support/engineContent/line.js +1 -1
- package/views/3d/support/flow/FlowSubViewExtent3D.js +1 -1
- package/views/3d/support/flow/FlowSubViewTiles3D.js +1 -1
- package/views/3d/support/flow/FlowWorker.js +1 -1
- package/views/3d/support/flow/FlowWorkerHandle.js +1 -1
- package/views/3d/support/flow/StreamlineResources3D.js +1 -1
- package/views/3d/support/flow/StreamlineResources3DOverlay.js +1 -1
- package/views/3d/support/flow/StreamlineResources3DShape.js +1 -1
- package/views/3d/support/flow/constants.js +1 -1
- package/views/3d/support/flow/geometryUtils.js +1 -1
- package/views/3d/support/flow/loadUtils.js +1 -1
- package/views/3d/support/hitTest.js +1 -1
- package/views/3d/support/popupHitTest.js +1 -1
- package/views/3d/terrain/OverlayRenderer.js +1 -1
- package/views/3d/terrain/TerrainSurface.js +1 -1
- package/views/3d/terrain/TileAgent.js +1 -1
- package/views/3d/webgl-engine/effects/glow/GlowRenderNode.js +1 -1
- package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
- package/views/3d/webgl-engine/lib/CutFillDepth.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lighting/SceneLighting.js +1 -1
- package/views/3d/webgl-engine/materials/CheckerBoardMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/ShadedColorMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/MergedBuffer.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/VaoWriter.js +1 -1
- package/views/3d/webgl-engine/shaders/AnimatedLine.glsl.js +10 -4
- package/views/SceneView.js +1 -1
- package/views/VideoView.js +1 -1
- package/views/analysis/ElevationProfile/ElevationProfileController.js +1 -1
- package/views/analysis/ElevationProfile/ElevationProfileLineInputComputation.js +1 -1
- package/views/analysis/ElevationProfile/ElevationProfileResult.js +1 -1
- package/views/analysis/ElevationProfile/ElevationProfileTool.js +1 -1
- package/views/analysis/ElevationProfile/constants.js +1 -1
- package/views/analysis/ElevationProfile/elevationProfileGenerationUtils.js +1 -1
- package/views/analysis/ElevationProfile/elevationProfileGeometryUtils.js +1 -1
- package/views/analysis/ElevationProfile/types.d.ts +5 -0
- package/views/analysis/ElevationProfile/types.js +5 -0
- package/views/draw/support/Reshape.js +1 -1
- package/views/interactive/dragEventPipeline.js +1 -1
- package/views/interactive/snapping/featureSources/FeatureServiceSnappingSource.js +1 -1
- package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceSnappingSourceWorkerHandle.js +1 -1
- package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTileStore.js +1 -1
- package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiledFetcher.js +1 -1
- package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTilesSimple.js +1 -1
- package/views/layers/FeatureLayerView.js +1 -1
- package/views/popupAdapter.js +1 -1
- package/views/support/LayerViewManager.js +1 -1
- package/views/support/PromiseQueue.js +1 -1
- package/views/support/Scheduler.js +1 -1
- package/views/support/TextureCompressionWorker.js +1 -1
- package/views/ui/UI.js +1 -1
- package/views/webgl/Texture.js +1 -1
- package/widgets/Attachments/AttachmentsViewModel.js +1 -1
- package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js +1 -1
- package/widgets/BatchAttributeForm/batchAttributeFormUtils.js +1 -1
- package/widgets/BatchAttributeForm/inputs/FieldInput.js +1 -1
- package/widgets/BatchAttributeForm/inputs/InputBase.js +1 -1
- package/widgets/BatchAttributeForm/templates/support/createBatchFormTemplate.js +1 -1
- package/widgets/BatchAttributeForm.js +1 -1
- package/widgets/CoordinateConversion/CoordinateConversionViewModel.js +1 -1
- package/widgets/CoordinateConversion.js +1 -1
- package/widgets/Directions/css.js +1 -1
- package/widgets/Directions.js +1 -1
- package/widgets/Editor/AddAssociationWorkflow.js +1 -1
- package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
- package/widgets/Editor/EditorViewModel.js +1 -1
- package/widgets/Editor/Edits.js +1 -1
- package/widgets/Editor/MergeFeaturesWorkflow.d.ts +4 -0
- package/widgets/Editor/MergeFeaturesWorkflow.js +5 -0
- package/widgets/Editor/MergeFeaturesWorkflowData.d.ts +4 -0
- package/widgets/Editor/MergeFeaturesWorkflowData.js +5 -0
- package/widgets/Editor/SplitFeatureWorkflow.js +1 -1
- package/widgets/Editor/SplitFeatureWorkflowData.js +1 -1
- package/widgets/Editor/UpdateFeatureWorkflow.js +1 -1
- package/widgets/Editor/UpdateFeaturesWorkflow.js +1 -1
- package/widgets/Editor/UpdateFeaturesWorkflowData.js +1 -1
- package/widgets/Editor/UpdateRecordWorkflow.js +1 -1
- package/widgets/Editor/UpdateRecordWorkflowData.js +1 -1
- package/widgets/Editor/UpdateWorkflow.js +1 -1
- package/widgets/Editor/UpdateWorkflowData.js +1 -1
- package/widgets/Editor/VisibleElements.js +1 -1
- package/widgets/Editor/Workflow.js +1 -1
- package/widgets/Editor/components/CreateFeaturesPanelContent.js +1 -1
- package/widgets/Editor/components/FeatureList.js +1 -1
- package/widgets/Editor/components/MergeFeaturesList.js +5 -0
- package/widgets/Editor/components/Notices.js +1 -1
- package/widgets/Editor/components/PanelContent.js +1 -1
- package/widgets/Editor/components/PendingFeatureList.js +1 -1
- package/widgets/Editor/components/UpdateFeaturePanelContent.js +1 -1
- package/widgets/Editor/components/workflowAdapters/pendingFeatureList/SplitFeatureWorkflowPendingFeatureListAdapter.js +1 -1
- package/widgets/Editor/css.js +1 -1
- package/widgets/Editor/support/EditorItem.js +1 -1
- package/widgets/Editor/support/SketchController.js +1 -1
- package/widgets/Editor/support/errors.js +5 -0
- package/widgets/Editor/support/mergeFeaturesUtils.js +5 -0
- package/widgets/Editor/support/splitFeatureUtils.js +1 -1
- package/widgets/Editor/workflowUtils.js +1 -1
- package/widgets/Editor.js +1 -1
- package/widgets/Feature/FeatureFields/FeatureFieldsViewModel.js +1 -1
- package/widgets/Feature/FeatureFields.js +1 -1
- package/widgets/Feature/FeatureMedia/FeatureMediaViewModel.js +1 -1
- package/widgets/Feature/FeatureMedia.js +1 -1
- package/widgets/Feature/FeatureViewModel.js +1 -1
- package/widgets/Feature/support/featureUtils.js +1 -1
- package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/FeatureFormUtilityNetworkAssociationList.js +1 -1
- package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/UtilityNetworkAssociationSettings.js +1 -1
- package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
- package/widgets/FeatureForm/FieldInput.js +1 -1
- package/widgets/FeatureForm/InputBase.js +1 -1
- package/widgets/FeatureForm/RelationshipInput.js +1 -1
- package/widgets/FeatureForm/featureFormUtils.js +1 -1
- package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
- package/widgets/FeatureTable/FieldColumn.js +1 -1
- package/widgets/FeatureTable/Grid/Column.js +1 -1
- package/widgets/FeatureTable/Grid/GridViewModel.js +1 -1
- package/widgets/Legend/LegendViewModel.js +1 -1
- package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
- package/widgets/Legend/support/utils.js +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/adapters/sketch/MeasurementAdapter.js +1 -1
- package/widgets/OrientedImageryViewer/adapters/sketch/TriangulatedMeasurementAdapter.js +1 -1
- package/widgets/OrientedImageryViewer/adapters/view/MapViewAdapter.js +1 -1
- package/widgets/OrientedImageryViewer/adapters/view/SceneViewAdapter.js +1 -1
- package/widgets/OrientedImageryViewer/components/OrientedImageryVideoViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/components/SequentialNavigationUI.js +1 -1
- package/widgets/OrientedImageryViewer/components/SketchTools.js +1 -1
- package/widgets/OrientedImageryViewer/imageMeasurementUtils.js +1 -1
- package/widgets/OrientedImageryViewer/services/DepthImageService.js +1 -1
- package/widgets/OrientedImageryViewer/services/ImageMeasurementService.js +1 -1
- package/widgets/OrientedImageryViewer.js +1 -1
- package/widgets/PanoramicVideoViewer.js +1 -1
- package/widgets/PanoramicViewer/PanoramicViewerViewModel.js +1 -1
- package/widgets/PanoramicViewer/PanoramicZoomManager.js +1 -1
- package/widgets/PanoramicViewer/support/PanoramicMeshManager.js +1 -1
- package/widgets/PanoramicViewer/support/PanoramicTileNode.js +1 -1
- package/widgets/PanoramicViewer/support/PanoramicTilePyramid.js +1 -1
- package/widgets/PanoramicViewer/support/getVisibleTiles.js +5 -0
- package/widgets/Print.js +1 -1
- package/widgets/Search/LayerSearchSource.js +1 -1
- package/widgets/Sketch/SketchViewModel.js +1 -1
- package/widgets/Sketch.js +1 -1
- package/widgets/UtilityNetworkTrace/UtilityNetworkTraceViewModel.js +1 -1
- package/widgets/UtilityNetworkTrace.js +1 -1
- package/widgets/VideoPlayer/VideoPlayerViewModel.js +1 -1
- package/widgets/support/ColorPicker.js +1 -1
- package/widgets/support/FilterCondition.js +1 -1
- package/widgets/support/SelectionList/GroupLayerItem.js +1 -1
- package/widgets/support/SelectionList/LayerItem.js +1 -1
- package/widgets/support/SelectionList/SelectionListViewModel.js +1 -1
- package/widgets/support/SelectionList/VisibleElements.js +1 -1
- package/widgets/support/SelectionList/selectionListUtils.js +1 -1
- package/widgets/support/SelectionList.js +1 -1
- package/widgets/support/UtilityNetworkAssociations/FeatureUtilityNetworkAssociationsViewModel.js +1 -1
- package/widgets/support/iconUtils.js +1 -1
- package/widgets/support/jsxWidgetSupport.js +1 -1
- package/assets/esri/core/workers/chunks/02bc183e30e3392bb76d.js +0 -1
- package/assets/esri/core/workers/chunks/05eee334d58a0b9f6316.js +0 -1
- package/assets/esri/core/workers/chunks/14ace5dc4b8984212a57.js +0 -1
- package/assets/esri/core/workers/chunks/1762ff76350065750c75.js +0 -1
- package/assets/esri/core/workers/chunks/1b85967d1178956ee36b.js +0 -1
- package/assets/esri/core/workers/chunks/1fd459234917a51b6ae1.js +0 -1
- package/assets/esri/core/workers/chunks/22bb877b85ae250d7819.js +0 -1
- package/assets/esri/core/workers/chunks/24921d31efa8d222ad2d.js +0 -2
- package/assets/esri/core/workers/chunks/24b97ba933324aea6a07.js +0 -1
- package/assets/esri/core/workers/chunks/25639559336109ff3df1.js +0 -1
- package/assets/esri/core/workers/chunks/2795a2817ebe3298c350.js +0 -1
- package/assets/esri/core/workers/chunks/326a76a4e80269d4029d.js +0 -1
- package/assets/esri/core/workers/chunks/3b65d6a78fbffca37fbd.js +0 -1
- package/assets/esri/core/workers/chunks/456161a323be7d640c61.js +0 -1
- package/assets/esri/core/workers/chunks/459a67928bde4a62b6a4.js +0 -1
- package/assets/esri/core/workers/chunks/48646f3d95a3f2b17e78.js +0 -1
- package/assets/esri/core/workers/chunks/50a5caa96c111dda5c60.js +0 -1
- package/assets/esri/core/workers/chunks/5713f96bade5ebb54c81.js +0 -1
- package/assets/esri/core/workers/chunks/5a527a47285a5995cff9.js +0 -1
- package/assets/esri/core/workers/chunks/5c585b338a9e9aa0e205.js +0 -1
- package/assets/esri/core/workers/chunks/5cb92abb1f0f38bd0eab.js +0 -1
- package/assets/esri/core/workers/chunks/6201356f7f91e5c06425.js +0 -1
- package/assets/esri/core/workers/chunks/63019a7eb5222dc5e420.js +0 -1
- package/assets/esri/core/workers/chunks/630efe10c871425b6a95.js +0 -1
- package/assets/esri/core/workers/chunks/65111858957f43eacd8c.js +0 -1
- package/assets/esri/core/workers/chunks/6f4bd0ee85e7e5a74340.js +0 -1
- package/assets/esri/core/workers/chunks/701a1835684cf815bcb7.js +0 -1
- package/assets/esri/core/workers/chunks/7421f9575487cdc9e28e.js +0 -1
- package/assets/esri/core/workers/chunks/7633537dc0c65d655baf.js +0 -1
- package/assets/esri/core/workers/chunks/78b35a19332e58c8c279.js +0 -1
- package/assets/esri/core/workers/chunks/7fa324900c147ba51019.js +0 -1
- package/assets/esri/core/workers/chunks/83ab8c8bc9e6990114a8.js +0 -1
- package/assets/esri/core/workers/chunks/9c6fc4fe2c46f40d63d9.js +0 -1
- package/assets/esri/core/workers/chunks/a19063456ce21b471b69.js +0 -1
- package/assets/esri/core/workers/chunks/a8f998b8ec8c56150479.js +0 -2
- package/assets/esri/core/workers/chunks/ae8c387d59be87457567.js +0 -1
- package/assets/esri/core/workers/chunks/b1f667006cba60ef4aa7.js +0 -1
- package/assets/esri/core/workers/chunks/b2d9f4e057af26a538fb.js +0 -1
- package/assets/esri/core/workers/chunks/b54202dcab8df080e991.js +0 -1
- package/assets/esri/core/workers/chunks/ba212ba895ccf573eedf.js +0 -1
- package/assets/esri/core/workers/chunks/bcff6178e9d16b1b6191.js +0 -1
- package/assets/esri/core/workers/chunks/cf13625a033f9903655f.js +0 -1
- package/assets/esri/core/workers/chunks/deb2854bb7d082a26f52.js +0 -1
- package/assets/esri/core/workers/chunks/e0bbfbe1ed39c82f1bd4.js +0 -1
- package/assets/esri/core/workers/chunks/eb1a7bb8b14e651bc241.js +0 -1
- package/assets/esri/core/workers/chunks/ed5f5852983bf3070fe6.js +0 -1
- package/assets/esri/core/workers/chunks/f09242e97196ad177c10.js +0 -1
- package/assets/esri/core/workers/chunks/f154336b4af011cd0c56.js +0 -1
- package/assets/esri/core/workers/chunks/f1be3a177328a169128f.js +0 -1
- package/assets/esri/core/workers/chunks/f7846523adacbfe5047e.js +0 -1
- package/assets/esri/core/workers/chunks/f7a9d2da07196a0989ae.js +0 -1
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import has from"../../../core/has.js";import e from"../../../core/Logger.js";import{replace as t}from"../../../core/string.js";import{convertDateFormatToIntlOptions as n,formatDate as r}from"../../../intl/date.js";import{formatNumber as i,convertNumberFormatToIntlOptions as o}from"../../../intl/number.js";import{isRasterPixelValueField as a,featureHasFields as l,isTimeOnlyField as u}from"../../../layers/support/fieldUtils.js";import{getEffectiveLayerCapabilities as s}from"../../../layers/support/layerUtils.js";import{formatAnyDate as f,isAnyDateField as c}from"../../../smartMapping/support/utils.js";import{loadArcade as d}from"../../../support/loadArcade.js";import{getTimeZoneFormattingOptions as p}from"../../../time/timeZoneUtils.js";const y="esri.widgets.Feature.support.featureUtils",m=()=>e.getLogger(y),b=/href=(""|'')/gi,g=/(\{([^{\r\n]+)\})/g,I=/'/g,h=/^\s*expression\//i,w=/(\n)/gi,F=/[\u00A0-\u9999<>&]/gim,T=/href\s*=\s*(?:"([^"]+)"|'([^']+)')/gi,N=/^(?:mailto:|tel:)/,j="relationships/",Z=n("short-date-short-time");function L(e){if(null!=e)return(e.sourceLayer||e.layer)??void 0}async function q({type:e,value:t,event:n}){try{return"function"==typeof t?t(n):await t}catch(r){return void m().error("error",`An error occurred when calling the "${e}" function`,{error:r,graphic:n.graphic,value:t})}}function x(e=""){if(e)return!N.test(e.trim().toLowerCase())}function E(e){return!!e&&h.test(e)}function U(e,t){if(!t||!E(t)||!e)return;const n=t.replace(h,"").toLowerCase();return e.find(({name:e})=>e.toLowerCase()===n)}function v(e,t){const n=U(t,e?.fieldName);return n?n.title||null:e?e.label||e.fieldName:null}function A(e,t){const n=t.get(e.toLowerCase());return`{${n?.fieldName||e}}`}function C(e){return e.replaceAll(b,"")}function M(e,t){const n=R(t,e);return n?n.name:e}function k(e,t){return e&&e.map(e=>M(e,t))}function R(e,t){return e&&"function"==typeof e.getField&&t?e.getField(t)??null:null}function $(e){return`${e}`.trim()}function D({attributes:e,globalAttributes:t,layer:n,text:r,expressionAttributes:i,fieldInfoMap:o}){return r?z({formattedAttributes:t,template:P(r,{...t,...i,...e},n),fieldInfoMap:o}):""}function z({formattedAttributes:e,template:n,fieldInfoMap:r}){return $(C(t(t(n,e=>A(e,r)),e)))}function O(e,t,n=!1){const r=t[e];if("string"==typeof r){const i="%27",o=(n?encodeURIComponent(r):r).replaceAll(I,i);t[e]=o}}function S(e,t=!1){const n={...e};return Object.keys(n).forEach(e=>O(e,n,t)),n}function G(e,n,r){const i=(n=$(n))&&!n.startsWith("{");return t(e,S(r,i||!1))}function Q(e,t){return e.replaceAll(g,(e,n,r)=>{const i=R(t,r);return i?`{${i.name}}`:n})}function P(e,t,n){const r=Q(e,n);return r?r.replaceAll(T,(e,n,r)=>G(e,n||r,t)):r}function _(e,t){if("string"==typeof e&&t&&null==t.dateFormat&&(null!=t.places||null!=t.digitSeparator)){const t=Number(e);if(!isNaN(t))return t}return e}function H(e){return null!=e&&"object"==typeof e&&"fieldsIndex"in e&&"geometryType"in e&&"getField"in e&&"load"in e&&"loaded"in e&&"objectIdField"in e&&"spatialReference"in e&&"type"in e&&("feature"===e.type||"scene"===e.type||"subtype-group"===e.type||"subtype-sublayer"===e.type||"sublayer"===e.type)&&"when"in e}function W(e){return null!=e&&"object"==typeof e&&"createQuery"in e&&"queryFeatureCount"in e&&"queryObjectIds"in e&&"queryRelatedFeatures"in e&&"queryRelatedFeaturesCount"in e&&"relationships"in e}function B(e){return H(e)&&W(e)}function J(e){return!(!(e&&"object"==typeof e&&"createQuery"in e&&"getField"in e&&"queryFeatureCount"in e&&"queryFeatures"in e&&"queryObjectIds"in e&&"capabilities"in e&&"fields"in e&&"fieldsIndex"in e&&"type"in e)||"feature"!==e.type&&"subtype-group"!==e.type&&"subtype-sublayer"!==e.type&&"sublayer"!==e.type||!("when"in e))&&("subtype-sublayer"===e.type&&"parent"in e&&e.parent&&"object"==typeof e.parent?"globalIdField"in e.parent:"globalIdField"in e)}function K(e){return!!e&&"object"==typeof e&&"sourceLayer"in e&&B(e.sourceLayer)}function V(e,t){const{fieldInfos:n,fieldName:r,preventPlacesFormatting:l,layer:u,timeZone:s}=t,c=ee(n,r),d=R(u,r);if(c&&!a(r)){const t=d?.type,n=c.format?.dateFormat;if("date"===t||"date-only"===t||"time-only"===t||"timestamp-offset"===t||n)return f(e,{format:n,fieldType:t,timeZoneOptions:{layerTimeZone:u&&"preferredTimeZone"in u?u.preferredTimeZone:null,viewTimeZone:s,datesInUnknownTimezone:!(!u||!("datesInUnknownTimezone"in u))&&!!u.datesInUnknownTimezone}})}const p=c?.format;return"string"==typeof e&&a(r)&&p?X(e,p):"string"==typeof(e=_(e,p))||null==e||null==p?le(e):i(e,l?{...o(p),minimumFractionDigits:0,maximumFractionDigits:20}:o(p))}function X(e,t){return e=e.trim(),/\d{2}-\d{2}/.test(e)?e:e.includes(",")?Y(e,",",", ",t):e.includes(";")?Y(e,";","; ",t):e.includes(" ")?Y(e," "," ",t):i(Number(e),o(t))}function Y(e,t,n,r){return e.trim().split(t).map(e=>i(Number(e),o(r))).join(n)}function ee(e,t){if(e?.length&&t)return e.find(e=>e.fieldName?.toLowerCase()===t.toLowerCase())}function te({fieldName:e,graphic:t,layer:n}){if(ye(e))return null;if(!n||"function"!=typeof n.getFeatureType)return null;const{typeIdField:r}=n;if(!r||e!==r)return null;const i=n.getFeatureType(t);return i?i.name:null}function ne({fieldName:e,value:t,graphic:n,layer:r}){if(ye(e))return null;if(!r||"function"!=typeof r.getFieldDomain)return null;const i=n&&r.getFieldDomain(e,{feature:n,excludeImpliedDomains:has("esri-widget-legacy-field-domain-calculation")});return i&&"coded-value"===i.type?i.getName(t):null}function re(e,t,n,i){const{creatorField:o,creationDateField:a,editorField:l,editDateField:u}=e;if(!t)return;const s=p(i&&"preferredTimeZone"in i?i.preferredTimeZone:null,!(!i||!("datesInUnknownTimezone"in i))&&!!i.datesInUnknownTimezone,n,Z,"date"),f={...Z,...s},c=t[u];if("number"==typeof c){const e=t[l];return{type:"edit",date:r(c,f),user:e}}const d=t[a];if("number"==typeof d){const e=t[o];return{type:"create",date:r(d,f),user:e}}return null}function ie(e,t){const n=new Map;if(!e)return n;for(const r of e){if(!r.fieldName)continue;const e=M(r.fieldName,t);r.fieldName=e,n.set(e.toLowerCase(),r)}return n}function oe(e){const t=[];if(!e)return t;const{fieldInfos:n,content:r}=e;return n&&t.push(...n),r&&Array.isArray(r)?(r.forEach(e=>{if("fields"===e.type){const n=e?.fieldInfos;n&&t.push(...n)}}),t):t}function ae(e){return e.replaceAll(F,e=>`&#${e.charCodeAt(0)};`)}function le(e){return"string"==typeof e?e.replaceAll(w,'<br class="esri-text-new-line" />'):e}function ue(e){const{value:t,fieldName:n,fieldInfos:r,fieldInfoMap:i,layer:o,graphic:a,timeZone:l}=e;if(null==t)return"";const s=ne({fieldName:n,value:t,graphic:a,layer:o});if(s)return s;const d=te({fieldName:n,graphic:a,layer:o});if(d)return d;if(i.get(n.toLowerCase()))return V(t,{fieldInfos:r||Array.from(i.values()),fieldName:n,layer:o,timeZone:l});const p=o?.fieldsIndex?.get(n);return p&&(c(p)||u(p))?f(t,{fieldType:p.type,timeZoneOptions:{layerTimeZone:o&&"preferredTimeZone"in o?o.preferredTimeZone:null,viewTimeZone:l,datesInUnknownTimezone:!(!o||!("datesInUnknownTimezone"in o))&&!!o.datesInUnknownTimezone}}):le(t)}function se({fieldInfos:e,attributes:t,layer:n,graphic:r,fieldInfoMap:i,relatedInfos:o,timeZone:a}){const l={};return o?.forEach(t=>ge({attributes:l,relatedInfo:t,fieldInfoMap:i,fieldInfos:e,layer:n,timeZone:a})),t&&Object.keys(t).forEach(o=>{const u=t[o];l[o]=ue({fieldName:o,fieldInfos:e,fieldInfoMap:i,layer:n,value:u,graphic:r,timeZone:a})}),l}async function fe(e,t){const{layer:n,graphic:r,outFields:i,objectIds:o,returnGeometry:a,spatialReference:l}=e,u=o[0];if("number"!=typeof u&&"string"!=typeof u){const e="Could not query required fields for the specified feature. The feature's ID is invalid.",t={layer:n,graphic:r,objectId:u,requiredFields:i};return m().warn(e,t),null}if(!s(n)?.operations?.supportsQuery){const e="The specified layer cannot be queried. The following fields will not be available.",t={layer:n,graphic:r,requiredFields:i,returnGeometry:a};return m().warn(e,t),null}const f=n.createQuery();f.objectIds=o,f.outFields=i?.length?i:[n.objectIdField],f.returnGeometry=!!a,f.returnZ=!!a,f.returnM=!!a,f.outSpatialReference=l;return(await n.queryFeatures(f,t)).features[0]}async function ce(e){if(!e.expressionInfos?.length)return!1;const t=await d(),{arcadeUtils:{hasGeometryFunctions:n}}=t;return n(e)}async function de(e){if(!e.expressionInfos?.length)return!1;const t=await d(),{arcadeUtils:{requiresTrack:n}}=t;return n(e)}async function pe({graphic:e,popupTemplate:t,layer:n,spatialReference:r},i){if(!n||!t)return;if("function"==typeof n.load&&await n.load(i),!e.attributes)return;const o=n.objectIdField,a=e.attributes[o];if(null==a)return;const u=[a],s=new Set(await t.getRequiredFields(n.fieldsIndex));null==n.timeInfo?.trackIdField||s.has(n.timeInfo.trackIdField)||await de(t)&&s.add(n.timeInfo.trackIdField);const f=l(e,s),c=f?[]:s.has(o)?[...s]:[...s,o],d=t.returnGeometry||await ce(t);if(f&&!d)return;const p=await fe({layer:n,graphic:e,outFields:c,objectIds:u,returnGeometry:d,spatialReference:r},i);p&&(p.geometry&&(e.geometry=p.geometry),p.attributes&&(e.attributes={...e.attributes,...p.attributes}))}function ye(e=""){return!!e&&e.includes(j)}function me(e){return e?`${j}${e.layerId}/${e.fieldName}`:""}function be({attributes:e,graphic:t,relatedInfo:n,fieldInfos:r,fieldInfoMap:i,layer:o,timeZone:a}){e&&t&&n&&Object.keys(t.attributes).forEach(l=>{const u=me({layerId:n.relation.id.toString(),fieldName:l}),s=t.attributes[l];e[u]=ue({fieldName:u,fieldInfos:r,fieldInfoMap:i,layer:o,value:s,graphic:t,timeZone:a})})}function ge({attributes:e,relatedInfo:t,fieldInfoMap:n,fieldInfos:r,layer:i,timeZone:o}){e&&t&&(t.relatedFeatures?.forEach(a=>be({attributes:e,graphic:a,relatedInfo:t,fieldInfoMap:n,fieldInfos:r,layer:i,timeZone:o})),t.relatedStatsFeatures?.forEach(a=>be({attributes:e,graphic:a,relatedInfo:t,fieldInfoMap:n,fieldInfos:r,layer:i,timeZone:o})))}const Ie=e=>{if(!e)return!1;const t=e.toUpperCase();return t.includes("CURRENT_TIMESTAMP")||t.includes("CURRENT_DATE")||t.includes("CURRENT_TIME")},he=({layer:e,method:t,query:n,definitionExpression:r})=>{if(!e.capabilities?.query?.supportsCacheHint||"attachments"===t)return;const i=null!=n.where?n.where:null,o=null!=n.geometry?n.geometry:null;Ie(r)||Ie(i)||"extent"===o?.type||"tile"===n.resultType||(n.cacheHint=!0)},we=({query:e,layer:t,method:n})=>{he({layer:t,method:n,query:e,definitionExpression:`${t.definitionExpression} ${t.serviceDefinitionExpression??""}`})},Fe=({queryPayload:e,layer:t,method:n})=>{he({layer:t,method:n,query:e,definitionExpression:`${t.definitionExpression} ${t.serviceDefinitionExpression??""}`})};function Te(e,t,n){return e&&t&&n?"sublayer"===t.type?Ze({layers:t.layer?.allSublayers,map:e,relatedLayer:t,relationship:n})||Ze({layers:t.layer?.subtables,map:e,relatedLayer:t,relationship:n}):Ze({layers:e.allLayers,map:e,relatedLayer:t,relationship:n})||Ze({layers:e.allTables,map:e,relatedLayer:t,relationship:n}):null}function Ne(e,t){return e&&"utilityNetworks"in e&&t?e.utilityNetworks?.find(e=>e.isUtilityLayer(t)):null}function je(e,t){return e?.allTables.find(e=>"feature"===e.type&&e.layerId===t.id&&e.url===t.layer?.url)}function Ze({map:e,relationship:t,relationship:{relatedTableId:n},relatedLayer:r,layers:i}){if(!i)return null;for(const o of i){if("map-image"===o.type){const n=Ze({layers:o.sublayers,map:e,relatedLayer:r,relationship:t})||Ze({layers:o.subtables,map:e,relatedLayer:r,relationship:t});if(n)return n;continue}if(!B(o))continue;if("sublayer"===r.type){if(o!==r&&o.id===n)return o.isTable?je(e,o):o;continue}const i="scene"===r.type&&r.associatedLayer?r.associatedLayer.url:r.url;if(!i)return null;if("sublayer"!==o.type){if(o!==r&&o.url===i&&o.layerId===n)return o}else if(o!==r&&o.layer?.url===i&&o.id===n)return o.isTable?je(e,o):o}return null}export{le as applyTextFormattingHTML,ie as createFieldInfoMap,Te as findRelatedLayer,Ne as findUtilityNetwork,Q as fixTokens,se as formatAttributes,re as formatEditInfo,V as formatValueToFieldInfo,oe as getAllFieldInfos,ee as getFieldInfo,v as getFieldInfoLabel,M as getFixedFieldName,k as getFixedFieldNames,L as getSourceLayer,q as graphicCallback,ae as htmlEntities,J as isAssociatedFeatureSupportedLayer,E as isExpressionField,H as isFeatureSupportedLayer,K as isGraphicForRelatableFeatureSupportedLayer,B as isRelatableFeatureSupportedLayer,W as isRelatableLayer,ye as isRelatedField,we as preLayerQueryCallback,Fe as preRequestCallback,fe as querySourceLayer,pe as queryUpdatedFeature,x as shouldOpenInNewTab,z as substituteAttributes,D as substituteFieldsInLinksAndAttributes};
|
|
5
|
+
import has from"../../../core/has.js";import e from"../../../core/Logger.js";import{replace as t}from"../../../core/string.js";import{convertDateFormatToIntlOptions as n,formatDate as r}from"../../../intl/date.js";import{convertNumberFieldFormatToIntlOptions as i,convertNumberFormatToIntlOptions as o,formatNumber as a}from"../../../intl/number.js";import{fieldFormatFromFieldInfo as l}from"../../../layers/support/fieldFormatUtils.js";import{isRasterPixelValueField as u,featureHasFields as s,isTimeOnlyField as f}from"../../../layers/support/fieldUtils.js";import{supportsFieldConfiguration as d,getEffectiveLayerCapabilities as c}from"../../../layers/support/layerUtils.js";import{formatAnyDate as p,isAnyDateField as y}from"../../../smartMapping/support/utils.js";import{loadArcade as m}from"../../../support/loadArcade.js";import{getTimeZoneFormattingOptions as g}from"../../../time/timeZoneUtils.js";const I="esri.widgets.Feature.support.featureUtils",b=()=>e.getLogger(I),h=/href=(""|'')/gi,F=/(\{([^{\r\n]+)\})/g,w=/'/g,T=/^\s*expression\//i,N=/(\n)/gi,j=/[\u00A0-\u9999<>&]/gim,C=/href\s*=\s*(?:"([^"]+)"|'([^']+)')/gi,Z=/^(?:mailto:|tel:)/,v="relationships/",L=n("short-date-short-time");function x(e){if(null!=e)return(e.sourceLayer||e.layer)??void 0}async function q({type:e,value:t,event:n}){try{return"function"==typeof t?t(n):await t}catch(r){return void b().error("error",`An error occurred when calling the "${e}" function`,{error:r,graphic:n.graphic,value:t})}}function A(e=""){if(e)return!Z.test(e.trim().toLowerCase())}function U(e){return!!e&&T.test(e)}function E(e,t){if(!t||!U(t)||!e)return;const n=t.replace(T,"").toLowerCase();return e.find(({name:e})=>e.toLowerCase()===n)}function M({fieldInfo:e,graphic:t}){return!(!e?.fieldName||U(e.fieldName)||he(e.fieldName)||t?.isAggregate||t?.popupTemplate)}function k({expressionInfos:e,fieldInfo:t,graphic:n,isContentFieldInfos:r,layer:i}){if(!t?.fieldName)return null;const o=E(e,t.fieldName);if(o)return o.title||null;if(d(i)&&M({fieldInfo:t,graphic:n})){const e=i.getFieldAlias(t.fieldName);return r?t.label||e||t.fieldName:e||t.fieldName}return t.label||t.fieldName}function R({fieldInfo:e,isContentFieldInfos:t,layer:n}){if(!e?.fieldName)return null;if(d(n)){const r=n.popupTemplate||n.fieldConfigurations?n.getFieldConfiguration(e.fieldName)?.fieldFormat:l(e,n.getField(e.fieldName));return t&&e.fieldFormat||r}return null}function $(e,t){const n=t.get(e.toLowerCase());return`{${n?.fieldName||e}}`}function D(e){return e.replaceAll(h,"")}function z(e,t){const n=S(t,e);return n?n.name:e}function O(e,t){return e&&e.map(e=>z(e,t))}function S(e,t){return e&&"function"==typeof e.getField&&t?e.getField(t)??null:null}function G(e){return`${e}`.trim()}function Q({attributes:e,globalAttributes:t,layer:n,text:r,expressionAttributes:i,fieldInfoMap:o}){return r?P({formattedAttributes:t,template:J(r,{...t,...i,...e},n),fieldInfoMap:o}):""}function P({formattedAttributes:e,template:n,fieldInfoMap:r}){return G(D(t(t(n,e=>$(e,r)),e)))}function _(e,t,n=!1){const r=t[e];if("string"==typeof r){const i="%27",o=(n?encodeURIComponent(r):r).replaceAll(w,i);t[e]=o}}function H(e,t=!1){const n={...e};return Object.keys(n).forEach(e=>_(e,n,t)),n}function W(e,n,r){const i=(n=G(n))&&!n.startsWith("{");return t(e,H(r,i||!1))}function B(e,t){return e.replaceAll(F,(e,n,r)=>{const i=S(t,r);return i?`{${i.name}}`:n})}function J(e,t,n){const r=B(e,n);return r?r.replaceAll(C,(e,n,r)=>W(e,n||r,t)):r}function K(e,t){const n="number"===t?.fieldFormat?.type||t?.format&&null==t.format.dateFormat&&(null!=t.format.places||null!=t.format.digitSeparator);if("string"==typeof e&&n){const t=Number(e);if(!isNaN(t))return t}return e}function V(e){return null!=e&&"object"==typeof e&&"fieldsIndex"in e&&"geometryType"in e&&"getField"in e&&"load"in e&&"loaded"in e&&"objectIdField"in e&&"spatialReference"in e&&"type"in e&&("feature"===e.type||"scene"===e.type||"subtype-group"===e.type||"subtype-sublayer"===e.type||"sublayer"===e.type)&&"when"in e}function X(e){return null!=e&&"object"==typeof e&&"createQuery"in e&&"queryFeatureCount"in e&&"queryObjectIds"in e&&"queryRelatedFeatures"in e&&"queryRelatedFeaturesCount"in e&&"relationships"in e}function Y(e){return V(e)&&X(e)}function ee(e){return!(!(e&&"object"==typeof e&&"createQuery"in e&&"getField"in e&&"queryFeatureCount"in e&&"queryFeatures"in e&&"queryObjectIds"in e&&"capabilities"in e&&"fields"in e&&"fieldsIndex"in e&&"type"in e)||"feature"!==e.type&&"subtype-group"!==e.type&&"subtype-sublayer"!==e.type&&"sublayer"!==e.type||!("when"in e))&&("subtype-sublayer"===e.type&&"parent"in e&&e.parent&&"object"==typeof e.parent?"globalIdField"in e.parent:"globalIdField"in e)}function te(e){return!!e&&"object"==typeof e&&"sourceLayer"in e&&Y(e.sourceLayer)}function ne(e,t){const{fieldInfos:n,fieldName:r,graphic:l,isContentFieldInfos:s,layer:f,preventPlacesFormatting:c,timeZone:y}=t,m=oe(n,r),g=S(f,r),I=d(f)&&M({fieldInfo:m,graphic:l}),b=I?null:m?.format,h=I?R({fieldInfo:m,layer:f,isContentFieldInfos:s}):null,F="number"===h?.type;if(m&&!u(r)){const t=g?.type,n="date-time"===h?.type,r=b?.dateFormat;if("date"===t||"date-only"===t||"time-only"===t||"timestamp-offset"===t||n||r)return p(e,{format:n?void 0:r,fieldFormat:n?h:void 0,fieldType:t,timeZoneOptions:{layerTimeZone:f&&"preferredTimeZone"in f?f.preferredTimeZone:null,viewTimeZone:y,datesInUnknownTimezone:!(!f||!("datesInUnknownTimezone"in f))&&!!f.datesInUnknownTimezone}})}if("string"==typeof e&&u(r)&&b)return re(e,b);if("string"==typeof(e=K(e,{format:F?void 0:b,fieldFormat:F?h:void 0}))||null==e||null==b&&null==h)return ce(e);const w=F?i(h):b?o(b):void 0;return a(e,c?{...w,minimumFractionDigits:0,maximumFractionDigits:20}:w)}function re(e,t){return e=e.trim(),/\d{2}-\d{2}/.test(e)?e:e.includes(",")?ie(e,",",", ",t):e.includes(";")?ie(e,";","; ",t):e.includes(" ")?ie(e," "," ",t):a(Number(e),o(t))}function ie(e,t,n,r){return e.trim().split(t).map(e=>a(Number(e),o(r))).join(n)}function oe(e,t){if(e?.length&&t)return e.find(e=>e.fieldName?.toLowerCase()===t.toLowerCase())}function ae({fieldName:e,graphic:t,layer:n}){if(he(e))return null;if(!n||"function"!=typeof n.getFeatureType)return null;const{typeIdField:r}=n;if(!r||e!==r)return null;const i=n.getFeatureType(t);return i?i.name:null}function le({fieldName:e,value:t,graphic:n,layer:r}){if(he(e))return null;if(!r||"function"!=typeof r.getFieldDomain)return null;const i=n&&r.getFieldDomain(e,{feature:n,excludeImpliedDomains:has("esri-widget-legacy-field-domain-calculation")});return i&&"coded-value"===i.type?i.getName(t):null}function ue(e,t,n,i){const{creatorField:o,creationDateField:a,editorField:l,editDateField:u}=e;if(!t)return;const s=g(i&&"preferredTimeZone"in i?i.preferredTimeZone:null,!(!i||!("datesInUnknownTimezone"in i))&&!!i.datesInUnknownTimezone,n,L,"date"),f={...L,...s},d=t[u];if("number"==typeof d){const e=t[l];return{type:"edit",date:r(d,f),user:e}}const c=t[a];if("number"==typeof c){const e=t[o];return{type:"create",date:r(c,f),user:e}}return null}function se(e,t){const n=new Map;if(!e)return n;for(const r of e){if(!r.fieldName)continue;const e=z(r.fieldName,t);r.fieldName=e,n.set(e.toLowerCase(),r)}return n}function fe(e){const t=[];if(!e)return t;const{fieldInfos:n,content:r}=e;return n&&t.push(...n),r&&Array.isArray(r)?(r.forEach(e=>{if("fields"===e.type){const n=e?.fieldInfos;n&&t.push(...n)}}),t):t}function de(e){return e.replaceAll(j,e=>`&#${e.charCodeAt(0)};`)}function ce(e){return"string"==typeof e?e.replaceAll(N,'<br class="esri-text-new-line" />'):e}function pe(e){const{fieldInfoMap:t,fieldInfos:n,fieldName:r,graphic:i,isContentFieldInfos:o,layer:a,timeZone:l,value:u}=e;if(null==u)return"";const s=le({fieldName:r,value:u,graphic:i,layer:a});if(s)return s;const d=ae({fieldName:r,graphic:i,layer:a});if(d)return d;if(t.get(r.toLowerCase()))return ne(u,{fieldInfos:n||Array.from(t.values()),fieldName:r,graphic:i,isContentFieldInfos:o,layer:a,timeZone:l});const c=a?.fieldsIndex?.get(r);return c&&(y(c)||f(c))?p(u,{fieldType:c.type,timeZoneOptions:{layerTimeZone:a&&"preferredTimeZone"in a?a.preferredTimeZone:null,viewTimeZone:l,datesInUnknownTimezone:!(!a||!("datesInUnknownTimezone"in a))&&!!a.datesInUnknownTimezone}}):ce(u)}function ye({attributes:e,fieldInfoMap:t,fieldInfos:n,graphic:r,isContentFieldInfos:i,layer:o,relatedInfos:a,timeZone:l}){const u={};return a?.forEach(e=>Te({attributes:u,relatedInfo:e,fieldInfoMap:t,fieldInfos:n,layer:o,timeZone:l})),e&&Object.keys(e).forEach(a=>{const s=e[a];u[a]=pe({fieldInfoMap:t,fieldInfos:n,fieldName:a,graphic:r,isContentFieldInfos:i,layer:o,timeZone:l,value:s})}),u}async function me(e,t){const{layer:n,graphic:r,outFields:i,objectIds:o,returnGeometry:a,spatialReference:l}=e,u=o[0];if("number"!=typeof u&&"string"!=typeof u){const e="Could not query required fields for the specified feature. The feature's ID is invalid.",t={layer:n,graphic:r,objectId:u,requiredFields:i};return b().warn(e,t),null}if(!c(n)?.operations?.supportsQuery){const e="The specified layer cannot be queried. The following fields will not be available.",t={layer:n,graphic:r,requiredFields:i,returnGeometry:a};return b().warn(e,t),null}const s=n.createQuery();s.objectIds=o,s.outFields=i?.length?i:[n.objectIdField],s.returnGeometry=!!a,s.returnZ=!!a,s.returnM=!!a,s.outSpatialReference=l;return(await n.queryFeatures(s,t)).features[0]}async function ge(e){if(!e.expressionInfos?.length)return!1;const t=await m(),{arcadeUtils:{hasGeometryFunctions:n}}=t;return n(e)}async function Ie(e){if(!e.expressionInfos?.length)return!1;const t=await m(),{arcadeUtils:{requiresTrack:n}}=t;return n(e)}async function be({graphic:e,popupTemplate:t,layer:n,spatialReference:r},i){if(!n||!t)return;if("function"==typeof n.load&&await n.load(i),!e.attributes)return;const o=n.objectIdField,a=e.attributes[o];if(null==a)return;const l=[a],u=new Set(await t.getRequiredFields(n.fieldsIndex));null==n.timeInfo?.trackIdField||u.has(n.timeInfo.trackIdField)||await Ie(t)&&u.add(n.timeInfo.trackIdField);const f=s(e,u),d=f?[]:u.has(o)?[...u]:[...u,o],c=t.returnGeometry||await ge(t);if(f&&!c)return;const p=await me({layer:n,graphic:e,outFields:d,objectIds:l,returnGeometry:c,spatialReference:r},i);p&&(p.geometry&&(e.geometry=p.geometry),p.attributes&&(e.attributes={...e.attributes,...p.attributes}))}function he(e=""){return!!e&&e.includes(v)}function Fe(e){return e?`${v}${e.layerId}/${e.fieldName}`:""}function we({attributes:e,graphic:t,relatedInfo:n,fieldInfos:r,fieldInfoMap:i,layer:o,timeZone:a}){e&&t&&n&&Object.keys(t.attributes).forEach(l=>{const u=Fe({layerId:n.relation.id.toString(),fieldName:l}),s=t.attributes[l];e[u]=pe({fieldName:u,fieldInfos:r,fieldInfoMap:i,layer:o,value:s,graphic:t,timeZone:a})})}function Te({attributes:e,relatedInfo:t,fieldInfoMap:n,fieldInfos:r,layer:i,timeZone:o}){e&&t&&(t.relatedFeatures?.forEach(a=>we({attributes:e,graphic:a,relatedInfo:t,fieldInfoMap:n,fieldInfos:r,layer:i,timeZone:o})),t.relatedStatsFeatures?.forEach(a=>we({attributes:e,graphic:a,relatedInfo:t,fieldInfoMap:n,fieldInfos:r,layer:i,timeZone:o})))}const Ne=e=>{if(!e)return!1;const t=e.toUpperCase();return t.includes("CURRENT_TIMESTAMP")||t.includes("CURRENT_DATE")||t.includes("CURRENT_TIME")},je=({layer:e,method:t,query:n,definitionExpression:r})=>{if(!e.capabilities?.query?.supportsCacheHint||"attachments"===t)return;const i=null!=n.where?n.where:null,o=null!=n.geometry?n.geometry:null;Ne(r)||Ne(i)||"extent"===o?.type||"tile"===n.resultType||(n.cacheHint=!0)},Ce=({query:e,layer:t,method:n})=>{je({layer:t,method:n,query:e,definitionExpression:`${t.definitionExpression} ${t.serviceDefinitionExpression??""}`})},Ze=({queryPayload:e,layer:t,method:n})=>{je({layer:t,method:n,query:e,definitionExpression:`${t.definitionExpression} ${t.serviceDefinitionExpression??""}`})};function ve(e,t,n){return e&&t&&n?"sublayer"===t.type?qe({layers:t.layer?.allSublayers,map:e,relatedLayer:t,relationship:n})||qe({layers:t.layer?.subtables,map:e,relatedLayer:t,relationship:n}):qe({layers:e.allLayers,map:e,relatedLayer:t,relationship:n})||qe({layers:e.allTables,map:e,relatedLayer:t,relationship:n}):null}function Le(e,t){return e&&"utilityNetworks"in e&&t?e.utilityNetworks?.find(e=>e.isUtilityLayer(t)):null}function xe(e,t){return e?.allTables.find(e=>"feature"===e.type&&e.layerId===t.id&&e.url===t.layer?.url)}function qe({map:e,relationship:t,relationship:{relatedTableId:n},relatedLayer:r,layers:i}){if(!i)return null;for(const o of i){if("map-image"===o.type){const n=qe({layers:o.sublayers,map:e,relatedLayer:r,relationship:t})||qe({layers:o.subtables,map:e,relatedLayer:r,relationship:t});if(n)return n;continue}if(!Y(o))continue;if("sublayer"===r.type){if(o!==r&&o.id===n)return o.isTable?xe(e,o):o;continue}const i="scene"===r.type&&r.associatedLayer?r.associatedLayer.url:r.url;if(!i)return null;if("sublayer"!==o.type){if(o!==r&&o.url===i&&o.layerId===n)return o}else if(o!==r&&o.layer?.url===i&&o.id===n)return o.isTable?xe(e,o):o}return null}export{ce as applyTextFormattingHTML,se as createFieldInfoMap,ve as findRelatedLayer,Le as findUtilityNetwork,B as fixTokens,ye as formatAttributes,ue as formatEditInfo,ne as formatValueToFieldInfo,fe as getAllFieldInfos,R as getFieldFormat,oe as getFieldInfo,k as getFieldInfoLabel,z as getFixedFieldName,O as getFixedFieldNames,x as getSourceLayer,q as graphicCallback,de as htmlEntities,ee as isAssociatedFeatureSupportedLayer,U as isExpressionField,V as isFeatureSupportedLayer,te as isGraphicForRelatableFeatureSupportedLayer,Y as isRelatableFeatureSupportedLayer,X as isRelatableLayer,he as isRelatedField,M as isSupportedContext,Ce as preLayerQueryCallback,Ze as preRequestCallback,me as querySourceLayer,be as queryUpdatedFeature,A as shouldOpenInNewTab,P as substituteAttributes,Q as substituteFieldsInLinksAndAttributes};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as t}from"tslib";import"../../../intl.js";import{stripHTML as e}from"../../../core/string.js";import{property as i}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as s}from"../../../core/accessorSupport/decorators/subclass.js";import o from"../UtilityNetworkAssociationInput.js";import{AssociationDetails as r}from"./AssociationDetails.js";import a from"./VisibleElements.js";import{loadCalciteComponents as n}from"../../support/componentsUtils.js";import{globalCss as c}from"../../support/globalCss.js";import{Heading as l}from"../../support/Heading.js";import"../../support/widgetUtils.js";import{messageBundle as d}from"../../support/decorators/messageBundle.js";import{tsx as p,tsxFragment as u}from"../../support/jsxFactory.js";import"@arcgis/toolkit/dom";import m from"../../support/UtilityNetworkAssociations/FeatureUtilityNetworkAssociationsViewModel.js";import h from"../../support/UtilityNetworkAssociations/UtilityNetworkAssociationList.js";import{formatPercentAlong as y}from"../../support/UtilityNetworkAssociations/utils/formatPercentAlong.js";import{isConnectivity as
|
|
5
|
+
import{__decorate as t}from"tslib";import"../../../intl.js";import{stripHTML as e}from"../../../core/string.js";import{property as i}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as s}from"../../../core/accessorSupport/decorators/subclass.js";import o from"../UtilityNetworkAssociationInput.js";import{AssociationDetails as r}from"./AssociationDetails.js";import a from"./VisibleElements.js";import{loadCalciteComponents as n}from"../../support/componentsUtils.js";import{globalCss as c}from"../../support/globalCss.js";import{Heading as l}from"../../support/Heading.js";import"../../support/widgetUtils.js";import{messageBundle as d}from"../../support/decorators/messageBundle.js";import{tsx as p,tsxFragment as u}from"../../support/jsxFactory.js";import"@arcgis/toolkit/dom";import m from"../../support/UtilityNetworkAssociations/FeatureUtilityNetworkAssociationsViewModel.js";import h from"../../support/UtilityNetworkAssociations/UtilityNetworkAssociationList.js";import{formatPercentAlong as y}from"../../support/UtilityNetworkAssociations/utils/formatPercentAlong.js";import{isConnectivity as f}from"../../support/UtilityNetworkAssociations/utils/isConnectivity.js";import{isConnectivityMidspan as g}from"../../support/UtilityNetworkAssociations/utils/isConnectivityMidspan.js";import{substitute as F}from"../../../intl/substitute.js";const _="esri-feature-form-utility-network-association-list",v={base:_,header:`${_}__header`,headingContent:`${_}__heading-content`,listContainer:`${_}__list-container`};let L=class extends h{constructor(t,e){super(t,e),this._isLoadingSelectFeature=!1,this.associationInput=null,this.headingLevel=5,this.messagesFeatureForm=null,this.onSelectLayer=()=>{},this.onSelectFeature=async()=>{},this.onAddAssociation=()=>{},this.viewModel=new m,this.visibleElements=new a}initialize(){this.setUpObserver()}loadDependencies(){return n({chip:()=>import("@esri/calcite-components/dist/components/calcite-chip"),fab:()=>import("@esri/calcite-components/dist/components/calcite-fab"),icon:()=>import("@esri/calcite-components/dist/components/calcite-icon"),list:()=>import("@esri/calcite-components/dist/components/calcite-list"),"list-item":()=>import("@esri/calcite-components/dist/components/calcite-list-item"),tooltip:()=>import("@esri/calcite-components/dist/components/calcite-tooltip")})}get _filteredFeatureInfos(){const{associationInput:t,filterText:e}=this;return t?.associatedLayer?t?.associatedFeatureInfos.get(t.associatedLayer)?.filter(t=>t.title?.toLowerCase().includes(e)??!1).toArray()??[]:[]}get associatedFeatureCount(){const{associationInput:t}=this;if(!t)return 0;const{associatedFeatureInfos:e,associatedLayer:i}=t,s=i?e.get(i):null;return s?s.length:0}render(){const{associationInput:t}=this;if(!t)return p("div",{class:this.classes(v.base,c.widget)});const{associatedLayer:e}=t,{state:i}=this.viewModel;return p("div",{class:this.classes(v.base,c.widget)},"loading"===i||"querying"===i?this.renderLoading():e?this._renderFeatureList(t,e):this._renderLayerList(t))}_renderLayerList(t){const{associatedFeatureInfos:e,editable:i}=t;return p("div",{class:v.listContainer},p("calcite-list",{label:this.messagesFeatureForm?.associations.associatedLayers},Array.from(e.keys(),e=>this._renderLayerItem(t,e))),i?p("calcite-fab",{appearance:"outline-fill",icon:"plus",key:`${t.uid}-add-button`,kind:"neutral",onclick:()=>this.onAddAssociation({feature:t.feature,associationType:t.activeAssociationType,utilityNetwork:t.utilityNetwork}),text:this.messagesCommon.add,textEnabled:!0}):null)}_renderFeatureList(t,e){return p(u,null,this._renderHeader(t,e),p("div",{class:v.listContainer},this.renderFeatureCountWarning(),p("calcite-list",{label:this.messagesFeatureForm?.associations.associatedFeatures},this._renderAssociatedFeatureListPage(),this.renderFeatureObserver())))}_renderLayerTitle(t){return t.title?p(l,{key:"title",level:this.headingLevel},p("div",{class:v.headingContent},p("calcite-icon",{icon:"layer"}),t.title)):null}_renderTotal(t){const e=F(this.messagesFeature?.numberRecords,{number:this._filteredFeatureInfos.length});return p("div",{key:t.id},e)}_renderHeader(t,e){const{messagesFeatureForm:i}=this,{activeAssociationType:s,featureItem:o,feature:a}=t;return p("div",{class:v.header,key:"filter"},this.visibleElements.associationDetails?p(r,{associationType:s?.type,feature:a,heading:o?.label,messages:i.associations}):void 0,this._renderLayerTitle(e),this.renderFilter(),this._renderTotal(e))}_renderAssociatedFeatureListPage(){const t=this._filteredFeatureInfos.slice(0,this.endIndex);return[...this._renderTooltips(t),...this._renderAssociatedFeatureList(t)]}_renderItemTooltip(t){const{tooltipReferenceMap:e}=this,i=t.feature.uid.toString();return f(t.association)?p("calcite-tooltip",{key:`tooltip-${i}`,overlayPositioning:"fixed",referenceElement:e.get(i)},this.getConnectivityTooltip(t.association.associationType)):null}_renderAssociatedFeature(t){const i=this.messagesCommon.untitled,s=t.title||i,o=t.feature.uid.toString();return p("calcite-list-item",{description:e(t.terminalName??""),key:`associated-feature-type-${o}`,label:e(s),onCalciteListItemSelect:()=>this._selectAssociation(t)},f(t.association)?this.renderConnectivityIcon(t.association.associationType,o):null,g(t.association)?p("calcite-chip",{label:y(t.association),scale:"s",slot:"content-end"},y(t.association)):null,p("calcite-icon",{flipRtl:!0,icon:"chevron-right",scale:"s",slot:"content-end"}))}_renderTooltips(t){return t.map(t=>this._renderItemTooltip(t))}_renderAssociatedFeatureList(t){return t.map(t=>this._renderAssociatedFeature(t))}_renderLayerItem(t,e){const{associatedFeatureInfos:i}=t,s=i.get(e)?.length??0;return p("calcite-list-item",{expanded:!0,key:`${e.id}-show-all`,label:e.title??this.messagesCommon.untitled,value:e.id,onCalciteListItemSelect:()=>{this.filterText="",this._showAllAssociations(e)}},p("calcite-chip",{label:s.toString(),scale:"s",slot:"content-end"},s),p("calcite-icon",{flipRtl:!0,icon:"chevron-right",scale:"s",slot:"content-end"}))}async _selectAssociation(t){this._isLoadingSelectFeature||(this._isLoadingSelectFeature=!0,await this.onSelectFeature({feature:t.feature,association:t.association}),this._isLoadingSelectFeature=!1)}_showAllAssociations(t){this.onSelectLayer({layer:t,associationInput:this.associationInput})}};t([i()],L.prototype,"_filteredFeatureInfos",null),t([i()],L.prototype,"associatedFeatureCount",null),t([i({type:o})],L.prototype,"associationInput",void 0),t([i()],L.prototype,"headingLevel",void 0),t([i(),d("esri/widgets/FeatureForm/t9n/FeatureForm")],L.prototype,"messagesFeatureForm",void 0),t([i({constructOnly:!0})],L.prototype,"onSelectLayer",void 0),t([i({constructOnly:!0})],L.prototype,"onSelectFeature",void 0),t([i({constructOnly:!0})],L.prototype,"onAddAssociation",void 0),t([i({type:m})],L.prototype,"viewModel",void 0),t([i({type:a,nonNullable:!0})],L.prototype,"visibleElements",void 0),L=t([s("esri.widgets.FeatureForm.FeatureFormUtilityNetworkAssociations.FeatureFormUtilityNetworkAssociationList")],L);const A=L;export{A as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as e}from"tslib";import{property as t}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as o}from"../../../core/accessorSupport/decorators/subclass.js";import i from"../../Widget.js";import{loadCalciteComponents as n}from"../../support/componentsUtils.js";import{globalCss as s}from"../../support/globalCss.js";import"../../support/widgetUtils.js";import{messageBundle as r}from"../../support/decorators/messageBundle.js";import{tsx as
|
|
5
|
+
import{__decorate as e}from"tslib";import{property as t}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as o}from"../../../core/accessorSupport/decorators/subclass.js";import i from"../../Widget.js";import{loadCalciteComponents as n}from"../../support/componentsUtils.js";import{globalCss as s}from"../../support/globalCss.js";import"../../support/widgetUtils.js";import{messageBundle as r}from"../../support/decorators/messageBundle.js";import{tsx as c}from"../../support/jsxFactory.js";import"@arcgis/toolkit/dom";import{getAssociationTitle as a}from"../../support/UtilityNetworkAssociations/utils/getAssociationTitle.js";import{isFromElement as l}from"../../support/UtilityNetworkAssociations/utils/isFromElement.js";const m="esri-feature-form-utility-network-association-settings",p={base:m,infoContainer:`${m}__info-container`};let u=class extends i{constructor(e,t){super(e,t),this.percentAlong=50,this.headingLevel=5,this.messagesFeature=null,this.messagesCommon=null,this.messagesFeatureForm=null,this.readOnly=!1,this.sourceFeature=null,this.targetFeature=null,this.utilityNetwork=null}loadDependencies(){return n({block:()=>import("@esri/calcite-components/dist/components/calcite-block"),combobox:()=>import("@esri/calcite-components/dist/components/calcite-combobox"),"combobox-item":()=>import("@esri/calcite-components/dist/components/calcite-combobox-item"),"input-number":()=>import("@esri/calcite-components/dist/components/calcite-input-number"),label:()=>import("@esri/calcite-components/dist/components/calcite-label"),switch:()=>import("@esri/calcite-components/dist/components/calcite-switch")})}get association(){return this._get("association")}set association(e){this.percentAlong=e.percentAlong?100*e.percentAlong:50,this._set("association",e)}get associationType(){return this.association.associationType}set associationType(e){this.association.associationType=e,"junction-edge-to-connectivity"!==e&&"junction-edge-from-connectivity"!==e||(this.association.percentAlong=void 0)}render(){return c("div",{class:this.classes(p.base,s.widget)},this._renderFromAssociationEndpoint(),this._renderToAssociationEndpoint(),this._renderAdditionalContent())}_renderFromAssociationEndpoint(){const{associationType:e,association:t,sourceFeature:o,targetFeature:i,messagesFeatureForm:n}=this,s=l(o.feature,t)?o:i,r=s.label,c=a(t,"from",n.associations);switch(e){case"connectivity":case"junction-junction-connectivity":case"junction-edge-midspan-connectivity":case"junction-edge-from-connectivity":case"junction-edge-to-connectivity":return this._renderAssociationEndpoint(r,c,this._renderConnectivityContent(s.feature,t.fromNetworkElement))}return this._renderAssociationEndpoint(r,c)}_renderToAssociationEndpoint(){const{associationType:e,association:t,sourceFeature:o,targetFeature:i,messagesFeatureForm:n}=this,s=l(o.feature,t)?i:o,r=s.label,c=a(t,"to",n.associations);let m;switch(e){case"connectivity":case"junction-junction-connectivity":m=this._renderConnectivityContent(s.feature,t.toNetworkElement);break;case"containment":m=this._isNonspatial(s.feature)?null:this._renderContainmentContent()}return this._renderAssociationEndpoint(r,c,m)}_renderAssociationEndpoint(e,t,o){return c("calcite-block",{description:t,expanded:!0,heading:e},o)}_renderContainmentContent(){const{messagesFeatureForm:e,association:t}=this,o=t.isContentVisible??!1;return c("calcite-label",{layout:"inline"},e.associations.visible,c("calcite-switch",{checked:o,onCalciteSwitchChange:({currentTarget:e})=>{t.isContentVisible=e.checked}}))}_renderConnectivityContent(e,t){const{messagesFeatureForm:o,utilityNetwork:i}=this,n=i.getTerminalConfiguration(e),s=n?.terminals.map(e=>this._renderComboboxListItemNumber(e.id,t.terminalId,e.name))||[];return c("calcite-label",null,o.associations.terminal,c("calcite-combobox",{allowCustomValues:!1,label:o.associations.terminalComboboxLabel,overlayPositioning:"fixed",selectionMode:"single-persist",onCalciteComboboxChange:({currentTarget:e})=>{t.terminalId=parseInt(e.value,10)}},...s))}_renderAdditionalContent(){const{associationType:e}=this;switch(e){case"connectivity":case"junction-junction-connectivity":case"attachment":case"containment":return}const t="junction-edge-midspan-connectivity"===e?e:"junction-edge-from-connectivity",{messagesFeatureForm:o}=this,i=[this._renderComboboxListItemString("junction-edge-midspan-connectivity",t,o.associations.midspanEdge),this._renderComboboxListItemString("junction-edge-from-connectivity",t,o.associations.endpointEdge)];return c("div",{class:p.infoContainer},c("calcite-label",{key:"additional-content"},o.associations.connectTo,c("calcite-combobox",{allowCustomValues:!1,label:o.associations.edgeConnectionComboboxLabel,overlayPositioning:"fixed",selectionMode:"single-persist",onCalciteComboboxChange:({currentTarget:e})=>{this.associationType=e.value}},...i)),"junction-edge-midspan-connectivity"===t?this._renderMidspanEdgeContent():this._renderEndpointEdgeContent())}_renderMidspanEdgeContent(){const{messagesFeatureForm:e,percentAlong:t,association:o}=this;return o.percentAlong=t/100,c("calcite-label",{key:"midspan-edge"},e.associations.midspanLocation,c("calcite-input-number",{max:100,min:0,numberButtonType:"vertical",suffixText:"%",value:`${t}`,onCalciteInputNumberInput:({currentTarget:e})=>{this.percentAlong=parseFloat(e.value)}}))}_renderEndpointEdgeContent(){const{associationType:e,messagesFeatureForm:t}=this,o="junction-edge-to-connectivity"===e;return c("calcite-label",{key:"endpoint-edge"},t.associations.edgeSide,c("calcite-label",{layout:"inline"},t.associations.fromSide,c("calcite-switch",{checked:o,onCalciteSwitchChange:({currentTarget:e})=>{const t=e.checked?"junction-edge-to-connectivity":"junction-edge-from-connectivity";this.associationType=t}}),t.associations.toSide))}_renderComboboxListItemNumber(e,t,o){return c("calcite-combobox-item",{heading:o,key:`#${e}`,selected:t===e,value:`${e}`})}_renderComboboxListItemString(e,t,o){return c("calcite-combobox-item",{heading:o,key:`#${e}`,selected:t===e,value:`${e}`})}_isNonspatial(e){const{sourceLayer:t}=e;return null!=t&&"geometryType"in t&&null==t.geometryType}};e([t()],u.prototype,"association",null),e([t()],u.prototype,"percentAlong",void 0),e([t()],u.prototype,"associationType",null),e([t()],u.prototype,"headingLevel",void 0),e([t(),r("esri/widgets/Feature/t9n/Feature")],u.prototype,"messagesFeature",void 0),e([t(),r("esri/t9n/common")],u.prototype,"messagesCommon",void 0),e([t(),r("esri/widgets/FeatureForm/t9n/FeatureForm")],u.prototype,"messagesFeatureForm",void 0),e([t()],u.prototype,"readOnly",void 0),e([t()],u.prototype,"sourceFeature",void 0),e([t()],u.prototype,"targetFeature",void 0),e([t()],u.prototype,"utilityNetwork",void 0),u=e([o("esri.widgets.FeatureForm.FeatureFormUtilityNetworkAssociations.UtilityNetworkAssociationSettings")],u);const d=u;export{d as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as e}from"tslib";import t from"../../Graphic.js";import{neverReached as n}from"../../core/compilerUtils.js";import{EventedAccessor as s}from"../../core/Evented.js";import i from"../../core/Logger.js";import{destroyMaybe as o}from"../../core/maybe.js";import{EsriPromiseMixin as r}from"../../core/Promise.js";import{debounce as a}from"../../core/promiseUtils.js";import{watch as l,syncAndInitial as u,whenOnce as p,on as c}from"../../core/reactiveUtils.js";import{templateHasKey as h}from"../../core/string.js";import{property as d}from"../../core/accessorSupport/decorators/property.js";import"../../core/RandomLCG.js";import{subclass as f}from"../../core/accessorSupport/decorators/subclass.js";import{UpdatingHandles as m}from"../../core/support/UpdatingHandles.js";import g from"../../form/FormTemplate.js";import{isUtilityNetworkAssociationsElement as y,isGroupElement as _,isFieldElement as v,isRelationshipElement as I,isTextElement as x}from"../../form/support/formUtils.js";import E from"../../layers/support/ContingentValue.js";import{isEditableLayer as C}from"../../layers/support/editableLayers.js";import F from"../../layers/support/LayerContingentValuesCache.js";import{utc as b,unknown as V,system as w}from"../../time/constants.js";import{flattenAssociationInputs as A,flattenFieldInputs as j,isGroupInput as T,flattenRelationshipInputs as M,parseFormTemplateString as N,isRelationshipInput as S,isFieldInput as k,isTextElementInput as L,getNormalizedFeatureTypeInfo as R,valueIsValidContingentValue as U}from"./featureFormUtils.js";import Z from"./FieldInput.js";import{FormExpressionsManager as H}from"./FormExpressionsManager.js";import O from"./GroupInput.js";import P from"./RelationshipInput.js";import G from"./TextElementInput.js";import{createFormExpressionArcadeExecutor as W}from"../support/forms/expressions/FormExpressionArcadeExecutor.js";const $=new t({attributes:{}}),D={field:["editableExpression","requiredExpression","valueExpression","visibilityExpression"],group:["visibilityExpression"],relationship:["editableExpression","visibilityExpression"],text:["visibilityExpression"],utilityNetworkAssociations:["editableExpression","visibilityExpression"]},z="#JSAPI_CONTINGENT_VALUE_EMPTY_HASH",J="#JSAPI_CONTINGENT_VALUE_ANY_HASH",B="#JSAPI_CONTINGENT_VALUE_NULL_HASH";let K=class extends(r(s)){constructor(e){super(e),this._expressionExecutorsInUse=new Set,this._expressionExecutorLookup=new Map,this._expressionsManager=null,this._contingentValuesCache=null,this._featureClone=$.clone(),this._initialFeature=$.clone(),this._timeZone=null,this._updatingHandles=new m,this.activeAssociation=null,this.editType="NA",this.contingencyConstraintViolations=new Map,this.disabled=!1,this.highlightHelper=null,this.inputs=[],this.map=null,this.callbacks=null,this.strict=!1,this.pendingSubtypeChoice=null,this._updateInputs=a(async()=>{this._stopExpressions();const{_featureClone:e,_initialFeature:t,editType:n,formTemplate:s,inputs:i,layer:o,timeZone:r}=this;if(!o)return;const a={editType:n,feature:e,initialFeature:t,layer:o,timeZone:r},l=i.slice(),u=s?.elements&&s.elements.length>0?await this._updateInputsUsingFormElements(l,s.elements,a):this._updateInputsUsingLayerFields(l,o?.fields,a);this.inputs=u,this._startExpressions()})}initialize(){const e=l(()=>[this.layer,!!this.layer?.loaded,this.formTemplate,this.feature,this.timeZone,this.editType],([e,t])=>{null!=e&&(t?this._updatingHandles.addPromise(this._updateInputs()):e.load().catch(()=>{}))},u),t=l(()=>this._arcadeContextInfo,e=>{null!=this._expressionsManager&&(this._expressionsManager.arcadeContextInfo=e,this._evaluateExpressions(e=>e.evaluateAll()))}),n=l(()=>this.layer,e=>{const t="subtype-sublayer"===e?.type?e.parent:"feature"===e?.type?e:null;t&&this.addResolvingPromise(F.createLoadedLayerContingentValuesCache(t).then(e=>{this._contingentValuesCache=e,this.notifyChange("fieldsWithContingentValues")}))},{initial:!0});this.addHandles([e,t,n])}destroy(){this.feature=null,this.layer=null,this._contingentValuesCache=o(this._contingentValuesCache),this.highlightHelper?.removeAll(),this._updatingHandles.destroy()}get _expressionInfosLookup(){return new Map(this.formTemplate?.expressionInfos?.map(e=>[e.name,e]))}get activeAssociationInput(){return this.allAssociationInputs.find(e=>e.uid===this.associationId)}get activeRelationshipInput(){return this.allRelationshipInputs.find(e=>e.relationshipId===this.relationshipId||e.activeCategory||e.showAllEnabled)}get _arcadeContextInfo(){const{_initialFeature:e,editType:t,layer:n,map:s,spatialReference:i,timeZone:o}=this;return{layer:C(n)?n:null,originalFeature:e,editType:t,map:s,spatialReference:i,timeZone:o}}get associationId(){return this._get("associationId")}set associationId(e){null==e&&this.activeAssociationInput?.viewModel&&(this.activeAssociationInput.associatedLayer=null,this.activeAssociationInput.viewModel.activeAssociationType=null),this._set("associationId",e)}get associatedLayer(){return this.activeAssociationInput?.associatedLayer}set associatedLayer(e){this.activeAssociationInput&&(this.activeAssociationInput.associatedLayer=e)}get allAssociationInputs(){return A(this.inputs)}get allFieldInputs(){return j(this.inputs)}get allGroupInputs(){return this.inputs.filter(T)}get allRelationshipInputs(){return M(this.inputs)}get _layerFieldsByName(){return new Map(this.layer?.fields.map(e=>[e.name,e]))}get feature(){return this._get("feature")}set feature(e){const t=this._get("feature");this._featureClone=e?e.clone():$.clone(),this._initialFeature=this._featureClone.clone(),this._expressionsManager&&(this._expressionsManager.feature=this._featureClone),e?(this._resetFieldInputValues(this._featureClone),this.allRelationshipInputs.forEach(t=>t.feature=e)):(this.inputs.forEach(e=>e.destroy()),this.inputs.length=0),t!==e&&(this.pendingSubtypeChoice=null),this.contingencyConstraintViolations.clear(),this._set("feature",e)}get fieldsWithContingentValues(){if(null==this._contingentValuesCache)return new Set;const e=this._contingentValuesCache.fieldGroups.flatMap(e=>e.fields);return new Set(e)}get formTemplate(){return this.layer&&"formTemplate"in this.layer?this.layer.formTemplate:null}set formTemplate(e){void 0===e?this._clearOverride("formTemplate"):this._override("formTemplate",e)}get formDescription(){const{formTemplate:e,layer:t}=this;return e?.description&&t?N({label:e.description,attributes:this.getValues(),fieldsIndex:t.fieldsIndex,timeZone:this.timeZone}):null}get formTitle(){const{formTemplate:e,layer:t}=this;return e?.title&&t?N({label:e.title,attributes:this.getValues(),fieldsIndex:t.fieldsIndex,timeZone:this.timeZone}):null}get formHeaderVisible(){const{activeRelationshipInput:e,activeAssociationInput:t,formDescription:n,formTitle:s}=this;return!(e||t||!n&&!s)}get joinedContingentValues(){return this._joinContingentValues()}get layer(){return this.feature?.sourceLayer&&"applyEdits"in this.feature.sourceLayer?this.feature.sourceLayer:null}set layer(e){this._override("layer",e)}get relationshipId(){return this._get("relationshipId")}set relationshipId(e){const t=this.allRelationshipInputs;if(null!=e&&e===this.relationshipId||t.forEach(e=>{e.showAllEnabled=!1,e.activeCategory=null}),null!=e){const n=t.find(t=>t.relationshipId===e);n&&(n.showAllEnabled=!0)}this._set("relationshipId",e)}get spatialReference(){return this.layer?.spatialReference??null}set spatialReference(e){this._override("spatialReference",e)}get state(){return this.layer?.loaded?"ready":"disabled"}get submittable(){return!!this.valid||this.allFieldInputs.filter(e=>!e.valid).every(({submittable:e})=>e)}get timeZone(){const{layer:e}=this;if(e&&"datesInUnknownTimezone"in e&&e.datesInUnknownTimezone)return b;const t=e&&"preferredTimeZone"in e&&e.preferredTimeZone;return this._timeZone===V?t||b:this._timeZone||w}set timeZone(e){this._timeZone=e}get updating(){return this._updatingHandles.updating}get valid(){const e=this.allFieldInputs;return e.length>0&&e.every(({valid:e})=>e)}findField(e){return this.allFieldInputs.find(t=>t.name===e)}findGroup(e){return this.allGroupInputs.find(t=>t.id===e)}getFieldValueOptionsForField(e,t){const n=this.findField(e);if(!n)return[[],[],[]];const s="coded-value"===n.domain?.type?n.domain.codedValues.map(({name:e,code:t})=>({name:e,value:t})):[],i=null==n.value||s.some(e=>e.value===n.value)?[]:[{name:`${n.value}`,value:n.value}],o=this.fieldsWithContingentValues.has(e)?this._getContingentValueOptionsForField(e,t):[];if(o.length>0){const e=new Set(o.map(e=>e.value));return[o,s.filter(t=>!e.has(t.value)),i]}return[s,[],i]}getValue(e){const t=this.layer?.getField(e);if(null!=t)return this._featureClone.getAttribute(t.name)??null}setValue(e,t){const{_featureClone:n,strict:s}=this,i=this.findField(e);t=""===t?null:t,i&&n.getAttribute(e)!==t&&(i.value=t,s&&!i.valid||(this._afterValueChange(i),this._evaluateExpressions(t=>t.evaluateInvalidated([e]))))}getValues(){return{...this._featureClone.attributes}}overrideInitialFeature(e){this._initialFeature=e}submit(){const e=this.allFieldInputs,t=new Set(e.filter(e=>e.valid).map(({name:e})=>e)),n=e.filter(e=>!e.valid).map(({name:e})=>e),s=this.getValues();if(this.validateContingencyConstraints(s,{includeIncompleteViolations:!0}).length>0)for(const[i,o]of this.contingencyConstraintViolations.entries())"error"===o.type&&(t.delete(i),n.push(i));this.notifyChange("submittable"),this.notifyChange("valid"),this.emit("submit",{valid:[...t],invalid:n,values:s})}validateContingencyConstraints(e,t){const{_contingentValuesCache:n}=this,s=new Map;if(this.contingencyConstraintViolations=s,null==n)return[];const{invalid:i,incomplete:o}=n.validateContingencyConstraints(e),r=[...i,...t?.includeIncompleteViolations?o:[]];for(const a of r)for(const e of a.fieldGroup.fields)s.set(e,a);return r}notifyFeatureGeometryChanged(){const{feature:e,_featureClone:t}=this;e&&(t.geometry=e.geometry,this._evaluateExpressions(e=>e.evaluateInvalidatedByGeometry()))}applySubtypeDefaults(e){const{defaultValues:t}=e,{allFieldInputs:n}=this;for(const{name:s}of n){const e=t[s];null!=e&&this.setValue(s,e)}}_emitChangeEvent({name:e,valid:t,value:n}){this.emit("value-change",{layer:this.layer,feature:this.feature,fieldName:e,value:n,valid:t})}_evaluateExpressions(e){const t=this._expressionsManager;null!=t&&this._updatingHandles.addPromise(e(t).finally(()=>this._afterExpressionsEvaluated()))}async _updateInputsUsingFormElements(e,t,n){const s=new Map;for(const r of e)if(T(r)){s.set(r.element,r);for(const e of r.inputs)e.element&&s.set(e.element,e)}else r.element&&s.set(r.element,r);const i=new Map,o=await this._updateInputsUsingFormElementsRecursive({existingInputsByElement:s,updatedElements:t.filter(e=>this._isSupportedElement(e)),sharedInitializationProperties:n,group:null,newExpressionExecutorPromises:i});for(const[r,a]of s.entries())s.delete(r),a.destroy();return await Promise.all(Array.from(i.values())),o}async _updateInputsUsingFormElementsRecursive(e){const{existingInputsByElement:t,updatedElements:n,sharedInitializationProperties:s,group:i,newExpressionExecutorPromises:o}=e,r=[];for(const a of n){const e=t.has(a),n=e?t.get(a):y(a)?await this._makeUtilityNetworkAssociationInputFromElement(a,s,i):this._makeInputFromElement(a,s,i);if(n){if(r.push(n),await p(()=>!n.updating),this._assignExpressionExecutors(n,a,o),e)if(t.delete(a),T(n)){const{feature:e,timeZone:t}=s;n.set({feature:e,timeZone:t})}else if(S(n)){const e=this.relationshipId===a.relationshipId;n.set(s),n.set({map:this.map,showAllEnabled:e})}else y(n)?(n.set(s),n.set({map:this.map})):n.set(s);if(_(a)){const e=a.elements.filter(e=>this._isSupportedElement(e));n.inputs=await this._updateInputsUsingFormElementsRecursive({existingInputsByElement:t,updatedElements:e,sharedInitializationProperties:s,group:n,newExpressionExecutorPromises:o})}}}return r}_updateInputsUsingLayerFields(e,t,n){if(!Array.isArray(t))return i.getLogger(this).warn(this.declaredClass,"No attribute fields found."),[];const s=new Map;for(const i of e)if(T(i)){for(const e of i.inputs)e.destroy();i.inputs.length=0,i.destroy()}else S(i)?i.destroy():k(i)&&(null!==i.element?i.destroy():s.set(i.field,i));const o=[];for(const i of t){const e=n.feature?.getAttribute(i.name)??null,t=s.get(i)??new Z({field:i,preservesValueWhenHidden:this.formTemplate?.preserveFieldValuesWhenHidden});o.push(t.set({...n,value:e})),s.delete(i)}for(const[i,r]of s.entries())s.delete(i),r.destroy();return o}_resetFieldInputValues(e){for(const t of this.allFieldInputs)t.value=e.getAttribute(t.name)??null}_makeInputFromElement(e,t,s){return _(e)?Y(e,t):v(e)?this._makeFieldInputFromElement(e,t,s):I(e)?this._makeRelationshipInputFromElement(e,t,s):y(e)?this._makeUtilityNetworkAssociationInputFromElement(e,t,s):x(e)?q(e,t):y(e)?this._makeUtilityNetworkAssociationInputFromElement(e,t,s):n()}_makeFieldInputFromElement(e,t,n){const{editType:s,feature:i,initialFeature:o,layer:r,timeZone:a}=t,{fieldName:l}=e,u=l&&this._layerFieldsByName.get(l);return u?new Z({editType:s,element:e,field:u,value:i?.getAttribute(e.fieldName)??null,feature:i,initialFeature:o,layer:r,group:n,preservesValueWhenHidden:this.formTemplate?.preserveFieldValuesWhenHidden,timeZone:a}):null}_makeRelationshipInputFromElement(e,t,n=null){const{map:s}=this,{feature:i,layer:o,timeZone:r}=t,a=new P({element:e,feature:i,group:n,layer:o,map:s,timeZone:r});return a.addHandles(c(()=>a.relatedLayer,"edits",()=>this._evaluateExpressions(e=>e.evaluateAsyncExpressions()))),a}async _makeUtilityNetworkAssociationInputFromElement(e,t,n=null){const{map:s}=this,{feature:i,layer:o,timeZone:r}=t;return new(0,(await import("./UtilityNetworkAssociationInput.js")).default)({element:e,feature:i,group:n,layer:o,map:s,timeZone:r})}_assignExpressionExecutors(e,t,n){const s=D[t.type],i=[];for(const o of s){const s=`${o}Executor`;if(e[s]){this._useExecutor(e[s]);continue}const r=t[o];if(null!=r&&""!==r){const t=this._expressionInfosLookup.get(r)?.expression??r;i.push(this._getOrCreateExecutorForExpression(t,n).then(t=>{e[s]=this._useExecutor(t)}))}}return L(e)&&i.push(...this._assignTextElementExpressionExecutors(e,n)),i}_assignTextElementExpressionExecutors(e,t){const{_expressionInfosLookup:n}=this,s=[];for(const o of e.expressionsUsed){const r=n.get(o);null!=r?s.push(this._getOrCreateExecutorForExpression(r.expression,t).then(t=>e.setExpressionExecutor(o,this._useExecutor(t)))):i.getLogger(this).error("feature-form:expression-not-found",`Could not find expressionInfo object with name '${o}'`)}for(const i of e.fieldsUsed){const n=`return $feature['${i}'];`;s.push(this._getOrCreateExecutorForExpression(n,t).then(t=>e.setFieldExecutor(i,this._useExecutor(t))))}return s}async _getOrCreateExecutorForExpression(e,t){const{_expressionExecutorLookup:n}=this;if(n.has(e))return n.get(e);if(t.has(e))return t.get(e);const s=W(e,this.layer);t.set(e,s);const i=await s;return n.set(e,i),i}_createExpressionsManager(e){const{_arcadeContextInfo:t,_featureClone:n,allFieldInputs:s,formTemplate:i}=this;this._expressionsManager=new H({executors:e,feature:n,arcadeContextInfo:t,fieldInputs:s,preserveFieldValuesWhenHidden:!0===i?.preserveFieldValuesWhenHidden})}_startExpressions(){if(0===this._expressionExecutorsInUse.size)return;const e=Array.from(this._expressionExecutorsInUse);this._createExpressionsManager(e),this._evaluateExpressions(e=>e.evaluateAll())}_stopExpressions(){this._expressionsManager=o(this._expressionsManager),this._expressionExecutorsInUse.clear()}_useExecutor(e){return this._expressionExecutorsInUse.add(e),e}_afterValueChange(e){const{name:t,value:n}=e,{_featureClone:s,formTemplate:i,layer:o}=this;if(!o)return;const r=s.getAttribute(t);s.setAttribute(t,n);const{typeFieldName:a,types:l}=R(o);if((e.isSubtypeField||t===a)&&n!==r){if("subtype-sublayer"===o.type){const e=o.parent?.findSublayerForFeature(s);e&&(this.feature&&(this.feature.sourceLayer=e),s.sourceLayer=e)}const e=new Set;for(const t of l)if(t.domains&&"object"==typeof t.domains)for(const n of Object.keys(t.domains))e.add(n);for(const t of e){const e=this.findField(t);e&&e.notifyChange("domain")}this.notifyChange("joinedContingentValues")}if(null!=i){const{description:e,title:n}=i;n&&h(n,t)&&this.notifyChange("formTitle"),e&&h(e,t)&&this.notifyChange("formDescription")}this._emitChangeEvent(e)}_afterExpressionsEvaluated(){const{_featureClone:e}=this;for(const t of this.allFieldInputs)t.value!==e.getAttribute(t.name)&&this._afterValueChange(t)}_joinContingentValues(){const e=this._contingentValuesCache;if(null==e)return[];const{typeFieldName:t}=R(this.layer),n=t?this.getValue(t):null,s=[];for(const r of e.fieldGroups){const{contingencies:e,fields:t,name:i}=r,o=[];for(const s of e)s.isRetired||null!=s.subtype&&s.subtype.code!==n||o.push({values:s.values});o.length>0&&s.push({name:i,fields:t,contingencies:o})}const[i,o]=this._generateJoinPlan(s);return[...i.flatMap(e=>this._joinFieldGroupContingencies(e)),...o.flatMap(e=>e.contingencies)]}_generateJoinPlan(e){const t=new Map,n=[],s=new Set;for(const l of e)for(const e of l.fields)if(t.has(e)){const i=t.get(e),o=l,r=[i.name,o.name].sort().join("|");if(s.has(r))continue;n.push([i,o]),s.add(r),t.set(e,o)}else t.set(e,l);const i=new Set(n.flat()),o=new Set(e);for(const l of i)o.delete(l);const r=new Map,a=new Map;for(const l of new Set(n.flat())){const e=Symbol(l.name);r.set(e,new Set([l])),a.set(l,e)}for(const[l,u]of n){const e=a.get(l),t=a.get(u);if(e===t)continue;const n=r.get(e),s=r.get(t);for(const i of s)n.add(i),a.set(i,e);r.delete(t)}return[[...r.values()].map(e=>[...e]),[...o]]}_joinFieldGroupContingencies(e){const t=e.slice(),n=t.shift();let s=t.shift(),i=this._generateJoinKey(n.fields,s.fields),o=new Set([...n.fields,...s.fields]),r=new Map;for(const l of n.contingencies){const[e]=this._hashContingency(l,i.codedValueFields,!0);r.has(e)?r.get(e)?.push(l):r.set(e,[l])}for(;t.length>0;){const e=new Map,n=t.shift(),a=this._generateJoinKey(o,n.fields);for(const t of s.contingencies){const[n,s]=this._hashContingency(t,i.codedValueFields),o=s?this._findMatchingContingenciesWithAnyHashMask(r,n):r.get(n);if(r.has(J)&&o?.push(...this._findMatchingContingenciesContainingAny(t,r.get(J),i.codedValueFields)),null!=o)for(const r of o){const n=i.rangeFields.length>0?this._joinContingenciesWithRangeDomains(r,t,i.rangeFields):this._joinContingencies(r,t);if(null==n)break;const[s]=this._hashContingency(n,a.codedValueFields,!0);e.has(s)?e.get(s)?.push(n):e.set(s,[n])}}r=e,s=n,i=a,o=new Set([...o,...s.fields])}const a=[];for(const l of s.contingencies){const[e,t]=this._hashContingency(l,i.codedValueFields),n=t?this._findMatchingContingenciesWithAnyHashMask(r,e):r.get(e);if(r.has(J)&&n.push(...this._findMatchingContingenciesContainingAny(l,r.get(J),i.codedValueFields)),null!=n)for(const s of n){const e=i.rangeFields.length>0?this._joinContingenciesWithRangeDomains(s,l,i.rangeFields):this._joinContingencies(s,l);null!=e&&a.push(e)}}return a}_joinContingencies(e,t){const n={values:{...e.values,...t.values}};for(const[s,i]of Object.entries(n.values))"any"===i.objectType&&null!=e.values[s]&&(n.values[s]=e.values[s]);return n}_joinContingenciesWithRangeDomains(e,t,n){const s=this._joinContingencies(e,t);for(const i of n){const n=e.values[i],o=t.values[i],{leftIsNull:r,rightIsNull:a,bothAreNull:l,leftIsAny:u,rightIsAny:p,bothAreAny:c,leftIsRange:h,rightIsRange:d}=this._compareObjectTypes(n.objectType,o.objectType);if(l||c)continue;if(r&&p||a&&u){s.values[i]=new E({objectType:"null"});continue}if(r&&d||a&&h)return null;u?(n.minValue=-1/0,n.maxValue=1/0):p&&(o.minValue=-1/0,o.maxValue=1/0);const f=Math.max(n.minValue,o.minValue),m=Math.min(n.maxValue,o.maxValue);if(f>m)return null;s.values[i]=new E({objectType:"range",minValue:f,maxValue:m})}return s}_findMatchingContingenciesContainingAny(e,t,n){return t.filter(t=>n.every(n=>{const s=t.values[n],i=e.values[n];return"any"===s.objectType||"any"===i.objectType||s.codedValue?.code===i.codedValue?.code}))}_findMatchingContingenciesWithAnyHashMask(e,t){const n=new RegExp(`${t}$`),s=[];for(const[i,o]of e){if(i===J)break;n.test(i)&&s.push(...o)}return s}_generateJoinKey(e,t){const n=Array.isArray(e)?new Set(e):e,s=Array.isArray(t)?new Set(t):t,i=n.size<s.size?n:s,o=i===n?s:n,{feature:r}=this,a=new Set,l=new Set;for(const u of i)if(o.has(u)){const e=this.layer?.getFieldDomain(u,{feature:r??void 0,excludeImpliedDomains:!0});if(null==e)continue;switch(e.type){case"coded-value":a.add(u);break;case"range":l.add(u)}}return{codedValueFields:[...a],rangeFields:[...l]}}_contingencyIsValid(e,t){const n={};for(const{name:s,value:i}of this.allFieldInputs)this.fieldsWithContingentValues.has(s)&&null!=i&&s!==e&&(n[s]=i);return Object.entries(n).every(([e,n])=>!t.values.hasOwnProperty(e)||U(n,t.values[e]))}_getContingentValueOptionsForField(e,t){const n=this.joinedContingentValues.slice(),s=new Map,i={code:"",name:t??"No value"};for(const o of n){const t=o.values[e];if("code"===t?.objectType||"null"===t?.objectType){const{code:n,name:r}=t.codedValue&&"null"!==t.objectType?t.codedValue:i;!s.has(n)&&this._contingencyIsValid(e,o)&&s.set(n,{name:r,value:n})}}return[...s.values()]}_hashContingency(e,t,n=!1){if(t.length<1)return[z,!1];const s=[];let i=!1;for(const o of t){const t=e.values[o];if("any"===t.objectType){if(n)return[J,!0];i=!0,s.push(`${o}:.*`)}else"null"===t.objectType?s.push(`${o}:${B}`):s.push(`${o}:${t.codedValue?.code}`)}return[s.sort().join("&"),i]}_compareObjectTypes(e,t){return{leftIsNull:"null"===e,rightIsNull:"null"===t,bothAreNull:"null"===e&&"null"===t,leftIsAny:"any"===e,rightIsAny:"any"===t,bothAreAny:"any"===e&&"any"===t,leftIsRange:"range"===e,rightIsRange:"range"===t}}_isSupportedElement(e){return"field"===e.type||"group"===e.type||"relationship"===e.type||"text"===e.type||"utilityNetworkAssociations"===e.type||(i.getLogger(this).warn("form-info::unsupported-element-type","Only element types 'field', 'group' and 'relationship' are supported",`Element ${e.label} has unsupported type '${e.type}'`),!1)}get test(){return{featureClone:this._featureClone}}};function Y(e,t){const{feature:n,layer:s}=t;return new O({element:e,inputs:[],feature:n,layer:s})}function q(e,t,n=null){const{feature:s,layer:i,timeZone:o}=t;return new G({element:e,feature:s,group:n,layer:i,timeZone:o})}e([d()],K.prototype,"_expressionInfosLookup",null),e([d()],K.prototype,"_featureClone",void 0),e([d()],K.prototype,"_timeZone",void 0),e([d()],K.prototype,"activeAssociation",void 0),e([d()],K.prototype,"activeAssociationInput",null),e([d()],K.prototype,"activeRelationshipInput",null),e([d()],K.prototype,"_arcadeContextInfo",null),e([d()],K.prototype,"associationId",null),e([d()],K.prototype,"associatedLayer",null),e([d()],K.prototype,"allAssociationInputs",null),e([d()],K.prototype,"allFieldInputs",null),e([d()],K.prototype,"allGroupInputs",null),e([d()],K.prototype,"allRelationshipInputs",null),e([d()],K.prototype,"_layerFieldsByName",null),e([d()],K.prototype,"editType",void 0),e([d()],K.prototype,"contingencyConstraintViolations",void 0),e([d()],K.prototype,"disabled",void 0),e([d()],K.prototype,"feature",null),e([d()],K.prototype,"fieldsWithContingentValues",null),e([d({type:g})],K.prototype,"formTemplate",null),e([d()],K.prototype,"formDescription",null),e([d()],K.prototype,"formTitle",null),e([d()],K.prototype,"formHeaderVisible",null),e([d()],K.prototype,"highlightHelper",void 0),e([d()],K.prototype,"inputs",void 0),e([d()],K.prototype,"joinedContingentValues",null),e([d()],K.prototype,"layer",null),e([d()],K.prototype,"map",void 0),e([d()],K.prototype,"callbacks",void 0),e([d()],K.prototype,"relationshipId",null),e([d()],K.prototype,"spatialReference",null),e([d()],K.prototype,"state",null),e([d()],K.prototype,"strict",void 0),e([d()],K.prototype,"submittable",null),e([d()],K.prototype,"timeZone",null),e([d()],K.prototype,"updating",null),e([d()],K.prototype,"valid",null),e([d()],K.prototype,"pendingSubtypeChoice",void 0),e([d()],K.prototype,"getValues",null),e([d()],K.prototype,"submit",null),e([d()],K.prototype,"test",null),K=e([f("esri.widgets.FeatureForm.FeatureFormViewModel")],K);const Q=K;export{Q as default};
|
|
5
|
+
import{__decorate as e}from"tslib";import t from"../../Graphic.js";import{neverReached as n}from"../../core/compilerUtils.js";import{EventedAccessor as s}from"../../core/Evented.js";import i from"../../core/Logger.js";import{destroyMaybe as o}from"../../core/maybe.js";import{EsriPromiseMixin as r}from"../../core/Promise.js";import{debounce as a}from"../../core/promiseUtils.js";import{watch as l,syncAndInitial as u,whenOnce as p,on as c}from"../../core/reactiveUtils.js";import{templateHasKey as h}from"../../core/string.js";import{property as d}from"../../core/accessorSupport/decorators/property.js";import"../../core/RandomLCG.js";import{subclass as f}from"../../core/accessorSupport/decorators/subclass.js";import{UpdatingHandles as m}from"../../core/support/UpdatingHandles.js";import y from"../../form/FormTemplate.js";import{isUtilityNetworkAssociationsElement as g,isGroupElement as _,isFieldElement as v,isRelationshipElement as I,isTextElement as x}from"../../form/support/formUtils.js";import E from"../../layers/support/ContingentValue.js";import{isEditableLayer as C}from"../../layers/support/editableLayers.js";import F from"../../layers/support/LayerContingentValuesCache.js";import{utc as b,unknown as V,system as w}from"../../time/constants.js";import{flattenAssociationInputs as A,flattenFieldInputs as j,isGroupInput as T,flattenRelationshipInputs as M,parseFormTemplateString as L,isRelationshipInput as N,isFieldInput as S,isTextElementInput as k,getNormalizedFeatureTypeInfo as R,valueIsValidContingentValue as U}from"./featureFormUtils.js";import Z from"./FieldInput.js";import{FormExpressionsManager as H}from"./FormExpressionsManager.js";import O from"./GroupInput.js";import P from"./RelationshipInput.js";import G from"./TextElementInput.js";import{createFormExpressionArcadeExecutor as W}from"../support/forms/expressions/FormExpressionArcadeExecutor.js";const $=new t({attributes:{}}),D={field:["editableExpression","requiredExpression","valueExpression","visibilityExpression"],group:["visibilityExpression"],relationship:["editableExpression","visibilityExpression"],text:["visibilityExpression"],utilityNetworkAssociations:["editableExpression","visibilityExpression"]},z="#JSAPI_CONTINGENT_VALUE_EMPTY_HASH",J="#JSAPI_CONTINGENT_VALUE_ANY_HASH",B="#JSAPI_CONTINGENT_VALUE_NULL_HASH";let K=class extends(r(s)){constructor(e){super(e),this._expressionExecutorsInUse=new Set,this._expressionExecutorLookup=new Map,this._expressionsManager=null,this._contingentValuesCache=null,this._featureClone=$.clone(),this._initialFeature=$.clone(),this._timeZone=null,this._updatingHandles=new m,this.activeAssociation=null,this.editType="NA",this.contingencyConstraintViolations=new Map,this.disabled=!1,this.highlightHelper=null,this.inputs=[],this.map=null,this.callbacks=null,this.strict=!1,this.pendingSubtypeChoice=null,this._updateInputs=a(async()=>{this._stopExpressions();const{_featureClone:e,_initialFeature:t,editType:n,formTemplate:s,inputs:i,layer:o,timeZone:r}=this;if(!o)return;const a={editType:n,feature:e,initialFeature:t,layer:o,timeZone:r},l=i.slice(),u=s?.elements&&s.elements.length>0?await this._updateInputsUsingFormElements(l,s.elements,a):this._updateInputsUsingLayerFields(l,o?.fields,a);this.inputs=u,this._startExpressions()})}initialize(){const e=l(()=>[this.layer,!!this.layer?.loaded,this.formTemplate,this._initialFeature,this.timeZone,this.editType],([e,t])=>{null!=e&&(t?this._updatingHandles.addPromise(this._updateInputs()):e.load().catch(()=>{}))},u),t=l(()=>this._arcadeContextInfo,e=>{null!=this._expressionsManager&&(this._expressionsManager.arcadeContextInfo=e,this._evaluateExpressions(e=>e.evaluateAll()))}),n=l(()=>this.layer,e=>{const t="subtype-sublayer"===e?.type?e.parent:"feature"===e?.type?e:null;t&&this.addResolvingPromise(F.createLoadedLayerContingentValuesCache(t).then(e=>{this._contingentValuesCache=e,this.notifyChange("fieldsWithContingentValues")}))},{initial:!0});this.addHandles([e,t,n])}destroy(){this.feature=null,this.layer=null,this._contingentValuesCache=o(this._contingentValuesCache),this.highlightHelper?.removeAll(),this._updatingHandles.destroy()}get _expressionInfosLookup(){return new Map(this.formTemplate?.expressionInfos?.map(e=>[e.name,e]))}get activeAssociationInput(){return this.allAssociationInputs.find(e=>e.uid===this.associationId)}get activeRelationshipInput(){return this.allRelationshipInputs.find(e=>e.relationshipId===this.relationshipId||e.activeCategory||e.showAllEnabled)}get _arcadeContextInfo(){const{_initialFeature:e,editType:t,layer:n,map:s,spatialReference:i,timeZone:o}=this;return{layer:C(n)?n:null,originalFeature:e,editType:t,map:s,spatialReference:i,timeZone:o}}get associationId(){return this._get("associationId")}set associationId(e){null==e&&this.activeAssociationInput?.viewModel&&(this.activeAssociationInput.associatedLayer=null,this.activeAssociationInput.viewModel.activeAssociationType=null),this._set("associationId",e)}get associatedLayer(){return this.activeAssociationInput?.associatedLayer}set associatedLayer(e){this.activeAssociationInput&&(this.activeAssociationInput.associatedLayer=e)}get allAssociationInputs(){return A(this.inputs)}get allFieldInputs(){return j(this.inputs)}get allGroupInputs(){return this.inputs.filter(T)}get allRelationshipInputs(){return M(this.inputs)}get _layerFieldsByName(){return new Map(this.layer?.fields.map(e=>[e.name,e]))}get feature(){return this._get("feature")}set feature(e){const t=this._get("feature");e!==t&&(this._featureClone=e?.clone()??$.clone(),this._expressionsManager&&(this._expressionsManager.feature=this._featureClone),e?(this._resetFieldInputValues(this._featureClone),this.allRelationshipInputs.forEach(t=>t.feature=e)):(this.inputs.forEach(e=>e.destroy()),this.inputs.length=0),t!==e&&(this.pendingSubtypeChoice=null),this.contingencyConstraintViolations.clear(),this._set("feature",e),this._initialFeature=this._featureClone.clone())}get fieldsWithContingentValues(){if(null==this._contingentValuesCache)return new Set;const e=this._contingentValuesCache.fieldGroups.flatMap(e=>e.fields);return new Set(e)}get formTemplate(){return this.layer&&"formTemplate"in this.layer?this.layer.formTemplate:null}set formTemplate(e){void 0===e?this._clearOverride("formTemplate"):this._override("formTemplate",e)}get formDescription(){const{formTemplate:e,layer:t}=this;return e?.description&&t?L({attributes:this.getValues(),label:e.description,layer:t,timeZone:this.timeZone}):null}get formTitle(){const{formTemplate:e,layer:t}=this;return e?.title&&t?L({attributes:this.getValues(),label:e.title,layer:t,timeZone:this.timeZone}):null}get formHeaderVisible(){const{activeRelationshipInput:e,activeAssociationInput:t,formDescription:n,formTitle:s}=this;return!(e||t||!n&&!s)}get joinedContingentValues(){return this._joinContingentValues()}get layer(){const e=this._initialFeature;return e?.sourceLayer&&"applyEdits"in e.sourceLayer?e.sourceLayer:null}set layer(e){this._override("layer",e)}get relationshipId(){return this._get("relationshipId")}set relationshipId(e){const t=this.allRelationshipInputs;if(null!=e&&e===this.relationshipId||t.forEach(e=>{e.showAllEnabled=!1,e.activeCategory=null}),null!=e){const n=t.find(t=>t.relationshipId===e);n&&(n.showAllEnabled=!0)}this._set("relationshipId",e)}get spatialReference(){return this.layer?.spatialReference??null}set spatialReference(e){this._override("spatialReference",e)}get state(){return this.layer?.loaded?"ready":"disabled"}get submittable(){return!!this.valid||this.allFieldInputs.filter(e=>!e.valid).every(({submittable:e})=>e)}get timeZone(){const{layer:e}=this;if(e&&"datesInUnknownTimezone"in e&&e.datesInUnknownTimezone)return b;const t=e&&"preferredTimeZone"in e&&e.preferredTimeZone;return this._timeZone===V?t||b:this._timeZone||w}set timeZone(e){this._timeZone=e}get updating(){return this._updatingHandles.updating}get valid(){const e=this.allFieldInputs;return e.length>0&&e.every(({valid:e})=>e)}findField(e){return this.allFieldInputs.find(t=>t.name===e)}findGroup(e){return this.allGroupInputs.find(t=>t.id===e)}getFieldValueOptionsForField(e,t){const n=this.findField(e);if(!n)return[[],[],[]];const s="coded-value"===n.domain?.type?n.domain.codedValues.map(({name:e,code:t})=>({name:e,value:t})):[],i=null==n.value||s.some(e=>e.value===n.value)?[]:[{name:`${n.value}`,value:n.value}],o=this.fieldsWithContingentValues.has(e)?this._getContingentValueOptionsForField(e,t):[];if(o.length>0){const e=new Set(o.map(e=>e.value));return[o,s.filter(t=>!e.has(t.value)),i]}return[s,[],i]}getValue(e){const t=this.layer?.getField(e);if(null!=t)return this._featureClone.getAttribute(t.name)??null}setValue(e,t){const{_featureClone:n,strict:s}=this,i=this.findField(e);t=""===t?null:t,i&&n.getAttribute(e)!==t&&(i.value=t,s&&!i.valid||(this._afterValueChange(i),this._evaluateExpressions(t=>t.evaluateInvalidated([e]))))}getValues(){return{...this._featureClone.attributes}}overrideInitialFeature(e){this._initialFeature=e}submit(){const e=this.allFieldInputs,t=new Set(e.filter(e=>e.valid).map(({name:e})=>e)),n=e.filter(e=>!e.valid).map(({name:e})=>e),s=this.getValues();if(this.validateContingencyConstraints(s,{includeIncompleteViolations:!0}).length>0)for(const[i,o]of this.contingencyConstraintViolations.entries())"error"===o.type&&(t.delete(i),n.push(i));this.notifyChange("submittable"),this.notifyChange("valid"),this.emit("submit",{valid:[...t],invalid:n,values:s})}validateContingencyConstraints(e,t){const{_contingentValuesCache:n}=this,s=new Map;if(this.contingencyConstraintViolations=s,null==n)return[];const{invalid:i,incomplete:o}=n.validateContingencyConstraints(e),r=[...i,...t?.includeIncompleteViolations?o:[]];for(const a of r)for(const e of a.fieldGroup.fields)s.set(e,a);return r}notifyFeatureGeometryChanged(){const{feature:e,_featureClone:t}=this;e&&(t.geometry=e.geometry,this._evaluateExpressions(e=>e.evaluateInvalidatedByGeometry()))}applySubtypeDefaults(e){const{defaultValues:t}=e,{allFieldInputs:n}=this;for(const{name:s}of n){const e=t[s];null!=e&&this.setValue(s,e)}}_emitChangeEvent({name:e,valid:t,value:n}){this.emit("value-change",{layer:this.layer,feature:this.feature,fieldName:e,value:n,valid:t})}_evaluateExpressions(e){const t=this._expressionsManager;null!=t&&this._updatingHandles.addPromise(e(t).finally(()=>this._afterExpressionsEvaluated()))}async _updateInputsUsingFormElements(e,t,n){const s=new Map;for(const r of e)if(T(r)){s.set(r.element,r);for(const e of r.inputs)e.element&&s.set(e.element,e)}else r.element&&s.set(r.element,r);const i=new Map,o=await this._updateInputsUsingFormElementsRecursive({existingInputsByElement:s,updatedElements:t.filter(e=>this._isSupportedElement(e)),sharedInitializationProperties:n,group:null,newExpressionExecutorPromises:i});for(const[r,a]of s.entries())s.delete(r),a.destroy();return await Promise.all(Array.from(i.values())),o}async _updateInputsUsingFormElementsRecursive(e){const{existingInputsByElement:t,updatedElements:n,sharedInitializationProperties:s,group:i,newExpressionExecutorPromises:o}=e,r=[];for(const a of n){const e=t.has(a),n=e?t.get(a):g(a)?await this._makeUtilityNetworkAssociationInputFromElement(a,s,i):this._makeInputFromElement(a,s,i);if(n){if(r.push(n),await p(()=>!n.updating),this._assignExpressionExecutors(n,a,o),e)if(t.delete(a),T(n)){const{feature:e,timeZone:t}=s;n.set({feature:e,timeZone:t})}else if(N(n)){const e=this.relationshipId===a.relationshipId;n.set(s),n.set({map:this.map,showAllEnabled:e})}else g(n)?(n.set(s),n.set({map:this.map})):n.set(s);if(_(a)){const e=a.elements.filter(e=>this._isSupportedElement(e));n.inputs=await this._updateInputsUsingFormElementsRecursive({existingInputsByElement:t,updatedElements:e,sharedInitializationProperties:s,group:n,newExpressionExecutorPromises:o})}}}return r}_updateInputsUsingLayerFields(e,t,n){if(!Array.isArray(t))return i.getLogger(this).warn(this.declaredClass,"No attribute fields found."),[];const s=new Map;for(const i of e)if(T(i)){for(const e of i.inputs)e.destroy();i.inputs.length=0,i.destroy()}else N(i)?i.destroy():S(i)&&(null!==i.element?i.destroy():s.set(i.field,i));const o=[];for(const i of t){const e=n.feature?.getAttribute(i.name)??null,t=s.get(i)??new Z({field:i,preservesValueWhenHidden:this.formTemplate?.preserveFieldValuesWhenHidden});o.push(t.set({...n,value:e})),s.delete(i)}for(const[i,r]of s.entries())s.delete(i),r.destroy();return o}_resetFieldInputValues(e){for(const t of this.allFieldInputs)t.value=e.getAttribute(t.name)??null}_makeInputFromElement(e,t,s){return _(e)?Y(e,t):v(e)?this._makeFieldInputFromElement(e,t,s):I(e)?this._makeRelationshipInputFromElement(e,t,s):g(e)?this._makeUtilityNetworkAssociationInputFromElement(e,t,s):x(e)?q(e,t):g(e)?this._makeUtilityNetworkAssociationInputFromElement(e,t,s):n()}_makeFieldInputFromElement(e,t,n){const{editType:s,feature:i,initialFeature:o,layer:r,timeZone:a}=t,{fieldName:l}=e,u=l&&this._layerFieldsByName.get(l);return u?new Z({editType:s,element:e,field:u,value:i?.getAttribute(e.fieldName)??null,feature:i,initialFeature:o,layer:r,group:n,preservesValueWhenHidden:this.formTemplate?.preserveFieldValuesWhenHidden,timeZone:a}):null}_makeRelationshipInputFromElement(e,t,n=null){const{map:s}=this,{feature:i,layer:o,timeZone:r}=t,a=new P({element:e,feature:i,group:n,layer:o,map:s,timeZone:r});return a.addHandles(c(()=>a.relatedLayer,"edits",()=>this._evaluateExpressions(e=>e.evaluateAsyncExpressions()))),a}async _makeUtilityNetworkAssociationInputFromElement(e,t,n=null){const{map:s}=this,{feature:i,layer:o,timeZone:r}=t;return new(0,(await import("./UtilityNetworkAssociationInput.js")).default)({element:e,feature:i,group:n,layer:o,map:s,timeZone:r})}_assignExpressionExecutors(e,t,n){const s=D[t.type],i=[];for(const o of s){const s=`${o}Executor`;if(e[s]){this._useExecutor(e[s]);continue}const r=t[o];if(null!=r&&""!==r){const t=this._expressionInfosLookup.get(r)?.expression??r;i.push(this._getOrCreateExecutorForExpression(t,n).then(t=>{e[s]=this._useExecutor(t)}))}}return k(e)&&i.push(...this._assignTextElementExpressionExecutors(e,n)),i}_assignTextElementExpressionExecutors(e,t){const{_expressionInfosLookup:n}=this,s=[];for(const o of e.expressionsUsed){const r=n.get(o);null!=r?s.push(this._getOrCreateExecutorForExpression(r.expression,t).then(t=>e.setExpressionExecutor(o,this._useExecutor(t)))):i.getLogger(this).error("feature-form:expression-not-found",`Could not find expressionInfo object with name '${o}'`)}for(const i of e.fieldsUsed){const n=`return $feature['${i}'];`;s.push(this._getOrCreateExecutorForExpression(n,t).then(t=>e.setFieldExecutor(i,this._useExecutor(t))))}return s}async _getOrCreateExecutorForExpression(e,t){const{_expressionExecutorLookup:n}=this;if(n.has(e))return n.get(e);if(t.has(e))return t.get(e);const s=W(e,this.layer);t.set(e,s);const i=await s;return n.set(e,i),i}_createExpressionsManager(e){const{_arcadeContextInfo:t,_featureClone:n,allFieldInputs:s,formTemplate:i}=this;this._expressionsManager=new H({executors:e,feature:n,arcadeContextInfo:t,fieldInputs:s,preserveFieldValuesWhenHidden:!0===i?.preserveFieldValuesWhenHidden})}_startExpressions(){if(0===this._expressionExecutorsInUse.size)return;const e=Array.from(this._expressionExecutorsInUse);this._createExpressionsManager(e),this._evaluateExpressions(e=>e.evaluateAll())}_stopExpressions(){this._expressionsManager=o(this._expressionsManager),this._expressionExecutorsInUse.clear()}_useExecutor(e){return this._expressionExecutorsInUse.add(e),e}_afterValueChange(e){const{name:t,value:n}=e,{_featureClone:s,formTemplate:i,layer:o}=this;if(!o)return;const r=s.getAttribute(t);s.setAttribute(t,n);const{typeFieldName:a,types:l}=R(o);if((e.isSubtypeField||t===a)&&n!==r){if("subtype-sublayer"===o.type){const e=o.parent?.findSublayerForFeature(s);e&&(this.feature&&(this.feature.sourceLayer=e),s.sourceLayer=e,this._initialFeature.sourceLayer=e)}const e=new Set;for(const t of l)if(t.domains&&"object"==typeof t.domains)for(const n of Object.keys(t.domains))e.add(n);for(const t of e){const e=this.findField(t);e&&e.notifyChange("domain")}this.notifyChange("joinedContingentValues")}if(null!=i){const{description:e,title:n}=i;n&&h(n,t)&&this.notifyChange("formTitle"),e&&h(e,t)&&this.notifyChange("formDescription")}this._emitChangeEvent(e)}_afterExpressionsEvaluated(){const{_featureClone:e}=this;for(const t of this.allFieldInputs)t.value!==e.getAttribute(t.name)&&this._afterValueChange(t)}_joinContingentValues(){const e=this._contingentValuesCache;if(null==e)return[];const{typeFieldName:t}=R(this.layer),n=t?this.getValue(t):null,s=[];for(const r of e.fieldGroups){const{contingencies:e,fields:t,name:i}=r,o=[];for(const s of e)s.isRetired||null!=s.subtype&&s.subtype.code!==n||o.push({values:s.values});o.length>0&&s.push({name:i,fields:t,contingencies:o})}const[i,o]=this._generateJoinPlan(s);return[...i.flatMap(e=>this._joinFieldGroupContingencies(e)),...o.flatMap(e=>e.contingencies)]}_generateJoinPlan(e){const t=new Map,n=[],s=new Set;for(const l of e)for(const e of l.fields)if(t.has(e)){const i=t.get(e),o=l,r=[i.name,o.name].sort().join("|");if(s.has(r))continue;n.push([i,o]),s.add(r),t.set(e,o)}else t.set(e,l);const i=new Set(n.flat()),o=new Set(e);for(const l of i)o.delete(l);const r=new Map,a=new Map;for(const l of new Set(n.flat())){const e=Symbol(l.name);r.set(e,new Set([l])),a.set(l,e)}for(const[l,u]of n){const e=a.get(l),t=a.get(u);if(e===t)continue;const n=r.get(e),s=r.get(t);for(const i of s)n.add(i),a.set(i,e);r.delete(t)}return[[...r.values()].map(e=>[...e]),[...o]]}_joinFieldGroupContingencies(e){const t=e.slice(),n=t.shift();let s=t.shift(),i=this._generateJoinKey(n.fields,s.fields),o=new Set([...n.fields,...s.fields]),r=new Map;for(const l of n.contingencies){const[e]=this._hashContingency(l,i.codedValueFields,!0);r.has(e)?r.get(e)?.push(l):r.set(e,[l])}for(;t.length>0;){const e=new Map,n=t.shift(),a=this._generateJoinKey(o,n.fields);for(const t of s.contingencies){const[n,s]=this._hashContingency(t,i.codedValueFields),o=s?this._findMatchingContingenciesWithAnyHashMask(r,n):r.get(n);if(r.has(J)&&o?.push(...this._findMatchingContingenciesContainingAny(t,r.get(J),i.codedValueFields)),null!=o)for(const r of o){const n=i.rangeFields.length>0?this._joinContingenciesWithRangeDomains(r,t,i.rangeFields):this._joinContingencies(r,t);if(null==n)break;const[s]=this._hashContingency(n,a.codedValueFields,!0);e.has(s)?e.get(s)?.push(n):e.set(s,[n])}}r=e,s=n,i=a,o=new Set([...o,...s.fields])}const a=[];for(const l of s.contingencies){const[e,t]=this._hashContingency(l,i.codedValueFields),n=t?this._findMatchingContingenciesWithAnyHashMask(r,e):r.get(e);if(r.has(J)&&n.push(...this._findMatchingContingenciesContainingAny(l,r.get(J),i.codedValueFields)),null!=n)for(const s of n){const e=i.rangeFields.length>0?this._joinContingenciesWithRangeDomains(s,l,i.rangeFields):this._joinContingencies(s,l);null!=e&&a.push(e)}}return a}_joinContingencies(e,t){const n={values:{...e.values,...t.values}};for(const[s,i]of Object.entries(n.values))"any"===i.objectType&&null!=e.values[s]&&(n.values[s]=e.values[s]);return n}_joinContingenciesWithRangeDomains(e,t,n){const s=this._joinContingencies(e,t);for(const i of n){const n=e.values[i],o=t.values[i],{leftIsNull:r,rightIsNull:a,bothAreNull:l,leftIsAny:u,rightIsAny:p,bothAreAny:c,leftIsRange:h,rightIsRange:d}=this._compareObjectTypes(n.objectType,o.objectType);if(l||c)continue;if(r&&p||a&&u){s.values[i]=new E({objectType:"null"});continue}if(r&&d||a&&h)return null;u?(n.minValue=-1/0,n.maxValue=1/0):p&&(o.minValue=-1/0,o.maxValue=1/0);const f=Math.max(n.minValue,o.minValue),m=Math.min(n.maxValue,o.maxValue);if(f>m)return null;s.values[i]=new E({objectType:"range",minValue:f,maxValue:m})}return s}_findMatchingContingenciesContainingAny(e,t,n){return t.filter(t=>n.every(n=>{const s=t.values[n],i=e.values[n];return"any"===s.objectType||"any"===i.objectType||s.codedValue?.code===i.codedValue?.code}))}_findMatchingContingenciesWithAnyHashMask(e,t){const n=new RegExp(`${t}$`),s=[];for(const[i,o]of e){if(i===J)break;n.test(i)&&s.push(...o)}return s}_generateJoinKey(e,t){const n=Array.isArray(e)?new Set(e):e,s=Array.isArray(t)?new Set(t):t,i=n.size<s.size?n:s,o=i===n?s:n,{feature:r}=this,a=new Set,l=new Set;for(const u of i)if(o.has(u)){const e=this.layer?.getFieldDomain(u,{feature:r??void 0,excludeImpliedDomains:!0});if(null==e)continue;switch(e.type){case"coded-value":a.add(u);break;case"range":l.add(u)}}return{codedValueFields:[...a],rangeFields:[...l]}}_contingencyIsValid(e,t){const n={};for(const{name:s,value:i}of this.allFieldInputs)this.fieldsWithContingentValues.has(s)&&null!=i&&s!==e&&(n[s]=i);return Object.entries(n).every(([e,n])=>!t.values.hasOwnProperty(e)||U(n,t.values[e]))}_getContingentValueOptionsForField(e,t){const n=this.joinedContingentValues.slice(),s=new Map,i={code:"",name:t??"No value"};for(const o of n){const t=o.values[e];if("code"===t?.objectType||"null"===t?.objectType){const{code:n,name:r}=t.codedValue&&"null"!==t.objectType?t.codedValue:i;!s.has(n)&&this._contingencyIsValid(e,o)&&s.set(n,{name:r,value:n})}}return[...s.values()]}_hashContingency(e,t,n=!1){if(t.length<1)return[z,!1];const s=[];let i=!1;for(const o of t){const t=e.values[o];if("any"===t.objectType){if(n)return[J,!0];i=!0,s.push(`${o}:.*`)}else"null"===t.objectType?s.push(`${o}:${B}`):s.push(`${o}:${t.codedValue?.code}`)}return[s.sort().join("&"),i]}_compareObjectTypes(e,t){return{leftIsNull:"null"===e,rightIsNull:"null"===t,bothAreNull:"null"===e&&"null"===t,leftIsAny:"any"===e,rightIsAny:"any"===t,bothAreAny:"any"===e&&"any"===t,leftIsRange:"range"===e,rightIsRange:"range"===t}}_isSupportedElement(e){return"field"===e.type||"group"===e.type||"relationship"===e.type||"text"===e.type||"utilityNetworkAssociations"===e.type||(i.getLogger(this).warn("form-info::unsupported-element-type","Only element types 'field', 'group' and 'relationship' are supported",`Element ${e.label} has unsupported type '${e.type}'`),!1)}get test(){return{featureClone:this._featureClone}}};function Y(e,t){const{feature:n,layer:s}=t;return new O({element:e,inputs:[],feature:n,layer:s})}function q(e,t,n=null){const{feature:s,layer:i,timeZone:o}=t;return new G({element:e,feature:s,group:n,layer:i,timeZone:o})}e([d()],K.prototype,"_expressionInfosLookup",null),e([d()],K.prototype,"_featureClone",void 0),e([d()],K.prototype,"_initialFeature",void 0),e([d()],K.prototype,"_timeZone",void 0),e([d()],K.prototype,"activeAssociation",void 0),e([d()],K.prototype,"activeAssociationInput",null),e([d()],K.prototype,"activeRelationshipInput",null),e([d()],K.prototype,"_arcadeContextInfo",null),e([d()],K.prototype,"associationId",null),e([d()],K.prototype,"associatedLayer",null),e([d()],K.prototype,"allAssociationInputs",null),e([d()],K.prototype,"allFieldInputs",null),e([d()],K.prototype,"allGroupInputs",null),e([d()],K.prototype,"allRelationshipInputs",null),e([d()],K.prototype,"_layerFieldsByName",null),e([d()],K.prototype,"editType",void 0),e([d()],K.prototype,"contingencyConstraintViolations",void 0),e([d()],K.prototype,"disabled",void 0),e([d()],K.prototype,"feature",null),e([d()],K.prototype,"fieldsWithContingentValues",null),e([d({type:y})],K.prototype,"formTemplate",null),e([d()],K.prototype,"formDescription",null),e([d()],K.prototype,"formTitle",null),e([d()],K.prototype,"formHeaderVisible",null),e([d()],K.prototype,"highlightHelper",void 0),e([d()],K.prototype,"inputs",void 0),e([d()],K.prototype,"joinedContingentValues",null),e([d()],K.prototype,"layer",null),e([d()],K.prototype,"map",void 0),e([d()],K.prototype,"callbacks",void 0),e([d()],K.prototype,"relationshipId",null),e([d()],K.prototype,"spatialReference",null),e([d()],K.prototype,"state",null),e([d()],K.prototype,"strict",void 0),e([d()],K.prototype,"submittable",null),e([d()],K.prototype,"timeZone",null),e([d()],K.prototype,"updating",null),e([d()],K.prototype,"valid",null),e([d()],K.prototype,"pendingSubtypeChoice",void 0),e([d()],K.prototype,"getValues",null),e([d()],K.prototype,"submit",null),e([d()],K.prototype,"test",null),K=e([f("esri.widgets.FeatureForm.FeatureFormViewModel")],K);const Q=K;export{Q as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as e}from"tslib";import t from"../../core/Error.js";import{watch as i,sync as l}from"../../core/reactiveUtils.js";import{property as n}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as r}from"../../core/accessorSupport/decorators/subclass.js";import{getDomainRange as s,dateTimeFieldValuesToNumericRange as u,validateDomainValue as a}from"../../layers/support/domainUtils.js";import{isFieldVisibleByDefault as o,getLowerCaseEditTrackingFields as p,isNumericField as d,isStringField as m,isTimeOnlyField as h,getFieldRange as f}from"../../layers/support/fieldUtils.js";import{isAnyDateField as y}from"../../smartMapping/support/utils.js";import{isNumber as c}from"../../support/guards.js";import{isRelatableFeatureSupportedLayer as g}from"../Feature/support/featureUtils.js";import x from"./EditableInput.js";import{isFieldElementWithInputType as v,valueIsInvalidSwitchValue as E,isFieldElementWithShowNoValueOptionInput as b}from"./featureFormUtils.js";import{timeResolutionToStepMap as _,isArcadeDate as V,arcadeDateToFieldValue as T}from"../support/dateUtils.js";import{dateIsValid as w,getMaxLength as F,getMinLength as L,validateFormValue as D}from"../support/forms/formUtils.js";let M=class extends x{constructor(e){super(e),this._storedValue=null,this.error=null,this.preservesValueWhenHidden=!0,this.field=null,this.group=null,this.requiredExpressionExecutor=null,this.type="field",this._fieldInputWasVisibleDuringLifetime=!1,this.valueExpressionExecutor=null}initialize(){this.addHandles(i(()=>this.feature,()=>this._fieldInputWasVisibleDuringLifetime=!1,l))}get _dateFormRange(){const{element:e,field:t}=this;if("date"!==this.dataType)return{};const i=e?.domain?s(t,e.domain):null;if(!e?.input)return i??{};const l=e.input,{type:n}=l;let r={};if("date-picker"!==n&&"time-picker"!==n&&"datetimeoffset-picker"!==n||(r=u(t,l.max,l.min)),"datetime-picker"===n){const{max:e,min:t}=l;r={max:null!=e&&w(e)?e.getTime():null,min:null!=t&&w(t)?t.getTime():null}}const{max:a,min:o}=r;if(i){const{max:e,min:t}=i,l=c(e)&&(null==a||null!=a&&e<a),n=c(t)&&(null==o||null!=o&&t>o);return{max:l?e:a??null,min:n?t:o??null,rawMax:l?i.rawMax:r?.rawMax??null,rawMin:n?i.rawMin:r?.rawMin??null}}return{min:o,max:a,rawMax:r?.rawMax??null,rawMin:r?.rawMin??null}}get _dateRange(){const{_dateFormRange:e,field:t}=this;if("date"!==this.dataType)return{};const i=s(t);if(!i)return e;const{max:l,min:n,rawMax:r,rawMin:u}=e;if("date"===t.type){const{max:e,min:t}=i;return{max:c(l)&&(null===e||null!=e&&l<e)?l:e??null,min:c(n)&&(null===t||null!=t&&n>t)?n:t??null}}if("date-only"===t.type||"time-only"===t.type||"timestamp-offset"===t.type){const{max:e,min:t,rawMax:s,rawMin:a}=i,o=c(l)&&r&&(null==e||l<e),p=c(n)&&u&&(null==t||n>t);return{max:o?l:e,min:p?n:t,rawMax:o?r:s,rawMin:p?u:a}}return{max:null,min:null}}get _configAllowsEdits(){const{element:e,layer:t,name:i}=this;if(null!=e)return e.editableExpression?!!this.evaluatedEditableExpression:!1!==e.editable;if(t?.userHasUpdateItemPrivileges)return!0;const l=t&&"popupTemplate"in t?t?.popupTemplate?.fieldInfos?.find(({fieldName:e})=>e===i):null;return l?.isEditable??!0}get _layerAndFieldAllowEdits(){return this.layerAllowsEdits&&this.field?.editable}get _isVisibleByDefault(){const{field:e,layer:t}=this;return!!e?.visible&&o(e,t)}get _isEditTrackingField(){return p(this.layer).includes(this.name?.toLowerCase())}get _shouldUseValueExpression(){return this._layerAndFieldAllowEdits&&!this._configAllowsEdits&&null!=this.valueExpressionExecutor&&this.valueExpressionExecutor.initialExecutionComplete}get isSubtypeField(){const{layer:e}=this;if(e&&"subtypeField"in e){const{subtypeField:t,fieldsIndex:i}=e;return(i.get(t)?.name??t)===this.name}return!1}get valueIsOutOfDomain(){const{domain:e,value:t,field:i}=this;return!(!e||null==t)&&null!==a(i,t,e)}get dataType(){const{field:e}=this;return d(e)?"number":m(e)?"text":y(e)||h(e)?"date":"unsupported"}get dateDataType(){if("date"===this.dataType)return"date"!==this.field.type?"string":"number"}get domain(){const{layer:e,feature:t,name:i,element:l}=this,n=l?.domain;return null!=n&&this._isDomainCompatible(n)?n:e.getFieldDomain(i,{feature:t})}get editable(){return!!this._layerAndFieldAllowEdits&&(this.evaluatedEditableExpression??this._configAllowsEdits)}get evaluatedRequiredExpression(){const{requiredExpressionExecutor:e}=this;return null!=e?!!e.lastEvaluatedValue:null}get evaluatedValueExpression(){const{valueExpressionExecutor:e}=this;return null!=e?e.lastEvaluatedValue:null}get hint(){return this.element?.hint}get includeDate(){return!("date"!==this.dataType||"time-only"===this.field.type)}get includeTime(){const{element:e,field:t}=this;if("date"!==this.dataType)return!1;if("time-only"===t.type)return!0;if("date-only"===t.type)return!1;const i="datetime-picker"===e?.input?.type?e.input.includeTime:void 0;return void 0===i||i}get includeTimeOffset(){if("timestamp-offset"!==this.field.type)return!1;const e=this.element?.input;return!e||"datetimeoffset-picker"===e.type&&e.includeTimeOffset}set initialFeature(e){this._set("initialFeature",e),this.notifyChange("valid")}get inputType(){return this.element?.input?.type}get hasInvalidSwitchValue(){const{element:e}=this,t=v(e,"switch")?e.input:null;return!t||E(this.value,t)}get isRelationshipKeyField(){const{field:e,layer:t}=this;return g(t)&&!!t.relationships?.some(t=>t.keyField===e.name)}get label(){const{field:e}=this;return this.getFormattedLabel(this.element?.label)||e.alias||e.name}get maxLength(){return F({dataType:this.dataType,field:this.field,input:this.element?.input})}get minLength(){return L({dataType:this.dataType,field:this.field,input:this.element?.input})}get name(){return this.field?.name}get range(){const{domain:e,element:t,field:i}=this;if("date"===this.dataType)return this._dateRange;const l=s(i,e)||f(i,e),n=l?.max===Number.MAX_VALUE?null:l?.max??null,r=l?.min===-Number.MAX_VALUE?null:l?.min??null;if(!t?.domain||"range"!==t.domain.type)return{max:n,min:r};const{max:u,min:a}=s(i)||{};return{max:null!=u&&(null===n||null!=n&&u<n)?u:n,min:null!=a&&(null===r||null!=r&&a>r)?a:r}}get required(){const{editable:e,evaluatedRequiredExpression:t,field:i,visible:l,isSubtypeField:n}=this;if(!e)return!1;if(!1===i?.nullable)return!0;if(n)return!0;return!(!l||!1===this.group?.visible||null==t)&&t}set required(e){this._overrideIfSome("required",e)}get showNoValueOptionEnabled(){const{element:e}=this;return!this.required&&(!b(e)||e.input.showNoValueOption)}get showNoValueLabel(){const{element:e}=this;return b(e)?e.input.noValueOptionLabel:null}get submittable(){const{field:e,required:t,valid:i,value:l}=this;return(!t||null!=l)&&(!!i||this.initialFeature.getAttribute(e.name)===l)}get timeResolution(){const e=this.element?.input;if(e&&("datetimeoffset-picker"===e.type||"time-picker"===e.type))return e.timeResolution??"minutes"}get timeStep(){return null!=this.timeResolution?_.get(this.timeResolution):void 0}get updating(){const{editableExpressionExecutor:e,valueExpressionExecutor:t,visibilityExpressionExecutor:i,preservesValueWhenHidden:l}=this;return null!=t&&t.updating||null!=e&&e.updating||!1===l&&null!=i&&i.updating}get valid(){const e=this.editable?this._validate():null;return this._set("error",e),null===e}get value(){if(this._fieldInputWasVisibleDuringLifetime=this._fieldInputWasVisibleDuringLifetime||this.visible&&!1!==this.group?.visible,!1===this.preservesValueWhenHidden&&this._fieldInputWasVisibleDuringLifetime&&(!1===this.visibilityExpressionExecutor?.lastEvaluatedValue||!1===this.group?.visibilityExpressionExecutor?.lastEvaluatedValue))return null!==this._storedValue&&this.set("_storedValue",null),null;if(this._shouldUseValueExpression){const e=this.evaluatedValueExpression;return"date"===this.dataType?this._arcadeOutputToDateFieldValue(e):null!=e&&"object"==typeof e?`${e}`:e}return this._storedValue}set value(e){this.notifyChange("evaluatedVisibilityExpression"),this.set("_storedValue",e),this.notifyChange("value"),this.notifyChange("valid")}get visible(){return!this._isEditTrackingField&&(null!=this.evaluatedVisibilityExpression?this.evaluatedVisibilityExpression:null!=this.element&&!1!==this.field?.visible||this._isVisibleByDefault)}_arcadeOutputToDateFieldValue(e){const i=this.field.type;try{if("object"==typeof e){if(null===e)return null;if(V(e))return T(e,i);if("getTime"in e&&"function"==typeof e.getTime&&"date"===i)return parseInt(e.getTime(),10);if("date-only"===i||"time-only"===i||"timestamp-offset"===i)return e.toString()}else{if("string"==typeof e)return"date"===i?parseInt(e,10):e;if("number"==typeof e&&"date"===i)return e}throw new t("feature-form:invalid-date-value","Date value is invalid")}catch{return"date"===i?NaN:""}}_isDomainCompatible(e){const{field:t}=this;if("coded-value"===e?.type){const i=typeof e.codedValues[0].code;if("string"===i&&m(t)||"number"===i&&d(t))return!0}return!!("range"===e?.type&&d(t)||y(t)||h(t))}_validate(){const{dataType:e,domain:t,field:i,minLength:l,range:n,required:r,value:s,maxLength:u}=this;return D(s,{dataType:e,domain:t,field:i,maxLength:u,minLength:l,range:n,required:r})}};e([n()],M.prototype,"_dateFormRange",null),e([n()],M.prototype,"_dateRange",null),e([n()],M.prototype,"_storedValue",void 0),e([n()],M.prototype,"_configAllowsEdits",null),e([n()],M.prototype,"_layerAndFieldAllowEdits",null),e([n()],M.prototype,"_isVisibleByDefault",null),e([n()],M.prototype,"_isEditTrackingField",null),e([n()],M.prototype,"_shouldUseValueExpression",null),e([n()],M.prototype,"isSubtypeField",null),e([n()],M.prototype,"valueIsOutOfDomain",null),e([n()],M.prototype,"dataType",null),e([n()],M.prototype,"dateDataType",null),e([n()],M.prototype,"domain",null),e([n()],M.prototype,"editable",null),e([n({readOnly:!0})],M.prototype,"error",void 0),e([n({constructOnly:!0})],M.prototype,"preservesValueWhenHidden",void 0),e([n()],M.prototype,"evaluatedRequiredExpression",null),e([n()],M.prototype,"evaluatedValueExpression",null),e([n()],M.prototype,"field",void 0),e([n()],M.prototype,"group",void 0),e([n({readOnly:!0})],M.prototype,"hint",null),e([n()],M.prototype,"includeDate",null),e([n()],M.prototype,"includeTime",null),e([n()],M.prototype,"includeTimeOffset",null),e([n()],M.prototype,"initialFeature",null),e([n({readOnly:!0})],M.prototype,"inputType",null),e([n()],M.prototype,"hasInvalidSwitchValue",null),e([n()],M.prototype,"isRelationshipKeyField",null),e([n()],M.prototype,"label",null),e([n()],M.prototype,"maxLength",null),e([n()],M.prototype,"minLength",null),e([n({readOnly:!0})],M.prototype,"name",null),e([n()],M.prototype,"range",null),e([n()],M.prototype,"required",null),e([n()],M.prototype,"requiredExpressionExecutor",void 0),e([n()],M.prototype,"showNoValueOptionEnabled",null),e([n()],M.prototype,"submittable",null),e([n()],M.prototype,"timeResolution",null),e([n()],M.prototype,"timeStep",null),e([n({readOnly:!0})],M.prototype,"type",void 0),e([n()],M.prototype,"updating",null),e([n()],M.prototype,"valid",null),e([n({value:null})],M.prototype,"value",null),e([n()],M.prototype,"valueExpressionExecutor",void 0),e([n()],M.prototype,"visible",null),M=e([r("esri.widgets.FeatureForm.FieldInput")],M);const O=M;export{O as default};
|
|
5
|
+
import{__decorate as e}from"tslib";import t from"../../core/Error.js";import{watch as i,sync as l}from"../../core/reactiveUtils.js";import{property as n}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as r}from"../../core/accessorSupport/decorators/subclass.js";import{getEffectiveFieldAlias as s}from"../../editing/fieldUtils.js";import{getDomainRange as u,dateTimeFieldValuesToNumericRange as a,validateDomainValue as o}from"../../layers/support/domainUtils.js";import{isFieldVisibleByDefault as p,getLowerCaseEditTrackingFields as d,isNumericField as m,isStringField as h,isTimeOnlyField as f,getFieldRange as y}from"../../layers/support/fieldUtils.js";import{isAnyDateField as c}from"../../smartMapping/support/utils.js";import{isNumber as g}from"../../support/guards.js";import{isRelatableFeatureSupportedLayer as x}from"../Feature/support/featureUtils.js";import v from"./EditableInput.js";import{isFieldElementWithInputType as E,valueIsInvalidSwitchValue as b,isFieldElementWithShowNoValueOptionInput as _}from"./featureFormUtils.js";import{timeResolutionToStepMap as V,isArcadeDate as T,arcadeDateToFieldValue as w}from"../support/dateUtils.js";import{dateIsValid as F,getMaxLength as L,getMinLength as D,validateFormValue as j}from"../support/forms/formUtils.js";let M=class extends v{constructor(e){super(e),this._storedValue=null,this.error=null,this.preservesValueWhenHidden=!0,this.field=null,this.group=null,this.requiredExpressionExecutor=null,this.type="field",this._fieldInputWasVisibleDuringLifetime=!1,this.valueExpressionExecutor=null}initialize(){this.addHandles(i(()=>this.feature,()=>this._fieldInputWasVisibleDuringLifetime=!1,l))}get _dateFormRange(){const{element:e,field:t}=this;if("date"!==this.dataType)return{};const i=e?.domain?u(t,e.domain):null;if(!e?.input)return i??{};const l=e.input,{type:n}=l;let r={};if("date-picker"!==n&&"time-picker"!==n&&"datetimeoffset-picker"!==n||(r=a(t,l.max,l.min)),"datetime-picker"===n){const{max:e,min:t}=l;r={max:null!=e&&F(e)?e.getTime():null,min:null!=t&&F(t)?t.getTime():null}}const{max:s,min:o}=r;if(i){const{max:e,min:t}=i,l=g(e)&&(null==s||null!=s&&e<s),n=g(t)&&(null==o||null!=o&&t>o);return{max:l?e:s??null,min:n?t:o??null,rawMax:l?i.rawMax:r?.rawMax??null,rawMin:n?i.rawMin:r?.rawMin??null}}return{min:o,max:s,rawMax:r?.rawMax??null,rawMin:r?.rawMin??null}}get _dateRange(){const{_dateFormRange:e,field:t}=this;if("date"!==this.dataType)return{};const i=u(t);if(!i)return e;const{max:l,min:n,rawMax:r,rawMin:s}=e;if("date"===t.type){const{max:e,min:t}=i;return{max:g(l)&&(null===e||null!=e&&l<e)?l:e??null,min:g(n)&&(null===t||null!=t&&n>t)?n:t??null}}if("date-only"===t.type||"time-only"===t.type||"timestamp-offset"===t.type){const{max:e,min:t,rawMax:u,rawMin:a}=i,o=g(l)&&r&&(null==e||l<e),p=g(n)&&s&&(null==t||n>t);return{max:o?l:e,min:p?n:t,rawMax:o?r:u,rawMin:p?s:a}}return{max:null,min:null}}get _configAllowsEdits(){const{element:e,layer:t,name:i}=this;if(null!=e)return e.editableExpression?!!this.evaluatedEditableExpression:!1!==e.editable;if(t?.userHasUpdateItemPrivileges)return!0;const l=t&&"popupTemplate"in t?t?.popupTemplate?.fieldInfos?.find(({fieldName:e})=>e===i):null;return l?.isEditable??!0}get _layerAndFieldAllowEdits(){return this.layerAllowsEdits&&this.field?.editable}get _isVisibleByDefault(){const{field:e,layer:t}=this;return!!e?.visible&&p(e,t)}get _isEditTrackingField(){return d(this.layer).includes(this.name?.toLowerCase())}get _shouldUseValueExpression(){return this._layerAndFieldAllowEdits&&!this._configAllowsEdits&&null!=this.valueExpressionExecutor&&this.valueExpressionExecutor.initialExecutionComplete}get isSubtypeField(){const{layer:e}=this;if(e&&"subtypeField"in e){const{subtypeField:t,fieldsIndex:i}=e;return(i.get(t)?.name??t)===this.name}return!1}get valueIsOutOfDomain(){const{domain:e,value:t,field:i}=this;return!(!e||null==t)&&null!==o(i,t,e)}get alias(){return s(this.field,this.layer)}get dataType(){const{field:e}=this;return m(e)?"number":h(e)?"text":c(e)||f(e)?"date":"unsupported"}get dateDataType(){if("date"===this.dataType)return"date"!==this.field.type?"string":"number"}get domain(){const{layer:e,feature:t,name:i,element:l}=this,n=l?.domain;return null!=n&&this._isDomainCompatible(n)?n:e.getFieldDomain(i,{feature:t})}get editable(){return!!this._layerAndFieldAllowEdits&&(this.evaluatedEditableExpression??this._configAllowsEdits)}get evaluatedRequiredExpression(){const{requiredExpressionExecutor:e}=this;return null!=e?!!e.lastEvaluatedValue:null}get evaluatedValueExpression(){const{valueExpressionExecutor:e}=this;return null!=e?e.lastEvaluatedValue:null}get hint(){return this.element?.hint}get includeDate(){return!("date"!==this.dataType||"time-only"===this.field.type)}get includeTime(){const{element:e,field:t}=this;if("date"!==this.dataType)return!1;if("time-only"===t.type)return!0;if("date-only"===t.type)return!1;const i="datetime-picker"===e?.input?.type?e.input.includeTime:void 0;return void 0===i||i}get includeTimeOffset(){if("timestamp-offset"!==this.field.type)return!1;const e=this.element?.input;return!e||"datetimeoffset-picker"===e.type&&e.includeTimeOffset}set initialFeature(e){this._set("initialFeature",e),this.notifyChange("valid")}get inputType(){return this.element?.input?.type}get hasInvalidSwitchValue(){const{element:e}=this,t=E(e,"switch")?e.input:null;return!t||b(this.value,t)}get isRelationshipKeyField(){const{field:e,layer:t}=this;return x(t)&&!!t.relationships?.some(t=>t.keyField===e.name)}get label(){return this.getFormattedLabel(this.element?.label)||this.alias||this.field.name}get maxLength(){return L({dataType:this.dataType,field:this.field,input:this.element?.input})}get minLength(){return D({dataType:this.dataType,field:this.field,input:this.element?.input})}get name(){return this.field?.name}get range(){const{domain:e,element:t,field:i}=this;if("date"===this.dataType)return this._dateRange;const l=u(i,e)||y(i,e),n=l?.max===Number.MAX_VALUE?null:l?.max??null,r=l?.min===-Number.MAX_VALUE?null:l?.min??null;if(!t?.domain||"range"!==t.domain.type)return{max:n,min:r};const{max:s,min:a}=u(i)||{};return{max:null!=s&&(null===n||null!=n&&s<n)?s:n,min:null!=a&&(null===r||null!=r&&a>r)?a:r}}get required(){const{editable:e,evaluatedRequiredExpression:t,field:i,visible:l,isSubtypeField:n}=this;if(!e)return!1;if(!1===i?.nullable)return!0;if(n)return!0;return!(!l||!1===this.group?.visible||null==t)&&t}set required(e){this._overrideIfSome("required",e)}get showNoValueOptionEnabled(){const{element:e}=this;return!this.required&&(!_(e)||e.input.showNoValueOption)}get showNoValueLabel(){const{element:e}=this;return _(e)?e.input.noValueOptionLabel:null}get submittable(){const{field:e,required:t,valid:i,value:l}=this;return(!t||null!=l)&&(!!i||this.initialFeature.getAttribute(e.name)===l)}get timeResolution(){const e=this.element?.input;if(e&&("datetimeoffset-picker"===e.type||"time-picker"===e.type))return e.timeResolution??"minutes"}get timeStep(){return null!=this.timeResolution?V.get(this.timeResolution):void 0}get updating(){const{editableExpressionExecutor:e,valueExpressionExecutor:t,visibilityExpressionExecutor:i,preservesValueWhenHidden:l}=this;return null!=t&&t.updating||null!=e&&e.updating||!1===l&&null!=i&&i.updating}get valid(){const e=this.editable?this._validate():null;return this._set("error",e),null===e}get value(){if(this._fieldInputWasVisibleDuringLifetime=this._fieldInputWasVisibleDuringLifetime||this.visible&&!1!==this.group?.visible,!1===this.preservesValueWhenHidden&&this._fieldInputWasVisibleDuringLifetime&&(!1===this.visibilityExpressionExecutor?.lastEvaluatedValue||!1===this.group?.visibilityExpressionExecutor?.lastEvaluatedValue))return null!==this._storedValue&&this.set("_storedValue",null),null;if(this._shouldUseValueExpression){const e=this.evaluatedValueExpression;return"date"===this.dataType?this._arcadeOutputToDateFieldValue(e):null!=e&&"object"==typeof e?`${e}`:e}return this._storedValue}set value(e){this.notifyChange("evaluatedVisibilityExpression"),this.set("_storedValue",e),this.notifyChange("value"),this.notifyChange("valid")}get visible(){return!this._isEditTrackingField&&(null!=this.evaluatedVisibilityExpression?this.evaluatedVisibilityExpression:null!=this.element&&!1!==this.field?.visible||this._isVisibleByDefault)}_arcadeOutputToDateFieldValue(e){const i=this.field.type;try{if("object"==typeof e){if(null===e)return null;if(T(e))return w(e,i);if("getTime"in e&&"function"==typeof e.getTime&&"date"===i)return parseInt(e.getTime(),10);if("date-only"===i||"time-only"===i||"timestamp-offset"===i)return e.toString()}else{if("string"==typeof e)return"date"===i?parseInt(e,10):e;if("number"==typeof e&&"date"===i)return e}throw new t("feature-form:invalid-date-value","Date value is invalid")}catch{return"date"===i?NaN:""}}_isDomainCompatible(e){const{field:t}=this;if("coded-value"===e?.type){const i=typeof e.codedValues[0].code;if("string"===i&&h(t)||"number"===i&&m(t))return!0}return!!("range"===e?.type&&m(t)||c(t)||f(t))}_validate(){const{dataType:e,domain:t,field:i,minLength:l,range:n,required:r,value:s,maxLength:u}=this;return j(s,{dataType:e,domain:t,field:i,maxLength:u,minLength:l,range:n,required:r})}};e([n()],M.prototype,"_dateFormRange",null),e([n()],M.prototype,"_dateRange",null),e([n()],M.prototype,"_storedValue",void 0),e([n()],M.prototype,"_configAllowsEdits",null),e([n()],M.prototype,"_layerAndFieldAllowEdits",null),e([n()],M.prototype,"_isVisibleByDefault",null),e([n()],M.prototype,"_isEditTrackingField",null),e([n()],M.prototype,"_shouldUseValueExpression",null),e([n()],M.prototype,"isSubtypeField",null),e([n()],M.prototype,"valueIsOutOfDomain",null),e([n()],M.prototype,"alias",null),e([n()],M.prototype,"dataType",null),e([n()],M.prototype,"dateDataType",null),e([n()],M.prototype,"domain",null),e([n()],M.prototype,"editable",null),e([n({readOnly:!0})],M.prototype,"error",void 0),e([n({constructOnly:!0})],M.prototype,"preservesValueWhenHidden",void 0),e([n()],M.prototype,"evaluatedRequiredExpression",null),e([n()],M.prototype,"evaluatedValueExpression",null),e([n()],M.prototype,"field",void 0),e([n()],M.prototype,"group",void 0),e([n({readOnly:!0})],M.prototype,"hint",null),e([n()],M.prototype,"includeDate",null),e([n()],M.prototype,"includeTime",null),e([n()],M.prototype,"includeTimeOffset",null),e([n()],M.prototype,"initialFeature",null),e([n({readOnly:!0})],M.prototype,"inputType",null),e([n()],M.prototype,"hasInvalidSwitchValue",null),e([n()],M.prototype,"isRelationshipKeyField",null),e([n()],M.prototype,"label",null),e([n()],M.prototype,"maxLength",null),e([n()],M.prototype,"minLength",null),e([n({readOnly:!0})],M.prototype,"name",null),e([n()],M.prototype,"range",null),e([n()],M.prototype,"required",null),e([n()],M.prototype,"requiredExpressionExecutor",void 0),e([n()],M.prototype,"showNoValueOptionEnabled",null),e([n()],M.prototype,"submittable",null),e([n()],M.prototype,"timeResolution",null),e([n()],M.prototype,"timeStep",null),e([n({readOnly:!0})],M.prototype,"type",void 0),e([n()],M.prototype,"updating",null),e([n()],M.prototype,"valid",null),e([n({value:null})],M.prototype,"value",null),e([n()],M.prototype,"valueExpressionExecutor",void 0),e([n()],M.prototype,"visible",null),M=e([r("esri.widgets.FeatureForm.FieldInput")],M);const O=M;export{O as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as t}from"tslib";import e from"../../core/Accessor.js";import{property as r}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as
|
|
5
|
+
import{__decorate as t}from"tslib";import e from"../../core/Accessor.js";import{property as r}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as o}from"../../core/accessorSupport/decorators/subclass.js";import{parseFormTemplateString as i}from"./featureFormUtils.js";let l=class extends e{constructor(t){super(t),this.element=null,this.feature=null,this.layer=null,this.timeZone=null,this.type=null,this.visibilityExpressionExecutor=null}get description(){return this.getFormattedLabel(this.element?.description)}get evaluatedVisibilityExpression(){const{visibilityExpressionExecutor:t}=this;return null!=t?!!t.lastEvaluatedValue:null}get label(){return this.getFormattedLabel(this.element?.label)}get updating(){return!1}get visible(){return null!=this.evaluatedVisibilityExpression?this.evaluatedVisibilityExpression:null!=this.element}getFormattedLabel(t){const{feature:e,layer:r,timeZone:o}=this;return null==r||null==t?t:i({attributes:e.attributes,label:t,layer:r,timeZone:o})}};t([r({readOnly:!0})],l.prototype,"description",null),t([r({constructOnly:!0})],l.prototype,"element",void 0),t([r()],l.prototype,"evaluatedVisibilityExpression",null),t([r()],l.prototype,"feature",void 0),t([r()],l.prototype,"label",null),t([r()],l.prototype,"layer",void 0),t([r()],l.prototype,"timeZone",void 0),t([r()],l.prototype,"type",void 0),t([r()],l.prototype,"updating",null),t([r()],l.prototype,"visible",null),t([r()],l.prototype,"visibilityExpressionExecutor",void 0),l=t([o("esri.widgets.FeatureForm.InputBase")],l);const s=l;export{s as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as e}from"tslib";import{watch as t,on as r,initial as i}from"../../core/reactiveUtils.js";import{property as l}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as s}from"../../core/accessorSupport/decorators/subclass.js";import{isSubtypeGroupLayer as o,getEffectiveLayerCapabilities as a}from"../../layers/support/layerUtils.js";import n from"../Feature/FeatureRelationship/FeatureRelationshipViewModel.js";import{isRelatableFeatureSupportedLayer as p}from"../Feature/support/featureUtils.js";import
|
|
5
|
+
import{__decorate as e}from"tslib";import{watch as t,on as r,initial as i}from"../../core/reactiveUtils.js";import{property as l}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as s}from"../../core/accessorSupport/decorators/subclass.js";import{isSubtypeGroupLayer as o,getEffectiveLayerCapabilities as a}from"../../layers/support/layerUtils.js";import n from"../Feature/FeatureRelationship/FeatureRelationshipViewModel.js";import{isRelatableFeatureSupportedLayer as p}from"../Feature/support/featureUtils.js";import u from"./EditableInput.js";import{getComputedAttributes as d,parseFormTemplateString as h}from"./featureFormUtils.js";const y=3;let g=class extends u{constructor(e){super(e),this._relationshipVM=null,this.group=null,this.type="relationship",this.addHandles([t(()=>({feature:this.feature,element:this.element,layer:this.layer}),e=>this._createRelationshipVM(e),i),r(()=>this.relatedLayer,"edits",()=>this._relationshipVM?.refresh())])}destroy(){this._relationshipVM?.destroy()}get canAddRelatedFeature(){const{editable:e,featureCount:t,relationship:r}=this;if(!r||!this.loaded||!this.relatedLayerAllowsAdds)return!1;if(this.allCategories?.length&&!this.activeCategory)return!1;const{cardinality:i,role:l}=r;return!("one-to-one"===i&&t>0)&&("many-to-many"!==i&&(!("one-to-many"===i&&"destination"===l&&t>0)&&e))}get activeCategory(){return this._relationshipVM?.activeCategory}set activeCategory(e){const t=this._relationshipVM;t&&(t.activeCategory=e)}get allCategories(){const{relatedLayer:e}=this,t=this._relationshipVM?.categories;if(!o(e))return;const r=(e.subtypes??[]).map(({code:e,name:r})=>{const i=t?.find(e=>e.name===r);return{name:r,count:i?.count??0,value:i?.value??e}});return r.length?r:null}get categories(){return this.showAllEnabled?this.allCategories:this.allCategories?.slice(0,this.displayCount)}get displayCount(){return this.element.displayCount??y}get displayType(){return this.element.displayType}get editable(){return!!this.relatedLayerAllowsEdits&&(this.evaluatedEditableExpression??!0)}get featureCount(){return this._relationshipVM?.featureCount??0}get label(){return this.activeCategory?.name?this.activeCategory.name:this.getFormattedLabel(this.element?.label)}get loaded(){return"loading"!==this._relationshipVM?.state}get map(){return this._get("map")}set map(e){e&&this._relationshipVM?.set("map",e),this._set("map",e)}get orderByFields(){return this.element.orderByFields}get originHasValidKey(){return!(!this.relationship||!this.feature.getAttribute(this.relationship.keyField))}get relationship(){return this._relationshipVM?.relationship}get relationshipId(){return this.element.relationshipId}get relatedFeatureInfos(){const{_relationshipVM:e,timeZone:t}=this;if(!e?.relatedFeatures?.length||!e?.relatedLayer)return[];const{itemDescriptionFieldName:r,relatedFeatures:i,relatedLayer:l}=e,s=l&&"formTemplate"in l&&l.formTemplate?l.formTemplate.title:void 0;return i.map(e=>{let i;if(r){const s=e.getAttribute(r),o=l.fieldsIndex.get(r);if(o){const e=d({fields:[o],layer:l,values:[s],timeZone:t})[r];null!=e&&(i=e.toString())}}return{feature:e,description:i,title:s?h({attributes:e.attributes,label:s,layer:l,timeZone:t}):void 0}}).toArray()}get relatedLayer(){return this._relationshipVM?.relatedLayer}get relatedLayerIsTable(){return!!this.relatedLayer?.isTable}get relatedLayerAllowsAdds(){const{relatedLayer:e}=this;if(!e||!this.relatedLayerAllowsEdits)return!1;const t=a(e);return!!t?.operations?.supportsAdd}get relatedLayerAllowsEdits(){const{relatedLayer:e}=this;if(!e)return!1;const t=a(e);return!!t?.operations?.supportsEditing}get showAllEnabled(){return this._get("showAllEnabled")}set showAllEnabled(e){this._relationshipVM?.set("showAllEnabled",e),this._set("showAllEnabled",e)}get showAllActionVisible(){return!this.showAllEnabled&&this.featureCount>0&&this.featureCount>this.displayCount}get showAllCategoriesVisible(){const e=this.allCategories?.length??0;return!this.showAllEnabled&&e>0&&e>this.displayCount}get visible(){const{relationship:e}=this;if(!e)return!1;const{cardinality:t}=e;return"many-to-many"!==t&&(null!=this.evaluatedVisibilityExpression?this.evaluatedVisibilityExpression:null!=this.element)}get updating(){return"loading"===this._relationshipVM?.state||"querying"===this._relationshipVM?.state}incrementPage(){this._relationshipVM&&this._relationshipVM.featurePage++}getRelatedFeatureByObjectId(e){return this._relationshipVM?.getRelatedFeatureByObjectId(e)}_createRelationshipVM(e){const{feature:t,element:r,layer:i}=e;if(this._relationshipVM?.destroy(),!t||!r||!i)return;const{displayCount:l,map:s,orderByFields:o,relationshipId:a,showAllEnabled:u}=this;p(i)&&(this._relationshipVM=new n({graphic:t,displayCount:l,layer:i,map:s,orderByFields:o,relationshipId:a,showAllEnabled:u}))}};e([l()],g.prototype,"_relationshipVM",void 0),e([l()],g.prototype,"canAddRelatedFeature",null),e([l()],g.prototype,"activeCategory",null),e([l()],g.prototype,"allCategories",null),e([l()],g.prototype,"categories",null),e([l()],g.prototype,"displayCount",null),e([l()],g.prototype,"displayType",null),e([l()],g.prototype,"editable",null),e([l()],g.prototype,"featureCount",null),e([l()],g.prototype,"group",void 0),e([l()],g.prototype,"label",null),e([l()],g.prototype,"loaded",null),e([l()],g.prototype,"map",null),e([l()],g.prototype,"orderByFields",null),e([l()],g.prototype,"originHasValidKey",null),e([l()],g.prototype,"relationship",null),e([l()],g.prototype,"relationshipId",null),e([l()],g.prototype,"relatedFeatureInfos",null),e([l()],g.prototype,"relatedLayer",null),e([l()],g.prototype,"relatedLayerIsTable",null),e([l()],g.prototype,"relatedLayerAllowsAdds",null),e([l()],g.prototype,"relatedLayerAllowsEdits",null),e([l()],g.prototype,"showAllEnabled",null),e([l()],g.prototype,"showAllActionVisible",null),e([l()],g.prototype,"showAllCategoriesVisible",null),e([l({readOnly:!0})],g.prototype,"type",void 0),e([l()],g.prototype,"visible",null),e([l()],g.prototype,"updating",null),g=e([s("esri.widgets.FeatureForm.RelationshipInput")],g);const c=g;export{c as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import"../../intl.js";import{isSome as e}from"../../core/arrayUtils.js";import{neverReached as t}from"../../core/compilerUtils.js";import{equalsShallow as r}from"../../core/lang.js";import n from"../../core/Logger.js";import{templateHasKey as o,replace as i}from"../../core/string.js";import{isFieldElement as l}from"../../form/support/formUtils.js";import{
|
|
5
|
+
import"../../intl.js";import{isSome as e}from"../../core/arrayUtils.js";import{neverReached as t}from"../../core/compilerUtils.js";import{equalsShallow as r}from"../../core/lang.js";import n from"../../core/Logger.js";import{templateHasKey as o,replace as i}from"../../core/string.js";import{isFieldElement as l}from"../../form/support/formUtils.js";import{convertDateTimeFieldFormatToIntlOptions as a}from"../../intl/date.js";import{defaultFieldFormat as s}from"../../layers/support/fieldFormatUtils.js";import{isTimeOnlyField as u}from"../../layers/support/fieldUtils.js";import{isSubtypeSublayer as m,supportsFieldConfiguration as p,getSubtypesFromLayer as d}from"../../layers/support/layerUtils.js";import{isAnyDateField as f}from"../../smartMapping/support/utils.js";import{getLabelForDateFieldValue as c,getIntlOptionsForField as y}from"../support/dateUtils.js";import{getRangeErrorMessage as g,shouldUseScientificNotation as b,scientificNumberFormatOptions as j,numberFormatOptions as v}from"../support/forms/formUtils.js";import{substitute as x}from"../../intl/substitute.js";const F=e=>"field"===e?.type,h=e=>"group"===e?.type,N=e=>"relationship"===e?.type,T=e=>"text"===e.type,V=e=>"utilityNetworkAssociations"===e.type,U=e=>!h(e)&&null!=e.group,$=(e,t)=>U(e)&&e.group===t,O=e=>e.reduce((e,t)=>h(t)?[...e,...t.inputs]:[...e,t],[]),w=e=>O(e).filter(F),E=e=>O(e).filter(N),L=e=>O(e).filter(V),Z=e=>null!=e&&(C(e,"combo-box")||C(e,"radio-buttons")),C=(e,t)=>null!=e&&e.input?.type===t,I=({domain:e,inputType:t="text-box",dataType:r})=>"number"===r&&"text-box"===t&&(!e||"coded-value"!==e.type);function k(t){const{attributes:r,layer:n,label:i,timeZone:l}=t;if(!r||"object"!=typeof r)return i;const a=Object.keys(r).filter(e=>o(i,e)),s=a.map(e=>r[e]),u=a.map(e=>n.fieldsIndex.get(e)).filter(e);return J(i,G({fields:u,layer:n,timeZone:l,values:s}))}const S="expression/",W="expr/",A="field/";function B(e){const[t,r]=e.split(S);return""===t&&r?r:(n.getLogger("esri.widgets.FeatureForm/featureFormUtils").error("extractExpressionNameFromString:invalid-input",`The string ${e} is not a valid expression reference of the form '${S}/expressionName'`),"")}function M(e){return`${S}${e}`}function q(e){return`${A}${e}`}function z(e){return e.startsWith(S)}function D(e){return e.startsWith(W)}function G(e){const{layer:t,values:r}=e,n=e.fields??t.fields??[],o=e.timeZone??void 0,i=n.map((e,n)=>{let i=r[n];if(e.domain&&"coded-value"===e.domain.type){const t=e.domain.codedValues.find(e=>e.code===i);t?.name&&(i=t.name)}return(f(e)||u(e))&&(i=c(e,i,{timeZone:o,...H(t,e)})),[e.name,i]});return Object.fromEntries(i)}function H(e,t){if(p(e)){const r=e.getFieldConfiguration(t.name)?.fieldFormat??s(t);if("date-time"===r?.type)return a(r)}return y(t)}function J(e,t){return i(i(e,e=>`{${e.toLowerCase()}}`),Object.fromEntries(Object.entries(t).map(([e,t])=>[e.toLowerCase(),t])))}const K=e=>{const t={typeFieldName:null,types:[]};return e?(m(e)?(t.typeFieldName=e.parent?.subtypeField,t.types=e.parent?.subtypes??[]):"subtype-group"===e.type||"feature"===e.type&&e.subtypes?.length?(t.typeFieldName=e.subtypeField,t.types=e.subtypes??[]):"types"in e&&e.types&&(t.typeFieldName=e.typeIdField,t.types=e.types.map(({id:e,name:t,domains:r})=>({code:e,name:t,domains:r}))),null!=t.typeFieldName&&(t.typeFieldName=e.getField(t.typeFieldName)?.name??t.typeFieldName),t):t},P=(e,t,r)=>{const{dataType:n,error:o,minLength:i}=e,l=t?.validationErrors;if(!l||!o)return null;if("input-validation-error::cannot-be-empty"===o)return l.cannotBeNull;if("domain-validation-error::value-out-of-range"===o||"numeric-range-validation-error::out-of-range"===o){const{field:t,range:o}=e,i={type:"date",intlOptions:{timeZone:"date"===t.type&&r?r:void 0,...y(t)}},a=g(o,l);return x(a,o,{format:{max:"date"===n?i:null!=o.max&&b(o.max)?j:v,min:"date"===n?i:null!=o.min&&b(o.min)?j:v}})}return"domain-validation-error::invalid-coded-value"===o?l.invalidCodedValue:"type-validation-error::invalid-type"===o?l.invalidType:"length-validation-error::too-short"===o?x(l.tooShort,{min:i}):null},Q=e=>{if(!e)return;const t=e.layer,r=t&&"geometryType"in t?t.geometryType:void 0,n=e.geometry?.type;return"polyline"===n||"polyline"===r?"line":"mesh"===n||"mesh"===r||"multipatch"===r?"cube":"multipoint"===n||"multipoint"===r?"point":n||r||"table"},R=e=>{const t=[];if(e.formTemplate){const{description:r,title:n}=e.formTemplate;e.fields?.forEach(e=>{const i=n&&o(n,e.name),l=r&&o(r,e.name);(i||l)&&t.push(e.name)})}return t};function X(e,t){const r=t??("formTemplate"in e&&e.formTemplate);if(r){return(r.elements?.filter(l)??[]).some(({fieldName:t})=>!e.fieldsIndex.get(t))}return!1}function Y(e,t){return null==e||t.onValue!==e&&t.offValue!==e}function _(e,r){switch(r.objectType){case"any":return!0;case"null":return null==e;case"code":return e===r.codedValue?.code;case"range":return null!=e&&null!=r.minValue&&null!=r.maxValue&&+e>=r.minValue&&+e<=r.maxValue;default:return t(r.objectType),!1}}function ee(e,t,n){const o=d(e),i=o?.find(e=>e.code===n);if(!i)return!1;const l=o?.find(e=>e.code===t);return!r(i.defaultValues,l?.defaultValues)&&Object.values(i.defaultValues).some(e=>null!=e)}export{B as extractExpressionNameFromString,L as flattenAssociationInputs,w as flattenFieldInputs,O as flattenInputs,E as flattenRelationshipInputs,X as formTemplateHasInvalidFields,G as getComputedAttributes,H as getDateTimeFormatOptions,P as getErrorMessageForFieldInput,R as getFieldsInTitleAndDesc,Q as getIconForFeature,K as getNormalizedFeatureTypeInfo,z as isExpressionReference,C as isFieldElementWithInputType,Z as isFieldElementWithShowNoValueOptionInput,F as isFieldInput,h as isGroupInput,U as isInputInGroupInput,$ as isInputInThisGroupInput,D as isLegacyFieldMapsExpressionReference,I as isNumberFieldInput,N as isRelationshipInput,T as isTextElementInput,V as isUtilityNetworkAssociationInput,k as parseFormTemplateString,M as prependExpressionPrefix,q as prependFieldPrefix,J as substituteFieldTemplatesInString,ee as subtypeChangeShouldPrompt,Y as valueIsInvalidSwitchValue,_ as valueIsValidContingentValue};
|