@arcgis/core 5.1.0-next.110 → 5.1.0-next.112
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/analysis/ElevationProfile/ElevationProfileGroup.d.ts +3 -0
- package/analysis/ElevationProfile/ElevationProfileLineQuery.d.ts +1 -0
- package/analysis/ElevationProfileAnalysis.d.ts +5 -0
- package/analysis/ShadowCast/DiscreteOptions.d.ts +2 -2
- package/analysis/ShadowCast/TotalDurationOptions.d.ts +13 -4
- package/analysis/ShadowCastAnalysis.d.ts +8 -5
- package/arcade/Dictionary.js +1 -1
- package/arcade/Feature.js +1 -1
- package/arcade/Pixel.js +1 -1
- package/arcade/Voxel.js +1 -1
- package/arcade/arcade.js +1 -1
- package/arcade/arcadeAsyncRuntime.js +1 -1
- package/arcade/arcadeCompiler.js +1 -1
- package/arcade/arcadeEnvironment.js +1 -1
- package/arcade/arcadeRuntime.js +1 -1
- package/arcade/compilerUtils.js +1 -1
- package/arcade/containerUtils.js +1 -1
- package/arcade/debug.js +1 -1
- package/arcade/enum.js +1 -1
- package/arcade/executionError.js +1 -1
- package/arcade/functions/convertdirection.js +1 -1
- package/arcade/functions/date.js +1 -1
- package/arcade/functions/feature.js +1 -1
- package/arcade/functions/featuresetbase.js +1 -1
- package/arcade/functions/featuresetgeom.js +1 -1
- package/arcade/functions/featuresetstats.js +1 -1
- package/arcade/functions/featuresetstring.js +1 -1
- package/arcade/functions/geomasync.js +1 -1
- package/arcade/functions/geometry.js +1 -1
- package/arcade/functions/geomsync.js +1 -1
- package/arcade/functions/knowledgegraph.js +1 -1
- package/arcade/functions/maths.js +1 -1
- package/arcade/functions/stats.js +1 -1
- package/arcade/functions/string.js +1 -1
- package/arcade/functions/track.js +1 -1
- package/arcade/geometry/constructors.js +1 -1
- package/arcade/geometry/functions.js +1 -1
- package/arcade/geometry/unitConversion.js +1 -1
- package/arcade.js +1 -1
- package/assets/components/assets/icon/returnToDefault16.json +1 -0
- package/assets/components/assets/icon/returnToDefault24.json +1 -0
- package/assets/components/assets/icon/returnToDefault32.json +1 -0
- package/assets/components/assets/icon/reviewMap16.json +1 -0
- package/assets/components/assets/icon/reviewMap24.json +1 -0
- package/assets/components/assets/icon/reviewMap32.json +1 -0
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/03babc21d1781142a974.js +1 -0
- package/assets/esri/core/workers/chunks/08efd64acdfe46985293.js +1 -0
- package/assets/esri/core/workers/chunks/0b76534b60014d74ecb9.js +1 -0
- package/assets/esri/core/workers/chunks/{622bdd1b9d5d292ec12b.js → 0e6a388d51d9dbae46ba.js} +1 -1
- package/assets/esri/core/workers/chunks/{34e026549ba2822b8ebd.js → 13d43a0683c42b94feb6.js} +1 -1
- package/assets/esri/core/workers/chunks/{4f9ea7544b2d0e88a05c.js → 13f0e08de2dfab07d212.js} +1 -1
- package/assets/esri/core/workers/chunks/{35bbd63319d8aa9f31cc.js → 169c9eb6cd000e067c4b.js} +1 -1
- package/assets/esri/core/workers/chunks/{d4014213c476bf8099af.js → 18c4207b1cb0777560ba.js} +1 -1
- package/assets/esri/core/workers/chunks/{58c15c42e6a618386a2f.js → 1c8c8050d60205cf2156.js} +1 -1
- package/assets/esri/core/workers/chunks/1f537c05c2f643acb5e7.js +1 -0
- package/assets/esri/core/workers/chunks/241aeff6afd074ce105b.js +1 -0
- package/assets/esri/core/workers/chunks/{ddebc1dc10a2d207389f.js → 282f3d364411efac7b80.js} +1 -1
- package/assets/esri/core/workers/chunks/{d6d5ee9d0d998d730f81.js → 2bd334f9ab89334df713.js} +1 -1
- package/assets/esri/core/workers/chunks/340c68d09d2e8bef6727.js +2 -0
- package/assets/esri/core/workers/chunks/{17604cbd4d24158e2c16.js → 3835097520296b0517af.js} +1 -1
- package/assets/esri/core/workers/chunks/481dc7503587972a6bd2.js +2 -0
- package/assets/esri/core/workers/chunks/{9f4a9b193485f88d4461.js → 4afe76de6e82e86fe697.js} +1 -1
- package/assets/esri/core/workers/chunks/{ac408c62565e2c8b5975.js → 4c5cdd2712c938fafc5d.js} +1 -1
- package/assets/esri/core/workers/chunks/{ece30bfd5c49b8d99752.js → 5e5c7cc74ff1c9603aff.js} +1 -1
- package/assets/esri/core/workers/chunks/{502c3da8c49bf885f51d.js → 63ea9035dcf9ce45560c.js} +1 -1
- package/assets/esri/core/workers/chunks/{33ec193e6d7a0cb9d8dd.js → 6b66a6f69aa03338c346.js} +1 -1
- package/assets/esri/core/workers/chunks/{56b6b68d9459b1edea43.js → 6c97b5bc408f051606d2.js} +1 -1
- package/assets/esri/core/workers/chunks/{94eab215bab3e4e0e5b5.js → 711d1873c760313e287f.js} +1 -1
- package/assets/esri/core/workers/chunks/{4e13d639419ac64f7563.js → 7c077e1a63ab97bf3e87.js} +1 -1
- package/assets/esri/core/workers/chunks/86f2de7dda7992ae706c.js +1 -0
- package/assets/esri/core/workers/chunks/{a29cd1f5c7bb4f6a5a4f.js → 8d4881c879c86b353e08.js} +1 -1
- package/assets/esri/core/workers/chunks/{6e21675bbd7a44070771.js → 8ff83c59462dea6e3427.js} +1 -1
- package/assets/esri/core/workers/chunks/979bab62cad788180770.js +1 -0
- package/assets/esri/core/workers/chunks/9890c85a238879490926.js +1 -0
- package/assets/esri/core/workers/chunks/9ebc461529d5286fa2c2.js +2 -0
- package/assets/esri/core/workers/chunks/a95398214e530f896a2d.js +1 -0
- package/assets/esri/core/workers/chunks/{fc1fe1f58a65a1694c09.js → b02a68bbab07557cf02d.js} +1 -1
- package/assets/esri/core/workers/chunks/ba31616de9d73d83d867.js +1 -0
- package/assets/esri/core/workers/chunks/c7662455252b48531da1.js +1 -0
- package/assets/esri/core/workers/chunks/ca92176d5348e2c533d7.js +1 -0
- package/assets/esri/core/workers/chunks/cd5206e19d86c60e3cf0.js +1 -0
- package/assets/esri/core/workers/chunks/{bfb417d72d0c90e116fe.js → cedf3e316d6f89cf7005.js} +1 -1
- package/assets/esri/core/workers/chunks/d02aa7438f46c1c2167a.js +2 -0
- package/assets/esri/core/workers/chunks/d33a08e5f589355c57a3.js +1 -0
- package/assets/esri/core/workers/chunks/dd29fd1b3da90d3ca6b1.js +1 -0
- package/assets/esri/core/workers/chunks/e0036fa0324a96a88248.js +1 -0
- package/assets/esri/core/workers/chunks/{55334ad3618899cdbf78.js → e5854a3f69dffaf9464d.js} +2 -2
- package/assets/esri/core/workers/chunks/ed939fd5d3827a3f70e0.js +1 -0
- package/assets/esri/core/workers/chunks/fe8334352d256d691a95.js +1 -0
- package/assets/esri/themes/base/widgets/_BatchAttributeForm.scss +7 -0
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_ar.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_en.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ar.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_bg.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_bs.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ca.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_cs.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_da.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_de.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_el.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_en.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_es.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_et.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_fi.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_fr.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_he.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_hr.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_hu.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_id.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_it.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ja.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ko.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_lt.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_lv.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_nl.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_no.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_pl.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_pt-BR.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_pt-PT.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ro.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ru.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sk.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sl.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sr.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sv.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_th.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_tr.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_uk.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_vi.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_zh-CN.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_zh-HK.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_zh-TW.json +1 -1
- package/chunks/aiServices.js +1 -1
- package/chunks/arcade.js +1 -1
- package/chunks/array.js +1 -1
- package/chunks/languageUtils.js +1 -1
- package/config.js +1 -1
- package/identity/IdentityModal.js +1 -1
- package/kernel.js +1 -1
- package/layers/IntegratedMesh3DTilesLayer.js +1 -1
- package/layers/Lyr3DWasmPerSceneView.js +1 -1
- package/layers/graphics/data/QueryEngineCapabilities.js +1 -1
- package/layers/graphics/sources/parquet/PortalParquetLayerFileProvider.js +1 -1
- package/layers/support/SceneModification.js +1 -1
- package/layers/support/SceneModifications.js +1 -1
- package/layers/support/parquetUtils.js +1 -1
- package/package.json +2 -2
- package/renderers/ClassBreaksRenderer.js +1 -1
- package/renderers/UniqueValueRenderer.js +1 -1
- package/rest/print.js +1 -1
- package/rest/support/TranslateContent.js +1 -1
- package/rest/support/TranslateParameters.js +1 -1
- package/rest/support/TranslateResult.js +1 -1
- package/rest/translate.js +1 -1
- package/rest/utils.js +1 -1
- package/support/arcadeUtils.js +1 -1
- package/support/revision.js +1 -1
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/3d/analysis/ShadowCast/ShadowCastTooltip.js +1 -1
- package/views/3d/analysis/ShadowCastAnalysisView3D.js +1 -1
- package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Graphics3DPathSymbolLayer.js +1 -1
- package/views/3d/layers/support/Tiles3DMeshIntersectionHandler.js +1 -1
- package/views/3d/state/controllers/PinchAndPanControllerGlobal.js +1 -1
- package/views/3d/state/controllers/PinchAndPanControllerLocal.js +1 -1
- package/views/3d/state/utils/navigationUtils.js +1 -1
- package/views/3d/support/QualityProfile.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatFadeHelper.js +1 -1
- package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizer.js +1 -1
- package/views/3d/webgl-engine/lib/PathBuilder.js +1 -1
- package/views/3d/webgl-engine/lib/PathCapBuilder.js +1 -1
- package/views/3d/webgl-engine/lib/PathEvaluator.js +2 -0
- package/views/3d/webgl-engine/lib/PathExtruder.js +1 -1
- package/views/3d/webgl-engine/lib/PathFrame2D.js +2 -0
- package/views/3d/webgl-engine/lib/PathGeometryData.js +1 -1
- package/views/3d/webgl-engine/lib/PathVertex.js +1 -1
- package/views/3d/webgl-engine/lib/PathVertexInfo.js +2 -0
- package/views/3d/webgl-engine/shaders/GaussianSplatTechniqueConfiguration.js +1 -1
- package/views/DOMContainer.d.ts +2 -0
- package/views/LinkChartView.d.ts +47 -0
- package/views/MapView.d.ts +1 -85
- package/views/VideoView.d.ts +8 -1
- package/views/View2D.d.ts +78 -2
- package/views/draw/support/Reshape.js +1 -1
- package/views/interactive/tooltip/components/TooltipEditableField.js +1 -1
- package/views/interactive/tooltip/content/TooltipContent.js +1 -1
- package/views/types.d.ts +2 -3
- package/views/ui/DefaultUI.d.ts +1 -0
- package/widgets/Attachments.js +1 -1
- package/widgets/BasemapGallery.js +1 -1
- package/widgets/BasemapLayerList.js +1 -1
- package/widgets/BasemapToggle.js +1 -1
- package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.d.ts +10 -1
- package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js +1 -1
- package/widgets/BatchAttributeForm/css.js +1 -1
- package/widgets/BatchAttributeForm/inputs/AttachmentElementInput.d.ts +25 -1
- package/widgets/BatchAttributeForm/inputs/AttachmentElementInput.js +1 -1
- package/widgets/BatchAttributeForm/inputs/FieldInput.js +1 -1
- package/widgets/BatchAttributeForm/inputs/support/createBatchFormInputs.js +1 -1
- package/widgets/BatchAttributeForm/templates/support/createBatchFormTemplate.js +1 -1
- package/widgets/BatchAttributeForm.js +1 -1
- package/widgets/Bookmarks.js +1 -1
- package/widgets/BuildingExplorer/BuildingDisciplinesTree/BuildingDisciplinesNode.js +1 -1
- package/widgets/BuildingExplorer/BuildingLevelPicker/BuildingLevelPicker.js +1 -1
- package/widgets/BuildingExplorer/BuildingLevelPicker/Label.js +1 -1
- package/widgets/BuildingExplorer/BuildingLevelPicker/LevelItem.js +1 -1
- package/widgets/BuildingExplorer/BuildingPhasePicker/BuildingPhasePicker.js +1 -1
- package/widgets/CatalogLayerList.js +1 -1
- package/widgets/Compass.js +1 -1
- package/widgets/CoordinateConversion.js +1 -1
- package/widgets/Daylight.js +1 -1
- package/widgets/DirectionalPad.js +1 -1
- package/widgets/Directions.js +1 -1
- package/widgets/Editor/components/FeatureList.js +1 -1
- package/widgets/Editor/components/FooterActions.js +1 -1
- package/widgets/Editor/components/PendingFeatureList.js +1 -1
- package/widgets/Editor/components/Prompt.js +1 -1
- package/widgets/Editor/components/UpdateFeaturePanelContent.js +1 -1
- package/widgets/ElevationProfile/components/LegendItem.js +1 -1
- package/widgets/ElevationProfile.js +1 -1
- package/widgets/Expand.js +1 -1
- package/widgets/Feature/FeatureMedia.js +1 -1
- package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/FeatureFormUtilityNetworkAssociationList.js +1 -1
- package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/UtilityNetworkAssociationItemList.js +1 -1
- package/widgets/FeatureForm.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.js +1 -1
- package/widgets/FovOverlay.js +1 -1
- package/widgets/Fullscreen.js +1 -1
- package/widgets/Home.js +1 -1
- package/widgets/LayerList/LayerListItem.js +1 -1
- package/widgets/LayerList.js +1 -1
- package/widgets/Locate.js +1 -1
- package/widgets/NavigationToggle.js +1 -1
- package/widgets/OrientedImageryViewer/components/ImageLocationWidget.js +1 -1
- package/widgets/OrientedImageryViewer/components/ImageMeasurementWidget.js +1 -1
- package/widgets/OrientedImageryViewer/components/ImageOverlays.js +1 -1
- package/widgets/OrientedImageryViewer/components/NavigationActions.js +1 -1
- package/widgets/OrientedImageryViewer/components/NavigationUI360.js +1 -1
- package/widgets/OrientedImageryViewer/components/SequentialNavigationUI.js +1 -1
- package/widgets/OrientedImageryViewer/components/SketchTools.js +1 -1
- package/widgets/OrientedImageryViewer/components/VideoEnhancementTools.js +1 -1
- package/widgets/OrientedImageryViewer.js +1 -1
- package/widgets/PanoramicVideoViewer.js +1 -1
- package/widgets/Print/PrintViewModel.js +1 -1
- package/widgets/Print.js +1 -1
- package/widgets/Search.js +1 -1
- package/widgets/Sketch/support/ResponsiveToolbar/OverflowGroup.js +1 -1
- package/widgets/Sketch/support/ResponsiveToolbar/SplitButton.js +1 -1
- package/widgets/Sketch.js +1 -1
- package/widgets/Slice.js +1 -1
- package/widgets/Slider.js +1 -1
- package/widgets/Swipe.js +1 -1
- package/widgets/TableList.js +1 -1
- package/widgets/TimeSlider.js +1 -1
- package/widgets/TimeZoneLabel.js +1 -1
- package/widgets/Track.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.js +1 -1
- package/widgets/VideoPlayer/components/PlayerActionsGroup.js +1 -1
- package/widgets/VideoPlayer/components/PlayerControlsGroup.js +1 -1
- package/widgets/VideoPlayer/components/SettingsButton.js +1 -1
- package/widgets/Weather.js +1 -1
- package/widgets/Zoom.js +1 -1
- package/widgets/smartMapping/SmartMappingSliderBase.js +1 -1
- package/widgets/support/ColorPicker.js +1 -1
- package/widgets/support/ContingentValuesManager.js +1 -1
- package/widgets/support/FilterBuilder.js +1 -1
- package/widgets/support/GridControls.js +1 -1
- package/widgets/support/ItemList.js +1 -1
- package/widgets/support/LabeledSwitch.js +1 -1
- package/widgets/support/SelectionList.js +1 -1
- package/assets/esri/core/workers/chunks/1d1929f98d941179be29.js +0 -2
- package/assets/esri/core/workers/chunks/286bf3be9f524bde9529.js +0 -1
- package/assets/esri/core/workers/chunks/36ecb0082b8804b10fbf.js +0 -1
- package/assets/esri/core/workers/chunks/41a95ad470ec42ecd5a2.js +0 -1
- package/assets/esri/core/workers/chunks/547dc6ccb989bd962661.js +0 -1
- package/assets/esri/core/workers/chunks/549d348ca181d06aefb7.js +0 -2
- package/assets/esri/core/workers/chunks/56d9d3f108ff6e719dd4.js +0 -1
- package/assets/esri/core/workers/chunks/5c44638670e40e092ce3.js +0 -1
- package/assets/esri/core/workers/chunks/63934843c9f4ef779a07.js +0 -1
- package/assets/esri/core/workers/chunks/69c9eb93553b006b640d.js +0 -2
- package/assets/esri/core/workers/chunks/8330302096d4312a4393.js +0 -1
- package/assets/esri/core/workers/chunks/885eac78a76184efa1e5.js +0 -1
- package/assets/esri/core/workers/chunks/95dee5853c6e89f15ea9.js +0 -1
- package/assets/esri/core/workers/chunks/9da2f2b67837b491cfa3.js +0 -1
- package/assets/esri/core/workers/chunks/a913a1c83a667ed0e711.js +0 -1
- package/assets/esri/core/workers/chunks/b69d1d528e271568cbd8.js +0 -2
- package/assets/esri/core/workers/chunks/bc249bb667f0564ad093.js +0 -1
- package/assets/esri/core/workers/chunks/c8b96104641cb4afd4df.js +0 -1
- package/assets/esri/core/workers/chunks/cdb48d198145493f76f3.js +0 -1
- package/assets/esri/core/workers/chunks/e2bb95d601789bbda73b.js +0 -1
- package/assets/esri/core/workers/chunks/f1bb426400dac02880f1.js +0 -1
- package/assets/esri/core/workers/chunks/f3f984c62311c20a9db8.js +0 -1
- /package/assets/esri/core/workers/chunks/{69c9eb93553b006b640d.js.LICENSE.txt → 340c68d09d2e8bef6727.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{549d348ca181d06aefb7.js.LICENSE.txt → 481dc7503587972a6bd2.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{1d1929f98d941179be29.js.LICENSE.txt → 9ebc461529d5286fa2c2.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{b69d1d528e271568cbd8.js.LICENSE.txt → d02aa7438f46c1c2167a.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{55334ad3618899cdbf78.js.LICENSE.txt → e5854a3f69dffaf9464d.js.LICENSE.txt} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{substitute as t}from"../../intl.js";import{property as i,subclass as n}from"../../core/accessorSupport/decorators.js";import{isLayerFromCatalog as o,isCatalogSublayer as s}from"../../layers/catalog/catalogUtils.js";import{getActionIcon as l,getActionStyles as a}from"../../support/actions/actionUtils.js";import r from"../Widget.js";import{listItemHasChildren as c,areChildrenHidden as d,canSortSublayers as p,getSingleAction as m,getItem as u,getStatusIcon as g,getVisibilityIcon as y}from"./support/layerListUtils.js";import{loadCalciteComponents as h}from"../support/componentsUtils.js";import{tsx as b}from"../support/widget.js";import{setFocus as v}from"../support/widgetUtils.js";var _;let I=class extends r{static{_=this}constructor(e){super(e),this.dragEnabled=!1,this.listModeDisabled=!1,this.parent=null,this.parentTitles=null,this.viewModel=null,this._onActionMenuOpen=e=>{this.item.actionsOpen=e.currentTarget.open},this._setTooltipReference=e=>{this.onTooltipReferenceChange?.(this.item.layer?.uid,e)},this._removeTooltipReference=()=>{this.onTooltipReferenceChange?.(this.item.layer?.uid,null)}}loadDependencies(){return h({"action-group":()=>import("@esri/calcite-components/dist/components/calcite-action-group"),"action-menu":()=>import("@esri/calcite-components/dist/components/calcite-action-menu"),action:()=>import("@esri/calcite-components/dist/components/calcite-action"),icon:()=>import("@esri/calcite-components/dist/components/calcite-icon"),"list-item":()=>import("@esri/calcite-components/dist/components/calcite-list-item"),list:()=>import("@esri/calcite-components/dist/components/calcite-list"),notice:()=>import("@esri/calcite-components/dist/components/calcite-notice")})}static{this.vnodeSelector="calcite-list-item"}render(){const e=this.parentTitles??[],{_title:t,item:i,activeItem:n,selectionMode:o,selectedItems:s,messages:l,parent:a,css:r,dragDisabled:c}=this,d="visibleAtCurrentTimeExtent"in i&&"layerInvisibleAtTime"in l&&!i.visibleAtCurrentTimeExtent?`${t} (${l.layerInvisibleAtTime})`:"visibleAtCurrentScale"in i&&"layerInvisibleAtScale"in l&&!i.visibleAtCurrentScale?`${t} (${l.layerInvisibleAtScale})`:t,p="parent"in i&&"catalog"===i.parent?.layer?.type,{layer:m}=i,u="visibleAtCurrentScale"in i&&!i.visibleAtCurrentScale||"visibleAtCurrentTimeExtent"in i&&!i.visibleAtCurrentTimeExtent;return b("calcite-list-item",{afterCreate:e=>this._focusSelectedDragEl(e,i),afterUpdate:e=>this._focusSelectedDragEl(e,i),class:this.classes(r.item,"itemActive"in r&&{[r.itemActive]:n===i}),"data-item":i,"data-layer-id":m?.id,dragDisabled:!i.sortable||p||c,expanded:"open"in i&&i.open,id:m?.uid,key:`list-item-${m?.uid}`,label:t,metadata:{parentTitles:e,_title:t},selected:"none"!==o&&s.includes(i),title:d,unavailable:u,value:m?.uid,onCalciteListItemSelect:e=>"visible"in i&&this._handleCalciteListItemSelect(e,i,a),onCalciteListItemToggle:e=>"open"in i&&this._handleCalciteListItemToggle(e,i)},this._renderedCatalogFootprintIcon,this._renderedCatalogDynamicIcon,this._renderedItemStatus,this._renderedItemToggle,this._renderedCatalogSelectNode,this._renderedItemTemporaryIcon,this._renderedChildList,this._renderedItemMessage,this._renderedPanel,this._renderedPanelAction,this._renderedActions)}get _title(){const{messages:e}=this;return this.item.title||("untitledTable"in e?e.untitledTable:e.untitledLayer)}get _renderedItemStatus(){const{item:e,parent:t,visibleElements:i,css:n}=this;if(!i.statusIndicators)return null;const{publishing:o}=e,s="updating"in e&&e.updating&&!t,l="connectionStatus"in e?e.connectionStatus:void 0,a=!!l,r=o||s||a?g({connectionStatus:l,publishing:o}):"blank";return b("calcite-icon",{class:this.classes(n.statusIndicator,{[n.publishing]:o},"updating"in n&&{[n.updating]:s},"connectionStatus"in n&&{[n.connectionStatus]:a},"connectionStatusConnected"in n&&{[n.connectionStatusConnected]:a&&"connected"===l}),icon:r,key:"layer-item-status",scale:"s",slot:"content-end"})}get _renderedItemTemporaryIcon(){const{item:e,visibleElements:t,css:i}=this,{layer:n}=e,s="temporaryLayerIndicators"in t&&t.temporaryLayerIndicators,l="temporaryTableIndicators"in t&&t.temporaryTableIndicators,a=n&&"persistenceEnabled"in n&&(o(n)||!n.persistenceEnabled);return(s||l)&&a?b("calcite-icon",{class:i.itemTemporaryIcon,icon:"temporary",key:"temporary-icon",scale:"s",slot:"content-start",title:this.messages.temporary}):null}get _renderedItemToggle(){const{_title:e,item:i,parent:n,messages:o,visibilityAppearance:s,css:l}=this;if(!("visible"in i&&"layerVisibility"in o&&"showLayer"in o&&"hideLayer"in o&&"visibleToggle"in l&&s))return null;const{visible:a}=i,r=this._getParentVisibilityMode(n);if("inherited"===r)return null;const c=y({visible:a,exclusive:"exclusive"===r,visibilityAppearance:s}),d="checkbox"===s,p=o.layerVisibility,m=t(a?o.hideLayer:o.showLayer,{layerName:e});return b("calcite-action",{class:l.visibleToggle,icon:d?c:void 0,key:"visibility-toggle",label:m,onclick:()=>this._toggleVisibility(i,n),slot:d?"actions-start":"actions-end",text:p,title:m},d?null:b("calcite-icon",{class:this.classes({[l.visibleIcon]:"exclusive"!==r&&a}),icon:c,scale:"s"}))}get _renderedPanel(){const{panel:e}=this.item;return!e?.open||e.disabled||e.flowEnabled?null:b("div",{class:this.css.itemContentBottom,key:`content-panel-${e.uid}`,slot:"content-bottom"},e.render())}get _renderedPanelAction(){const{panel:e}=this.item;if(!e?.visible)return null;const{open:t,title:i,disabled:n}=e;return b("calcite-action",{active:t,disabled:n,icon:l(e),key:`action-${e.uid}`,onclick:()=>this._togglePanel(e),slot:"actions-end",text:i??"",title:i??void 0},this._renderFallbackIcon(e))}get _renderedActions(){switch(this._actionsCount){case 0:return null;case 1:return this._singleAction;default:return this._renderedActionMenu}}get _renderedActionMenu(){const{item:e,messagesCommon:t}=this,i=t.options;return b("calcite-action-menu",{appearance:"transparent",key:"item-action-menu",label:t.menu,open:e.actionsOpen,overlayPositioning:"fixed",placement:"bottom-end",slot:"actions-end",onCalciteActionMenuOpen:this._onActionMenuOpen},b("calcite-action",{icon:"ellipsis",slot:"trigger",text:i,title:i}),this._renderedActionMenuContent)}get _renderedActionMenuContent(){return this._filteredSections.toArray().map(e=>b("calcite-action-group",{key:`action-section-${e.uid}`},e.toArray().map(e=>this._renderAction({action:e,textEnabled:!0}))))}get _renderedCatalogFootprintIcon(){const{css:e}=this,t=this.item.layer,i="catalog-footprint"===t?.type,n="sublayer"===t?.type&&s(t,"footprints");return"itemCatalogIcon"in e&&(i||n)?b("calcite-icon",{class:e.itemCatalogIcon,icon:"footprint",key:"footprint",scale:"s",slot:"content-start"}):null}get _renderedCatalogDynamicIcon(){const{css:e}=this,t=this.item.layer,i="catalog-dynamic-group"===t?.type,n="sublayer"===t?.type&&s(t,"layers-in-view");return"itemCatalogIcon"in e&&(i||n)?b("calcite-icon",{class:e.itemCatalogIcon,icon:"catalog-dataset",key:"catalog-dataset",scale:"s",slot:"content-start"}):null}get _renderedCatalogSelectNode(){const{_title:e,item:t,visibleElements:i}=this;if(!("visible"in t))return;const{layer:n}=t,o="catalog-dynamic-group"===n?.type;return"catalogLayerList"in i&&i.catalogLayerList&&o?b("calcite-action",{disabled:!n.visible,icon:"chevron-right",iconFlipRtl:!0,onclick:()=>this._triggerOnCatalogOpen(t),slot:"actions-end",text:e}):null}get _renderedChildList(){const{dragEnabled:e,item:t,rootGroupUid:i,listModeDisabled:n,selectionMode:o,displayMode:s}=this;if(!("children"in t))return;const l=[...this.parentTitles??[],t.title],{children:a,layer:r}=t,m="catalog-dynamic-group"!==r?.type&&c(t),u=!n&&d(r),g="group"===r?.type,y=!u&&!m&&e&&g,h=!!e&&("childrenSortable"in t&&t.childrenSortable&&p(t));return m||y?b("calcite-list",{canPull:e=>!!this.canMove&&this.canMove(e,"pull"),canPut:e=>!!this.canMove&&this.canMove(e,"put"),"data-item":t,"data-layer-type":i,displayMode:s,dragEnabled:h,group:g?i:`${i}-${r?.uid}`,key:`child-list-${r?.uid}`,label:t.title,selectionAppearance:"border",selectionMode:o},a?.filter(e=>!e.hidden&&(this.visibleElements.errors||!e.error)).toArray().map(e=>this._renderItem(e,t,l)),this._renderedTablesItem):null}get _hasTables(){const{layerTablesEnabled:e}=this,t=this.item.layer;if(!e||!t)return!1;switch(t.type){case"knowledge-graph":return e.includes(t.type)&&"tables"in t&&!!t.tables?.length;case"map-image":case"tile":return e.includes(t.type)&&"subtables"in t&&!!t.subtables?.length;default:return!1}}get _renderedTablesItem(){const{item:e,messages:t,css:i}=this,{layer:n}=e;return"itemTableIcon"in i&&"visible"in e&&"tables"in t&&this._hasTables?b("calcite-list-item",{class:i.item,"data-layer-id":n?.id,dragDisabled:!0,key:`list-item-table-list-tables-${n?.uid}`,label:t.tables,title:t.tables,onCalciteListItemSelect:()=>this._triggerOnTablesOpen(e)},b("calcite-icon",{class:i.itemTableIcon,icon:"table",scale:"s",slot:"content-start"}),b("calcite-icon",{flipRtl:!0,icon:"chevron-right",scale:"s",slot:"content-end"})):null}get _renderedItemMessage(){const{item:e,messages:t,css:i}=this;return e.error?b("div",{class:i.itemMessage,key:"esri-layer-list__error",slot:"content-bottom"},b("calcite-notice",{icon:"exclamation-mark-triangle",kind:"warning",open:!0,scale:"s",width:"full"},b("div",{slot:"message"},"tableError"in t?t.tableError:t.layerError))):"incompatible"in e&&e.incompatible&&"layerIncompatible"in t?b("div",{class:i.itemMessage,key:"esri-layer-list__incompatible",slot:"content-bottom"},b("calcite-notice",{afterCreate:this._setTooltipReference,afterRemoved:this._removeTooltipReference,bind:this,icon:"exclamation-mark-triangle",kind:"warning",open:!0,scale:"s",tabIndex:0,width:"full"},b("div",{slot:"message"},t.layerIncompatible))):null}get _singleAction(){return this._renderAction({action:m(this._filteredSections),textEnabled:!1})}get _filteredSections(){return this.item.actionsSections.map(e=>e.filter(e=>e.visible))}get _actionsCount(){return this.item.actionsSections.reduce((e,t)=>e+t.length,0)}_renderAction(e){const{item:t}=this,{action:i,textEnabled:n}=e;if(!i)return null;const{active:o,disabled:s,title:a,type:r,indicator:c}=i;return b("calcite-action",{active:"toggle"===r&&i.value,"data-action-id":i.id,disabled:s,icon:l(i),indicator:c,key:`action-${i.uid}`,loading:o,onclick:()=>this._triggerAction(t,i),slot:n?void 0:"actions-end",text:a??"",textEnabled:n,title:a??void 0},this._renderFallbackIcon(i))}_renderFallbackIcon(e){const{css:t}=this,{icon:i}=e,n="className"in e?e.className:void 0;if(i)return null;const o="image"in e?e.image:void 0,s={[t.itemActionIcon]:!!n,[t.itemActionImage]:!!o};return n&&(s[n]=!0),o||n?b("span",{"aria-hidden":"true",class:this.classes(t.itemActionIcon,s),key:"icon",styles:a(o)}):null}_renderItem(e,t,i=[]){return b(_,{activeItem:this.activeItem,canMove:this.canMove,css:this.css,displayMode:this.displayMode,dragEnabled:this.dragEnabled,item:e,key:`layerListItem-${e.layer?.uid}`,layerTablesEnabled:this.layerTablesEnabled,listModeDisabled:this.listModeDisabled,messages:this.messages,messagesCommon:this.messagesCommon,parent:t,parentTitles:i,rootGroupUid:this.rootGroupUid,selectedDragItemLayerUid:this.selectedDragItemLayerUid,selectedItems:this.selectedItems,selectionMode:this.selectionMode,visibilityAppearance:this.visibilityAppearance,visibleElements:this.visibleElements,onAction:this.onAction,onCatalogOpen:this.onCatalogOpen,onPanelOpen:this.onPanelOpen,onSelectedDragItemLayerUidChange:this.onSelectedDragItemLayerUidChange,onTablesOpen:this.onTablesOpen,onTooltipReferenceChange:this.onTooltipReferenceChange})}_triggerAction(e,t){t&&e&&("toggle"===t.type&&(t.value=!t.value),this.onAction(t,e))}_triggerOnTablesOpen(e){e&&this.onTablesOpen&&this.onTablesOpen(e)}_triggerOnCatalogOpen(e){e&&this.onCatalogOpen?.(e)}_focusSelectedDragEl(e,t){this.selectedDragItemLayerUid===t.layer?.uid&&(v(e),this.onSelectedDragItemLayerUidChange?.(null))}_handleCalciteListItemToggle(e,t){e.stopPropagation(),t.open=e.target.expanded}_getParentVisibilityMode(e){return e&&"visibilityMode"in e?e.visibilityMode:null}_handleCalciteListItemSelect(e,t,i){if(u(e.target)!==t)return;const n=this._getParentVisibilityMode(i);"none"===this.selectionMode&&"inherited"!==n&&this._toggleVisibility(t,i)}_togglePanel(e){e.open=!e.open,e.open&&this.onPanelOpen()}_toggleVisibility(e,t){if(!e||!("visible"in e))return;"exclusive"===this._getParentVisibilityMode(t)&&e.visible||(e.visible=!e.visible)}};e([i()],I.prototype,"activeItem",void 0),e([i()],I.prototype,"canMove",void 0),e([i()],I.prototype,"css",void 0),e([i()],I.prototype,"displayMode",void 0),e([i()],I.prototype,"dragEnabled",void 0),e([i()],I.prototype,"dragDisabled",void 0),e([i()],I.prototype,"item",void 0),e([i()],I.prototype,"layerTablesEnabled",void 0),e([i()],I.prototype,"listModeDisabled",void 0),e([i()],I.prototype,"messages",void 0),e([i()],I.prototype,"messagesCommon",void 0),e([i()],I.prototype,"onAction",void 0),e([i()],I.prototype,"onPanelOpen",void 0),e([i()],I.prototype,"onCatalogOpen",void 0),e([i()],I.prototype,"onTablesOpen",void 0),e([i()],I.prototype,"onSelectedDragItemLayerUidChange",void 0),e([i()],I.prototype,"onTooltipReferenceChange",void 0),e([i()],I.prototype,"parent",void 0),e([i()],I.prototype,"parentTitles",void 0),e([i()],I.prototype,"rootGroupUid",void 0),e([i()],I.prototype,"selectionMode",void 0),e([i()],I.prototype,"selectedItems",void 0),e([i()],I.prototype,"selectedDragItemLayerUid",void 0),e([i()],I.prototype,"visibleElements",void 0),e([i()],I.prototype,"visibilityAppearance",void 0),e([i()],I.prototype,"_title",null),e([i()],I.prototype,"_renderedItemStatus",null),e([i()],I.prototype,"_renderedItemTemporaryIcon",null),e([i()],I.prototype,"_renderedItemToggle",null),e([i()],I.prototype,"_renderedPanel",null),e([i()],I.prototype,"_renderedPanelAction",null),e([i()],I.prototype,"_renderedActions",null),e([i()],I.prototype,"_renderedActionMenu",null),e([i()],I.prototype,"_renderedActionMenuContent",null),e([i()],I.prototype,"_renderedCatalogFootprintIcon",null),e([i()],I.prototype,"_renderedCatalogDynamicIcon",null),e([i()],I.prototype,"_renderedCatalogSelectNode",null),e([i()],I.prototype,"_renderedChildList",null),e([i()],I.prototype,"_hasTables",null),e([i()],I.prototype,"_renderedTablesItem",null),e([i()],I.prototype,"_renderedItemMessage",null),e([i()],I.prototype,"_singleAction",null),e([i()],I.prototype,"_filteredSections",null),e([i()],I.prototype,"_actionsCount",null),I=_=e([n("esri.widgets.LayerList.LayerListItem")],I);const C=I;export{C as default};
|
|
2
|
+
import{__decorate as e}from"tslib";import{substitute as t}from"../../intl.js";import{property as i,subclass as n}from"../../core/accessorSupport/decorators.js";import{isLayerFromCatalog as o,isCatalogSublayer as s}from"../../layers/catalog/catalogUtils.js";import{getActionIcon as l,getActionStyles as a}from"../../support/actions/actionUtils.js";import r from"../Widget.js";import{listItemHasChildren as c,areChildrenHidden as d,canSortSublayers as p,getSingleAction as m,getItem as u,getStatusIcon as g,getVisibilityIcon as y}from"./support/layerListUtils.js";import{loadCalciteComponents as h}from"../support/componentsUtils.js";import{tsx as b}from"../support/widget.js";import{setFocus as v}from"../support/widgetUtils.js";var _;let I=class extends r{static{_=this}constructor(e){super(e),this.dragEnabled=!1,this.listModeDisabled=!1,this.parent=null,this.parentTitles=null,this.viewModel=null,this._onActionMenuOpen=e=>{this.item.actionsOpen=e.currentTarget.open},this._setTooltipReference=e=>{this.onTooltipReferenceChange?.(this.item.layer?.uid,e)},this._removeTooltipReference=()=>{this.onTooltipReferenceChange?.(this.item.layer?.uid,null)}}loadDependencies(){return h({"action-group":()=>import("@esri/calcite-components/dist/components/calcite-action-group"),"action-menu":()=>import("@esri/calcite-components/dist/components/calcite-action-menu"),action:()=>import("@esri/calcite-components/dist/components/calcite-action"),icon:()=>import("@esri/calcite-components/dist/components/calcite-icon"),"list-item":()=>import("@esri/calcite-components/dist/components/calcite-list-item"),list:()=>import("@esri/calcite-components/dist/components/calcite-list"),notice:()=>import("@esri/calcite-components/dist/components/calcite-notice")})}static{this.vnodeSelector="calcite-list-item"}render(){const e=this.parentTitles??[],{_title:t,item:i,activeItem:n,selectionMode:o,selectedItems:s,messages:l,parent:a,css:r,dragDisabled:c}=this,d="visibleAtCurrentTimeExtent"in i&&"layerInvisibleAtTime"in l&&!i.visibleAtCurrentTimeExtent?`${t} (${l.layerInvisibleAtTime})`:"visibleAtCurrentScale"in i&&"layerInvisibleAtScale"in l&&!i.visibleAtCurrentScale?`${t} (${l.layerInvisibleAtScale})`:t,p="parent"in i&&"catalog"===i.parent?.layer?.type,{layer:m}=i,u="visibleAtCurrentScale"in i&&!i.visibleAtCurrentScale||"visibleAtCurrentTimeExtent"in i&&!i.visibleAtCurrentTimeExtent;return b("calcite-list-item",{afterCreate:e=>this._focusSelectedDragEl(e,i),afterUpdate:e=>this._focusSelectedDragEl(e,i),class:this.classes(r.item,"itemActive"in r&&{[r.itemActive]:n===i}),"data-item":i,"data-layer-id":m?.id,dragDisabled:!i.sortable||p||c,expanded:"open"in i&&i.open,id:m?.uid,key:`list-item-${m?.uid}`,label:t,metadata:{parentTitles:e,_title:t},selected:"none"!==o&&s.includes(i),title:d,unavailable:u,value:m?.uid,onCalciteListItemSelect:e=>"visible"in i&&this._handleCalciteListItemSelect(e,i,a),onCalciteListItemToggle:e=>"open"in i&&this._handleCalciteListItemToggle(e,i)},this._renderedCatalogFootprintIcon,this._renderedCatalogDynamicIcon,this._renderedItemStatus,this._renderedItemToggle,this._renderedCatalogSelectNode,this._renderedItemTemporaryIcon,this._renderedChildList,this._renderedItemMessage,this._renderedPanel,this._renderedPanelAction,this._renderedActions)}get _title(){const{messages:e}=this;return this.item.title||("untitledTable"in e?e.untitledTable:e.untitledLayer)}get _renderedItemStatus(){const{item:e,parent:t,visibleElements:i,css:n}=this;if(!i.statusIndicators)return null;const{publishing:o}=e,s="updating"in e&&e.updating&&!t,l="connectionStatus"in e?e.connectionStatus:void 0,a=!!l,r=o||s||a?g({connectionStatus:l,publishing:o}):"blank";return b("calcite-icon",{class:this.classes(n.statusIndicator,{[n.publishing]:o},"updating"in n&&{[n.updating]:s},"connectionStatus"in n&&{[n.connectionStatus]:a},"connectionStatusConnected"in n&&{[n.connectionStatusConnected]:a&&"connected"===l}),icon:r,key:"layer-item-status",scale:"s",slot:"content-end"})}get _renderedItemTemporaryIcon(){const{item:e,visibleElements:t,css:i}=this,{layer:n}=e,s="temporaryLayerIndicators"in t&&t.temporaryLayerIndicators,l="temporaryTableIndicators"in t&&t.temporaryTableIndicators,a=n&&"persistenceEnabled"in n&&(o(n)||!n.persistenceEnabled);return(s||l)&&a?b("calcite-icon",{class:i.itemTemporaryIcon,icon:"temporary",key:"temporary-icon",scale:"s",slot:"content-start",title:this.messages.temporary}):null}get _renderedItemToggle(){const{_title:e,item:i,parent:n,messages:o,visibilityAppearance:s,css:l}=this;if(!("visible"in i&&"layerVisibility"in o&&"showLayer"in o&&"hideLayer"in o&&"visibleToggle"in l&&s))return null;const{visible:a}=i,r=this._getParentVisibilityMode(n);if("inherited"===r)return null;const c=y({visible:a,exclusive:"exclusive"===r,visibilityAppearance:s}),d="checkbox"===s,p=o.layerVisibility,m=t(a?o.hideLayer:o.showLayer,{layerName:e});return b("calcite-action",{class:l.visibleToggle,icon:d?c:void 0,key:"visibility-toggle",label:m,slot:d?"actions-start":"actions-end",text:p,title:m,onclick:()=>this._toggleVisibility(i,n)},d?null:b("calcite-icon",{class:this.classes({[l.visibleIcon]:"exclusive"!==r&&a}),icon:c,scale:"s"}))}get _renderedPanel(){const{panel:e}=this.item;return!e?.open||e.disabled||e.flowEnabled?null:b("div",{class:this.css.itemContentBottom,key:`content-panel-${e.uid}`,slot:"content-bottom"},e.render())}get _renderedPanelAction(){const{panel:e}=this.item;if(!e?.visible)return null;const{open:t,title:i,disabled:n}=e;return b("calcite-action",{active:t,disabled:n,icon:l(e),key:`action-${e.uid}`,slot:"actions-end",text:i??"",title:i??void 0,onclick:()=>this._togglePanel(e)},this._renderFallbackIcon(e))}get _renderedActions(){switch(this._actionsCount){case 0:return null;case 1:return this._singleAction;default:return this._renderedActionMenu}}get _renderedActionMenu(){const{item:e,messagesCommon:t}=this,i=t.options;return b("calcite-action-menu",{appearance:"transparent",key:"item-action-menu",label:t.menu,open:e.actionsOpen,overlayPositioning:"fixed",placement:"bottom-end",slot:"actions-end",onCalciteActionMenuOpen:this._onActionMenuOpen},b("calcite-action",{icon:"ellipsis",slot:"trigger",text:i,title:i}),this._renderedActionMenuContent)}get _renderedActionMenuContent(){return this._filteredSections.toArray().map(e=>b("calcite-action-group",{key:`action-section-${e.uid}`},e.toArray().map(e=>this._renderAction({action:e,textEnabled:!0}))))}get _renderedCatalogFootprintIcon(){const{css:e}=this,t=this.item.layer,i="catalog-footprint"===t?.type,n="sublayer"===t?.type&&s(t,"footprints");return"itemCatalogIcon"in e&&(i||n)?b("calcite-icon",{class:e.itemCatalogIcon,icon:"footprint",key:"footprint",scale:"s",slot:"content-start"}):null}get _renderedCatalogDynamicIcon(){const{css:e}=this,t=this.item.layer,i="catalog-dynamic-group"===t?.type,n="sublayer"===t?.type&&s(t,"layers-in-view");return"itemCatalogIcon"in e&&(i||n)?b("calcite-icon",{class:e.itemCatalogIcon,icon:"catalog-dataset",key:"catalog-dataset",scale:"s",slot:"content-start"}):null}get _renderedCatalogSelectNode(){const{_title:e,item:t,visibleElements:i}=this;if(!("visible"in t))return;const{layer:n}=t,o="catalog-dynamic-group"===n?.type;return"catalogLayerList"in i&&i.catalogLayerList&&o?b("calcite-action",{disabled:!n.visible,icon:"chevron-right",iconFlipRtl:!0,slot:"actions-end",text:e,onclick:()=>this._triggerOnCatalogOpen(t)}):null}get _renderedChildList(){const{dragEnabled:e,item:t,rootGroupUid:i,listModeDisabled:n,selectionMode:o,displayMode:s}=this;if(!("children"in t))return;const l=[...this.parentTitles??[],t.title],{children:a,layer:r}=t,m="catalog-dynamic-group"!==r?.type&&c(t),u=!n&&d(r),g="group"===r?.type,y=!u&&!m&&e&&g,h=!!e&&("childrenSortable"in t&&t.childrenSortable&&p(t));return m||y?b("calcite-list",{canPull:e=>!!this.canMove&&this.canMove(e,"pull"),canPut:e=>!!this.canMove&&this.canMove(e,"put"),"data-item":t,"data-layer-type":i,displayMode:s,dragEnabled:h,group:g?i:`${i}-${r?.uid}`,key:`child-list-${r?.uid}`,label:t.title,selectionAppearance:"border",selectionMode:o},a?.filter(e=>!e.hidden&&(this.visibleElements.errors||!e.error)).toArray().map(e=>this._renderItem(e,t,l)),this._renderedTablesItem):null}get _hasTables(){const{layerTablesEnabled:e}=this,t=this.item.layer;if(!e||!t)return!1;switch(t.type){case"knowledge-graph":return e.includes(t.type)&&"tables"in t&&!!t.tables?.length;case"map-image":case"tile":return e.includes(t.type)&&"subtables"in t&&!!t.subtables?.length;default:return!1}}get _renderedTablesItem(){const{item:e,messages:t,css:i}=this,{layer:n}=e;return"itemTableIcon"in i&&"visible"in e&&"tables"in t&&this._hasTables?b("calcite-list-item",{class:i.item,"data-layer-id":n?.id,dragDisabled:!0,key:`list-item-table-list-tables-${n?.uid}`,label:t.tables,title:t.tables,onCalciteListItemSelect:()=>this._triggerOnTablesOpen(e)},b("calcite-icon",{class:i.itemTableIcon,icon:"table",scale:"s",slot:"content-start"}),b("calcite-icon",{flipRtl:!0,icon:"chevron-right",scale:"s",slot:"content-end"})):null}get _renderedItemMessage(){const{item:e,messages:t,css:i}=this;return e.error?b("div",{class:i.itemMessage,key:"esri-layer-list__error",slot:"content-bottom"},b("calcite-notice",{icon:"exclamation-mark-triangle",kind:"warning",open:!0,scale:"s",width:"full"},b("div",{slot:"message"},"tableError"in t?t.tableError:t.layerError))):"incompatible"in e&&e.incompatible&&"layerIncompatible"in t?b("div",{class:i.itemMessage,key:"esri-layer-list__incompatible",slot:"content-bottom"},b("calcite-notice",{afterCreate:this._setTooltipReference,afterRemoved:this._removeTooltipReference,bind:this,icon:"exclamation-mark-triangle",kind:"warning",open:!0,scale:"s",tabIndex:0,width:"full"},b("div",{slot:"message"},t.layerIncompatible))):null}get _singleAction(){return this._renderAction({action:m(this._filteredSections),textEnabled:!1})}get _filteredSections(){return this.item.actionsSections.map(e=>e.filter(e=>e.visible))}get _actionsCount(){return this.item.actionsSections.reduce((e,t)=>e+t.length,0)}_renderAction(e){const{item:t}=this,{action:i,textEnabled:n}=e;if(!i)return null;const{active:o,disabled:s,title:a,type:r,indicator:c}=i;return b("calcite-action",{active:"toggle"===r&&i.value,"data-action-id":i.id,disabled:s,icon:l(i),indicator:c,key:`action-${i.uid}`,loading:o,slot:n?void 0:"actions-end",text:a??"",textEnabled:n,title:a??void 0,onclick:()=>this._triggerAction(t,i)},this._renderFallbackIcon(i))}_renderFallbackIcon(e){const{css:t}=this,{icon:i}=e,n="className"in e?e.className:void 0;if(i)return null;const o="image"in e?e.image:void 0,s={[t.itemActionIcon]:!!n,[t.itemActionImage]:!!o};return n&&(s[n]=!0),o||n?b("span",{"aria-hidden":"true",class:this.classes(t.itemActionIcon,s),key:"icon",styles:a(o)}):null}_renderItem(e,t,i=[]){return b(_,{activeItem:this.activeItem,canMove:this.canMove,css:this.css,displayMode:this.displayMode,dragEnabled:this.dragEnabled,item:e,key:`layerListItem-${e.layer?.uid}`,layerTablesEnabled:this.layerTablesEnabled,listModeDisabled:this.listModeDisabled,messages:this.messages,messagesCommon:this.messagesCommon,parent:t,parentTitles:i,rootGroupUid:this.rootGroupUid,selectedDragItemLayerUid:this.selectedDragItemLayerUid,selectedItems:this.selectedItems,selectionMode:this.selectionMode,visibilityAppearance:this.visibilityAppearance,visibleElements:this.visibleElements,onAction:this.onAction,onCatalogOpen:this.onCatalogOpen,onPanelOpen:this.onPanelOpen,onSelectedDragItemLayerUidChange:this.onSelectedDragItemLayerUidChange,onTablesOpen:this.onTablesOpen,onTooltipReferenceChange:this.onTooltipReferenceChange})}_triggerAction(e,t){t&&e&&("toggle"===t.type&&(t.value=!t.value),this.onAction(t,e))}_triggerOnTablesOpen(e){e&&this.onTablesOpen&&this.onTablesOpen(e)}_triggerOnCatalogOpen(e){e&&this.onCatalogOpen?.(e)}_focusSelectedDragEl(e,t){this.selectedDragItemLayerUid===t.layer?.uid&&(v(e),this.onSelectedDragItemLayerUidChange?.(null))}_handleCalciteListItemToggle(e,t){e.stopPropagation(),t.open=e.target.expanded}_getParentVisibilityMode(e){return e&&"visibilityMode"in e?e.visibilityMode:null}_handleCalciteListItemSelect(e,t,i){if(u(e.target)!==t)return;const n=this._getParentVisibilityMode(i);"none"===this.selectionMode&&"inherited"!==n&&this._toggleVisibility(t,i)}_togglePanel(e){e.open=!e.open,e.open&&this.onPanelOpen()}_toggleVisibility(e,t){if(!e||!("visible"in e))return;"exclusive"===this._getParentVisibilityMode(t)&&e.visible||(e.visible=!e.visible)}};e([i()],I.prototype,"activeItem",void 0),e([i()],I.prototype,"canMove",void 0),e([i()],I.prototype,"css",void 0),e([i()],I.prototype,"displayMode",void 0),e([i()],I.prototype,"dragEnabled",void 0),e([i()],I.prototype,"dragDisabled",void 0),e([i()],I.prototype,"item",void 0),e([i()],I.prototype,"layerTablesEnabled",void 0),e([i()],I.prototype,"listModeDisabled",void 0),e([i()],I.prototype,"messages",void 0),e([i()],I.prototype,"messagesCommon",void 0),e([i()],I.prototype,"onAction",void 0),e([i()],I.prototype,"onPanelOpen",void 0),e([i()],I.prototype,"onCatalogOpen",void 0),e([i()],I.prototype,"onTablesOpen",void 0),e([i()],I.prototype,"onSelectedDragItemLayerUidChange",void 0),e([i()],I.prototype,"onTooltipReferenceChange",void 0),e([i()],I.prototype,"parent",void 0),e([i()],I.prototype,"parentTitles",void 0),e([i()],I.prototype,"rootGroupUid",void 0),e([i()],I.prototype,"selectionMode",void 0),e([i()],I.prototype,"selectedItems",void 0),e([i()],I.prototype,"selectedDragItemLayerUid",void 0),e([i()],I.prototype,"visibleElements",void 0),e([i()],I.prototype,"visibilityAppearance",void 0),e([i()],I.prototype,"_title",null),e([i()],I.prototype,"_renderedItemStatus",null),e([i()],I.prototype,"_renderedItemTemporaryIcon",null),e([i()],I.prototype,"_renderedItemToggle",null),e([i()],I.prototype,"_renderedPanel",null),e([i()],I.prototype,"_renderedPanelAction",null),e([i()],I.prototype,"_renderedActions",null),e([i()],I.prototype,"_renderedActionMenu",null),e([i()],I.prototype,"_renderedActionMenuContent",null),e([i()],I.prototype,"_renderedCatalogFootprintIcon",null),e([i()],I.prototype,"_renderedCatalogDynamicIcon",null),e([i()],I.prototype,"_renderedCatalogSelectNode",null),e([i()],I.prototype,"_renderedChildList",null),e([i()],I.prototype,"_hasTables",null),e([i()],I.prototype,"_renderedTablesItem",null),e([i()],I.prototype,"_renderedItemMessage",null),e([i()],I.prototype,"_singleAction",null),e([i()],I.prototype,"_filteredSections",null),e([i()],I.prototype,"_actionsCount",null),I=_=e([n("esri.widgets.LayerList.LayerListItem")],I);const C=I;export{C as default};
|
package/widgets/LayerList.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import t from"../core/Collection.js";import{deprecateWidget as i}from"../core/deprecate.js";import{IdentifiableMixin as o}from"../core/Identifiable.js";import s from"../core/Logger.js";import l from"../core/ReactiveMap.js";import{on as r,initial as a,watch as n}from"../core/reactiveUtils.js";import{property as d,subclass as p}from"../core/accessorSupport/decorators.js";import c from"./Widget.js";import{css as m}from"./LayerList/css.js";import h from"./LayerList/LayerListItem.js";import y from"./LayerList/LayerListViewModel.js";import u from"./LayerList/LayerListVisibleElements.js";import g from"./LayerList/ListItem.js";import{minDragEnabledItems as L,minFilterItems as _,getItem as f,getLayerType as v,removeDestroyedListItems as I,setFilterPredicate as w,sortLayersToIds as b,sortChildLayersToIds as C}from"./LayerList/support/layerListUtils.js";import{loadCalciteComponents as E}from"./support/componentsUtils.js";import{globalCss as F}from"./support/globalCss.js";import{calciteListFilterProps as M}from"./support/listUtils.js";import{tsx as O,messageBundle as T,vmEvent as P}from"./support/widget.js";import{setFocus as A}from"./support/widgetUtils.js";const D=t.ofType(g),R="nested";let k=class extends(o(c)){constructor(e,o){super(e,o),this._rootListEl=null,this._activeItem=null,this._tooltipReferenceMap=new l,this._focusRootFlowItem=!1,this._focusPanelFlowItem=!1,this._focusLayerFlowItem=null,this._layerListMap=new l,this._lastDragDetail=null,this._selectedDragItemLayerUid=null,this._rootGroupUid=`operational-${this.uid}`,this._openedLayersController=null,this.catalogLayerList=null,this.catalogOptions=null,this.collapsed=!1,this.dragEnabled=!1,this.filterPlaceholder="",this.filterPredicate=null,this.filterText="",this.headingLevel=2,this.knowledgeGraphOptions=null,this.layerTablesEnabled=new t(["knowledge-graph"]),this.listItemCanGiveFunction=null,this.listItemCanReceiveFunction=null,this.mapImageOptions=null,this.messages=null,this.messagesCommon=null,this.minDragEnabledItems=L,this.minFilterItems=_,this.openedLayers=new t,this.openedLayerLists=new t,this.selectedItems=new D,this.selectionMode="none",this.tableList=null,this.tileOptions=null,this.viewModel=new y,this.visibilityAppearance="default",this.visibleElements=new u,this._canMove=({dragEl:e,fromEl:t,toEl:i},o)=>{const s="pull"===o?this.listItemCanGiveFunction:this.listItemCanReceiveFunction,l=f(e);if(!l?.sortable)return!1;const r=f(t),a=v(t),n=f(i),d=v(i),p=!!a&&!!d&&a===d,c={selected:l,from:r,to:n},m=t.group,h=i.group,y=r?.layer?.type??"",u=n?.layer?.type??"",g=new Set(["map-image","catalog","knowledge-graph"]),L="sublayer";return m&&h&&"function"==typeof s?s.call(null,c):p&&!g.has(y)&&!g.has(u)&&l?.layer?.type!==L},this._onCatalogOpen=e=>{this.openedLayers.push(e.layer?.parent),this._focusLayerFlowItem=e.layer?.uid},this._onTablesOpen=e=>{this.openedLayers.push(e.layer),this._focusLayerFlowItem=e.layer?.uid},this._onPanelOpen=()=>{this._focusPanelFlowItem=!0},this._onTooltipReferenceChange=(e,t)=>{t?this._tooltipReferenceMap.set(e,t):this._tooltipReferenceMap.delete(e)},this._onSelectedDragItemLayerUidChange=e=>{this._selectedDragItemLayerUid=e},this._onTriggerAction=(e,t)=>{this.triggerAction(e,t)},this._clearActiveItem=()=>{this._activeItem=null},this._setActiveItem=e=>{if("default"!==this.visibilityAppearance)return;const t=Array.from(e.composedPath()).find(e=>e.classList?.contains(m.item));this._activeItem=f(t)},this._onCalciteListOrderChange=e=>{const{_lastDragDetail:t}=this,{toEl:i,fromEl:o,dragEl:s,newIndex:l}=e;if(o&&i&&!(t?.newIndex===l&&t?.dragEl===s&&t?.toEl===i&&t?.fromEl===o)){if(this._lastDragDetail=e,this._selectedDragItemLayerUid=s.value,o===i){const e=Array.from(o.children).filter(e=>e?.matches("calcite-list-item")).map(e=>e.value);return void this._sortLayers(o,e)}this._moveLayerFromChildList({toEl:i,fromEl:o,dragEl:s,newIndex:l})}},this.announceDeprecation=()=>{i(s.getLogger(this),"Layer List","arcgis-layer-list",{version:"5.0"})}}initialize(){this.addHandles([r(()=>this.openedLayers,"change",()=>this._handleOpenedLayersChange(),a),r(()=>this.viewModel.operationalItems,"change",()=>I(this.selectedItems),a),n(()=>[this.filterPredicate,this._rootListEl],()=>w(this._rootListEl,this.filterPredicate))])}loadDependencies(){return E({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._destroyOpenedLayerLists(),this._tooltipReferenceMap.clear()}get _totalItems(){return this.viewModel.operationalItems.flatten(e=>e.children.filter(e=>"catalog-dynamic-group"!==e.layer?.type)).length}get _visibleItems(){return this.operationalItems?.filter(e=>!e.hidden&&(this.visibleElements.errors||!e.error))}get _openedPanelItems(){return this._visibleItems.flatten(e=>e.children).filter(({hidden:e,panel:t})=>!e&&t?.open&&!t.disabled&&t.flowEnabled)}get _dragEnabled(){return this._totalItems>=this.minDragEnabledItems&&this.dragEnabled}get _filterEnabled(){return this._totalItems>=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 icon(){return"layers"}set icon(e){this._overrideIfSome("icon",e)}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get listItemCreatedFunction(){return this.viewModel.listItemCreatedFunction}set listItemCreatedFunction(e){this.viewModel.listItemCreatedFunction=e}get operationalItems(){return this.viewModel.operationalItems}set operationalItems(e){this.viewModel.operationalItems=e}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}triggerAction(e,t){return this.viewModel.triggerAction(e,t)}render(){const e=this.viewModel?.state,t={[F.hidden]:"loading"===e,[F.disabled]:"disabled"===e};return O("div",{class:this.classes(m.base,F.widget,F.panel,t)},this._renderItemTooltips(),this._renderItems())}async _createFlowList(e,t){const{_layerListMap:i}=this,o=i.get(e);if(o)return o;const s="catalog"===e.type?await this._createCatalogLayerList(e):await this._createTableList(e);return t.aborted||i.set(e,s),s}async _handleOpenedLayersChange(){const{_layerListMap:e,openedLayers:t,openedLayerLists:i}=this;this._openedLayersController?.abort();const o=new AbortController,{signal:s}=o;this._openedLayersController=o,e.forEach((i,o)=>{t.includes(o)||(i.destroy(),e.delete(o))});const l=await Promise.all(t.map(e=>this._createFlowList(e,s)));if(s.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){const{_tooltipReferenceMap:t,messages:i}=this;return e?O("calcite-tooltip",{key:`tooltip-${e.layer?.uid}`,overlayPositioning:"fixed",referenceElement:t.get(e.layer?.uid),topLayerDisabled:this.topLayerDisabled},i.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._visibleItems?.toArray().map(e=>this._renderItemTooltipNodes(e))}_renderNoItemsMessage(){return O("div",{slot:"message"},this.messages.noItemsToDisplay)}_renderNoItems(){return O("div",{class:m.itemMessage,key:"esri-layer-list__no-items"},O("calcite-notice",{icon:"information",kind:"info",open:!0,width:"full"},this._renderNoItemsMessage()))}async _createCatalogLayerList(e){const{default:t}=await import("./CatalogLayerList.js"),{headingLevel:i,catalogOptions:o,view:s,filterPlaceholder:l,listItemCreatedFunction:r,minFilterItems:a,selectionMode:n,visibilityAppearance:d,_onCatalogOpen:p,_onTablesOpen:c,layerTablesEnabled:m}=this;return new t({headingLevel:i,view:s,filterPlaceholder:l,listItemCreatedFunction:r,minFilterItems:a,selectionMode:n,visibilityAppearance:d,...o,catalogLayer:e,layerTablesEnabled:m,onCatalogOpen:p,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:o,dragEnabled:s}=this;return new t({headingLevel:i,selectionMode:o,dragEnabled:s,...this._getTableListParams(e)})}_renderLayerFlowItem(e,t){const{messages:i,openedLayers:o}=this,s=e.title||this.messages.untitledLayer;return O("calcite-flow-item",{afterCreate:this._focusLayerFlowItemNode,afterUpdate:this._focusLayerFlowItemNode,bind:this,"data-layer-uid":e.uid,description:s,heading:i["catalog"===e.type?"catalogLayers":"tables"],headingLevel:this.headingLevel,key:`flow-layer-list-${e.uid}`,selected:t,onCalciteFlowItemBack:e=>{e.preventDefault(),o.pop();const t=o.at(-1);t?this._focusLayerFlowItem=t.uid:this._focusRootFlowItem=!0}},this._layerListMap.get(e)?.render())}_renderPanelFlowItems(){const{_openedPanelItems:e,openedLayers:t}=this;return e.toArray().map(({title:i,panel:o},s)=>{const l=()=>this._handlePanelFlowItemBack(o);return O("calcite-flow-item",{afterCreate:this._focusPanelFlowItemNode,afterUpdate:this._focusPanelFlowItemNode,bind:this,description:i,heading:o.title,headingLevel:this.headingLevel,key:`flow-panel-${o.uid}`,selected:!t.length&&s===e.length-1,onCalciteFlowItemBack:e=>{e.preventDefault(),l()}},o.render(),O("calcite-button",{appearance:"transparent",onclick:l,slot:"footer-start",width:"full"},this.messagesCommon.back))})}_handlePanelFlowItemBack(e){e.open=!1,this._focusRootFlowItem=!0}_focusRootFlowItemNode(e){this._focusRootFlowItem&&(this._focusRootFlowItem=!1,A(e))}_focusLayerFlowItemNode(e){this._focusLayerFlowItem===e.dataset.layerUid&&(this._focusLayerFlowItem=null,A(e))}_focusPanelFlowItemNode(e){this._focusPanelFlowItem&&(this._focusPanelFlowItem=!1,A(e))}_renderItems(){const{visible:e,collapsed:t,_visibleItems:i,_openedPanelItems:o,_filterEnabled:s,_rootGroupUid:l,visibleElements:{closeButton:r,collapseButton:a,heading:n,flow:d},_dragEnabled:p,selectionMode:c,filterText:h,openedLayers:y,filterPlaceholder:u,messages:g}=this,L=[O("calcite-flow-item",{afterCreate:this._focusRootFlowItemNode,afterUpdate:this._focusRootFlowItemNode,bind:this,closable:r,closed:!e,collapsed:t,collapsible:a,heading:n?g.widgetLabel:void 0,headingLevel:this.headingLevel,key:"root-flow-item",selected:!y.length&&!o.length,onCalciteFlowItemClose:()=>this.visible=!1},i?.length?null:this._renderNoItems(),O("calcite-list",{afterCreate:e=>{this._rootListEl=e,e.addEventListener("focusin",this._setActiveItem),e.addEventListener("focusout",this._clearActiveItem)},afterRemoved:e=>{this._rootListEl=null,e.removeEventListener("focusin",this._setActiveItem),e.removeEventListener("focusout",this._clearActiveItem)},canPull:e=>this._canMove(e,"pull"),canPut:e=>this._canMove(e,"put"),"data-layer-type":l,displayMode:R,dragEnabled:p,filterEnabled:s,filterPlaceholder:u,filterProps:M,filterText:s?h:"",group:l,key:"root-list",label:g.widgetLabel,onmouseleave:this._clearActiveItem,onmouseover:this._setActiveItem,selectionAppearance:"border",selectionMode:c,onCalciteListChange:e=>this._handleCalciteListChange(e),onCalciteListDragEnd:e=>this._handleCalciteListDragEnd(e.detail),onCalciteListFilter:e=>this.filterText=e.currentTarget?.filterText??"",onCalciteListOrderChange:e=>this._onCalciteListOrderChange(e.detail)},i.toArray().map(e=>this._renderItem(e)),s?O("div",{class:m.filterNoResults,slot:"filter-no-results"},O("calcite-notice",{kind:"info",open:!0,width:"full"},this._renderNoItemsMessage())):null)),this._renderPanelFlowItems(),this._renderedOpenLayerFlowItems];return e?d?O("calcite-flow",{key:"root-flow"},L):L:null}_renderItem(e,t,i){return O(h,{activeItem:this._activeItem,canMove:this._canMove,css:m,displayMode:R,dragEnabled:this.dragEnabled,item:e,key:`layerListItem-${e.layer?.uid}`,layerTablesEnabled:this.layerTablesEnabled,listModeDisabled:this.viewModel.listModeDisabled,messages:this.messages,messagesCommon:this.messagesCommon,parent:t,parentTitles:i,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:o}){const s=f(i),l=f(e),r=f(t);this.viewModel.moveListItem(s,r,l,o)}_handleCalciteListDragEnd(e){const{fromEl:t,dragEl:i,oldIndex:o}=e;t.insertBefore(i,t.children[o])}_sortLayers(e,t){if(e)if(e===this._rootListEl)b(this.view?.map?.layers,t);else{const i=f(e);if(!i)return;C(i,t)}}_handleCalciteListChange(e){const{selectionMode:t,selectedItems:i}=this;if("none"===t)return;const o=e.target.selectedItems.map(e=>f(e)).filter(Boolean);i.removeAll(),i.addMany(o)}};e([d()],k.prototype,"_rootListEl",void 0),e([d()],k.prototype,"_activeItem",void 0),e([d()],k.prototype,"_tooltipReferenceMap",void 0),e([d()],k.prototype,"_focusRootFlowItem",void 0),e([d()],k.prototype,"_focusPanelFlowItem",void 0),e([d()],k.prototype,"_focusLayerFlowItem",void 0),e([d()],k.prototype,"_layerListMap",void 0),e([d()],k.prototype,"_totalItems",null),e([d()],k.prototype,"_visibleItems",null),e([d()],k.prototype,"_openedPanelItems",null),e([d()],k.prototype,"_dragEnabled",null),e([d()],k.prototype,"_filterEnabled",null),e([d()],k.prototype,"_renderedOpenLayerFlowItems",null),e([d({readOnly:!0})],k.prototype,"catalogLayerList",void 0),e([d()],k.prototype,"catalogOptions",void 0),e([d()],k.prototype,"collapsed",void 0),e([d()],k.prototype,"dragEnabled",void 0),e([d()],k.prototype,"filterPlaceholder",void 0),e([d()],k.prototype,"filterPredicate",void 0),e([d()],k.prototype,"filterText",void 0),e([d()],k.prototype,"headingLevel",void 0),e([d()],k.prototype,"icon",null),e([d()],k.prototype,"knowledgeGraphOptions",void 0),e([d()],k.prototype,"label",null),e([d()],k.prototype,"layerTablesEnabled",void 0),e([d()],k.prototype,"listItemCanGiveFunction",void 0),e([d()],k.prototype,"listItemCanReceiveFunction",void 0),e([d()],k.prototype,"listItemCreatedFunction",null),e([d()],k.prototype,"mapImageOptions",void 0),e([d(),T("esri/widgets/LayerList/t9n/LayerList")],k.prototype,"messages",void 0),e([d(),T("esri/t9n/common")],k.prototype,"messagesCommon",void 0),e([d()],k.prototype,"minDragEnabledItems",void 0),e([d()],k.prototype,"minFilterItems",void 0),e([d({readOnly:!0})],k.prototype,"openedLayers",void 0),e([d({readOnly:!0})],k.prototype,"openedLayerLists",void 0),e([d()],k.prototype,"operationalItems",null),e([d()],k.prototype,"selectedItems",void 0),e([d()],k.prototype,"selectionMode",void 0),e([d({readOnly:!0})],k.prototype,"tableList",void 0),e([d()],k.prototype,"tileOptions",void 0),e([d()],k.prototype,"view",null),e([P("trigger-action"),d({type:y})],k.prototype,"viewModel",void 0),e([d()],k.prototype,"visibilityAppearance",void 0),e([d({type:u,nonNullable:!0})],k.prototype,"visibleElements",void 0),k=e([p("esri.widgets.LayerList")],k);const j=k;export{j as default};
|
|
2
|
+
import{__decorate as e}from"tslib";import t from"../core/Collection.js";import{deprecateWidget as i}from"../core/deprecate.js";import{IdentifiableMixin as o}from"../core/Identifiable.js";import s from"../core/Logger.js";import l from"../core/ReactiveMap.js";import{on as r,initial as a,watch as n}from"../core/reactiveUtils.js";import{property as d,subclass as p}from"../core/accessorSupport/decorators.js";import c from"./Widget.js";import{css as m}from"./LayerList/css.js";import h from"./LayerList/LayerListItem.js";import y from"./LayerList/LayerListViewModel.js";import u from"./LayerList/LayerListVisibleElements.js";import g from"./LayerList/ListItem.js";import{minDragEnabledItems as L,minFilterItems as _,getItem as f,getLayerType as v,removeDestroyedListItems as I,setFilterPredicate as w,sortLayersToIds as b,sortChildLayersToIds as C}from"./LayerList/support/layerListUtils.js";import{loadCalciteComponents as E}from"./support/componentsUtils.js";import{globalCss as F}from"./support/globalCss.js";import{calciteListFilterProps as M}from"./support/listUtils.js";import{tsx as O,messageBundle as T,vmEvent as P}from"./support/widget.js";import{setFocus as A}from"./support/widgetUtils.js";const D=t.ofType(g),R="nested";let k=class extends(o(c)){constructor(e,o){super(e,o),this._rootListEl=null,this._activeItem=null,this._tooltipReferenceMap=new l,this._focusRootFlowItem=!1,this._focusPanelFlowItem=!1,this._focusLayerFlowItem=null,this._layerListMap=new l,this._lastDragDetail=null,this._selectedDragItemLayerUid=null,this._rootGroupUid=`operational-${this.uid}`,this._openedLayersController=null,this.catalogLayerList=null,this.catalogOptions=null,this.collapsed=!1,this.dragEnabled=!1,this.filterPlaceholder="",this.filterPredicate=null,this.filterText="",this.headingLevel=2,this.knowledgeGraphOptions=null,this.layerTablesEnabled=new t(["knowledge-graph"]),this.listItemCanGiveFunction=null,this.listItemCanReceiveFunction=null,this.mapImageOptions=null,this.messages=null,this.messagesCommon=null,this.minDragEnabledItems=L,this.minFilterItems=_,this.openedLayers=new t,this.openedLayerLists=new t,this.selectedItems=new D,this.selectionMode="none",this.tableList=null,this.tileOptions=null,this.viewModel=new y,this.visibilityAppearance="default",this.visibleElements=new u,this._canMove=({dragEl:e,fromEl:t,toEl:i},o)=>{const s="pull"===o?this.listItemCanGiveFunction:this.listItemCanReceiveFunction,l=f(e);if(!l?.sortable)return!1;const r=f(t),a=v(t),n=f(i),d=v(i),p=!!a&&!!d&&a===d,c={selected:l,from:r,to:n},m=t.group,h=i.group,y=r?.layer?.type??"",u=n?.layer?.type??"",g=new Set(["map-image","catalog","knowledge-graph"]),L="sublayer";return m&&h&&"function"==typeof s?s.call(null,c):p&&!g.has(y)&&!g.has(u)&&l?.layer?.type!==L},this._onCatalogOpen=e=>{this.openedLayers.push(e.layer?.parent),this._focusLayerFlowItem=e.layer?.uid},this._onTablesOpen=e=>{this.openedLayers.push(e.layer),this._focusLayerFlowItem=e.layer?.uid},this._onPanelOpen=()=>{this._focusPanelFlowItem=!0},this._onTooltipReferenceChange=(e,t)=>{t?this._tooltipReferenceMap.set(e,t):this._tooltipReferenceMap.delete(e)},this._onSelectedDragItemLayerUidChange=e=>{this._selectedDragItemLayerUid=e},this._onTriggerAction=(e,t)=>{this.triggerAction(e,t)},this._clearActiveItem=()=>{this._activeItem=null},this._setActiveItem=e=>{if("default"!==this.visibilityAppearance)return;const t=Array.from(e.composedPath()).find(e=>e.classList?.contains(m.item));this._activeItem=f(t)},this._onCalciteListOrderChange=e=>{const{_lastDragDetail:t}=this,{toEl:i,fromEl:o,dragEl:s,newIndex:l}=e;if(o&&i&&!(t?.newIndex===l&&t?.dragEl===s&&t?.toEl===i&&t?.fromEl===o)){if(this._lastDragDetail=e,this._selectedDragItemLayerUid=s.value,o===i){const e=Array.from(o.children).filter(e=>e?.matches("calcite-list-item")).map(e=>e.value);return void this._sortLayers(o,e)}this._moveLayerFromChildList({toEl:i,fromEl:o,dragEl:s,newIndex:l})}},this.announceDeprecation=()=>{i(s.getLogger(this),"Layer List","arcgis-layer-list",{version:"5.0"})}}initialize(){this.addHandles([r(()=>this.openedLayers,"change",()=>this._handleOpenedLayersChange(),a),r(()=>this.viewModel.operationalItems,"change",()=>I(this.selectedItems),a),n(()=>[this.filterPredicate,this._rootListEl],()=>w(this._rootListEl,this.filterPredicate))])}loadDependencies(){return E({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._destroyOpenedLayerLists(),this._tooltipReferenceMap.clear()}get _totalItems(){return this.viewModel.operationalItems.flatten(e=>e.children.filter(e=>"catalog-dynamic-group"!==e.layer?.type)).length}get _visibleItems(){return this.operationalItems?.filter(e=>!e.hidden&&(this.visibleElements.errors||!e.error))}get _openedPanelItems(){return this._visibleItems.flatten(e=>e.children).filter(({hidden:e,panel:t})=>!e&&t?.open&&!t.disabled&&t.flowEnabled)}get _dragEnabled(){return this._totalItems>=this.minDragEnabledItems&&this.dragEnabled}get _filterEnabled(){return this._totalItems>=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 icon(){return"layers"}set icon(e){this._overrideIfSome("icon",e)}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get listItemCreatedFunction(){return this.viewModel.listItemCreatedFunction}set listItemCreatedFunction(e){this.viewModel.listItemCreatedFunction=e}get operationalItems(){return this.viewModel.operationalItems}set operationalItems(e){this.viewModel.operationalItems=e}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}triggerAction(e,t){return this.viewModel.triggerAction(e,t)}render(){const e=this.viewModel?.state,t={[F.hidden]:"loading"===e,[F.disabled]:"disabled"===e};return O("div",{class:this.classes(m.base,F.widget,F.panel,t)},this._renderItemTooltips(),this._renderItems())}async _createFlowList(e,t){const{_layerListMap:i}=this,o=i.get(e);if(o)return o;const s="catalog"===e.type?await this._createCatalogLayerList(e):await this._createTableList(e);return t.aborted||i.set(e,s),s}async _handleOpenedLayersChange(){const{_layerListMap:e,openedLayers:t,openedLayerLists:i}=this;this._openedLayersController?.abort();const o=new AbortController,{signal:s}=o;this._openedLayersController=o,e.forEach((i,o)=>{t.includes(o)||(i.destroy(),e.delete(o))});const l=await Promise.all(t.map(e=>this._createFlowList(e,s)));if(s.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){const{_tooltipReferenceMap:t,messages:i}=this;return e?O("calcite-tooltip",{key:`tooltip-${e.layer?.uid}`,overlayPositioning:"fixed",referenceElement:t.get(e.layer?.uid),topLayerDisabled:this.topLayerDisabled},i.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._visibleItems?.toArray().map(e=>this._renderItemTooltipNodes(e))}_renderNoItemsMessage(){return O("div",{slot:"message"},this.messages.noItemsToDisplay)}_renderNoItems(){return O("div",{class:m.itemMessage,key:"esri-layer-list__no-items"},O("calcite-notice",{icon:"information",kind:"info",open:!0,width:"full"},this._renderNoItemsMessage()))}async _createCatalogLayerList(e){const{default:t}=await import("./CatalogLayerList.js"),{headingLevel:i,catalogOptions:o,view:s,filterPlaceholder:l,listItemCreatedFunction:r,minFilterItems:a,selectionMode:n,visibilityAppearance:d,_onCatalogOpen:p,_onTablesOpen:c,layerTablesEnabled:m}=this;return new t({headingLevel:i,view:s,filterPlaceholder:l,listItemCreatedFunction:r,minFilterItems:a,selectionMode:n,visibilityAppearance:d,...o,catalogLayer:e,layerTablesEnabled:m,onCatalogOpen:p,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:o,dragEnabled:s}=this;return new t({headingLevel:i,selectionMode:o,dragEnabled:s,...this._getTableListParams(e)})}_renderLayerFlowItem(e,t){const{messages:i,openedLayers:o}=this,s=e.title||this.messages.untitledLayer;return O("calcite-flow-item",{afterCreate:this._focusLayerFlowItemNode,afterUpdate:this._focusLayerFlowItemNode,bind:this,"data-layer-uid":e.uid,description:s,heading:i["catalog"===e.type?"catalogLayers":"tables"],headingLevel:this.headingLevel,key:`flow-layer-list-${e.uid}`,selected:t,onCalciteFlowItemBack:e=>{e.preventDefault(),o.pop();const t=o.at(-1);t?this._focusLayerFlowItem=t.uid:this._focusRootFlowItem=!0}},this._layerListMap.get(e)?.render())}_renderPanelFlowItems(){const{_openedPanelItems:e,openedLayers:t}=this;return e.toArray().map(({title:i,panel:o},s)=>{const l=()=>this._handlePanelFlowItemBack(o);return O("calcite-flow-item",{afterCreate:this._focusPanelFlowItemNode,afterUpdate:this._focusPanelFlowItemNode,bind:this,description:i,heading:o.title,headingLevel:this.headingLevel,key:`flow-panel-${o.uid}`,selected:!t.length&&s===e.length-1,onCalciteFlowItemBack:e=>{e.preventDefault(),l()}},o.render(),O("calcite-button",{appearance:"transparent",slot:"footer-start",width:"full",onclick:l},this.messagesCommon.back))})}_handlePanelFlowItemBack(e){e.open=!1,this._focusRootFlowItem=!0}_focusRootFlowItemNode(e){this._focusRootFlowItem&&(this._focusRootFlowItem=!1,A(e))}_focusLayerFlowItemNode(e){this._focusLayerFlowItem===e.dataset.layerUid&&(this._focusLayerFlowItem=null,A(e))}_focusPanelFlowItemNode(e){this._focusPanelFlowItem&&(this._focusPanelFlowItem=!1,A(e))}_renderItems(){const{visible:e,collapsed:t,_visibleItems:i,_openedPanelItems:o,_filterEnabled:s,_rootGroupUid:l,visibleElements:{closeButton:r,collapseButton:a,heading:n,flow:d},_dragEnabled:p,selectionMode:c,filterText:h,openedLayers:y,filterPlaceholder:u,messages:g}=this,L=[O("calcite-flow-item",{afterCreate:this._focusRootFlowItemNode,afterUpdate:this._focusRootFlowItemNode,bind:this,closable:r,closed:!e,collapsed:t,collapsible:a,heading:n?g.widgetLabel:void 0,headingLevel:this.headingLevel,key:"root-flow-item",selected:!y.length&&!o.length,onCalciteFlowItemClose:()=>this.visible=!1},i?.length?null:this._renderNoItems(),O("calcite-list",{afterCreate:e=>{this._rootListEl=e,e.addEventListener("focusin",this._setActiveItem),e.addEventListener("focusout",this._clearActiveItem)},afterRemoved:e=>{this._rootListEl=null,e.removeEventListener("focusin",this._setActiveItem),e.removeEventListener("focusout",this._clearActiveItem)},canPull:e=>this._canMove(e,"pull"),canPut:e=>this._canMove(e,"put"),"data-layer-type":l,displayMode:R,dragEnabled:p,filterEnabled:s,filterPlaceholder:u,filterProps:M,filterText:s?h:"",group:l,key:"root-list",label:g.widgetLabel,selectionAppearance:"border",selectionMode:c,onCalciteListChange:e=>this._handleCalciteListChange(e),onCalciteListDragEnd:e=>this._handleCalciteListDragEnd(e.detail),onCalciteListFilter:e=>this.filterText=e.currentTarget?.filterText??"",onCalciteListOrderChange:e=>this._onCalciteListOrderChange(e.detail),onmouseleave:this._clearActiveItem,onmouseover:this._setActiveItem},i.toArray().map(e=>this._renderItem(e)),s?O("div",{class:m.filterNoResults,slot:"filter-no-results"},O("calcite-notice",{kind:"info",open:!0,width:"full"},this._renderNoItemsMessage())):null)),this._renderPanelFlowItems(),this._renderedOpenLayerFlowItems];return e?d?O("calcite-flow",{key:"root-flow"},L):L:null}_renderItem(e,t,i){return O(h,{activeItem:this._activeItem,canMove:this._canMove,css:m,displayMode:R,dragEnabled:this.dragEnabled,item:e,key:`layerListItem-${e.layer?.uid}`,layerTablesEnabled:this.layerTablesEnabled,listModeDisabled:this.viewModel.listModeDisabled,messages:this.messages,messagesCommon:this.messagesCommon,parent:t,parentTitles:i,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:o}){const s=f(i),l=f(e),r=f(t);this.viewModel.moveListItem(s,r,l,o)}_handleCalciteListDragEnd(e){const{fromEl:t,dragEl:i,oldIndex:o}=e;t.insertBefore(i,t.children[o])}_sortLayers(e,t){if(e)if(e===this._rootListEl)b(this.view?.map?.layers,t);else{const i=f(e);if(!i)return;C(i,t)}}_handleCalciteListChange(e){const{selectionMode:t,selectedItems:i}=this;if("none"===t)return;const o=e.target.selectedItems.map(e=>f(e)).filter(Boolean);i.removeAll(),i.addMany(o)}};e([d()],k.prototype,"_rootListEl",void 0),e([d()],k.prototype,"_activeItem",void 0),e([d()],k.prototype,"_tooltipReferenceMap",void 0),e([d()],k.prototype,"_focusRootFlowItem",void 0),e([d()],k.prototype,"_focusPanelFlowItem",void 0),e([d()],k.prototype,"_focusLayerFlowItem",void 0),e([d()],k.prototype,"_layerListMap",void 0),e([d()],k.prototype,"_totalItems",null),e([d()],k.prototype,"_visibleItems",null),e([d()],k.prototype,"_openedPanelItems",null),e([d()],k.prototype,"_dragEnabled",null),e([d()],k.prototype,"_filterEnabled",null),e([d()],k.prototype,"_renderedOpenLayerFlowItems",null),e([d({readOnly:!0})],k.prototype,"catalogLayerList",void 0),e([d()],k.prototype,"catalogOptions",void 0),e([d()],k.prototype,"collapsed",void 0),e([d()],k.prototype,"dragEnabled",void 0),e([d()],k.prototype,"filterPlaceholder",void 0),e([d()],k.prototype,"filterPredicate",void 0),e([d()],k.prototype,"filterText",void 0),e([d()],k.prototype,"headingLevel",void 0),e([d()],k.prototype,"icon",null),e([d()],k.prototype,"knowledgeGraphOptions",void 0),e([d()],k.prototype,"label",null),e([d()],k.prototype,"layerTablesEnabled",void 0),e([d()],k.prototype,"listItemCanGiveFunction",void 0),e([d()],k.prototype,"listItemCanReceiveFunction",void 0),e([d()],k.prototype,"listItemCreatedFunction",null),e([d()],k.prototype,"mapImageOptions",void 0),e([d(),T("esri/widgets/LayerList/t9n/LayerList")],k.prototype,"messages",void 0),e([d(),T("esri/t9n/common")],k.prototype,"messagesCommon",void 0),e([d()],k.prototype,"minDragEnabledItems",void 0),e([d()],k.prototype,"minFilterItems",void 0),e([d({readOnly:!0})],k.prototype,"openedLayers",void 0),e([d({readOnly:!0})],k.prototype,"openedLayerLists",void 0),e([d()],k.prototype,"operationalItems",null),e([d()],k.prototype,"selectedItems",void 0),e([d()],k.prototype,"selectionMode",void 0),e([d({readOnly:!0})],k.prototype,"tableList",void 0),e([d()],k.prototype,"tileOptions",void 0),e([d()],k.prototype,"view",null),e([P("trigger-action"),d({type:y})],k.prototype,"viewModel",void 0),e([d()],k.prototype,"visibilityAppearance",void 0),e([d({type:u,nonNullable:!0})],k.prototype,"visibleElements",void 0),k=e([p("esri.widgets.LayerList")],k);const j=k;export{j as default};
|
package/widgets/Locate.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import o from"../Graphic.js";import{deprecateWidget as t}from"../core/deprecate.js";import i from"../core/Logger.js";import{property as s,subclass as r}from"../core/accessorSupport/decorators.js";import l from"./Widget.js";import n from"./Locate/LocateViewModel.js";import{loadCalciteComponents as a}from"./support/componentsUtils.js";import{globalCss as c}from"./support/globalCss.js";import{messageBundle as p,vmEvent as d,tsx as g}from"./support/widget.js";const m={base:"esri-locate"};let u=class extends l{constructor(e,o){super(e,o),this.messages=null,this.messagesCommon=null,this.viewModel=new n({suppressDeprecationWarning:!0}),this._locate=()=>{const{viewModel:e}=this;"locating"===e.state?e.cancelLocate():e.locate().catch(()=>{})},t(i.getLogger(this),"Locate","arcgis-locate",{version:"4.32"})}loadDependencies(){return a({button:()=>import("@esri/calcite-components/dist/components/calcite-button"),loader:()=>import("@esri/calcite-components/dist/components/calcite-loader"),tooltip:()=>import("@esri/calcite-components/dist/components/calcite-tooltip")})}get geolocationOptions(){return this.viewModel.geolocationOptions}set geolocationOptions(e){this.viewModel.geolocationOptions=e}get goToLocationEnabled(){return this.viewModel.goToLocationEnabled}set goToLocationEnabled(e){this.viewModel.goToLocationEnabled=e}get goToOverride(){return this.viewModel.goToOverride}set goToOverride(e){this.viewModel.goToOverride=e}get graphic(){return this.viewModel.graphic}set graphic(e){this.viewModel.graphic=e}get icon(){return"gps-off"}set icon(e){this._overrideIfSome("icon",e)}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get popupEnabled(){return this.viewModel.popupEnabled}set popupEnabled(e){this.viewModel.popupEnabled=e}get scale(){return this.viewModel.scale}set scale(e){this.viewModel.scale=e}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}cancelLocate(){this.viewModel.cancelLocate()}locate(){return this.viewModel.locate()}render(){const{viewModel:e,icon:o}=this,{state:t}=e,i="locating"===t,s=i?this.messagesCommon.cancel:this.messages.title,r="feature-unsupported"===t,l=this._localizeError(this.viewModel?.error);return g("div",{class:this.classes(m.base,c.widget)},!r&&g("calcite-button",{class:c.widgetButton,disabled:"disabled"===t,iconStart:i?void 0:o,kind:"neutral",label:s,onclick:this._locate
|
|
2
|
+
import{__decorate as e}from"tslib";import o from"../Graphic.js";import{deprecateWidget as t}from"../core/deprecate.js";import i from"../core/Logger.js";import{property as s,subclass as r}from"../core/accessorSupport/decorators.js";import l from"./Widget.js";import n from"./Locate/LocateViewModel.js";import{loadCalciteComponents as a}from"./support/componentsUtils.js";import{globalCss as c}from"./support/globalCss.js";import{messageBundle as p,vmEvent as d,tsx as g}from"./support/widget.js";const m={base:"esri-locate"};let u=class extends l{constructor(e,o){super(e,o),this.messages=null,this.messagesCommon=null,this.viewModel=new n({suppressDeprecationWarning:!0}),this._locate=()=>{const{viewModel:e}=this;"locating"===e.state?e.cancelLocate():e.locate().catch(()=>{})},t(i.getLogger(this),"Locate","arcgis-locate",{version:"4.32"})}loadDependencies(){return a({button:()=>import("@esri/calcite-components/dist/components/calcite-button"),loader:()=>import("@esri/calcite-components/dist/components/calcite-loader"),tooltip:()=>import("@esri/calcite-components/dist/components/calcite-tooltip")})}get geolocationOptions(){return this.viewModel.geolocationOptions}set geolocationOptions(e){this.viewModel.geolocationOptions=e}get goToLocationEnabled(){return this.viewModel.goToLocationEnabled}set goToLocationEnabled(e){this.viewModel.goToLocationEnabled=e}get goToOverride(){return this.viewModel.goToOverride}set goToOverride(e){this.viewModel.goToOverride=e}get graphic(){return this.viewModel.graphic}set graphic(e){this.viewModel.graphic=e}get icon(){return"gps-off"}set icon(e){this._overrideIfSome("icon",e)}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get popupEnabled(){return this.viewModel.popupEnabled}set popupEnabled(e){this.viewModel.popupEnabled=e}get scale(){return this.viewModel.scale}set scale(e){this.viewModel.scale=e}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}cancelLocate(){this.viewModel.cancelLocate()}locate(){return this.viewModel.locate()}render(){const{viewModel:e,icon:o}=this,{state:t}=e,i="locating"===t,s=i?this.messagesCommon.cancel:this.messages.title,r="feature-unsupported"===t,l=this._localizeError(this.viewModel?.error);return g("div",{class:this.classes(m.base,c.widget)},!r&&g("calcite-button",{class:c.widgetButton,disabled:"disabled"===t,iconStart:i?void 0:o,kind:"neutral",label:s,title:s,onclick:this._locate},i?g("calcite-loader",{inline:!0,label:""}):null),l?g("calcite-tooltip",{open:!0,overlayPositioning:"fixed",placement:this._getPlacement(),referenceElement:this.container,topLayerDisabled:this.topLayerDisabled},l):null)}_getPlacement(){const{container:e,view:o}=this,t=e&&o?o.ui.getPosition(e):null;if(!t||"manual"===t)return"auto";const[i,s]=t.split("-");return`${"right"===s?"left":"right"}-${"bottom"===i?"end":"start"}`}_localizeError(e){return e instanceof GeolocationPositionError?e.code===GeolocationPositionError.PERMISSION_DENIED?this.messages?.permissionError:e.code===GeolocationPositionError.TIMEOUT?this.messages?.timeoutError:this.messages?.positionUnavailable:e instanceof Error?e.message:void 0}};e([s()],u.prototype,"geolocationOptions",null),e([s()],u.prototype,"goToLocationEnabled",null),e([s()],u.prototype,"goToOverride",null),e([s({type:o})],u.prototype,"graphic",null),e([s()],u.prototype,"icon",null),e([s()],u.prototype,"label",null),e([s(),p("esri/widgets/Locate/t9n/Locate")],u.prototype,"messages",void 0),e([s(),p("esri/t9n/common")],u.prototype,"messagesCommon",void 0),e([s()],u.prototype,"popupEnabled",null),e([s()],u.prototype,"scale",null),e([s()],u.prototype,"view",null),e([s({type:n}),d(["locate","locate-error"])],u.prototype,"viewModel",void 0),u=e([r("esri.widgets.Locate")],u);const h=u;export{h as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as t}from"tslib";import{deprecateWidget as e}from"../core/deprecate.js";import o from"../core/Logger.js";import{property as i,subclass as s}from"../core/accessorSupport/decorators.js";import l from"./Widget.js";import{css as r}from"./NavigationToggle/css.js";import a from"./NavigationToggle/NavigationToggleViewModel.js";import{loadCalciteComponents as n}from"./support/componentsUtils.js";import{globalCss as g}from"./support/globalCss.js";import{messageBundle as p,tsx as c}from"./support/widget.js";import{setFocus as d}from"./support/widgetUtils.js";let u=class extends l{constructor(t,i){super(t,i),this.messages=null,this.viewModel=new a({suppressDeprecationWarning:!0}),this.toggle=()=>this.viewModel.toggle(),this._panButton=null,this._rotateButton=null,this._toggle=()=>{const t="pan"===this.viewModel?.navigationMode?this._rotateButton:this._panButton;d(t),this.toggle()},t?.isDefaultUI||e(o.getLogger(this),"Navigation Toggle","arcgis-navigation-toggle",{version:"4.32"})}normalizeCtorArgs(t={}){const{isDefaultUI:e,...o}=t;return o}loadDependencies(){return n({button:()=>import("@esri/calcite-components/dist/components/calcite-button")})}get icon(){return"move"}set icon(t){this._overrideIfSome("icon",t)}get label(){return this.messages?.widgetLabel??""}set label(t){this._overrideIfSome("label",t)}set layout(t){"horizontal"!==t&&(t="vertical"),this._set("layout",t)}get view(){return this.viewModel.view}set view(t){this.viewModel.view=t}render(){const t="disabled"===this.viewModel?.state,e="pan"===this.viewModel?.navigationMode,o=this.messages.toggle;return c("div",{class:this.classes(r.base,g.widget,{[r.isLayoutHorizontal]:"horizontal"===this.layout})},c("calcite-button",{afterCreate:t=>{this._panButton=t},appearance:e?"outline-fill":"solid",class:g.widgetButton,disabled:t,iconStart:"move",kind:"neutral",label:o,
|
|
2
|
+
import{__decorate as t}from"tslib";import{deprecateWidget as e}from"../core/deprecate.js";import o from"../core/Logger.js";import{property as i,subclass as s}from"../core/accessorSupport/decorators.js";import l from"./Widget.js";import{css as r}from"./NavigationToggle/css.js";import a from"./NavigationToggle/NavigationToggleViewModel.js";import{loadCalciteComponents as n}from"./support/componentsUtils.js";import{globalCss as g}from"./support/globalCss.js";import{messageBundle as p,tsx as c}from"./support/widget.js";import{setFocus as d}from"./support/widgetUtils.js";let u=class extends l{constructor(t,i){super(t,i),this.messages=null,this.viewModel=new a({suppressDeprecationWarning:!0}),this.toggle=()=>this.viewModel.toggle(),this._panButton=null,this._rotateButton=null,this._toggle=()=>{const t="pan"===this.viewModel?.navigationMode?this._rotateButton:this._panButton;d(t),this.toggle()},t?.isDefaultUI||e(o.getLogger(this),"Navigation Toggle","arcgis-navigation-toggle",{version:"4.32"})}normalizeCtorArgs(t={}){const{isDefaultUI:e,...o}=t;return o}loadDependencies(){return n({button:()=>import("@esri/calcite-components/dist/components/calcite-button")})}get icon(){return"move"}set icon(t){this._overrideIfSome("icon",t)}get label(){return this.messages?.widgetLabel??""}set label(t){this._overrideIfSome("label",t)}set layout(t){"horizontal"!==t&&(t="vertical"),this._set("layout",t)}get view(){return this.viewModel.view}set view(t){this.viewModel.view=t}render(){const t="disabled"===this.viewModel?.state,e="pan"===this.viewModel?.navigationMode,o=this.messages.toggle;return c("div",{class:this.classes(r.base,g.widget,{[r.isLayoutHorizontal]:"horizontal"===this.layout})},c("calcite-button",{afterCreate:t=>{this._panButton=t},appearance:e?"outline-fill":"solid",class:g.widgetButton,disabled:t,iconStart:"move",kind:"neutral",label:o,tabIndex:e?void 0:-1,title:o,onclick:this._toggle}),c("calcite-button",{afterCreate:t=>{this._rotateButton=t},appearance:e?"solid":"outline-fill",class:g.widgetButton,disabled:t,iconStart:"rotate",kind:"neutral",label:o,tabIndex:e?-1:void 0,title:o,onclick:this._toggle}))}};t([i()],u.prototype,"icon",null),t([i()],u.prototype,"label",null),t([i({value:"vertical"})],u.prototype,"layout",null),t([i(),p("esri/widgets/NavigationToggle/t9n/NavigationToggle")],u.prototype,"messages",void 0),t([i()],u.prototype,"view",null),t([i({type:a})],u.prototype,"viewModel",void 0),u=t([s("esri.widgets.NavigationToggle")],u);const v=u;export{v as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{property as t,subclass as c}from"../../../core/accessorSupport/decorators.js";import{substitute as o}from"../../../intl/substitute.js";import n from"../../Widget.js";import{css as a}from"../css.js";import{copyToClipboard as l}from"../imageMeasurementUtils.js";import{loadCalciteComponents as i}from"../../support/componentsUtils.js";import{tsx as r}from"../../support/widget.js";import{messageBundle as s}from"../../support/decorators/messageBundle.js";let d=class extends n{constructor(e){super(e),this.messages=null,this.messagesCommon=null,this.accuracy=null,this._selectedSystem="Basemap",this._handleSystemSelection=e=>{this._selectedSystem=e.target.value}}loadDependencies(){return i({action:()=>import("@esri/calcite-components/dist/components/calcite-action"),block:()=>import("@esri/calcite-components/dist/components/calcite-block"),panel:()=>import("@esri/calcite-components/dist/components/calcite-panel"),select:()=>import("@esri/calcite-components/dist/components/calcite-select"),option:()=>import("@esri/calcite-components/dist/components/calcite-option"),table:()=>import("@esri/calcite-components/dist/components/calcite-table"),"table-row":()=>import("@esri/calcite-components/dist/components/calcite-table-row"),"table-header":()=>import("@esri/calcite-components/dist/components/calcite-table-header"),"table-cell":()=>import("@esri/calcite-components/dist/components/calcite-table-cell")})}get _renderLocationBlock(){const{groundCoordinates:e,_selectedSystem:t}=this;return e&&"XY"===t?r("calcite-block",{heading:this.getLocation(),headingLevel:6}):null}get _renderLocationTable(){const{groundCoordinates:e,messages:t,_selectedSystem:c,accuracy:o}=this,n={groundX:e.x.toFixed(3),accuracyX:null!=o?.x?o.x.toFixed(3):"",groundY:e.y.toFixed(3),accuracyY:null!=o?.y?o.y.toFixed(3):"",groundZ:e.z?e.z.toFixed(3):"",accuracyZ:null!=o?.z?o.z.toFixed(3):""};return e&&"Basemap"===c?r("calcite-table",{bordered:!0,caption:t.measurementTable,class:a.measurementsTable,scale:"s"},r("calcite-table-row",{slot:"table-header"},r("calcite-table-header",{alignment:"center",heading:t.type}),r("calcite-table-header",{alignment:"center",heading:t.value}),r("calcite-table-header",{alignment:"center",heading:t.accuracy})),r("calcite-table-row",null,r("calcite-table-cell",{alignment:"center"},t.x),r("calcite-table-cell",{alignment:"center"},n.groundX),r("calcite-table-cell",{alignment:"center"},n.accuracyX)),r("calcite-table-row",null,r("calcite-table-cell",{alignment:"center"},t.y),r("calcite-table-cell",{alignment:"center"},n.groundY),r("calcite-table-cell",{alignment:"center"},n.accuracyY)),r("calcite-table-row",null,r("calcite-table-cell",{alignment:"center"},t.z),r("calcite-table-cell",{alignment:"center"},n.groundZ),r("calcite-table-cell",{alignment:"center"},n.accuracyZ))):null}get _renderSystemSelect(){const{messages:e,messagesCommon:t,groundCoordinates:c}=this,o="feet"===c.spatialReference.unit?e.xyzFeet:e.xyz;return r("div",{class:a.measurementsBar},r("calcite-select",{bind:this,label:e.selectUnitSystem,scale:"m",width:"full",onCalciteSelectChange:this._handleSystemSelection},r("calcite-option",{value:"Basemap"},o),r("calcite-option",{value:"XY"},e.decimalDegrees)),r("calcite-action",{icon:"copy-to-clipboard",
|
|
2
|
+
import{__decorate as e}from"tslib";import{property as t,subclass as c}from"../../../core/accessorSupport/decorators.js";import{substitute as o}from"../../../intl/substitute.js";import n from"../../Widget.js";import{css as a}from"../css.js";import{copyToClipboard as l}from"../imageMeasurementUtils.js";import{loadCalciteComponents as i}from"../../support/componentsUtils.js";import{tsx as r}from"../../support/widget.js";import{messageBundle as s}from"../../support/decorators/messageBundle.js";let d=class extends n{constructor(e){super(e),this.messages=null,this.messagesCommon=null,this.accuracy=null,this._selectedSystem="Basemap",this._handleSystemSelection=e=>{this._selectedSystem=e.target.value}}loadDependencies(){return i({action:()=>import("@esri/calcite-components/dist/components/calcite-action"),block:()=>import("@esri/calcite-components/dist/components/calcite-block"),panel:()=>import("@esri/calcite-components/dist/components/calcite-panel"),select:()=>import("@esri/calcite-components/dist/components/calcite-select"),option:()=>import("@esri/calcite-components/dist/components/calcite-option"),table:()=>import("@esri/calcite-components/dist/components/calcite-table"),"table-row":()=>import("@esri/calcite-components/dist/components/calcite-table-row"),"table-header":()=>import("@esri/calcite-components/dist/components/calcite-table-header"),"table-cell":()=>import("@esri/calcite-components/dist/components/calcite-table-cell")})}get _renderLocationBlock(){const{groundCoordinates:e,_selectedSystem:t}=this;return e&&"XY"===t?r("calcite-block",{heading:this.getLocation(),headingLevel:6}):null}get _renderLocationTable(){const{groundCoordinates:e,messages:t,_selectedSystem:c,accuracy:o}=this,n={groundX:e.x.toFixed(3),accuracyX:null!=o?.x?o.x.toFixed(3):"",groundY:e.y.toFixed(3),accuracyY:null!=o?.y?o.y.toFixed(3):"",groundZ:e.z?e.z.toFixed(3):"",accuracyZ:null!=o?.z?o.z.toFixed(3):""};return e&&"Basemap"===c?r("calcite-table",{bordered:!0,caption:t.measurementTable,class:a.measurementsTable,scale:"s"},r("calcite-table-row",{slot:"table-header"},r("calcite-table-header",{alignment:"center",heading:t.type}),r("calcite-table-header",{alignment:"center",heading:t.value}),r("calcite-table-header",{alignment:"center",heading:t.accuracy})),r("calcite-table-row",null,r("calcite-table-cell",{alignment:"center"},t.x),r("calcite-table-cell",{alignment:"center"},n.groundX),r("calcite-table-cell",{alignment:"center"},n.accuracyX)),r("calcite-table-row",null,r("calcite-table-cell",{alignment:"center"},t.y),r("calcite-table-cell",{alignment:"center"},n.groundY),r("calcite-table-cell",{alignment:"center"},n.accuracyY)),r("calcite-table-row",null,r("calcite-table-cell",{alignment:"center"},t.z),r("calcite-table-cell",{alignment:"center"},n.groundZ),r("calcite-table-cell",{alignment:"center"},n.accuracyZ))):null}get _renderSystemSelect(){const{messages:e,messagesCommon:t,groundCoordinates:c}=this,o="feet"===c.spatialReference.unit?e.xyzFeet:e.xyz;return r("div",{class:a.measurementsBar},r("calcite-select",{bind:this,label:e.selectUnitSystem,scale:"m",width:"full",onCalciteSelectChange:this._handleSystemSelection},r("calcite-option",{value:"Basemap"},o),r("calcite-option",{value:"XY"},e.decimalDegrees)),r("calcite-action",{icon:"copy-to-clipboard",scale:"s",slot:"control",text:"Copy",title:t.copy,onclick:()=>this.copyLocation()}))}copyLocation(){const{groundCoordinates:e}=this;if(!e)return;const t=this.getLocation();t&&l(t)}getLocation(){const{_selectedSystem:e,groundCoordinates:t,accuracy:c}=this;return"Basemap"===e?this.getBasemapLocation(t,c):this.getXYLocation(t)}getXYLocation(e){if(null==e?.longitude||null==e?.latitude)return"";const t={groundX:e.longitude.toFixed(6),groundY:e.latitude.toFixed(6)};return o("{groundX}° , {groundY}°",t)}getBasemapLocation(e,t){if(null==e?.x||null==e?.y)return"";const c={groundX:e.x.toFixed(3),accuracyX:t?.x?t.x.toFixed(3):0,groundY:e.y.toFixed(3),accuracyY:t?.y?t.y.toFixed(3):0,groundZ:e.z?e.z.toFixed(3):0,accuracyZ:t?.z?t.z.toFixed(3):0};return o("{groundX} ± {accuracyX}, {groundY} ± {accuracyY}, {groundZ} ± {accuracyZ}",c)}render(){return r("calcite-panel",{class:a.measurementResults,key:"ground-location-container"},this._renderSystemSelect,this._renderLocationBlock,this._renderLocationTable)}};e([t()],d.prototype,"messages",void 0),e([t(),s("esri/t9n/common")],d.prototype,"messagesCommon",void 0),e([t()],d.prototype,"groundCoordinates",void 0),e([t()],d.prototype,"accuracy",void 0),e([t()],d.prototype,"_selectedSystem",void 0),e([t()],d.prototype,"_renderLocationBlock",null),e([t()],d.prototype,"_renderLocationTable",null),e([t()],d.prototype,"_renderSystemSelect",null),d=e([c("esri.widgets.OrientedImageryViewer.components.ImageLocationWidget")],d);const m=d;export{m as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{measurementLengthUnits as t,measurementAreaUnits as a}from"../../../core/units.js";import{property as n,subclass as r}from"../../../core/accessorSupport/decorators.js";import s from"../../Widget.js";import{css as c}from"../css.js";import{TriangulatedImageMeasurementMixin as i}from"../mixins/TriangulatedImageMeasurementMixin.js";import{loadCalciteComponents as l}from"../../support/componentsUtils.js";import{UnitSelect as u}from"../../support/UnitSelect.js";import{tsx as o}from"../../support/widget.js";import{messageBundle as m}from"../../support/decorators/messageBundle.js";let g=class extends(i(s)){constructor(e){super(e),this.messagesCommon=null}loadDependencies(){return l({action:()=>import("@esri/calcite-components/dist/components/calcite-action"),panel:()=>import("@esri/calcite-components/dist/components/calcite-panel"),button:()=>import("@esri/calcite-components/dist/components/calcite-button"),table:()=>import("@esri/calcite-components/dist/components/calcite-table"),icon:()=>import("@esri/calcite-components/dist/components/calcite-icon"),"table-row":()=>import("@esri/calcite-components/dist/components/calcite-table-row"),"table-header":()=>import("@esri/calcite-components/dist/components/calcite-table-header"),"table-cell":()=>import("@esri/calcite-components/dist/components/calcite-table-cell")})}get _measurementResult(){const{measurementType:e,oiViewModel:t}=this,{areaMeasurementResult:a,heightMeasurementResult:n,distanceMeasurementResult:r}=t;switch(e){case"area":return a;case"height":return n;case"distance":return r}}get _measurementAccuracy(){const{measurementType:e,oiViewModel:t}=this,{areaMeasurementAccuracy:a,heightMeasurementAccuracy:n,distanceAccuracyArray:r}=t;switch(e){case"area":return a;case"height":return n;case"distance":return r}}get _measurementUnit(){const{measurementType:e,pixelAreaMeasurementUnit:t,pixelMeasurementUnit:a}=this;return"area"===e?t:a}get _measurementUnitOptions(){const{measurementType:e}=this;return"area"===e?a:t}_convertedMeasurement(){const{measurementType:e}=this;switch(e){case"area":return this.getConvertedAreaString("measurement");case"height":return this.getConvertedHeightString("measurement");case"distance":return this.getConvertedDistanceString("measurement")}}_measurementUnitChangeHandler(e){const{measurementType:t}=this;if("area"===t)this.pixelAreaMeasurementUnit=e;else this.pixelMeasurementUnit=e}_renderUnitSelect(){const{_measurementUnit:e,_measurementResult:t,_measurementUnitOptions:a,oiViewModel:n,messagesCommon:r}=this,{triangularMeasurementActive:s}=n;return t?o("div",{class:c.measurementsBar},o(u,{options:a,selectLabel:"",value:e,onChange:e=>this._measurementUnitChangeHandler(e)}),t?o("calcite-action",{bind:this,icon:"copy-to-clipboard",label:"copy",
|
|
2
|
+
import{__decorate as e}from"tslib";import{measurementLengthUnits as t,measurementAreaUnits as a}from"../../../core/units.js";import{property as n,subclass as r}from"../../../core/accessorSupport/decorators.js";import s from"../../Widget.js";import{css as c}from"../css.js";import{TriangulatedImageMeasurementMixin as i}from"../mixins/TriangulatedImageMeasurementMixin.js";import{loadCalciteComponents as l}from"../../support/componentsUtils.js";import{UnitSelect as u}from"../../support/UnitSelect.js";import{tsx as o}from"../../support/widget.js";import{messageBundle as m}from"../../support/decorators/messageBundle.js";let g=class extends(i(s)){constructor(e){super(e),this.messagesCommon=null}loadDependencies(){return l({action:()=>import("@esri/calcite-components/dist/components/calcite-action"),panel:()=>import("@esri/calcite-components/dist/components/calcite-panel"),button:()=>import("@esri/calcite-components/dist/components/calcite-button"),table:()=>import("@esri/calcite-components/dist/components/calcite-table"),icon:()=>import("@esri/calcite-components/dist/components/calcite-icon"),"table-row":()=>import("@esri/calcite-components/dist/components/calcite-table-row"),"table-header":()=>import("@esri/calcite-components/dist/components/calcite-table-header"),"table-cell":()=>import("@esri/calcite-components/dist/components/calcite-table-cell")})}get _measurementResult(){const{measurementType:e,oiViewModel:t}=this,{areaMeasurementResult:a,heightMeasurementResult:n,distanceMeasurementResult:r}=t;switch(e){case"area":return a;case"height":return n;case"distance":return r}}get _measurementAccuracy(){const{measurementType:e,oiViewModel:t}=this,{areaMeasurementAccuracy:a,heightMeasurementAccuracy:n,distanceAccuracyArray:r}=t;switch(e){case"area":return a;case"height":return n;case"distance":return r}}get _measurementUnit(){const{measurementType:e,pixelAreaMeasurementUnit:t,pixelMeasurementUnit:a}=this;return"area"===e?t:a}get _measurementUnitOptions(){const{measurementType:e}=this;return"area"===e?a:t}_convertedMeasurement(){const{measurementType:e}=this;switch(e){case"area":return this.getConvertedAreaString("measurement");case"height":return this.getConvertedHeightString("measurement");case"distance":return this.getConvertedDistanceString("measurement")}}_measurementUnitChangeHandler(e){const{measurementType:t}=this;if("area"===t)this.pixelAreaMeasurementUnit=e;else this.pixelMeasurementUnit=e}_renderUnitSelect(){const{_measurementUnit:e,_measurementResult:t,_measurementUnitOptions:a,oiViewModel:n,messagesCommon:r}=this,{triangularMeasurementActive:s}=n;return t?o("div",{class:c.measurementsBar},o(u,{options:a,selectLabel:"",value:e,onChange:e=>this._measurementUnitChangeHandler(e)}),t?o("calcite-action",{bind:this,icon:"copy-to-clipboard",label:"copy",scale:"s",text:"",title:r.copy,onclick:()=>this.copyActiveMeasurementResults(this.measurementType,s)}):null):null}_renderMeasurementResults(){const{_measurementResult:e,_measurementAccuracy:t,messages:a,measurementType:n}=this,{measurementTable:r,value:s,accuracy:i}=a;return e?o("calcite-table",{bordered:!0,caption:r,class:c.measurementsTable,scale:"s"},o("calcite-table-row",{slot:"table-header"},o("calcite-table-header",{alignment:"center",heading:s}),o("calcite-table-header",{alignment:"center",heading:i})),o("calcite-table-row",null,o("calcite-table-cell",{alignment:"center"},this._convertedMeasurement()),o("calcite-table-cell",{alignment:"center"},"distance"===n&&Array.isArray(t)&&t?.length||"area"===n&&t||"height"===n&&t?this.getAccuracy(this.measurementType):o("calcite-icon",{icon:"hourglass-active",scale:"s"})))):null}_renderActiveMeasurementResults(){const{oiViewModel:e}=this,{triangularMeasurementActive:t,measureType:a}=e;if(t)switch(a){case"area":return this._renderTriangularAreaMeasurementResults();case"distance":return this._renderTriangularDistanceMeasurementResults()}return this._renderMeasurementResults()}_renderNewMeasurementButton(){const{messages:e,measurementType:t}=this;return o("calcite-button",{class:c.measurementsButton,onclick:()=>this.oiViewModel.initializeMeasurement(t)},e.newMeasurement)}_renderStartMeasurementMessage(){const{oiViewModel:{displayNewMeasurementButton:e},messages:t,_measurementResult:a}=this;return!e&&!a&&o("div",{class:c.measurementDisplay,key:`start-measurement-${this.measurementType}`},t.startMeasurement)}_renderTriangularAreaMeasurementResults(){const{messages:e,oiViewModel:t}=this,{measurementTable:a,value:n,accuracy:r}=e,{triangulatedAreaMeasurement:s}=t;return s?o("calcite-table",{bordered:!0,caption:a,class:c.measurementsTable,scale:"s"},o("calcite-table-row",{slot:"table-header"},o("calcite-table-header",{alignment:"center",heading:n}),o("calcite-table-header",{alignment:"center",heading:r})),o("calcite-table-row",null,this._renderTriangularAreaCell("measurement"),this._renderTriangularAreaCell("accuracy"))):null}_renderTriangularDistanceAccuracyCell(){const{oiViewModel:e}=this,{triangulatedDistanceAccuracy:t}=e;return o("calcite-table-cell",{alignment:"center"},t?.distanceAccuracy?this.getConvertedTriangularDistanceMeasurementString(t.distanceAccuracy):o("calcite-icon",{icon:"hourglass-active",scale:"s"}))}_renderTriangularAreaCell(e){const{oiViewModel:t}=this,{triangulatedAreaMeasurement:a}=t;return o("calcite-table-cell",{alignment:"center"},a?this.getConvertedTriangularAreaString(e):o("calcite-icon",{icon:"hourglass-active",scale:"s"}))}_renderTriangularDistanceAngleAccuracyCell(){const{oiViewModel:e}=this,{triangulatedDistanceAccuracy:t}=e;return o("calcite-table-cell",{alignment:"center"},t?.angleAccuracy?this.getConvertedTriangularDistanceAngularResultsString(t.angleAccuracy):o("calcite-icon",{icon:"hourglass-active",scale:"s"}))}_renderTriangularDistanceMeasurementResults(){const{oiViewModel:e,messages:t}=this,{distance:a,horizontal:n,vertical:r,slope:s,aspect:i,measurementTable:l,value:u,accuracy:m,type:g}=t,{triangulatedDistanceMeasurement:d,triangularMeasurementActive:h,measureType:p}=e;return h&&"distance"===p&&d?o("calcite-table",{bordered:!0,caption:l,class:c.measurementsTable,scale:"s"},o("calcite-table-row",{slot:"table-header"},o("calcite-table-header",{alignment:"center",heading:g}),o("calcite-table-header",{alignment:"center",heading:u}),o("calcite-table-header",{alignment:"center",heading:m})),o("calcite-table-row",null,o("calcite-table-cell",{alignment:"center"},a),o("calcite-table-cell",{alignment:"center"},d?.distance?this.getConvertedTriangularDistanceMeasurementString(d.distance):o("calcite-icon",{icon:"hourglass-active",scale:"s"})),this._renderTriangularDistanceAccuracyCell()),o("calcite-table-row",null,o("calcite-table-cell",{alignment:"center"},n),o("calcite-table-cell",{alignment:"center"},d?.horizontalDistance?this.getConvertedTriangularDistanceMeasurementString(d.horizontalDistance):o("calcite-icon",{icon:"hourglass-active",scale:"s"})),this._renderTriangularDistanceAccuracyCell()),o("calcite-table-row",null,o("calcite-table-cell",{alignment:"center"},r),o("calcite-table-cell",{alignment:"center"},d?.verticalDistance?this.getConvertedTriangularDistanceMeasurementString(d.verticalDistance):o("calcite-icon",{icon:"hourglass-active",scale:"s"})),this._renderTriangularDistanceAccuracyCell()),o("calcite-table-row",null,o("calcite-table-cell",{alignment:"center"},s),o("calcite-table-cell",{alignment:"center"},d?.slope?this.getConvertedTriangularDistanceAngularResultsString(d.slope):o("calcite-icon",{icon:"hourglass-active",scale:"s"})),this._renderTriangularDistanceAngleAccuracyCell()),o("calcite-table-row",null,o("calcite-table-cell",{alignment:"center"},i),o("calcite-table-cell",{alignment:"center"},d?.aspect?this.getConvertedTriangularDistanceAngularResultsString(d.aspect):o("calcite-icon",{icon:"hourglass-active",scale:"s"})),this._renderTriangularDistanceAngleAccuracyCell())):null}render(){return o("calcite-panel",{class:c.measurementResults,key:`measurement-result-container-${this.measurementType}`},this._renderStartMeasurementMessage(),this._renderNewMeasurementButton(),this._renderUnitSelect(),this._renderActiveMeasurementResults())}};e([n(),m("esri/t9n/common")],g.prototype,"messagesCommon",void 0),e([n()],g.prototype,"_measurementResult",null),e([n()],g.prototype,"_measurementAccuracy",null),e([n()],g.prototype,"_measurementUnit",null),e([n()],g.prototype,"_measurementUnitOptions",null),g=e([r("esri.widgets.OrientedImageryViewer.components.ImageMeasurementWidget")],g);const d=g;export{d as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import t from"../../../core/Collection.js";import{IdentifiableMixin as s}from"../../../core/Identifiable.js";import{watch as a,syncAndInitial as i,on as o}from"../../../core/reactiveUtils.js";import{property as r,subclass as l}from"../../../core/accessorSupport/decorators.js";import{isEditableLayer as n}from"../../../layers/support/editableLayers.js";import c from"../../../support/actions/ActionToggle.js";import d from"../../Widget.js";import{css as h}from"../css.js";import p from"./OverlayLayersList.js";import{isValidDataCaptureLayer as m}from"../support/typeUtils.js";import{loadCalciteComponents as u}from"../../support/componentsUtils.js";import{globalCss as y}from"../../support/globalCss.js";import{tsx as g}from"../../support/widget.js";let L=class extends(s(d)){constructor(e){super(e),this._previousAction=null,this.closed=!1,this.dataCaptureEnabled=!1,this.dataCaptureLayer=null,this.imageGeometryField=null,this.imageReferenceField=null,this.layerList=new p({selectionMode:"multiple"}),this.messages=null,this.overlayedLayers=new t,this.showCameraLocations=!1,this.showMapFeatures=!1,this._createSelectedItemsHandle=()=>{this.removeHandles("selected-items"),this.addHandles(this._trackLayerSelectionChanges(),"selected-items")},this._createDataCaptureLayerHandle=()=>a(()=>({dataCaptureLayer:this.dataCaptureLayer,operationalItems:this.layerList.operationalItems}),({dataCaptureLayer:e,operationalItems:t},s)=>{if(!e&&s?.dataCaptureLayer){const e=t.find(e=>e.layer===s.dataCaptureLayer);e&&e.actionsSections?.items.forEach(e=>{e.items.forEach(e=>{"create-features"===e.id&&(e.value=!1)})})}},i),this._handleSelectedItemsChange=({added:e,removed:t})=>{e.forEach(e=>{this.overlayedLayers.includes(e.layer)||this.onLayerSelected?.(e)}),t.forEach(e=>{this.overlayedLayers.includes(e.layer)&&this.onLayerDeselected?.(e)}),this.overlayedLayers.removeAll(),this.overlayedLayers.addMany(this.layerList.selectedItems.items.map(e=>e.layer))},this._layerListTriggerActionHandle=()=>o(()=>this.layerList,"trigger-action",e=>{const{action:t,item:{layer:s}}=e;switch(this._resetPreviousAction(t),t.id){case"create-features":this._toggleDataCaptureLayer(t,s);break;case"show-all-features":{const e=s?.id;e&&this.onFilterCapturedFeatures?.(e);break}}}),this._resetPreviousAction=e=>{"toggle"===this._previousAction?.type&&this._previousAction!==e&&(this._previousAction.value=!1,this._previousAction=null)},this._toggleDataCaptureLayer=(e,t)=>{this._previousAction=e;const s=e.value;this.dataCaptureLayer=s?t:null,this.onDataCaptureLayerChanged?.(this.dataCaptureLayer)},this._trackLayerSelectionChanges=()=>o(()=>this.layerList.selectedItems,"change",this._handleSelectedItemsChange),this._watchLayerListForListItemCreatedFunction=()=>a(()=>({layerList:this.layerList,listItemCreatedFunction:this._listItemCreatedFunction}),()=>{this.layerList.listItemCreatedFunction=this._listItemCreatedFunction},i),this._watchSelectedItems=()=>a(()=>this.layerList.selectedItems,this._createSelectedItemsHandle,i)}initialize(){this.addHandles([this._watchSelectedItems(),this._layerListTriggerActionHandle(),this._watchLayerListForListItemCreatedFunction(),this._createDataCaptureLayerHandle()])}loadDependencies(){return u({list:()=>import("@esri/calcite-components/dist/components/calcite-list"),"list-item":()=>import("@esri/calcite-components/dist/components/calcite-list-item"),panel:()=>import("@esri/calcite-components/dist/components/calcite-panel"),switch:()=>import("@esri/calcite-components/dist/components/calcite-switch")})}get _listItemCreatedFunction(){const{dataCaptureEnabled:e,imageGeometryField:t,imageReferenceField:s}=this;return e&&t&&s?async e=>{const{item:a}=e,i=a.layer,{dataCaptureLayer:o,overlayedLayers:r,messages:{createFeaturesFromImage:l,showFeatures:c},layerList:d}=this,h=r.includes(i),{selectedItems:p}=d;if(C(h,p,a),await(i?.load()),!i||!m(i,t,s)||!n(i))return;const u=o===i,y=_([l,c],a,p,u);u&&(this._previousAction=y)}:null}get view(){return this.layerList?.view}set view(e){this.layerList.view=e}_renderCameraLocationsSwitch(e){return g("calcite-list-item",{bind:this,label:this.messages.overlayCameraLocations,onclick:this._toggleShowCameraLocations},g("calcite-switch",{bind:this,checked:e,class:h.overlaysSwitch,
|
|
2
|
+
import{__decorate as e}from"tslib";import t from"../../../core/Collection.js";import{IdentifiableMixin as s}from"../../../core/Identifiable.js";import{watch as a,syncAndInitial as i,on as o}from"../../../core/reactiveUtils.js";import{property as r,subclass as l}from"../../../core/accessorSupport/decorators.js";import{isEditableLayer as n}from"../../../layers/support/editableLayers.js";import c from"../../../support/actions/ActionToggle.js";import d from"../../Widget.js";import{css as h}from"../css.js";import p from"./OverlayLayersList.js";import{isValidDataCaptureLayer as m}from"../support/typeUtils.js";import{loadCalciteComponents as u}from"../../support/componentsUtils.js";import{globalCss as y}from"../../support/globalCss.js";import{tsx as g}from"../../support/widget.js";let L=class extends(s(d)){constructor(e){super(e),this._previousAction=null,this.closed=!1,this.dataCaptureEnabled=!1,this.dataCaptureLayer=null,this.imageGeometryField=null,this.imageReferenceField=null,this.layerList=new p({selectionMode:"multiple"}),this.messages=null,this.overlayedLayers=new t,this.showCameraLocations=!1,this.showMapFeatures=!1,this._createSelectedItemsHandle=()=>{this.removeHandles("selected-items"),this.addHandles(this._trackLayerSelectionChanges(),"selected-items")},this._createDataCaptureLayerHandle=()=>a(()=>({dataCaptureLayer:this.dataCaptureLayer,operationalItems:this.layerList.operationalItems}),({dataCaptureLayer:e,operationalItems:t},s)=>{if(!e&&s?.dataCaptureLayer){const e=t.find(e=>e.layer===s.dataCaptureLayer);e&&e.actionsSections?.items.forEach(e=>{e.items.forEach(e=>{"create-features"===e.id&&(e.value=!1)})})}},i),this._handleSelectedItemsChange=({added:e,removed:t})=>{e.forEach(e=>{this.overlayedLayers.includes(e.layer)||this.onLayerSelected?.(e)}),t.forEach(e=>{this.overlayedLayers.includes(e.layer)&&this.onLayerDeselected?.(e)}),this.overlayedLayers.removeAll(),this.overlayedLayers.addMany(this.layerList.selectedItems.items.map(e=>e.layer))},this._layerListTriggerActionHandle=()=>o(()=>this.layerList,"trigger-action",e=>{const{action:t,item:{layer:s}}=e;switch(this._resetPreviousAction(t),t.id){case"create-features":this._toggleDataCaptureLayer(t,s);break;case"show-all-features":{const e=s?.id;e&&this.onFilterCapturedFeatures?.(e);break}}}),this._resetPreviousAction=e=>{"toggle"===this._previousAction?.type&&this._previousAction!==e&&(this._previousAction.value=!1,this._previousAction=null)},this._toggleDataCaptureLayer=(e,t)=>{this._previousAction=e;const s=e.value;this.dataCaptureLayer=s?t:null,this.onDataCaptureLayerChanged?.(this.dataCaptureLayer)},this._trackLayerSelectionChanges=()=>o(()=>this.layerList.selectedItems,"change",this._handleSelectedItemsChange),this._watchLayerListForListItemCreatedFunction=()=>a(()=>({layerList:this.layerList,listItemCreatedFunction:this._listItemCreatedFunction}),()=>{this.layerList.listItemCreatedFunction=this._listItemCreatedFunction},i),this._watchSelectedItems=()=>a(()=>this.layerList.selectedItems,this._createSelectedItemsHandle,i)}initialize(){this.addHandles([this._watchSelectedItems(),this._layerListTriggerActionHandle(),this._watchLayerListForListItemCreatedFunction(),this._createDataCaptureLayerHandle()])}loadDependencies(){return u({list:()=>import("@esri/calcite-components/dist/components/calcite-list"),"list-item":()=>import("@esri/calcite-components/dist/components/calcite-list-item"),panel:()=>import("@esri/calcite-components/dist/components/calcite-panel"),switch:()=>import("@esri/calcite-components/dist/components/calcite-switch")})}get _listItemCreatedFunction(){const{dataCaptureEnabled:e,imageGeometryField:t,imageReferenceField:s}=this;return e&&t&&s?async e=>{const{item:a}=e,i=a.layer,{dataCaptureLayer:o,overlayedLayers:r,messages:{createFeaturesFromImage:l,showFeatures:c},layerList:d}=this,h=r.includes(i),{selectedItems:p}=d;if(C(h,p,a),await(i?.load()),!i||!m(i,t,s)||!n(i))return;const u=o===i,y=_([l,c],a,p,u);u&&(this._previousAction=y)}:null}get view(){return this.layerList?.view}set view(e){this.layerList.view=e}_renderCameraLocationsSwitch(e){return g("calcite-list-item",{bind:this,label:this.messages.overlayCameraLocations,onclick:this._toggleShowCameraLocations},g("calcite-switch",{bind:this,checked:e,class:h.overlaysSwitch,scale:"s",slot:"actions-end",onchange:this._toggleShowCameraLocations}))}_renderOverlayMapFeatures(e){return g("calcite-list-item",{bind:this,label:this.messages?.overlayMapFeatures,onclick:this._toggleShowMapFeatures},g("calcite-switch",{bind:this,checked:e,class:h.overlaysSwitch,scale:"s",slot:"actions-end",onchange:this._toggleShowMapFeatures}))}_renderList(e){return e?g("div",{class:h.imageOverlaysLayerList},this.layerList.render()):null}_renderPanel(){const{closed:e,messages:t,showCameraLocations:s,showMapFeatures:a}=this;return g("calcite-panel",{bind:this,closable:!0,closed:e,heading:t.imageOverlays,onCalcitePanelClose:this.onImageOverlaysClosed},g("calcite-list",{label:t.imageOverlays},this._renderCameraLocationsSwitch(s),this._renderOverlayMapFeatures(a)),this._renderList(a))}_toggleShowCameraLocations(e){e.stopPropagation(),this.showCameraLocations=!this.showCameraLocations,this.onShowCameraLocationsChanged?.(this.showCameraLocations)}_toggleShowMapFeatures(e){e.stopPropagation(),this.showMapFeatures=!this.showMapFeatures,this.onShowMapFeaturesChanged?.(this.showMapFeatures)}render(){const e=this.layerList.operationalItems.items.length,t=this.showMapFeatures&&0===e,s=this.showMapFeatures&&e>0,a={[y.widget]:!0,[h.imageOverlaysNoResult]:t,[h.imageOverlaysIncreasedHeight]:s,[h.imageOverlays]:!t&&!s};return g("div",{class:this.classes(a)},this._renderPanel())}};e([r()],L.prototype,"_previousAction",void 0),e([r()],L.prototype,"_listItemCreatedFunction",null),e([r()],L.prototype,"closed",void 0),e([r()],L.prototype,"dataCaptureEnabled",void 0),e([r()],L.prototype,"dataCaptureLayer",void 0),e([r()],L.prototype,"imageGeometryField",void 0),e([r()],L.prototype,"imageReferenceField",void 0),e([r()],L.prototype,"layerList",void 0),e([r()],L.prototype,"messages",void 0),e([r()],L.prototype,"onDataCaptureLayerChanged",void 0),e([r()],L.prototype,"onFilterCapturedFeatures",void 0),e([r()],L.prototype,"onImageOverlaysClosed",void 0),e([r()],L.prototype,"onLayerDeselected",void 0),e([r()],L.prototype,"onLayerSelected",void 0),e([r()],L.prototype,"onShowCameraLocationsChanged",void 0),e([r()],L.prototype,"onShowMapFeaturesChanged",void 0),e([r()],L.prototype,"overlayedLayers",void 0),e([r()],L.prototype,"showCameraLocations",void 0),e([r()],L.prototype,"showMapFeatures",void 0),e([r()],L.prototype,"view",null),L=e([l("esri.widgets.OrientedImageryViewer.components.ImageOverlays")],L);const v=L;function C(e,t,s){e&&t.push(s)}function w(e,s){const a=new t;a.add(e[0]),a.add(e[1]),s.actionsSections=new t([a])}function _(e,t,s,o=!1){const r=new c({icon:"pencil",id:"create-features",title:e[0],value:o}),l=new c({icon:"list-show-all",id:"show-all-features",title:e[1],value:o});return t.addHandles(a(()=>s.includes(t),e=>{r.visible=e,l.visible=e},i)),w([r,l],t),r}export{v as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import t from"../../../core/Collection.js";import i from"./NavigationAction.js";import{loadCalciteComponents as e}from"../../support/componentsUtils.js";import{tsx as c}from"../../support/widget.js";function o(){return e({"action-menu":()=>import("@esri/calcite-components/dist/components/calcite-action-menu"),action:()=>import("@esri/calcite-components/dist/components/calcite-action")})}const n=t.ofType(i);function a(t){const{activeAction:i,actions:e}=t,o=e.length;return 0===o?c("div",{"data-testid":"no-actions",hidden:!0}):o>1?c("calcite-action-menu",{"data-testid":"action-menu",label:t.label,scale:t.scale},c("calcite-action",{active:!!i,"data-testid":"action-menu-trigger",icon:i?.icon??t.icon,slot:"trigger",text:i?.text??t.label,title:i?.title??t.title}),e.items.map(t=>c("calcite-action",{active:t.active,"data-testid":t.uid,disabled:t.disabled,icon:t.icon,key:t.uid,
|
|
2
|
+
import t from"../../../core/Collection.js";import i from"./NavigationAction.js";import{loadCalciteComponents as e}from"../../support/componentsUtils.js";import{tsx as c}from"../../support/widget.js";function o(){return e({"action-menu":()=>import("@esri/calcite-components/dist/components/calcite-action-menu"),action:()=>import("@esri/calcite-components/dist/components/calcite-action")})}const n=t.ofType(i);function a(t){const{activeAction:i,actions:e}=t,o=e.length;return 0===o?c("div",{"data-testid":"no-actions",hidden:!0}):o>1?c("calcite-action-menu",{"data-testid":"action-menu",label:t.label,scale:t.scale},c("calcite-action",{active:!!i,"data-testid":"action-menu-trigger",icon:i?.icon??t.icon,slot:"trigger",text:i?.text??t.label,title:i?.title??t.title}),e.items.map(t=>c("calcite-action",{active:t.active,"data-testid":t.uid,disabled:t.disabled,icon:t.icon,key:t.uid,text:t.text,textEnabled:!0,title:t.title,onclick:t.onclick}))):c("calcite-action",{active:e.items[0].active,"data-testid":"action",disabled:e.items[0].disabled,icon:e.items[0].icon,text:e.items[0].text,title:e.items[0].title,onclick:e.items[0].onclick})}export{a as NavigationActions,n as NavigationActionsCollection,o as loadNavigationActionsComponents};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as t}from"tslib";import{createTask as e}from"../../../core/asyncUtils.js";import{throwIfAborted as o}from"../../../core/promiseUtils.js";import{whenOnce as i}from"../../../core/reactiveUtils.js";import{property as r,subclass as s}from"../../../core/accessorSupport/decorators.js";import n from"../../Widget.js";import{css as a}from"../css.js";import{loadArrowDependencies as c,Arrow as l}from"./Arrow.js";import{getRelativeAngleBetweenPoints as d,getPixelXYFromRelativeAngle as m}from"./imageNavigationUtils.js";import p from"./NavigationUIPanoramicViewModel.js";import{tsx as u}from"../../support/widget.js";let g=class extends n{constructor(t){super(t),this.navigate=null,this.viewModel=new p,this._clickTask=null,this._handleClick=t=>{this._clickTask?.abort(),this._clickTask=e(async e=>{const r=t.target;if(!this.navigate||!this.currentNode)return;await i(()=>"compiled"===this.viewModel.state,{signal:e});const s=r.getAttribute("data-direction");o(e),await this.navigate({direction:s,signal:e})})}}loadDependencies(){return c()}set currentNode(t){this.viewModel.currentNode=t}get currentNode(){return this.viewModel.currentNode}get nodes(){return this.viewModel.nodes}set nodes(t){this.viewModel.nodes=t}render(){const{currentNode:t}=this;if(!t)return null;const{towards:e,backwards:o,left:i,right:r,currentHeading:s}=t;return u("div",{class:a.navigationUI},u("div",{class:a.navigationDirectionPad},[e,o,i,r].map((e,o)=>{if(!e)return null;const i=d(t.geometry.x,t.geometry.y,e.geometry.x,e.geometry.y)-s,{x:r,y:n}=m(i);return u(l,{class:a.navigationDirection,"data-direction":t.getDirectionTo(e),icon:"chevron-up",key:o,
|
|
2
|
+
import{__decorate as t}from"tslib";import{createTask as e}from"../../../core/asyncUtils.js";import{throwIfAborted as o}from"../../../core/promiseUtils.js";import{whenOnce as i}from"../../../core/reactiveUtils.js";import{property as r,subclass as s}from"../../../core/accessorSupport/decorators.js";import n from"../../Widget.js";import{css as a}from"../css.js";import{loadArrowDependencies as c,Arrow as l}from"./Arrow.js";import{getRelativeAngleBetweenPoints as d,getPixelXYFromRelativeAngle as m}from"./imageNavigationUtils.js";import p from"./NavigationUIPanoramicViewModel.js";import{tsx as u}from"../../support/widget.js";let g=class extends n{constructor(t){super(t),this.navigate=null,this.viewModel=new p,this._clickTask=null,this._handleClick=t=>{this._clickTask?.abort(),this._clickTask=e(async e=>{const r=t.target;if(!this.navigate||!this.currentNode)return;await i(()=>"compiled"===this.viewModel.state,{signal:e});const s=r.getAttribute("data-direction");o(e),await this.navigate({direction:s,signal:e})})}}loadDependencies(){return c()}set currentNode(t){this.viewModel.currentNode=t}get currentNode(){return this.viewModel.currentNode}get nodes(){return this.viewModel.nodes}set nodes(t){this.viewModel.nodes=t}render(){const{currentNode:t}=this;if(!t)return null;const{towards:e,backwards:o,left:i,right:r,currentHeading:s}=t;return u("div",{class:a.navigationUI},u("div",{class:a.navigationDirectionPad},[e,o,i,r].map((e,o)=>{if(!e)return null;const i=d(t.geometry.x,t.geometry.y,e.geometry.x,e.geometry.y)-s,{x:r,y:n}=m(i);return u(l,{class:a.navigationDirection,"data-direction":t.getDirectionTo(e),icon:"chevron-up",key:o,rotateZ:i,x:r,y:n,onclick:this._handleClick})})))}};t([r()],g.prototype,"currentNode",null),t([r()],g.prototype,"navigate",void 0),t([r({nonNullable:!0})],g.prototype,"nodes",null),t([r()],g.prototype,"viewModel",void 0),t([r()],g.prototype,"_clickTask",void 0),g=t([s("esri.widgets.OrientedImageryViewer.components.NavigationUI360")],g);const v=g;export{v as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{loadCalciteComponents as t}from"../../support/componentsUtils.js";import{tsx as o}from"../../support/widget.js";function i(){return t({action:()=>import("@esri/calcite-components/dist/components/calcite-action"),"action-bar":()=>import("@esri/calcite-components/dist/components/calcite-action-bar")})}function n(t){const{expandDisabled:i,layout:n,overlayPositioning:e,actions:c}=t;return o("calcite-action-bar",{expandDisabled:i,floating:!0,layout:n,overlayPositioning:e,slot:"fab"},c.map(t=>o("calcite-action",{icon:t.icon,key:t.title,
|
|
2
|
+
import{loadCalciteComponents as t}from"../../support/componentsUtils.js";import{tsx as o}from"../../support/widget.js";function i(){return t({action:()=>import("@esri/calcite-components/dist/components/calcite-action"),"action-bar":()=>import("@esri/calcite-components/dist/components/calcite-action-bar")})}function n(t){const{expandDisabled:i,layout:n,overlayPositioning:e,actions:c}=t;return o("calcite-action-bar",{expandDisabled:i,floating:!0,layout:n,overlayPositioning:e,slot:"fab"},c.map(t=>o("calcite-action",{icon:t.icon,key:t.title,scale:t.scale,text:t.text,title:t.title,onclick:t.onclick})))}function e(t){const{uiStrings:i,layout:e,onNext:c,onPrev:a}=t;return o(n,{actions:[{icon:"chevron-left",scale:"s",text:i.previous,title:i.previous,onclick:a},{icon:"chevron-right",scale:"s",text:i.next,title:i.next,onclick:c}],expandDisabled:!0,layout:e,overlayPositioning:"fixed"})}export{n as FloatingActionBar,e as SequentialNavigationUI,i as loadSequentialNavigationUIComponents};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as o}from"tslib";import{property as t,subclass as e}from"../../../core/accessorSupport/decorators.js";import{get as n}from"../../../core/accessorSupport/get.js";import i from"../../Widget.js";import{loadCalciteComponents as c}from"../../support/componentsUtils.js";import{tsx as s}from"../../support/widget.js";const r={point:()=>[p("pin","point","draw.point"),p("line","polyline","draw.polyline"),p("polygon","polygon","draw.polygon")],polyline:()=>[p("line","polyline","draw.polyline")],polygon:()=>[p("polygon","polygon","draw.polygon")]};let a=class extends i{constructor(o){super(o),this.messages=null,this.type=null}loadDependencies(){return c({"action-bar":()=>import("@esri/calcite-components/dist/components/calcite-action-bar"),"action-group":()=>import("@esri/calcite-components/dist/components/calcite-action-group"),action:()=>import("@esri/calcite-components/dist/components/calcite-action")})}static{this.vnodeSelector="calcite-action-bar"}render(){const{messages:o,type:t}=this,e=l(t);return s("calcite-action-bar",{expandDisabled:!0,floating:!0,layout:"horizontal",position:"start"},e.map(({icon:t,messageKey:e,action:i})=>{const c=n(o,e);return s("calcite-action-group",null,s("calcite-action",{alignment:"center",bind:this,"data-action":i,icon:t,
|
|
2
|
+
import{__decorate as o}from"tslib";import{property as t,subclass as e}from"../../../core/accessorSupport/decorators.js";import{get as n}from"../../../core/accessorSupport/get.js";import i from"../../Widget.js";import{loadCalciteComponents as c}from"../../support/componentsUtils.js";import{tsx as s}from"../../support/widget.js";const r={point:()=>[p("pin","point","draw.point"),p("line","polyline","draw.polyline"),p("polygon","polygon","draw.polygon")],polyline:()=>[p("line","polyline","draw.polyline")],polygon:()=>[p("polygon","polygon","draw.polygon")]};let a=class extends i{constructor(o){super(o),this.messages=null,this.type=null}loadDependencies(){return c({"action-bar":()=>import("@esri/calcite-components/dist/components/calcite-action-bar"),"action-group":()=>import("@esri/calcite-components/dist/components/calcite-action-group"),action:()=>import("@esri/calcite-components/dist/components/calcite-action")})}static{this.vnodeSelector="calcite-action-bar"}render(){const{messages:o,type:t}=this,e=l(t);return s("calcite-action-bar",{expandDisabled:!0,floating:!0,layout:"horizontal",position:"start"},e.map(({icon:t,messageKey:e,action:i})=>{const c=n(o,e);return s("calcite-action-group",null,s("calcite-action",{alignment:"center",bind:this,"data-action":i,icon:t,text:c,title:c,onclick:this.onAction}))}))}};function p(o,t,e){return{icon:o,messageKey:e,action:`draw-${t}`}}function l(o){return[{icon:"cursor",messageKey:"selectFeature",action:"select-feature"},...r[o]?.()??[],{icon:"save",messageKey:"save",action:"save"},{icon:"trash",messageKey:"delete",action:"delete-feature"}]}o([t()],a.prototype,"messages",void 0),o([t()],a.prototype,"onAction",void 0),o([t()],a.prototype,"type",void 0),a=o([e("esri.widgets.OrientedImageryViewer.components.SketchTools")],a);const m=a;export{m as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{css as e}from"../css.js";import{loadCalciteComponents as t}from"../../support/componentsUtils.js";import{tsx as n}from"../../support/widget.js";function i(){return t({panel:()=>import("@esri/calcite-components/dist/components/calcite-panel"),action:()=>import("@esri/calcite-components/dist/components/calcite-action"),label:()=>import("@esri/calcite-components/dist/components/calcite-label"),slider:()=>import("@esri/calcite-components/dist/components/calcite-slider")})}function o(t){const{uiStrings:i,videoEnhancementToolActive:o,resetTools:s,onClose:a,brightness:l,constrast:r,handleBrightnessChange:m,handleContrastChange:p}=t,{reset:d,videoEnhancement:h}=i;return n("calcite-panel",{class:e.imageEnhancementWrapper,closable:!0,closed:!o,heading:h,key:h,onCalcitePanelClose:a},n("div",{class:e.imageEnhancementTools},c({title:i.brightness,value:l,handleChange:m}),c({title:i.contrast,value:r,handleChange:p})),n("calcite-action",{icon:"reset",
|
|
2
|
+
import{css as e}from"../css.js";import{loadCalciteComponents as t}from"../../support/componentsUtils.js";import{tsx as n}from"../../support/widget.js";function i(){return t({panel:()=>import("@esri/calcite-components/dist/components/calcite-panel"),action:()=>import("@esri/calcite-components/dist/components/calcite-action"),label:()=>import("@esri/calcite-components/dist/components/calcite-label"),slider:()=>import("@esri/calcite-components/dist/components/calcite-slider")})}function o(t){const{uiStrings:i,videoEnhancementToolActive:o,resetTools:s,onClose:a,brightness:l,constrast:r,handleBrightnessChange:m,handleContrastChange:p}=t,{reset:d,videoEnhancement:h}=i;return n("calcite-panel",{class:e.imageEnhancementWrapper,closable:!0,closed:!o,heading:h,key:h,onCalcitePanelClose:a},n("div",{class:e.imageEnhancementTools},c({title:i.brightness,value:l,handleChange:m}),c({title:i.contrast,value:r,handleChange:p})),n("calcite-action",{icon:"reset",slot:"header-actions-end",text:d,onclick:s}))}function c({title:t,tooltip:i,value:o,handleChange:c,max:s=10,min:a=0,ticks:l=2,step:r=1}){return n("div",{class:e.imageEnhancementToolContainer},n("calcite-label",{title:i},t,n("calcite-slider",{labelTicks:!0,max:s,min:a,step:r,ticks:l,title:i,value:o,onCalciteSliderInput:c})))}export{o as VideoEnhancementTools,i as loadVideoEnhancementComponents,c as renderEnhancementSlider};
|