@arcgis/core 5.0.0-next.60 → 5.0.0-next.62
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/Graphic.d.ts +1 -1
- package/analysis/VolumeMeasurement/volumeMeasurementConfiguration.js +1 -1
- package/applications/Components/previewSymbol2D.d.ts +1 -1
- package/applications/Components/webStyleSymbolUtils.d.ts +1 -1
- package/assets/components/assets/combobox/t9n/messages.ar.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.bg.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.bs.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.ca.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.cs.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.da.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.de.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.el.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.en.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.es.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.et.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.fi.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.fr.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.he.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.hr.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.hu.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.id.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.it.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.ja.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.ko.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.lt.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.lv.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.nl.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.no.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.pl.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.pt-BR.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.pt-PT.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.ro.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.ru.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.sk.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.sl.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.sr.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.sv.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.th.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.tr.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.uk.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.vi.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.zh-CN.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.zh-HK.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.zh-TW.json +1 -1
- package/assets/components/assets/date-picker/nls/fr-CA.json +1 -0
- package/assets/components/assets/icon/arcgisLivingAtlas16.json +1 -0
- package/assets/components/assets/icon/arcgisLivingAtlas24.json +1 -0
- package/assets/components/assets/icon/arcgisLivingAtlas32.json +1 -0
- package/assets/components/assets/icon/arcgisSolutions16.json +1 -0
- package/assets/components/assets/icon/arcgisSolutions24.json +1 -0
- package/assets/components/assets/icon/arcgisSolutions32.json +1 -0
- package/assets/components/assets/icon/cameraSensorMap24.json +1 -1
- package/assets/components/assets/icon/contingentValuesRetire16.json +1 -0
- package/assets/components/assets/icon/contingentValuesRetire24.json +1 -0
- package/assets/components/assets/icon/contingentValuesRetire32.json +1 -0
- package/assets/components/assets/icon/domain16.json +1 -1
- package/assets/components/assets/icon/domain24.json +1 -1
- package/assets/components/assets/icon/domain32.json +1 -1
- package/assets/components/assets/icon/duplicateValues16.json +1 -0
- package/assets/components/assets/icon/duplicateValues24.json +1 -0
- package/assets/components/assets/icon/duplicateValues32.json +1 -0
- package/assets/components/assets/icon/envelope32F.json +1 -1
- package/assets/components/assets/icon/fieldGroups16.json +1 -0
- package/assets/components/assets/icon/fieldGroups24.json +1 -0
- package/assets/components/assets/icon/fieldGroups32.json +1 -0
- package/assets/components/assets/icon/groupContent16.json +1 -0
- package/assets/components/assets/icon/groupContent24.json +1 -0
- package/assets/components/assets/icon/groupContent32.json +1 -0
- package/assets/components/assets/icon/groupTemplate16.json +1 -0
- package/assets/components/assets/icon/groupTemplate24.json +1 -0
- package/assets/components/assets/icon/groupTemplate32.json +1 -0
- package/assets/components/assets/icon/integerSet16.json +1 -0
- package/assets/components/assets/icon/integerSet24.json +1 -0
- package/assets/components/assets/icon/integerSet32.json +1 -0
- package/assets/components/assets/icon/intersection16.json +1 -1
- package/assets/components/assets/icon/lineIntersection16.json +1 -1
- package/assets/components/assets/icon/linkChartCentrality16.json +1 -1
- package/assets/components/assets/icon/locationReferencingDataset16.json +1 -1
- package/assets/components/assets/icon/locationReferencingDataset24.json +1 -1
- package/assets/components/assets/icon/locationReferencingDataset32.json +1 -1
- package/assets/components/assets/icon/metadata16.json +1 -0
- package/assets/components/assets/icon/metadata24.json +1 -0
- package/assets/components/assets/icon/metadata32.json +1 -0
- package/assets/components/assets/icon/missionSystemMessage16.json +1 -0
- package/assets/components/assets/icon/missionSystemMessage24.json +1 -0
- package/assets/components/assets/icon/missionSystemMessage32.json +1 -0
- package/assets/components/assets/icon/newCompletePart16.json +1 -1
- package/assets/components/assets/icon/newCompletePart24.json +1 -1
- package/assets/components/assets/icon/newCompletePart32.json +1 -1
- package/assets/components/assets/icon/numberSet16.json +1 -0
- package/assets/components/assets/icon/numberSet24.json +1 -0
- package/assets/components/assets/icon/numberSet32.json +1 -0
- package/assets/components/assets/icon/openData16.json +1 -0
- package/assets/components/assets/icon/openData24.json +1 -0
- package/assets/components/assets/icon/openData32.json +1 -0
- package/assets/components/assets/icon/organizeTemplate16.json +1 -0
- package/assets/components/assets/icon/organizeTemplate24.json +1 -0
- package/assets/components/assets/icon/organizeTemplate32.json +1 -0
- package/assets/components/assets/icon/partneredCollaboration16.json +1 -0
- package/assets/components/assets/icon/partneredCollaboration24.json +1 -0
- package/assets/components/assets/icon/partneredCollaboration32.json +1 -0
- package/assets/components/assets/icon/personMagnifyingGlass16.json +1 -1
- package/assets/components/assets/icon/personMagnifyingGlass24.json +1 -1
- package/assets/components/assets/icon/pieChartSectionHashFilled16.json +1 -1
- package/assets/components/assets/icon/relativeDirectionArrows16.json +1 -0
- package/assets/components/assets/icon/relativeDirectionArrows24.json +1 -0
- package/assets/components/assets/icon/relativeDirectionArrows32.json +1 -0
- package/assets/components/assets/icon/signalHealth16.json +1 -0
- package/assets/components/assets/icon/signalHealth24.json +1 -0
- package/assets/components/assets/icon/signalHealth32.json +1 -0
- package/assets/components/assets/icon/sortAscendingView16.json +1 -0
- package/assets/components/assets/icon/sortAscendingView24.json +1 -0
- package/assets/components/assets/icon/sortAscendingView32.json +1 -0
- package/assets/components/assets/icon/sortDescendingView16.json +1 -0
- package/assets/components/assets/icon/sortDescendingView24.json +1 -0
- package/assets/components/assets/icon/sortDescendingView32.json +1 -0
- package/assets/components/assets/icon/starValues16.json +1 -0
- package/assets/components/assets/icon/starValues24.json +1 -0
- package/assets/components/assets/icon/starValues32.json +1 -0
- package/assets/components/assets/icon/updateTable16.json +1 -0
- package/assets/components/assets/icon/updateTable24.json +1 -0
- package/assets/components/assets/icon/updateTable32.json +1 -0
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{94929cf2b9fc66a93882.js → 02cf735176f286a48dd2.js} +1 -1
- package/assets/esri/core/workers/chunks/{f3437ae6bba846b524d3.js → 095c1b88cdcb91ab837e.js} +1 -1
- package/assets/esri/core/workers/chunks/{b7f2fb6684cf684b0bce.js → 0dc3a04ce717b7ddd957.js} +1 -1
- package/assets/esri/core/workers/chunks/{297344c2c1119159d143.js → 10373885604655f673df.js} +1 -1
- package/assets/esri/core/workers/chunks/{8208c073e606973ea1ad.js → 12f700b932a241e59071.js} +1 -1
- package/assets/esri/core/workers/chunks/{1e8ceed33a3657ac02b3.js → 153ff2ceefccd946498b.js} +1 -1
- package/assets/esri/core/workers/chunks/{ca761dc5f45cafef313e.js → 17dea03fc4eb414f0022.js} +1 -1
- package/assets/esri/core/workers/chunks/1800994523d7cdfb73af.js +1 -0
- package/assets/esri/core/workers/chunks/{ec5f83aa752c39a96609.js → 19db60a3b4b09d445bd1.js} +1 -1
- package/assets/esri/core/workers/chunks/{7147fc7502b385b302b2.js → 23b623637126f8411a30.js} +1 -1
- package/assets/esri/core/workers/chunks/{a7aa87e2c4197ba595ef.js → 2abc205f81f26fc4852b.js} +2 -2
- package/assets/esri/core/workers/chunks/37002a46f03a9fc5f644.js +2 -0
- package/assets/esri/core/workers/chunks/{78fc9a55e620602db1ff.js.LICENSE.txt → 37002a46f03a9fc5f644.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/{b4a59dd11d75df7bd510.js → 3cce8e894bf37c3e598e.js} +1 -1
- package/assets/esri/core/workers/chunks/{492d575894c7905bb70c.js → 3d49c6427120edc8eac9.js} +1 -1
- package/assets/esri/core/workers/chunks/{23a9dd9454d5249bbd59.js → 3da53c017f9c5d2d778a.js} +1 -1
- package/assets/esri/core/workers/chunks/43e2c1d72cd9c8beed2f.js +2 -0
- package/assets/esri/core/workers/chunks/{3266c3392c24ce6cdd83.js.LICENSE.txt → 43e2c1d72cd9c8beed2f.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/{3d1a5a3467f3a6585b3e.js → 4f03d19a70dca6c507be.js} +1 -1
- package/assets/esri/core/workers/chunks/{24c35a46cf8ed11b774d.js → 5180b15f1a865756a02e.js} +1 -1
- package/assets/esri/core/workers/chunks/57302b92e9899cce4ba3.js +1 -0
- package/assets/esri/core/workers/chunks/5909a0e763fddc3542e7.js +2 -0
- package/assets/esri/core/workers/chunks/{6f3ffc04086bca30e55d.js.LICENSE.txt → 5909a0e763fddc3542e7.js.LICENSE.txt} +2 -2
- package/assets/esri/core/workers/chunks/{d9736c783513e9c9b22f.js → 5a2933ae19345b7d5aa7.js} +1 -1
- package/assets/esri/core/workers/chunks/{5d31fbabaa875f8627c0.js → 631a11a2b2001c708527.js} +1 -1
- package/assets/esri/core/workers/chunks/{fa95c9248fbfab338f2e.js → 63b8cd7d5cafbaeed894.js} +1 -1
- package/assets/esri/core/workers/chunks/6b4a24248182245167ca.js +1 -0
- package/assets/esri/core/workers/chunks/6be530ab81291745485b.js +2 -0
- package/assets/esri/core/workers/chunks/{70e2804d3710c6af468e.js.LICENSE.txt → 6be530ab81291745485b.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/{ef9a23d41acb5ad36426.js → 6cb44cd319cb6c2539c8.js} +1 -1
- package/assets/esri/core/workers/chunks/73c416ae0ec5a1815591.js +2 -0
- package/assets/esri/core/workers/chunks/{be631029691d9a320cb5.js.LICENSE.txt → 73c416ae0ec5a1815591.js.LICENSE.txt} +1 -7
- package/assets/esri/core/workers/chunks/{352c674730c7b7258ae3.js → 76086517591d0eb35156.js} +1 -1
- package/assets/esri/core/workers/chunks/{436f206898306df019ac.js → 7c47fefbf4c93b63200f.js} +1 -1
- package/assets/esri/core/workers/chunks/7e8573749a02e1f54fb1.js +1 -0
- package/assets/esri/core/workers/chunks/{9ff8ee6ed6b98c03ae7e.js → 9ccabf8142fb5de4d3e2.js} +2 -2
- package/assets/esri/core/workers/chunks/{9ff8ee6ed6b98c03ae7e.js.LICENSE.txt → 9ccabf8142fb5de4d3e2.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/ab71865b94022e78035c.js +1 -0
- package/assets/esri/core/workers/chunks/{424daef7b5dec1b99aba.js → af3e93a4ac3ff2addc90.js} +1 -1
- package/assets/esri/core/workers/chunks/{bf82bb1cdd8b31e7f2aa.js → bb08359610a41e304b55.js} +1 -1
- package/assets/esri/core/workers/chunks/{495b11fdecc3ba90d454.js → bfc063d4431bfa162160.js} +1 -1
- package/assets/esri/core/workers/chunks/c2aeecd27e004c6cd7e1.js +2 -0
- package/assets/esri/core/workers/chunks/c2aeecd27e004c6cd7e1.js.LICENSE.txt +9 -0
- package/assets/esri/core/workers/chunks/{60362c5651ef41fa7e5f.js → c2bab829d6f6e05bbd81.js} +1 -1
- package/assets/esri/core/workers/chunks/{fa0bbf0d7eadb924c473.js → cc50f96321a7c12f300b.js} +1 -1
- package/assets/esri/core/workers/chunks/{62752cd6821959cf6751.js → cfbe9993263fa6f69363.js} +1 -1
- package/assets/esri/core/workers/chunks/cfe1506a443fc84a0b91.js +1 -0
- package/assets/esri/core/workers/chunks/d13b2ce8a89938b0472b.js +1 -0
- package/assets/esri/core/workers/chunks/da99fd0d3106dd357743.js +1 -0
- package/assets/esri/core/workers/chunks/{2d8dca9a4a58469ddd05.js → e705d041f6c1632bfbcc.js} +1 -1
- package/assets/esri/core/workers/chunks/{0483a2cfdb8c7158e73a.js → e85da52d9cc7d9396872.js} +1 -1
- package/assets/esri/core/workers/chunks/e95821a199e10b389e29.js +2 -0
- package/assets/esri/core/workers/chunks/{69278d08a7d64917f826.js.LICENSE.txt → e95821a199e10b389e29.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/f25bebd2b6eb0d0f6626.js +2 -0
- package/assets/esri/core/workers/chunks/{d9251c3c85c3ddd242c8.js.LICENSE.txt → f25bebd2b6eb0d0f6626.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/f32d4813b450a3eb4262.js +1 -0
- package/assets/esri/core/workers/chunks/{1ced78750c61600b2d4e.js → f351007cdcd0938d3b6c.js} +1 -1
- package/assets/esri/core/workers/chunks/{4b088260252787734c00.js → f5f584d325f8f2ea825f.js} +1 -1
- package/assets/esri/core/workers/chunks/{3405a23973f9e701a4d6.js → f7d93aae350796b88562.js} +1 -1
- package/assets/esri/core/workers/chunks/f9bddbf5dbc91897cb04.js +1 -0
- package/assets/esri/libs/parquet/pkg/bundle_bg.wasm +0 -0
- package/assets/esri/themes/base/_core.scss +1 -1
- package/assets/esri/themes/base/widgets/_BuildingPhasePicker.scss +1 -3
- package/assets/esri/themes/base/widgets/_FeatureTable.scss +4 -4
- package/assets/esri/themes/base/widgets/_Grid.scss +6 -5
- package/assets/esri/themes/base/widgets/_Sketch.scss +0 -3
- package/assets/esri/themes/base/widgets/_Tooltip.scss +6 -6
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_ar.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_bg.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_bs.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_ca.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_cs.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_da.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_de.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_el.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_es.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_et.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_fi.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_fr.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_he.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_hr.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_hu.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_id.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_it.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_ja.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_ko.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_lt.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_lv.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_nl.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_no.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_pl.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_pt-BR.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_pt-PT.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_ro.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_ru.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_sk.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_sl.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_sr.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_sv.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_th.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_tr.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_uk.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_vi.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_zh-CN.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_zh-HK.json +1 -1
- package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_zh-TW.json +1 -1
- package/chunks/CutFillDepth.glsl.js +13 -10
- package/chunks/CutFillReduction.glsl.js +14 -8
- package/chunks/GaussianSplat.glsl.js +1 -1
- package/chunks/Laserlines.glsl.js +2 -2
- package/chunks/boundedPlane.js +1 -1
- package/chunks/cameraUtilsSpherical.js +1 -1
- package/chunks/vec32.js +1 -1
- package/config.js +1 -1
- package/core/Loadable.d.ts +8 -2
- package/core/libs/gl-matrix-2/math/vec3.js +1 -1
- package/core/reactiveUtils.d.ts +1 -1
- package/effects/FocusAreas.d.ts +1 -1
- package/form/FormTemplate.d.ts +2 -2
- package/form/elements/AttachmentElement.d.ts +2 -2
- package/form/elements/GroupElement.d.ts +2 -2
- package/form/elements/inputs/attachments/AttachmentInput.d.ts +9 -2
- package/form/elements/inputs/attachments/AudioInput.d.ts +10 -1
- package/form/elements/inputs/attachments/DocumentInput.d.ts +9 -1
- package/form/elements/inputs/attachments/ImageInput.d.ts +10 -1
- package/form/elements/inputs/attachments/Input.d.ts +19 -1
- package/form/elements/inputs/attachments/SignatureInput.d.ts +5 -0
- package/form/elements/inputs/attachments/VideoInput.d.ts +10 -1
- package/form/elements/inputs/attachments/types.d.ts +15 -0
- package/form/elements.d.ts +0 -9
- package/form/types.d.ts +17 -0
- package/geometry/support/lineSegment.js +1 -1
- package/geometry/support/meshUtils/merge.js +1 -1
- package/geometry/support/sphere.js +1 -1
- package/interfaces.d.ts +74 -212
- package/intl/substitute.d.ts +1 -1
- package/intl.d.ts +5 -5
- package/kernel.js +1 -1
- package/layers/VoxelWasmPerSceneView.js +1 -1
- package/layers/catalog/CatalogFootprintLayer.d.ts +1 -1
- package/layers/knowledgeGraph/layerUtils.js +1 -1
- package/layers/ogc/types.d.ts +1 -1
- package/layers/orientedImagery/transformations/worldToImage.js +1 -1
- package/layers/support/FieldsIndex.d.ts +2 -1
- package/layers/support/RouteStopSymbols.d.ts +1 -1
- package/layers/support/RouteSymbols.d.ts +1 -1
- package/layers/support/tiles3DUtils.js +1 -1
- package/layers/voxel/VoxelVolume.js +1 -1
- package/networks/UtilityNetwork.js +1 -1
- package/networks/support/Circuit.d.ts +2 -2
- package/networks/support/CircuitLocation.d.ts +3 -3
- package/networks/support/CircuitLocation.js +1 -1
- package/networks/support/CircuitPathConnectivityElement.js +1 -1
- package/networks/support/CircuitSection.d.ts +2 -2
- package/networks/support/jsonTypes.d.ts +2 -2
- package/networks/support/networkFieldUtils.js +1 -1
- package/package.json +3 -3
- package/portal/PortalUser.d.ts +2 -2
- package/renderers/ClassBreaksRenderer.d.ts +2 -2
- package/renderers/SimpleRenderer.d.ts +1 -1
- package/renderers/UniqueValueRenderer.d.ts +1 -1
- package/renderers/support/ClassBreakInfo.d.ts +1 -1
- package/renderers/support/RendererLegendOptions.d.ts +2 -1
- package/renderers/support/UniqueValueClass.d.ts +1 -1
- package/renderers/support/UniqueValueInfo.d.ts +1 -1
- package/renderers/types.d.ts +1 -1
- package/rest/networks/circuits/alterCircuit.js +1 -1
- package/rest/networks/circuits/createCircuit.js +1 -1
- package/rest/networks/circuits/deleteCircuits.js +1 -1
- package/rest/networks/circuits/exportCircuits.js +1 -1
- package/rest/networks/circuits/queryCircuits.js +1 -1
- package/rest/networks/circuits/support/QueryCircuitsParameters.js +1 -1
- package/rest/networks/circuits/verifyCircuits.js +1 -1
- package/rest/networks/support/Association.js +1 -1
- package/rest/networks/support/TelecomNetworkElement.d.ts +6 -5
- package/rest/networks/support/TelecomNetworkElement.js +1 -1
- package/rest/networks/support/TraceLocation.d.ts +10 -8
- package/rest/networks/support/TraceLocation.js +1 -1
- package/rest/networks/support/TraceResult.js +1 -1
- package/rest/networks/unitIdentifiers/insertGap.js +1 -1
- package/rest/networks/unitIdentifiers/queryUnitIdentifiers.js +1 -1
- package/rest/networks/unitIdentifiers/reset.js +1 -1
- package/rest/networks/unitIdentifiers/resize.js +1 -1
- package/rest/networks/unitIdentifiers/support/UnitQueryResult.js +1 -1
- package/rest/places.d.ts +0 -4
- package/rest/support/AttributeBinsQuery.d.ts +1 -14
- package/rest/symbolService.d.ts +2 -2
- package/smartMapping/raster/renderers/vectorField.d.ts +0 -1
- package/smartMapping/renderers/opacity.d.ts +1 -1
- package/smartMapping/renderers/support/spikeUtils.d.ts +2 -2
- package/smartMapping/renderers/type.d.ts +1 -1
- package/smartMapping/renderers/univariateColorSize.d.ts +4 -4
- package/smartMapping/statistics/types.d.ts +2 -2
- package/support/actions/actionUtils.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/CIMSymbol.d.ts +29 -29
- package/symbols/Font.d.ts +1 -1
- package/symbols/IconSymbol3DLayer.d.ts +3 -4
- package/symbols/ObjectSymbol3DLayer.d.ts +3 -4
- package/symbols/Symbol.d.ts +2 -5
- package/symbols/Symbol3DLayer.d.ts +2 -3
- package/symbols/TextSymbol.d.ts +3 -3
- package/symbols/TextSymbol3DLayer.d.ts +3 -3
- package/symbols/WaterSymbol3DLayer.d.ts +4 -7
- package/symbols/WebStyleSymbol.d.ts +5 -5
- package/symbols/cim/cimAnalyzer.js +1 -1
- package/symbols/cim/defaultCIMValues.js +1 -1
- package/symbols/cim/{CIMTypes.d.ts → types.d.ts} +216 -167
- package/symbols/cim/types.js +5 -0
- package/symbols/support/IconSymbol3DLayerResource.d.ts +2 -3
- package/symbols/support/ObjectSymbol3DLayerResource.d.ts +2 -3
- package/symbols/support/Symbol3DFillMaterial.d.ts +2 -2
- package/symbols/support/cimConversionUtils.d.ts +1 -1
- package/symbols/support/cimSymbolUtils.d.ts +4 -4
- package/symbols/support/jsonUtils.d.ts +1 -1
- package/symbols/support/symbolUtils.d.ts +66 -4
- package/symbols/support/types.d.ts +3 -62
- package/symbols/types.d.ts +113 -1
- package/unionTypes.d.ts +61 -14
- package/views/2d/engine/flow/dataUtils.js +1 -1
- package/views/2d/engine/flow/utils.js +1 -1
- package/views/2d/engine/vectorTiles/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/GradientFillMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/GradientSizeHelper.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/line/GradientStrokeMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/interactive/SegmentLabels2D.js +1 -1
- package/views/2d/layers/BaseLayerViewGL2D.d.ts +6 -6
- package/views/2d/layers/RouteLayerView2D.js +1 -1
- package/views/2d/layers/support/RouteLayerInteraction.js +1 -1
- package/views/2d/layers/support/RouteLayerInteractiveOptions.js +5 -0
- package/views/2d/layers/support/RouteLayerWaypointVisualization.js +1 -1
- package/views/3d/analysis/AreaMeasurement/support/AreaMeasurementVisualization.js +1 -1
- package/views/3d/analysis/AreaMeasurement/support/MeasurementData.js +1 -1
- package/views/3d/analysis/Dimension/lengthDimensionConstraintUtils.js +1 -1
- package/views/3d/analysis/Dimension/lengthDimensionUtils.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightController.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightIntersectionResult.js +1 -1
- package/views/3d/analysis/Slice/sliceToolUtils.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/VolumeMeasurementAnalysisView3D.js +1 -1
- package/views/3d/animation/pointToPoint/Camera.js +1 -1
- package/views/3d/camera/constraintUtils/distance.js +1 -1
- package/views/3d/camera/constraintUtils/tilt.js +1 -1
- package/views/3d/environment/ChapmanApproximation.glsl.js +1 -1
- package/views/3d/environment/CloudsParameters.js +1 -1
- package/views/3d/environment/EnvironmentManager.js +1 -1
- package/views/3d/environment/MarsAtmosphere.js +1 -1
- package/views/3d/interactive/SegmentLabels3D.js +1 -1
- package/views/3d/interactive/editingTools/manipulations/MoveZManipulation.js +1 -1
- package/views/3d/interactive/editingTools/media/MediaElementManipulator3D.js +1 -1
- package/views/3d/interactive/editingTools/reshape/edgeOffsetUtils.js +1 -1
- package/views/3d/interactive/visualElements/LabelVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/RightAngleQuadVisualElement.js +1 -1
- package/views/3d/layers/FlowSubView3D.js +1 -1
- package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
- package/views/3d/layers/i3s/I3SViewportQueries.js +1 -1
- package/views/3d/layers/i3s/PointCloudRenderer.js +1 -1
- package/views/3d/layers/support/FeatureTileMeasurements3D.js +1 -1
- package/views/3d/layers/support/FeatureTileVisibility3D.js +1 -1
- package/views/3d/state/Frustum.js +1 -1
- package/views/3d/state/controllers/FovController.js +1 -1
- package/views/3d/state/controllers/GamepadKeyboardController.js +1 -1
- package/views/3d/state/controllers/momentum/ZoomPlanarMomentumController.js +1 -1
- package/views/3d/support/FrustumExtentIntersection.js +1 -1
- package/views/3d/support/cameraUtils.js +1 -1
- package/views/3d/support/engineContent/line.js +1 -1
- package/views/3d/support/flow/FlowWorker.js +1 -1
- package/views/3d/support/flow/StreamlineResources3D.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/gaussianSplatting/GaussianSplatDataStore.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatTextureAtlas.js +1 -1
- package/views/3d/support/intersectionUtils.js +1 -1
- package/views/3d/support/orientedBoundingBox.js +1 -1
- package/views/3d/support/pointsOfInterest/CameraOnSurface.js +1 -1
- package/views/3d/support/pointsOfInterest/CenterOnSurface.js +1 -1
- package/views/3d/support/pointsOfInterest/Focus.js +1 -1
- package/views/3d/support/viewpointUtils.js +1 -1
- package/views/3d/terrain/OverlayManager.js +1 -1
- package/views/3d/terrain/OverlayRenderer.js +1 -1
- package/views/3d/terrain/PatchRenderData.js +1 -1
- package/views/3d/terrain/SphericalPatch.js +1 -1
- package/views/3d/terrain/Tile.js +1 -1
- package/views/3d/webgl/RenderCamera.js +1 -1
- package/views/3d/webgl-engine/core/FBOCache.js +1 -1
- package/views/3d/webgl-engine/core/FBOCacheFormats.js +1 -1
- package/views/3d/webgl-engine/effects/focusArea/FocusAreaMaskNode.js +1 -1
- package/views/3d/webgl-engine/effects/geometry/RenderOccludedRenderNode.js +1 -1
- package/views/3d/webgl-engine/lib/CutFillDepth.js +1 -1
- package/views/3d/webgl-engine/lib/GPUPointOcclusionQuery.js +1 -1
- package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
- package/views/3d/webgl-engine/lib/MainFramebuffer.js +1 -1
- package/views/3d/webgl-engine/lib/Object3D.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
- package/views/3d/webgl-engine/lib/Viewshed.js +1 -1
- package/views/3d/webgl-engine/lib/ViewshedShadowMap.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/edgePreprocessing.js +1 -1
- package/views/3d/webgl-engine/lib/geometryDataUtils.js +1 -1
- package/views/3d/webgl-engine/lib/triangleIntersectionUtils.js +1 -1
- package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/MeasurementArrowMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/NativeLineMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
- package/views/3d/webgl-engine/shaders/AnimatedLine.glsl.js +13 -12
- package/views/3d/webgl-engine/shaders/CutFillDepthTechniqueConfiguration.js +5 -0
- package/views/3d/webgl-engine/shaders/CutFillReductionTechniqueConfiguration.js +5 -0
- package/views/3d/webgl-engine/shaders/RibbonLineTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/SphereDepthInterpolate.glsl.js +1 -1
- package/views/interactive/GraphicManipulator.js +1 -1
- package/views/interactive/coordinateHelper.js +1 -1
- package/views/interactive/editGeometry/operations/OffsetEdgeVertex.js +1 -1
- package/views/interactive/sketch/constraints.js +1 -1
- package/views/interactive/snapping/featureSources/sceneLayerSource/SceneLayerSnappingSourceWorker.js +1 -1
- package/views/interactive/snapping/featureSources/sceneLayerSource/sceneLayerSnappingUtils.js +1 -1
- package/views/interactive/snapping/hints/LineSnappingHint.js +1 -1
- package/views/interactive/tooltip/tooltipCommonUtils.js +1 -1
- package/views/navigation/PanSphericalMomentumEstimator.js +1 -1
- package/views/support/Scheduler.js +1 -1
- package/views/support/euclideanAreaMeasurementUtils.js +1 -1
- package/views/support/euclideanLengthMeasurementUtils.js +1 -1
- package/views/support/geometry3dUtils.js +1 -1
- package/webdoc/widgets/FloorFilter.js +1 -1
- package/widgets/BasemapLayerList.js +1 -1
- package/widgets/BatchAttributeForm.js +1 -1
- package/widgets/Bookmarks.js +1 -1
- package/widgets/BuildingExplorer/BuildingLevelPicker/BuildingLevelPicker.js +1 -1
- package/widgets/BuildingExplorer/BuildingPhasePicker/BuildingPhasePicker.js +1 -1
- package/widgets/CatalogLayerList.js +1 -1
- package/widgets/Directions/DirectionsViewModel.js +1 -1
- package/widgets/Directions.js +1 -1
- package/widgets/Editor/components/FeatureList.js +1 -1
- package/widgets/Editor/components/PendingFeatureList.js +1 -1
- package/widgets/Editor/components/UpdateFeaturePanelContent.js +1 -1
- package/widgets/ElevationProfile/components/LegendItem.js +1 -1
- package/widgets/ElevationProfile/components/SettingsButton.js +1 -1
- package/widgets/ElevationProfile.js +1 -1
- package/widgets/Expand/ExpandViewModel.d.ts +1 -0
- package/widgets/Expand/ExpandViewModel.js +1 -1
- package/widgets/Expand.js +1 -1
- package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/UtilityNetworkAssociationItemList.js +1 -1
- package/widgets/FeatureForm.js +1 -1
- package/widgets/FeatureTable/Grid/Column.js +1 -1
- package/widgets/FeatureTable/RelationshipColumn.js +1 -1
- package/widgets/FeatureTable.js +1 -1
- package/widgets/Features/FeaturesDrillIn.js +1 -1
- package/widgets/Features.js +1 -1
- package/widgets/FloorFilter/FloorFilterViewModel.js +1 -1
- package/widgets/LayerList/LayerListItem.js +1 -1
- package/widgets/LayerList.js +1 -1
- package/widgets/Legend/LegendViewModel.js +1 -1
- package/widgets/Print.js +1 -1
- package/widgets/Search/SearchSource.d.ts +1 -1
- package/widgets/Sketch/support/ResponsiveToolbar/OverflowGroup.js +1 -1
- package/widgets/Sketch/support/ResponsiveToolbar/SplitButton.js +1 -1
- package/widgets/Sketch/support/ResponsiveToolbar/responsiveToolbarUtils.js +1 -1
- package/widgets/Sketch/types.d.ts +1 -1
- package/widgets/Sketch.js +1 -1
- package/widgets/Slice.js +1 -1
- package/widgets/TableList/types.d.ts +2 -3
- package/widgets/TableList.d.ts +1 -1
- package/widgets/TableList.js +1 -1
- package/widgets/TimeZoneLabel.js +1 -1
- package/widgets/UtilityNetworkAssociations.js +1 -1
- package/widgets/UtilityNetworkTrace/UtilityNetworkTraceFeature.js +1 -1
- package/widgets/UtilityNetworkTrace/UtilityNetworkTraceFeaturesDrillIn.js +1 -1
- package/widgets/UtilityNetworkTrace.js +1 -1
- package/widgets/UtilityNetworkValidateTopology.js +1 -1
- package/widgets/ValuePicker/ValuePickerCombobox.js +1 -1
- package/widgets/support/GeolocationPositioning.js +1 -1
- package/widgets/support/SelectionList.js +1 -1
- package/widgets/support/iconUtils.js +1 -1
- package/widgets/types.d.ts +2 -2
- package/assets/components/assets/modal/t9n/messages.ar.json +0 -1
- package/assets/components/assets/modal/t9n/messages.bg.json +0 -1
- package/assets/components/assets/modal/t9n/messages.bs.json +0 -1
- package/assets/components/assets/modal/t9n/messages.ca.json +0 -1
- package/assets/components/assets/modal/t9n/messages.cs.json +0 -1
- package/assets/components/assets/modal/t9n/messages.da.json +0 -1
- package/assets/components/assets/modal/t9n/messages.de.json +0 -1
- package/assets/components/assets/modal/t9n/messages.el.json +0 -1
- package/assets/components/assets/modal/t9n/messages.en.json +0 -1
- package/assets/components/assets/modal/t9n/messages.es.json +0 -1
- package/assets/components/assets/modal/t9n/messages.et.json +0 -1
- package/assets/components/assets/modal/t9n/messages.fi.json +0 -1
- package/assets/components/assets/modal/t9n/messages.fr.json +0 -1
- package/assets/components/assets/modal/t9n/messages.he.json +0 -1
- package/assets/components/assets/modal/t9n/messages.hr.json +0 -1
- package/assets/components/assets/modal/t9n/messages.hu.json +0 -1
- package/assets/components/assets/modal/t9n/messages.id.json +0 -1
- package/assets/components/assets/modal/t9n/messages.it.json +0 -1
- package/assets/components/assets/modal/t9n/messages.ja.json +0 -1
- package/assets/components/assets/modal/t9n/messages.json +0 -1
- package/assets/components/assets/modal/t9n/messages.ko.json +0 -1
- package/assets/components/assets/modal/t9n/messages.lt.json +0 -1
- package/assets/components/assets/modal/t9n/messages.lv.json +0 -1
- package/assets/components/assets/modal/t9n/messages.nl.json +0 -1
- package/assets/components/assets/modal/t9n/messages.no.json +0 -1
- package/assets/components/assets/modal/t9n/messages.pl.json +0 -1
- package/assets/components/assets/modal/t9n/messages.pt-BR.json +0 -1
- package/assets/components/assets/modal/t9n/messages.pt-PT.json +0 -1
- package/assets/components/assets/modal/t9n/messages.ro.json +0 -1
- package/assets/components/assets/modal/t9n/messages.ru.json +0 -1
- package/assets/components/assets/modal/t9n/messages.sk.json +0 -1
- package/assets/components/assets/modal/t9n/messages.sl.json +0 -1
- package/assets/components/assets/modal/t9n/messages.sr.json +0 -1
- package/assets/components/assets/modal/t9n/messages.sv.json +0 -1
- package/assets/components/assets/modal/t9n/messages.th.json +0 -1
- package/assets/components/assets/modal/t9n/messages.tr.json +0 -1
- package/assets/components/assets/modal/t9n/messages.uk.json +0 -1
- package/assets/components/assets/modal/t9n/messages.vi.json +0 -1
- package/assets/components/assets/modal/t9n/messages.zh-CN.json +0 -1
- package/assets/components/assets/modal/t9n/messages.zh-HK.json +0 -1
- package/assets/components/assets/modal/t9n/messages.zh-TW.json +0 -1
- package/assets/components/assets/tip/t9n/messages.ar.json +0 -1
- package/assets/components/assets/tip/t9n/messages.bg.json +0 -1
- package/assets/components/assets/tip/t9n/messages.bs.json +0 -1
- package/assets/components/assets/tip/t9n/messages.ca.json +0 -1
- package/assets/components/assets/tip/t9n/messages.cs.json +0 -1
- package/assets/components/assets/tip/t9n/messages.da.json +0 -1
- package/assets/components/assets/tip/t9n/messages.de.json +0 -1
- package/assets/components/assets/tip/t9n/messages.el.json +0 -1
- package/assets/components/assets/tip/t9n/messages.en.json +0 -1
- package/assets/components/assets/tip/t9n/messages.es.json +0 -1
- package/assets/components/assets/tip/t9n/messages.et.json +0 -1
- package/assets/components/assets/tip/t9n/messages.fi.json +0 -1
- package/assets/components/assets/tip/t9n/messages.fr.json +0 -1
- package/assets/components/assets/tip/t9n/messages.he.json +0 -1
- package/assets/components/assets/tip/t9n/messages.hr.json +0 -1
- package/assets/components/assets/tip/t9n/messages.hu.json +0 -1
- package/assets/components/assets/tip/t9n/messages.id.json +0 -1
- package/assets/components/assets/tip/t9n/messages.it.json +0 -1
- package/assets/components/assets/tip/t9n/messages.ja.json +0 -1
- package/assets/components/assets/tip/t9n/messages.json +0 -1
- package/assets/components/assets/tip/t9n/messages.ko.json +0 -1
- package/assets/components/assets/tip/t9n/messages.lt.json +0 -1
- package/assets/components/assets/tip/t9n/messages.lv.json +0 -1
- package/assets/components/assets/tip/t9n/messages.nl.json +0 -1
- package/assets/components/assets/tip/t9n/messages.no.json +0 -1
- package/assets/components/assets/tip/t9n/messages.pl.json +0 -1
- package/assets/components/assets/tip/t9n/messages.pt-BR.json +0 -1
- package/assets/components/assets/tip/t9n/messages.pt-PT.json +0 -1
- package/assets/components/assets/tip/t9n/messages.ro.json +0 -1
- package/assets/components/assets/tip/t9n/messages.ru.json +0 -1
- package/assets/components/assets/tip/t9n/messages.sk.json +0 -1
- package/assets/components/assets/tip/t9n/messages.sl.json +0 -1
- package/assets/components/assets/tip/t9n/messages.sr.json +0 -1
- package/assets/components/assets/tip/t9n/messages.sv.json +0 -1
- package/assets/components/assets/tip/t9n/messages.th.json +0 -1
- package/assets/components/assets/tip/t9n/messages.tr.json +0 -1
- package/assets/components/assets/tip/t9n/messages.uk.json +0 -1
- package/assets/components/assets/tip/t9n/messages.vi.json +0 -1
- package/assets/components/assets/tip/t9n/messages.zh-CN.json +0 -1
- package/assets/components/assets/tip/t9n/messages.zh-HK.json +0 -1
- package/assets/components/assets/tip/t9n/messages.zh-TW.json +0 -1
- package/assets/components/assets/tip-manager/t9n/messages.ar.json +0 -1
- package/assets/components/assets/tip-manager/t9n/messages.bg.json +0 -1
- package/assets/components/assets/tip-manager/t9n/messages.bs.json +0 -1
- package/assets/components/assets/tip-manager/t9n/messages.ca.json +0 -1
- package/assets/components/assets/tip-manager/t9n/messages.cs.json +0 -1
- package/assets/components/assets/tip-manager/t9n/messages.da.json +0 -1
- package/assets/components/assets/tip-manager/t9n/messages.de.json +0 -1
- package/assets/components/assets/tip-manager/t9n/messages.el.json +0 -1
- package/assets/components/assets/tip-manager/t9n/messages.en.json +0 -1
- package/assets/components/assets/tip-manager/t9n/messages.es.json +0 -1
- package/assets/components/assets/tip-manager/t9n/messages.et.json +0 -1
- package/assets/components/assets/tip-manager/t9n/messages.fi.json +0 -1
- package/assets/components/assets/tip-manager/t9n/messages.fr.json +0 -1
- package/assets/components/assets/tip-manager/t9n/messages.he.json +0 -1
- package/assets/components/assets/tip-manager/t9n/messages.hr.json +0 -1
- package/assets/components/assets/tip-manager/t9n/messages.hu.json +0 -1
- package/assets/components/assets/tip-manager/t9n/messages.id.json +0 -1
- package/assets/components/assets/tip-manager/t9n/messages.it.json +0 -1
- package/assets/components/assets/tip-manager/t9n/messages.ja.json +0 -1
- package/assets/components/assets/tip-manager/t9n/messages.json +0 -1
- package/assets/components/assets/tip-manager/t9n/messages.ko.json +0 -1
- package/assets/components/assets/tip-manager/t9n/messages.lt.json +0 -1
- package/assets/components/assets/tip-manager/t9n/messages.lv.json +0 -1
- package/assets/components/assets/tip-manager/t9n/messages.nl.json +0 -1
- package/assets/components/assets/tip-manager/t9n/messages.no.json +0 -1
- package/assets/components/assets/tip-manager/t9n/messages.pl.json +0 -1
- package/assets/components/assets/tip-manager/t9n/messages.pt-BR.json +0 -1
- package/assets/components/assets/tip-manager/t9n/messages.pt-PT.json +0 -1
- package/assets/components/assets/tip-manager/t9n/messages.ro.json +0 -1
- package/assets/components/assets/tip-manager/t9n/messages.ru.json +0 -1
- package/assets/components/assets/tip-manager/t9n/messages.sk.json +0 -1
- package/assets/components/assets/tip-manager/t9n/messages.sl.json +0 -1
- package/assets/components/assets/tip-manager/t9n/messages.sr.json +0 -1
- package/assets/components/assets/tip-manager/t9n/messages.sv.json +0 -1
- package/assets/components/assets/tip-manager/t9n/messages.th.json +0 -1
- package/assets/components/assets/tip-manager/t9n/messages.tr.json +0 -1
- package/assets/components/assets/tip-manager/t9n/messages.uk.json +0 -1
- package/assets/components/assets/tip-manager/t9n/messages.vi.json +0 -1
- package/assets/components/assets/tip-manager/t9n/messages.zh-CN.json +0 -1
- package/assets/components/assets/tip-manager/t9n/messages.zh-HK.json +0 -1
- package/assets/components/assets/tip-manager/t9n/messages.zh-TW.json +0 -1
- package/assets/esri/core/workers/chunks/1e17ad6cdffa5016a3db.js +0 -1
- package/assets/esri/core/workers/chunks/211837df0edada4414c5.js +0 -1
- package/assets/esri/core/workers/chunks/21ebd234cf32ae52b3ea.js +0 -1
- package/assets/esri/core/workers/chunks/262c5794650853457acc.js +0 -1
- package/assets/esri/core/workers/chunks/3266c3392c24ce6cdd83.js +0 -2
- package/assets/esri/core/workers/chunks/509065a27bd07bd32475.js +0 -1
- package/assets/esri/core/workers/chunks/69278d08a7d64917f826.js +0 -2
- package/assets/esri/core/workers/chunks/6f3ffc04086bca30e55d.js +0 -2
- package/assets/esri/core/workers/chunks/70e2804d3710c6af468e.js +0 -2
- package/assets/esri/core/workers/chunks/78fc9a55e620602db1ff.js +0 -2
- package/assets/esri/core/workers/chunks/a67c3958d76d10c04fa6.js +0 -2
- package/assets/esri/core/workers/chunks/a67c3958d76d10c04fa6.js.LICENSE.txt +0 -3
- package/assets/esri/core/workers/chunks/a94dd0f5839b6e2bb2d2.js +0 -1
- package/assets/esri/core/workers/chunks/b7bcff9a64f41a0a0b6a.js +0 -1
- package/assets/esri/core/workers/chunks/be631029691d9a320cb5.js +0 -2
- package/assets/esri/core/workers/chunks/c7802c144959d60e774a.js +0 -1
- package/assets/esri/core/workers/chunks/d9251c3c85c3ddd242c8.js +0 -2
- package/assets/esri/core/workers/chunks/edd3cf415955309b4ca4.js +0 -1
- package/assets/esri/core/workers/chunks/fbd577f56529063ce491.js +0 -1
- package/form/elements/inputs/attachments/support/inputs.d.ts +0 -10
- package/form/support/formUtils.d.ts +0 -4
- package/symbols/cim/enums.d.ts +0 -50
- package/symbols/cim/enums.js +0 -5
- package/symbols/support/OccludedVisibility.d.ts +0 -2
- package/symbols/support/materialUtils.d.ts +0 -2
- package/symbols/support/textUtils.d.ts +0 -10
- package/symbols/support/typeUtils.d.ts +0 -86
- package/symbols/support/webStyleAcceptedFormats.d.ts +0 -2
- package/symbols.d.ts +0 -439
- package/symbols.js +0 -5
- /package/effects/{FocusAreaStyle.d.ts → types.d.ts} +0 -0
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{isSome as t,equals as e}from"../../../core/arrayUtils.js";import{asinClamped as s}from"../../../core/mathUtils.js";import{dot as r,subtract as n,squaredDistance as i,exactEquals as o,set as c}from"../../../core/libs/gl-matrix-2/math/vec2.js";import{create as u}from"../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{m as a,d as h,h as f,e as l,G as d,c as p,s as m,a as g,F as _,g as k,f as L,n as x}from"../../../chunks/vec32.js";import{create as y,UNIT_Z as z,fromValues as M,clone as P}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{c as T,h as q}from"../../../chunks/vec42.js";import{create as w}from"../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{directGeodeticSolver as j,inverseGeodeticSolver as v,InverseGeodeticSolverResult as D}from"../../../geometry/geodesicUtils.js";import{toRadians as b}from"../../../geometry/support/geodesicConstants.js";import{create as R,fromPoints as A,fromPositionAndNormal as Z,intersectLine as U,signedDistance as G,projectPoint as I,getNormal as S,distance as C}from"../../../geometry/support/plane.js";import{Sphere as E}from"../../../geometry/support/sphere.js";import{tangentFrame as O}from"../../3d/support/mathUtils.js";import{clone as F,asVec2 as V,createWritable as B,create as H,fromValues as J,fromVec3 as K}from"./normalizedPoint.js";import{projectPointToVerticalPlane as N,isClose as Q,projectPointToVerticalCylinder as W,projectPointToLineLike as X,intersectLineLikes as Y,intersectVerticalPlaneAndLineLike as $,intersectLineLikeAndVerticalCylinder as tt,intersectLineLikeAndCircle as et,intersectVerticalPlanes as st,intersectVerticalPlaneAndVerticalCylinder as rt,intersectVerticalCylinders as nt,intersectVerticalPlaneAndPoint as it,vectorsHaveCloseZ as ot,isPointInsidePlane as ct,pointsInsidePlane as ut}from"../../support/geometry3dUtils.js";class at{intersect(t){return St(this,t)}closestPoints(t){return[this.closestTo(t)]}}class ht extends at{constructor(t){super(),this.point=t}equals(t){return this===t||le(t)&&a(this.point,t.point)}closestTo(){return F(this.point)}}class ft extends at{constructor(t,e,s){super(),this.start=t,this.end=e,this.lineLike={start:t,end:e,type:s}}equals(t){return this===t||de(t)&&this.lineLike.type===t.lineLike.type&&a(this.start,t.start)&&a(this.end,t.end)}closestTo(t){const e=B();return X(t,this.lineLike,e),e}}class lt extends ft{constructor(t,e){super(t,e,1)}}class dt extends ft{constructor(t,e){super(t,e,0)}}class pt extends at{constructor(t){super(),this.constraints=t}equals(t){return this===t||fe(t)&&e(this.constraints,t.constraints,(t,e)=>t.equals(e))}closestTo(t){let e,s=1/0;for(const r of this.constraints){const n=r.closestTo(t),i=m(t,n);i<s&&(s=i,e=n)}return F(e??t)}closestPoints(t){return this.constraints.flatMap(e=>e===this?[]:e.closestPoints(t))}}class mt extends at{constructor(t,e){super(),this.center=t,this.radius=e}equals(t){return this===t||ge(t)&&this.center[0]===t.center[0]&&this.center[1]===t.center[1]&&this.radius===t.radius}closestTo(t){const e=B();return W(t,this.center,this.radius,e),e}}class gt extends at{constructor(t,e){super(),this.center=t,this.radius=e}equals(t){return this===t||_e(t)&&a(this.center,t.center)&&this.radius===t.radius}closestTo(t){const e=B();return W(t,this.center,this.radius,e),e[2]=this.center[2],e}asCircle(){return new _t(F(this.center),this.radius,J(0,0,1))}}class _t extends at{constructor(t,e,s,r){super(),this.center=t,this.radius=e,this.normal=s,this.slicePlane=r}equals(t){return this===t||ke(t)&&a(this.center,t.center)&&a(this.normal,t.normal)&&this.radius===t.radius}closestTo(t){const{center:e,radius:s}=this;I(this.getPlane(Lt),t,kt);const r=g(kt,kt,e),n=_(r);if(Q(n,0))return F(t);const i=s/Math.sqrt(n),o=B();p(o,e,r,i);const{slicePlane:c}=this;if(c&&!ct(c,o)){const e=Ft(c,this);return e?.closestTo(t)??F(t)}return o}getPlane(t=R()){return Z(this.center,this.normal,t)}}const kt=y(),Lt=R();class xt extends at{constructor(t){super(),this.z=t}equals(t){return this===t||pe(t)&&this.z===t.z}closestTo(t){return J(t[0],t[1],this.z)}getPlane(t=R()){return f(yt,0,0,this.z),Z(yt,z,t)}}const yt=y();class zt extends at{constructor(t,e,s){super(),this.start=t,this.end=e,this.planeLike={start:V(t),end:V(e),type:s}}equals(t){return this===t||me(t)&&this.planeLike.type===t.planeLike.type&&a(this.start,t.start)&&a(this.end,t.end)}closestTo(t){const e=B();return N(t,this.planeLike,e),e}closestEndTo(t){const{start:e,end:s}=this.planeLike;return Math.sign(r(n(Mt,s,e),n(Pt,V(t),e)))>0?this.end:this.start}getPlane(t=R()){const e=h(Tt,this.end);return e[2]+=1,A(this.start,this.end,e,t)}getSlicePlane(t=R()){const{start:e,end:s,type:r}=this.planeLike;if(0===r)return;const n=f(Tt,e[0],e[1],0),i=f(qt,s[0],s[1],0),o=l(qt,i,n);return Z(n,o,t),t}}const Mt=u(),Pt=u(),Tt=y(),qt=y();class wt extends zt{constructor(t,e){super(t,e,1)}}class jt extends zt{constructor(t,e){super(t,e,0)}}class vt extends at{constructor(t,e){super(),this.sphere=new E(t,e),this._center=P(t)}equals(t){return this===t||Le(t)&&this.sphere.exactEquals(t.sphere)}closestTo(t){const e=B();return this.sphere.projectPoint(t,e),e}get center(){return this._center}get radius(){return this.sphere.radius}}class Dt extends at{constructor(t,e,s){super(),this.start=t,this.end=e,this.getZ=s,this.planeLike={start:V(t),end:V(e),type:0}}equals(t){return this===t||xe(t)&&a(this.start,t.start)&&a(this.end,t.end)&&this.getZ===t.getZ}closestTo(t){return It(this,t)}addIfOnTheGround(t,e){for(const s of e){const e=this.getZ(s[0],s[1])??0;Q(s[2],e)&&(s[2]=e,t.push(s))}}}class bt extends at{constructor(t,e,s){super(),this._x=t,this._y=e,this._z=s}equals(t){return this===t||ze(t)&&this._x===t._x&&this._y===t._y&&this._z===t._z}closestTo([t,e,s]){return H(this._x??t,this._y??e,this._z??s)}}class Rt extends at{constructor(t,e,s,r,n){super(),this._origin=t,this._spatialReference=e,this._distanceMeters=s,this._z=r,this._directionDegrees=n}equals(t){return this===t||ye(t)&&o(this._origin,t._origin)&&this._spatialReference===t._spatialReference&&this._distanceMeters===t._distanceMeters&&this._z===t._z&&this._directionDegrees===t._directionDegrees}closestTo([t,e,s]){return c(At,t,e),o(At,this._origin)||this._applyDirectionAndDistance(At),H(At[0],At[1],this._z??s)}_applyDirectionAndDistance(t){if(null!=this._directionDegrees&&null!=this._distanceMeters)j(t,this._origin,this._directionDegrees,this._distanceMeters,this._spatialReference);else if(null!=this._directionDegrees)Ut(t,this._origin,this._directionDegrees,t,this._spatialReference);else if(null!=this._distanceMeters){const{azimuth:e}=v(Zt,this._origin,t,this._spatialReference);j(t,this._origin,e??0,this._distanceMeters,this._spatialReference)}}}const At=[0,0],Zt=new D;function Ut(t,e,s,r,n){let{azimuth:i,distance:o}=v(Gt,e,r,n);i??=0;let c=o*Math.cos((i-s)*b);c=Math.max(0,c),j(t,e,s,c,n)}const Gt=new D;function It(t,e){const s=B();return N(e,t.planeLike,s),s[2]=t.getZ(s[0],s[1])??Me,s}function St(t,e){if(fe(t)){const s=[];for(const r of t.constraints){const t=r.intersect(e);t&&s.push(t)}return he(s)}if(fe(e))return St(e,t);if(xe(t))return oe(t,e);if(xe(e))return oe(e,t);if(le(t)){const{point:s}=t;if(le(e))return a(s,e.point)?t:void 0;const r=e.closestTo(s);return d(r,s)?t:void 0}if(de(t)){if(le(e))return St(e,t);if(de(e))return ue(Y(t.lineLike,e.lineLike));if(pe(e))return Ct(t,e);if(me(e))return ue($(e.planeLike,t.lineLike));if(ge(e))return ue(tt(t.lineLike,e.center,e.radius));if(ke(e))return ue(et(t.lineLike,e));if(_e(e))return Et(t,e);if(Le(e))return Ot(t,e)}else if(pe(t)){if(le(e)||de(e))return St(e,t);if(pe(e))return Vt(t,e);if(me(e))return Bt(t,e);if(ge(e))return Ht(t,e);if(ke(e))return Kt(t,e);if(_e(e))return Jt(t,e);if(Le(e))return Nt(t,e)}else if(me(t)){if(le(e)||de(e)||pe(e))return St(e,t);if(me(e))return ce(st(t.planeLike,e.planeLike));if(ge(e))return ce(rt(t.planeLike,e.center,e.radius));if(ke(e))return Wt(t,e);if(_e(e))return Qt(t,e);if(Le(e))return Xt(t,e)}else if(ge(t)){if(le(e)||de(e)||pe(e)||me(e))return St(e,t);if(ge(e))return ce(nt(V(t.center),t.radius,V(e.center),e.radius));if(ke(e))return Yt();if(_e(e))return $t(t,e);if(Le(e))return te()}else if(ke(t)){if(le(e)||de(e)||pe(e)||me(e)||ge(e))return St(e,t);if(ke(e))return ee();if(_e(e))return ee(e.asCircle());if(Le(e))return se()}else if(_e(t)){if(le(e)||de(e)||pe(e)||me(e)||ge(e)||ke(e))return St(e,t);if(_e(e))return re(e,t);if(Le(e))return ne()}else if(Le(t)){if(le(e)||de(e)||pe(e)||me(e)||ge(e)||_e(e))return St(e,t);if(Le(e))return ie()}}const Ct=(()=>{const t=R();return(e,s)=>{const{start:r,end:n}=e;if(ot(r,n)&&Q(r[2],s.z))return e;const i=B();return U(s.getPlane(t),r,n,i)?new ht(i):void 0}})();function Et({lineLike:t},{center:e,radius:s}){const r=e[2];return ue(tt(t,e,s).filter(t=>Q(t[2],r)))}function Ot({lineLike:t},{sphere:e}){return ue(e.intersectLine(t.start,t.end))}const Ft=(()=>{const t=w(),e=y(),r=y();return(n,i,o)=>{const{normal:c,center:u,radius:a}=i;O(c,e,r);const h=S(n),f=a*k(h,e),l=a*k(h,r);T(t,u[0],u[1],u[2],1);const d=q(n,t),m=Math.hypot(f,l),g=Q(m,0);if(Q(C(n,u),0)){if(g)return i;if(Q(a,0))return!o||ct(o,u)?new ht(F(u)):void 0;L(e,h,c),x(e,e);const t=new Array,s=P(u);p(s,s,e,a),o&&!ct(o,s)||t.push(s);const r=P(u);return p(r,r,e,-a),o&&!ct(o,r)||t.push(r),ue(t)}if(g)return;const _=-d/m;if(Math.abs(_)>1||Q(_,1))return;const z=Math.atan(f/l),M=s(_)-z,w=Math.PI-M,j=new Array,v=y();p(v,u,e,a*Math.cos(M)),p(v,v,r,a*Math.sin(M)),j.push(v);const D=y();return p(D,u,e,a*Math.cos(w)),p(D,D,r,a*Math.sin(w)),j.push(D),ue(o?ut(o,j):j)}})();function Vt(t,e){return Q(t.z,e.z)?t:void 0}function Bt({z:t},{planeLike:e}){const[s,r]=e.start,[n,i]=e.end,o=J(s,r,t),c=J(n,i,t);return 0===e.type?new lt(o,c):new dt(o,c)}function Ht(t,e){const[s,r]=e.center;return new gt(J(s,r,t.z),e.radius)}function Jt(t,e){return Q(e.center[2],t.z)?e:void 0}const Kt=(()=>{const t=R();return(e,s)=>Ft(e.getPlane(t),s,s.slicePlane)})();function Nt(t,{center:e,radius:s}){const r=Math.abs(e[2]-t.z);if(r>s&&!Q(r,s))return;const n=J(e[0],e[1],t.z),i=Math.sqrt(s**2-r**2);return Q(i,0)?void 0:new gt(n,i)}const Qt=(()=>{const t=R();return(e,{center:s,radius:r})=>{const n=rt(e.planeLike,s,r),i=s[2];e.getSlicePlane(t);const o=new Array;for(const[c,u]of n){const e=[c,u,i];ct(t,e)&&o.push(e)}return ue(o)}})(),Wt=(()=>{const t=R(),e=R();return(s,r)=>Ft(s.getPlane(t),r,s.getSlicePlane(e))})(),Xt=(()=>{const t=R();return(e,{center:s,radius:r})=>{const n=e.getPlane(t),i=G(n,s),o=Math.abs(i);if(o>r&&!Q(o,r))return;const c=Math.sqrt(r**2-i**2);if(Q(c,0)){const t=B();return I(n,s,t),new ht(t)}const u=B(),a=P(S(n));return p(u,s,a,i),new _t(u,c,a,e.getSlicePlane())}})();function Yt(t,e){}function $t(t,e){const s=i(V(t.center),V(e.center));if(Q(s,0)&&Q(t.radius,e.radius))return e;return ae(nt(V(t.center),t.radius,V(e.center),e.radius),e.center[2])}function te(t,e){}function ee(t,e){}function se(t,e){}function re(t,e){if(!ot(t.center,e.center))return;const s=i(V(t.center),V(e.center));if(Q(s,0)&&Q(t.radius,e.radius))return t;return ae(nt(V(t.center),t.radius,V(e.center),e.radius),t.center[2])}function ne(t,e){}function ie(t,e){}function oe(t,e){const{planeLike:s,getZ:r}=t,n=new Array;if(le(e))t.addIfOnTheGround(n,it(s,e.point));else if(de(e))t.addIfOnTheGround(n,$(s,e.lineLike));else if(ge(e))for(const[i,o]of rt(s,e.center,e.radius)){const t=r(i,o);null!=t&&n.push(M(i,o,t))}else if(me(e)||xe(e))for(const[i,o]of st(s,e.planeLike)){const t=r(i,o)??Me;n.push(M(i,o,t))}return ue(n)}function ce(t){return he(t.map(([t,e])=>{const s=J(t,e,0),r=J(t,e,1);return new lt(s,r)}))}function ue(t){return he(t.map(t=>t?new ht(K(t)):void 0))}function ae(t,e){return ue(t.map(([t,s])=>[t,s,e]))}function he(e){if(0!==e.length)return 1===e.length?e[0]??void 0:new pt(e.filter(t))}function fe(t){return t instanceof pt}function le(t){return t instanceof ht}function de(t){return t instanceof ft}function pe(t){return t instanceof xt}function me(t){return t instanceof zt}function ge(t){return t instanceof mt}function _e(t){return t instanceof gt}function ke(t){return t instanceof _t}function Le(t){return t instanceof vt}function xe(t){return t instanceof Dt}function ye(t){return t instanceof Rt}function ze(t){return t instanceof bt}const Me=0;export{_t as CircleConstraint,at as Constraint,bt as CoordinateConstraint,Dt as DrapedLineConstraint,Rt as GeodesicConstraint,gt as HorizontalCircleConstraint,xt as HorizontalPlaneConstraint,lt as LineConstraint,ft as LineLikeConstraint,ht as PointConstraint,dt as RayConstraint,pt as SetConstraint,vt as SphereConstraint,mt as VerticalCylinderConstraint,wt as VerticalHalfPlaneConstraint,jt as VerticalPlaneConstraint,zt as VerticalPlaneLikeConstraint,he as constraintOrSet,le as isPoint};
|
|
5
|
+
import{isSome as t,equals as e}from"../../../core/arrayUtils.js";import{asinClamped as s}from"../../../core/mathUtils.js";import{dot as r,subtract as n,squaredDistance as i,exactEquals as o,set as c}from"../../../core/libs/gl-matrix-2/math/vec2.js";import{create as u}from"../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{m as a,d as h,h as f,e as l,E as d,c as p,s as m,a as g,D as _,g as k,f as L,n as x}from"../../../chunks/vec32.js";import{create as y,UNIT_Z as z,fromValues as M,clone as P}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{c as T,h as q}from"../../../chunks/vec42.js";import{create as w}from"../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{directGeodeticSolver as j,inverseGeodeticSolver as v,InverseGeodeticSolverResult as D}from"../../../geometry/geodesicUtils.js";import{toRadians as b}from"../../../geometry/support/geodesicConstants.js";import{create as R,fromPoints as A,fromPositionAndNormal as Z,intersectLine as U,signedDistance as E,projectPoint as I,getNormal as S,distance as C}from"../../../geometry/support/plane.js";import{Sphere as G}from"../../../geometry/support/sphere.js";import{tangentFrame as O}from"../../3d/support/mathUtils.js";import{clone as V,asVec2 as B,createWritable as F,create as H,fromValues as J,fromVec3 as K}from"./normalizedPoint.js";import{projectPointToVerticalPlane as N,isClose as Q,projectPointToVerticalCylinder as W,projectPointToLineLike as X,intersectLineLikes as Y,intersectVerticalPlaneAndLineLike as $,intersectLineLikeAndVerticalCylinder as tt,intersectLineLikeAndCircle as et,intersectVerticalPlanes as st,intersectVerticalPlaneAndVerticalCylinder as rt,intersectVerticalCylinders as nt,intersectVerticalPlaneAndPoint as it,vectorsHaveCloseZ as ot,isPointInsidePlane as ct,pointsInsidePlane as ut}from"../../support/geometry3dUtils.js";class at{intersect(t){return St(this,t)}closestPoints(t){return[this.closestTo(t)]}}class ht extends at{constructor(t){super(),this.point=t}equals(t){return this===t||le(t)&&a(this.point,t.point)}closestTo(){return V(this.point)}}class ft extends at{constructor(t,e,s){super(),this.start=t,this.end=e,this.lineLike={start:t,end:e,type:s}}equals(t){return this===t||de(t)&&this.lineLike.type===t.lineLike.type&&a(this.start,t.start)&&a(this.end,t.end)}closestTo(t){const e=F();return X(t,this.lineLike,e),e}}class lt extends ft{constructor(t,e){super(t,e,1)}}class dt extends ft{constructor(t,e){super(t,e,0)}}class pt extends at{constructor(t){super(),this.constraints=t}equals(t){return this===t||fe(t)&&e(this.constraints,t.constraints,(t,e)=>t.equals(e))}closestTo(t){let e,s=1/0;for(const r of this.constraints){const n=r.closestTo(t),i=m(t,n);i<s&&(s=i,e=n)}return V(e??t)}closestPoints(t){return this.constraints.flatMap(e=>e===this?[]:e.closestPoints(t))}}class mt extends at{constructor(t,e){super(),this.center=t,this.radius=e}equals(t){return this===t||ge(t)&&this.center[0]===t.center[0]&&this.center[1]===t.center[1]&&this.radius===t.radius}closestTo(t){const e=F();return W(t,this.center,this.radius,e),e}}class gt extends at{constructor(t,e){super(),this.center=t,this.radius=e}equals(t){return this===t||_e(t)&&a(this.center,t.center)&&this.radius===t.radius}closestTo(t){const e=F();return W(t,this.center,this.radius,e),e[2]=this.center[2],e}asCircle(){return new _t(V(this.center),this.radius,J(0,0,1))}}class _t extends at{constructor(t,e,s,r){super(),this.center=t,this.radius=e,this.normal=s,this.slicePlane=r}equals(t){return this===t||ke(t)&&a(this.center,t.center)&&a(this.normal,t.normal)&&this.radius===t.radius}closestTo(t){const{center:e,radius:s}=this;I(this.getPlane(Lt),t,kt);const r=g(kt,kt,e),n=_(r);if(Q(n,0))return V(t);const i=s/Math.sqrt(n),o=F();p(o,e,r,i);const{slicePlane:c}=this;if(c&&!ct(c,o)){const e=Vt(c,this);return e?.closestTo(t)??V(t)}return o}getPlane(t=R()){return Z(this.center,this.normal,t)}}const kt=y(),Lt=R();class xt extends at{constructor(t){super(),this.z=t}equals(t){return this===t||pe(t)&&this.z===t.z}closestTo(t){return J(t[0],t[1],this.z)}getPlane(t=R()){return f(yt,0,0,this.z),Z(yt,z,t)}}const yt=y();class zt extends at{constructor(t,e,s){super(),this.start=t,this.end=e,this.planeLike={start:B(t),end:B(e),type:s}}equals(t){return this===t||me(t)&&this.planeLike.type===t.planeLike.type&&a(this.start,t.start)&&a(this.end,t.end)}closestTo(t){const e=F();return N(t,this.planeLike,e),e}closestEndTo(t){const{start:e,end:s}=this.planeLike;return Math.sign(r(n(Mt,s,e),n(Pt,B(t),e)))>0?this.end:this.start}getPlane(t=R()){const e=h(Tt,this.end);return e[2]+=1,A(this.start,this.end,e,t)}getSlicePlane(t=R()){const{start:e,end:s,type:r}=this.planeLike;if(0===r)return;const n=f(Tt,e[0],e[1],0),i=f(qt,s[0],s[1],0),o=l(qt,i,n);return Z(n,o,t),t}}const Mt=u(),Pt=u(),Tt=y(),qt=y();class wt extends zt{constructor(t,e){super(t,e,1)}}class jt extends zt{constructor(t,e){super(t,e,0)}}class vt extends at{constructor(t,e){super(),this.sphere=new G(t,e),this._center=P(t)}equals(t){return this===t||Le(t)&&this.sphere.exactEquals(t.sphere)}closestTo(t){const e=F();return this.sphere.projectPoint(t,e),e}get center(){return this._center}get radius(){return this.sphere.radius}}class Dt extends at{constructor(t,e,s){super(),this.start=t,this.end=e,this.getZ=s,this.planeLike={start:B(t),end:B(e),type:0}}equals(t){return this===t||xe(t)&&a(this.start,t.start)&&a(this.end,t.end)&&this.getZ===t.getZ}closestTo(t){return It(this,t)}addIfOnTheGround(t,e){for(const s of e){const e=this.getZ(s[0],s[1])??0;Q(s[2],e)&&(s[2]=e,t.push(s))}}}class bt extends at{constructor(t,e,s){super(),this._x=t,this._y=e,this._z=s}equals(t){return this===t||ze(t)&&this._x===t._x&&this._y===t._y&&this._z===t._z}closestTo([t,e,s]){return H(this._x??t,this._y??e,this._z??s)}}class Rt extends at{constructor(t,e,s,r,n){super(),this._origin=t,this._spatialReference=e,this._distanceMeters=s,this._z=r,this._directionDegrees=n}equals(t){return this===t||ye(t)&&o(this._origin,t._origin)&&this._spatialReference===t._spatialReference&&this._distanceMeters===t._distanceMeters&&this._z===t._z&&this._directionDegrees===t._directionDegrees}closestTo([t,e,s]){return c(At,t,e),o(At,this._origin)||this._applyDirectionAndDistance(At),H(At[0],At[1],this._z??s)}_applyDirectionAndDistance(t){if(null!=this._directionDegrees&&null!=this._distanceMeters)j(t,this._origin,this._directionDegrees,this._distanceMeters,this._spatialReference);else if(null!=this._directionDegrees)Ut(t,this._origin,this._directionDegrees,t,this._spatialReference);else if(null!=this._distanceMeters){const{azimuth:e}=v(Zt,this._origin,t,this._spatialReference);j(t,this._origin,e??0,this._distanceMeters,this._spatialReference)}}}const At=[0,0],Zt=new D;function Ut(t,e,s,r,n){let{azimuth:i,distance:o}=v(Et,e,r,n);i??=0;let c=o*Math.cos((i-s)*b);c=Math.max(0,c),j(t,e,s,c,n)}const Et=new D;function It(t,e){const s=F();return N(e,t.planeLike,s),s[2]=t.getZ(s[0],s[1])??Me,s}function St(t,e){if(fe(t)){const s=[];for(const r of t.constraints){const t=r.intersect(e);t&&s.push(t)}return he(s)}if(fe(e))return St(e,t);if(xe(t))return oe(t,e);if(xe(e))return oe(e,t);if(le(t)){const{point:s}=t;if(le(e))return a(s,e.point)?t:void 0;const r=e.closestTo(s);return d(r,s)?t:void 0}if(de(t)){if(le(e))return St(e,t);if(de(e))return ue(Y(t.lineLike,e.lineLike));if(pe(e))return Ct(t,e);if(me(e))return ue($(e.planeLike,t.lineLike));if(ge(e))return ue(tt(t.lineLike,e.center,e.radius));if(ke(e))return ue(et(t.lineLike,e));if(_e(e))return Gt(t,e);if(Le(e))return Ot(t,e)}else if(pe(t)){if(le(e)||de(e))return St(e,t);if(pe(e))return Bt(t,e);if(me(e))return Ft(t,e);if(ge(e))return Ht(t,e);if(ke(e))return Kt(t,e);if(_e(e))return Jt(t,e);if(Le(e))return Nt(t,e)}else if(me(t)){if(le(e)||de(e)||pe(e))return St(e,t);if(me(e))return ce(st(t.planeLike,e.planeLike));if(ge(e))return ce(rt(t.planeLike,e.center,e.radius));if(ke(e))return Wt(t,e);if(_e(e))return Qt(t,e);if(Le(e))return Xt(t,e)}else if(ge(t)){if(le(e)||de(e)||pe(e)||me(e))return St(e,t);if(ge(e))return ce(nt(B(t.center),t.radius,B(e.center),e.radius));if(ke(e))return Yt();if(_e(e))return $t(t,e);if(Le(e))return te()}else if(ke(t)){if(le(e)||de(e)||pe(e)||me(e)||ge(e))return St(e,t);if(ke(e))return ee();if(_e(e))return ee(e.asCircle());if(Le(e))return se()}else if(_e(t)){if(le(e)||de(e)||pe(e)||me(e)||ge(e)||ke(e))return St(e,t);if(_e(e))return re(e,t);if(Le(e))return ne()}else if(Le(t)){if(le(e)||de(e)||pe(e)||me(e)||ge(e)||_e(e))return St(e,t);if(Le(e))return ie()}}const Ct=(()=>{const t=R();return(e,s)=>{const{start:r,end:n}=e;if(ot(r,n)&&Q(r[2],s.z))return e;const i=F();return U(s.getPlane(t),r,n,i)?new ht(i):void 0}})();function Gt({lineLike:t},{center:e,radius:s}){const r=e[2];return ue(tt(t,e,s).filter(t=>Q(t[2],r)))}function Ot({lineLike:t},{sphere:e}){return ue(e.intersectLine(t.start,t.end))}const Vt=(()=>{const t=w(),e=y(),r=y();return(n,i,o)=>{const{normal:c,center:u,radius:a}=i;O(c,e,r);const h=S(n),f=a*k(h,e),l=a*k(h,r);T(t,u[0],u[1],u[2],1);const d=q(n,t),m=Math.hypot(f,l),g=Q(m,0);if(Q(C(n,u),0)){if(g)return i;if(Q(a,0))return!o||ct(o,u)?new ht(V(u)):void 0;L(e,h,c),x(e,e);const t=new Array,s=P(u);p(s,s,e,a),o&&!ct(o,s)||t.push(s);const r=P(u);return p(r,r,e,-a),o&&!ct(o,r)||t.push(r),ue(t)}if(g)return;const _=-d/m;if(Math.abs(_)>1||Q(_,1))return;const z=Math.atan(f/l),M=s(_)-z,w=Math.PI-M,j=new Array,v=y();p(v,u,e,a*Math.cos(M)),p(v,v,r,a*Math.sin(M)),j.push(v);const D=y();return p(D,u,e,a*Math.cos(w)),p(D,D,r,a*Math.sin(w)),j.push(D),ue(o?ut(o,j):j)}})();function Bt(t,e){return Q(t.z,e.z)?t:void 0}function Ft({z:t},{planeLike:e}){const[s,r]=e.start,[n,i]=e.end,o=J(s,r,t),c=J(n,i,t);return 0===e.type?new lt(o,c):new dt(o,c)}function Ht(t,e){const[s,r]=e.center;return new gt(J(s,r,t.z),e.radius)}function Jt(t,e){return Q(e.center[2],t.z)?e:void 0}const Kt=(()=>{const t=R();return(e,s)=>Vt(e.getPlane(t),s,s.slicePlane)})();function Nt(t,{center:e,radius:s}){const r=Math.abs(e[2]-t.z);if(r>s&&!Q(r,s))return;const n=J(e[0],e[1],t.z),i=Math.sqrt(s**2-r**2);return Q(i,0)?void 0:new gt(n,i)}const Qt=(()=>{const t=R();return(e,{center:s,radius:r})=>{const n=rt(e.planeLike,s,r),i=s[2];e.getSlicePlane(t);const o=new Array;for(const[c,u]of n){const e=[c,u,i];ct(t,e)&&o.push(e)}return ue(o)}})(),Wt=(()=>{const t=R(),e=R();return(s,r)=>Vt(s.getPlane(t),r,s.getSlicePlane(e))})(),Xt=(()=>{const t=R();return(e,{center:s,radius:r})=>{const n=e.getPlane(t),i=E(n,s),o=Math.abs(i);if(o>r&&!Q(o,r))return;const c=Math.sqrt(r**2-i**2);if(Q(c,0)){const t=F();return I(n,s,t),new ht(t)}const u=F(),a=P(S(n));return p(u,s,a,i),new _t(u,c,a,e.getSlicePlane())}})();function Yt(t,e){}function $t(t,e){const s=i(B(t.center),B(e.center));if(Q(s,0)&&Q(t.radius,e.radius))return e;return ae(nt(B(t.center),t.radius,B(e.center),e.radius),e.center[2])}function te(t,e){}function ee(t,e){}function se(t,e){}function re(t,e){if(!ot(t.center,e.center))return;const s=i(B(t.center),B(e.center));if(Q(s,0)&&Q(t.radius,e.radius))return t;return ae(nt(B(t.center),t.radius,B(e.center),e.radius),t.center[2])}function ne(t,e){}function ie(t,e){}function oe(t,e){const{planeLike:s,getZ:r}=t,n=new Array;if(le(e))t.addIfOnTheGround(n,it(s,e.point));else if(de(e))t.addIfOnTheGround(n,$(s,e.lineLike));else if(ge(e))for(const[i,o]of rt(s,e.center,e.radius)){const t=r(i,o);null!=t&&n.push(M(i,o,t))}else if(me(e)||xe(e))for(const[i,o]of st(s,e.planeLike)){const t=r(i,o)??Me;n.push(M(i,o,t))}return ue(n)}function ce(t){return he(t.map(([t,e])=>{const s=J(t,e,0),r=J(t,e,1);return new lt(s,r)}))}function ue(t){return he(t.map(t=>t?new ht(K(t)):void 0))}function ae(t,e){return ue(t.map(([t,s])=>[t,s,e]))}function he(e){if(0!==e.length)return 1===e.length?e[0]??void 0:new pt(e.filter(t))}function fe(t){return t instanceof pt}function le(t){return t instanceof ht}function de(t){return t instanceof ft}function pe(t){return t instanceof xt}function me(t){return t instanceof zt}function ge(t){return t instanceof mt}function _e(t){return t instanceof gt}function ke(t){return t instanceof _t}function Le(t){return t instanceof vt}function xe(t){return t instanceof Dt}function ye(t){return t instanceof Rt}function ze(t){return t instanceof bt}const Me=0;export{_t as CircleConstraint,at as Constraint,bt as CoordinateConstraint,Dt as DrapedLineConstraint,Rt as GeodesicConstraint,gt as HorizontalCircleConstraint,xt as HorizontalPlaneConstraint,lt as LineConstraint,ft as LineLikeConstraint,ht as PointConstraint,dt as RayConstraint,pt as SetConstraint,vt as SphereConstraint,mt as VerticalCylinderConstraint,wt as VerticalHalfPlaneConstraint,jt as VerticalPlaneConstraint,zt as VerticalPlaneLikeConstraint,he as constraintOrSet,le as isPoint};
|
package/views/interactive/snapping/featureSources/sceneLayerSource/SceneLayerSnappingSourceWorker.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as e}from"tslib";import{throwIfAborted as t}from"../../../../../core/promiseUtils.js";import{generateUID as o}from"../../../../../core/uid.js";import{subclass as s}from"../../../../../core/accessorSupport/decorators.js";import{i as n,
|
|
5
|
+
import{__decorate as e}from"tslib";import{throwIfAborted as t}from"../../../../../core/promiseUtils.js";import{generateUID as o}from"../../../../../core/uid.js";import{subclass as s}from"../../../../../core/accessorSupport/decorators.js";import{i as n,B as i}from"../../../../../chunks/vec32.js";import{create as r,clone as c}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{create as d,fromPoints as a,projectPoint as m}from"../../../../../geometry/support/lineSegment.js";import{Sphere as p}from"../../../../../geometry/support/sphere.js";import{Octree as h}from"../../../../3d/webgl-engine/lib/Octree.js";import{extractComponentsEdgeLocationsLayout as u}from"../../../../3d/webgl-engine/lib/edgeRendering/edgeProcessing.js";import{maxCandidateCount as g,boundsFromEdge as l}from"./sceneLayerSnappingUtils.js";import{SnappingCandidateEdge as f,SnappingCandidateVertex as _}from"./SnappingCandidate.js";let b=class{constructor(){this._idToComponent=new Map,this._components=new h(e=>e.bounds),this._edges=new h(e=>e.bounds),this._tmpLineSegment=d(),this._tmpP1=r(),this._tmpP2=r(),this._tmpP3=r(),this.remoteClient=null}async fetchCandidates(e,o){await Promise.resolve(),t(o);const s=e;s.mbs=new p(e.mbsJSON),await this._ensureEdgeLocations(s,o);const n=[];return this._edges.forEachNeighbor(e=>(this._addCandidates(s,e,n),n.length<g),s.mbs),{result:{candidates:n}}}async _ensureEdgeLocations(e,t){const o=[];if(this._components.forEachNeighbor(e=>{if(null==e.info){const{id:t,uid:s}=e;o.push({id:t,uid:s})}return!0},e.mbs),!o.length)return;const s={components:o},n=await this.remoteClient.invoke("fetchAllEdgeLocations",s,t??{});for(const i of n.components)this._setFetchEdgeLocations(i)}async add(e){const t=new C(e.id,new p(e.bounds));return this._idToComponent.set(t.id,t),this._components.add([t]),{result:{}}}async remove(e){const t=this._idToComponent.get(e.id);if(t){const e=[];this._edges.forEachNeighbor(o=>(o.component===t&&e.push(o),!0),t.bounds),this._edges.remove(e),this._components.remove([t]),this._idToComponent.delete(t.id)}return{result:{}}}_setFetchEdgeLocations(e){const t=this._idToComponent.get(e.id);if(null==t||e.uid!==t.uid)return;const o=u.createView(e.locations),s=new Array(o.count),n=r(),i=r();for(let r=0;r<o.count;r++){o.position0.getVec(r,n),o.position1.getVec(r,i);const c=l(n,i,e.origin),d=new S(t,r,c);s[r]=d}this._edges.add(s);const{objectIds:c,origin:d}=e;t.info={locations:o,objectIds:c,origin:d}}_addCandidates(e,t,o){const{info:s}=t.component,{origin:i,objectIds:r}=s,c=s.locations,d=c.position0.getVec(t.index,this._tmpP1),a=c.position1.getVec(t.index,this._tmpP2);n(d,d,i),n(a,a,i);const m=r[c.componentIndex.get(t.index)];this._addEdgeCandidate(e,m,d,a,o),j(e,m,d,o),j(e,m,a,o)}_addEdgeCandidate(e,t,o,s,n){if(!e.returnEdge)return;const r=e.mbs.center,d=a(o,s,this._tmpLineSegment),p=m(d,r,this._tmpP3);e.mbs.contains(p)&&n.push(new f(t,c(p),i(r,p),c(o),c(s)))}};b=e([s("esri.views.interactive.snapping.featureSources.sceneLayerSource.SceneLayerSnappingSourceWorker")],b);const w=b;function j(e,t,o,s){e.returnVertex&&e.mbs.contains(o)&&s.push(new _(t,c(o),i(e.mbs.center,o)))}class C{constructor(e,t){this.id=e,this.bounds=t,this.info=null,this.uid=o()}}class S{constructor(e,t,o){this.component=e,this.index=t,this.bounds=o}}export{w as default};
|
package/views/interactive/snapping/featureSources/sceneLayerSource/sceneLayerSnappingUtils.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{j as e,c as r,
|
|
5
|
+
import{j as e,c as r,B as t,i as n}from"../../../../../chunks/vec32.js";import{Sphere as c}from"../../../../../geometry/support/sphere.js";const s=1e3;function o(s,o,p){const a=new c;return e(a.center,s,.5),r(a.center,a.center,o,.5),a.radius=t(a.center,s),n(a.center,a.center,p),a}export{o as boundsFromEdge,s as maxCandidateCount};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{m as t,
|
|
5
|
+
import{m as t,B as e}from"../../../../chunks/vec32.js";import{SnappingHint as i}from"./SnappingHint.js";class s extends i{constructor(t,e,i,s,n=3,h=!0,a=!0){super(s,n),this.type=t,this.lineStart=e,this.lineEnd=i,this.fadeLeft=h,this.fadeRight=a}equals(e){return e instanceof s&&(this.type===e.type&&t(this.lineStart,e.lineStart)&&t(this.lineEnd,e.lineEnd)&&this.fadeLeft===e.fadeLeft&&this.fadeRight===e.fadeRight)}get length(){return e(this.lineStart,this.lineEnd)}}export{s as LineSnappingHint};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{createTask as t}from"../../../core/asyncUtils.js";import{handlesGroup as o,makeHandle as e}from"../../../core/handleUtils.js";import{floatEqualUlp as n}from"../../../core/mathUtils.js";import{createAngle as r,createScalar as i,valueInUnit as a}from"../../../core/quantity.js";import{watch as l}from"../../../core/reactiveUtils.js";import{verticalLengthUnitFromSpatialReference as s}from"../../../core/units.js";import{q as u,j as c,
|
|
5
|
+
import{createTask as t}from"../../../core/asyncUtils.js";import{handlesGroup as o,makeHandle as e}from"../../../core/handleUtils.js";import{floatEqualUlp as n}from"../../../core/mathUtils.js";import{createAngle as r,createScalar as i,valueInUnit as a}from"../../../core/quantity.js";import{watch as l}from"../../../core/reactiveUtils.js";import{verticalLengthUnitFromSpatialReference as s}from"../../../core/units.js";import{q as u,j as c,E as p}from"../../../chunks/vec32.js";import{UNIT_Z as f,create as m,clone as d,ONES as g}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{isLoaded as y,load as v}from"../../../geometry/coordinateFormatter.js";import j from"../../../geometry/support/MeshTransform.js";import{isRelativeVertexSpace as x}from"../../../geometry/support/meshVertexSpaceUtils.js";import{isWebMercator as b}from"../../../geometry/support/spatialReferenceUtils.js";import{lngLatToXY as h}from"../../../geometry/support/webMercatorUtils.js";import{tooltipKeys as S}from"../keybindings.js";import U from"../Tooltip.js";import{parseLatitudeLongitude as w,parseXY as A}from"./fields/parsingAndFormattingUtils.js";import{getDegreesArithmetic as M,getDegreesGeographic as k}from"../../support/angularMeasurementUtils.js";function R(t){const o=new U(t());return o.addHandles(l(()=>t(),({view:t,options:e,info:n})=>{o.view=t,void 0!==e&&(o.options=e),void 0!==n&&(o.info=n)})),o}function V(t,o){const e=x(o.vertexSpace),{scale:n,orientation:a}=t,{transform:l}=o,s=I(l);e&&null!=s?(a.actual=r(s,"degrees","arithmetic"),a.visible=!0):(a.actual=null,a.visible=!1),e?(n.actual=i(H(l)),n.visible=!0):(n.actual=null,n.visible=!1)}function z(t,o,e){if(!o||!x(o.vertexSpace))return;const n=o.transform??=new j;D(t,n,e),P(t,n,e)}function D(t,o,e){const r=M(t.orientation.actual),i=T(o.rotationAxis);if(null==r||null==i)return;const a=r-90,l=o.rotationAngle,s=a*i,u=s-l;n(l,s)||(e?.onRotateStart(0),o.rotationAngle=s,e?.onRotate(u),e?.onRotateStop(u))}function P(t,o,e){const n=t.scale.actual?.value,r=H(o);if(null==n||n===r)return;const{scale:i}=o;let a;if(0===r)a=d(g);else{const t=n/r;a=c(m(),i,t)}e?.onScaleStart(i[0],i[1],i[2]),o.scale=a,e?.onScale(a[0],a[1],a[2]),e?.onScaleStop(a[0],a[1],a[2])}function E(t,o){const{x:e,y:r,z:i}=o,{x:a,y:l,z:s}=F(t,o.spatialReference);return{dx:null==a||n(a,e)?0:a-e,dy:null==l||n(l,r)?0:l-r,dz:null==s||null==i||n(s,i)?0:s-i}}function F(t,o){let e,n;t.geographic?(e=k(t.longitude.actual),n=k(t.latitude.actual),b(o)&&(null!=e&&null!=n?[e,n]=h(e,n,q):null!=e?e=h(e,0,q)[0]:null!=n&&(n=h(0,n,q)[1]))):(e=t.x.actual?.value,n=t.y.actual?.value);const r=t.elevation.actual,i=s(o);return{x:e,y:n,z:null!=i&&null!=r?a(r,i):void 0}}const q=[0,0];function I(t){const o=90;if(!t)return o;const e=T(t.rotationAxis)??1;return null!=e?o+e*t.rotationAngle:null}function T(t){return p(t,f)?1:p(t,B)?-1:null}const B=u(m(),f);function H(t){return t?Math.max(...t.scale):1}function O(t,o){return!("key-down"!==t.type||t.key!==S.enterInputMode||!o||!C(o.info))&&(o.enterInputMode(),t.preventDefault(),t.stopPropagation(),!0)}function C(t){const o=t?.sketchOptions;if(!o)return!1;const{inputEnabled:e,visibleElements:n}=o.tooltips;return e&&!0===t.editableFields.some(({name:t})=>"x"===t||"y"===t?n.coordinates:n[t])}function G(n,r){let i=null;return o([n.on("paste",o=>{i?.abort(),i=t(async()=>{y()||await v(),J(o,n.info,r)})}),t(()=>v()),e(()=>i?.abort())])}function J(t,o,e){if(!o||!("geographic"in o))return;const n=t.clipboardData?.getData("text");if(!n)return;const r=o=>{t.stopPropagation(),t.preventDefault(),e?.onBeforePaste(),o(),e?.onAfterPaste()};if(o.geographic){const t=w(n);t&&r(()=>{o.longitude.applyValue(t.longitude),o.latitude.applyValue(t.latitude)})}else{const t=A(n);t&&r(()=>{o.x.applyValue(t.x),o.y.applyValue(t.y)})}}export{G as connectPasteEvent,O as enterInputModeIfAvailable,E as getXYZDeltasFromTooltipInfo,R as makeTooltip,J as pasteLocation,z as updateMeshTransformFromTooltipInfo,V as updateTooltipInfoFromMeshTransform};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{create as t}from"../../core/libs/gl-matrix-2/factories/vec2f64.js";import{
|
|
5
|
+
import{create as t}from"../../core/libs/gl-matrix-2/factories/vec2f64.js";import{D as e,n as i,d as s}from"../../chunks/vec32.js";import{create as a}from"../../core/libs/gl-matrix-2/factories/vec3f64.js";import{rotationAngleAndAxisDirectRotation as l,rotationAnglesAndAxesHeadingPreserving as n}from"../3d/state/utils/navigationUtils.js";import{FilteredFiniteDifference as r}from"./FilteredFiniteDifference.js";import{FilteredValue as h}from"./FilteredValue.js";import{Momentum as _}from"./Momentum.js";const m=1e-5;class u extends _{constructor(t,e,i,s,a,l=0,n){super(t,e,i),this._angularVelocity1=s,this.axis1=a,this.angularVelocity2=l,this.axis2=n}value1(t){return super.valueFromInitialVelocity(this._angularVelocity1,t)}value2(t){return super.valueFromInitialVelocity(this.angularVelocity2,t)}}class o{constructor(e=300,i=12,s=.84){this._minimumInitialVelocity=e,this._stopVelocity=i,this._friction=s,this.enabled=!0,this._tmpAxis1=a(),this._tmpAxis2=a(),this._tmpAngles=t(),this._time=new r(.3),this._screen=[new r(.4),new r(.4)],this._angle1=new h(.6),this._angle2=new h(.6),this._axis1=a(),this._axis2=a(),this._lastScene=a()}addMomentumDirectRotation(t,a,n,r,h,_){if(this.enabled){if(this._time.hasLastValue()){if(this._time.computeDelta(n)<.01)return;let t=l(this._lastScene,a,this._tmpAxis2,r,h,_);this._angle2.update(0),e(this._tmpAxis2)<m?t=0:i(this._axis1,this._tmpAxis2),this._angle1.update(t),s(this._lastScene,a)}this._screen[0].update(t[0]),this._screen[1].update(t[1]),this._time.update(n)}}addMomentumPreserveHeading(t,a,l,r,h,_,u){if(this.enabled){if(this._time.hasLastValue()){if(this._time.computeDelta(l)<.01)return;n(this._lastScene,a,this._tmpAxis2,this._tmpAxis1,this._tmpAngles,r,h,_,u,!1),e(this._tmpAxis2)<m?(this._angle1.update(0),this._angle2.update(0)):(this._angle1.update(this._tmpAngles[1]),this._angle2.update(this._tmpAngles[0]),i(this._axis1,this._tmpAxis1),i(this._axis2,this._tmpAxis2)),s(this._lastScene,a)}this._screen[0].update(t[0]),this._screen[1].update(t[1]),this._time.update(l)}}reset(){this._screen[0].reset(),this._screen[1].reset(),this._angle1.reset(),this._angle2.reset(),this._time.reset()}evaluateMomentum(){if(!this.enabled||!this._screen[0].hasFilteredDelta())return null;const t=this._screen[0].filteredDelta,e=this._screen[1].filteredDelta,i=null==t||null==e?null:Math.sqrt(t*t+e*e),s=this._time.filteredDelta,a=null==i||null==s?0:i/s;return Math.abs(a)<this._minimumInitialVelocity?null:this.createMomentum(a,this._stopVelocity,this._friction)}createMomentum(t,e,i){const s=this._time.filteredDelta,a=this._angle1.filteredValue,l=this._angle2.filteredValue,n=null==s||null==l?0:l/s;return new u(t,e,i,null==s||null==a?0:a/s,this._axis1,n,this._axis2)}}export{u as PanSphericalMomentum,o as PanSphericalMomentumEstimator};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{removeUnordered as e,filterInPlace as t}from"../../core/arrayUtils.js";import s from"../../core/Handles.js";import"../../core/has.js";import r from"../../core/Logger.js";import{removeMaybe as i}from"../../core/maybe.js";import{recordPerformance as a}from"../../core/performance.js";import n from"../../core/PerformanceSampler.js";import{isAborted as u,createAbortError as _,when as h,isPromiseLike as o,ignoreAbortErrors as E}from"../../core/promiseUtils.js";import{watch as d,initial as T,when as c}from"../../core/reactiveUtils.js";import{signal as m}from"../../core/signal.js";import{Milliseconds as l}from"../../core/time.js";import R from"./debugFlags.js";import{PromiseQueue as g}from"./PromiseQueue.js";import{Yield as I}from"./Yield.js";function p(){return new C}const f={RESOURCE_CONTROLLER_IMMEDIATE:"immediate",RESOURCE_CONTROLLER:"schedule",SLIDE:"slide",STREAM_DATA_LOADER:"stream loader",ELEVATION_QUERY:"elevation query",TERRAIN_SURFACE:"terrain",SURFACE_GEOMETRY_UPDATES:"surface geometry updates",LOD_RENDERER:"LoD renderer",GRAPHICS_CORE:"Graphics3D",I3S_CONTROLLER:"I3S",POINT_CLOUD_LAYER:"point cloud",FEATURE_TILE_FETCHER:"feature fetcher",STREAM_CONTROLLER:"stream controller",OVERLAY:"overlay",OVERLAY_RENDERER:"overlay renderer",STAGE:"stage",GRAPHICS_DECONFLICTOR:"graphics deconflictor",FILTER_VISIBILITY:"graphics filter visibility",SCALE_VISIBILITY:"graphics scale visibility",FRUSTUM_VISIBILITY:"graphics frustum visibility",POINT_OF_INTEREST_FREQUENT:"POI frequent",POINT_OF_INTEREST_INFREQUENT:"POI infrequent",LABELER:"labeler",FEATURE_QUERY_ENGINE:"feature query",FEATURE_TILE_TREE:"feature tile tree",FEATURE_TILE_TREE_ACTIVE:"fast feature tile tree",ELEVATION_ALIGNMENT:"elevation alignment",ELEVATION_ALIGNMENT_SCENE:"elevation alignment scene",TEXT_TEXTURE_ATLAS:"text texture atlas",TEXTURE_UNLOAD:"texture unload",LINE_OF_SIGHT_TOOL:"line of sight tool",LINE_OF_SIGHT_TOOL_INTERACTIVE:"interactive line of sight tool",ELEVATION_PROFILE:"elevation profile",SNAPPING:"snapping",SHADOW_ACCUMULATOR:"shadow accumulator",CLOUDS_GENERATOR:"clouds generator",FLOW_GENERATOR:"flow generator",MAPVIEW_FETCH_QUEUE:"mapview fetch queue",MAPVIEW_LAYERVIEW_UPDATE:"mapview layerview update",MAPVIEW_VECTOR_TILE_PARSING_QUEUE:"mapview vector tile parsing queue",NONE:0,TEST_PRIO:1},L=0,O=new Map([[f.RESOURCE_CONTROLLER_IMMEDIATE,L],[f.RESOURCE_CONTROLLER,4],[f.SLIDE,L],[f.STREAM_DATA_LOADER,L],[f.ELEVATION_QUERY,L],[f.TERRAIN_SURFACE,1],[f.SURFACE_GEOMETRY_UPDATES,1],[f.LOD_RENDERER,2],[f.GRAPHICS_CORE,2],[f.I3S_CONTROLLER,2],[f.POINT_CLOUD_LAYER,2],[f.FEATURE_TILE_FETCHER,2],[f.STREAM_CONTROLLER,2],[f.CLOUDS_GENERATOR,2],[f.OVERLAY,4],[f.OVERLAY_RENDERER,4],[f.STAGE,4],[f.GRAPHICS_DECONFLICTOR,4],[f.FILTER_VISIBILITY,4],[f.SCALE_VISIBILITY,4],[f.FRUSTUM_VISIBILITY,4],[f.POINT_OF_INTEREST_FREQUENT,6],[f.POINT_OF_INTEREST_INFREQUENT,30],[f.LABELER,8],[f.FEATURE_QUERY_ENGINE,8],[f.FEATURE_TILE_TREE,16],[f.FEATURE_TILE_TREE_ACTIVE,L],[f.ELEVATION_ALIGNMENT,12],[f.ELEVATION_ALIGNMENT_SCENE,14],[f.TEXT_TEXTURE_ATLAS,12],[f.TEXTURE_UNLOAD,12],[f.LINE_OF_SIGHT_TOOL,16],[f.LINE_OF_SIGHT_TOOL_INTERACTIVE,L],[f.SNAPPING,L],[f.SHADOW_ACCUMULATOR,30],[f.FLOW_GENERATOR,12],[f.MAPVIEW_FETCH_QUEUE,L],[f.MAPVIEW_LAYERVIEW_UPDATE,2],[f.MAPVIEW_VECTOR_TILE_PARSING_QUEUE,L]]);function A(e){return O.has(e)?O.get(e):"number"==typeof e?e:1}const N=l(6.5),b=l(1),S=l(30),k=l(1e3/30),P=l(100),U=.9;class C{get updating(){return this._updating.value}_updatingChanged(){this._updating.value=this._tasks.some(e=>e.needsUpdate)}constructor(){this._updating=m(!0),this._microTaskQueued=!1,this._frameNumber=0,this.performanceInfo={total:new n("total"),tasks:new Map},this._frameTaskTimes=new Map,this._budget=new y,this.state=1,this._tasks=new Array,this._runQueue=new Array,this._load=0,this._forceTask=!1,this._debug=!1,this._debugHandle=d(()=>R.SCHEDULER_LOG_SLOW_TASKS,e=>this._debug=e,T);for(const e of Object.keys(f))this.performanceInfo.tasks.set(f[e],new n(String(f[e])))}destroy(){this._tasks.forEach(e=>e.remove()),this._tasks.length=0,this._runQueue.length=0,i(this._debugHandle),this._microTaskQueued=!1,this._updatingChanged()}taskRunningChanged(e){this._updatingChanged(),e&&this._budget.remaining>0&&!this._microTaskQueued&&(this._microTaskQueued=!0,queueMicrotask(()=>{this._microTaskQueued&&(this._microTaskQueued=!1,this._budget.remaining>0&&this._schedule()&&this._runFrame())}))}registerTask(e,t){const s=new F(this,e,t);return this._tasks.push(s),this._updatingChanged(),this.performanceInfo.tasks.has(e)||this.performanceInfo.tasks.set(e,new n(e)),s}get load(){return this._load}frame(e){if(this._startFrameTaskTimes(),this._updateBudget(e)){const e=this._budget.now();this._runFrame();const t=this._budget.now();this._recordFrameTaskTimes(t-e);const s=2===this.state?"Idle":1===this.state?"Interacting":"Animating";return a(`${s} Frame Tasks`,e,t,"Maps SDK","Scheduling"),!0}return this._recordFrameTaskTimes(0),!1}_updateBudget(e){this._test&&(this._test.usedBudget=0),++this._frameNumber;let t=N,s=e.frameDuration,r=b;switch(this.state){case 2:t=l(0),s=l(Math.max(P,e.frameDuration)),r=S;break;case 1:s=l(Math.max(k,e.frameDuration))}return s=l(s-e.elapsedFrameTime-t),2!==this.state&&s<b&&!this._forceTask?(this._forceTask=!0,!1):(s=l(Math.max(s,r)),this._budget.reset(s),this._updateLoad(),this._schedule())}_runFrame(){this._forceTask=!1,this._microTaskQueued=!1,this._run(),this._test&&(this._test.usedBudget=this._budget.elapsed)}stopFrame(){this._budget.reset(l(0)),this._budget.madeProgress()}removeTask(t){e(this._tasks,t),e(this._runQueue,t),this._updatingChanged()}_updateTask(e){this._tasks.forEach(t=>{t.name===e&&t.setPriority(e)})}_getState(e){if(this._runQueue.some(t=>t.name===e))return"s";let t="i";return this._tasks.forEach(s=>{s.name===e&&s.needsUpdate&&(s.schedulePriority<=1?t="r":"r"!==t&&(t="w"))}),t}_getRuntime(e){let t=0;return this._tasks.forEach(s=>{s.name===e&&(t+=s.runtime)}),t}_resetRuntimes(){this._tasks.forEach(e=>e.runtime=0)}_getRunning(){const e=new Map;if(this._tasks.forEach(t=>{t.needsUpdate&&e.set(t.name,(e.get(t.name)||0)+1)}),0===e.size)return null;let t="";return e.forEach((e,s)=>{t+=e>1?` ${e}x ${s}`:` ${s}`}),t}_updateLoad(){const e=this._tasks.reduce((e,t)=>t.needsUpdate?++e:e,0);this._load=this._load*U+e*(1-U)}_schedule(){for(t(this._runQueue,e=>!!e.needsUpdate||(e.schedulePriority=e.basePriority,!1)),this._tasks.forEach(e=>{e.basePriority===L&&e.needsUpdate&&!this._runQueue.includes(e)&&e.blockFrame!==this._frameNumber&&this._runQueue.unshift(e)});0===this._runQueue.length;){let e=!1,t=0;if(this._tasks.forEach(s=>{if(s.needsUpdate&&0!==s.schedulePriority&&s.basePriority!==L&&s.blockFrame!==this._frameNumber)if(e=!0,t=Math.max(t,s.basePriority),1===s.schedulePriority)s.schedulePriority=0,this._runQueue.push(s);else--s.schedulePriority}),!e)return this._updatingChanged(),!1}return this._updatingChanged(),!0}_run(){do{for(;this._runQueue.length>0;){const t=this._budget.now(),s=this._runQueue.pop();this._budget.resetProgress();try{s.task.runTask(this._budget)===I&&(s.blockFrame=this._frameNumber)}catch(e){r.getLogger("esri.views.support.Scheduler").error(`Exception in task "${s.name}"`,e),s.blockFrame=this._frameNumber}!this._budget.hasProgressed&&s.blockFrame!==this._frameNumber&&s.needsUpdate&&(s.name,f.I3S_CONTROLLER,s.blockFrame=this._frameNumber),s.schedulePriority=s.basePriority;const i=this._budget.now(),n=i-t;if(a(`${s.name}`,t,i,"Maps SDK","Scheduling"),s.runtime+=n,this._frameTaskTimes.set(s.priority,this._frameTaskTimes.get(s.priority)+n),this._budget.remaining<=0)return void this._updatingChanged()}}while(this._schedule());this._updatingChanged()}_startFrameTaskTimes(){for(const e of Object.keys(f))this._frameTaskTimes.set(f[e],0)}_recordFrameTaskTimes(e){this._frameTaskTimes.forEach((e,t)=>this.performanceInfo.tasks.get(t).push(e)),this.performanceInfo.total.push(e)}get test(){return this._test}}class F{get task(){return this._task.value}get readyToRun(){return this._queue.readyToRun}get updating(){return this._queue.updating}constructor(e,t,r){this._scheduler=e,this.name=t,this.blockFrame=0,this.runtime=0,this._queue=new g,this._handles=new s,this._basePriority=A(t),this.schedulePriority=this._basePriority,this._task=m(null!=r?r:this._queue),this._handles.add(c(()=>this.task.readyToRun,t=>e.taskRunningChanged(t)))}remove(){this.processQueue(w),this._scheduler.removeTask(this),this.schedule=Q.schedule,this.reschedule=Q.reschedule,this.scheduleGenerator=Q.scheduleGenerator,this._handles.destroy()}get basePriority(){return this._basePriority}setPriority(e){if(this.name===e)return;this.name=e;const t=A(e);this._basePriority!==L&&0===this.schedulePriority||(this.schedulePriority=t),this._basePriority=t}get priority(){return this.name}set priority(e){this.setPriority(e)}get needsUpdate(){return this.readyToRun||!this.task.destroyed&&this.task.readyToRun}schedule(e,t,s){return this._queue.push(e,t,s)}reschedule(e,t,s){return this._queue.unshift(e,t,s)}scheduleGenerator(e,t,s){return this._queue.pushGenerator(e,t,s)}processQueue(e){return this._queue.runTask(e)}}class y{constructor(){this._begin=performance?.now()??0,this._budget=0,this._done=!1,this._progressed=!1,this._enabled=!0}run(e){return!this.done&&(!0===e()&&this.madeProgress(),!0)}get done(){return this._done}get budget(){return this._budget}madeProgress(){return this._progressed=!0,this._done=this.elapsed>=this._budget&&this._enabled,this._done}get enabled(){return this._enabled}set enabled(e){this._enabled=e}reset(e){this._begin=this.now(),this._budget=e,this.resetProgress()}get remaining(){return Math.max(this._budget-this.elapsed,0)}now(){return performance.now()}get elapsed(){return this.now()-this._begin}resetProgress(){this._progressed=!1,this._done=!1}get hasProgressed(){return this._progressed}}const w=new y;function D(e){const t=new y;return t.reset(e),t}w.enabled=!1;class M{remove(){}processQueue(){}schedule(e,t,s){try{if(u(t)){const e=_();return s?Promise.resolve(s(e)):Promise.reject(e)}return h(e(w))}catch(r){return Promise.reject(r)}}reschedule(e,t,s){return this.schedule(e,t,s)}async scheduleGenerator(e,t,s){if(u(t)){const e=_();if(s)return s(e);throw e}const r=e(w);for(;;){const e=r.next(w),i=o(e)?await e:e;if(u(t)){const e=_();if(s){const t=s(e),i=r.return(null);return o(i)&&await E(i),t}const t=r.throw(e);throw o(t)&&await E(t),e}if(i.done)return i.value}}}const Q=new M;export{Q as ImmediateTask,f as TaskPriority,A as getTaskPriority,D as makeBudget,p as newScheduler,w as noBudget,O as taskPriorities};
|
|
5
|
+
import{removeUnordered as e,filterInPlace as t}from"../../core/arrayUtils.js";import s from"../../core/Handles.js";import"../../core/has.js";import r from"../../core/Logger.js";import{removeMaybe as i}from"../../core/maybe.js";import{recordPerformance as a}from"../../core/performance.js";import n from"../../core/PerformanceSampler.js";import{isAborted as u,createAbortError as _,when as h,isPromiseLike as o,ignoreAbortErrors as E}from"../../core/promiseUtils.js";import{watch as d,initial as T,when as c}from"../../core/reactiveUtils.js";import{signal as m}from"../../core/signal.js";import{Milliseconds as l}from"../../core/time.js";import R from"./debugFlags.js";import{PromiseQueue as g}from"./PromiseQueue.js";import{Yield as I}from"./Yield.js";function p(){return new C}const f={RESOURCE_CONTROLLER_IMMEDIATE:"immediate",RESOURCE_CONTROLLER:"schedule",SLIDE:"slide",STREAM_DATA_LOADER:"stream loader",ELEVATION_QUERY:"elevation query",TERRAIN_SURFACE:"terrain",SURFACE_GEOMETRY_UPDATES:"surface geometry updates",LOD_RENDERER:"LoD renderer",GRAPHICS_CORE:"Graphics3D",I3S_CONTROLLER:"I3S",POINT_CLOUD_LAYER:"point cloud",FEATURE_TILE_FETCHER:"feature fetcher",STREAM_CONTROLLER:"stream controller",OVERLAY:"overlay",OVERLAY_RENDERER:"overlay renderer",STAGE:"stage",GRAPHICS_DECONFLICTOR:"graphics deconflictor",FILTER_VISIBILITY:"graphics filter visibility",SCALE_VISIBILITY:"graphics scale visibility",FRUSTUM_VISIBILITY:"graphics frustum visibility",POINT_OF_INTEREST_FREQUENT:"POI frequent",POINT_OF_INTEREST_INFREQUENT:"POI infrequent",LABELER:"labeler",FEATURE_QUERY_ENGINE:"feature query",FEATURE_TILE_TREE:"feature tile tree",FEATURE_TILE_TREE_ACTIVE:"fast feature tile tree",ELEVATION_ALIGNMENT:"elevation alignment",ELEVATION_ALIGNMENT_SCENE:"elevation alignment scene",TEXT_TEXTURE_ATLAS:"text texture atlas",TEXTURE_UNLOAD:"texture unload",LINE_OF_SIGHT_TOOL:"line of sight tool",LINE_OF_SIGHT_TOOL_INTERACTIVE:"interactive line of sight tool",VOLUME_MEASUREMENT:"volume measurement",ELEVATION_PROFILE:"elevation profile",SNAPPING:"snapping",SHADOW_ACCUMULATOR:"shadow accumulator",CLOUDS_GENERATOR:"clouds generator",FLOW_GENERATOR:"flow generator",MAPVIEW_FETCH_QUEUE:"mapview fetch queue",MAPVIEW_LAYERVIEW_UPDATE:"mapview layerview update",MAPVIEW_VECTOR_TILE_PARSING_QUEUE:"mapview vector tile parsing queue",NONE:0,TEST_PRIO:1},L=0,O=new Map([[f.RESOURCE_CONTROLLER_IMMEDIATE,L],[f.RESOURCE_CONTROLLER,4],[f.SLIDE,L],[f.STREAM_DATA_LOADER,L],[f.ELEVATION_QUERY,L],[f.TERRAIN_SURFACE,1],[f.SURFACE_GEOMETRY_UPDATES,1],[f.LOD_RENDERER,2],[f.GRAPHICS_CORE,2],[f.I3S_CONTROLLER,2],[f.POINT_CLOUD_LAYER,2],[f.FEATURE_TILE_FETCHER,2],[f.STREAM_CONTROLLER,2],[f.CLOUDS_GENERATOR,2],[f.OVERLAY,4],[f.OVERLAY_RENDERER,4],[f.STAGE,4],[f.GRAPHICS_DECONFLICTOR,4],[f.FILTER_VISIBILITY,4],[f.SCALE_VISIBILITY,4],[f.FRUSTUM_VISIBILITY,4],[f.POINT_OF_INTEREST_FREQUENT,6],[f.POINT_OF_INTEREST_INFREQUENT,30],[f.LABELER,8],[f.FEATURE_QUERY_ENGINE,8],[f.FEATURE_TILE_TREE,16],[f.FEATURE_TILE_TREE_ACTIVE,L],[f.ELEVATION_ALIGNMENT,12],[f.ELEVATION_ALIGNMENT_SCENE,14],[f.TEXT_TEXTURE_ATLAS,12],[f.TEXTURE_UNLOAD,12],[f.LINE_OF_SIGHT_TOOL,16],[f.LINE_OF_SIGHT_TOOL_INTERACTIVE,L],[f.VOLUME_MEASUREMENT,4],[f.SNAPPING,L],[f.SHADOW_ACCUMULATOR,30],[f.FLOW_GENERATOR,12],[f.MAPVIEW_FETCH_QUEUE,L],[f.MAPVIEW_LAYERVIEW_UPDATE,2],[f.MAPVIEW_VECTOR_TILE_PARSING_QUEUE,L]]);function A(e){return O.has(e)?O.get(e):"number"==typeof e?e:1}const N=l(6.5),b=l(1),S=l(30),U=l(1e3/30),k=l(100),P=.9;class C{get updating(){return this._updating.value}_updatingChanged(){this._updating.value=this._tasks.some(e=>e.needsUpdate)}constructor(){this._updating=m(!0),this._microTaskQueued=!1,this._frameNumber=0,this.performanceInfo={total:new n("total"),tasks:new Map},this._frameTaskTimes=new Map,this._budget=new y,this.state=1,this._tasks=new Array,this._runQueue=new Array,this._load=0,this._forceTask=!1,this._debug=!1,this._debugHandle=d(()=>R.SCHEDULER_LOG_SLOW_TASKS,e=>this._debug=e,T);for(const e of Object.keys(f))this.performanceInfo.tasks.set(f[e],new n(String(f[e])))}destroy(){this._tasks.forEach(e=>e.remove()),this._tasks.length=0,this._runQueue.length=0,i(this._debugHandle),this._microTaskQueued=!1,this._updatingChanged()}taskRunningChanged(e){this._updatingChanged(),e&&this._budget.remaining>0&&!this._microTaskQueued&&(this._microTaskQueued=!0,queueMicrotask(()=>{this._microTaskQueued&&(this._microTaskQueued=!1,this._budget.remaining>0&&this._schedule()&&this._runFrame())}))}registerTask(e,t){const s=new F(this,e,t);return this._tasks.push(s),this._updatingChanged(),this.performanceInfo.tasks.has(e)||this.performanceInfo.tasks.set(e,new n(e)),s}get load(){return this._load}frame(e){if(this._startFrameTaskTimes(),this._updateBudget(e)){const e=this._budget.now();this._runFrame();const t=this._budget.now();this._recordFrameTaskTimes(t-e);const s=2===this.state?"Idle":1===this.state?"Interacting":"Animating";return a(`${s} Frame Tasks`,e,t,"Maps SDK","Scheduling"),!0}return this._recordFrameTaskTimes(0),!1}_updateBudget(e){this._test&&(this._test.usedBudget=0),++this._frameNumber;let t=N,s=e.frameDuration,r=b;switch(this.state){case 2:t=l(0),s=l(Math.max(k,e.frameDuration)),r=S;break;case 1:s=l(Math.max(U,e.frameDuration))}return s=l(s-e.elapsedFrameTime-t),2!==this.state&&s<b&&!this._forceTask?(this._forceTask=!0,!1):(s=l(Math.max(s,r)),this._budget.reset(s),this._updateLoad(),this._schedule())}_runFrame(){this._forceTask=!1,this._microTaskQueued=!1,this._run(),this._test&&(this._test.usedBudget=this._budget.elapsed)}stopFrame(){this._budget.reset(l(0)),this._budget.madeProgress()}removeTask(t){e(this._tasks,t),e(this._runQueue,t),this._updatingChanged()}_updateTask(e){this._tasks.forEach(t=>{t.name===e&&t.setPriority(e)})}_getState(e){if(this._runQueue.some(t=>t.name===e))return"s";let t="i";return this._tasks.forEach(s=>{s.name===e&&s.needsUpdate&&(s.schedulePriority<=1?t="r":"r"!==t&&(t="w"))}),t}_getRuntime(e){let t=0;return this._tasks.forEach(s=>{s.name===e&&(t+=s.runtime)}),t}_resetRuntimes(){this._tasks.forEach(e=>e.runtime=0)}_getRunning(){const e=new Map;if(this._tasks.forEach(t=>{t.needsUpdate&&e.set(t.name,(e.get(t.name)||0)+1)}),0===e.size)return null;let t="";return e.forEach((e,s)=>{t+=e>1?` ${e}x ${s}`:` ${s}`}),t}_updateLoad(){const e=this._tasks.reduce((e,t)=>t.needsUpdate?++e:e,0);this._load=this._load*P+e*(1-P)}_schedule(){for(t(this._runQueue,e=>!!e.needsUpdate||(e.schedulePriority=e.basePriority,!1)),this._tasks.forEach(e=>{e.basePriority===L&&e.needsUpdate&&!this._runQueue.includes(e)&&e.blockFrame!==this._frameNumber&&this._runQueue.unshift(e)});0===this._runQueue.length;){let e=!1,t=0;if(this._tasks.forEach(s=>{if(s.needsUpdate&&0!==s.schedulePriority&&s.basePriority!==L&&s.blockFrame!==this._frameNumber)if(e=!0,t=Math.max(t,s.basePriority),1===s.schedulePriority)s.schedulePriority=0,this._runQueue.push(s);else--s.schedulePriority}),!e)return this._updatingChanged(),!1}return this._updatingChanged(),!0}_run(){do{for(;this._runQueue.length>0;){const t=this._budget.now(),s=this._runQueue.pop();this._budget.resetProgress();try{s.task.runTask(this._budget)===I&&(s.blockFrame=this._frameNumber)}catch(e){r.getLogger("esri.views.support.Scheduler").error(`Exception in task "${s.name}"`,e),s.blockFrame=this._frameNumber}!this._budget.hasProgressed&&s.blockFrame!==this._frameNumber&&s.needsUpdate&&(s.name,f.I3S_CONTROLLER,s.blockFrame=this._frameNumber),s.schedulePriority=s.basePriority;const i=this._budget.now(),n=i-t;if(a(`${s.name}`,t,i,"Maps SDK","Scheduling"),s.runtime+=n,this._frameTaskTimes.set(s.priority,this._frameTaskTimes.get(s.priority)+n),this._budget.remaining<=0)return void this._updatingChanged()}}while(this._schedule());this._updatingChanged()}_startFrameTaskTimes(){for(const e of Object.keys(f))this._frameTaskTimes.set(f[e],0)}_recordFrameTaskTimes(e){this._frameTaskTimes.forEach((e,t)=>this.performanceInfo.tasks.get(t).push(e)),this.performanceInfo.total.push(e)}get test(){return this._test}}class F{get task(){return this._task.value}get readyToRun(){return this._queue.readyToRun}get updating(){return this._queue.updating}constructor(e,t,r){this._scheduler=e,this.name=t,this.blockFrame=0,this.runtime=0,this._queue=new g,this._handles=new s,this._basePriority=A(t),this.schedulePriority=this._basePriority,this._task=m(null!=r?r:this._queue),this._handles.add(c(()=>this.task.readyToRun,t=>e.taskRunningChanged(t)))}remove(){this.processQueue(w),this._scheduler.removeTask(this),this.schedule=Q.schedule,this.reschedule=Q.reschedule,this.scheduleGenerator=Q.scheduleGenerator,this._handles.destroy()}get basePriority(){return this._basePriority}setPriority(e){if(this.name===e)return;this.name=e;const t=A(e);this._basePriority!==L&&0===this.schedulePriority||(this.schedulePriority=t),this._basePriority=t}get priority(){return this.name}set priority(e){this.setPriority(e)}get needsUpdate(){return this.readyToRun||!this.task.destroyed&&this.task.readyToRun}schedule(e,t,s){return this._queue.push(e,t,s)}reschedule(e,t,s){return this._queue.unshift(e,t,s)}scheduleGenerator(e,t,s){return this._queue.pushGenerator(e,t,s)}processQueue(e){return this._queue.runTask(e)}}class y{constructor(){this._begin=performance?.now()??0,this._budget=0,this._done=!1,this._progressed=!1,this._enabled=!0}run(e){return!this.done&&(!0===e()&&this.madeProgress(),!0)}get done(){return this._done}get budget(){return this._budget}madeProgress(){return this._progressed=!0,this._done=this.elapsed>=this._budget&&this._enabled,this._done}get enabled(){return this._enabled}set enabled(e){this._enabled=e}reset(e){this._begin=this.now(),this._budget=e,this.resetProgress()}get remaining(){return Math.max(this._budget-this.elapsed,0)}now(){return performance.now()}get elapsed(){return this.now()-this._begin}resetProgress(){this._progressed=!1,this._done=!1}get hasProgressed(){return this._progressed}}const w=new y;function M(e){const t=new y;return t.reset(e),t}w.enabled=!1;class D{remove(){}processQueue(){}schedule(e,t,s){try{if(u(t)){const e=_();return s?Promise.resolve(s(e)):Promise.reject(e)}return h(e(w))}catch(r){return Promise.reject(r)}}reschedule(e,t,s){return this.schedule(e,t,s)}async scheduleGenerator(e,t,s){if(u(t)){const e=_();if(s)return s(e);throw e}const r=e(w);for(;;){const e=r.next(w),i=o(e)?await e:e;if(u(t)){const e=_();if(s){const t=s(e),i=r.return(null);return o(i)&&await E(i),t}const t=r.throw(e);throw o(t)&&await E(t),e}if(i.done)return i.value}}}const Q=new D;export{Q as ImmediateTask,f as TaskPriority,A as getTaskPriority,M as makeBudget,p as newScheduler,w as noBudget,O as taskPriorities};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{createArea as t}from"../../core/quantity.js";import{areaUnitFromSpatialReference as o}from"../../core/units.js";import{e as r}from"../../chunks/earcut.js";import{h as n,c as e,
|
|
5
|
+
import{createArea as t}from"../../core/quantity.js";import{areaUnitFromSpatialReference as o}from"../../core/units.js";import{e as r}from"../../chunks/earcut.js";import{h as n,c as e,D as s}from"../../chunks/vec32.js";import{create as i}from"../../core/libs/gl-matrix-2/factories/vec3f64.js";import{projectVectorToVector as c}from"../../geometry/projection/projectVectorToVector.js";import{fromPoints as f,wrap as u,getNormal as l,projectPointLocal as m}from"../../geometry/support/plane.js";import{areaPoints2d as p}from"../../geometry/support/triangle.js";import{computeEuclideanMeasurementSR as a}from"./measurementUtils.js";function g(t,o=k()){return j(t,o)}function h(t,o=k()){return j(t,o,!1)}function j(r,g,h=r.hasZ){const j=a(r.spatialReference),k=o(j);if(null==k)return null;const x=(t,o)=>!(o.length<2)&&(n(t,o[0],o[1],h&&o[2]||0),!0);let C=0;for(const t of r.rings){const o=t.length;if(o<3)continue;const{positionsWorldCoords:a}=g;for(;a.length<o;)a.push(i());const h=y,k=n(d,0,0,0),R=1/o;for(let n=0;n<o;n++){if(!x(h,t[n]))return null;if(!c(h,r.spatialReference,a[n],j))return null;e(k,k,a[n],R)}const V=f(a[0],a[1],k,u());if(0===s(l(V)))continue;for(let t=0;t<o;t++)m(V,k,a[t],a[t]);const W=v(a);for(let t=0;t<W.length;t+=3)C+=p(a[W[t]],a[W[t+1]],a[W[t+2]])}return t(C,k)}const y=i(),d=i();function k(){return{positionsWorldCoords:[]}}function v(t){return r(x(t),[],2)}function x(t){const o=new Float64Array(2*t.length);for(let r=0;r<t.length;++r){const n=t[r],e=2*r;o[e]=n[0],o[e+1]=n[1]}return o}export{j as computeEuclideanPlanarArea,k as createEuclideanPlanarAreaCache,h as euclideanHorizontalPlanarArea,g as euclideanPlanarArea,v as triangulate};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{createLength as n}from"../../core/quantity.js";import{verticalLengthUnitFromSpatialReference as t,lengthUnitFromSpatialReference as e}from"../../core/units.js";import{
|
|
5
|
+
import{createLength as n}from"../../core/quantity.js";import{verticalLengthUnitFromSpatialReference as t,lengthUnitFromSpatialReference as e}from"../../core/units.js";import{B as r,h as l}from"../../chunks/vec32.js";import{create as u}from"../../core/libs/gl-matrix-2/factories/vec3f64.js";import{projectVectorToVector as i}from"../../geometry/projection/projectVectorToVector.js";import{equals as o}from"../../geometry/support/spatialReferenceUtils.js";import{computeEuclideanMeasurementSR as c}from"./measurementUtils.js";function s(n){return f(n,0)}function a(n){return f(n,1)}function f(t,r){const{hasZ:l,spatialReference:u}=t,i=c(u);let o=0;const s=e(i);if(null==s)return null;const a=0===r?Z:j;for(const n of t.paths){if(n.length<2)continue;const t=n.length-1;for(let e=0;e<t;++e){const t=n[e];b[0]=t[0],b[1]=t[1],b[2]=l?t[2]:0;const r=n[e+1];S[0]=r[0],S[1]=r[1],S[2]=l?r[2]:0;const i=a(b,S,u);if(null==i)return null;o+=i.value}}return n(o,s)}function p(n,t){const{spatialReference:e}=n;return o(e,t.spatialReference)?(b[0]=n.x,b[1]=n.y,b[2]=n.hasZ?n.z:0,S[0]=t.x,S[1]=t.y,S[2]=t.hasZ?t.z:0,x(b,S,e)):null}function h(n,t){const{spatialReference:e}=n;return o(e,t.spatialReference)?(b[0]=n.x,b[1]=n.y,b[2]=n.hasZ?n.z:0,S[0]=t.x,S[1]=t.y,S[2]=t.hasZ?t.z:0,Z(b,S,e)):null}function m(n,t){const{spatialReference:e}=n;return o(e,t.spatialReference)?(b[0]=n.x,b[1]=n.y,b[2]=n.hasZ?n.z:0,S[0]=t.x,S[1]=t.y,S[2]=t.hasZ?t.z:0,j(b,S,e)):null}function z(n,t){const{spatialReference:e}=n;return o(e,t.spatialReference)?(b[0]=n.x,b[1]=n.y,b[2]=n.hasZ?n.z:0,S[0]=t.x,S[1]=t.y,S[2]=t.hasZ?t.z:0,d(b,S,e)):null}function y(n){return null!=n?R(n.hasZ?n.z:0,n.spatialReference):null}function R(e,r){const l=t(r);return null!=l?n(e??0,l):null}function x(t,e,r){const l=g(t,e,r);return null!=l?{direct:n(l.direct,l.unit),horizontal:n(l.horizontal,l.unit),vertical:n(l.vertical,l.unit)}:null}function Z(t,e,r){const l=g(t,e,r,0);return null!=l?n(l.direct,l.unit):null}function j(t,e,r){const l=g(t,e,r,1);return null!=l?n(l.horizontal,l.unit):null}function v(t,e,r){const l=g(t,e,r,2);return null!=l?n(Math.abs(l.verticalSigned),l.unit):null}function d(t,e,r){const l=g(t,e,r,2);return null!=l?n(l.verticalSigned,l.unit):null}function g(n,t,u,o){const s=c(u),a=e(s);if(null==a)return null;const f=t[2]-n[2];if(2===o)return{verticalSigned:f,unit:a};if(!i(n,u,M,s)||!i(t,u,U,s))return null;if(0===o){return{direct:r(U,M),unit:a}}if(l(V,n[0],n[1],t[2]),!i(V,u,V,s))return null;const p=r(V,U);if(1===o)return{horizontal:p,unit:a};return{direct:r(U,M),horizontal:p,vertical:Math.abs(f),unit:a}}const b=u(),S=u(),M=u(),U=u(),V=u();export{y as elevationFromPoint,R as elevationFromZ,Z as euclideanDirectDistance,h as euclideanDirectDistanceBetweenPoints,x as euclideanDistance,p as euclideanDistanceBetweenPoints,j as euclideanHorizontalDistance,m as euclideanHorizontalDistanceBetweenPoints,a as euclideanHorizontalLength,s as euclideanLength,v as verticalDistance,d as verticalSignedDistance,z as verticalSignedDistanceBetweenPoints};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{floatEqualAbsolute as t}from"../../core/mathUtils.js";import{subtract as n,length as r,scaleAndAdd as s,sub as e,dot as o,squaredLength as c,lerp as i,set as u,distance as a,squaredDistance as f}from"../../core/libs/gl-matrix-2/math/vec2.js";import{create as p,fromValues as m,ZEROS as h}from"../../core/libs/gl-matrix-2/factories/vec2f64.js";import{a as d,g as l,c as y,h as b,f as j,
|
|
5
|
+
import{floatEqualAbsolute as t}from"../../core/mathUtils.js";import{subtract as n,length as r,scaleAndAdd as s,sub as e,dot as o,squaredLength as c,lerp as i,set as u,distance as a,squaredDistance as f}from"../../core/libs/gl-matrix-2/math/vec2.js";import{create as p,fromValues as m,ZEROS as h}from"../../core/libs/gl-matrix-2/factories/vec2f64.js";import{a as d,g as l,c as y,h as b,f as j,H as M,e as g,d as x,B as q,u as v}from"../../chunks/vec32.js";import{create as U,clone as k}from"../../core/libs/gl-matrix-2/factories/vec3f64.js";import{getEpsilon as L}from"../../core/libs/gl-matrix-2/math/common.js";import{fromPositionAndNormal as w,create as A,distance as B,intersectLine as C,isPointInside as H}from"../../geometry/support/plane.js";import{tangentFrame as P}from"../3d/support/mathUtils.js";import{intersectLineLikeAndCircle as z}from"./geometry2dUtils.js";function D({start:t,end:r,type:e},i,u){const a=[],f=n(rt,r,t),m=n(st,t,i),h=c(f),d=2*o(f,m),l=d*d-4*h*(c(m)-u*u);if(0===l){const n=-d/(2*h);(0===e||n>=0)&&a.push(s(p(),t,f,n))}else if(l>0){const n=Math.sqrt(l),r=(-d+n)/(2*h);(0===e||r>=0)&&a.push(s(p(),t,f,r));const o=(-d-n)/(2*h);(0===e||o>=0)&&a.push(s(p(),t,f,o))}return a}function E(t,r){const s=t.start,c=t.end,i=n(rt,c,s),u=b(ot,-i[1],i[0],0),a=r.start,f=r.end,p=d(ct,f,a),m=l(p,u),h=b(it,s[0],s[1],0),j=d(ut,h,a),M=l(j,u),g=L();if(Math.abs(m)<g)return Math.abs(M),[];const x=y(at,a,p,M/m);if(0===r.type){const t=d(ft,x,a);if(l(t,p)<-g)return[]}if(1===t.type){const t=e(st,x,s);if(o(t,i)<-g)return[]}return[k(x)]}function F(t,n){return V(Y(mt,n[2],t),n)}function G(t,n){const r=0;return T(Y(mt,r,t),Y(ht,r,n)).map(([t,n])=>m(t,n))}function I(t,n,r){return O(t,Y(mt,t[2],n),r)}function J(t,n){return Q(Y(mt,t[2],n),t)}function K(t,e,o,c=U()){const i=n(rt,t,e),u=r(i);return s(c,e,i,0===u?1:o/u),c[2]=t[2],c}function N(t,n,r){return a(t,n)-r}function O(t,{start:n,end:r,type:s},e=U()){const o=d(et,t,n),c=d(ot,r,n),i=l(o,c)/l(c,c);return y(e,n,c,0===s?Math.max(i,0):i)}function Q({start:t,end:n,type:r},s){const e=d(et,s,t),o=d(ot,n,t);if(0===r&&l(o,e)<-L())return q(t,s);const c=j(ct,o,e);return v(c)/v(o)}const R=(()=>{const t=U(),n=U(),r=U();return({start:s,end:e},{center:o,radius:c,normal:i,slicePlane:a})=>{const f=w(o,i,pt);if($(B(f,s),0)&&$(B(f,e),0)){P(i,t,n);const f=(s,e)=>(g(r,e,o),u(s,l(r,t),l(r,n)),s),p=z({start:f(rt,s),end:f(st,e),type:1},h,c),m=[];for(const[r,s]of p){const e=x(U(),o);y(e,e,t,r),y(e,e,n,s),a&&!tt(a,e)||m.push(e)}return m}const p=U();return C(f,s,e,p)?!$(q(p,o),c)||a&&!tt(a,p)?[]:[p]:[]}})();function S({start:t,end:r,type:s},e,i){const u=[],a=g(et,r,t),f=n(st,t,e),p=c(a),m=2*o(a,f),h=m*m-4*p*(c(f)-i*i);if(0===h){const n=-m/(2*p);(1===s||n>=0)&&u.push(y(U(),t,a,n))}else if(h>0){const n=Math.sqrt(h),r=(-m+n)/(2*p);(1===s||r>=0)&&u.push(y(U(),t,a,r));const e=(-m-n)/(2*p);(1===s||e>=0)&&u.push(y(U(),t,a,e))}return u}function T(t,n){const r=t.start,s=t.end,e=n.start,o=n.end,c=d(et,s,r),i=d(ot,o,e),u=d(ct,e,r),a=j(it,c,i);if(!$(l(u,a),0))return[];const f=M(a);if($(f,0))return[];const p=j(ut,u,i),m=l(p,a)/f,h=y(at,r,c,m);if(0===t.type){const t=d(ft,h,r);if(l(c,t)<-L())return[]}if(0===n.type){const t=d(ft,h,e);if(l(i,t)<-L())return[]}return[k(h)]}function V({start:t,end:n,type:r},s){const e=d(et,s,t),o=d(ot,n,t),c=j(ct,o,e),i=M(c)/M(o),u=L();if(i<u)switch(r){case 1:return[k(s)];case 0:return l(o,e)<-u?[]:[k(s)]}return[]}function W(t,n,r){return $(f(r,t),n*n)?[k(r)]:[]}function X(t,n,r,s){const[e,o]=t,[c,u]=r,a=c-e,f=u-o,p=a*a+f*f,h=Math.sqrt(p);if(h>n+s)return[];if(h<Math.abs(n-s))return[];if($(h,0)&&$(n,s))return[];const d=(n*n-s*s+p)/(2*h),l=Math.sqrt(n*n-d*d),y=l*f/h,b=l*a/h,[j,M]=i(rt,t,r,d/h);return $(y,b)?[m(j,M)]:[m(j+y,M-b),m(j-y,M+b)]}function Y(t,n,{start:r,end:s,type:e}){return b(t.start,r[0],r[1],n),b(t.end,s[0],s[1],n),t.type=nt[e],t}function Z(t,n){return $(t[2],n[2])}function $(n,r){return t(Math.abs(n-r),0,L())}function _(t,n){return n.filter(n=>tt(t,n))}function tt(t,n){return H(t,n)}const nt={0:1,1:0},rt=p(),st=p(),et=U(),ot=U(),ct=U(),it=U(),ut=U(),at=U(),ft=U(),pt=A(),mt={start:U(),end:U(),type:1},ht={start:U(),end:U(),type:1};export{V as intersectLineAndPoint,R as intersectLineLikeAndCircle,S as intersectLineLikeAndVerticalCylinder,T as intersectLineLikes,W as intersectVerticalCylinderAndPoint,X as intersectVerticalCylinders,E as intersectVerticalPlaneAndLineLike,F as intersectVerticalPlaneAndPoint,D as intersectVerticalPlaneAndVerticalCylinder,G as intersectVerticalPlanes,$ as isClose,tt as isPointInsidePlane,Q as pointToLineLikeDistance,N as pointToVerticalCylinderDistance,J as pointToVerticalPlaneDistance,_ as pointsInsidePlane,O as projectPointToLineLike,K as projectPointToVerticalCylinder,I as projectPointToVerticalPlane,Z as vectorsHaveCloseZ};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as e}from"tslib";import{JSONSupport as t}from"../../core/JSONSupport.js";import{clone as i}from"../../core/lang.js";import{property as
|
|
5
|
+
import{__decorate as e}from"tslib";import{JSONSupport as t}from"../../core/JSONSupport.js";import{clone as i}from"../../core/lang.js";import{property as r,subclass as o}from"../../core/accessorSupport/decorators.js";var s;let l=s=class extends t{constructor(e){super(e),this.enabled=!1,this.longNames=!1,this.minimized=!1,this.pinnedLevels=!1,this.site=null,this.facility=null,this.level=null,this.selectedVerticalOrder=null,this.useVerticalOrder=!1}clone(){return new s(i({enabled:this.enabled,longNames:this.longNames,minimized:this.minimized,pinnedLevels:this.pinnedLevels,site:this.site,facility:this.facility,level:this.level,useVerticalOrder:this.useVerticalOrder,selectedVerticalOrder:this.selectedVerticalOrder}))}};e([r({type:Boolean,json:{read:{source:"enabled"},write:{target:"enabled"}}})],l.prototype,"enabled",void 0),e([r({type:Boolean,json:{read:{source:"longNames"},write:{target:"longNames"}}})],l.prototype,"longNames",void 0),e([r({type:Boolean,json:{read:{source:"minimized"},write:{target:"minimized"}}})],l.prototype,"minimized",void 0),e([r({type:Boolean,json:{read:{source:"pinnedLevels"},write:{target:"pinnedLevels"}}})],l.prototype,"pinnedLevels",void 0),e([r({type:String,json:{read:{source:"site"},write:{target:"site"}}})],l.prototype,"site",void 0),e([r({type:String,json:{read:{source:"facility"},write:{target:"facility"}}})],l.prototype,"facility",void 0),e([r({type:String,json:{read:{source:"level"},write:{target:"level"}}})],l.prototype,"level",void 0),e([r({type:Number})],l.prototype,"selectedVerticalOrder",void 0),e([r({type:Boolean})],l.prototype,"useVerticalOrder",void 0),l=s=e([o("esri.webdoc.widgets.FloorFilter")],l);const n=l;export{n 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/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as e}from"tslib";import t from"../core/Collection.js";import{IdentifiableMixin as i}from"../core/Identifiable.js";import s from"../core/ReactiveMap.js";import{on as o,watch as l,initial as r,syncAndInitial as n}from"../core/reactiveUtils.js";import{property as a,subclass as d}from"../core/accessorSupport/decorators.js";import c from"./Widget.js";import p from"./BasemapLayerList/BasemapLayerListViewModel.js";import m from"./BasemapLayerList/BasemapLayerListVisibleElements.js";import{css as h}from"./BasemapLayerList/css.js";import u from"./LayerList/LayerListItem.js";import f from"./LayerList/ListItem.js";import{minFilterItems as y,getItem as g,getLayerType as _,removeDestroyedListItems as b,setFilterPredicate as L,sortLayersToIds as v,sortChildLayersToIds as I}from"./LayerList/support/layerListUtils.js";import{loadCalciteComponents as w}from"./support/componentsUtils.js";import{globalCss as F}from"./support/globalCss.js";import{incrementHeadingLevel as E}from"./support/Heading.js";import{calciteListFilterProps as C}from"./support/listUtils.js";import{tsx as T,messageBundle as M,vmEvent as P}from"./support/widget.js";import{setFocus as O}from"./support/widgetUtils.js";const A=t.ofType(f),R="nested",B=".*\\S+.*",k="data-basemap-layer-type";let D=class extends(i(c)){constructor(e,i){super(e,i),this._baseListEl=null,this._referenceListEl=null,this._activeItem=null,this._tooltipReferenceMap=new Map,this._editTitleInput=null,this._focusRootFlowItem=!1,this._focusPanelFlowItem=!1,this._focusLayerFlowItem=null,this._focusEditingFlowItem=!1,this._layerListMap=new s,this._lastDragDetail=null,this._selectedDragItemLayerUid=null,this._rootGroupUid=`basemap-${this.uid}`,this._openedLayersController=null,this.catalogLayerList=null,this.catalogOptions=null,this.collapsed=!1,this.dragEnabled=!1,this.editingTitle=!1,this.filterPlaceholder="",this.baseFilterPredicate=null,this.baseFilterText="",this.referenceFilterPredicate=null,this.referenceFilterText="",this.listItemCanGiveFunction=null,this.listItemCanReceiveFunction=null,this.headingLevel=2,this.knowledgeGraphOptions=null,this.layerTablesEnabled=new t(["knowledge-graph"]),this.mapImageOptions=null,this.messages=null,this.messagesCommon=null,this.minFilterItems=y,this.openedLayers=new t,this.openedLayerLists=new t,this.tableList=null,this.selectedItems=new A,this.selectionMode="none",this.tileOptions=null,this.viewModel=new p,this.visibilityAppearance="default",this.visibleElements=new m,this._canMove=({dragEl:e,fromEl:t,toEl:i},s)=>{const o="pull"===s?this.listItemCanGiveFunction:this.listItemCanReceiveFunction,l=g(e);if(!l?.sortable)return!1;const r=g(t),n=_(t),a=g(i),d=_(i),c=!!n&&!!d&&n===d,p={selected:l,from:r,to:a},m=t.group,h=i.group,u=r?.layer?.type??"",f=a?.layer?.type??"",y=new Set(["map-image","catalog","knowledge-graph"]),b="sublayer";return m&&h&&"function"==typeof o?o.call(null,p):c&&!y.has(u)&&!y.has(f)&&l?.layer?.type!==b},this._onSelectedDragItemLayerUidChange=e=>{this._selectedDragItemLayerUid=e},this._onTriggerAction=(e,t)=>{this.triggerAction(e,t)},this._onTooltipReferenceChange=(e,t)=>{t?this._tooltipReferenceMap.set(e,t):this._tooltipReferenceMap.delete(e)},this._onTablesOpen=e=>{this.openedLayers.push(e.layer),this._focusLayerFlowItem=e.layer?.uid},this._onPanelOpen=()=>{this._focusPanelFlowItem=!0},this._onCatalogOpen=e=>{this.openedLayers.push(e.layer?.parent),this._focusLayerFlowItem=e.layer?.uid},this._clearActiveItem=()=>{this._activeItem=null},this._setActiveItem=e=>{if("default"!==this.visibilityAppearance)return;const t=Array.from(e.composedPath()).find(e=>e.classList?.contains(h.item));this._activeItem=g(t)},this._onCalciteListOrderChange=e=>{const{_lastDragDetail:t}=this,{toEl:i,fromEl:s,dragEl:o,newIndex:l}=e;if(!s||!i||t?.newIndex===l&&t?.dragEl===o&&t?.toEl===i&&t?.fromEl===s)return;this._lastDragDetail=e,this._selectedDragItemLayerUid=o.value;const r=s,n=i;if(r===n){const e=Array.from(s.children).filter(e=>e?.matches("calcite-list-item")).map(e=>e.value);return void this._sortLayers(r,e)}this._moveLayerFromChildList({toEl:n,fromEl:r,dragEl:o,newIndex:l})}}initialize(){this.addHandles([o(()=>this.openedLayers,"change",()=>this._handleOpenedLayersChange(),r),l(()=>[this.viewModel.referenceItems.toArray(),this.viewModel.baseItems.toArray()],()=>b(this.selectedItems),n),l(()=>[this.baseFilterPredicate,this._baseListEl],()=>L(this._baseListEl,this.baseFilterPredicate)),l(()=>[this.referenceFilterPredicate,this._referenceListEl],()=>L(this._referenceListEl,this.referenceFilterPredicate))])}loadDependencies(){return w({action:()=>import("@esri/calcite-components/dist/components/calcite-action"),block:()=>import("@esri/calcite-components/dist/components/calcite-block"),label:()=>import("@esri/calcite-components/dist/components/calcite-label"),input:()=>import("@esri/calcite-components/dist/components/calcite-input"),button:()=>import("@esri/calcite-components/dist/components/calcite-button"),flow:()=>import("@esri/calcite-components/dist/components/calcite-flow"),"flow-item":()=>import("@esri/calcite-components/dist/components/calcite-flow-item"),list:()=>import("@esri/calcite-components/dist/components/calcite-list"),notice:()=>import("@esri/calcite-components/dist/components/calcite-notice"),tooltip:()=>import("@esri/calcite-components/dist/components/calcite-tooltip")})}destroy(){this._tooltipReferenceMap.clear(),this._destroyOpenedLayerLists()}get _visibleBaseItems(){return this.baseItems?.filter(e=>!e.hidden&&(this.visibleElements.errors||!e.error))}get _visibleReferenceItems(){return this.referenceItems?.filter(e=>!e.hidden&&(this.visibleElements.errors||!e.error))}get _openedPanelItems(){return this._visibleReferenceItems.concat(this._visibleBaseItems).flatten(e=>e.children).filter(({hidden:e,panel:t})=>!e&&t?.open&&!t.disabled&&t.flowEnabled)}get _totalBaseItems(){return this.viewModel.baseItems.flatten(e=>e.children.filter(e=>"catalog-dynamic-group"!==e.layer?.type)).length}get _totalReferenceItems(){return this.viewModel.referenceItems.flatten(e=>e.children.filter(e=>"catalog-dynamic-group"!==e.layer?.type)).length}get _baseFilterEnabled(){return this._totalBaseItems>=this.minFilterItems&&this.visibleElements.filter}get _referenceFilterEnabled(){return this._totalReferenceItems>=this.minFilterItems&&this.visibleElements.filter}get _renderedOpenLayerFlowItems(){const{openedLayers:e}=this;return e.toArray().map((t,i)=>this._renderLayerFlowItem(t,i===e.length-1))}get basemapTitle(){return this.viewModel.basemapTitle}set basemapTitle(e){this.viewModel.basemapTitle=e}get baseListItemCreatedFunction(){return this.viewModel.baseListItemCreatedFunction}set baseListItemCreatedFunction(e){this.viewModel.baseListItemCreatedFunction=e}get icon(){return"layers"}set icon(e){this._overrideIfSome("icon",e)}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get referenceListItemCreatedFunction(){return this.viewModel.referenceListItemCreatedFunction}set referenceListItemCreatedFunction(e){this.viewModel.referenceListItemCreatedFunction=e}get baseItems(){return this.viewModel.baseItems}get referenceItems(){return this.viewModel.referenceItems}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}triggerAction(e,t){return this.viewModel.triggerAction(e,t)}render(){const{state:e}=this.viewModel,t={[F.hidden]:"loading"===e,[F.disabled]:"disabled"===e};return T("div",{class:this.classes(h.base,F.widget,F.panel,t)},this._renderItems())}async _createCatalogLayerList(e){const{default:t}=await import("./CatalogLayerList.js"),{headingLevel:i,catalogOptions:s,view:o,filterPlaceholder:l,minFilterItems:r,selectionMode:n,visibilityAppearance:a,_onCatalogOpen:d,_onTablesOpen:c,layerTablesEnabled:p}=this;return new t({headingLevel:i,view:o,filterPlaceholder:l,minFilterItems:r,selectionMode:n,visibilityAppearance:a,...s,catalogLayer:e,layerTablesEnabled:p,onCatalogOpen:d,onTablesOpen:c})}_getTableListParams(e){switch(e.type){case"knowledge-graph":return{...this.knowledgeGraphOptions,tables:e.tables};case"map-image":return{...this.mapImageOptions,tables:e.subtables};case"tile":return{...this.tileOptions,tables:e.subtables};default:return null}}async _createTableList(e){const{default:t}=await import("./TableList.js"),{headingLevel:i,selectionMode:s,dragEnabled:o}=this;return new t({headingLevel:i,selectionMode:s,dragEnabled:o,...this._getTableListParams(e)})}async _createFlowList(e,t){const{_layerListMap:i}=this,s=i.get(e);if(s)return s;const o="catalog"===e.type?await this._createCatalogLayerList(e):await this._createTableList(e);return t.aborted||i.set(e,o),o}async _handleOpenedLayersChange(){const{_layerListMap:e,openedLayers:t,openedLayerLists:i}=this;this._openedLayersController?.abort();const s=new AbortController,{signal:o}=s;this._openedLayersController=s,e.forEach((i,s)=>{t.includes(s)||(i.destroy(),e.delete(s))});const l=await Promise.all(t.map(e=>this._createFlowList(e,o)));if(o.aborted)return;i.removeAll(),i.addMany(l);const r=i.at(-1);r?"catalogLayer"in r?(this._set("catalogLayerList",r),this._set("tableList",null)):(this._set("catalogLayerList",null),this._set("tableList",r)):(this._set("catalogLayerList",null),this._set("tableList",null))}_destroyOpenedLayerLists(){this.openedLayerLists.destroyAll(),this.openedLayers.removeAll(),this._layerListMap.clear()}_renderItemTooltip(e){return e?T("calcite-tooltip",{key:`tooltip-${e.layer?.uid}`,overlayPositioning:"fixed",referenceElement:this._tooltipReferenceMap.get(e.layer?.uid)},this.messages.layerIncompatibleTooltip):null}_renderItemTooltipNodes(e){return e.incompatible?this._renderItemTooltip(e):e.children?.filter(e=>!e.hidden).toArray().map(e=>this._renderItemTooltipNodes(e))}_renderItemTooltips(){return this._visibleReferenceItems.concat(this._visibleBaseItems)?.toArray().map(e=>this._renderItemTooltipNodes(e))}_focusLayerFlowItemNode(e){this._focusLayerFlowItem===e.dataset.layerUid&&(this._focusLayerFlowItem=null,O(e))}_renderPanelFlowItems(){const{_openedPanelItems:e,openedLayers:t}=this;return e.toArray().map(({title:i,panel:s},o)=>{const l=()=>this._handlePanelFlowItemBack(s);return T("calcite-flow-item",{afterCreate:this._focusPanelFlowItemNode,afterUpdate:this._focusPanelFlowItemNode,bind:this,description:i,heading:s.title,headingLevel:this.headingLevel,key:`flow-panel-${s.uid}`,selected:!t.length&&o===e.length-1,onCalciteFlowItemBack:e=>{e.preventDefault(),l()}},s.render(),T("calcite-button",{appearance:"transparent",onclick:l,slot:"footer-actions",width:"full"},this.messagesCommon.back))})}_handlePanelFlowItemBack(e){e.open=!1,this._focusRootFlowItem=!0}_focusEditingFlowItemNode(e){this._focusEditingFlowItem&&(this._focusEditingFlowItem=!1,O(e))}_focusRootFlowItemNode(e){this._focusRootFlowItem&&(this._focusRootFlowItem=!1,O(e))}_focusPanelFlowItemNode(e){this._focusPanelFlowItem&&(this._focusPanelFlowItem=!1,O(e))}_renderItem(e,t,i,s){return T(u,{activeItem:this._activeItem,canMove:this._canMove,css:h,displayMode:R,dragDisabled:t,dragEnabled:this.dragEnabled,item:e,key:`layerListItem-${e.layer?.uid}`,layerTablesEnabled:this.layerTablesEnabled,listModeDisabled:this.viewModel.listModeDisabled,messages:this.messages,messagesCommon:this.messagesCommon,parent:i,parentTitles:s,rootGroupUid:this._rootGroupUid,selectedDragItemLayerUid:this._selectedDragItemLayerUid,selectedItems:this.selectedItems,selectionMode:this.selectionMode,visibilityAppearance:this.visibilityAppearance,visibleElements:this.visibleElements,onAction:this._onTriggerAction,onCatalogOpen:this._onCatalogOpen,onPanelOpen:this._onPanelOpen,onSelectedDragItemLayerUidChange:this._onSelectedDragItemLayerUidChange,onTablesOpen:this._onTablesOpen,onTooltipReferenceChange:this._onTooltipReferenceChange})}_moveLayerFromChildList({toEl:e,fromEl:t,dragEl:i,newIndex:s}){const o=g(i),l=g(e),r=g(t),n=x(t),a=x(e);n&&a&&this.viewModel.moveListItem({targetItem:o,fromParentItem:r,toParentItem:l,newIndex:s,from:n,to:a})}_handleCalciteListDragEnd(e){const{fromEl:t,dragEl:i,oldIndex:s}=e;t.insertBefore(i,t.children[s])}_sortLayers(e,t){if(e)if(e===this._referenceListEl||e===this._baseListEl){const i=e===this._referenceListEl?"reference":"base",s="base"===i?this.view?.map?.basemap?.baseLayers:"reference"===i?this.view?.map?.basemap?.referenceLayers:null;v(s,t)}else{const i=g(e);if(!i)return;I(i,t)}}_handleCalciteListChange(e){const{selectionMode:t,selectedItems:i}=this;if("none"===t)return;const s=e.target.selectedItems.map(e=>g(e)).filter(Boolean);i.removeAll(),i.addMany(s)}_renderEditingInput(){const{messages:e}=this,{basemapTitle:t}=this.viewModel;return T("div",{class:h.editing},T("calcite-label",null,e.basemapTitle,T("calcite-input",{afterCreate:e=>this._editTitleInput=e,label:e.basemapTitle,name:"basemaptitle",pattern:B,placeholder:e.basemapTitle,required:!0,title:e.basemapTitle,type:"text",value:t??void 0})))}_renderCancelButton(){const{messagesCommon:{cancel:e}}=this;return T("calcite-button",{appearance:"outline",bind:this,label:e,onclick:this._toggleEditingTitle,slot:"footer",title:e,width:"full"},e)}_renderSubmitButton(){const{messagesCommon:e}=this;return T("calcite-button",{label:e.form.submit,slot:"footer",title:e.form.submit,type:"submit",width:"full"},e.form.ok)}_renderEditingForm(){return this.editingTitle?T("form",{bind:this,class:h.editingForm,onsubmit:this._formSubmit},T("calcite-flow-item",{afterCreate:this._focusEditingFlowItemNode,afterUpdate:this._focusEditingFlowItemNode,bind:this,heading:this.visibleElements.heading?this.messages.basemapTitle:void 0,headingLevel:this.headingLevel,selected:0===this.openedLayers.length&&0===this._openedPanelItems.length,onCalciteFlowItemBack:e=>{e.preventDefault(),this._toggleEditingTitle()}},this._renderEditingInput(),this._renderCancelButton(),this._renderSubmitButton())):null}_renderEditTitleButton(){const{editingTitle:e,visibleElements:t,messagesCommon:i}=this,s=i.edit;return t.editTitleButton&&!e?T("calcite-action",{bind:this,icon:"pencil",onclick:this._toggleEditingTitle,slot:"header-actions-end",text:s,title:s}):null}_renderNoLayersInfoMessage(e){return T("div",{slot:"message"},e)}_renderNoLayersInfo(e,t){return T("div",{class:h.itemMessage},T("calcite-notice",{icon:"information",key:t,kind:"info",open:!0,width:"full"},this._renderNoLayersInfoMessage(e)))}_renderItems(){const{collapsed:e,visible:t,visibleElements:{closeButton:i,collapseButton:s,heading:o,flow:l},messages:r,viewModel:n}=this,a=[T("calcite-flow-item",{afterCreate:this._focusRootFlowItemNode,afterUpdate:this._focusRootFlowItemNode,bind:this,closable:i,closed:!t,collapsed:e,collapsible:s,heading:o?n.basemapTitle??r.widgetLabel:void 0,headingLevel:this.headingLevel,key:"root-flow-item",selected:!this.editingTitle&&0===this.openedLayers.length&&0===this._openedPanelItems.length,onCalciteFlowItemClose:()=>this.visible=!1},this._renderEditTitleButton(),this._renderReferenceSection(),this._renderBaseSection()),this._renderEditingForm(),this._renderPanelFlowItems(),this._renderedOpenLayerFlowItems];return t?[l?T("calcite-flow",{key:"root-flow"},a):a,this._renderItemTooltips()]:null}_renderLayerFlowItem(e,t){const{messages:i,openedLayers:s}=this,o=e.title||this.messages.untitledLayer;return T("calcite-flow-item",{afterCreate:this._focusLayerFlowItemNode,afterUpdate:this._focusLayerFlowItemNode,bind:this,"data-layer-uid":e.uid,description:o,heading:i["catalog"===e.type?"catalogLayers":"tables"],headingLevel:this.headingLevel,key:`flow-layer-list-${e.uid}`,selected:t,onCalciteFlowItemBack:e=>{e.preventDefault(),s.pop();const t=s.at(-1);t?this._focusLayerFlowItem=t.uid:this._focusRootFlowItem=!0}},this._layerListMap.get(e)?.render())}_renderList(e,t,i){const{messages:s,dragEnabled:o,selectionMode:l,filterPlaceholder:r,baseFilterText:n,referenceFilterText:a,_baseFilterEnabled:d,_referenceFilterEnabled:c,_rootGroupUid:p}=this,m="reference"===t?s.noReferenceLayers:s.noBaseLayers,u="reference"===t?c:d;return T("calcite-block",{class:h.section,collapsible:!0,expanded:!0,heading:"reference"===t?s.referenceHeading:s.baseHeading,headingLevel:E(this.headingLevel),key:`block-${t}`},e?.length?null:this._renderNoLayersInfo(m,t),T("calcite-list",{afterCreate:e=>{"reference"===t?this._referenceListEl=e:this._baseListEl=e,e.addEventListener("focusin",this._setActiveItem),e.addEventListener("focusout",this._clearActiveItem)},afterRemoved:e=>{"reference"===t?this._referenceListEl=null:this._baseListEl=null,e.removeEventListener("focusin",this._setActiveItem),e.removeEventListener("focusout",this._clearActiveItem)},canPull:e=>this._canMove(e,"pull"),canPut:e=>this._canMove(e,"put"),displayMode:R,filterProps:C,[k]:t,"data-layer-type":p,dragEnabled:o,filterEnabled:u,filterPlaceholder:r,filterText:u?"reference"===t?a:n:"",group:p,key:`list-${t}`,label:s.widgetLabel,onmouseleave:this._clearActiveItem,onmouseover:this._setActiveItem,selectionAppearance:"border",selectionMode:l,onCalciteListChange:e=>this._handleCalciteListChange(e),onCalciteListDragEnd:e=>this._handleCalciteListDragEnd(e.detail),onCalciteListFilter:e=>this["reference"===t?"referenceFilterText":"baseFilterText"]=e.currentTarget?.filterText??"",onCalciteListOrderChange:e=>this._onCalciteListOrderChange(e.detail)},e?.toArray().map(e=>this._renderItem(e,i)),u?T("div",{class:h.filterNoResults,slot:"filter-no-results"},T("calcite-notice",{kind:"info",open:!0,width:"full"},this._renderNoLayersInfoMessage(m))):null))}_renderBaseSection(){const{_visibleBaseItems:e}=this;return this.visibleElements.baseLayers?this._renderList(e,"base",1===e?.length):null}_renderReferenceSection(){return this.visibleElements.referenceLayers?this._renderList(this._visibleReferenceItems,"reference",!1):null}_toggleEditingTitle(){const{editingTitle:e}=this,t=!e;this.editingTitle=t,t?this._focusEditingFlowItem=!0:this._focusRootFlowItem=!0}_formSubmit(e){e.preventDefault();const t=this._editTitleInput?.value;t?.trim()&&(this.basemapTitle=t),this._toggleEditingTitle()}};function x(e){return e?.closest(`[${k}]`)?.getAttribute(k)}e([a()],D.prototype,"_baseListEl",void 0),e([a()],D.prototype,"_referenceListEl",void 0),e([a()],D.prototype,"_activeItem",void 0),e([a()],D.prototype,"_tooltipReferenceMap",void 0),e([a()],D.prototype,"_focusRootFlowItem",void 0),e([a()],D.prototype,"_focusPanelFlowItem",void 0),e([a()],D.prototype,"_focusLayerFlowItem",void 0),e([a()],D.prototype,"_focusEditingFlowItem",void 0),e([a()],D.prototype,"_layerListMap",void 0),e([a()],D.prototype,"_visibleBaseItems",null),e([a()],D.prototype,"_visibleReferenceItems",null),e([a()],D.prototype,"_openedPanelItems",null),e([a()],D.prototype,"_totalBaseItems",null),e([a()],D.prototype,"_totalReferenceItems",null),e([a()],D.prototype,"_baseFilterEnabled",null),e([a()],D.prototype,"_referenceFilterEnabled",null),e([a()],D.prototype,"_renderedOpenLayerFlowItems",null),e([a()],D.prototype,"basemapTitle",null),e([a({readOnly:!0})],D.prototype,"catalogLayerList",void 0),e([a()],D.prototype,"catalogOptions",void 0),e([a()],D.prototype,"collapsed",void 0),e([a()],D.prototype,"dragEnabled",void 0),e([a()],D.prototype,"editingTitle",void 0),e([a()],D.prototype,"filterPlaceholder",void 0),e([a()],D.prototype,"baseFilterPredicate",void 0),e([a()],D.prototype,"baseFilterText",void 0),e([a()],D.prototype,"referenceFilterPredicate",void 0),e([a()],D.prototype,"referenceFilterText",void 0),e([a()],D.prototype,"listItemCanGiveFunction",void 0),e([a()],D.prototype,"listItemCanReceiveFunction",void 0),e([a()],D.prototype,"baseListItemCreatedFunction",null),e([a()],D.prototype,"headingLevel",void 0),e([a()],D.prototype,"icon",null),e([a()],D.prototype,"knowledgeGraphOptions",void 0),e([a()],D.prototype,"label",null),e([a()],D.prototype,"layerTablesEnabled",void 0),e([a()],D.prototype,"mapImageOptions",void 0),e([a(),M("esri/widgets/BasemapLayerList/t9n/BasemapLayerList")],D.prototype,"messages",void 0),e([a(),M("esri/t9n/common")],D.prototype,"messagesCommon",void 0),e([a()],D.prototype,"minFilterItems",void 0),e([a({readOnly:!0})],D.prototype,"openedLayers",void 0),e([a({readOnly:!0})],D.prototype,"openedLayerLists",void 0),e([a()],D.prototype,"referenceListItemCreatedFunction",null),e([a({readOnly:!0})],D.prototype,"tableList",void 0),e([a({readOnly:!0})],D.prototype,"baseItems",null),e([a({readOnly:!0})],D.prototype,"referenceItems",null),e([a({type:A})],D.prototype,"selectedItems",void 0),e([a()],D.prototype,"selectionMode",void 0),e([a()],D.prototype,"tileOptions",void 0),e([a()],D.prototype,"view",null),e([P("trigger-action"),a({type:p})],D.prototype,"viewModel",void 0),e([a()],D.prototype,"visibilityAppearance",void 0),e([a({type:m,nonNullable:!0})],D.prototype,"visibleElements",void 0),D=e([d("esri.widgets.BasemapLayerList")],D);const N=D;export{N as default};
|
|
5
|
+
import{__decorate as e}from"tslib";import t from"../core/Collection.js";import{IdentifiableMixin as i}from"../core/Identifiable.js";import s from"../core/ReactiveMap.js";import{on as o,watch as l,initial as r,syncAndInitial as n}from"../core/reactiveUtils.js";import{property as a,subclass as d}from"../core/accessorSupport/decorators.js";import c from"./Widget.js";import p from"./BasemapLayerList/BasemapLayerListViewModel.js";import m from"./BasemapLayerList/BasemapLayerListVisibleElements.js";import{css as h}from"./BasemapLayerList/css.js";import u from"./LayerList/LayerListItem.js";import f from"./LayerList/ListItem.js";import{minFilterItems as y,getItem as g,getLayerType as _,removeDestroyedListItems as b,setFilterPredicate as L,sortLayersToIds as v,sortChildLayersToIds as I}from"./LayerList/support/layerListUtils.js";import{loadCalciteComponents as w}from"./support/componentsUtils.js";import{globalCss as F}from"./support/globalCss.js";import{incrementHeadingLevel as E}from"./support/Heading.js";import{calciteListFilterProps as C}from"./support/listUtils.js";import{tsx as T,messageBundle as M,vmEvent as P}from"./support/widget.js";import{setFocus as O}from"./support/widgetUtils.js";const A=t.ofType(f),R="nested",B=".*\\S+.*",k="data-basemap-layer-type";let D=class extends(i(c)){constructor(e,i){super(e,i),this._baseListEl=null,this._referenceListEl=null,this._activeItem=null,this._tooltipReferenceMap=new Map,this._editTitleInput=null,this._focusRootFlowItem=!1,this._focusPanelFlowItem=!1,this._focusLayerFlowItem=null,this._focusEditingFlowItem=!1,this._layerListMap=new s,this._lastDragDetail=null,this._selectedDragItemLayerUid=null,this._rootGroupUid=`basemap-${this.uid}`,this._openedLayersController=null,this.catalogLayerList=null,this.catalogOptions=null,this.collapsed=!1,this.dragEnabled=!1,this.editingTitle=!1,this.filterPlaceholder="",this.baseFilterPredicate=null,this.baseFilterText="",this.referenceFilterPredicate=null,this.referenceFilterText="",this.listItemCanGiveFunction=null,this.listItemCanReceiveFunction=null,this.headingLevel=2,this.knowledgeGraphOptions=null,this.layerTablesEnabled=new t(["knowledge-graph"]),this.mapImageOptions=null,this.messages=null,this.messagesCommon=null,this.minFilterItems=y,this.openedLayers=new t,this.openedLayerLists=new t,this.tableList=null,this.selectedItems=new A,this.selectionMode="none",this.tileOptions=null,this.viewModel=new p,this.visibilityAppearance="default",this.visibleElements=new m,this._canMove=({dragEl:e,fromEl:t,toEl:i},s)=>{const o="pull"===s?this.listItemCanGiveFunction:this.listItemCanReceiveFunction,l=g(e);if(!l?.sortable)return!1;const r=g(t),n=_(t),a=g(i),d=_(i),c=!!n&&!!d&&n===d,p={selected:l,from:r,to:a},m=t.group,h=i.group,u=r?.layer?.type??"",f=a?.layer?.type??"",y=new Set(["map-image","catalog","knowledge-graph"]),b="sublayer";return m&&h&&"function"==typeof o?o.call(null,p):c&&!y.has(u)&&!y.has(f)&&l?.layer?.type!==b},this._onSelectedDragItemLayerUidChange=e=>{this._selectedDragItemLayerUid=e},this._onTriggerAction=(e,t)=>{this.triggerAction(e,t)},this._onTooltipReferenceChange=(e,t)=>{t?this._tooltipReferenceMap.set(e,t):this._tooltipReferenceMap.delete(e)},this._onTablesOpen=e=>{this.openedLayers.push(e.layer),this._focusLayerFlowItem=e.layer?.uid},this._onPanelOpen=()=>{this._focusPanelFlowItem=!0},this._onCatalogOpen=e=>{this.openedLayers.push(e.layer?.parent),this._focusLayerFlowItem=e.layer?.uid},this._clearActiveItem=()=>{this._activeItem=null},this._setActiveItem=e=>{if("default"!==this.visibilityAppearance)return;const t=Array.from(e.composedPath()).find(e=>e.classList?.contains(h.item));this._activeItem=g(t)},this._onCalciteListOrderChange=e=>{const{_lastDragDetail:t}=this,{toEl:i,fromEl:s,dragEl:o,newIndex:l}=e;if(!s||!i||t?.newIndex===l&&t?.dragEl===o&&t?.toEl===i&&t?.fromEl===s)return;this._lastDragDetail=e,this._selectedDragItemLayerUid=o.value;const r=s,n=i;if(r===n){const e=Array.from(s.children).filter(e=>e?.matches("calcite-list-item")).map(e=>e.value);return void this._sortLayers(r,e)}this._moveLayerFromChildList({toEl:n,fromEl:r,dragEl:o,newIndex:l})}}initialize(){this.addHandles([o(()=>this.openedLayers,"change",()=>this._handleOpenedLayersChange(),r),l(()=>[this.viewModel.referenceItems.toArray(),this.viewModel.baseItems.toArray()],()=>b(this.selectedItems),n),l(()=>[this.baseFilterPredicate,this._baseListEl],()=>L(this._baseListEl,this.baseFilterPredicate)),l(()=>[this.referenceFilterPredicate,this._referenceListEl],()=>L(this._referenceListEl,this.referenceFilterPredicate))])}loadDependencies(){return w({action:()=>import("@esri/calcite-components/dist/components/calcite-action"),block:()=>import("@esri/calcite-components/dist/components/calcite-block"),label:()=>import("@esri/calcite-components/dist/components/calcite-label"),input:()=>import("@esri/calcite-components/dist/components/calcite-input"),button:()=>import("@esri/calcite-components/dist/components/calcite-button"),flow:()=>import("@esri/calcite-components/dist/components/calcite-flow"),"flow-item":()=>import("@esri/calcite-components/dist/components/calcite-flow-item"),list:()=>import("@esri/calcite-components/dist/components/calcite-list"),notice:()=>import("@esri/calcite-components/dist/components/calcite-notice"),tooltip:()=>import("@esri/calcite-components/dist/components/calcite-tooltip")})}destroy(){this._tooltipReferenceMap.clear(),this._destroyOpenedLayerLists()}get _visibleBaseItems(){return this.baseItems?.filter(e=>!e.hidden&&(this.visibleElements.errors||!e.error))}get _visibleReferenceItems(){return this.referenceItems?.filter(e=>!e.hidden&&(this.visibleElements.errors||!e.error))}get _openedPanelItems(){return this._visibleReferenceItems.concat(this._visibleBaseItems).flatten(e=>e.children).filter(({hidden:e,panel:t})=>!e&&t?.open&&!t.disabled&&t.flowEnabled)}get _totalBaseItems(){return this.viewModel.baseItems.flatten(e=>e.children.filter(e=>"catalog-dynamic-group"!==e.layer?.type)).length}get _totalReferenceItems(){return this.viewModel.referenceItems.flatten(e=>e.children.filter(e=>"catalog-dynamic-group"!==e.layer?.type)).length}get _baseFilterEnabled(){return this._totalBaseItems>=this.minFilterItems&&this.visibleElements.filter}get _referenceFilterEnabled(){return this._totalReferenceItems>=this.minFilterItems&&this.visibleElements.filter}get _renderedOpenLayerFlowItems(){const{openedLayers:e}=this;return e.toArray().map((t,i)=>this._renderLayerFlowItem(t,i===e.length-1))}get basemapTitle(){return this.viewModel.basemapTitle}set basemapTitle(e){this.viewModel.basemapTitle=e}get baseListItemCreatedFunction(){return this.viewModel.baseListItemCreatedFunction}set baseListItemCreatedFunction(e){this.viewModel.baseListItemCreatedFunction=e}get icon(){return"layers"}set icon(e){this._overrideIfSome("icon",e)}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get referenceListItemCreatedFunction(){return this.viewModel.referenceListItemCreatedFunction}set referenceListItemCreatedFunction(e){this.viewModel.referenceListItemCreatedFunction=e}get baseItems(){return this.viewModel.baseItems}get referenceItems(){return this.viewModel.referenceItems}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}triggerAction(e,t){return this.viewModel.triggerAction(e,t)}render(){const{state:e}=this.viewModel,t={[F.hidden]:"loading"===e,[F.disabled]:"disabled"===e};return T("div",{class:this.classes(h.base,F.widget,F.panel,t)},this._renderItems())}async _createCatalogLayerList(e){const{default:t}=await import("./CatalogLayerList.js"),{headingLevel:i,catalogOptions:s,view:o,filterPlaceholder:l,minFilterItems:r,selectionMode:n,visibilityAppearance:a,_onCatalogOpen:d,_onTablesOpen:c,layerTablesEnabled:p}=this;return new t({headingLevel:i,view:o,filterPlaceholder:l,minFilterItems:r,selectionMode:n,visibilityAppearance:a,...s,catalogLayer:e,layerTablesEnabled:p,onCatalogOpen:d,onTablesOpen:c})}_getTableListParams(e){switch(e.type){case"knowledge-graph":return{...this.knowledgeGraphOptions,tables:e.tables};case"map-image":return{...this.mapImageOptions,tables:e.subtables};case"tile":return{...this.tileOptions,tables:e.subtables};default:return null}}async _createTableList(e){const{default:t}=await import("./TableList.js"),{headingLevel:i,selectionMode:s,dragEnabled:o}=this;return new t({headingLevel:i,selectionMode:s,dragEnabled:o,...this._getTableListParams(e)})}async _createFlowList(e,t){const{_layerListMap:i}=this,s=i.get(e);if(s)return s;const o="catalog"===e.type?await this._createCatalogLayerList(e):await this._createTableList(e);return t.aborted||i.set(e,o),o}async _handleOpenedLayersChange(){const{_layerListMap:e,openedLayers:t,openedLayerLists:i}=this;this._openedLayersController?.abort();const s=new AbortController,{signal:o}=s;this._openedLayersController=s,e.forEach((i,s)=>{t.includes(s)||(i.destroy(),e.delete(s))});const l=await Promise.all(t.map(e=>this._createFlowList(e,o)));if(o.aborted)return;i.removeAll(),i.addMany(l);const r=i.at(-1);r?"catalogLayer"in r?(this._set("catalogLayerList",r),this._set("tableList",null)):(this._set("catalogLayerList",null),this._set("tableList",r)):(this._set("catalogLayerList",null),this._set("tableList",null))}_destroyOpenedLayerLists(){this.openedLayerLists.destroyAll(),this.openedLayers.removeAll(),this._layerListMap.clear()}_renderItemTooltip(e){return e?T("calcite-tooltip",{key:`tooltip-${e.layer?.uid}`,overlayPositioning:"fixed",referenceElement:this._tooltipReferenceMap.get(e.layer?.uid)},this.messages.layerIncompatibleTooltip):null}_renderItemTooltipNodes(e){return e.incompatible?this._renderItemTooltip(e):e.children?.filter(e=>!e.hidden).toArray().map(e=>this._renderItemTooltipNodes(e))}_renderItemTooltips(){return this._visibleReferenceItems.concat(this._visibleBaseItems)?.toArray().map(e=>this._renderItemTooltipNodes(e))}_focusLayerFlowItemNode(e){this._focusLayerFlowItem===e.dataset.layerUid&&(this._focusLayerFlowItem=null,O(e))}_renderPanelFlowItems(){const{_openedPanelItems:e,openedLayers:t}=this;return e.toArray().map(({title:i,panel:s},o)=>{const l=()=>this._handlePanelFlowItemBack(s);return T("calcite-flow-item",{afterCreate:this._focusPanelFlowItemNode,afterUpdate:this._focusPanelFlowItemNode,bind:this,description:i,heading:s.title,headingLevel:this.headingLevel,key:`flow-panel-${s.uid}`,selected:!t.length&&o===e.length-1,onCalciteFlowItemBack:e=>{e.preventDefault(),l()}},s.render(),T("calcite-button",{appearance:"transparent",onclick:l,slot:"footer-start",width:"full"},this.messagesCommon.back))})}_handlePanelFlowItemBack(e){e.open=!1,this._focusRootFlowItem=!0}_focusEditingFlowItemNode(e){this._focusEditingFlowItem&&(this._focusEditingFlowItem=!1,O(e))}_focusRootFlowItemNode(e){this._focusRootFlowItem&&(this._focusRootFlowItem=!1,O(e))}_focusPanelFlowItemNode(e){this._focusPanelFlowItem&&(this._focusPanelFlowItem=!1,O(e))}_renderItem(e,t,i,s){return T(u,{activeItem:this._activeItem,canMove:this._canMove,css:h,displayMode:R,dragDisabled:t,dragEnabled:this.dragEnabled,item:e,key:`layerListItem-${e.layer?.uid}`,layerTablesEnabled:this.layerTablesEnabled,listModeDisabled:this.viewModel.listModeDisabled,messages:this.messages,messagesCommon:this.messagesCommon,parent:i,parentTitles:s,rootGroupUid:this._rootGroupUid,selectedDragItemLayerUid:this._selectedDragItemLayerUid,selectedItems:this.selectedItems,selectionMode:this.selectionMode,visibilityAppearance:this.visibilityAppearance,visibleElements:this.visibleElements,onAction:this._onTriggerAction,onCatalogOpen:this._onCatalogOpen,onPanelOpen:this._onPanelOpen,onSelectedDragItemLayerUidChange:this._onSelectedDragItemLayerUidChange,onTablesOpen:this._onTablesOpen,onTooltipReferenceChange:this._onTooltipReferenceChange})}_moveLayerFromChildList({toEl:e,fromEl:t,dragEl:i,newIndex:s}){const o=g(i),l=g(e),r=g(t),n=x(t),a=x(e);n&&a&&this.viewModel.moveListItem({targetItem:o,fromParentItem:r,toParentItem:l,newIndex:s,from:n,to:a})}_handleCalciteListDragEnd(e){const{fromEl:t,dragEl:i,oldIndex:s}=e;t.insertBefore(i,t.children[s])}_sortLayers(e,t){if(e)if(e===this._referenceListEl||e===this._baseListEl){const i=e===this._referenceListEl?"reference":"base",s="base"===i?this.view?.map?.basemap?.baseLayers:"reference"===i?this.view?.map?.basemap?.referenceLayers:null;v(s,t)}else{const i=g(e);if(!i)return;I(i,t)}}_handleCalciteListChange(e){const{selectionMode:t,selectedItems:i}=this;if("none"===t)return;const s=e.target.selectedItems.map(e=>g(e)).filter(Boolean);i.removeAll(),i.addMany(s)}_renderEditingInput(){const{messages:e}=this,{basemapTitle:t}=this.viewModel;return T("div",{class:h.editing},T("calcite-label",null,e.basemapTitle,T("calcite-input",{afterCreate:e=>this._editTitleInput=e,label:e.basemapTitle,name:"basemaptitle",pattern:B,placeholder:e.basemapTitle,required:!0,title:e.basemapTitle,type:"text",value:t??void 0})))}_renderCancelButton(){const{messagesCommon:{cancel:e}}=this;return T("calcite-button",{appearance:"outline",bind:this,label:e,onclick:this._toggleEditingTitle,slot:"footer",title:e,width:"full"},e)}_renderSubmitButton(){const{messagesCommon:e}=this;return T("calcite-button",{label:e.form.submit,slot:"footer",title:e.form.submit,type:"submit",width:"full"},e.form.ok)}_renderEditingForm(){return this.editingTitle?T("form",{bind:this,class:h.editingForm,onsubmit:this._formSubmit},T("calcite-flow-item",{afterCreate:this._focusEditingFlowItemNode,afterUpdate:this._focusEditingFlowItemNode,bind:this,heading:this.visibleElements.heading?this.messages.basemapTitle:void 0,headingLevel:this.headingLevel,selected:0===this.openedLayers.length&&0===this._openedPanelItems.length,onCalciteFlowItemBack:e=>{e.preventDefault(),this._toggleEditingTitle()}},this._renderEditingInput(),this._renderCancelButton(),this._renderSubmitButton())):null}_renderEditTitleButton(){const{editingTitle:e,visibleElements:t,messagesCommon:i}=this,s=i.edit;return t.editTitleButton&&!e?T("calcite-action",{bind:this,icon:"pencil",onclick:this._toggleEditingTitle,slot:"header-actions-end",text:s,title:s}):null}_renderNoLayersInfoMessage(e){return T("div",{slot:"message"},e)}_renderNoLayersInfo(e,t){return T("div",{class:h.itemMessage},T("calcite-notice",{icon:"information",key:t,kind:"info",open:!0,width:"full"},this._renderNoLayersInfoMessage(e)))}_renderItems(){const{collapsed:e,visible:t,visibleElements:{closeButton:i,collapseButton:s,heading:o,flow:l},messages:r,viewModel:n}=this,a=[T("calcite-flow-item",{afterCreate:this._focusRootFlowItemNode,afterUpdate:this._focusRootFlowItemNode,bind:this,closable:i,closed:!t,collapsed:e,collapsible:s,heading:o?n.basemapTitle??r.widgetLabel:void 0,headingLevel:this.headingLevel,key:"root-flow-item",selected:!this.editingTitle&&0===this.openedLayers.length&&0===this._openedPanelItems.length,onCalciteFlowItemClose:()=>this.visible=!1},this._renderEditTitleButton(),this._renderReferenceSection(),this._renderBaseSection()),this._renderEditingForm(),this._renderPanelFlowItems(),this._renderedOpenLayerFlowItems];return t?[l?T("calcite-flow",{key:"root-flow"},a):a,this._renderItemTooltips()]:null}_renderLayerFlowItem(e,t){const{messages:i,openedLayers:s}=this,o=e.title||this.messages.untitledLayer;return T("calcite-flow-item",{afterCreate:this._focusLayerFlowItemNode,afterUpdate:this._focusLayerFlowItemNode,bind:this,"data-layer-uid":e.uid,description:o,heading:i["catalog"===e.type?"catalogLayers":"tables"],headingLevel:this.headingLevel,key:`flow-layer-list-${e.uid}`,selected:t,onCalciteFlowItemBack:e=>{e.preventDefault(),s.pop();const t=s.at(-1);t?this._focusLayerFlowItem=t.uid:this._focusRootFlowItem=!0}},this._layerListMap.get(e)?.render())}_renderList(e,t,i){const{messages:s,dragEnabled:o,selectionMode:l,filterPlaceholder:r,baseFilterText:n,referenceFilterText:a,_baseFilterEnabled:d,_referenceFilterEnabled:c,_rootGroupUid:p}=this,m="reference"===t?s.noReferenceLayers:s.noBaseLayers,u="reference"===t?c:d;return T("calcite-block",{class:h.section,collapsible:!0,expanded:!0,heading:"reference"===t?s.referenceHeading:s.baseHeading,headingLevel:E(this.headingLevel),key:`block-${t}`},e?.length?null:this._renderNoLayersInfo(m,t),T("calcite-list",{afterCreate:e=>{"reference"===t?this._referenceListEl=e:this._baseListEl=e,e.addEventListener("focusin",this._setActiveItem),e.addEventListener("focusout",this._clearActiveItem)},afterRemoved:e=>{"reference"===t?this._referenceListEl=null:this._baseListEl=null,e.removeEventListener("focusin",this._setActiveItem),e.removeEventListener("focusout",this._clearActiveItem)},canPull:e=>this._canMove(e,"pull"),canPut:e=>this._canMove(e,"put"),displayMode:R,filterProps:C,[k]:t,"data-layer-type":p,dragEnabled:o,filterEnabled:u,filterPlaceholder:r,filterText:u?"reference"===t?a:n:"",group:p,key:`list-${t}`,label:s.widgetLabel,onmouseleave:this._clearActiveItem,onmouseover:this._setActiveItem,selectionAppearance:"border",selectionMode:l,onCalciteListChange:e=>this._handleCalciteListChange(e),onCalciteListDragEnd:e=>this._handleCalciteListDragEnd(e.detail),onCalciteListFilter:e=>this["reference"===t?"referenceFilterText":"baseFilterText"]=e.currentTarget?.filterText??"",onCalciteListOrderChange:e=>this._onCalciteListOrderChange(e.detail)},e?.toArray().map(e=>this._renderItem(e,i)),u?T("div",{class:h.filterNoResults,slot:"filter-no-results"},T("calcite-notice",{kind:"info",open:!0,width:"full"},this._renderNoLayersInfoMessage(m))):null))}_renderBaseSection(){const{_visibleBaseItems:e}=this;return this.visibleElements.baseLayers?this._renderList(e,"base",1===e?.length):null}_renderReferenceSection(){return this.visibleElements.referenceLayers?this._renderList(this._visibleReferenceItems,"reference",!1):null}_toggleEditingTitle(){const{editingTitle:e}=this,t=!e;this.editingTitle=t,t?this._focusEditingFlowItem=!0:this._focusRootFlowItem=!0}_formSubmit(e){e.preventDefault();const t=this._editTitleInput?.value;t?.trim()&&(this.basemapTitle=t),this._toggleEditingTitle()}};function x(e){return e?.closest(`[${k}]`)?.getAttribute(k)}e([a()],D.prototype,"_baseListEl",void 0),e([a()],D.prototype,"_referenceListEl",void 0),e([a()],D.prototype,"_activeItem",void 0),e([a()],D.prototype,"_tooltipReferenceMap",void 0),e([a()],D.prototype,"_focusRootFlowItem",void 0),e([a()],D.prototype,"_focusPanelFlowItem",void 0),e([a()],D.prototype,"_focusLayerFlowItem",void 0),e([a()],D.prototype,"_focusEditingFlowItem",void 0),e([a()],D.prototype,"_layerListMap",void 0),e([a()],D.prototype,"_visibleBaseItems",null),e([a()],D.prototype,"_visibleReferenceItems",null),e([a()],D.prototype,"_openedPanelItems",null),e([a()],D.prototype,"_totalBaseItems",null),e([a()],D.prototype,"_totalReferenceItems",null),e([a()],D.prototype,"_baseFilterEnabled",null),e([a()],D.prototype,"_referenceFilterEnabled",null),e([a()],D.prototype,"_renderedOpenLayerFlowItems",null),e([a()],D.prototype,"basemapTitle",null),e([a({readOnly:!0})],D.prototype,"catalogLayerList",void 0),e([a()],D.prototype,"catalogOptions",void 0),e([a()],D.prototype,"collapsed",void 0),e([a()],D.prototype,"dragEnabled",void 0),e([a()],D.prototype,"editingTitle",void 0),e([a()],D.prototype,"filterPlaceholder",void 0),e([a()],D.prototype,"baseFilterPredicate",void 0),e([a()],D.prototype,"baseFilterText",void 0),e([a()],D.prototype,"referenceFilterPredicate",void 0),e([a()],D.prototype,"referenceFilterText",void 0),e([a()],D.prototype,"listItemCanGiveFunction",void 0),e([a()],D.prototype,"listItemCanReceiveFunction",void 0),e([a()],D.prototype,"baseListItemCreatedFunction",null),e([a()],D.prototype,"headingLevel",void 0),e([a()],D.prototype,"icon",null),e([a()],D.prototype,"knowledgeGraphOptions",void 0),e([a()],D.prototype,"label",null),e([a()],D.prototype,"layerTablesEnabled",void 0),e([a()],D.prototype,"mapImageOptions",void 0),e([a(),M("esri/widgets/BasemapLayerList/t9n/BasemapLayerList")],D.prototype,"messages",void 0),e([a(),M("esri/t9n/common")],D.prototype,"messagesCommon",void 0),e([a()],D.prototype,"minFilterItems",void 0),e([a({readOnly:!0})],D.prototype,"openedLayers",void 0),e([a({readOnly:!0})],D.prototype,"openedLayerLists",void 0),e([a()],D.prototype,"referenceListItemCreatedFunction",null),e([a({readOnly:!0})],D.prototype,"tableList",void 0),e([a({readOnly:!0})],D.prototype,"baseItems",null),e([a({readOnly:!0})],D.prototype,"referenceItems",null),e([a({type:A})],D.prototype,"selectedItems",void 0),e([a()],D.prototype,"selectionMode",void 0),e([a()],D.prototype,"tileOptions",void 0),e([a()],D.prototype,"view",null),e([P("trigger-action"),a({type:p})],D.prototype,"viewModel",void 0),e([a()],D.prototype,"visibilityAppearance",void 0),e([a({type:m,nonNullable:!0})],D.prototype,"visibleElements",void 0),D=e([d("esri.widgets.BasemapLayerList")],D);const N=D;export{N 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/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as e}from"tslib";import{substitute as t}from"../intl.js";import"../core/has.js";import{getOrCreateMapValue as i}from"../core/MapUtils.js";import{watch as n,on as o}from"../core/reactiveUtils.js";import{property as a,subclass as s}from"../core/accessorSupport/decorators.js";import{isIntegerField as r}from"../layers/support/fieldUtils.js";import{isString as l}from"../support/guards.js";import d from"./Widget.js";import{getHiddenFieldsValidationErrorMessage as p,getVisibleFieldInputValidationErrorMessage as u,isElementTemplateWithInputType as m}from"./BatchAttributeForm/batchAttributeFormUtils.js";import c from"./BatchAttributeForm/BatchAttributeFormViewModel.js";import{css as h}from"./BatchAttributeForm/css.js";import{VisibleElements as v}from"./BatchAttributeForm/VisibleElements.js";import{isGroupInput as b,isFieldInput as f,isTextElementInput as C,differentValuesString as g}from"./BatchAttributeForm/inputs/support/inputUtils.js";import{loadCalciteComponents as _}from"./support/componentsUtils.js";import{getLabelForDateFieldValue as y,getIntlOptionsForField as F,prepareISOFieldValueForDateComponents as w,prepareUnixFieldValueForDateComponents as I,normalizeTimeOnlyString as x,getISOFieldValueFromDateComponents as M,getUnixFieldValueFromDateComponents as k}from"./support/dateUtils.js";import{globalCss as O}from"./support/globalCss.js";import{messageBundle as T,vmEvent as V,tsx as D}from"./support/widget.js";import{setFocus as U}from"./support/widgetUtils.js";import{isEmptyValue as E}from"./support/forms/formUtils.js";const S="data-element-id";let R=class extends d{constructor(e,t){super(e,t),this.headingLevel=2,this.messagesCommon=null,this.messages=null,this.featureFormMessages=null,this.viewModel=new c,this.visibleElements=new v,this.groupDisplay="all",this._attemptFocusOnNextRender=!1,this._dateComponentMap=new Map,this._touchedInputs=new Set,this._focusedFieldInput=null,this._batchSwitchInputInitialValues=new Map,this._saveInput=this._saveInput.bind(this),this._onFormSubmit=this._onFormSubmit.bind(this),this._onComponentFocus=this._onComponentFocus.bind(this),this._onComponentBlur=this._onComponentBlur.bind(this),this._afterComponentCreateOrUpdate=this._afterComponentCreateOrUpdate.bind(this),this._afterDateComponentCreate=this._afterDateComponentCreate.bind(this),this._afterRadioGroupCreateOrUpdate=this._afterRadioGroupCreateOrUpdate.bind(this)}initialize(){this.addHandles([n(()=>this.features,()=>{this._dateComponentMap.clear()}),n(()=>this.viewModel.activeForm,()=>{this._batchSwitchInputInitialValues.clear()}),o(()=>this.viewModel,"submit",()=>{this.valid||this.goToClosestError()})])}loadDependencies(){return _({input:()=>import("@esri/calcite-components/dist/components/calcite-input"),block:()=>import("@esri/calcite-components/dist/components/calcite-block"),button:()=>import("@esri/calcite-components/dist/components/calcite-button"),combobox:()=>import("@esri/calcite-components/dist/components/calcite-combobox"),"combobox-item":()=>import("@esri/calcite-components/dist/components/calcite-combobox-item"),"combobox-item-group":()=>import("@esri/calcite-components/dist/components/calcite-combobox-item-group"),dropdown:()=>import("@esri/calcite-components/dist/components/calcite-dropdown"),"dropdown-group":()=>import("@esri/calcite-components/dist/components/calcite-dropdown-group"),"dropdown-item":()=>import("@esri/calcite-components/dist/components/calcite-dropdown-item"),"input-date-picker":()=>import("@esri/calcite-components/dist/components/calcite-input-date-picker"),"input-number":()=>import("@esri/calcite-components/dist/components/calcite-input-number"),"input-time-picker":()=>import("@esri/calcite-components/dist/components/calcite-input-time-picker"),"input-time-zone":()=>import("@esri/calcite-components/dist/components/calcite-input-time-zone"),label:()=>import("@esri/calcite-components/dist/components/calcite-label"),"input-message":()=>import("@esri/calcite-components/dist/components/calcite-input-message"),loader:()=>import("@esri/calcite-components/dist/components/calcite-loader"),notice:()=>import("@esri/calcite-components/dist/components/calcite-notice"),switch:()=>import("@esri/calcite-components/dist/components/calcite-switch"),"text-area":()=>import("@esri/calcite-components/dist/components/calcite-text-area"),"radio-button":()=>import("@esri/calcite-components/dist/components/calcite-radio-button"),"radio-button-group":()=>import("@esri/calcite-components/dist/components/calcite-radio-button-group")})}get activeFeatureIndex(){return this.viewModel.activeFeatureIndex}set activeFeatureIndex(e){this.viewModel.activeFeatureIndex=e}get disabled(){return this.viewModel.disabled}set disabled(e){this.viewModel.disabled=e}get _effectiveDisabled(){return this.disabled||this.viewModel.updating}get features(){return this.viewModel.features}set features(e){this.viewModel.features=e}get map(){return this.viewModel.map}set map(e){this.viewModel.map=e}get maximumFeatureCount(){return this.viewModel.maximumFeatureCount}set maximumFeatureCount(e){this.viewModel.maximumFeatureCount=e}get maximumFeatureCountWithComplexForms(){return this.viewModel.maximumFeatureCountWithComplexForms}set maximumFeatureCountWithComplexForms(e){this.viewModel.maximumFeatureCountWithComplexForms=e}get spatialReference(){return this.viewModel.spatialReference}set spatialReference(e){this.viewModel.spatialReference=e}get layerInfos(){return this.viewModel.layerInfos}set layerInfos(e){this.viewModel.layerInfos=e}get timeZone(){return this.viewModel.timeZone}set timeZone(e){this.viewModel.timeZone=e}get icon(){return"edit-attributes"}set icon(e){this._overrideIfSome("icon",e)}get readOnly(){return this.viewModel.readOnly}set readOnly(e){this.viewModel.readOnly=e}get valid(){return this.viewModel.valid}goToClosestError(){const e=this.viewModel.getFirstVisibleInvalidFieldInput();if(!e)return;const{groupInput:t}=e;t&&(t.open||(t.open=!0)),this._focusedFieldInput=e.input,this._attemptFocusOnNextRender=!0,this.scheduleRender()}render(){const{status:e}=this.viewModel;return"failed"===e?this.viewModel.hasTooManyComplexFeatures?this._renderErrorNotice(t(this.messages.formFailedToLoadTooManyComplexFeatures,{num:this.viewModel.maximumFeatureCountWithComplexForms})):this.viewModel.hasTooManyFeatures?this._renderErrorNotice(t(this.messages.formFailedToLoadTooManyFeatures,{num:this.viewModel.maximumFeatureCount})):this._renderErrorNotice(this.messages.formFailedToLoad):this.viewModel.expressionEvaluationFailed?this._renderErrorNotice(this.messages.expressionEvaluationFailed):this.viewModel.hasLayersWithContingentValues?this._renderErrorNotice(this.messages.unsupportedContingentValues):D("div",{class:this.classes(h.base,O.widget,O.panel)},"loaded"===e?this._renderForm():"loading"===e&&this.visibleElements.loadingIndicator?D("calcite-loader",{key:"loader",label:this.messagesCommon?.loading}):null)}submit(){this.viewModel.submit()}_setDateTimeTimeZoneMap(e){const{datePart:t,elementId:n}=e.dataset,o=i(this._dateComponentMap,`${n}`,()=>({}));switch(t){case"date":o.date=e;break;case"time":o.time=e;break;case"timeZone":o.timeZone=e}}_renderErrorNotice(e){return D("div",{class:this.classes(h.base,O.widget,O.panel)},D("calcite-notice",{class:h.noticeError,icon:!0,kind:"warning",open:!0},D("div",{slot:"message"},e)))}_renderForm(){return D("form",{onsubmit:this._onFormSubmit},this._renderInvisibleFieldsError(),this._renderContent())}_renderInvisibleFieldsError(){const{viewModel:e}=this,{hasNonActiveInvalidFeatures:t,activeForm:i}=e;let n;if(!e.submitHasBeenAttempted)return null;if(i.invalidHiddenInputs.length>0)if(n=p(i,e.mode,this.messages),"batch"===this.viewModel.mode){const e=i.invalidHiddenInputs.filter(e=>"hidden:group-visibility-expression:all-features"===e.effectiveVisibilityCode||"hidden:visibility-expression:all-features"===e.visibilityCode);e.length>0?n+=` (${e.map(e=>e.label).join(", ")})`:n=null}else n+=` (${i.invalidHiddenInputs.map(e=>e.label).join(", ")})`;else if(t)return null;return n?D("calcite-notice",{class:h.noticeError,icon:!0,kind:"danger",open:!0},D("div",{slot:"message"},n)):null}_renderContent(){if(!this.viewModel.hasVisibleInputs)return[D("calcite-notice",{class:h.noticeError,icon:!0,kind:"warning",open:!0},D("div",{slot:"message"},this.messages.noVisibleFields[this.viewModel.noVisibleElementsReason]))];const{inputs:e}=this.viewModel.activeForm;return e.filter(e=>e.visible).map(e=>this._renderInput(e))}_renderInput(e){return b(e)?this._renderGroupInput(e):f(e)?this._renderLabeledField(e):C(e)?this._renderTextComponent(e):void 0}_renderGroupInput(e){const{inputs:t,template:i,open:n}=e,o=t.filter(e=>e.visible),a=i.label??"";return D("calcite-block",{class:this.classes(h.group,"sequential"===this.groupDisplay?h.groupSequential:null,this.disabled?h.inputDisabled:null),collapsible:!0,description:i.description??void 0,disabled:this._effectiveDisabled,expanded:n,heading:a,headingLevel:this.headingLevel,key:`{${i.elementId}-key}`,label:a,onCalciteBlockClose:()=>{e.open=!1},onCalciteBlockOpen:()=>{e.open=!0}},o.map(e=>this._renderInput(e)))}_renderLabeledField(e){const{elementId:i}=e.template,{label:n,required:o,dataType:a}=e,s=o?t(this.messages.requiredFieldLabel,{name:n}):n;return D("calcite-label",{"aria-label":s,class:h.label,key:`field--${i}`},D("div",{class:h.labelTextContent,key:"labelTextContainer"},n,o?D("span",{"aria-hidden":"true",title:this.messagesCommon.required},"*"):void 0),"unsupported"!==a?this._renderFieldInput(e):this._renderReadOnlyComponent(e),this._renderAuxiliaryText(e))}_renderFieldInput(e){const t=this.getCommonInputProps(e),{dataType:i}=e;return"date"===i?this._renderDateComponents(e,t):"coded-value"===e.domain?.type?this._renderCodedInputs({input:e,props:t}):"number"===i?this._renderNumberComponent(e,t):this._renderStringComponent(e,t)}_renderAuxiliaryText(e){const{compositeError:t,description:i,submittable:n}=e,o=!n&&t&&(this.viewModel.submitHasBeenAttempted||this._touchedInputs.has(e.template.elementId))?u(e,t,this.messages):null;return o?D("calcite-input-message",{icon:!0,status:"invalid"},o):i?D("calcite-input-message",{class:h.description,icon:!1,status:"idle"},i):null}_renderCodedInputs({input:e,props:t}){const i=e.template.input?.type??null,n=e.codedValueOptions;switch(i){case"switch":return this._renderSwitchField({input:e,props:t});case"radio-buttons":return this._renderRadioButtonGroupComponent({input:e,options:n.flat(),props:t});default:return this._renderComboBoxComponent({options:n,props:t,input:e})}}_renderSwitchField({input:e,props:t}){if((this._batchSwitchInputInitialValues.get(e)===g||e.value===g)&&"batch"===this.viewModel.mode){const i={dropdown:{afterCreate:this._afterComponentCreateOrUpdate,afterUpdate:this._afterComponentCreateOrUpdate,disabled:t.readOnly,open:!1,[S]:t[S]},trigger:{appearance:"transparent",iconEnd:"chevron-down",kind:"neutral",slot:"trigger",label:t.label},group:{mode:"single"}};return this._renderDropdownComponent({buttonValue:e.value,dropdownProps:i,options:[{name:this.messages.differentValuesPlaceholder,value:g,disabled:!0},...e.codedValueDomainOptions]})}return this._renderSwitchComponent({input:e,props:t})}_renderSwitchComponent({input:e,props:t}){return D("calcite-switch",{...t,checked:!!m(e.template,"switch")&&e.value===e.template.input.onValue,class:h.inputSwitch,disabled:t.readOnly,onblur:()=>{this._focusedFieldInput=null},onCalciteSwitchChange:({currentTarget:e})=>this._saveInput(e)})}_renderDropdownComponent({buttonValue:e,options:t,dropdownProps:i}){const{trigger:n,dropdown:o,group:a}=i;return D("calcite-dropdown",{...o,onblur:()=>{this._focusedFieldInput=null},onfocus:this._onComponentFocus,onCalciteDropdownSelect:({currentTarget:e})=>this._saveInput(e)},D("calcite-button",{...n},e===g?this.messages.differentValuesPlaceholder:e),D("calcite-dropdown-group",{selectionMode:a.mode},t.map(t=>D("calcite-dropdown-item",{disabled:t.disabled,label:String(t.name),selected:e===t.value},t.name))))}_renderComboBoxComponent({input:e,options:t,props:i}){const n="INSERT"===this.viewModel.editType,o=this._touchedInputs.has(e?.template?.elementId),a=n&&e.showNoValueOptionEnabled&&!o?()=>{}:i.onblur,s={...i,onblur:a};return D("calcite-combobox",{...s,selectionMode:"single",value:i.placeholder===this.messages.differentValuesPlaceholder?g:String(i.value),onCalciteComboboxChange:({currentTarget:e})=>{e.value!==g&&this._saveInput(e)}},this.renderComboboxOptionsList({input:e,options:t,props:i}))}renderComboboxOptionsList({input:e,options:t,props:i}){const[n,o]=t.map(e=>e.map(({name:e,value:t})=>D("calcite-combobox-item",{key:`#${t}`,selected:i.value===t,textLabel:e,value:`${t}`}))),a=[...n];o.length>0&&a.push(D("calcite-combobox-item-group",{key:"unsupported",label:this.featureFormMessages.subtypes.unsupportedDomainGroupTitle},o));const s=i.placeholder===this.messages.differentValuesPlaceholder,r=!s&&E(i.value);return e.showNoValueOptionEnabled&&a.unshift(D("calcite-combobox-item",{key:"empty-option",selected:r,textLabel:e.showNoValueLabel||this.messages.empty,value:""})),s&&a.unshift(D("calcite-combobox-item",{key:g,selected:!0,textLabel:this.messages.differentValuesPlaceholder,value:g})),a}_renderRadioButtonGroupComponent({input:e,options:t,props:i}){const n=t.map(({name:t,value:n})=>this._renderRadioButtons({label:t,value:n,selected:n===e.value,props:i}));if(e.showNoValueOptionEnabled){const t="",o=e.showNoValueLabel||this.messages.empty,a=E(e.value);n.unshift(this._renderRadioButtons({label:o,value:t,selected:a,props:i}))}return D("calcite-radio-button-group",{afterCreate:this._afterRadioGroupCreateOrUpdate,afterUpdate:this._afterRadioGroupCreateOrUpdate,class:h.inputRadioGroup,disabled:i.readOnly,key:`${i.key}-radio-group`,layout:"vertical",name:i.name,required:i.required},n,i.placeholder===this.messages.differentValuesPlaceholder?D("calcite-label",{class:h.placeholderRadio,key:i.label,layout:"inline"},D("calcite-radio-button",{checked:!0,class:h.inputRadio,disabled:!0,name:i.placeholder,value:i.placeholder}),i.placeholder):null)}_renderRadioButtons({value:e,selected:t,label:i,props:n}){return D("calcite-label",{class:h.inputRadioLabel,key:n.label,layout:"inline"},D("calcite-radio-button",{...n,afterCreate:void 0,afterUpdate:void 0,checked:t,class:h.inputRadio,disabled:n.readOnly,name:n.label,onblur:()=>{this._focusedFieldInput=null},value:e,onCalciteRadioButtonChange:({currentTarget:e})=>{e.checked&&this._saveInput(e)}}),i)}_renderStringComponent(e,t){const{template:i}=e;return!i.field.editable||this.readOnly?this._renderReadOnlyComponent(e):"text-area"===i.input?.type?D("calcite-text-area",{...t,class:this.classes(h.individualElement),resize:"vertical",value:t.value?String(t.value):"",onCalciteTextAreaInput:({currentTarget:e})=>this._saveInput(e)}):D("calcite-input",{...t,class:this.classes(h.individualElement),type:"text",value:t.value?String(t.value):"",onCalciteInputInput:({currentTarget:e})=>this._saveInput(e)})}_renderNumberComponent(e,t){const i=r(e.field);return D("calcite-input-number",{...t,integer:i,type:"number",value:i&&""!==t.value?Math.round(parseFloat(String(t.value))).toString():String(t.value),onCalciteInputNumberInput:({currentTarget:e})=>this._saveInput(e)})}_renderReadOnlyComponent(e,t){const i=this.getCommonInputProps(e);return D("calcite-input",{...i,class:this.classes(h.fieldInput,h.inputDisabled,h.individualElement),readOnly:!0,type:"text",value:String(t??i.value??"")})}_renderDateComponents(e,t){const{field:i}=e;let n;switch(i.type){case"date":n=this._renderDateFieldComponents(e,t);break;case"date-only":n=this._renderDateOnlyFieldComponent(e,t);break;case"time-only":n=this._renderTimeOnlyFieldComponent(e,t);break;case"timestamp-offset":n=this._renderTimestampOffsetFieldComponents(e,t);break;default:n=this._renderReadOnlyComponent(e,y(i,t.value,{timeZone:e.effectiveTimeZone,...F(e.template.field)}))}return e.value===g?[n,D("calcite-input-message",{icon:"information",key:"diff-values-message",status:"idle"},this.messages.differentValues)]:n}_renderDateOnlyFieldComponent(e,t){const{class:i,key:n,readOnly:o}=t,{rawMax:a,rawMin:s}=e.range;return D("calcite-input-date-picker",{afterCreate:this._afterDateComponentCreate,afterUpdate:this._afterComponentCreateOrUpdate,class:i,"data-date-part":"date","data-element-id":t[S],key:`${n}-date-input`,max:l(a)?a:void 0,min:l(s)?s:void 0,onblur:()=>{this._focusedFieldInput=null},onfocus:this._onComponentFocus,overlayPositioning:"fixed",readOnly:o,value:e.value===g?"":e.value?String(e.value):"",onCalciteInputDatePickerChange:t=>this._saveValueFromDateComponent(e,t.currentTarget)})}_renderTimeOnlyFieldComponent(e,t){const{class:i,key:n,readOnly:o}=t;return D("calcite-input-time-picker",{afterCreate:this._afterDateComponentCreate,afterUpdate:this._afterComponentCreateOrUpdate,class:i,"data-date-part":"time","data-element-id":t[S],key:`${n}-time-input`,onblur:()=>{this._focusedFieldInput=null},onfocus:this._onComponentFocus,overlayPositioning:"fixed",readOnly:o,value:e.value===g?"":e.value?String(e.value):"",onCalciteInputTimePickerChange:t=>this._saveValueFromDateComponent(e,t.currentTarget)})}_renderTimestampOffsetFieldComponents(e,t){const{class:i,key:n,readOnly:o}=t,{rawMax:a,rawMin:s}=e.range,r=w(a),l=w(s),d=w(e.value===g?"":e.value),p=e.includeTimeOffset,u={afterCreate:this._afterDateComponentCreate,afterUpdate:this._afterComponentCreateOrUpdate,overlayPositioning:"fixed",readOnly:o,[S]:t[S],onfocus:this._onComponentFocus};return D("div",{class:h.dateInputContainer,key:`${n}-date-time-container`},D("calcite-input-date-picker",{...u,class:i,"data-date-part":"date",key:`${n}-date-input`,max:r?.date??void 0,min:l?.date??void 0,onblur:()=>{this._focusedFieldInput=null},value:d.date??"",onCalciteInputDatePickerChange:t=>this._saveValueFromDateComponent(e,t.target)}),D("calcite-input-time-picker",{...u,class:i,"data-date-part":"time",key:`${n}-time-input`,onblur:()=>{this._focusedFieldInput=null},value:d.time??"",onCalciteInputTimePickerChange:t=>this._saveValueFromDateComponent(e,t.target)}),p?D("calcite-input-time-zone",{...u,class:i,clearable:e.value===g||null==e.value,"data-date-part":"timeZone",key:`${n}-timezone-input`,onblur:()=>{this._focusedFieldInput=null},value:d.timeZoneOffset||"",onCalciteInputTimeZoneChange:t=>this._saveValueFromDateComponent(e,t.target)}):null)}_renderDateFieldComponents(e,t){const{class:i,key:n,readOnly:o,min:a,max:s}=t,r=e.effectiveTimeZone,l=I(e.value===g?"":e.value,r),d=I(s,r),p=I(a,r),u=e.includeTime,m={afterCreate:this._afterDateComponentCreate,afterUpdate:this._afterComponentCreateOrUpdate,overlayPositioning:"fixed",readOnly:o,[S]:t[S],onfocus:this._onComponentFocus};return D("div",{class:h.dateInputContainer,key:`${n}-date-time-container`},D("calcite-input-date-picker",{...m,class:i,"data-date-part":"date",key:`${n}-date-input`,max:d?.date??void 0,min:p?.date??void 0,onblur:()=>{this._focusedFieldInput=null},value:l.date??"",onCalciteInputDatePickerChange:t=>this._saveValueFromDateComponent(e,t.target)}),u?D("calcite-input-time-picker",{...m,"data-date-part":"time",key:`${n}-time-input`,onblur:()=>{this._focusedFieldInput=null},step:1,value:l.time??"",onCalciteInputTimePickerChange:t=>{this._saveValueFromDateComponent(e,t.target)}}):null)}_renderTextComponent(e){return D("div",{class:h.textElementInput,innerHTML:e.text,key:`text-element-${e.template.elementId}`})}getCommonInputProps(e){const{template:t,valid:i,value:n,minLength:o,maxLength:a,required:s,fieldName:r,editable:l,userHasChangedValue:d,range:{max:p,min:u}}=e,m=!l||this.readOnly,c=!m&&this._effectiveDisabled;let v=t.hint??void 0,b=!1;return n===g&&(v=this.messages.differentValuesPlaceholder,b=!0),{afterCreate:this._afterComponentCreateOrUpdate,afterUpdate:this._afterComponentCreateOrUpdate,"aria-invalid":i?"false":"true",class:this.classes(h.fieldInput,m?h.inputDisabled:null),status:!d&&!this.viewModel.submitHasBeenAttempted||i?"idle":"invalid",maxLength:a&&a>-1?a:void 0,minLength:o&&o>-1?o:void 0,key:t.elementId,label:r,name:r,max:null!=p?p:void 0,min:null!=u?u:void 0,disabled:c,readOnly:m,onblur:this._onComponentBlur,required:s,placeholder:v,value:b?"":n??"",[S]:t.elementId,onfocus:this._onComponentFocus}}_onFormSubmit(e){e.preventDefault()}_getFieldInputFromHTMLElement(e){return this.viewModel.findFieldInput(e.getAttribute(S))}_afterRadioGroupCreateOrUpdate(e){const t=e.selectedItem,i=e.querySelector("calcite-radio-button"),n=t||i;n&&this._afterComponentCreateOrUpdate(n)}_onComponentFocus(e){const t=e.target,i=this._getFieldInputFromHTMLElement(t);this._touchedInputs.add(i.template.elementId),this._focusedFieldInput=i}_afterComponentCreateOrUpdate(e){const t=this._getFieldInputFromHTMLElement(e),i=this._focusedFieldInput;this._attemptFocusOnNextRender&&i===t&&(this._attemptFocusOnNextRender=!1,U(e))}_onComponentBlur(){this._focusedFieldInput=null}_parseValue(e,t){if(m(t.template,"switch")){if("calcite-dropdown"===e.localName&&t.domain)for(const i of t.domain.codedValues)if(i.name===e.selectedItems[0].textContent)return i.code;return e.checked?t.template.input.onValue:t.template.input.offValue}const i=e.value;return null==i||""===i?null:"number"===t.dataType?"-0"===i||"-0."===i||"-0,"===i?i:parseFloat(i):"date"===t.field.type?parseFloat(i):i}_saveInput(e){const t=this._getFieldInputFromHTMLElement(e),{elementId:n}=t.template;if(!t)return;const o=t?.value;if(m(t.template,"switch")&&"single"!==this.viewModel.mode){const e=i(this._batchSwitchInputInitialValues,t,()=>t.value);this._batchSwitchInputInitialValues.set(t,null===e?o:e)}const a=this._parseValue(e,t);a!==o&&this.viewModel.setValue(n,a)}_afterDateComponentCreate(e){this._setDateTimeTimeZoneMap(e),this._afterComponentCreateOrUpdate(e)}_saveValueFromDateComponent(e,t){const{elementId:i}=e.template,n=e.field.type,o=this._dateComponentMap.get(`${i}`);if(!o)return;const a=e.effectiveTimeZone;let s=e.value===g?void 0:e.value,r=null;"date-only"===n?r=Array.isArray(t.value)?t.value[0]:t.value:"time-only"===n?(s=x(s),r=x(t.value)):r="timestamp-offset"===n?null!=t.value?M({dateComponent:o.date,timeComponent:o.time,oldValue:s,timeZoneComponent:o.timeZone,defaultTimeZone:a}):null:null!=t.value?k({oldValue:s,dateComponent:o.date,timeZone:a,timeComponent:o.time?.value===g?void 0:o.time}):null,s!==r&&(null!==r&&t.value?this.viewModel.setValue(`${i}`,r):this.viewModel.setValue(`${i}`,null))}};e([a()],R.prototype,"activeFeatureIndex",null),e([a()],R.prototype,"disabled",null),e([a()],R.prototype,"_effectiveDisabled",null),e([a()],R.prototype,"features",null),e([a()],R.prototype,"map",null),e([a()],R.prototype,"maximumFeatureCount",null),e([a()],R.prototype,"maximumFeatureCountWithComplexForms",null),e([a()],R.prototype,"spatialReference",null),e([a()],R.prototype,"layerInfos",null),e([a()],R.prototype,"timeZone",null),e([a()],R.prototype,"headingLevel",void 0),e([a()],R.prototype,"icon",null),e([a(),T("esri/t9n/common")],R.prototype,"messagesCommon",void 0),e([a(),T("esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm")],R.prototype,"messages",void 0),e([a(),T("esri/widgets/FeatureForm/t9n/FeatureForm")],R.prototype,"featureFormMessages",void 0),e([a()],R.prototype,"readOnly",null),e([a()],R.prototype,"valid",null),e([a({type:c}),V(["value-change","submit"])],R.prototype,"viewModel",void 0),e([a({type:v,nonNullable:!0})],R.prototype,"visibleElements",void 0),e([a()],R.prototype,"groupDisplay",void 0),R=e([s("esri.widgets.BatchAttributeForm")],R);const L=R;export{L as default};
|
|
5
|
+
import{__decorate as e}from"tslib";import{substitute as t}from"../intl.js";import"../core/has.js";import{getOrCreateMapValue as i}from"../core/MapUtils.js";import{watch as n,on as o}from"../core/reactiveUtils.js";import{property as a,subclass as s}from"../core/accessorSupport/decorators.js";import{isIntegerField as r}from"../layers/support/fieldUtils.js";import{isString as l}from"../support/guards.js";import d from"./Widget.js";import{getHiddenFieldsValidationErrorMessage as p,getVisibleFieldInputValidationErrorMessage as u,isElementTemplateWithInputType as m}from"./BatchAttributeForm/batchAttributeFormUtils.js";import c from"./BatchAttributeForm/BatchAttributeFormViewModel.js";import{css as h}from"./BatchAttributeForm/css.js";import{VisibleElements as v}from"./BatchAttributeForm/VisibleElements.js";import{isGroupInput as f,isFieldInput as b,isTextElementInput as C,differentValuesString as g}from"./BatchAttributeForm/inputs/support/inputUtils.js";import{loadCalciteComponents as _}from"./support/componentsUtils.js";import{getLabelForDateFieldValue as y,getIntlOptionsForField as F,prepareISOFieldValueForDateComponents as w,prepareUnixFieldValueForDateComponents as I,normalizeTimeOnlyString as x,getISOFieldValueFromDateComponents as M,getUnixFieldValueFromDateComponents as k}from"./support/dateUtils.js";import{globalCss as O}from"./support/globalCss.js";import{messageBundle as T,vmEvent as V,tsx as D}from"./support/widget.js";import{setFocus as U}from"./support/widgetUtils.js";import{isEmptyValue as E}from"./support/forms/formUtils.js";const S="data-element-id";let R=class extends d{constructor(e,t){super(e,t),this.headingLevel=2,this.messagesCommon=null,this.messages=null,this.featureFormMessages=null,this.viewModel=new c,this.visibleElements=new v,this.groupDisplay="all",this._attemptFocusOnNextRender=!1,this._dateComponentMap=new Map,this._touchedInputs=new Set,this._focusedFieldInput=null,this._batchSwitchInputInitialValues=new Map,this._saveInput=this._saveInput.bind(this),this._onFormSubmit=this._onFormSubmit.bind(this),this._onComponentFocus=this._onComponentFocus.bind(this),this._onComponentBlur=this._onComponentBlur.bind(this),this._afterComponentCreateOrUpdate=this._afterComponentCreateOrUpdate.bind(this),this._afterDateComponentCreate=this._afterDateComponentCreate.bind(this),this._afterRadioGroupCreateOrUpdate=this._afterRadioGroupCreateOrUpdate.bind(this)}initialize(){this.addHandles([n(()=>this.features,()=>{this._dateComponentMap.clear()}),n(()=>this.viewModel.activeForm,()=>{this._batchSwitchInputInitialValues.clear()}),o(()=>this.viewModel,"submit",()=>{this.valid||this.goToClosestError()})])}loadDependencies(){return _({input:()=>import("@esri/calcite-components/dist/components/calcite-input"),block:()=>import("@esri/calcite-components/dist/components/calcite-block"),button:()=>import("@esri/calcite-components/dist/components/calcite-button"),combobox:()=>import("@esri/calcite-components/dist/components/calcite-combobox"),"combobox-item":()=>import("@esri/calcite-components/dist/components/calcite-combobox-item"),"combobox-item-group":()=>import("@esri/calcite-components/dist/components/calcite-combobox-item-group"),dropdown:()=>import("@esri/calcite-components/dist/components/calcite-dropdown"),"dropdown-group":()=>import("@esri/calcite-components/dist/components/calcite-dropdown-group"),"dropdown-item":()=>import("@esri/calcite-components/dist/components/calcite-dropdown-item"),"input-date-picker":()=>import("@esri/calcite-components/dist/components/calcite-input-date-picker"),"input-number":()=>import("@esri/calcite-components/dist/components/calcite-input-number"),"input-time-picker":()=>import("@esri/calcite-components/dist/components/calcite-input-time-picker"),"input-time-zone":()=>import("@esri/calcite-components/dist/components/calcite-input-time-zone"),label:()=>import("@esri/calcite-components/dist/components/calcite-label"),"input-message":()=>import("@esri/calcite-components/dist/components/calcite-input-message"),loader:()=>import("@esri/calcite-components/dist/components/calcite-loader"),notice:()=>import("@esri/calcite-components/dist/components/calcite-notice"),switch:()=>import("@esri/calcite-components/dist/components/calcite-switch"),"text-area":()=>import("@esri/calcite-components/dist/components/calcite-text-area"),"radio-button":()=>import("@esri/calcite-components/dist/components/calcite-radio-button"),"radio-button-group":()=>import("@esri/calcite-components/dist/components/calcite-radio-button-group")})}get activeFeatureIndex(){return this.viewModel.activeFeatureIndex}set activeFeatureIndex(e){this.viewModel.activeFeatureIndex=e}get disabled(){return this.viewModel.disabled}set disabled(e){this.viewModel.disabled=e}get _effectiveDisabled(){return this.disabled||this.viewModel.updating}get features(){return this.viewModel.features}set features(e){this.viewModel.features=e}get map(){return this.viewModel.map}set map(e){this.viewModel.map=e}get maximumFeatureCount(){return this.viewModel.maximumFeatureCount}set maximumFeatureCount(e){this.viewModel.maximumFeatureCount=e}get maximumFeatureCountWithComplexForms(){return this.viewModel.maximumFeatureCountWithComplexForms}set maximumFeatureCountWithComplexForms(e){this.viewModel.maximumFeatureCountWithComplexForms=e}get spatialReference(){return this.viewModel.spatialReference}set spatialReference(e){this.viewModel.spatialReference=e}get layerInfos(){return this.viewModel.layerInfos}set layerInfos(e){this.viewModel.layerInfos=e}get timeZone(){return this.viewModel.timeZone}set timeZone(e){this.viewModel.timeZone=e}get icon(){return"edit-attributes"}set icon(e){this._overrideIfSome("icon",e)}get readOnly(){return this.viewModel.readOnly}set readOnly(e){this.viewModel.readOnly=e}get valid(){return this.viewModel.valid}goToClosestError(){const e=this.viewModel.getFirstVisibleInvalidFieldInput();if(!e)return;const{groupInput:t}=e;t&&(t.open||(t.open=!0)),this._focusedFieldInput=e.input,this._attemptFocusOnNextRender=!0,this.scheduleRender()}render(){const{status:e}=this.viewModel;return"failed"===e?this.viewModel.hasTooManyComplexFeatures?this._renderErrorNotice(t(this.messages.formFailedToLoadTooManyComplexFeatures,{num:this.viewModel.maximumFeatureCountWithComplexForms})):this.viewModel.hasTooManyFeatures?this._renderErrorNotice(t(this.messages.formFailedToLoadTooManyFeatures,{num:this.viewModel.maximumFeatureCount})):this._renderErrorNotice(this.messages.formFailedToLoad):this.viewModel.expressionEvaluationFailed?this._renderErrorNotice(this.messages.expressionEvaluationFailed):this.viewModel.hasLayersWithContingentValues?this._renderErrorNotice(this.messages.unsupportedContingentValues):D("div",{class:this.classes(h.base,O.widget,O.panel)},"loaded"===e?this._renderForm():"loading"===e&&this.visibleElements.loadingIndicator?D("calcite-loader",{key:"loader",label:this.messagesCommon?.loading}):null)}submit(){this.viewModel.submit()}_setDateTimeTimeZoneMap(e){const{datePart:t,elementId:n}=e.dataset,o=i(this._dateComponentMap,`${n}`,()=>({}));switch(t){case"date":o.date=e;break;case"time":o.time=e;break;case"timeZone":o.timeZone=e}}_renderErrorNotice(e){return D("div",{class:this.classes(h.base,O.widget,O.panel)},D("calcite-notice",{class:h.noticeError,icon:!0,kind:"warning",open:!0},D("div",{slot:"message"},e)))}_renderForm(){return D("form",{onsubmit:this._onFormSubmit},this._renderInvisibleFieldsError(),this._renderContent())}_renderInvisibleFieldsError(){const{viewModel:e}=this,{hasNonActiveInvalidFeatures:t,activeForm:i}=e;let n;if(!e.submitHasBeenAttempted)return null;if(i.invalidHiddenInputs.length>0)if(n=p(i,e.mode,this.messages),"batch"===this.viewModel.mode){const e=i.invalidHiddenInputs.filter(e=>"hidden:group-visibility-expression:all-features"===e.effectiveVisibilityCode||"hidden:visibility-expression:all-features"===e.visibilityCode);e.length>0?n+=` (${e.map(e=>e.label).join(", ")})`:n=null}else n+=` (${i.invalidHiddenInputs.map(e=>e.label).join(", ")})`;else if(t)return null;return n?D("calcite-notice",{class:h.noticeError,icon:!0,kind:"danger",open:!0},D("div",{slot:"message"},n)):null}_renderContent(){if(!this.viewModel.hasVisibleInputs)return[D("calcite-notice",{class:h.noticeError,icon:!0,kind:"warning",open:!0},D("div",{slot:"message"},this.messages.noVisibleFields[this.viewModel.noVisibleElementsReason]))];const{inputs:e}=this.viewModel.activeForm;return e.filter(e=>e.visible).map(e=>this._renderInput(e))}_renderInput(e){return f(e)?this._renderGroupInput(e):b(e)?this._renderLabeledField(e):C(e)?this._renderTextComponent(e):void 0}_renderGroupInput(e){const{inputs:t,template:i,open:n}=e,o=t.filter(e=>e.visible),a=i.label??"";return D("calcite-block",{class:this.classes(h.group,"sequential"===this.groupDisplay?h.groupSequential:null,this.disabled?h.inputDisabled:null),collapsible:!0,description:i.description??void 0,disabled:this._effectiveDisabled,expanded:n,heading:a,headingLevel:this.headingLevel,key:`{${i.elementId}-key}`,label:a,onCalciteBlockClose:()=>{e.open=!1},onCalciteBlockOpen:()=>{e.open=!0}},o.map(e=>this._renderInput(e)))}_renderLabeledField(e){const{elementId:i}=e.template,{label:n,required:o,dataType:a}=e,s=o?t(this.messages.requiredFieldLabel,{name:n}):n;return D("calcite-label",{"aria-label":s,class:h.label,key:`field--${i}`},D("div",{class:h.labelTextContent,key:"labelTextContainer"},n,o?D("span",{"aria-hidden":"true",title:this.messagesCommon.required},"*"):void 0),"unsupported"!==a?this._renderFieldInput(e):this._renderReadOnlyComponent(e),this._renderAuxiliaryText(e))}_renderFieldInput(e){const t=this.getCommonInputProps(e),{dataType:i}=e;return"date"===i?this._renderDateComponents(e,t):"coded-value"===e.domain?.type?this._renderCodedInputs({input:e,props:t}):"number"===i?this._renderNumberComponent(e,t):this._renderStringComponent(e,t)}_renderAuxiliaryText(e){const{compositeError:t,description:i,submittable:n}=e,o=!n&&t&&(this.viewModel.submitHasBeenAttempted||this._touchedInputs.has(e.template.elementId))?u(e,t,this.messages):null;return o?D("calcite-input-message",{icon:!0,status:"invalid"},o):i?D("calcite-input-message",{class:h.description,icon:!1,status:"idle"},i):null}_renderCodedInputs({input:e,props:t}){const i=e.template.input?.type??null,n=e.codedValueOptions;switch(i){case"switch":return this._renderSwitchField({input:e,props:t});case"radio-buttons":return this._renderRadioButtonGroupComponent({input:e,options:n.flat(),props:t});default:return this._renderComboBoxComponent({options:n,props:t,input:e})}}_renderSwitchField({input:e,props:t}){if((this._batchSwitchInputInitialValues.get(e)===g||e.value===g)&&"batch"===this.viewModel.mode){const i={dropdown:{afterCreate:this._afterComponentCreateOrUpdate,afterUpdate:this._afterComponentCreateOrUpdate,disabled:t.readOnly,open:!1,[S]:t[S]},trigger:{appearance:"transparent",iconEnd:"chevron-down",kind:"neutral",slot:"trigger",label:t.label},group:{mode:"single"}};return this._renderDropdownComponent({buttonValue:e.value,dropdownProps:i,options:[{name:this.messages.differentValuesPlaceholder,value:g,disabled:!0},...e.codedValueDomainOptions]})}return this._renderSwitchComponent({input:e,props:t})}_renderSwitchComponent({input:e,props:t}){return D("calcite-switch",{...t,checked:!!m(e.template,"switch")&&e.value===e.template.input.onValue,class:h.inputSwitch,disabled:t.readOnly,onblur:()=>{this._focusedFieldInput=null},onCalciteSwitchChange:({currentTarget:e})=>this._saveInput(e)})}_renderDropdownComponent({buttonValue:e,options:t,dropdownProps:i}){const{trigger:n,dropdown:o,group:a}=i;return D("calcite-dropdown",{...o,onblur:()=>{this._focusedFieldInput=null},onfocus:this._onComponentFocus,onCalciteDropdownSelect:({currentTarget:e})=>this._saveInput(e)},D("calcite-button",{...n},e===g?this.messages.differentValuesPlaceholder:e),D("calcite-dropdown-group",{selectionMode:a.mode},t.map(t=>D("calcite-dropdown-item",{disabled:t.disabled,label:String(t.name),selected:e===t.value},t.name))))}_renderComboBoxComponent({input:e,options:t,props:i}){const n="INSERT"===this.viewModel.editType,o=this._touchedInputs.has(e?.template?.elementId),a=n&&e.showNoValueOptionEnabled&&!o?()=>{}:i.onblur,s={...i,onblur:a};return D("calcite-combobox",{...s,selectionMode:"single",value:i.placeholder===this.messages.differentValuesPlaceholder?g:String(i.value),onCalciteComboboxChange:({currentTarget:e})=>{e.value!==g&&this._saveInput(e)}},this.renderComboboxOptionsList({input:e,options:t,props:i}))}renderComboboxOptionsList({input:e,options:t,props:i}){const[n,o]=t.map(e=>e.map(({name:e,value:t})=>D("calcite-combobox-item",{heading:e,key:`#${t}`,selected:i.value===t,value:`${t}`}))),a=[...n];o.length>0&&a.push(D("calcite-combobox-item-group",{key:"unsupported",label:this.featureFormMessages.subtypes.unsupportedDomainGroupTitle},o));const s=i.placeholder===this.messages.differentValuesPlaceholder,r=!s&&E(i.value);return e.showNoValueOptionEnabled&&a.unshift(D("calcite-combobox-item",{heading:e.showNoValueLabel||this.messages.empty,key:"empty-option",selected:r,value:""})),s&&a.unshift(D("calcite-combobox-item",{heading:this.messages.differentValuesPlaceholder,key:g,selected:!0,value:g})),a}_renderRadioButtonGroupComponent({input:e,options:t,props:i}){const n=t.map(({name:t,value:n})=>this._renderRadioButtons({label:t,value:n,selected:n===e.value,props:i}));if(e.showNoValueOptionEnabled){const t="",o=e.showNoValueLabel||this.messages.empty,a=E(e.value);n.unshift(this._renderRadioButtons({label:o,value:t,selected:a,props:i}))}return D("calcite-radio-button-group",{afterCreate:this._afterRadioGroupCreateOrUpdate,afterUpdate:this._afterRadioGroupCreateOrUpdate,class:h.inputRadioGroup,disabled:i.readOnly,key:`${i.key}-radio-group`,layout:"vertical",name:i.name,required:i.required},n,i.placeholder===this.messages.differentValuesPlaceholder?D("calcite-label",{class:h.placeholderRadio,key:i.label,layout:"inline"},D("calcite-radio-button",{checked:!0,class:h.inputRadio,disabled:!0,name:i.placeholder,value:i.placeholder}),i.placeholder):null)}_renderRadioButtons({value:e,selected:t,label:i,props:n}){return D("calcite-label",{class:h.inputRadioLabel,key:n.label,layout:"inline"},D("calcite-radio-button",{...n,afterCreate:void 0,afterUpdate:void 0,checked:t,class:h.inputRadio,disabled:n.readOnly,name:n.label,onblur:()=>{this._focusedFieldInput=null},value:e,onCalciteRadioButtonChange:({currentTarget:e})=>{e.checked&&this._saveInput(e)}}),i)}_renderStringComponent(e,t){const{template:i}=e;return!i.field.editable||this.readOnly?this._renderReadOnlyComponent(e):"text-area"===i.input?.type?D("calcite-text-area",{...t,class:this.classes(h.individualElement),resize:"vertical",value:t.value?String(t.value):"",onCalciteTextAreaInput:({currentTarget:e})=>this._saveInput(e)}):D("calcite-input",{...t,class:this.classes(h.individualElement),type:"text",value:t.value?String(t.value):"",onCalciteInputInput:({currentTarget:e})=>this._saveInput(e)})}_renderNumberComponent(e,t){const i=r(e.field);return D("calcite-input-number",{...t,integer:i,type:"number",value:i&&""!==t.value?Math.round(parseFloat(String(t.value))).toString():String(t.value),onCalciteInputNumberInput:({currentTarget:e})=>this._saveInput(e)})}_renderReadOnlyComponent(e,t){const i=this.getCommonInputProps(e);return D("calcite-input",{...i,class:this.classes(h.fieldInput,h.inputDisabled,h.individualElement),readOnly:!0,type:"text",value:String(t??i.value??"")})}_renderDateComponents(e,t){const{field:i}=e;let n;switch(i.type){case"date":n=this._renderDateFieldComponents(e,t);break;case"date-only":n=this._renderDateOnlyFieldComponent(e,t);break;case"time-only":n=this._renderTimeOnlyFieldComponent(e,t);break;case"timestamp-offset":n=this._renderTimestampOffsetFieldComponents(e,t);break;default:n=this._renderReadOnlyComponent(e,y(i,t.value,{timeZone:e.effectiveTimeZone,...F(e.template.field)}))}return e.value===g?[n,D("calcite-input-message",{icon:"information",key:"diff-values-message",status:"idle"},this.messages.differentValues)]:n}_renderDateOnlyFieldComponent(e,t){const{class:i,key:n,readOnly:o}=t,{rawMax:a,rawMin:s}=e.range;return D("calcite-input-date-picker",{afterCreate:this._afterDateComponentCreate,afterUpdate:this._afterComponentCreateOrUpdate,class:i,"data-date-part":"date","data-element-id":t[S],key:`${n}-date-input`,max:l(a)?a:void 0,min:l(s)?s:void 0,onblur:()=>{this._focusedFieldInput=null},onfocus:this._onComponentFocus,overlayPositioning:"fixed",readOnly:o,value:e.value===g?"":e.value?String(e.value):"",onCalciteInputDatePickerChange:t=>this._saveValueFromDateComponent(e,t.currentTarget)})}_renderTimeOnlyFieldComponent(e,t){const{class:i,key:n,readOnly:o}=t;return D("calcite-input-time-picker",{afterCreate:this._afterDateComponentCreate,afterUpdate:this._afterComponentCreateOrUpdate,class:i,"data-date-part":"time","data-element-id":t[S],key:`${n}-time-input`,onblur:()=>{this._focusedFieldInput=null},onfocus:this._onComponentFocus,overlayPositioning:"fixed",readOnly:o,value:e.value===g?"":e.value?String(e.value):"",onCalciteInputTimePickerChange:t=>this._saveValueFromDateComponent(e,t.currentTarget)})}_renderTimestampOffsetFieldComponents(e,t){const{class:i,key:n,readOnly:o}=t,{rawMax:a,rawMin:s}=e.range,r=w(a),l=w(s),d=w(e.value===g?"":e.value),p=e.includeTimeOffset,u={afterCreate:this._afterDateComponentCreate,afterUpdate:this._afterComponentCreateOrUpdate,overlayPositioning:"fixed",readOnly:o,[S]:t[S],onfocus:this._onComponentFocus};return D("div",{class:h.dateInputContainer,key:`${n}-date-time-container`},D("calcite-input-date-picker",{...u,class:i,"data-date-part":"date",key:`${n}-date-input`,max:r?.date??void 0,min:l?.date??void 0,onblur:()=>{this._focusedFieldInput=null},value:d.date??"",onCalciteInputDatePickerChange:t=>this._saveValueFromDateComponent(e,t.target)}),D("calcite-input-time-picker",{...u,class:i,"data-date-part":"time",key:`${n}-time-input`,onblur:()=>{this._focusedFieldInput=null},value:d.time??"",onCalciteInputTimePickerChange:t=>this._saveValueFromDateComponent(e,t.target)}),p?D("calcite-input-time-zone",{...u,class:i,clearable:e.value===g||null==e.value,"data-date-part":"timeZone",key:`${n}-timezone-input`,onblur:()=>{this._focusedFieldInput=null},value:d.timeZoneOffset||"",onCalciteInputTimeZoneChange:t=>this._saveValueFromDateComponent(e,t.target)}):null)}_renderDateFieldComponents(e,t){const{class:i,key:n,readOnly:o,min:a,max:s}=t,r=e.effectiveTimeZone,l=I(e.value===g?"":e.value,r),d=I(s,r),p=I(a,r),u=e.includeTime,m={afterCreate:this._afterDateComponentCreate,afterUpdate:this._afterComponentCreateOrUpdate,overlayPositioning:"fixed",readOnly:o,[S]:t[S],onfocus:this._onComponentFocus};return D("div",{class:h.dateInputContainer,key:`${n}-date-time-container`},D("calcite-input-date-picker",{...m,class:i,"data-date-part":"date",key:`${n}-date-input`,max:d?.date??void 0,min:p?.date??void 0,onblur:()=>{this._focusedFieldInput=null},value:l.date??"",onCalciteInputDatePickerChange:t=>this._saveValueFromDateComponent(e,t.target)}),u?D("calcite-input-time-picker",{...m,"data-date-part":"time",key:`${n}-time-input`,onblur:()=>{this._focusedFieldInput=null},step:1,value:l.time??"",onCalciteInputTimePickerChange:t=>{this._saveValueFromDateComponent(e,t.target)}}):null)}_renderTextComponent(e){return D("div",{class:h.textElementInput,innerHTML:e.text,key:`text-element-${e.template.elementId}`})}getCommonInputProps(e){const{template:t,valid:i,value:n,minLength:o,maxLength:a,required:s,fieldName:r,editable:l,userHasChangedValue:d,range:{max:p,min:u}}=e,m=!l||this.readOnly,c=!m&&this._effectiveDisabled;let v=t.hint??void 0,f=!1;return n===g&&(v=this.messages.differentValuesPlaceholder,f=!0),{afterCreate:this._afterComponentCreateOrUpdate,afterUpdate:this._afterComponentCreateOrUpdate,"aria-invalid":i?"false":"true",class:this.classes(h.fieldInput,m?h.inputDisabled:null),status:!d&&!this.viewModel.submitHasBeenAttempted||i?"idle":"invalid",maxLength:a&&a>-1?a:void 0,minLength:o&&o>-1?o:void 0,key:t.elementId,label:r,name:r,max:null!=p?p:void 0,min:null!=u?u:void 0,disabled:c,readOnly:m,onblur:this._onComponentBlur,required:s,placeholder:v,value:f?"":n??"",[S]:t.elementId,onfocus:this._onComponentFocus}}_onFormSubmit(e){e.preventDefault()}_getFieldInputFromHTMLElement(e){return this.viewModel.findFieldInput(e.getAttribute(S))}_afterRadioGroupCreateOrUpdate(e){const t=e.selectedItem,i=e.querySelector("calcite-radio-button"),n=t||i;n&&this._afterComponentCreateOrUpdate(n)}_onComponentFocus(e){const t=e.target,i=this._getFieldInputFromHTMLElement(t);this._touchedInputs.add(i.template.elementId),this._focusedFieldInput=i}_afterComponentCreateOrUpdate(e){const t=this._getFieldInputFromHTMLElement(e),i=this._focusedFieldInput;this._attemptFocusOnNextRender&&i===t&&(this._attemptFocusOnNextRender=!1,U(e))}_onComponentBlur(){this._focusedFieldInput=null}_parseValue(e,t){if(m(t.template,"switch")){if("calcite-dropdown"===e.localName&&t.domain)for(const i of t.domain.codedValues)if(i.name===e.selectedItems[0].textContent)return i.code;return e.checked?t.template.input.onValue:t.template.input.offValue}const i=e.value;return null==i||""===i?null:"number"===t.dataType?"-0"===i||"-0."===i||"-0,"===i?i:parseFloat(i):"date"===t.field.type?parseFloat(i):i}_saveInput(e){const t=this._getFieldInputFromHTMLElement(e),{elementId:n}=t.template;if(!t)return;const o=t?.value;if(m(t.template,"switch")&&"single"!==this.viewModel.mode){const e=i(this._batchSwitchInputInitialValues,t,()=>t.value);this._batchSwitchInputInitialValues.set(t,null===e?o:e)}const a=this._parseValue(e,t);a!==o&&this.viewModel.setValue(n,a)}_afterDateComponentCreate(e){this._setDateTimeTimeZoneMap(e),this._afterComponentCreateOrUpdate(e)}_saveValueFromDateComponent(e,t){const{elementId:i}=e.template,n=e.field.type,o=this._dateComponentMap.get(`${i}`);if(!o)return;const a=e.effectiveTimeZone;let s=e.value===g?void 0:e.value,r=null;"date-only"===n?r=Array.isArray(t.value)?t.value[0]:t.value:"time-only"===n?(s=x(s),r=x(t.value)):r="timestamp-offset"===n?null!=t.value?M({dateComponent:o.date,timeComponent:o.time,oldValue:s,timeZoneComponent:o.timeZone,defaultTimeZone:a}):null:null!=t.value?k({oldValue:s,dateComponent:o.date,timeZone:a,timeComponent:o.time?.value===g?void 0:o.time}):null,s!==r&&(null!==r&&t.value?this.viewModel.setValue(`${i}`,r):this.viewModel.setValue(`${i}`,null))}};e([a()],R.prototype,"activeFeatureIndex",null),e([a()],R.prototype,"disabled",null),e([a()],R.prototype,"_effectiveDisabled",null),e([a()],R.prototype,"features",null),e([a()],R.prototype,"map",null),e([a()],R.prototype,"maximumFeatureCount",null),e([a()],R.prototype,"maximumFeatureCountWithComplexForms",null),e([a()],R.prototype,"spatialReference",null),e([a()],R.prototype,"layerInfos",null),e([a()],R.prototype,"timeZone",null),e([a()],R.prototype,"headingLevel",void 0),e([a()],R.prototype,"icon",null),e([a(),T("esri/t9n/common")],R.prototype,"messagesCommon",void 0),e([a(),T("esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm")],R.prototype,"messages",void 0),e([a(),T("esri/widgets/FeatureForm/t9n/FeatureForm")],R.prototype,"featureFormMessages",void 0),e([a()],R.prototype,"readOnly",null),e([a()],R.prototype,"valid",null),e([a({type:c}),V(["value-change","submit"])],R.prototype,"viewModel",void 0),e([a({type:v,nonNullable:!0})],R.prototype,"visibleElements",void 0),e([a()],R.prototype,"groupDisplay",void 0),R=e([s("esri.widgets.BatchAttributeForm")],R);const B=R;export{B as default};
|