@arcgis/core 4.24.0-next.20220430 → 4.24.0-next.20220503
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/Basemap.js +1 -1
- package/Color.js +1 -1
- package/Ground.js +1 -1
- package/Map.js +1 -1
- package/PopupTemplate.js +1 -1
- package/WebMap.js +1 -1
- package/WebScene.js +1 -1
- package/analysis/LinearDimension.js +1 -1
- package/analysis/SliceAnalysis.js +1 -1
- package/applications/SceneViewer/sceneViewerUtils.js +1 -1
- package/arcade/Dictionary.js +1 -1
- package/arcade/Feature.js +1 -1
- package/arcade/featureset/sources/FeatureLayerDynamic.js +1 -1
- package/arcade/featureset/support/FeatureSet.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{e06461703e6f1acfcfdc.js → 076d1b1101b59af0d389.js} +1 -1
- package/assets/esri/core/workers/chunks/0b72d123386dc4ec7538.js +1 -0
- package/assets/esri/core/workers/chunks/0d53e575f11198867619.js +1 -0
- package/assets/esri/core/workers/chunks/0e6e3cf07c84d9f040c0.js +1 -0
- package/assets/esri/core/workers/chunks/105728404ddd9e73d5c9.js +1 -0
- package/assets/esri/core/workers/chunks/11106873b009b98e4286.js +1 -0
- package/assets/esri/core/workers/chunks/11a7b156591d1feca952.js +1 -0
- package/assets/esri/core/workers/chunks/{94325f920a125610e1f5.js → 12feeace7215248be23f.js} +1 -1
- package/assets/esri/core/workers/chunks/17be5bd0d1c233d73d7a.js +1 -0
- package/assets/esri/core/workers/chunks/1b53bd65407ba5c479d7.js +1 -0
- package/assets/esri/core/workers/chunks/1d91aa745b49b2ab36cf.js +1 -0
- package/assets/esri/core/workers/chunks/{fd35b69872ac9393924f.js → 1db8bfb1731be3ae320c.js} +1 -1
- package/assets/esri/core/workers/chunks/{3433361f09c84b31aec4.js → 2290bd6dc2e6bb136e14.js} +1 -1
- package/assets/esri/core/workers/chunks/24217129d492e170f0f0.js +1 -0
- package/assets/esri/core/workers/chunks/24e194107e0e5090125b.js +1 -0
- package/assets/esri/core/workers/chunks/2a1301a1d0cd4c0c17cf.js +1 -0
- package/assets/esri/core/workers/chunks/{178831b0d0bdabcc45e7.js → 2a676221ca1fc8e0cf34.js} +1 -1
- package/assets/esri/core/workers/chunks/2aede0d1dcac8592436b.js +1 -0
- package/assets/esri/core/workers/chunks/2b93ad626f5e75b97692.js +1 -0
- package/assets/esri/core/workers/chunks/2d03210fc6b5884c6bf9.js +1 -0
- package/assets/esri/core/workers/chunks/{b10c333abe4f4e52841c.js → 2dfd3def105005fc72c7.js} +1 -1
- package/assets/esri/core/workers/chunks/2f8ff35b8ab15c0e39c2.js +1 -0
- package/assets/esri/core/workers/chunks/36272141b3c33cb19026.js +1 -0
- package/assets/esri/core/workers/chunks/36c8e8de9c3f67d32572.js +1 -0
- package/assets/esri/core/workers/chunks/3ab8c6ae2f2713f637b0.js +1 -0
- package/assets/esri/core/workers/chunks/3c058381adcfdc407aa1.js +1 -0
- package/assets/esri/core/workers/chunks/3f39df1dfc0a685e5f9d.js +1 -0
- package/assets/esri/core/workers/chunks/3fd52a03b3126556aee6.js +1 -0
- package/assets/esri/core/workers/chunks/4082d8573f41f952c72e.js +1 -0
- package/assets/esri/core/workers/chunks/40b11eea270f6688ff9c.js +1 -0
- package/assets/esri/core/workers/chunks/4281b4b27f4767cdd3ae.js +1 -0
- package/assets/esri/core/workers/chunks/43fcaaeb6fd179e9199b.js +1 -0
- package/assets/esri/core/workers/chunks/4c65b27d80b23c0c3101.js +1 -0
- package/assets/esri/core/workers/chunks/{a6406a248b7b2ed65f35.js → 4ec7d59b0c814dbaa7a4.js} +1 -1
- package/assets/esri/core/workers/chunks/4f378ad6f4299183df85.js +1 -0
- package/assets/esri/core/workers/chunks/505b0aa5ee3e5a26c351.js +1 -0
- package/assets/esri/core/workers/chunks/509a9cdd0228a730bcea.js +1 -0
- package/assets/esri/core/workers/chunks/52255ad573cec0a34720.js +1 -0
- package/assets/esri/core/workers/chunks/52d4fdc451a58a858af1.js +1 -0
- package/assets/esri/core/workers/chunks/5405f478af3563580926.js +1 -0
- package/assets/esri/core/workers/chunks/54577c2522ca3ff08f7e.js +1 -0
- package/assets/esri/core/workers/chunks/54d67e450da6ce2641b4.js +1 -0
- package/assets/esri/core/workers/chunks/56d3cb0ae0069a8eadde.js +1 -0
- package/assets/esri/core/workers/chunks/5b4efe0014162f777534.js +1 -0
- package/assets/esri/core/workers/chunks/5baa162351551817838b.js +1 -0
- package/assets/esri/core/workers/chunks/5cf2064bfd9d0847d9ec.js +1 -0
- package/assets/esri/core/workers/chunks/620dc3c13c345d5aa9f6.js +1 -0
- package/assets/esri/core/workers/chunks/7c290763920f52a1f504.js +1 -0
- package/assets/esri/core/workers/chunks/7dc266be958e34e81007.js +972 -0
- package/assets/esri/core/workers/chunks/7dfd70f4fa1096e56641.js +1 -0
- package/assets/esri/core/workers/chunks/7f097de06972a68cd08a.js +1 -0
- package/assets/esri/core/workers/chunks/8033531b0cc706b40d86.js +1 -0
- package/assets/esri/core/workers/chunks/814234844a056d9f1ddc.js +1 -0
- package/assets/esri/core/workers/chunks/83700cdd60ceecc639cd.js +1 -0
- package/assets/esri/core/workers/chunks/857df84cea67079a91e5.js +1 -0
- package/assets/esri/core/workers/chunks/8793070d288878d6f49b.js +1 -0
- package/assets/esri/core/workers/chunks/8865c5cc28df60364e60.js +1 -0
- package/assets/esri/core/workers/chunks/{e9f786d4ba3143ed9644.js → 8cc85d1d46dda16ad041.js} +1 -1
- package/assets/esri/core/workers/chunks/958a7ef2cbf048819988.js +1 -0
- package/assets/esri/core/workers/chunks/967af0aa4dc4da032fdc.js +1 -0
- package/assets/esri/core/workers/chunks/9722880bd7f455b2bd07.js +1 -0
- package/assets/esri/core/workers/chunks/9d738aab0d907cd09a9d.js +1 -0
- package/assets/esri/core/workers/chunks/{86b31ae136f931d7884a.js → 9e6df034d7949880471f.js} +1 -1
- package/assets/esri/core/workers/chunks/a056a79f31cddb066f15.js +1 -0
- package/assets/esri/core/workers/chunks/a2c9fd78d42df7314a3e.js +1 -0
- package/assets/esri/core/workers/chunks/a4dcb50f6622cb1444c8.js +1 -0
- package/assets/esri/core/workers/chunks/a6bfbe449b8c2fa5334c.js +1 -0
- package/assets/esri/core/workers/chunks/a8ed1a938dc164b401d9.js +1 -0
- package/assets/esri/core/workers/chunks/a9a73bc4875a5aeaf1b9.js +1 -0
- package/assets/esri/core/workers/chunks/ac0df52b2f2a4874e4ea.js +1 -0
- package/assets/esri/core/workers/chunks/{431efa172901ab8e4d53.js → acfa8eb19225f7862b1d.js} +1 -1
- package/assets/esri/core/workers/chunks/adae54f116f311d72d97.js +1 -0
- package/assets/esri/core/workers/chunks/{718073d13d3de67b629b.js → aeeb364b7c1876f6e7db.js} +1 -1
- package/assets/esri/core/workers/chunks/afddfe620e6539991e6b.js +1 -0
- package/assets/esri/core/workers/chunks/b02a83845d3da4caee9d.js +1 -0
- package/assets/esri/core/workers/chunks/{0d21506b7d4f9afdbb09.js → b3847a6bbd45d813f03c.js} +1 -1
- package/assets/esri/core/workers/chunks/b4c23630d6c85f7b59c0.js +1 -0
- package/assets/esri/core/workers/chunks/{c318b229911b60fc3cbf.js → b50ae3dc7e43ff452568.js} +1 -1
- package/assets/esri/core/workers/chunks/b5ede4df4620097c6528.js +1 -0
- package/assets/esri/core/workers/chunks/b7d7ad127f8939cbdec2.js +1 -0
- package/assets/esri/core/workers/chunks/bf1d1c02d12b526b0750.js +1 -0
- package/assets/esri/core/workers/chunks/c0e6dbecdbd30066a82c.js +1 -0
- package/assets/esri/core/workers/chunks/c2a36243eb105d570bff.js +1 -0
- package/assets/esri/core/workers/chunks/c8a3a28809542396c6fd.js +1 -0
- package/assets/esri/core/workers/chunks/cf1047ad176a25dcd2d6.js +1 -0
- package/assets/esri/core/workers/chunks/d03de043d43691665a93.js +1 -0
- package/assets/esri/core/workers/chunks/d3fecbaca51ef8844026.js +1 -0
- package/assets/esri/core/workers/chunks/dafe120243db6648a4ab.js +1 -0
- package/assets/esri/core/workers/chunks/dccc33d87cb7d902f5c7.js +1 -0
- package/assets/esri/core/workers/chunks/dd43f5647900ee27af22.js +1 -0
- package/assets/esri/core/workers/chunks/{52489e2f7748dc610263.js → dfdd853dd6c023089963.js} +1 -1
- package/assets/esri/core/workers/chunks/e6f76f62cf58fb1e67c6.js +1 -0
- package/assets/esri/core/workers/chunks/ea73a1d9cad5e1a5d861.js +1 -0
- package/assets/esri/core/workers/chunks/{4130ea1f5a9f197168d7.js → ed4519ac9533a4d340f1.js} +1 -1
- package/assets/esri/core/workers/chunks/f0e462f5a16852f33225.js +1 -0
- package/assets/esri/core/workers/chunks/f13c29bcc71aed8f3a2e.js +1 -0
- package/assets/esri/core/workers/chunks/f356e505c36397fda3cf.js +1 -0
- package/assets/esri/core/workers/chunks/f55cbaf5a1d6ee6ac171.js +1 -0
- package/assets/esri/core/workers/chunks/f6e613ae6812a347a26c.js +1 -0
- package/assets/esri/core/workers/chunks/fb3279408bd5323ec612.js +1 -0
- package/assets/esri/core/workers/chunks/fdf80a371b7b2a45f1ff.js +1 -0
- package/assets/esri/libs/vxl/vxlLayer.wasm +0 -0
- package/chunks/ChapmanAtmosphere.glsl.js +15 -15
- package/chunks/CheckerBoard.glsl.js +3 -3
- package/chunks/Clouds.glsl.js +2 -3
- package/chunks/CloudsComposition.glsl.js +3 -3
- package/chunks/ColorMaterial.glsl.js +11 -11
- package/chunks/DefaultMaterial.glsl.js +26 -26
- package/chunks/EdgeShader.glsl.js +3 -3
- package/chunks/Fog.glsl.js +6 -6
- package/chunks/HUDMaterial.glsl.js +48 -48
- package/chunks/HeatmapDensity.glsl.js +7 -7
- package/chunks/HighlightApply.glsl.js +3 -3
- package/chunks/LineCallout.glsl.js +3 -3
- package/chunks/LineMarker.glsl.js +22 -22
- package/chunks/MeasurementArrow.glsl.js +4 -4
- package/chunks/NativeLine.glsl.js +11 -11
- package/chunks/Path.glsl.js +16 -16
- package/chunks/Pattern.glsl.js +30 -30
- package/chunks/RasterColorizer.glsl.js +4 -4
- package/chunks/RealisticTree.glsl.js +20 -20
- package/chunks/RibbonLine.glsl.js +39 -39
- package/chunks/ShadedColorMaterial.glsl.js +10 -10
- package/chunks/ShadowCastVisualize.glsl.js +5 -5
- package/chunks/ShadowHighlight.glsl.js +2 -2
- package/chunks/SlicePlaneMaterial.glsl.js +3 -3
- package/chunks/Stars.glsl.js +2 -2
- package/chunks/WaterSurface.glsl.js +20 -20
- package/chunks/languageUtils.js +1 -1
- package/chunks/persistableUrlUtils.js +1 -1
- package/chunks/vec22.js +1 -1
- package/chunks/vec2f64.js +1 -1
- package/chunks/vec3.js +1 -1
- package/chunks/vec33.js +1 -1
- package/chunks/vec43.js +1 -1
- package/colorUtils.js +1 -1
- package/config.js +1 -1
- package/core/Accessor.js +1 -1
- package/core/AsyncUpdate.js +1 -1
- package/core/Clonable.js +1 -1
- package/core/Collection.js +1 -1
- package/core/HandleOwner.js +1 -1
- package/core/Loadable.js +1 -1
- package/core/NestedMap.js +1 -1
- package/core/accessorSupport/DefaultsStore.js +1 -1
- package/core/accessorSupport/Properties.js +1 -1
- package/core/accessorSupport/decorators/enumeration.js +1 -1
- package/core/accessorSupport/extensions/serializableProperty/reader.js +1 -1
- package/core/accessorSupport/extensions/serializableProperty/writePolicyUtils.js +1 -1
- package/core/accessorSupport/extensions/serializableProperty/writer.js +1 -1
- package/core/accessorSupport/read.js +1 -1
- package/core/accessorSupport/tracking.js +1 -1
- package/core/accessorSupport/write.js +1 -1
- package/core/devEnvironmentUtils.js +1 -1
- package/core/has.js +1 -1
- package/core/libs/gl-matrix-2/factories/vec2f64.js +1 -1
- package/core/libs/gl-matrix-2/math/vec3.js +1 -1
- package/core/libs/rbush/PooledRBush.js +1 -1
- package/core/promiseUtils.js +1 -1
- package/core/reactiveUtils.js +1 -1
- package/core/scheduling.js +1 -1
- package/core/throttle.js +1 -1
- package/core/urlUtils.js +1 -1
- package/core/watchUtils.js +1 -1
- package/core/workers/RemoteClient.js +1 -1
- package/core/workers/WorkerOwner.js +1 -1
- package/core/workers/loaderConfig.js +1 -1
- package/core/workers/workerFactory.js +1 -1
- package/geometry/Mesh.js +1 -1
- package/geometry/geometryEngine.js +1 -1
- package/geometry/geometryEngineAsync.js +1 -1
- package/geometry/projection.js +1 -1
- package/geometry/support/axisAngleDegrees.js +1 -1
- package/geometry/support/meshUtils/centerAt.js +1 -1
- package/geometry/support/meshUtils/deduplicate.js +1 -1
- package/geometry/support/meshUtils/elevation.js +1 -1
- package/geometry/support/meshUtils/geographicUtils.js +1 -1
- package/geometry/support/meshUtils/georeference.js +1 -1
- package/geometry/support/meshUtils/loadExternal.js +1 -1
- package/geometry/support/meshUtils/loadGLTFMesh.js +1 -1
- package/geometry/support/meshUtils/offset.js +1 -1
- package/geometry/support/meshUtils/rotate.js +1 -1
- package/geometry/support/meshUtils/scale.js +1 -1
- package/geometry/support/normalizeUtils.js +1 -1
- package/geometry/support/normalizeUtilsCommon.js +1 -1
- package/geometry/support/offset.js +1 -1
- package/geometry/support/rotate.js +1 -1
- package/identity/IdentityManagerBase.js +1 -1
- package/identity/IdentityModal.js +1 -1
- package/interfaces.d.ts +109 -2
- package/intl/locale.js +1 -1
- package/intl/messages.js +1 -1
- package/kernel.js +1 -1
- package/layers/AnalysisLayer.js +1 -1
- package/layers/CSVLayer.js +1 -1
- package/layers/FeatureLayer.js +1 -1
- package/layers/GeoJSONLayer.js +1 -1
- package/layers/GeoRSSLayer.js +1 -1
- package/layers/ImageryLayer.js +1 -1
- package/layers/ImageryTileLayer.js +1 -1
- package/layers/Layer.js +1 -1
- package/layers/MapImageLayer.js +1 -1
- package/layers/MapNotesLayer.js +1 -1
- package/layers/OGCFeatureLayer.js +1 -1
- package/layers/RouteLayer.js +1 -1
- package/layers/SceneLayer.js +1 -1
- package/layers/StreamLayer.js +1 -1
- package/layers/SubtypeGroupLayer.js +1 -1
- package/layers/TileLayer.js +1 -1
- package/layers/VectorTileLayer.js +1 -1
- package/layers/VoxelLayer.js +1 -1
- package/layers/VoxelWasmPerScene.js +1 -1
- package/layers/WCSLayer.js +1 -1
- package/layers/WFSLayer.js +1 -1
- package/layers/WMSLayer.js +1 -1
- package/layers/WMTSLayer.js +1 -1
- package/layers/buildingSublayers/BuildingComponentSublayer.js +1 -1
- package/layers/effects/EffectView.js +1 -1
- package/layers/effects/FeatureEffectView.js +1 -1
- package/layers/effects/jsonUtils.js +1 -1
- package/layers/graphics/OptimizedGeometry.js +1 -1
- package/layers/graphics/centroid.js +1 -1
- package/layers/graphics/controllers/FeatureTileController3D.js +1 -1
- package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
- package/layers/graphics/data/QueryEngineResult.js +1 -1
- package/layers/graphics/data/StreamFeatureManager.js +1 -1
- package/layers/graphics/editingSupport.js +1 -1
- package/layers/graphics/objectIdUtils.js +1 -1
- package/layers/graphics/sources/CSVSource.js +1 -1
- package/layers/graphics/sources/FeatureLayerSource.js +1 -1
- package/layers/graphics/sources/GeoJSONSource.js +1 -1
- package/layers/graphics/sources/MemorySource.js +1 -1
- package/layers/graphics/sources/OGCFeatureSource.js +1 -1
- package/layers/graphics/sources/WFSSource.js +1 -1
- package/layers/graphics/sources/WFSSourceWorker.js +1 -1
- package/layers/graphics/sources/connections/WebSocketConnection.js +1 -1
- package/layers/graphics/sources/geojson/GeoJSONSourceWorker.js +1 -1
- package/layers/graphics/sources/geojson/geojson.js +1 -1
- package/layers/graphics/sources/support/CSVSourceWorker.js +1 -1
- package/layers/graphics/sources/support/QueryTask.js +1 -1
- package/layers/mixins/APIKeyMixin.js +1 -1
- package/layers/mixins/ArcGISImageService.js +1 -1
- package/layers/mixins/ArcGISMapService.js +1 -1
- package/layers/mixins/ImageryTileMixin.js +1 -1
- package/layers/mixins/OperationalLayer.js +1 -1
- package/layers/mixins/PortalLayer.js +1 -1
- package/layers/mixins/SceneService.js +1 -1
- package/layers/mixins/refresh.js +1 -1
- package/layers/ogc/dateUtils.js +1 -1
- package/layers/ogc/ogcFeatureUtils.js +1 -1
- package/layers/ogc/wfsUtils.js +1 -1
- package/layers/save/featureLayerUtils.js +1 -1
- package/layers/support/ExportImageParameters.js +1 -1
- package/layers/support/ExportImageServiceParameters.js +1 -1
- package/layers/support/ExportWMSImageParameters.js +1 -1
- package/layers/support/FeatureEffect.js +1 -1
- package/layers/support/FeatureType.js +1 -1
- package/layers/support/FetchAssociatedFeatureLayer.js +1 -1
- package/layers/support/LabelClass.js +1 -1
- package/layers/support/LayerContingentValuesCache.js +1 -1
- package/layers/support/RasterFunction.js +1 -1
- package/layers/support/RasterInfo.js +1 -1
- package/layers/support/RasterJobHandler.js +1 -1
- package/layers/support/RasterWorker.js +1 -1
- package/layers/support/Sublayer.js +1 -1
- package/layers/support/SubtypeSublayer.js +1 -1
- package/layers/support/TilemapCache.js +1 -1
- package/layers/support/TimeReference.d.ts +4 -0
- package/layers/support/WMTSSublayer.js +1 -1
- package/layers/support/arcgisLayers.js +1 -1
- package/layers/support/commonProperties.js +1 -1
- package/layers/support/editableLayers.js +1 -1
- package/layers/support/fieldUtils.js +1 -1
- package/layers/support/floorFilterUtils.js +1 -1
- package/layers/support/imageryRendererUtils.js +1 -1
- package/layers/support/layerUtils.js +1 -1
- package/layers/support/layersCreator.js +1 -1
- package/layers/support/rasterDatasets/BaseRaster.js +1 -1
- package/layers/support/rasterDatasets/CloudRaster.js +1 -1
- package/layers/support/rasterDatasets/ImageAuxRaster.js +1 -1
- package/layers/support/rasterDatasets/ImageServerRaster.js +1 -1
- package/layers/support/rasterDatasets/InMemoryRaster.js +1 -1
- package/layers/support/rasterDatasets/MRFRaster.js +1 -1
- package/layers/support/rasterDatasets/TIFFRaster.js +1 -1
- package/layers/support/rasterDatasets/WCSRaster.js +1 -1
- package/layers/support/rasterDatasets/multipartParser.js +1 -1
- package/layers/support/rasterDatasets/pamParser.js +1 -1
- package/layers/support/rasterDatasets/wcsCapabilitiesParser.js +1 -1
- package/layers/support/rasterDatasets/wcsCoverageParser.js +1 -1
- package/layers/support/rasterDatasets/xmlUtilities.js +1 -1
- package/layers/support/rasterFormats/Lerc.js +1 -1
- package/layers/support/rasterFormats/RasterCodec.js +1 -1
- package/layers/support/rasterFormats/TiffDecoder.js +1 -1
- package/layers/support/rasterFunctions/pixelUtils.js +1 -1
- package/layers/support/rasterFunctions/rasterProjectionHelper.js +1 -1
- package/layers/support/rasterFunctions/stretchUtils.js +1 -1
- package/layers/support/rasterFunctions/vectorFieldUtils.js +1 -1
- package/layers/support/rasterTransforms/PolynomialTransform.js +1 -1
- package/layers/support/rasterTransforms/utils.js +1 -1
- package/layers/support/source/DataLayerSource.js +1 -1
- package/layers/support/source/QueryTableDataSource.js +1 -1
- package/layers/support/vectorTileLayerLoader.js +1 -1
- package/layers/support/wmsUtils.js +1 -1
- package/layers/support/wmtsUtils.js +1 -1
- package/libs/maquette-advanced-projector/projector.js +1 -1
- package/networks/Network.js +1 -1
- package/networks/UtilityNetwork.js +1 -1
- package/networks/support/utils.js +1 -1
- package/package.json +1 -1
- package/popup/content/ExpressionContent.js +1 -1
- package/portal/Portal.js +1 -1
- package/portal/PortalItem.js +1 -1
- package/portal/support/geometryServiceUtils.js +1 -1
- package/portal/support/layersLoader.js +1 -1
- package/portal/support/portalItemUtils.js +1 -1
- package/portal/support/portalLayers.js +1 -1
- package/renderers/DictionaryRenderer.js +1 -1
- package/renderers/FlowRenderer.js +1 -1
- package/renderers/RasterColormapRenderer.js +1 -1
- package/renderers/RasterStretchRenderer.js +1 -1
- package/renderers/VectorFieldRenderer.js +1 -1
- package/renderers/support/RasterSymbolizer.js +1 -1
- package/renderers/support/UniqueValueInfo.js +1 -1
- package/renderers/support/colorRampUtils.js +1 -1
- package/renderers/support/heatmapUtils.js +1 -1
- package/renderers/support/rasterRendererHelper.js +1 -1
- package/request.js +1 -1
- package/rest/identify.js +1 -1
- package/rest/imageService.js +1 -1
- package/rest/networkService.js +1 -1
- package/rest/networks/support/SynthesizeAssociationGeometriesParameters.js +1 -1
- package/rest/operations/identify.js +1 -1
- package/rest/print.js +1 -1
- package/rest/query/executeQuery.js +1 -1
- package/rest/query/operations/query.js +1 -1
- package/rest/query/operations/queryRelatedRecords.js +1 -1
- package/rest/query/operations/queryTopFeatures.js +1 -1
- package/rest/route.js +1 -1
- package/rest/support/DirectionLine.js +1 -1
- package/rest/support/DirectionPoint.js +1 -1
- package/rest/support/DirectionsFeatureSet.js +1 -1
- package/rest/support/FeatureSet.js +1 -1
- package/rest/support/ImageSampleParameters.js +1 -1
- package/rest/support/PointBarrier.js +1 -1
- package/rest/support/PolygonBarrier.js +1 -1
- package/rest/support/PolylineBarrier.js +1 -1
- package/rest/support/RouteInfo.js +1 -1
- package/rest/support/Stop.js +1 -1
- package/rest/support/meshFeatureSet.js +1 -1
- package/rest/support/printTaskUtils.js +1 -1
- package/smartMapping/labels/clusters.js +1 -1
- package/smartMapping/raster/renderers/rgb.js +1 -1
- package/smartMapping/raster/renderers/uniqueValue.js +1 -1
- package/smartMapping/raster/support/adapters/ImageryLayerAdapter.js +1 -1
- package/smartMapping/raster/support/adapters/RasterLayerAdapter.js +1 -1
- package/smartMapping/raster/support/utils.js +1 -1
- package/smartMapping/renderers/color.js +1 -1
- package/smartMapping/renderers/size.js +1 -1
- package/smartMapping/renderers/support/utils.js +1 -1
- package/smartMapping/renderers/univariateColorSize.js +1 -1
- package/smartMapping/statistics/support/WorkerClient.js +1 -1
- package/smartMapping/support/adapters/CSVLayerAdapter.js +1 -1
- package/smartMapping/support/adapters/FeatureLayerAdapter.js +1 -1
- package/smartMapping/support/adapters/OGCFeatureLayerAdapter.js +1 -1
- package/smartMapping/support/adapters/SceneLayerAdapter.js +1 -1
- package/smartMapping/support/adapters/support/utils.js +1 -1
- package/statistics/utils.js +1 -1
- package/support/LayersMixin.js +1 -1
- package/support/TablesMixin.js +1 -1
- package/support/arcadeUtils.js +1 -1
- package/support/basemapUtils.js +1 -1
- package/support/popupUtils.js +1 -1
- package/support/revision.js +1 -1
- package/support/timeUtils.js +1 -1
- package/symbols/FillSymbol3DLayer.js +1 -1
- package/symbols/LineSymbol3DLayer.js +1 -1
- package/symbols/LineSymbolMarker.js +1 -1
- package/symbols/PictureFillSymbol.js +1 -1
- package/symbols/PointSymbol3D.js +1 -1
- package/symbols/SimpleLineSymbol.js +1 -1
- package/symbols/SimpleMarkerSymbol.js +1 -1
- package/symbols/cim/CIMResourceManager.js +1 -1
- package/symbols/cim/CIMSymbolDrawHelper.js +1 -1
- package/symbols/cim/CIMSymbolHelper.js +1 -1
- package/symbols/cim/ExpandedCIM.js +1 -1
- package/symbols/cim/SDFHelper.js +1 -1
- package/symbols/cim/cimAnalyzer.js +1 -1
- package/symbols/cim/effects/EffectControlMeasureLine.js +1 -1
- package/symbols/cim/effects/EffectDashes.js +1 -1
- package/symbols/cim/effects/EffectOffset.js +1 -1
- package/symbols/cim/placements/PlacementAlongLineSameSize.js +1 -1
- package/symbols/cim/utils.js +1 -1
- package/symbols/support/cimSymbolUtils.js +1 -1
- package/symbols/support/jsonUtils.js +1 -1
- package/symbols/support/previewCIMSymbol.js +1 -1
- package/symbols/support/previewSymbol2D.js +1 -1
- package/symbols/support/previewSymbol3D.js +1 -1
- package/symbols/support/previewWebStyleSymbol.js +1 -1
- package/symbols/support/svgUtils.js +1 -1
- package/symbols/support/symbolConversion.js +1 -1
- package/symbols/support/symbolUtils.js +1 -1
- package/tasks/GenerateRendererTask.js +1 -1
- package/views/2d/MapViewConstraints.js +1 -1
- package/views/2d/constraints/GeometryConstraint.js +1 -1
- package/views/2d/engine/Bitmap.js +1 -1
- package/views/2d/engine/Container.js +1 -1
- package/views/2d/engine/DisplayObject.js +1 -1
- package/views/2d/engine/Stage.js +1 -1
- package/views/2d/engine/imagery/BrushRasterBitmap.js +1 -1
- package/views/2d/engine/imagery/RasterBitmap.js +1 -1
- package/views/2d/engine/imagery/RasterVFDisplayObject.js +1 -1
- package/views/2d/engine/vectorTiles/TilemapRequest.js +1 -1
- package/views/2d/engine/vectorTiles/WorkerTileHandler.js +1 -1
- package/views/2d/engine/vectorTiles/buckets/FillBucket.js +1 -1
- package/views/2d/engine/vectorTiles/buckets/LineBucket.js +1 -1
- package/views/2d/engine/vectorTiles/expression/expression.js +1 -1
- package/views/2d/engine/vectorTiles/shaders/VTLMaterial.js +1 -1
- package/views/2d/engine/vectorTiles/style/StyleLayer.js +1 -1
- package/views/2d/engine/vectorTiles/style/StyleRepository.js +1 -1
- package/views/2d/engine/vectorTiles/style/VectorTileSource.js +1 -1
- package/views/2d/engine/webgl/FeatureTile.js +1 -1
- package/views/2d/engine/webgl/GraphicTile.js +1 -1
- package/views/2d/engine/webgl/TextureManager.js +1 -1
- package/views/2d/engine/webgl/brushes/WGLBrushHeatmap.js +1 -1
- package/views/2d/engine/webgl/brushes/WGLBrushVTLCircle.js +1 -1
- package/views/2d/engine/webgl/brushes/WGLBrushVTLFill.js +1 -1
- package/views/2d/engine/webgl/brushes/WGLBrushVTLLine.js +1 -1
- package/views/2d/engine/webgl/collisions/CollisionEngine.js +1 -1
- package/views/2d/engine/webgl/collisions/MetricReader.js +1 -1
- package/views/2d/engine/webgl/cpuMapped/DisplayRecordReader.js +1 -1
- package/views/2d/engine/webgl/cpuMapped/FreeList.js +1 -1
- package/views/2d/engine/webgl/mesh/MeshData.js +1 -1
- package/views/2d/engine/webgl/mesh/templates/WGLBaseLineTemplate.js +1 -1
- package/views/2d/engine/webgl/mesh/templates/WGLBaseMarkerTemplate.js +1 -1
- package/views/2d/engine/webgl/mesh/templates/WGLBaseTextTemplate.js +1 -1
- package/views/2d/engine/webgl/mesh/templates/WGLDynamicFillTemplate.js +1 -1
- package/views/2d/engine/webgl/mesh/templates/WGLLabelTemplate.js +1 -1
- package/views/2d/engine/webgl/mesh/templates/WGLLineTemplate.js +1 -1
- package/views/2d/engine/webgl/mesh/templates/WGLMeshTemplate.js +1 -1
- package/views/2d/engine/webgl/painter/RenderPass.js +1 -1
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/engine/webgl/techniques/dotDensity/TechniqueDotDensity.js +1 -1
- package/views/2d/input/MapViewInputManager.js +1 -1
- package/views/2d/input/handlers/GamepadNavigation.js +1 -1
- package/views/2d/interactive/editingTools/draw/DrawGraphicTool2D.js +1 -1
- package/views/2d/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiles2D.js +1 -1
- package/views/2d/layers/BaseLayerView2D.js +1 -1
- package/views/2d/layers/BaseLayerViewGL2D.js +1 -1
- package/views/2d/layers/BitmapTileLayerView2D.js +1 -1
- package/views/2d/layers/FeatureLayerView2D.js +1 -1
- package/views/2d/layers/GeoRSSLayerView2D.js +1 -1
- package/views/2d/layers/GraphicsLayerView2D.js +1 -1
- package/views/2d/layers/ImageryLayerView2D.js +1 -1
- package/views/2d/layers/ImageryTileLayerView2D.js +1 -1
- package/views/2d/layers/KMLLayerView2D.js +1 -1
- package/views/2d/layers/LayerView2D.js +1 -1
- package/views/2d/layers/SubtypeGroupLayerView2D.js +1 -1
- package/views/2d/layers/TileLayerView2D.js +1 -1
- package/views/2d/layers/VectorTileLayerView2D.js +1 -1
- package/views/2d/layers/WMTSLayerView2D.js +1 -1
- package/views/2d/layers/features/FeatureStore2D.js +1 -1
- package/views/2d/layers/features/Pipeline.js +1 -1
- package/views/2d/layers/features/batchUtils.js +1 -1
- package/views/2d/layers/features/controllers/FeatureController2D.js +1 -1
- package/views/2d/layers/features/controllers/support/sourceAdapters.js +1 -1
- package/views/2d/layers/features/createSymbolSchema.js +1 -1
- package/views/2d/layers/features/processors/SymbolProcessor.js +1 -1
- package/views/2d/layers/features/schemaUtils.js +1 -1
- package/views/2d/layers/features/sources/BaseFeatureSource.js +1 -1
- package/views/2d/layers/features/sources/DataTileSource.js +1 -1
- package/views/2d/layers/features/sources/DataTileSubscription.js +1 -1
- package/views/2d/layers/features/sources/SnapshotFeatureSource.js +1 -1
- package/views/2d/layers/features/support/ClusterStore.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReader.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReaderJSON.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReaderPBF.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReaderPBFHeader.js +1 -1
- package/views/2d/layers/features/support/ResourceManagerProxy.js +1 -1
- package/views/2d/layers/features/tileRenderers/SymbolTileRenderer.js +1 -1
- package/views/2d/layers/features/tileRenderers/support/WGLFeatureView.js +1 -1
- package/views/2d/layers/graphics/graphicsUtils.js +1 -1
- package/views/2d/layers/imagery/BaseImageryTileSubView2D.js +1 -1
- package/views/2d/layers/imagery/ImageryTileView2D.js +1 -1
- package/views/2d/layers/imagery/VectorFieldTileView2D.js +1 -1
- package/views/2d/layers/support/ExportStrategy.js +1 -1
- package/views/2d/layers/support/FeatureCommandQueue.js +1 -1
- package/views/2d/magnifier/MagnifierView2D.js +1 -1
- package/views/2d/support/engineHelpers.js +1 -1
- package/views/2d/tiling/TileManager.js +1 -1
- package/views/3d/analysis/AreaMeasurement/support/AreaMeasurementVisualization.js +1 -1
- package/views/3d/analysis/AreaMeasurementAnalysisView3D.js +1 -1
- package/views/3d/analysis/Dimensioning/DimensioningVisualization.js +5 -0
- package/views/3d/analysis/Dimensioning/LinearDimensionVisualization.js +5 -0
- package/views/3d/analysis/DimensioningAnalysisView3D.js +1 -1
- package/views/3d/analysis/DirectLineMeasurement/DirectLineMeasurementController.js +1 -1
- package/views/3d/analysis/DirectLineMeasurement/DirectLineMeasurementVisualization.js +1 -1
- package/views/3d/analysis/DirectLineMeasurementAnalysisView3D.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightController.js +1 -1
- package/views/3d/analysis/LineOfSightAnalysisView3D.js +1 -1
- package/views/3d/analysis/Slice/SliceTool.js +1 -1
- package/views/3d/analysis/SliceAnalysisView3D.js +1 -1
- package/views/3d/environment/ChapmanAtmosphere.glsl.js +1 -1
- package/views/3d/environment/ChapmanAtmosphere.js +1 -1
- package/views/3d/environment/Clouds.glsl.js +1 -1
- package/views/3d/environment/CloudsComposition.glsl.js +1 -1
- package/views/3d/environment/CloudsComposition.js +1 -1
- package/views/3d/environment/CloudsCompositionParameters.js +5 -0
- package/views/3d/environment/EnvironmentRenderer.js +1 -1
- package/views/3d/environment/Fog.glsl.js +1 -1
- package/views/3d/environment/Fog.js +1 -1
- package/views/3d/environment/Precipitation.js +1 -1
- package/views/3d/environment/SceneViewEnvironment.js +1 -1
- package/views/3d/environment/SceneViewEnvironmentManager.js +1 -1
- package/views/3d/environment/SimpleAtmosphere.js +1 -1
- package/views/3d/environment/Stars.glsl.js +1 -1
- package/views/3d/environment/Stars.js +1 -1
- package/views/3d/externalRenderers/ExternalRendererStore.js +1 -1
- package/views/3d/glTF/internal/Resource.js +1 -1
- package/views/3d/glTF/loader.js +1 -1
- package/views/3d/input/SceneInputManager.js +1 -1
- package/views/3d/input/handlers/TwoFingerTilt.js +1 -1
- package/views/3d/interactive/Manipulator3D.js +1 -1
- package/views/3d/interactive/editingTools/draw/DrawGraphicTool3D.js +1 -1
- package/views/3d/interactive/editingTools/manipulations/MoveManipulation.js +1 -1
- package/views/3d/interactive/editingTools/moveGraphic/isSupportedGraphic.js +1 -1
- package/views/3d/interactive/editingTools/reshapeGraphic/GraphicReshapeTool.js +1 -1
- package/views/3d/interactive/editingTools/reshapeGraphic/ReshapeOperation.js +1 -1
- package/views/3d/interactive/editingTools/reshapeGraphic/isSupportedGraphic.js +1 -1
- package/views/3d/interactive/editingTools/transformGraphic/GraphicScaleRotateTransform.js +1 -1
- package/views/3d/interactive/editingTools/transformGraphic/isSupportedGraphic.js +1 -1
- package/views/3d/interactive/measurementTools/areaMeasurement3D/AreaMeasurement3DView.js +1 -1
- package/views/3d/interactive/measurementTools/directLineMeasurement3D/DirectLineMeasurement3DView.js +1 -1
- package/views/3d/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiles3D.js +1 -1
- package/views/3d/interactive/visualElements/DrapedVisualElementResources.js +1 -1
- package/views/3d/interactive/visualElements/LineVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/OutlineVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/VisualElementResources.js +1 -1
- package/views/3d/layers/BuildingComponentSublayerView3D.js +1 -1
- package/views/3d/layers/ElevationLayerView3D.js +1 -1
- package/views/3d/layers/FeatureLayerView3D.js +1 -1
- package/views/3d/layers/FeatureLayerViewBase3D.js +1 -1
- package/views/3d/layers/FeatureLikeLayerView3D.js +1 -1
- package/views/3d/layers/GraphicsLayerView3D.js +1 -1
- package/views/3d/layers/GraphicsView3D.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/ImageryLayerView3D.js +1 -1
- package/views/3d/layers/ImageryTileLayerView3D.js +1 -1
- package/views/3d/layers/LayerView3D.js +1 -1
- package/views/3d/layers/RouteLayerView3D.js +1 -1
- package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
- package/views/3d/layers/SceneLayerView3D.js +1 -1
- package/views/3d/layers/SceneLayerWorker.js +1 -1
- package/views/3d/layers/StreamLayerView3D.js +1 -1
- package/views/3d/layers/TiledLayerView3D.js +1 -1
- package/views/3d/layers/VectorTileLayerView3D.js +1 -1
- package/views/3d/layers/VoxelLayerView3D.js +1 -1
- package/views/3d/layers/WMSLayerView3D.js +1 -1
- package/views/3d/layers/WMTSLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
- package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DFeatureProcessor.js +1 -1
- package/views/3d/layers/graphics/Graphics3DFilterVisibility.js +1 -1
- package/views/3d/layers/graphics/Graphics3DFrustumVisibility.js +1 -1
- package/views/3d/layers/graphics/Graphics3DLineSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DObject3DGraphicLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DPathSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DPointSymbol.js +1 -1
- package/views/3d/layers/graphics/Graphics3DSymbol.js +1 -1
- package/views/3d/layers/graphics/Graphics3DSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/GraphicsDeconflictor.js +1 -1
- package/views/3d/layers/graphics/GraphicsProcessor.js +1 -1
- package/views/3d/layers/graphics/Labeler.js +1 -1
- package/views/3d/layers/i3s/I3SAttributeOverrides.js +1 -1
- package/views/3d/layers/i3s/I3SMeshViewFilter.js +1 -1
- package/views/3d/layers/i3s/I3SStreamDataController.js +1 -1
- package/views/3d/layers/i3s/I3SUtil.js +1 -1
- package/views/3d/layers/support/FeatureTileTree3D.js +1 -1
- package/views/3d/layers/support/FeatureTileTree3DDebugger.js +1 -1
- package/views/3d/layers/support/HeatmapFeatureProcessor.js +1 -1
- package/views/3d/layers/support/StageLayerElevationProvider.js +1 -1
- package/views/3d/layers/support/featureTileQuery3D.js +1 -1
- package/views/3d/state/ConstraintsManager.js +1 -1
- package/views/3d/state/helpers/SceneIntersectionHelper.js +1 -1
- package/views/3d/support/ResourceController.js +1 -1
- package/views/3d/support/SharedSymbolResources.js +1 -1
- package/views/3d/support/TextureCollection.js +1 -1
- package/views/3d/support/cameraUtils.js +1 -1
- package/views/3d/support/pointsOfInterest/CameraOnSurface.js +1 -1
- package/views/3d/support/pointsOfInterest/Focus.js +1 -1
- package/views/3d/support/pointsOfInterest/PointsOfInterest.js +1 -1
- package/views/3d/support/pointsOfInterest/StableSurfaceCenter.js +1 -1
- package/views/3d/terrain/OverlayFramebufferObject.js +1 -1
- package/views/3d/terrain/OverlayManager.js +1 -1
- package/views/3d/terrain/OverlayRenderer.js +1 -1
- package/views/3d/terrain/PatchGeometry.js +1 -1
- package/views/3d/terrain/PatchGeometryFactory.js +1 -1
- package/views/3d/terrain/PatchRenderData.js +1 -1
- package/views/3d/terrain/PlanarPatch.js +1 -1
- package/views/3d/terrain/RasterColorizerTechnique.js +1 -1
- package/views/3d/terrain/RasterTile.js +1 -1
- package/views/3d/terrain/SphericalPatch.js +1 -1
- package/views/3d/terrain/TerrainRenderer.js +1 -1
- package/views/3d/terrain/TerrainSurface.js +1 -1
- package/views/3d/terrain/Tile.js +1 -1
- package/views/3d/terrain/TileCompositor.js +1 -1
- package/views/3d/terrain/TileRenderer.js +1 -1
- package/views/3d/terrain/TilingSchemeLogic.js +1 -1
- package/views/3d/terrain/terrainUtils.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentIntersectionData.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentTechnique.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/shader/ComponentData.glsl.js +2 -2
- package/views/3d/webgl-engine/core/material/MaterialBase.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/ScreenSizeScaling.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js +5 -5
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/PathVertexPosition.glsl.js +8 -8
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/RibbonVertexPosition.glsl.js +6 -6
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexNormal.glsl.js +4 -4
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexPosition.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/VerticalOffset.glsl.js +5 -5
- package/views/3d/webgl-engine/core/shaderLibrary/hud/HUD.glsl.js +13 -13
- package/views/3d/webgl-engine/core/shaderLibrary/raster/BasicGrid.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/raster/Colormap.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/raster/Common.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/raster/Projection.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/raster/RasterColorizer.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/shading/ComputeMaterialColor.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateAmbientLighting.glsl.js +5 -5
- package/views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateAmbientOcclusion.glsl.js +3 -3
- package/views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js +13 -13
- package/views/3d/webgl-engine/core/shaderLibrary/shading/LineStipple.glsl.js +17 -17
- package/views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/shading/VisualVariables.glsl.js +7 -7
- package/views/3d/webgl-engine/core/shaderLibrary/shading/WaterDistortion.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js +5 -5
- package/views/3d/webgl-engine/core/shaderLibrary/util/CameraSpace.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/util/CloudsParallaxShading.glsl.js +15 -15
- package/views/3d/webgl-engine/core/shaderLibrary/util/ScreenSizePerspective.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderModules/BooleanPassUniform.js +5 -0
- package/views/3d/webgl-engine/core/shaderModules/Float4DrawUniform.js +5 -0
- package/views/3d/webgl-engine/core/shaderModules/{Matrix3Uniform.js → Float4PassUniform.js} +1 -1
- package/views/3d/webgl-engine/core/shaderModules/Float4Uniform.js +1 -1
- package/views/3d/webgl-engine/core/shaderModules/Matrix3DrawUniform.js +5 -0
- package/views/3d/webgl-engine/core/shaderModules/Matrix3PassUniform.js +5 -0
- package/views/3d/webgl-engine/core/shaderModules/{TextureCubeUniform.js → TextureCubePassUniform.js} +1 -1
- package/views/3d/webgl-engine/core/shaderTechnique/ShaderTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/lib/AutoDisposable.js +1 -1
- package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
- package/views/3d/webgl-engine/lib/GLTextureMaterial.js +1 -1
- package/views/3d/webgl-engine/lib/RenderPluginManager.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowHighlight.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
- package/views/3d/webgl-engine/lib/Texture.js +1 -1
- package/views/3d/webgl-engine/lib/WebGLLayer.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
- package/views/3d/webgl-engine/lib/intersectorUtilsConversions.js +1 -1
- package/views/3d/webgl-engine/lib/pathGeometryUtils.js +1 -1
- package/views/3d/webgl-engine/materials/CheckerBoardMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/ColorMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/HeatmapDensityMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/ImageMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/LineCalloutMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/MeasurementArrowMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/NativeLineMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/PathTechnique.js +1 -1
- package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/ShadedColorMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/{VisualVariableMaterialParameters.js → VisualVariablePassParameters.js} +1 -1
- package/views/3d/webgl-engine/materials/WaterGLMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/WaterTechnique.js +1 -1
- package/views/3d/webgl-engine/parts/RenderView.js +1 -1
- package/views/3d/webgl-engine/parts/requireUtils.js +1 -1
- package/views/3d/webgl-engine/shaders/CheckerBoard.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/CheckerBoardTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/ColorMaterial.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/DefaultMaterial.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/HUDMaterial.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/HUDMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/HeatmapDensity.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/HeatmapDensityTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/HeatmapTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/HighlightApply.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/LineCallout.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/LineMarker.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/Magnifier.glsl.js +3 -3
- package/views/3d/webgl-engine/shaders/MeasurementArrow.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/NativeLine.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/Path.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/Pattern.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/RealisticTree.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/RibbonLine.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadedColorMaterial.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadowCastVisualize.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadowHighlight.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/SlicePlaneMaterial.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/WaterSurface.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/sources/edgeRenderer/AdjustProjectedPosition.glsl.js +3 -3
- package/views/3d/webgl-engine/shaders/sources/edgeRenderer/EdgeShader.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/sources/edgeRenderer/EdgeUtil.glsl.js +5 -5
- package/views/BasemapView.js +1 -1
- package/views/GroundView.js +1 -1
- package/views/LayerViewManager.js +1 -1
- package/views/MapView.js +1 -1
- package/views/SceneView.js +1 -1
- package/views/ToolViewManager.js +1 -1
- package/views/View.js +1 -1
- package/views/draw/DrawAction.js +1 -1
- package/views/draw/DrawGraphicTool.js +1 -1
- package/views/draw/DrawOperation.js +1 -1
- package/views/draw/DrawTool.js +1 -1
- package/views/draw/support/Box.js +1 -1
- package/views/draw/support/GraphicMover.js +1 -1
- package/views/draw/support/Reshape.js +1 -1
- package/views/interactive/coordinateHelper.js +1 -1
- package/views/interactive/editGeometry/operations/OffsetEdgeVertex.js +1 -1
- package/views/interactive/snapping/FeatureSnappingEngine.js +1 -1
- package/views/interactive/snapping/SnappingManager.js +1 -1
- package/views/interactive/snapping/featureSources/WorkerTileTreeDebugger.js +1 -1
- package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceSnappingSourceWorkerHandle.js +1 -1
- package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTileStore.js +1 -1
- package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiledFetcher.js +1 -1
- package/views/layers/FeatureLayerView.js +1 -1
- package/views/layers/GroupLayerView.js +1 -1
- package/views/layers/ImageryLayerView.js +1 -1
- package/views/layers/ImageryTileLayerView.js +1 -1
- package/views/layers/LayerView.js +1 -1
- package/views/layers/MapImageLayerView.js +1 -1
- package/views/layers/WMSLayerView.js +1 -1
- package/views/support/AllocationTracer.js +1 -1
- package/views/support/DefaultsFromMap.js +1 -1
- package/views/support/geometry2dUtils.js +1 -1
- package/views/support/layerViewUtils.js +1 -1
- package/views/support/waitForResources.js +1 -1
- package/views/ui/UI.js +1 -1
- package/views/webgl/BufferObject.js +1 -1
- package/views/webgl/FramebufferObject.js +1 -1
- package/views/webgl/RenderingContext.js +1 -1
- package/views/webgl/Texture.js +1 -1
- package/views/webgl/UniformBufferLayout.js +1 -1
- package/views/webgl/VertexArrayObject.js +1 -1
- package/views/webgl/capabilities.js +1 -1
- package/views/webgl/rasterUtils.js +1 -1
- package/views/webgl/testFloatBufferBlend.js +1 -1
- package/webdoc/widgets/TimeSlider.js +1 -1
- package/webmap/Bookmark.js +1 -1
- package/webscene/Slide.js +1 -1
- package/widgets/AreaMeasurement2D/AreaMeasurement2DTool.js +1 -1
- package/widgets/AreaMeasurement2D/AreaMeasurement2DViewModel.js +1 -1
- package/widgets/AreaMeasurement2D.js +1 -1
- package/widgets/AreaMeasurement3D.js +1 -1
- package/widgets/Attribution.js +1 -1
- package/widgets/BasemapGallery/BasemapGalleryViewModel.js +1 -1
- package/widgets/BasemapGallery/support/BasemapGalleryItem.js +1 -1
- package/widgets/BasemapGallery/support/basemapCompatibilityUtils.js +1 -1
- package/widgets/BasemapLayerList.js +1 -1
- package/widgets/BasemapToggle/BasemapToggleViewModel.js +1 -1
- package/widgets/Bookmarks/BookmarksViewModel.js +1 -1
- package/widgets/Bookmarks.js +1 -1
- package/widgets/BuildingExplorer/BuildingDisciplinesTree/BuildingDisciplinesNode.js +1 -1
- package/widgets/BuildingExplorer/BuildingExplorerViewModel.js +1 -1
- package/widgets/BuildingExplorer/BuildingLevel.js +1 -1
- package/widgets/BuildingExplorer/BuildingLevelPicker/BuildingLevelPicker.js +1 -1
- package/widgets/BuildingExplorer/BuildingNumericFilterViewModel.js +1 -1
- package/widgets/BuildingExplorer/BuildingPhase.js +1 -1
- package/widgets/BuildingExplorer/support/buildingLayerUtils.js +1 -1
- package/widgets/BuildingExplorer.js +1 -1
- package/widgets/CoordinateConversion/CoordinateConversionViewModel.js +1 -1
- package/widgets/CoordinateConversion/support/Format.js +1 -1
- package/widgets/Daylight/DaylightViewModel.js +1 -1
- package/widgets/Daylight/support/SliderWithDropdown.js +1 -1
- package/widgets/Daylight.js +1 -1
- package/widgets/DirectLineMeasurement3D.js +1 -1
- package/widgets/Directions/DirectionsViewModel.js +1 -1
- package/widgets/Directions.js +1 -1
- package/widgets/DistanceMeasurement2D/DistanceMeasurement2DViewModel.js +1 -1
- package/widgets/DistanceMeasurement2D.js +1 -1
- package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
- package/widgets/Editor/CreateWorkflow.js +1 -1
- package/widgets/Editor/EditorViewModel.js +1 -1
- package/widgets/Editor/UpdateWorkflow.js +1 -1
- package/widgets/Editor/workflowUtils.js +1 -1
- package/widgets/Editor.js +1 -1
- package/widgets/ElevationProfile/ElevationProfileLineGround.js +1 -1
- package/widgets/ElevationProfile/ElevationProfileLineInput.js +1 -1
- package/widgets/ElevationProfile/ElevationProfileLineView.js +1 -1
- package/widgets/ElevationProfile/ElevationProfileTool.js +1 -1
- package/widgets/ElevationProfile/ElevationProfileViewModel.js +1 -1
- package/widgets/ElevationProfile/components/Statistics.js +1 -1
- package/widgets/ElevationProfile/support/elevationQuerySourceUtils.js +1 -1
- package/widgets/ElevationProfile/support/profileUtils.js +1 -1
- package/widgets/ElevationProfile.js +1 -1
- package/widgets/Expand.js +1 -1
- package/widgets/Feature/FeatureAttachments.js +1 -1
- package/widgets/Feature/FeatureContent.js +1 -1
- package/widgets/Feature/FeatureExpression/FeatureExpressionViewModel.js +1 -1
- package/widgets/Feature/FeatureExpression.js +1 -1
- package/widgets/Feature/FeatureFields/FeatureFieldsViewModel.js +1 -1
- package/widgets/Feature/FeatureFields.js +1 -1
- package/widgets/Feature/FeatureMedia/FeatureMediaViewModel.js +1 -1
- package/widgets/Feature/FeatureMedia.js +1 -1
- package/widgets/Feature/FeatureViewModel.js +1 -1
- package/widgets/Feature/support/arcadeFeatureUtils.js +1 -1
- package/widgets/Feature/support/featureUtils.js +1 -1
- package/widgets/Feature/support/relatedFeatureUtils.js +1 -1
- package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
- package/widgets/FeatureForm/InputField.js +1 -1
- package/widgets/FeatureForm/support/formTemplateUtils.js +1 -1
- package/widgets/FeatureForm.js +1 -1
- package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
- package/widgets/FeatureTable/FieldColumn.js +1 -1
- package/widgets/FeatureTable/Grid/Column.js +1 -1
- package/widgets/FeatureTable/Grid/EditorColumn.js +1 -1
- package/widgets/FeatureTable/Grid/Grid.js +1 -1
- package/widgets/FeatureTable/Grid/GridViewModel.js +1 -1
- package/widgets/FeatureTable/Grid/support/ButtonMenu.js +1 -1
- package/widgets/FeatureTable/Grid/support/LocalStore.js +1 -1
- package/widgets/FeatureTable/support/FeatureStore.js +1 -1
- package/widgets/FeatureTable.js +1 -1
- package/widgets/FeatureTemplates/FeatureTemplatesViewModel.js +1 -1
- package/widgets/FeatureTemplates/ItemList.js +1 -1
- package/widgets/FeatureTemplates/TemplateItem.js +1 -1
- package/widgets/FeatureTemplates.js +1 -1
- package/widgets/FloorFilter/FloorFilterViewModel.js +1 -1
- package/widgets/FloorFilter.js +1 -1
- package/widgets/Fullscreen.js +1 -1
- package/widgets/Home.js +1 -1
- package/widgets/LayerList/LayerListViewModel.js +1 -1
- package/widgets/LayerList/support/layerListUtils.js +1 -1
- package/widgets/LayerList.js +1 -1
- package/widgets/Legend/LegendViewModel.js +1 -1
- package/widgets/Legend/styles/Card.js +1 -1
- package/widgets/Legend/styles/support/univariateUtils.js +1 -1
- package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
- package/widgets/Legend/support/clusterUtils.js +1 -1
- package/widgets/Legend/support/sizeRampUtils.js +1 -1
- package/widgets/Locate/LocateViewModel.js +1 -1
- package/widgets/Popup/PopupViewModel.js +1 -1
- package/widgets/Popup/actionUtils.js +1 -1
- package/widgets/Popup.js +1 -1
- package/widgets/Print/PrintViewModel.js +1 -1
- package/widgets/Print.js +1 -1
- package/widgets/ScaleRangeSlider/ScaleRangeSliderViewModel.js +1 -1
- package/widgets/Search/LayerSearchSource.js +1 -1
- package/widgets/Search/SearchResultRenderer.js +1 -1
- package/widgets/Search/SearchViewModel.js +1 -1
- package/widgets/Search/support/geometryUtils.js +1 -1
- package/widgets/Search/support/layerSearchUtils.js +1 -1
- package/widgets/Search/support/locatorUtils.js +1 -1
- package/widgets/Search.js +1 -1
- package/widgets/ShadowCast/components/DiscreteConfigurator.js +1 -1
- package/widgets/ShadowCast/components/Label.js +1 -1
- package/widgets/ShadowCast/components/TimezonePicker.js +1 -1
- package/widgets/ShadowCast.js +1 -1
- package/widgets/Sketch/SketchViewModel.js +1 -1
- package/widgets/Sketch.js +1 -1
- package/widgets/Slider.js +1 -1
- package/widgets/Swipe/SwipeViewModel.js +1 -1
- package/widgets/TableList/TableListViewModel.js +1 -1
- package/widgets/TableList/support/tableListUtils.js +1 -1
- package/widgets/TableList.js +1 -1
- package/widgets/TimeSlider/TimeSliderViewModel.js +1 -1
- package/widgets/TimeSlider/utils.js +1 -1
- package/widgets/TimeSlider.js +1 -1
- package/widgets/UtilityNetworkTrace/UtilityNetworkTraceViewModel.js +1 -1
- package/widgets/Weather.js +1 -1
- package/widgets/Widget.js +1 -1
- package/widgets/smartMapping/BinaryColorSizeSlider/BinaryColorSizeSliderViewModel.js +1 -1
- package/widgets/smartMapping/BinaryColorSizeSlider.js +1 -1
- package/widgets/smartMapping/ClassedColorSlider.js +1 -1
- package/widgets/smartMapping/ClassedSizeSlider.js +1 -1
- package/widgets/smartMapping/ColorSizeSlider.js +1 -1
- package/widgets/smartMapping/SizeSlider/SizeSliderViewModel.js +1 -1
- package/widgets/smartMapping/SmartMappingSliderBase.js +1 -1
- package/widgets/smartMapping/SmartMappingSliderViewModel.js +1 -1
- package/widgets/support/AnalysisViewModel.js +1 -1
- package/widgets/support/ColorPicker.js +1 -1
- package/widgets/support/DatePicker.js +1 -1
- package/widgets/support/InteractiveAnalysisViewModel.js +1 -1
- package/widgets/support/Popover.js +1 -1
- package/widgets/support/SelectionToolbar/SelectionToolbarViewModel.js +1 -1
- package/widgets/support/SelectionToolbar.js +1 -1
- package/widgets/support/Selector2D/SelectionOperation2D.js +1 -1
- package/widgets/support/Selector2D.js +1 -1
- package/widgets/support/SnappingControls/SnappingControlsViewModel.js +1 -1
- package/widgets/support/SnappingControls.js +1 -1
- package/widgets/support/jsxWidgetSupport.js +1 -1
- package/widgets/support/widgetUtils.js +1 -1
- package/assets/esri/core/workers/chunks/049c5c30bd37693dddb7.js +0 -1
- package/assets/esri/core/workers/chunks/055a0ebf22a82f859474.js +0 -1
- package/assets/esri/core/workers/chunks/0b12ff7b2ed2838afbb8.js +0 -1
- package/assets/esri/core/workers/chunks/0e25548573baf855e394.js +0 -1
- package/assets/esri/core/workers/chunks/0edd4c3ca6e7d749d0e5.js +0 -1
- package/assets/esri/core/workers/chunks/0fcbf7e2db58e38ee6d1.js +0 -1
- package/assets/esri/core/workers/chunks/133f971e72a1a6277ac4.js +0 -1
- package/assets/esri/core/workers/chunks/135a90ae61f3b3cae91b.js +0 -1
- package/assets/esri/core/workers/chunks/13fde7fd56c39fa3f2d5.js +0 -1
- package/assets/esri/core/workers/chunks/1c90855c3b0e5dcff908.js +0 -1
- package/assets/esri/core/workers/chunks/1dbef1919c7ac10a6bcc.js +0 -1
- package/assets/esri/core/workers/chunks/1facbda248863cf72cbd.js +0 -1
- package/assets/esri/core/workers/chunks/1fb2d7abe6c8efa84695.js +0 -1
- package/assets/esri/core/workers/chunks/2068377c2a796d5f2245.js +0 -1
- package/assets/esri/core/workers/chunks/28a5878cbe5880476855.js +0 -1
- package/assets/esri/core/workers/chunks/2cf3934b3ecabdf207c8.js +0 -1
- package/assets/esri/core/workers/chunks/2d42711a629384144625.js +0 -1
- package/assets/esri/core/workers/chunks/3021fda52083fc67d18c.js +0 -1
- package/assets/esri/core/workers/chunks/30333a95dc0a44e23fb5.js +0 -1
- package/assets/esri/core/workers/chunks/30837d93116f0337972f.js +0 -1
- package/assets/esri/core/workers/chunks/320543485c8e22485075.js +0 -1
- package/assets/esri/core/workers/chunks/3f0f7da92a6e4493686e.js +0 -1
- package/assets/esri/core/workers/chunks/42057f252ba4e82a8b45.js +0 -1
- package/assets/esri/core/workers/chunks/45a3f6033cdf4bc74a4c.js +0 -1
- package/assets/esri/core/workers/chunks/492b65fe99641f5740f0.js +0 -1
- package/assets/esri/core/workers/chunks/4d1cd7df617273c489f4.js +0 -1
- package/assets/esri/core/workers/chunks/4df9dfa80dbbae9b743d.js +0 -1
- package/assets/esri/core/workers/chunks/515c1c055666ff4740f3.js +0 -1
- package/assets/esri/core/workers/chunks/541e644fc77dbe527124.js +0 -1
- package/assets/esri/core/workers/chunks/59e341b2db44351bf557.js +0 -1
- package/assets/esri/core/workers/chunks/5a10b58533b4116115ac.js +0 -1
- package/assets/esri/core/workers/chunks/5f940853341d7e2bc852.js +0 -1
- package/assets/esri/core/workers/chunks/5ff2cdecf95e0136dd52.js +0 -1
- package/assets/esri/core/workers/chunks/6147bfbe2bd7292d6ad0.js +0 -1
- package/assets/esri/core/workers/chunks/6467f996fe9f136c370b.js +0 -1
- package/assets/esri/core/workers/chunks/682a8f15f352de76df69.js +0 -1
- package/assets/esri/core/workers/chunks/6a06635089761ee3e6d4.js +0 -972
- package/assets/esri/core/workers/chunks/725828a41917d3d56f2d.js +0 -1
- package/assets/esri/core/workers/chunks/794b47764ebb0257ed41.js +0 -1
- package/assets/esri/core/workers/chunks/7fd03a75eb07a09cda35.js +0 -1
- package/assets/esri/core/workers/chunks/86ad6b020c01850d9095.js +0 -1
- package/assets/esri/core/workers/chunks/86f9d1ce36661781d962.js +0 -1
- package/assets/esri/core/workers/chunks/8dcf6c836b53b40dfbf1.js +0 -1
- package/assets/esri/core/workers/chunks/8e98ff9404a802352037.js +0 -1
- package/assets/esri/core/workers/chunks/94e51fe1c539df6257c2.js +0 -1
- package/assets/esri/core/workers/chunks/9519a02b9b8db88a3150.js +0 -1
- package/assets/esri/core/workers/chunks/9a8b50ed75219b4a42e1.js +0 -1
- package/assets/esri/core/workers/chunks/9f3a094aa4b47e4eb046.js +0 -1
- package/assets/esri/core/workers/chunks/a0ebf25c9c9a7f839b93.js +0 -1
- package/assets/esri/core/workers/chunks/a25f0a195f9217665530.js +0 -1
- package/assets/esri/core/workers/chunks/a2be1e0b632cef87f6a4.js +0 -1
- package/assets/esri/core/workers/chunks/a4d8cf9829da9cfc5f36.js +0 -1
- package/assets/esri/core/workers/chunks/a562059dbdd1bf1fab66.js +0 -1
- package/assets/esri/core/workers/chunks/a59ee7d2b98c85f27dd2.js +0 -1
- package/assets/esri/core/workers/chunks/a5dbab94697757c87c49.js +0 -1
- package/assets/esri/core/workers/chunks/a5e65d5a7a536759d1cc.js +0 -1
- package/assets/esri/core/workers/chunks/a8ac0b6a3eba35e3a5b6.js +0 -1
- package/assets/esri/core/workers/chunks/acbd0f4d72d1f5d8e4e8.js +0 -1
- package/assets/esri/core/workers/chunks/acc97a210f36bff2d1b0.js +0 -1
- package/assets/esri/core/workers/chunks/ad68fe924456d6d7d4f0.js +0 -1
- package/assets/esri/core/workers/chunks/b06c949fc7d08e376a5f.js +0 -1
- package/assets/esri/core/workers/chunks/b26bd8fde2fc65bb67fb.js +0 -1
- package/assets/esri/core/workers/chunks/b4405e9fe6c0cf7250d3.js +0 -1
- package/assets/esri/core/workers/chunks/bc08fe3b03767bd694c5.js +0 -1
- package/assets/esri/core/workers/chunks/c11501e96ffd81bf39a0.js +0 -1
- package/assets/esri/core/workers/chunks/c44116378cc1bc627044.js +0 -1
- package/assets/esri/core/workers/chunks/c9b09099488d0e719dfb.js +0 -1
- package/assets/esri/core/workers/chunks/cbea4f1eb814115748db.js +0 -1
- package/assets/esri/core/workers/chunks/ce262a2accd982988ef1.js +0 -1
- package/assets/esri/core/workers/chunks/d15e6662d90718411d62.js +0 -1
- package/assets/esri/core/workers/chunks/d16aac3461af9cee0c29.js +0 -1
- package/assets/esri/core/workers/chunks/d60dd3e1028f714f2258.js +0 -1
- package/assets/esri/core/workers/chunks/d6c150c243ca1f6108f9.js +0 -1
- package/assets/esri/core/workers/chunks/d85748b57a71999caf3a.js +0 -1
- package/assets/esri/core/workers/chunks/d8c59b1d73650c060dfb.js +0 -1
- package/assets/esri/core/workers/chunks/dcb6e1b33402d7fa455b.js +0 -1
- package/assets/esri/core/workers/chunks/df653bca2b14dffc82d1.js +0 -1
- package/assets/esri/core/workers/chunks/e2a12142439d3037a3a7.js +0 -1
- package/assets/esri/core/workers/chunks/e3e1d87b8532bf84a18d.js +0 -1
- package/assets/esri/core/workers/chunks/e7744b7e0c16bba93151.js +0 -1
- package/assets/esri/core/workers/chunks/ea50effc5c39870dc871.js +0 -1
- package/assets/esri/core/workers/chunks/f1665a64564593f2a438.js +0 -1
- package/assets/esri/core/workers/chunks/f4c12f3a5e7f89106ae0.js +0 -1
- package/assets/esri/core/workers/chunks/fbefdc74b3aab716187f.js +0 -1
- package/assets/esri/core/workers/chunks/fc4fd9db056579e09bfe.js +0 -1
- package/assets/esri/core/workers/chunks/fd4907fa96f55128764d.js +0 -1
- package/views/3d/webgl-engine/core/shaderModules/BooleanUniform.js +0 -5
package/widgets/Popup.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../chunks/tslib.es6.js";import"../intl.js";import t from"../core/Collection.js";import{eventKey as i}from"../core/events.js";import o from"../core/Handles.js";import n from"../core/Logger.js";import{isNone as s}from"../core/maybe.js";import{whenOnce as r}from"../core/reactiveUtils.js";import{throttle as a}from"../core/throttle.js";import{watch as l,whenFalse as u,on as c,init as d}from"../core/watchUtils.js";import{aliasOf as p}from"../core/accessorSupport/decorators/aliasOf.js";import"../core/arrayUtils.js";import"../core/has.js";import{cast as h}from"../core/accessorSupport/decorators/cast.js";import{property as g}from"../core/accessorSupport/decorators/property.js";import{subclass as _}from"../core/accessorSupport/decorators/subclass.js";import v from"./Feature.js";import f from"./Spinner.js";import m from"./Widget.js";import{FeatureContentMixin as b}from"./Feature/support/FeatureContentMixin.js";import M from"./Popup/PopupViewModel.js";import{Heading as w}from"./support/Heading.js";import{accessibleHandler as y}from"./support/decorators/accessibleHandler.js";import{messageBundle as k}from"./support/decorators/messageBundle.js";import{vmEvent as C}from"./support/decorators/vmEvent.js";import{tsx as A}from"./support/jsxFactory.js";import{isRTL as F,storeNode as I,cssTransition as O}from"./support/widgetUtils.js";import{substitute as x}from"../intl/substitute.js";const N="selected-index",B=0,T="popup-spinner",D={iconLeftTriangleArrow:"esri-icon-left-triangle-arrow",iconRightTriangleArrow:"esri-icon-right-triangle-arrow",iconDockToTop:"esri-icon-maximize",iconDockToBottom:"esri-icon-dock-bottom",iconDockToLeft:"esri-icon-dock-left",iconDockToRight:"esri-icon-dock-right",iconClose:"esri-icon-close",iconUndock:"esri-icon-minimize",iconCheckMark:"esri-icon-check-mark",iconLoading:"esri-icon-loading-indicator",iconDefaultAction:"esri-icon-default-action",iconActionsMenu:"esri-icon-handle-horizontal",rotating:"esri-rotating",base:"esri-popup",widget:"esri-widget",main:"esri-popup__main-container",loadingContainer:"esri-popup__loading-container",isCollapsible:"esri-popup--is-collapsible",isCollapsed:"esri-popup--is-collapsed",shadow:"esri-popup--shadow",isDocked:"esri-popup--is-docked",isDockedTopLeft:"esri-popup--is-docked-top-left",isDockedTopCenter:"esri-popup--is-docked-top-center",isDockedTopRight:"esri-popup--is-docked-top-right",isDockedBottomLeft:"esri-popup--is-docked-bottom-left",isDockedBottomCenter:"esri-popup--is-docked-bottom-center",isDockedBottomRight:"esri-popup--is-docked-bottom-right",alignTopCenter:"esri-popup--aligned-top-center",alignBottomCenter:"esri-popup--aligned-bottom-center",alignTopLeft:"esri-popup--aligned-top-left",alignBottomLeft:"esri-popup--aligned-bottom-left",alignTopRight:"esri-popup--aligned-top-right",alignBottomRight:"esri-popup--aligned-bottom-right",isFeatureMenuOpen:"esri-popup--feature-menu-open",isActionsMenuOpen:"esri-popup--actions-menu-open",hasFeatureUpdated:"esri-popup--feature-updated",header:"esri-popup__header",headerButtons:"esri-popup__header-buttons",headerContainer:"esri-popup__header-container",headerContainerButton:"esri-popup__header-container--button",headerTitle:"esri-popup__header-title",content:"esri-popup__content",footer:"esri-popup__footer",footerHasPagination:"esri-popup__footer--has-pagination",footerHasActions:"esri-popup__footer--has-actions",footerHasActionsMenu:"esri-popup__footer--has-actions-menu",button:"esri-popup__button",buttonDisabled:"esri-popup__button--disabled",buttonDock:"esri-popup__button--dock",icon:"esri-popup__icon",iconDock:"esri-popup__icon--dock-icon",inlineActionsContainer:"esri-popup__inline-actions-container",actionsMenuButton:"esri-popup__actions-menu-button",actions:"esri-popup__actions",action:"esri-popup__action",actionImage:"esri-popup__action-image",actionText:"esri-popup__action-text",actionToggle:"esri-popup__action-toggle",actionToggleOn:"esri-popup__action-toggle--on",pointer:"esri-popup__pointer",pointerDirection:"esri-popup__pointer-direction",navigation:"esri-popup__navigation",paginationPrevious:"esri-popup__pagination-previous",paginationNext:"esri-popup__pagination-next",paginationPreviousIconLTR:"esri-popup__pagination-previous-icon",paginationPreviousIconRTL:"esri-popup__pagination-previous-icon--rtl",paginationNextIconLTR:"esri-popup__pagination-next-icon",paginationNextIconRTL:"esri-popup__pagination-next-icon--rtl",featureMenu:"esri-popup__feature-menu",featureMenuList:"esri-popup__feature-menu-list",featureMenuItem:"esri-popup__feature-menu-item",featureMenuViewport:"esri-popup__feature-menu-viewport",featureMenuHeader:"esri-popup__feature-menu-header",featureMenuNote:"esri-popup__feature-menu-note",featureMenuSelected:"esri-popup__feature-menu-item--selected",featureMenuButton:"esri-popup__feature-menu-button",featureMenuTitle:"esri-popup__feature-menu-title",featureMenuObserver:"esri-popup__feature-menu-observer",featureMenuLoader:"esri-popup__feature-menu-loader",collapseButton:"esri-popup__collapse-button"},E={buttonEnabled:!0,position:"auto",breakpoint:{width:544}},P="esri-popup";function L(e,t){return void 0===t?`${P}__${e}`:`${P}__${e}-${t}`}const S="esri.widgets.Popup",V=n.getLogger(S),U={closeButton:!0,featureNavigation:!0};let R=class extends(b(m)){constructor(e,t){super(e,t),this._blurClose=!1,this._blurContainer=!1,this._containerNode=null,this._mainContainerNode=null,this._featureMenuNode=null,this._actionsMenuNode=null,this._focusClose=!1,this._focusContainer=!1,this._focusDockButton=!1,this._focusFeatureMenuButton=!1,this._focusActionsMenuButton=!1,this._focusFirstFeature=!1,this._focusFirstAction=!1,this._handles=new o,this._pointerOffsetInPx=16,this._spinner=null,this._feature=null,this._featureMenuIntersectionObserverCallback=([e])=>{null!=e&&e.isIntersecting&&this.viewModel.featurePage++},this._featureMenuIntersectionObserver=new IntersectionObserver(this._featureMenuIntersectionObserverCallback,{root:window.document}),this._displaySpinnerThrottled=a((()=>this._displaySpinner()),B),this.actions=null,this.alignment="auto",this.autoCloseEnabled=null,this.autoOpenEnabled=null,this.defaultPopupTemplateEnabled=null,this.content=null,this.collapsed=!1,this.collapseEnabled=!0,this.dockEnabled=!1,this.featureCount=null,this.featureMenuOpen=!1,this.features=null,this.goToOverride=null,this.headingLevel=2,this.highlightEnabled=null,this.location=null,this.label=void 0,this.maxInlineActions=3,this.messages=null,this.messagesCommon=null,this.promises=null,this.selectedFeature=null,this.selectedFeatureIndex=null,this.spinnerEnabled=!0,this.title=null,this.updateLocationEnabled=null,this.view=null,this.viewModel=new M,this.visible=null,this.visibleElements={...U},this._addSelectedFeatureIndexHandle(),this.own([l(this,"viewModel.screenLocation",(()=>this._positionContainer())),l(this,["viewModel.active","dockEnabled"],(()=>this._toggleScreenLocationEnabled())),l(this,"viewModel.screenLocation",((e,t)=>{!!e!=!!t&&this.reposition()})),l(this,["viewModel.view.padding","viewModel.view.size","viewModel.active","viewModel.location","alignment"],(()=>this.reposition())),l(this,"spinnerEnabled",(e=>this._spinnerEnabledChange(e))),l(this,"viewModel.view.size",((e,t)=>this._updateDockEnabledForViewSize(e,t))),l(this,"viewModel.view",((e,t)=>this._viewChange(e,t))),l(this,"viewModel.view.ready",((e,t)=>this._viewReadyChange(e,t))),l(this,["viewModel.waitingForResult","viewModel.location"],(()=>{this._hideSpinner(),this._displaySpinnerThrottled()})),l(this,["selectedFeatureWidget.viewModel.title","selectedFeatureWidget.viewModel.state"],(()=>this._setTitleFromFeatureWidget())),l(this,["selectedFeatureWidget.viewModel.content","selectedFeatureWidget.viewModel.state"],(()=>this._setContentFromFeatureWidget())),u(this,"collapsed",(()=>{var e,t;"xsmall"===(null==(e=this.viewModel)||null==(t=e.view)?void 0:t.widthBreakpoint)&&this.viewModel.active&&this.collapseEnabled&&this.viewModel.centerAtLocation()})),c(this,"viewModel.allActions","change",(()=>this._watchActions())),d(this,"viewModel.allActions",(()=>this._watchActions())),l(this,"viewModel.featureViewModels",(()=>this._featureMenuViewportScrollTop()))])}destroy(){var e,t;this._destroySelectedFeatureWidget(),this._destroySpinner(),null==(e=this._handles)||e.destroy(),this._unobserveFeatureMenuObserver(),null==(t=this._featureMenuIntersectionObserver)||t.disconnect(),this._handles=null}get actionsMenuId(){return`${this.id}-actions-menu`}get actionsMenuButtonId(){return`${this.id}-actions-menu-button`}get featureMenuId(){return`${this.id}-feature-menu`}get titleId(){return`${this.id}-popup-title`}get contentId(){return`${this.id}-popup-content`}get hasContent(){var e,t,i,o,n,s,r;return!!(this.selectedFeatureWidget?(null==(e=this.selectedFeatureWidget)||null==(t=e.viewModel)?void 0:t.waitingForContent)||"error"===(null==(i=this.selectedFeatureWidget)||null==(o=i.viewModel)?void 0:o.state)||(null==(n=this.selectedFeatureWidget)||null==(s=n.viewModel)?void 0:s.content):null==(r=this.viewModel)?void 0:r.content)}get featureNavigationVisible(){return this.viewModel.active&&this.viewModel.featureCount>1&&this.visibleElements.featureNavigation}get collapsible(){return!!(this.collapseEnabled&&this.viewModel.title&&this.hasContent)}get featureMenuVisible(){return this.featureNavigationVisible&&this.featureMenuOpen}get contentCollapsed(){return this.collapsible&&!this.featureMenuVisible&&this.collapsed}get dividedActions(){return this._divideActions()}set actionsMenuOpen(e){this._set("actionsMenuOpen",!!e)}get actionsMenuOpen(){return!!this.viewModel.active&&this._get("actionsMenuOpen")}get currentAlignment(){return this._getCurrentAlignment()}get currentDockPosition(){return this._getCurrentDockPosition()}get dockOptions(){return this._get("dockOptions")||E}set dockOptions(e){const t={...E},i=this.get("viewModel.view.breakpoints"),o={};i&&(o.width=i.xsmall,o.height=i.xsmall);const n={...t,...e},s={...t.breakpoint,...o},{breakpoint:r}=n;!0===r?n.breakpoint=s:"object"==typeof r&&(n.breakpoint={...s,...r}),this._set("dockOptions",n),this._setCurrentDockPosition(),this.reposition()}get selectedFeatureWidget(){const{_feature:e,visibleElements:t,headingLevel:i}=this,{selectedFeatureViewModel:o}=this.viewModel,n={...t,title:!1};return o?(e?(e.viewModel=o,e.visibleElements=n):this._feature=new v({headingLevel:i+1,viewModel:o,visibleElements:n}),this._feature):null}castVisibleElements(e){return{...U,...e}}blur(){const{active:e}=this.viewModel;e||V.warn("Popup can only be blurred when currently active."),this.visibleElements.closeButton?this._blurClose=!0:this._blurContainer=!0,this.scheduleRender()}clear(){this.viewModel.clear()}close(){this.visible=!1}fetchFeatures(e,t){return this.viewModel.fetchFeatures(e,t)}focus(){const{active:e}=this.viewModel;e||V.warn("Popup can only be focused when currently active."),this.visibleElements.closeButton?this._focusClose=!0:this._focusContainer=!0,this.scheduleRender()}next(){return this.viewModel.next()}open(e){var t,i;this._handles.remove(N);const o=!!e&&!!e.featureMenuOpen,n=!!e&&!!e.actionsMenuOpen,s={collapsed:!!e&&!!e.collapsed,actionsMenuOpen:n,featureMenuOpen:o};"xsmall"===(null==(t=this.viewModel)||null==(i=t.view)?void 0:i.widthBreakpoint)&&(s.collapsed=!0),this.set(s),this.viewModel.open(e),this._shouldFocus(e),this._addSelectedFeatureIndexHandle()}previous(){return this.viewModel.previous()}reposition(){this.renderNow(),this._positionContainer(),this._setCurrentAlignment()}triggerAction(e){this.viewModel.triggerAction(e)}render(){var e,t,i,o;const{actionsMenuOpen:n,dockEnabled:s,featureMenuVisible:r,dividedActions:a,currentAlignment:l,currentDockPosition:u}=this,{active:c}=this.viewModel,{menuActions:d}=a,p=c&&d.length>1&&n,h=c&&s,g=c&&!s,_=null==(e=this.selectedFeature)||null==(t=e.layer)?void 0:t.title,v=null==(i=this.selectedFeature)||null==(o=i.layer)?void 0:o.id,f={[D.alignTopCenter]:"top-center"===l,[D.alignBottomCenter]:"bottom-center"===l,[D.alignTopLeft]:"top-left"===l,[D.alignBottomLeft]:"bottom-left"===l,[D.alignTopRight]:"top-right"===l,[D.alignBottomRight]:"bottom-right"===l,[D.isDocked]:h,[D.shadow]:g,[D.isDockedTopLeft]:"top-left"===u,[D.isDockedTopCenter]:"top-center"===u,[D.isDockedTopRight]:"top-right"===u,[D.isDockedBottomLeft]:"bottom-left"===u,[D.isDockedBottomCenter]:"bottom-center"===u,[D.isDockedBottomRight]:"bottom-right"===u,[D.isFeatureMenuOpen]:r,[D.isActionsMenuOpen]:p};return A("div",{class:this.classes(D.base,f),role:"presentation","data-layer-title":_,"data-layer-id":v,bind:this,afterCreate:this._positionContainer,afterUpdate:this._positionContainer},c?[this.renderMainContainer(),this.renderPointer()]:null)}renderLoadingIcon(){return A("span",{"aria-hidden":"true",class:this.classes(D.icon,D.iconLoading,D.rotating)})}renderNavigationLoading(){const{messagesCommon:e}=this;return this.viewModel.pendingPromisesCount?A("div",{key:L("loading-container"),role:"presentation",class:D.loadingContainer,"aria-label":e.loading,title:e.loading},this.renderLoadingIcon()):null}renderPreviousIcon(){const e=F(this.container),t={[D.iconRightTriangleArrow]:e,[D.paginationPreviousIconRTL]:e,[D.iconLeftTriangleArrow]:!e,[D.paginationPreviousIconLTR]:!e};return A("span",{"aria-hidden":"true",class:this.classes(D.icon,t)})}renderPreviousButton(){const{messages:e}=this;return A("div",{role:"button",tabIndex:0,bind:this,onclick:this._previous,onkeydown:this._previous,class:this.classes(D.button,D.paginationPrevious),"aria-label":e.previous,title:e.previous},this.renderPreviousIcon())}renderNextIcon(){const e=F(this.container),t={[D.iconLeftTriangleArrow]:e,[D.paginationNextIconRTL]:e,[D.iconRightTriangleArrow]:!e,[D.paginationNextIconLTR]:!e};return A("span",{"aria-hidden":"true",class:this.classes(D.icon,t)})}renderNextButton(){const{messages:e}=this;return A("div",{role:"button",tabIndex:0,bind:this,onclick:this._next,onkeydown:this._next,class:this.classes(D.button,D.paginationNext),"aria-label":e.next,title:e.next},this.renderNextIcon())}renderFeatureMenuButton(){const{featureMenuOpen:e,featureMenuId:t,messagesCommon:i}=this,{featureCount:o,selectedFeatureIndex:n}=this.viewModel;return A("div",{role:"button",tabIndex:0,bind:this,onclick:this._toggleFeatureMenu,onkeydown:this._toggleFeatureMenu,afterCreate:this._focusFeatureMenuButtonNode,afterUpdate:this._focusFeatureMenuButtonNode,class:this.classes(D.button,D.featureMenuButton),"aria-haspopup":"true","aria-controls":t,"aria-expanded":e.toString(),"aria-label":i.menu,title:i.menu},this._getPageText(o,n))}renderNavigationButtons(){return this.featureNavigationVisible?[this.renderPreviousButton(),this.renderNavigationLoading()||this.renderFeatureMenuButton(),this.renderNextButton()]:null}renderDockIcon(){const{dockEnabled:e}=this,t=this._wouldDockTo(),i={[D.iconUndock]:e,[D.iconDock]:!e,[D.iconDockToRight]:!e&&("top-right"===t||"bottom-right"===t),[D.iconDockToLeft]:!e&&("top-left"===t||"bottom-left"===t),[D.iconDockToTop]:!e&&"top-center"===t,[D.iconDockToBottom]:!e&&"bottom-center"===t};return A("span",{"aria-hidden":"true",class:this.classes(i,D.icon)})}renderDockButton(){var e,t,i;const{dockEnabled:o,messages:n}=this,s=null==(e=this.viewModel)||null==(t=e.view)?void 0:t.widthBreakpoint,r=o?n.undock:n.dock;return"xsmall"!==s&&null!=(i=this.dockOptions)&&i.buttonEnabled?A("div",{role:"button","aria-label":r,title:r,tabIndex:0,bind:this,onclick:this._toggleDockEnabled,onkeydown:this._toggleDockEnabled,afterCreate:this._focusDockButtonNode,afterUpdate:this._focusDockButtonNode,class:this.classes(D.button,D.buttonDock)},this.renderDockIcon()):null}renderTitle(){const{title:e}=this.viewModel,{titleId:t,collapsible:i,contentCollapsed:o,messagesCommon:n}=this,s={[D.headerContainerButton]:i},r=A(w,{level:this.headingLevel,class:D.headerTitle,innerHTML:e}),a=i?A("button",{key:`${e}--collapsible`,id:t,title:o?n.expand:n.collapse,bind:this,enterAnimation:this._createFeatureUpdatedAnimation(),class:this.classes(D.headerContainer,s),"aria-expanded":o?"false":"true",onclick:this._toggleCollapsed,type:"button"},r):A("div",{key:e,id:t,bind:this,enterAnimation:this._createFeatureUpdatedAnimation(),class:this.classes(D.headerContainer,s)},r);return e?a:null}renderCloseIcon(){return A("span",{"aria-hidden":"true",class:this.classes(D.icon,D.iconClose)})}renderCloseButton(){const{visibleElements:e,messagesCommon:t}=this;return e.closeButton?A("div",{role:"button",tabIndex:0,bind:this,onclick:this._close,onkeydown:this._close,class:D.button,"aria-label":t.close,title:t.close,afterCreate:this._closeButtonNodeUpdated,afterUpdate:this._closeButtonNodeUpdated},this.renderCloseIcon()):null}renderHeader(){return A("header",{class:D.header},this.renderTitle(),A("div",{class:D.headerButtons},this.renderDockButton(),this.renderCloseButton()))}renderContentContainer(){const{contentId:e,hasContent:t,contentCollapsed:i}=this,{content:o}=this.viewModel;return t&&!i?A("article",{key:o,enterAnimation:this._createFeatureUpdatedAnimation(),id:e,class:D.content},this.renderContent()):null}renderActionsMenuButton(){const{actionsMenuId:e,actionsMenuButtonId:t,actionsMenuOpen:i,dividedActions:o,messagesCommon:n}=this,s=i?n.close:n.open,{menuActions:r}=o;return r.length?A("div",{key:L("actions-menu-button"),class:this.classes(D.button,D.actionsMenuButton),role:"button",id:t,"aria-haspopup":"true","aria-controls":i?e:null,tabIndex:0,bind:this,onclick:this._toggleActionsMenu,onkeydown:this._toggleActionsMenu,afterCreate:this._focusActionsMenuButtonNode,afterUpdate:this._focusActionsMenuButtonNode,"aria-label":s,title:s},A("span",{"aria-hidden":"true",class:D.iconActionsMenu})):null}renderMenuActions(){const{actionsMenuId:e,actionsMenuButtonId:t,actionsMenuOpen:i,dividedActions:o}=this,{menuActions:n}=o;return n.length&&i?A("ul",{id:e,role:"menu","aria-labelledby":t,key:L("actions"),class:D.actions,bind:this,onkeyup:this._handleActionMenuKeyup,afterCreate:this._actionsMenuNodeUpdated,afterUpdate:this._actionsMenuNodeUpdated},n.toArray().map((e=>this.renderAction({action:e,type:"menu-item"})))):null}renderInlineActions(){const{inlineActions:e}=this.dividedActions;return!!e.length&&e.toArray().map((e=>this.renderAction({action:e,type:"inline"})))}renderInlineActionsContainer(){const{inlineActions:e,menuActions:t}=this.dividedActions,i=!!e.length,o=!!t.length;return i||o?A("div",{key:"inline-actions-container","data-inline-actions":i.toString(),"data-menu-actions":o.toString(),class:D.inlineActionsContainer},this.renderInlineActions(),this.renderActionsMenuButton(),this.renderMenuActions()):null}renderNavigation(){return this.featureNavigationVisible?A("section",{key:L("navigation"),class:this.classes(D.navigation)},this.renderNavigationButtons()):null}renderFooter(){const{featureNavigationVisible:e,dividedActions:t}=this,{inlineActions:i,menuActions:o}=t,n=!!i.length,s=!!o.length,r={[D.footerHasPagination]:e,[D.footerHasActions]:n,[D.footerHasActionsMenu]:s};return e||n?A("div",{key:L("feature-buttons"),class:this.classes(D.footer,r)},this.renderInlineActionsContainer(),this.renderNavigation()):null}renderFeatureMenuContainer(){const{messages:e}=this,{featureViewModels:t,isLoadingFeature:i}=this.viewModel,o=x(e.selectedFeatures,{total:t.length});return A("section",{key:L("menu"),class:D.featureMenu},A("strong",{class:D.featureMenuHeader},o),A("nav",{bind:this,class:D.featureMenuViewport,"data-node-ref":"_featureMenuViewportNode",afterCreate:I},this.renderFeatureMenu(),A("div",{class:D.featureMenuObserver,bind:this,afterCreate:this._featureMenuIntersectionObserverCreated}),i?A("div",{class:D.featureMenuLoader},this.renderLoadingIcon()):null))}renderPointer(){return this.dockEnabled?null:A("div",{key:L("pointer"),class:D.pointer,role:"presentation"},A("div",{class:this.classes(D.pointerDirection,D.shadow)}))}renderMainContainer(){const{dockEnabled:e,currentAlignment:t,currentDockPosition:i,titleId:o,contentId:n,collapsible:s,hasContent:r,contentCollapsed:a,visibleElements:l}=this,{title:u}=this.viewModel,c="bottom-left"===t||"bottom-center"===t||"bottom-right"===t||"top-left"===i||"top-center"===i||"top-right"===i,d="top-left"===t||"top-center"===t||"top-right"===t||"bottom-left"===i||"bottom-center"===i||"bottom-right"===i,p={[D.shadow]:e,[D.isCollapsible]:s,[D.isCollapsed]:a};return A("div",{class:this.classes(D.main,D.widget,p),tabIndex:l.closeButton?null:-1,role:"dialog","aria-labelledby":u?o:"","aria-describedby":r&&!a?n:"",bind:this,onkeyup:this._handleMainKeyup,afterCreate:this._mainContainerNodeUpdated,afterUpdate:this._mainContainerNodeUpdated},c?this.renderFooter():null,c?this.renderFeatureMenuContainer():null,this.renderHeader(),this.renderContentContainer(),d?this.renderFooter():null,d?this.renderFeatureMenuContainer():null)}renderContent(){var e;const t=null==(e=this.viewModel)?void 0:e.content;return t?"string"==typeof t?A("div",{key:t,innerHTML:t}):this.renderNodeContent(t):null}renderActionText(e){return A("span",{key:"text",class:D.actionText},e)}renderActionIcon(e){const t=this._getActionClass(e),i=this._getActionImage(e),o={[D.iconLoading]:e.active,[D.rotating]:e.active,[D.icon]:!!t,[D.actionImage]:!e.active&&!!i};return t&&(o[t]=!e.active),A("span",{key:"icon","aria-hidden":"true",class:this.classes(D.icon,o),styles:this._getIconStyles(i)})}renderAction(e){const{action:t,type:i}=e,o=this._getActionTitle(t),n={[D.action]:"toggle"!==t.type,[D.actionToggle]:"toggle"===t.type,[D.actionToggleOn]:"toggle"===t.type&&t.value,[D.buttonDisabled]:t.disabled},s=[this.renderActionIcon(t),this.renderActionText(o)],r="menu-item"===i?A("li",{key:t.uid,role:"menuitem",tabIndex:0,title:o,"aria-label":o,class:this.classes(D.button,n),onkeyup:this._handleActionMenuItemKeyup,bind:this,"data-action-uid":t.uid,onclick:this._triggerAction,onkeydown:this._triggerAction},s):A("div",{key:t.uid,role:"button",tabIndex:0,title:o,"aria-label":o,class:this.classes(D.button,n),onkeyup:this._handleActionMenuItemKeyup,bind:this,"data-action-uid":t.uid,onclick:this._triggerAction,onkeydown:this._triggerAction},s);return t.visible?r:null}renderFeatureMenuItem(e,t){const{messages:i,messagesCommon:o}=this,{selectedFeatureIndex:n,selectedFeatureViewModel:s}=this.viewModel,r=e===s,a={[D.featureMenuSelected]:r},l=r?A("span",{key:L(`feature-menu-selected-feature-${n}`),title:i.selectedFeature,"aria-label":i.selectedFeature,class:D.iconCheckMark}):null,u=A("span",{innerHTML:e.title||o.untitled});return A("li",{role:"menuitem",tabIndex:-1,key:L(`feature-menu-feature-${n}`),class:this.classes(a,D.featureMenuItem),bind:this,"data-feature-index":t,onkeyup:this._handleFeatureMenuItemKeyup,onclick:this._selectFeature,onkeydown:this._selectFeature},A("span",{class:D.featureMenuTitle},u,l))}renderFeatureMenu(){const{featureMenuId:e}=this,{featureViewModels:t}=this.viewModel;return t.length>1?A("ol",{class:D.featureMenuList,id:e,bind:this,afterCreate:this._featureMenuNodeUpdated,afterUpdate:this._featureMenuNodeUpdated,onkeyup:this._handleFeatureMenuKeyup,role:"menu"},t.filter((e=>!!e.graphic)).map(((e,t)=>this.renderFeatureMenuItem(e,t)))):null}_getActionTitle(e){const{messages:t,selectedFeature:i,messagesCommon:o}=this,{id:n}=e,s=null==i?void 0:i.attributes,r="zoom-to-feature"===n?x(e.title,{messages:t}):"remove-selected-feature"===n?x(e.title,{messages:o}):"zoom-to-clustered-features"===n||"browse-clustered-features"===n?x(e.title,{messages:t}):e.title;return r&&s?x(r,s):r}_getActionClass(e){const{selectedFeature:t}=this,i=null==t?void 0:t.attributes,{className:o,image:n}=e,s=n||o?o:D.iconDefaultAction;return s&&i?x(s,i):s}_getActionImage(e){const{selectedFeature:t}=this,i=null==t?void 0:t.attributes,{image:o}=e;return o&&i?x(o,i):o}_createFeatureUpdatedAnimation(){return O("enter",D.hasFeatureUpdated)}_getInlineActionCount(){const{maxInlineActions:e,featureNavigationVisible:t}=this;if("number"!=typeof e)return null;const i=Math.round(e);return Math.max(t?i-1:i,0)}_watchActions(){const{allActions:e}=this.viewModel;this.notifyChange("dividedActions");const t="actions";this._handles.remove(t),e&&e.forEach((e=>{this._handles.add(l(e,["uid","active","className","disabled","id","title","image","visible"],(()=>this.scheduleRender())),t)}))}_divideActions(){const{allActions:e}=this.viewModel,i=e.filter((e=>e.visible)),o=this._getInlineActionCount(),n=null===o,s=0===o;return{inlineActions:n?i.slice(0):s?new t:i.slice(0,o),menuActions:n?new t:s?i.slice(0):i.slice(o)}}_featureMenuOpenChanged(e){e?this._focusFirstFeature=!0:this._focusFeatureMenuButton=!0}_actionsMenuOpenChanged(e){e?this._focusFirstAction=!0:this._focusActionsMenuButton=!0}_setTitleFromFeatureWidget(){const{selectedFeatureWidget:e,messagesCommon:t}=this;var i,o;e&&(this.viewModel.title="error"===(null==(i=e.viewModel)?void 0:i.state)?t.errorMessage:(null==(o=e.viewModel)?void 0:o.title)||"")}_setContentFromFeatureWidget(){const{selectedFeatureWidget:e}=this;e&&(this.viewModel.content=e)}_unobserveFeatureMenuObserver(){this._featureMenuIntersectionObserverNode&&this._featureMenuIntersectionObserver.unobserve(this._featureMenuIntersectionObserverNode)}_featureMenuIntersectionObserverCreated(e){this._unobserveFeatureMenuObserver(),this._featureMenuIntersectionObserver.observe(e),this._featureMenuIntersectionObserverNode=e}_handleFeatureMenuKeyup(e){"Escape"===i(e)&&(e.stopPropagation(),this._focusFeatureMenuButton=!0,this.featureMenuOpen=!1,this.scheduleRender())}_handleActionMenuKeyup(e){"Escape"===i(e)&&(e.stopPropagation(),this._focusActionsMenuButton=!0,this.actionsMenuOpen=!1,this.scheduleRender())}_handleFeatureMenuItemKeyup(e){const t=i(e),{_featureMenuNode:o}=this,n=e.currentTarget["data-feature-index"];if(!o)return;const s=o.querySelectorAll("li"),r=s.length;if("ArrowUp"!==t)if("ArrowDown"!==t)if("Home"!==t)if("End"!==t);else{e.stopPropagation();s[s.length-1].focus()}else{e.stopPropagation();s[0].focus()}else{e.stopPropagation();s[(n+1+r)%r].focus()}else{e.stopPropagation();s[(n-1+r)%r].focus()}}_handleActionMenuItemKeyup(e){const t=i(e),{_actionsMenuNode:o}=this,n=e.currentTarget.dataset.actionUid,{menuActions:s}=this.dividedActions,r=s.findIndex((e=>e.uid===n));if(!o)return;const a=o.querySelectorAll("li"),l=a.length;if("ArrowUp"!==t)if("ArrowDown"!==t)if("Home"!==t)if("End"!==t);else{e.stopPropagation();a[a.length-1].focus()}else{e.stopPropagation();a[0].focus()}else{e.stopPropagation();a[(r+1+l)%l].focus()}else{e.stopPropagation();a[(r-1+l)%l].focus()}}_handleMainKeyup(e){const t=i(e);"ArrowLeft"===t&&(e.stopPropagation(),this.previous()),"ArrowRight"===t&&(e.stopPropagation(),this.next())}_spinnerEnabledChange(e){if(this._destroySpinner(),!e)return;const t=this.get("viewModel.view");this._createSpinner(t)}_hideSpinner(){const{_spinner:e}=this;e&&(e.location=null,e.hide())}_displaySpinner(){const{_spinner:e}=this;if(!e)return;const{location:t,waitingForResult:i}=this.viewModel;i?e.show({location:t}):e.hide()}_getIconStyles(e){return{"background-image":e?`url(${e})`:""}}async _shouldFocus(e){e.shouldFocus&&(await r((()=>{var e;return!0===(null==(e=this.viewModel)?void 0:e.active)})),this.focus())}_addSelectedFeatureIndexHandle(){const e=l(this,"viewModel.selectedFeatureIndex",((e,t)=>this._selectedFeatureIndexUpdated(e,t)));this._handles.add(e,N)}_selectedFeatureIndexUpdated(e,t){const{featureCount:i}=this;i&&e!==t&&-1!==e&&(this.actionsMenuOpen=!1,this.featureMenuOpen=!1)}_destroySelectedFeatureWidget(){const{_feature:e}=this;e&&(e.viewModel=null,e&&!e.destroyed&&e.destroy()),this._feature=null}_isScreenLocationWithinView(e,t){return e.x>-1&&e.y>-1&&e.x<=t.width&&e.y<=t.height}_isOutsideView(e){const{popupHeight:t,popupWidth:i,screenLocation:o,side:n,view:s}=e;if(isNaN(i)||isNaN(t)||!s||!o)return!1;const r=s.padding;return"right"===n&&o.x+i/2>s.width-r.right||("left"===n&&o.x-i/2<r.left||("top"===n&&o.y-t<r.top||"bottom"===n&&o.y+t>s.height-r.bottom))}_calculateAutoAlignment(e){if("auto"!==e)return e;const{_pointerOffsetInPx:t,_containerNode:i,_mainContainerNode:o,viewModel:n}=this,{screenLocation:r,view:a}=n;if(s(r)||!a||!i)return"top-center";if(!this._isScreenLocationWithinView(r,a))return this._get("currentAlignment")||"top-center";function l(e){return parseInt(e.replace(/[^-\d\.]/g,""),10)}const u=o?window.getComputedStyle(o,null):null,c=u?l(u.getPropertyValue("max-height")):0,d=u?l(u.getPropertyValue("height")):0,{height:p,width:h}=i.getBoundingClientRect(),g=h+t,_=Math.max(p,c,d)+t,v=this._isOutsideView({popupHeight:_,popupWidth:g,screenLocation:r,side:"right",view:a}),f=this._isOutsideView({popupHeight:_,popupWidth:g,screenLocation:r,side:"left",view:a}),m=this._isOutsideView({popupHeight:_,popupWidth:g,screenLocation:r,side:"top",view:a}),b=this._isOutsideView({popupHeight:_,popupWidth:g,screenLocation:r,side:"bottom",view:a});return f?m?"bottom-right":"top-right":v?m?"bottom-left":"top-left":m?b?"top-center":"bottom-center":"top-center"}_callCurrentAlignment(e){return"function"==typeof e?e.call(this):e}_getCurrentAlignment(){const{alignment:e,dockEnabled:t}=this;return t||!this.viewModel.active?null:this._calculatePositionResult(this._calculateAutoAlignment(this._callCurrentAlignment(e)))}_setCurrentAlignment(){this._set("currentAlignment",this._getCurrentAlignment())}_setCurrentDockPosition(){this._set("currentDockPosition",this._getCurrentDockPosition())}_calculatePositionResult(e){const t=["left","right"];return F(this.container)&&t.reverse(),e.replace(/leading/gi,t[0]).replace(/trailing/gi,t[1])}_callDockPosition(e){return"function"==typeof e?e.call(this):e}_getDockPosition(){var e;return this._calculatePositionResult(this._calculateAutoDockPosition(this._callDockPosition(null==(e=this.dockOptions)?void 0:e.position)))}_getCurrentDockPosition(){return this.dockEnabled&&this.viewModel.active?this._getDockPosition():null}_wouldDockTo(){return this.dockEnabled?null:this._getDockPosition()}_calculateAutoDockPosition(e){var t;if("auto"!==e)return e;const i=null==(t=this.viewModel)?void 0:t.view,o=F(this.container)?"top-left":"top-right";if(!i)return o;const n=i.padding||{left:0,right:0,top:0,bottom:0},s=i.width-n.left-n.right,{breakpoints:r}=i;return r&&s<=r.xsmall?"bottom-center":o}_positionContainer(e=this._containerNode){if(e&&(this._containerNode=e),!e)return;const{screenLocation:t}=this.viewModel,{width:i}=e.getBoundingClientRect(),o=this._calculatePositionStyle(t,i);o&&(e.style.top=o.top,e.style.left=o.left,e.style.bottom=o.bottom,e.style.right=o.right)}_calculateFullWidth(e){const{currentAlignment:t,_pointerOffsetInPx:i}=this;return"top-left"===t||"bottom-left"===t||"top-right"===t||"bottom-right"===t?e+i:e}_calculateAlignmentPosition(e,t,i,o){const{currentAlignment:n,_pointerOffsetInPx:s}=this,r=o/2,a=i.height-t,l=i.width-e,{padding:u}=this.view;return"bottom-center"===n?{top:t+s-u.top,left:e-r-u.left}:"top-left"===n?{bottom:a+s-u.bottom,right:l+s-u.right}:"bottom-left"===n?{top:t+s-u.top,right:l+s-u.right}:"top-right"===n?{bottom:a+s-u.bottom,left:e+s-u.left}:"bottom-right"===n?{top:t+s-u.top,left:e+s-u.left}:"top-center"===n?{bottom:a+s-u.bottom,left:e-r-u.left}:void 0}_calculatePositionStyle(e,t){const{dockEnabled:i,view:o}=this;if(!o)return;if(i)return{left:"",top:"",right:"",bottom:""};if(s(e)||!t)return;const n=this._calculateFullWidth(t),r=this._calculateAlignmentPosition(e.x,e.y,o,n);return r?{top:void 0!==r.top?`${r.top}px`:"auto",left:void 0!==r.left?`${r.left}px`:"auto",bottom:void 0!==r.bottom?`${r.bottom}px`:"auto",right:void 0!==r.right?`${r.right}px`:"auto"}:void 0}_viewChange(e,t){e&&t&&(this.close(),this.clear())}_viewReadyChange(e,t){if(e){const e=this.get("viewModel.view");this._wireUpView(e)}else t&&(this.close(),this.clear())}_wireUpView(e){if(this._destroySpinner(),!e)return;const{spinnerEnabled:t}=this;t&&this._createSpinner(e),this._setDockEnabledForViewSize(this.dockOptions)}_dockingThresholdCrossed(e,t,i){const[o,n]=e,[s,r]=t,{width:a,height:l}=i;return o<=a&&s>a||o>a&&s<=a||n<=l&&r>l||n>l&&r<=l}_updateDockEnabledForViewSize(e,t){if(!e||!t)return;const i=this.get("viewModel.view.padding")||{left:0,right:0,top:0,bottom:0},o=i.left+i.right,n=i.top+i.bottom,s=[],r=[];s[0]=e[0]-o,s[1]=e[1]-n,r[0]=t[0]-o,r[1]=t[1]-n;const{dockOptions:a}=this,l=a.breakpoint;this._dockingThresholdCrossed(s,r,l)&&this._setDockEnabledForViewSize(a),this._setCurrentDockPosition()}_focusDockButtonNode(e){this._focusDockButton&&(this._focusDockButton=!1,e.focus())}_closeButtonNodeUpdated(e){return this._focusClose?(this._focusClose=!1,void e.focus()):this._blurClose?(this._blurClose=!1,void e.blur()):void 0}_mainContainerNodeUpdated(e){return this._mainContainerNode=e,this._focusContainer?(this._focusContainer=!1,void e.focus()):this._blurContainer?(this._blurContainer=!1,void e.blur()):void 0}_featureMenuNodeUpdated(e){if(this._featureMenuNode=e,!e||!this._focusFirstFeature)return;this._focusFirstFeature=!1;const t=e.querySelectorAll("li");if(t.length){t[0].focus()}}_actionsMenuNodeUpdated(e){if(this._actionsMenuNode=e,!e||!this._focusFirstAction)return;this._focusFirstAction=!1;const t=e.querySelectorAll("li");if(t.length){t[0].focus()}}_focusFeatureMenuButtonNode(e){this._focusFeatureMenuButton&&(this._focusFeatureMenuButton=!1,e.focus())}_focusActionsMenuButtonNode(e){this._focusActionsMenuButton&&(this._focusActionsMenuButton=!1,e.focus())}_featureMenuViewportScrollTop(){this._featureMenuViewportNode&&(this._featureMenuViewportNode.scrollTop=0)}_toggleScreenLocationEnabled(){const{dockEnabled:e,viewModel:t}=this;if(!t)return;const i=t.active&&!e;t.screenLocationEnabled=i}_shouldDockAtCurrentViewSize(e){var t,i;const o=e.breakpoint,n=null==(t=this.viewModel)||null==(i=t.view)?void 0:i.ui;if(!n)return!1;const{width:s,height:r}=n;if(isNaN(s)||isNaN(r))return!1;const a=o.hasOwnProperty("width")&&s<=o.width,l=o.hasOwnProperty("height")&&r<=o.height;return a||l}_setDockEnabledForViewSize(e){e.breakpoint&&(this.dockEnabled=this._shouldDockAtCurrentViewSize(e))}_getPageText(e,t){return this.featureNavigationVisible?x(this.messages.pageText,{index:t+1,total:e}):null}_destroySpinner(){const{_spinner:e,view:t}=this;e&&(t&&t.ui&&t.ui.remove(this._spinner,T),e.destroy(),this._spinner=null)}_createSpinner(e){e&&(this._spinner=new f({view:e}),e.ui.add(this._spinner,{key:T,position:"manual"}))}_toggleCollapsed(){this.collapsed=!this.collapsed}_close(){this.close(),this.view&&this.view.focus()}_toggleDockEnabled(){this.dockEnabled=!this.dockEnabled,this._focusDockButton=!0,this.scheduleRender()}_toggleFeatureMenu(){const e=!this.featureMenuOpen;this._featureMenuOpenChanged(e),this.actionsMenuOpen=!1,this.featureMenuOpen=e}_toggleActionsMenu(){const e=!this.actionsMenuOpen;this._actionsMenuOpenChanged(e),this.featureMenuOpen=!1,this.actionsMenuOpen=e}_triggerAction(e){const t=e.currentTarget.dataset.actionUid,{allActions:i}=this.viewModel,o=i.findIndex((e=>e.uid===t)),n=i.getItemAt(o);n&&"toggle"===n.type&&(n.value=!n.value),this.actionsMenuOpen=!1,this.viewModel.triggerAction(o)}_selectFeature(e){const t=e.currentTarget["data-feature-index"];isNaN(t)||(this.viewModel.selectedFeatureIndex=t),this.featureMenuOpen=!1,this._focusFeatureMenuButton=!0,this.scheduleRender()}_next(){this.next()}_previous(){this.previous()}};e([g({readOnly:!0})],R.prototype,"actionsMenuId",null),e([g({readOnly:!0})],R.prototype,"actionsMenuButtonId",null),e([g({readOnly:!0})],R.prototype,"featureMenuId",null),e([g({readOnly:!0})],R.prototype,"titleId",null),e([g({readOnly:!0})],R.prototype,"contentId",null),e([g({readOnly:!0})],R.prototype,"hasContent",null),e([g({readOnly:!0})],R.prototype,"featureNavigationVisible",null),e([g({readOnly:!0})],R.prototype,"collapsible",null),e([g({readOnly:!0})],R.prototype,"featureMenuVisible",null),e([g({readOnly:!0})],R.prototype,"contentCollapsed",null),e([g({readOnly:!0})],R.prototype,"dividedActions",null),e([p("viewModel.actions")],R.prototype,"actions",void 0),e([g()],R.prototype,"actionsMenuOpen",null),e([g()],R.prototype,"alignment",void 0),e([p("viewModel.autoCloseEnabled")],R.prototype,"autoCloseEnabled",void 0),e([p("viewModel.autoOpenEnabled")],R.prototype,"autoOpenEnabled",void 0),e([p("viewModel.defaultPopupTemplateEnabled")],R.prototype,"defaultPopupTemplateEnabled",void 0),e([p("viewModel.content")],R.prototype,"content",void 0),e([g()],R.prototype,"collapsed",void 0),e([g()],R.prototype,"collapseEnabled",void 0),e([g({readOnly:!0})],R.prototype,"currentAlignment",null),e([g({readOnly:!0})],R.prototype,"currentDockPosition",null),e([g()],R.prototype,"dockOptions",null),e([g()],R.prototype,"dockEnabled",void 0),e([p("viewModel.featureCount")],R.prototype,"featureCount",void 0),e([g()],R.prototype,"featureMenuOpen",void 0),e([p("viewModel.features")],R.prototype,"features",void 0),e([p("viewModel.goToOverride")],R.prototype,"goToOverride",void 0),e([g()],R.prototype,"headingLevel",void 0),e([p("viewModel.highlightEnabled")],R.prototype,"highlightEnabled",void 0),e([p("viewModel.location")],R.prototype,"location",void 0),e([g({aliasOf:{source:"messages.widgetLabel",overridable:!0}})],R.prototype,"label",void 0),e([g()],R.prototype,"maxInlineActions",void 0),e([g(),k("esri/widgets/Popup/t9n/Popup")],R.prototype,"messages",void 0),e([g(),k("esri/t9n/common")],R.prototype,"messagesCommon",void 0),e([p("viewModel.promises")],R.prototype,"promises",void 0),e([p("viewModel.selectedFeature")],R.prototype,"selectedFeature",void 0),e([p("viewModel.selectedFeatureIndex")],R.prototype,"selectedFeatureIndex",void 0),e([g({readOnly:!0})],R.prototype,"selectedFeatureWidget",null),e([g()],R.prototype,"spinnerEnabled",void 0),e([p("viewModel.title")],R.prototype,"title",void 0),e([p("viewModel.updateLocationEnabled")],R.prototype,"updateLocationEnabled",void 0),e([p("viewModel.view")],R.prototype,"view",void 0),e([g({type:M}),C(["triggerAction","trigger-action"])],R.prototype,"viewModel",void 0),e([p("viewModel.visible")],R.prototype,"visible",void 0),e([g()],R.prototype,"visibleElements",void 0),e([h("visibleElements")],R.prototype,"castVisibleElements",null),e([y()],R.prototype,"_close",null),e([y()],R.prototype,"_toggleDockEnabled",null),e([y()],R.prototype,"_toggleFeatureMenu",null),e([y()],R.prototype,"_toggleActionsMenu",null),e([y()],R.prototype,"_triggerAction",null),e([y()],R.prototype,"_selectFeature",null),e([y()],R.prototype,"_next",null),e([y()],R.prototype,"_previous",null),R=e([_(S)],R);const j=R;export{j as default};
|
|
5
|
+
import{_ as e}from"../chunks/tslib.es6.js";import"../intl.js";import t from"../core/Collection.js";import{eventKey as i}from"../core/events.js";import o from"../core/Handles.js";import n from"../core/Logger.js";import{isNone as s}from"../core/maybe.js";import{whenOnce as r}from"../core/reactiveUtils.js";import{throttle as a}from"../core/throttle.js";import{watch as l,whenFalse as u,on as c,init as d}from"../core/watchUtils.js";import{aliasOf as p}from"../core/accessorSupport/decorators/aliasOf.js";import"../core/arrayUtils.js";import"../core/has.js";import{cast as h}from"../core/accessorSupport/decorators/cast.js";import{property as g}from"../core/accessorSupport/decorators/property.js";import{subclass as _}from"../core/accessorSupport/decorators/subclass.js";import f from"./Feature.js";import v from"./Spinner.js";import m from"./Widget.js";import{FeatureContentMixin as b}from"./Feature/support/FeatureContentMixin.js";import M from"./Popup/PopupViewModel.js";import{Heading as w}from"./support/Heading.js";import{accessibleHandler as y}from"./support/decorators/accessibleHandler.js";import{messageBundle as k}from"./support/decorators/messageBundle.js";import{vmEvent as C}from"./support/decorators/vmEvent.js";import{tsx as A}from"./support/jsxFactory.js";import{isRTL as F,storeNode as I,cssTransition as O}from"./support/widgetUtils.js";import{substitute as x}from"../intl/substitute.js";const N="selected-index",B=0,T="popup-spinner",D={iconLeftTriangleArrow:"esri-icon-left-triangle-arrow",iconRightTriangleArrow:"esri-icon-right-triangle-arrow",iconDockToTop:"esri-icon-maximize",iconDockToBottom:"esri-icon-dock-bottom",iconDockToLeft:"esri-icon-dock-left",iconDockToRight:"esri-icon-dock-right",iconClose:"esri-icon-close",iconUndock:"esri-icon-minimize",iconCheckMark:"esri-icon-check-mark",iconLoading:"esri-icon-loading-indicator",iconDefaultAction:"esri-icon-default-action",iconActionsMenu:"esri-icon-handle-horizontal",rotating:"esri-rotating",base:"esri-popup",widget:"esri-widget",main:"esri-popup__main-container",loadingContainer:"esri-popup__loading-container",isCollapsible:"esri-popup--is-collapsible",isCollapsed:"esri-popup--is-collapsed",shadow:"esri-popup--shadow",isDocked:"esri-popup--is-docked",isDockedTopLeft:"esri-popup--is-docked-top-left",isDockedTopCenter:"esri-popup--is-docked-top-center",isDockedTopRight:"esri-popup--is-docked-top-right",isDockedBottomLeft:"esri-popup--is-docked-bottom-left",isDockedBottomCenter:"esri-popup--is-docked-bottom-center",isDockedBottomRight:"esri-popup--is-docked-bottom-right",alignTopCenter:"esri-popup--aligned-top-center",alignBottomCenter:"esri-popup--aligned-bottom-center",alignTopLeft:"esri-popup--aligned-top-left",alignBottomLeft:"esri-popup--aligned-bottom-left",alignTopRight:"esri-popup--aligned-top-right",alignBottomRight:"esri-popup--aligned-bottom-right",isFeatureMenuOpen:"esri-popup--feature-menu-open",isActionsMenuOpen:"esri-popup--actions-menu-open",hasFeatureUpdated:"esri-popup--feature-updated",header:"esri-popup__header",headerButtons:"esri-popup__header-buttons",headerContainer:"esri-popup__header-container",headerContainerButton:"esri-popup__header-container--button",headerTitle:"esri-popup__header-title",content:"esri-popup__content",footer:"esri-popup__footer",footerHasPagination:"esri-popup__footer--has-pagination",footerHasActions:"esri-popup__footer--has-actions",footerHasActionsMenu:"esri-popup__footer--has-actions-menu",button:"esri-popup__button",buttonDisabled:"esri-popup__button--disabled",buttonDock:"esri-popup__button--dock",icon:"esri-popup__icon",iconDock:"esri-popup__icon--dock-icon",inlineActionsContainer:"esri-popup__inline-actions-container",actionsMenuButton:"esri-popup__actions-menu-button",actions:"esri-popup__actions",action:"esri-popup__action",actionImage:"esri-popup__action-image",actionText:"esri-popup__action-text",actionToggle:"esri-popup__action-toggle",actionToggleOn:"esri-popup__action-toggle--on",pointer:"esri-popup__pointer",pointerDirection:"esri-popup__pointer-direction",navigation:"esri-popup__navigation",paginationPrevious:"esri-popup__pagination-previous",paginationNext:"esri-popup__pagination-next",paginationPreviousIconLTR:"esri-popup__pagination-previous-icon",paginationPreviousIconRTL:"esri-popup__pagination-previous-icon--rtl",paginationNextIconLTR:"esri-popup__pagination-next-icon",paginationNextIconRTL:"esri-popup__pagination-next-icon--rtl",featureMenu:"esri-popup__feature-menu",featureMenuList:"esri-popup__feature-menu-list",featureMenuItem:"esri-popup__feature-menu-item",featureMenuViewport:"esri-popup__feature-menu-viewport",featureMenuHeader:"esri-popup__feature-menu-header",featureMenuNote:"esri-popup__feature-menu-note",featureMenuSelected:"esri-popup__feature-menu-item--selected",featureMenuButton:"esri-popup__feature-menu-button",featureMenuTitle:"esri-popup__feature-menu-title",featureMenuObserver:"esri-popup__feature-menu-observer",featureMenuLoader:"esri-popup__feature-menu-loader",collapseButton:"esri-popup__collapse-button"},E={buttonEnabled:!0,position:"auto",breakpoint:{width:544}},P="esri-popup";function L(e,t){return void 0===t?`${P}__${e}`:`${P}__${e}-${t}`}const S="esri.widgets.Popup",V=n.getLogger(S),U={closeButton:!0,featureNavigation:!0};let R=class extends(b(m)){constructor(e,t){super(e,t),this._blurClose=!1,this._blurContainer=!1,this._containerNode=null,this._mainContainerNode=null,this._featureMenuNode=null,this._actionsMenuNode=null,this._focusClose=!1,this._focusContainer=!1,this._focusDockButton=!1,this._focusFeatureMenuButton=!1,this._focusActionsMenuButton=!1,this._focusFirstFeature=!1,this._focusFirstAction=!1,this._handles=new o,this._pointerOffsetInPx=16,this._spinner=null,this._feature=null,this._featureMenuIntersectionObserverCallback=([e])=>{e?.isIntersecting&&this.viewModel.featurePage++},this._featureMenuIntersectionObserver=new IntersectionObserver(this._featureMenuIntersectionObserverCallback,{root:window.document}),this._displaySpinnerThrottled=a((()=>this._displaySpinner()),B),this.actions=null,this.alignment="auto",this.autoCloseEnabled=null,this.autoOpenEnabled=null,this.defaultPopupTemplateEnabled=null,this.content=null,this.collapsed=!1,this.collapseEnabled=!0,this.dockEnabled=!1,this.featureCount=null,this.featureMenuOpen=!1,this.features=null,this.goToOverride=null,this.headingLevel=2,this.highlightEnabled=null,this.location=null,this.label=void 0,this.maxInlineActions=3,this.messages=null,this.messagesCommon=null,this.promises=null,this.selectedFeature=null,this.selectedFeatureIndex=null,this.spinnerEnabled=!0,this.title=null,this.updateLocationEnabled=null,this.view=null,this.viewModel=new M,this.visible=null,this.visibleElements={...U},this._addSelectedFeatureIndexHandle(),this.own([l(this,"viewModel.screenLocation",(()=>this._positionContainer())),l(this,["viewModel.active","dockEnabled"],(()=>this._toggleScreenLocationEnabled())),l(this,"viewModel.screenLocation",((e,t)=>{!!e!=!!t&&this.reposition()})),l(this,["viewModel.view.padding","viewModel.view.size","viewModel.active","viewModel.location","alignment"],(()=>this.reposition())),l(this,"spinnerEnabled",(e=>this._spinnerEnabledChange(e))),l(this,"viewModel.view.size",((e,t)=>this._updateDockEnabledForViewSize(e,t))),l(this,"viewModel.view",((e,t)=>this._viewChange(e,t))),l(this,"viewModel.view.ready",((e,t)=>this._viewReadyChange(e,t))),l(this,["viewModel.waitingForResult","viewModel.location"],(()=>{this._hideSpinner(),this._displaySpinnerThrottled()})),l(this,["selectedFeatureWidget.viewModel.title","selectedFeatureWidget.viewModel.state"],(()=>this._setTitleFromFeatureWidget())),l(this,["selectedFeatureWidget.viewModel.content","selectedFeatureWidget.viewModel.state"],(()=>this._setContentFromFeatureWidget())),u(this,"collapsed",(()=>{"xsmall"===this.viewModel?.view?.widthBreakpoint&&this.viewModel.active&&this.collapseEnabled&&this.viewModel.centerAtLocation()})),c(this,"viewModel.allActions","change",(()=>this._watchActions())),d(this,"viewModel.allActions",(()=>this._watchActions())),l(this,"viewModel.featureViewModels",(()=>this._featureMenuViewportScrollTop()))])}destroy(){this._destroySelectedFeatureWidget(),this._destroySpinner(),this._handles?.destroy(),this._unobserveFeatureMenuObserver(),this._featureMenuIntersectionObserver?.disconnect(),this._handles=null}get actionsMenuId(){return`${this.id}-actions-menu`}get actionsMenuButtonId(){return`${this.id}-actions-menu-button`}get featureMenuId(){return`${this.id}-feature-menu`}get titleId(){return`${this.id}-popup-title`}get contentId(){return`${this.id}-popup-content`}get hasContent(){return!!(this.selectedFeatureWidget?this.selectedFeatureWidget?.viewModel?.waitingForContent||"error"===this.selectedFeatureWidget?.viewModel?.state||this.selectedFeatureWidget?.viewModel?.content:this.viewModel?.content)}get featureNavigationVisible(){return this.viewModel.active&&this.viewModel.featureCount>1&&this.visibleElements.featureNavigation}get collapsible(){return!!(this.collapseEnabled&&this.viewModel.title&&this.hasContent)}get featureMenuVisible(){return this.featureNavigationVisible&&this.featureMenuOpen}get contentCollapsed(){return this.collapsible&&!this.featureMenuVisible&&this.collapsed}get dividedActions(){return this._divideActions()}set actionsMenuOpen(e){this._set("actionsMenuOpen",!!e)}get actionsMenuOpen(){return!!this.viewModel.active&&this._get("actionsMenuOpen")}get currentAlignment(){return this._getCurrentAlignment()}get currentDockPosition(){return this._getCurrentDockPosition()}get dockOptions(){return this._get("dockOptions")||E}set dockOptions(e){const t={...E},i=this.get("viewModel.view.breakpoints"),o={};i&&(o.width=i.xsmall,o.height=i.xsmall);const n={...t,...e},s={...t.breakpoint,...o},{breakpoint:r}=n;!0===r?n.breakpoint=s:"object"==typeof r&&(n.breakpoint={...s,...r}),this._set("dockOptions",n),this._setCurrentDockPosition(),this.reposition()}get selectedFeatureWidget(){const{_feature:e,visibleElements:t,headingLevel:i}=this,{selectedFeatureViewModel:o}=this.viewModel,n={...t,title:!1};return o?(e?(e.viewModel=o,e.visibleElements=n):this._feature=new f({headingLevel:i+1,viewModel:o,visibleElements:n}),this._feature):null}castVisibleElements(e){return{...U,...e}}blur(){const{active:e}=this.viewModel;e||V.warn("Popup can only be blurred when currently active."),this.visibleElements.closeButton?this._blurClose=!0:this._blurContainer=!0,this.scheduleRender()}clear(){this.viewModel.clear()}close(){this.visible=!1}fetchFeatures(e,t){return this.viewModel.fetchFeatures(e,t)}focus(){const{active:e}=this.viewModel;e||V.warn("Popup can only be focused when currently active."),this.visibleElements.closeButton?this._focusClose=!0:this._focusContainer=!0,this.scheduleRender()}next(){return this.viewModel.next()}open(e){this._handles.remove(N);const t=!!e&&!!e.featureMenuOpen,i=!!e&&!!e.actionsMenuOpen,o={collapsed:!!e&&!!e.collapsed,actionsMenuOpen:i,featureMenuOpen:t};"xsmall"===this.viewModel?.view?.widthBreakpoint&&(o.collapsed=!0),this.set(o),this.viewModel.open(e),this._shouldFocus(e),this._addSelectedFeatureIndexHandle()}previous(){return this.viewModel.previous()}reposition(){this.renderNow(),this._positionContainer(),this._setCurrentAlignment()}triggerAction(e){this.viewModel.triggerAction(e)}render(){const{actionsMenuOpen:e,dockEnabled:t,featureMenuVisible:i,dividedActions:o,currentAlignment:n,currentDockPosition:s}=this,{active:r}=this.viewModel,{menuActions:a}=o,l=r&&a.length>1&&e,u=r&&t,c=r&&!t,d=this.selectedFeature?.layer?.title,p=this.selectedFeature?.layer?.id,h={[D.alignTopCenter]:"top-center"===n,[D.alignBottomCenter]:"bottom-center"===n,[D.alignTopLeft]:"top-left"===n,[D.alignBottomLeft]:"bottom-left"===n,[D.alignTopRight]:"top-right"===n,[D.alignBottomRight]:"bottom-right"===n,[D.isDocked]:u,[D.shadow]:c,[D.isDockedTopLeft]:"top-left"===s,[D.isDockedTopCenter]:"top-center"===s,[D.isDockedTopRight]:"top-right"===s,[D.isDockedBottomLeft]:"bottom-left"===s,[D.isDockedBottomCenter]:"bottom-center"===s,[D.isDockedBottomRight]:"bottom-right"===s,[D.isFeatureMenuOpen]:i,[D.isActionsMenuOpen]:l};return A("div",{class:this.classes(D.base,h),role:"presentation","data-layer-title":d,"data-layer-id":p,bind:this,afterCreate:this._positionContainer,afterUpdate:this._positionContainer},r?[this.renderMainContainer(),this.renderPointer()]:null)}renderLoadingIcon(){return A("span",{"aria-hidden":"true",class:this.classes(D.icon,D.iconLoading,D.rotating)})}renderNavigationLoading(){const{messagesCommon:e}=this;return this.viewModel.pendingPromisesCount?A("div",{key:L("loading-container"),role:"presentation",class:D.loadingContainer,"aria-label":e.loading,title:e.loading},this.renderLoadingIcon()):null}renderPreviousIcon(){const e=F(this.container),t={[D.iconRightTriangleArrow]:e,[D.paginationPreviousIconRTL]:e,[D.iconLeftTriangleArrow]:!e,[D.paginationPreviousIconLTR]:!e};return A("span",{"aria-hidden":"true",class:this.classes(D.icon,t)})}renderPreviousButton(){const{messages:e}=this;return A("div",{role:"button",tabIndex:0,bind:this,onclick:this._previous,onkeydown:this._previous,class:this.classes(D.button,D.paginationPrevious),"aria-label":e.previous,title:e.previous},this.renderPreviousIcon())}renderNextIcon(){const e=F(this.container),t={[D.iconLeftTriangleArrow]:e,[D.paginationNextIconRTL]:e,[D.iconRightTriangleArrow]:!e,[D.paginationNextIconLTR]:!e};return A("span",{"aria-hidden":"true",class:this.classes(D.icon,t)})}renderNextButton(){const{messages:e}=this;return A("div",{role:"button",tabIndex:0,bind:this,onclick:this._next,onkeydown:this._next,class:this.classes(D.button,D.paginationNext),"aria-label":e.next,title:e.next},this.renderNextIcon())}renderFeatureMenuButton(){const{featureMenuOpen:e,featureMenuId:t,messagesCommon:i}=this,{featureCount:o,selectedFeatureIndex:n}=this.viewModel;return A("div",{role:"button",tabIndex:0,bind:this,onclick:this._toggleFeatureMenu,onkeydown:this._toggleFeatureMenu,afterCreate:this._focusFeatureMenuButtonNode,afterUpdate:this._focusFeatureMenuButtonNode,class:this.classes(D.button,D.featureMenuButton),"aria-haspopup":"true","aria-controls":t,"aria-expanded":e.toString(),"aria-label":i.menu,title:i.menu},this._getPageText(o,n))}renderNavigationButtons(){return this.featureNavigationVisible?[this.renderPreviousButton(),this.renderNavigationLoading()||this.renderFeatureMenuButton(),this.renderNextButton()]:null}renderDockIcon(){const{dockEnabled:e}=this,t=this._wouldDockTo(),i={[D.iconUndock]:e,[D.iconDock]:!e,[D.iconDockToRight]:!e&&("top-right"===t||"bottom-right"===t),[D.iconDockToLeft]:!e&&("top-left"===t||"bottom-left"===t),[D.iconDockToTop]:!e&&"top-center"===t,[D.iconDockToBottom]:!e&&"bottom-center"===t};return A("span",{"aria-hidden":"true",class:this.classes(i,D.icon)})}renderDockButton(){const{dockEnabled:e,messages:t}=this,i=this.viewModel?.view?.widthBreakpoint,o=e?t.undock:t.dock;return"xsmall"!==i&&this.dockOptions?.buttonEnabled?A("div",{role:"button","aria-label":o,title:o,tabIndex:0,bind:this,onclick:this._toggleDockEnabled,onkeydown:this._toggleDockEnabled,afterCreate:this._focusDockButtonNode,afterUpdate:this._focusDockButtonNode,class:this.classes(D.button,D.buttonDock)},this.renderDockIcon()):null}renderTitle(){const{title:e}=this.viewModel,{titleId:t,collapsible:i,contentCollapsed:o,messagesCommon:n}=this,s={[D.headerContainerButton]:i},r=A(w,{level:this.headingLevel,class:D.headerTitle,innerHTML:e}),a=i?A("button",{key:`${e}--collapsible`,id:t,title:o?n.expand:n.collapse,bind:this,enterAnimation:this._createFeatureUpdatedAnimation(),class:this.classes(D.headerContainer,s),"aria-expanded":o?"false":"true",onclick:this._toggleCollapsed,type:"button"},r):A("div",{key:e,id:t,bind:this,enterAnimation:this._createFeatureUpdatedAnimation(),class:this.classes(D.headerContainer,s)},r);return e?a:null}renderCloseIcon(){return A("span",{"aria-hidden":"true",class:this.classes(D.icon,D.iconClose)})}renderCloseButton(){const{visibleElements:e,messagesCommon:t}=this;return e.closeButton?A("div",{role:"button",tabIndex:0,bind:this,onclick:this._close,onkeydown:this._close,class:D.button,"aria-label":t.close,title:t.close,afterCreate:this._closeButtonNodeUpdated,afterUpdate:this._closeButtonNodeUpdated},this.renderCloseIcon()):null}renderHeader(){return A("header",{class:D.header},this.renderTitle(),A("div",{class:D.headerButtons},this.renderDockButton(),this.renderCloseButton()))}renderContentContainer(){const{contentId:e,hasContent:t,contentCollapsed:i}=this,{content:o}=this.viewModel;return t&&!i?A("article",{key:o,enterAnimation:this._createFeatureUpdatedAnimation(),id:e,class:D.content},this.renderContent()):null}renderActionsMenuButton(){const{actionsMenuId:e,actionsMenuButtonId:t,actionsMenuOpen:i,dividedActions:o,messagesCommon:n}=this,s=i?n.close:n.open,{menuActions:r}=o;return r.length?A("div",{key:L("actions-menu-button"),class:this.classes(D.button,D.actionsMenuButton),role:"button",id:t,"aria-haspopup":"true","aria-controls":i?e:null,tabIndex:0,bind:this,onclick:this._toggleActionsMenu,onkeydown:this._toggleActionsMenu,afterCreate:this._focusActionsMenuButtonNode,afterUpdate:this._focusActionsMenuButtonNode,"aria-label":s,title:s},A("span",{"aria-hidden":"true",class:D.iconActionsMenu})):null}renderMenuActions(){const{actionsMenuId:e,actionsMenuButtonId:t,actionsMenuOpen:i,dividedActions:o}=this,{menuActions:n}=o;return n.length&&i?A("ul",{id:e,role:"menu","aria-labelledby":t,key:L("actions"),class:D.actions,bind:this,onkeyup:this._handleActionMenuKeyup,afterCreate:this._actionsMenuNodeUpdated,afterUpdate:this._actionsMenuNodeUpdated},n.toArray().map((e=>this.renderAction({action:e,type:"menu-item"})))):null}renderInlineActions(){const{inlineActions:e}=this.dividedActions;return!!e.length&&e.toArray().map((e=>this.renderAction({action:e,type:"inline"})))}renderInlineActionsContainer(){const{inlineActions:e,menuActions:t}=this.dividedActions,i=!!e.length,o=!!t.length;return i||o?A("div",{key:"inline-actions-container","data-inline-actions":i.toString(),"data-menu-actions":o.toString(),class:D.inlineActionsContainer},this.renderInlineActions(),this.renderActionsMenuButton(),this.renderMenuActions()):null}renderNavigation(){return this.featureNavigationVisible?A("section",{key:L("navigation"),class:this.classes(D.navigation)},this.renderNavigationButtons()):null}renderFooter(){const{featureNavigationVisible:e,dividedActions:t}=this,{inlineActions:i,menuActions:o}=t,n=!!i.length,s=!!o.length,r={[D.footerHasPagination]:e,[D.footerHasActions]:n,[D.footerHasActionsMenu]:s};return e||n?A("div",{key:L("feature-buttons"),class:this.classes(D.footer,r)},this.renderInlineActionsContainer(),this.renderNavigation()):null}renderFeatureMenuContainer(){const{messages:e}=this,{featureViewModels:t,isLoadingFeature:i}=this.viewModel,o=x(e.selectedFeatures,{total:t.length});return A("section",{key:L("menu"),class:D.featureMenu},A("strong",{class:D.featureMenuHeader},o),A("nav",{bind:this,class:D.featureMenuViewport,"data-node-ref":"_featureMenuViewportNode",afterCreate:I},this.renderFeatureMenu(),A("div",{class:D.featureMenuObserver,bind:this,afterCreate:this._featureMenuIntersectionObserverCreated}),i?A("div",{class:D.featureMenuLoader},this.renderLoadingIcon()):null))}renderPointer(){return this.dockEnabled?null:A("div",{key:L("pointer"),class:D.pointer,role:"presentation"},A("div",{class:this.classes(D.pointerDirection,D.shadow)}))}renderMainContainer(){const{dockEnabled:e,currentAlignment:t,currentDockPosition:i,titleId:o,contentId:n,collapsible:s,hasContent:r,contentCollapsed:a,visibleElements:l}=this,{title:u}=this.viewModel,c="bottom-left"===t||"bottom-center"===t||"bottom-right"===t||"top-left"===i||"top-center"===i||"top-right"===i,d="top-left"===t||"top-center"===t||"top-right"===t||"bottom-left"===i||"bottom-center"===i||"bottom-right"===i,p={[D.shadow]:e,[D.isCollapsible]:s,[D.isCollapsed]:a};return A("div",{class:this.classes(D.main,D.widget,p),tabIndex:l.closeButton?null:-1,role:"dialog","aria-labelledby":u?o:"","aria-describedby":r&&!a?n:"",bind:this,onkeyup:this._handleMainKeyup,afterCreate:this._mainContainerNodeUpdated,afterUpdate:this._mainContainerNodeUpdated},c?this.renderFooter():null,c?this.renderFeatureMenuContainer():null,this.renderHeader(),this.renderContentContainer(),d?this.renderFooter():null,d?this.renderFeatureMenuContainer():null)}renderContent(){const e=this.viewModel?.content;return e?"string"==typeof e?A("div",{key:e,innerHTML:e}):this.renderNodeContent(e):null}renderActionText(e){return A("span",{key:"text",class:D.actionText},e)}renderActionIcon(e){const t=this._getActionClass(e),i=this._getActionImage(e),o={[D.iconLoading]:e.active,[D.rotating]:e.active,[D.icon]:!!t,[D.actionImage]:!e.active&&!!i};return t&&(o[t]=!e.active),A("span",{key:"icon","aria-hidden":"true",class:this.classes(D.icon,o),styles:this._getIconStyles(i)})}renderAction(e){const{action:t,type:i}=e,o=this._getActionTitle(t),n={[D.action]:"toggle"!==t.type,[D.actionToggle]:"toggle"===t.type,[D.actionToggleOn]:"toggle"===t.type&&t.value,[D.buttonDisabled]:t.disabled},s=[this.renderActionIcon(t),this.renderActionText(o)],r="menu-item"===i?A("li",{key:t.uid,role:"menuitem",tabIndex:0,title:o,"aria-label":o,class:this.classes(D.button,n),onkeyup:this._handleActionMenuItemKeyup,bind:this,"data-action-uid":t.uid,onclick:this._triggerAction,onkeydown:this._triggerAction},s):A("div",{key:t.uid,role:"button",tabIndex:0,title:o,"aria-label":o,class:this.classes(D.button,n),onkeyup:this._handleActionMenuItemKeyup,bind:this,"data-action-uid":t.uid,onclick:this._triggerAction,onkeydown:this._triggerAction},s);return t.visible?r:null}renderFeatureMenuItem(e,t){const{messages:i,messagesCommon:o}=this,{selectedFeatureIndex:n,selectedFeatureViewModel:s}=this.viewModel,r=e===s,a={[D.featureMenuSelected]:r},l=r?A("span",{key:L(`feature-menu-selected-feature-${n}`),title:i.selectedFeature,"aria-label":i.selectedFeature,class:D.iconCheckMark}):null,u=A("span",{innerHTML:e.title||o.untitled});return A("li",{role:"menuitem",tabIndex:-1,key:L(`feature-menu-feature-${n}`),class:this.classes(a,D.featureMenuItem),bind:this,"data-feature-index":t,onkeyup:this._handleFeatureMenuItemKeyup,onclick:this._selectFeature,onkeydown:this._selectFeature},A("span",{class:D.featureMenuTitle},u,l))}renderFeatureMenu(){const{featureMenuId:e}=this,{featureViewModels:t}=this.viewModel;return t.length>1?A("ol",{class:D.featureMenuList,id:e,bind:this,afterCreate:this._featureMenuNodeUpdated,afterUpdate:this._featureMenuNodeUpdated,onkeyup:this._handleFeatureMenuKeyup,role:"menu"},t.filter((e=>!!e.graphic)).map(((e,t)=>this.renderFeatureMenuItem(e,t)))):null}_getActionTitle(e){const{messages:t,selectedFeature:i,messagesCommon:o}=this,{id:n}=e,s=i?.attributes,r="zoom-to-feature"===n?x(e.title,{messages:t}):"remove-selected-feature"===n?x(e.title,{messages:o}):"zoom-to-clustered-features"===n||"browse-clustered-features"===n?x(e.title,{messages:t}):e.title;return r&&s?x(r,s):r}_getActionClass(e){const{selectedFeature:t}=this,i=t?.attributes,{className:o,image:n}=e,s=n||o?o:D.iconDefaultAction;return s&&i?x(s,i):s}_getActionImage(e){const{selectedFeature:t}=this,i=t?.attributes,{image:o}=e;return o&&i?x(o,i):o}_createFeatureUpdatedAnimation(){return O("enter",D.hasFeatureUpdated)}_getInlineActionCount(){const{maxInlineActions:e,featureNavigationVisible:t}=this;if("number"!=typeof e)return null;const i=Math.round(e);return Math.max(t?i-1:i,0)}_watchActions(){const{allActions:e}=this.viewModel;this.notifyChange("dividedActions");const t="actions";this._handles.remove(t),e&&e.forEach((e=>{this._handles.add(l(e,["uid","active","className","disabled","id","title","image","visible"],(()=>this.scheduleRender())),t)}))}_divideActions(){const{allActions:e}=this.viewModel,i=e.filter((e=>e.visible)),o=this._getInlineActionCount(),n=null===o,s=0===o;return{inlineActions:n?i.slice(0):s?new t:i.slice(0,o),menuActions:n?new t:s?i.slice(0):i.slice(o)}}_featureMenuOpenChanged(e){e?this._focusFirstFeature=!0:this._focusFeatureMenuButton=!0}_actionsMenuOpenChanged(e){e?this._focusFirstAction=!0:this._focusActionsMenuButton=!0}_setTitleFromFeatureWidget(){const{selectedFeatureWidget:e,messagesCommon:t}=this;e&&(this.viewModel.title="error"===e.viewModel?.state?t.errorMessage:e.viewModel?.title||"")}_setContentFromFeatureWidget(){const{selectedFeatureWidget:e}=this;e&&(this.viewModel.content=e)}_unobserveFeatureMenuObserver(){this._featureMenuIntersectionObserverNode&&this._featureMenuIntersectionObserver.unobserve(this._featureMenuIntersectionObserverNode)}_featureMenuIntersectionObserverCreated(e){this._unobserveFeatureMenuObserver(),this._featureMenuIntersectionObserver.observe(e),this._featureMenuIntersectionObserverNode=e}_handleFeatureMenuKeyup(e){"Escape"===i(e)&&(e.stopPropagation(),this._focusFeatureMenuButton=!0,this.featureMenuOpen=!1,this.scheduleRender())}_handleActionMenuKeyup(e){"Escape"===i(e)&&(e.stopPropagation(),this._focusActionsMenuButton=!0,this.actionsMenuOpen=!1,this.scheduleRender())}_handleFeatureMenuItemKeyup(e){const t=i(e),{_featureMenuNode:o}=this,n=e.currentTarget["data-feature-index"];if(!o)return;const s=o.querySelectorAll("li"),r=s.length;if("ArrowUp"!==t)if("ArrowDown"!==t)if("Home"!==t)if("End"!==t);else{e.stopPropagation();s[s.length-1].focus()}else{e.stopPropagation();s[0].focus()}else{e.stopPropagation();s[(n+1+r)%r].focus()}else{e.stopPropagation();s[(n-1+r)%r].focus()}}_handleActionMenuItemKeyup(e){const t=i(e),{_actionsMenuNode:o}=this,n=e.currentTarget.dataset.actionUid,{menuActions:s}=this.dividedActions,r=s.findIndex((e=>e.uid===n));if(!o)return;const a=o.querySelectorAll("li"),l=a.length;if("ArrowUp"!==t)if("ArrowDown"!==t)if("Home"!==t)if("End"!==t);else{e.stopPropagation();a[a.length-1].focus()}else{e.stopPropagation();a[0].focus()}else{e.stopPropagation();a[(r+1+l)%l].focus()}else{e.stopPropagation();a[(r-1+l)%l].focus()}}_handleMainKeyup(e){const t=i(e);"ArrowLeft"===t&&(e.stopPropagation(),this.previous()),"ArrowRight"===t&&(e.stopPropagation(),this.next())}_spinnerEnabledChange(e){if(this._destroySpinner(),!e)return;const t=this.get("viewModel.view");this._createSpinner(t)}_hideSpinner(){const{_spinner:e}=this;e&&(e.location=null,e.hide())}_displaySpinner(){const{_spinner:e}=this;if(!e)return;const{location:t,waitingForResult:i}=this.viewModel;i?e.show({location:t}):e.hide()}_getIconStyles(e){return{"background-image":e?`url(${e})`:""}}async _shouldFocus(e){e.shouldFocus&&(await r((()=>!0===this.viewModel?.active)),this.focus())}_addSelectedFeatureIndexHandle(){const e=l(this,"viewModel.selectedFeatureIndex",((e,t)=>this._selectedFeatureIndexUpdated(e,t)));this._handles.add(e,N)}_selectedFeatureIndexUpdated(e,t){const{featureCount:i}=this;i&&e!==t&&-1!==e&&(this.actionsMenuOpen=!1,this.featureMenuOpen=!1)}_destroySelectedFeatureWidget(){const{_feature:e}=this;e&&(e.viewModel=null,e&&!e.destroyed&&e.destroy()),this._feature=null}_isScreenLocationWithinView(e,t){return e.x>-1&&e.y>-1&&e.x<=t.width&&e.y<=t.height}_isOutsideView(e){const{popupHeight:t,popupWidth:i,screenLocation:o,side:n,view:s}=e;if(isNaN(i)||isNaN(t)||!s||!o)return!1;const r=s.padding;return"right"===n&&o.x+i/2>s.width-r.right||("left"===n&&o.x-i/2<r.left||("top"===n&&o.y-t<r.top||"bottom"===n&&o.y+t>s.height-r.bottom))}_calculateAutoAlignment(e){if("auto"!==e)return e;const{_pointerOffsetInPx:t,_containerNode:i,_mainContainerNode:o,viewModel:n}=this,{screenLocation:r,view:a}=n;if(s(r)||!a||!i)return"top-center";if(!this._isScreenLocationWithinView(r,a))return this._get("currentAlignment")||"top-center";function l(e){return parseInt(e.replace(/[^-\d\.]/g,""),10)}const u=o?window.getComputedStyle(o,null):null,c=u?l(u.getPropertyValue("max-height")):0,d=u?l(u.getPropertyValue("height")):0,{height:p,width:h}=i.getBoundingClientRect(),g=h+t,_=Math.max(p,c,d)+t,f=this._isOutsideView({popupHeight:_,popupWidth:g,screenLocation:r,side:"right",view:a}),v=this._isOutsideView({popupHeight:_,popupWidth:g,screenLocation:r,side:"left",view:a}),m=this._isOutsideView({popupHeight:_,popupWidth:g,screenLocation:r,side:"top",view:a}),b=this._isOutsideView({popupHeight:_,popupWidth:g,screenLocation:r,side:"bottom",view:a});return v?m?"bottom-right":"top-right":f?m?"bottom-left":"top-left":m?b?"top-center":"bottom-center":"top-center"}_callCurrentAlignment(e){return"function"==typeof e?e.call(this):e}_getCurrentAlignment(){const{alignment:e,dockEnabled:t}=this;return t||!this.viewModel.active?null:this._calculatePositionResult(this._calculateAutoAlignment(this._callCurrentAlignment(e)))}_setCurrentAlignment(){this._set("currentAlignment",this._getCurrentAlignment())}_setCurrentDockPosition(){this._set("currentDockPosition",this._getCurrentDockPosition())}_calculatePositionResult(e){const t=["left","right"];return F(this.container)&&t.reverse(),e.replace(/leading/gi,t[0]).replace(/trailing/gi,t[1])}_callDockPosition(e){return"function"==typeof e?e.call(this):e}_getDockPosition(){return this._calculatePositionResult(this._calculateAutoDockPosition(this._callDockPosition(this.dockOptions?.position)))}_getCurrentDockPosition(){return this.dockEnabled&&this.viewModel.active?this._getDockPosition():null}_wouldDockTo(){return this.dockEnabled?null:this._getDockPosition()}_calculateAutoDockPosition(e){if("auto"!==e)return e;const t=this.viewModel?.view,i=F(this.container)?"top-left":"top-right";if(!t)return i;const o=t.padding||{left:0,right:0,top:0,bottom:0},n=t.width-o.left-o.right,{breakpoints:s}=t;return s&&n<=s.xsmall?"bottom-center":i}_positionContainer(e=this._containerNode){if(e&&(this._containerNode=e),!e)return;const{screenLocation:t}=this.viewModel,{width:i}=e.getBoundingClientRect(),o=this._calculatePositionStyle(t,i);o&&(e.style.top=o.top,e.style.left=o.left,e.style.bottom=o.bottom,e.style.right=o.right)}_calculateFullWidth(e){const{currentAlignment:t,_pointerOffsetInPx:i}=this;return"top-left"===t||"bottom-left"===t||"top-right"===t||"bottom-right"===t?e+i:e}_calculateAlignmentPosition(e,t,i,o){const{currentAlignment:n,_pointerOffsetInPx:s}=this,r=o/2,a=i.height-t,l=i.width-e,{padding:u}=this.view;return"bottom-center"===n?{top:t+s-u.top,left:e-r-u.left}:"top-left"===n?{bottom:a+s-u.bottom,right:l+s-u.right}:"bottom-left"===n?{top:t+s-u.top,right:l+s-u.right}:"top-right"===n?{bottom:a+s-u.bottom,left:e+s-u.left}:"bottom-right"===n?{top:t+s-u.top,left:e+s-u.left}:"top-center"===n?{bottom:a+s-u.bottom,left:e-r-u.left}:void 0}_calculatePositionStyle(e,t){const{dockEnabled:i,view:o}=this;if(!o)return;if(i)return{left:"",top:"",right:"",bottom:""};if(s(e)||!t)return;const n=this._calculateFullWidth(t),r=this._calculateAlignmentPosition(e.x,e.y,o,n);return r?{top:void 0!==r.top?`${r.top}px`:"auto",left:void 0!==r.left?`${r.left}px`:"auto",bottom:void 0!==r.bottom?`${r.bottom}px`:"auto",right:void 0!==r.right?`${r.right}px`:"auto"}:void 0}_viewChange(e,t){e&&t&&(this.close(),this.clear())}_viewReadyChange(e,t){if(e){const e=this.get("viewModel.view");this._wireUpView(e)}else t&&(this.close(),this.clear())}_wireUpView(e){if(this._destroySpinner(),!e)return;const{spinnerEnabled:t}=this;t&&this._createSpinner(e),this._setDockEnabledForViewSize(this.dockOptions)}_dockingThresholdCrossed(e,t,i){const[o,n]=e,[s,r]=t,{width:a,height:l}=i;return o<=a&&s>a||o>a&&s<=a||n<=l&&r>l||n>l&&r<=l}_updateDockEnabledForViewSize(e,t){if(!e||!t)return;const i=this.get("viewModel.view.padding")||{left:0,right:0,top:0,bottom:0},o=i.left+i.right,n=i.top+i.bottom,s=[],r=[];s[0]=e[0]-o,s[1]=e[1]-n,r[0]=t[0]-o,r[1]=t[1]-n;const{dockOptions:a}=this,l=a.breakpoint;this._dockingThresholdCrossed(s,r,l)&&this._setDockEnabledForViewSize(a),this._setCurrentDockPosition()}_focusDockButtonNode(e){this._focusDockButton&&(this._focusDockButton=!1,e.focus())}_closeButtonNodeUpdated(e){return this._focusClose?(this._focusClose=!1,void e.focus()):this._blurClose?(this._blurClose=!1,void e.blur()):void 0}_mainContainerNodeUpdated(e){return this._mainContainerNode=e,this._focusContainer?(this._focusContainer=!1,void e.focus()):this._blurContainer?(this._blurContainer=!1,void e.blur()):void 0}_featureMenuNodeUpdated(e){if(this._featureMenuNode=e,!e||!this._focusFirstFeature)return;this._focusFirstFeature=!1;const t=e.querySelectorAll("li");if(t.length){t[0].focus()}}_actionsMenuNodeUpdated(e){if(this._actionsMenuNode=e,!e||!this._focusFirstAction)return;this._focusFirstAction=!1;const t=e.querySelectorAll("li");if(t.length){t[0].focus()}}_focusFeatureMenuButtonNode(e){this._focusFeatureMenuButton&&(this._focusFeatureMenuButton=!1,e.focus())}_focusActionsMenuButtonNode(e){this._focusActionsMenuButton&&(this._focusActionsMenuButton=!1,e.focus())}_featureMenuViewportScrollTop(){this._featureMenuViewportNode&&(this._featureMenuViewportNode.scrollTop=0)}_toggleScreenLocationEnabled(){const{dockEnabled:e,viewModel:t}=this;if(!t)return;const i=t.active&&!e;t.screenLocationEnabled=i}_shouldDockAtCurrentViewSize(e){const t=e.breakpoint,i=this.viewModel?.view?.ui;if(!i)return!1;const{width:o,height:n}=i;if(isNaN(o)||isNaN(n))return!1;const s=t.hasOwnProperty("width")&&o<=t.width,r=t.hasOwnProperty("height")&&n<=t.height;return s||r}_setDockEnabledForViewSize(e){e.breakpoint&&(this.dockEnabled=this._shouldDockAtCurrentViewSize(e))}_getPageText(e,t){return this.featureNavigationVisible?x(this.messages.pageText,{index:t+1,total:e}):null}_destroySpinner(){const{_spinner:e,view:t}=this;e&&(t&&t.ui&&t.ui.remove(this._spinner,T),e.destroy(),this._spinner=null)}_createSpinner(e){e&&(this._spinner=new v({view:e}),e.ui.add(this._spinner,{key:T,position:"manual"}))}_toggleCollapsed(){this.collapsed=!this.collapsed}_close(){this.close(),this.view&&this.view.focus()}_toggleDockEnabled(){this.dockEnabled=!this.dockEnabled,this._focusDockButton=!0,this.scheduleRender()}_toggleFeatureMenu(){const e=!this.featureMenuOpen;this._featureMenuOpenChanged(e),this.actionsMenuOpen=!1,this.featureMenuOpen=e}_toggleActionsMenu(){const e=!this.actionsMenuOpen;this._actionsMenuOpenChanged(e),this.featureMenuOpen=!1,this.actionsMenuOpen=e}_triggerAction(e){const t=e.currentTarget.dataset.actionUid,{allActions:i}=this.viewModel,o=i.findIndex((e=>e.uid===t)),n=i.getItemAt(o);n&&"toggle"===n.type&&(n.value=!n.value),this.actionsMenuOpen=!1,this.viewModel.triggerAction(o)}_selectFeature(e){const t=e.currentTarget["data-feature-index"];isNaN(t)||(this.viewModel.selectedFeatureIndex=t),this.featureMenuOpen=!1,this._focusFeatureMenuButton=!0,this.scheduleRender()}_next(){this.next()}_previous(){this.previous()}};e([g({readOnly:!0})],R.prototype,"actionsMenuId",null),e([g({readOnly:!0})],R.prototype,"actionsMenuButtonId",null),e([g({readOnly:!0})],R.prototype,"featureMenuId",null),e([g({readOnly:!0})],R.prototype,"titleId",null),e([g({readOnly:!0})],R.prototype,"contentId",null),e([g({readOnly:!0})],R.prototype,"hasContent",null),e([g({readOnly:!0})],R.prototype,"featureNavigationVisible",null),e([g({readOnly:!0})],R.prototype,"collapsible",null),e([g({readOnly:!0})],R.prototype,"featureMenuVisible",null),e([g({readOnly:!0})],R.prototype,"contentCollapsed",null),e([g({readOnly:!0})],R.prototype,"dividedActions",null),e([p("viewModel.actions")],R.prototype,"actions",void 0),e([g()],R.prototype,"actionsMenuOpen",null),e([g()],R.prototype,"alignment",void 0),e([p("viewModel.autoCloseEnabled")],R.prototype,"autoCloseEnabled",void 0),e([p("viewModel.autoOpenEnabled")],R.prototype,"autoOpenEnabled",void 0),e([p("viewModel.defaultPopupTemplateEnabled")],R.prototype,"defaultPopupTemplateEnabled",void 0),e([p("viewModel.content")],R.prototype,"content",void 0),e([g()],R.prototype,"collapsed",void 0),e([g()],R.prototype,"collapseEnabled",void 0),e([g({readOnly:!0})],R.prototype,"currentAlignment",null),e([g({readOnly:!0})],R.prototype,"currentDockPosition",null),e([g()],R.prototype,"dockOptions",null),e([g()],R.prototype,"dockEnabled",void 0),e([p("viewModel.featureCount")],R.prototype,"featureCount",void 0),e([g()],R.prototype,"featureMenuOpen",void 0),e([p("viewModel.features")],R.prototype,"features",void 0),e([p("viewModel.goToOverride")],R.prototype,"goToOverride",void 0),e([g()],R.prototype,"headingLevel",void 0),e([p("viewModel.highlightEnabled")],R.prototype,"highlightEnabled",void 0),e([p("viewModel.location")],R.prototype,"location",void 0),e([g({aliasOf:{source:"messages.widgetLabel",overridable:!0}})],R.prototype,"label",void 0),e([g()],R.prototype,"maxInlineActions",void 0),e([g(),k("esri/widgets/Popup/t9n/Popup")],R.prototype,"messages",void 0),e([g(),k("esri/t9n/common")],R.prototype,"messagesCommon",void 0),e([p("viewModel.promises")],R.prototype,"promises",void 0),e([p("viewModel.selectedFeature")],R.prototype,"selectedFeature",void 0),e([p("viewModel.selectedFeatureIndex")],R.prototype,"selectedFeatureIndex",void 0),e([g({readOnly:!0})],R.prototype,"selectedFeatureWidget",null),e([g()],R.prototype,"spinnerEnabled",void 0),e([p("viewModel.title")],R.prototype,"title",void 0),e([p("viewModel.updateLocationEnabled")],R.prototype,"updateLocationEnabled",void 0),e([p("viewModel.view")],R.prototype,"view",void 0),e([g({type:M}),C(["triggerAction","trigger-action"])],R.prototype,"viewModel",void 0),e([p("viewModel.visible")],R.prototype,"visible",void 0),e([g()],R.prototype,"visibleElements",void 0),e([h("visibleElements")],R.prototype,"castVisibleElements",null),e([y()],R.prototype,"_close",null),e([y()],R.prototype,"_toggleDockEnabled",null),e([y()],R.prototype,"_toggleFeatureMenu",null),e([y()],R.prototype,"_toggleActionsMenu",null),e([y()],R.prototype,"_triggerAction",null),e([y()],R.prototype,"_selectFeature",null),e([y()],R.prototype,"_next",null),e([y()],R.prototype,"_previous",null),R=e([_(S)],R);const j=R;export{j as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../chunks/tslib.es6.js";import"../../intl.js";import t from"../../request.js";import r from"../../core/Collection.js";import{deprecatedProperty as o}from"../../core/deprecate.js";import s from"../../core/Error.js";import i from"../../core/Handles.js";import{clone as
|
|
5
|
+
import{_ as e}from"../../chunks/tslib.es6.js";import"../../intl.js";import t from"../../request.js";import r from"../../core/Collection.js";import{deprecatedProperty as o}from"../../core/deprecate.js";import s from"../../core/Error.js";import i from"../../core/Handles.js";import{clone as a}from"../../core/lang.js";import l from"../../core/Loadable.js";import n from"../../core/Logger.js";import{unwrap as p}from"../../core/maybe.js";import{property as c}from"../../core/accessorSupport/decorators/property.js";import"../../core/accessorSupport/ensureType.js";import{subclass as m}from"../../core/accessorSupport/decorators/subclass.js";import u from"../../portal/Portal.js";import{execute as d}from"../../rest/geoprocessor/execute.js";import"../../rest/geoprocessor/GPOptions.js";import"../../core/has.js";import"../../geometry/support/normalizeUtils.js";import"../../layers/support/Field.js";import"../../layers/support/MapImage.js";import"../../core/urlUtils.js";import"../../rest/support/DataFile.js";import"../../rest/support/FeatureSet.js";import"../../rest/support/LinearUnit.js";import"../../rest/support/ParameterValue.js";import"../../rest/support/RasterData.js";import"../../rest/support/JobInfo.js";import{execute as f}from"../../rest/print.js";import{fromJSON as h}from"../../rest/support/fileFormat.js";import{fromJSON as y}from"../../rest/support/layoutTemplate.js";import v from"../../rest/support/PrintParameters.js";import T from"../../rest/support/PrintTemplate.js";import w from"./CustomTemplate.js";import{formatDate as j,convertDateFormatToIntlOptions as x}from"../../intl/date.js";const g=6e4,E=r.ofType(w);function S(e){e.layoutOptions||(e.layoutOptions={}),e.layoutOptions.customTextElements||(e.layoutOptions.customTextElements=[]);const t="date";if(!e.layoutOptions.customTextElements.find((e=>t in e))){const{customTextElements:t}=e.layoutOptions;t.push({date:j(Date.now(),x("short-date"))})}}let b=class extends l{constructor(e){super(e),this._handles=new i,this.allowedFormats="all",this.allowedLayouts="all",this.defaultTemplates=new E,this.extraParameters=null,this.includeDefaultTemplates=!0,this.effectivePrintServiceUrl=null,this.error=null,this.portal=u.getDefault(),this.printServiceUrl=null,this.templatesInfo=null,this.updateDelay=1e3,this.view=null,this.templateCustomTextElements=null,this.print=this.print.bind(this)}destroy(){this._handles.destroy(),this._handles=null,this.view=null}get effectiveTemplateCustomTextElements(){if(!this._serviceTemplateCustomTextElements)return{};const e=a(this._serviceTemplateCustomTextElements);return this.templateCustomTextElements&&Object.keys(this.templateCustomTextElements).forEach((t=>{const r=e[t];if(r){const e=this.templateCustomTextElements[t];r.forEach((t=>{const[r]=Object.entries(t)[0];e.find((e=>{const[o,s]=Object.entries(e)[0];r===o&&(t[r]=s)}))}))}})),Object.freeze(e)}get state(){return"loading"===this.loadStatus?"initializing":this.error||"failed"===this.loadStatus?"error":this.get("view.ready")&&"loaded"===this.loadStatus?"ready":"disabled"}set scaleEnabled(e){o(n.getLogger(this.declaredClass),"scaleEnabled",{version:"4.22"}),this.set("scaleEnabled",e)}async load(e){return this.addResolvingPromise(this._loadResources(e).catch((e=>this.error=e))),this}async print(e){const{view:t,extraParameters:r,updateDelay:o}=this;if(!t)throw new s("print:view-required","view is not set");S(e);const i=new v({view:t,template:e,extraParameters:r,updateDelay:o});try{return await f(this.effectivePrintServiceUrl,i)}catch(a){throw new s("print:export-error","An error occurred while exporting the web map.",{error:a})}}toPrintTemplate({attributionEnabled:e,author:t,copyright:r,customTextElements:o,dpi:s,forceFeatureAttributes:i,format:a,height:l,layout:n,legendEnabled:p,title:c,scale:m,scaleEnabled:u,width:d}){const f=new T({attributionVisible:e,layoutOptions:{authorText:t||"",copyrightText:r||"",customTextElements:o,titleText:c||""},forceFeatureAttributes:i,format:a,layout:n,scalePreserved:u,outScale:m});return d&&(f.exportOptions.width=d),l&&(f.exportOptions.height=l),s&&(f.exportOptions.dpi=s),p||(f.layoutOptions.legendLayers=[]),f}async _loadResources(e){let t=[];const{printServiceUrl:r}=this;if(!r){if(this.destroyed)return;const{portal:r}=this;try{await r.load(e)}catch(o){throw new s("print:could-not-load-portal","Cannot load print resource information from portal",{url:this.effectivePrintServiceUrl})}const i=r.helperServices?.printTask;i&&(this._set("effectivePrintServiceUrl",i.url),t=(i?.templates??[]).map((e=>w.fromJSON(e))))}t.length>0&&this.defaultTemplates.addMany(t);if(-1===this.effectivePrintServiceUrl.toLowerCase().split("/").indexOf("gpserver"))throw new s("print:invalid-print-service-url","Can't fetch print templates information from provided URL",{url:this.effectivePrintServiceUrl});this._serviceTemplateCustomTextElements=await this._getTemplateToCustomTextElements(e),await this._loadServiceDescription(e)}async _loadServiceDescription(e){const t=await this._getPrintTemplatesFromService(e);this._set("templatesInfo",t)}async _getTemplateToCustomTextElements(e){const t={};try{const r=this.effectivePrintServiceUrl.replace(/(\/GPServer\/).+/i,"$1Get%20Layout%20Templates%20Info"),{results:[o]}=await d(r,null,null,p(e));o.value.forEach((({layoutTemplate:e,layoutOptions:{customTextElements:r}})=>t[y(e)]=r))}catch(r){}return Object.freeze(t)}async _getPrintTemplatesFromService(e){return t(this.effectivePrintServiceUrl,{...e,query:{f:"json"},timeout:g}).then((e=>{const t=e&&e.data,r=t&&t.parameters;let o=null,s=null;r.forEach((e=>{let t,r=e.choiceList&&e.choiceList.slice();r&&r.length&&e.defaultValue&&(t=r.indexOf(e.defaultValue)),t>-1&&(r.splice(t,1),r.unshift(e.defaultValue));const i=(e,t)=>{const r="all"===t?e:e.filter((e=>t.includes(e)));return 0===r.length?e:r};if("Format"===e.name){const t=i(r.map(h),this.allowedFormats),s=h(e.defaultValue);o={defaultValue:t.includes(s)?s:t[0],choiceList:t}}else if("Layout_Template"===e.name){let t,o;r=r.filter((e=>"map_only"!==e.toLowerCase())),r.some(((e,r)=>{const o=e.toLowerCase();return o.includes("letter")&&o.includes("landscape")?(t=r,!0):!(!o.includes("a4")||!o.includes("landscape"))&&(t=r,!1)})),t&&(o=r[t],r.splice(t,1),r.unshift(o));const a=i(r.map(y),this.allowedLayouts),l=y(e.defaultValue);s={defaultValue:a.includes(l)?l:a[0],choiceList:a}}})),this.error=null;return{format:o,layout:s}})).catch((e=>{throw new s("print:unavailable-service-info","Can't fetch templates info from service",{error:e})}))}};e([c()],b.prototype,"_serviceTemplateCustomTextElements",void 0),e([c()],b.prototype,"allowedFormats",void 0),e([c()],b.prototype,"allowedLayouts",void 0),e([c({type:E})],b.prototype,"defaultTemplates",void 0),e([c()],b.prototype,"extraParameters",void 0),e([c()],b.prototype,"includeDefaultTemplates",void 0),e([c({aliasOf:{source:"printServiceUrl",overridable:!0},readOnly:!0})],b.prototype,"effectivePrintServiceUrl",void 0),e([c()],b.prototype,"effectiveTemplateCustomTextElements",null),e([c()],b.prototype,"error",void 0),e([c({type:u})],b.prototype,"portal",void 0),e([c()],b.prototype,"printServiceUrl",void 0),e([c({readOnly:!0})],b.prototype,"state",null),e([c()],b.prototype,"scaleEnabled",null),e([c({readOnly:!0})],b.prototype,"templatesInfo",void 0),e([c()],b.prototype,"updateDelay",void 0),e([c()],b.prototype,"view",void 0),e([c()],b.prototype,"templateCustomTextElements",void 0),b=e([m("esri.widgets.Print.PrintViewModel")],b);const P=b;export{P as default};
|
package/widgets/Print.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../chunks/tslib.es6.js";import t from"../core/Collection.js";import{on as i,eventKey as a}from"../core/events.js";import{clone as n}from"../core/lang.js";import s from"../core/Logger.js";import{addProxy as o,hasSameOrigin as l}from"../core/urlUtils.js";import{init as r}from"../core/watchUtils.js";import{aliasOf as p}from"../core/accessorSupport/decorators/aliasOf.js";import"../core/accessorSupport/ensureType.js";import{property as d}from"../core/accessorSupport/decorators/property.js";import{subclass as c}from"../core/accessorSupport/decorators/subclass.js";import u from"./Widget.js";import h from"./Print/FileLink.js";import m from"./Print/PrintViewModel.js";import _ from"./Print/TemplateOptions.js";import{Heading as b}from"./support/Heading.js";import v from"./support/Popover.js";import{isActivationKey as y,keepMenuItemWithinView as g}from"./support/widgetUtils.js";import{messageBundle as f}from"./support/decorators/messageBundle.js";import{tsx as T}from"./support/jsxFactory.js";const w=t.ofType(h),O="MAP_ONLY";var x;!function(e){e.layout="layoutTab",e.mapOnly="mapOnlyTab"}(x||(x={}));const C={base:"esri-print",headerTitle:"esri-print__header-title",inputText:"esri-print__input-text",layoutTabList:"esri-print__layout-tab-list",layoutTab:"esri-print__layout-tab",layoutSection:"esri-print__layout-section",mapOnlySection:"esri-print__map-only-section",scaleInput:"esri-print__scale-input",templateList:"esri-print__template-list",templateListScroller:"esri-print__template-list-scroller",templateListFooter:"esri-print__template-list-footer",loader:"esri-print__loader",advancedOptionsButton:"esri-print__advanced-options-button",advancedOptionsButtonContainer:"esri-print__advanced-options-button-container",advancedOptionsButtonTitle:"esri-print__advanced-options-button-title",advancedOptionsButtonIconOpened:"esri-print__advanced-options-button-icon--opened",advancedOptionsButtonIconClosed:"esri-print__advanced-options-button-icon--closed",advancedOptionsButtonIconClosed_RTL:"esri-print__advanced-options-button-icon--closed-rtl",refreshButton:"esri-print__refresh-button",swapButton:"esri-print__swap-button",linkButton:"esri-print__link-button",printButton:"esri-print__export-button",templateButton:"esri-print__template-button",formSectionContainer:"esri-print__form-section-container",advancedOptionsSection:"esri-print__advanced-options-section",advancedOptionsContainer:"esri-print__advanced-options-container",authorInfoContainer:"esri-print__author-info-container",copyrightInfoContainer:"esri-print__copyright-info-container",exportedFilesContainer:"esri-print__export-panel-container",exportedFilesTitle:"esri-print__export-title",exportedFile:"esri-print__exported-file",exportedFileLink:"esri-widget__anchor esri-print__exported-file-link",exportedFileLinkTitle:"esri-print__exported-file-link-title",heightContainer:"esri-print__height-container",legendInfoContainer:"esri-print__legend-info-container",printWidgetContainer:"esri-print__container",panelContainer:"esri-print__panel-container",scaleInfoContainer:"esri-print__scale-info-container",scaleInputContainer:"esri-print__scale-input-container",sizeContainer:"esri-print__size-container",widthContainer:"esri-print__width-container",widget:"esri-widget",panel:"esri-widget--panel",widgetButton:"esri-widget--button",button:"esri-button",buttonSecondary:"esri-button--secondary",buttonTertiary:"esri-button--tertiary",select:"esri-select",input:"esri-input",disabled:"esri-disabled",anchorDisabled:"esri-widget__anchor--disabled",buttonDisabled:"esri-button--disabled",panelError:"esri-print__panel--error",exportedFileError:"esri-print__exported-file--error",hide:"esri-hidden",rotate:"esri-rotating",anchor:"esri-widget__anchor",menu:"esri-menu",menuList:"esri-menu__list",menuItem:"esri-menu__list-item",menuItemFocus:"esri-menu__list-item--focus",menuHeader:"esri-menu__header",iconCheckMark:"esri-icon-check-mark",iconDownload:"esri-icon-download",iconLaunchLink:"esri-icon-launch-link-external",iconError:"esri-icon-error",iconPrinter:"esri-icon-printer",iconRightTriangleArrow:"esri-icon-right-triangle-arrow",iconLeftTriangleArrow:"esri-icon-left-triangle-arrow",iconDownArrow:"esri-icon-down-arrow",iconRefresh:"esri-icon-refresh",iconSpinner:"esri-icon-loading-indicator",iconSwap:"esri-icon-swap",iconLinked:"esri-icon-link-horizontal",iconUnlinked:"esri-icon-unlocked-link-horizontal",widgetIcon:"esri-icon-printer"},L="esri.widgets.Print",I=s.getLogger(L),S="User sets an invalid layout, resetting it to the default valid one...",k="User sets an invalid format, resetting it to the default valid one...";function F(e){const t=8.3333,i=11.4583;return{width:Math.round(e*t),height:Math.round(e*i)}}function M(e){return!isNaN(e)&&e>0}function E(e){return(null==e?void 0:e.toUpperCase())===O}let V=class extends u{constructor(e,t){super(e,t),this._activeTabFocusRequested=!1,this._advancedOptionsVisibleForLayout=!1,this._advancedOptionsVisibleForMapOnly=!1,this._awaitingServerResponse=!1,this._exportedFileNameMap={},this._focusedTemplateIndex=0,this._layoutTabSelected=!0,this._pendingExportScroll=!1,this._rootNode=null,this._selectTemplateNode=null,this._templateListPopover=new v({owner:this,placement:"top",offset:[0,-100],anchorElement:()=>this._selectTemplateNode,renderContentFunction:this.renderTemplateList}),this.allowedFormats=null,this.allowedLayouts=null,this.exportedLinks=new w,this.extraParameters=null,this.headingLevel=3,this.iconClass=C.widgetIcon,this.includeDefaultTemplates=null,this.label=void 0,this.portal=null,this.printServiceUrl=null,this.templateCustomTextElements=null,this.templateOptions=new _,this.view=null,this.viewModel=new m,this.handleTemplateListCreation=e=>e.focus(),this.handleTemplateChildBlur=e=>{var t;(null==(t=e.relatedTarget)?void 0:t.closest(`.${C.templateList}`))||this.handleCloseTemplateSelection()},this.handleCloseTemplateSelection=()=>{this._focusedTemplateIndex=0,this._templateListPopover.open=!1,this._selectTemplateNode.focus()},this.handleSelectTemplateClick=()=>{this._focusedTemplateIndex=0,this._templateListPopover.open=!0},this.handleTemplateListClick=e=>{const t=e.target;this.applyTemplate(t["data-template"])},this.handleTemplateListKeyDown=e=>{if(y(e.key))return this.applyTemplate(this.viewModel.defaultTemplates.getItemAt(this._focusedTemplateIndex)),void e.preventDefault();if("ArrowDown"===e.key||"ArrowUp"===e.key){const{defaultTemplates:t}=this.viewModel,i="ArrowDown"===e.key?1:-1,a=(this._focusedTemplateIndex+i)%t.length;this._focusedTemplateIndex=a<0?t.length-1:a;const n=e.currentTarget;g(n.querySelectorAll(`.${C.menuItem}`)[this._focusedTemplateIndex],n.parentElement),e.preventDefault()}"Escape"===e.key&&this.handleCloseTemplateSelection()},this._removeLink=e=>{const t=e.currentTarget["data-item"];t&&"error"===t.state&&this.exportedLinks.remove(t)},this._focusOnTabChange=this._focusOnTabChange.bind(this)}initialize(){this.own([r(this,"viewModel.templatesInfo",(e=>{const{format:t,layout:i}=this.templateOptions;if(e){const a=i===e.layout.defaultValue||E(i)||e.layout.choiceList&&e.layout.choiceList.includes(i),n=t===e.format.defaultValue||e.format.choiceList&&e.format.choiceList.includes(t);a||(i&&I.warn(S),this.templateOptions.layout=e.layout.defaultValue),n||(t&&I.warn(k),this.templateOptions.format=e.format.defaultValue),E(i)&&(this._layoutTabSelected=!1)}})),r(this,"templateOptions.format",(e=>{const{viewModel:{templatesInfo:t}}=this;if(t&&e){let i=!1;t.format.choiceList&&t.format.choiceList.forEach((t=>{t.toUpperCase()===e.toUpperCase()&&(this.templateOptions.format=t,i=!0)})),i||(this.templateOptions.format=t.format.defaultValue,I.warn(k)),this.scheduleRender()}})),r(this,"templateOptions.layout",(e=>{const{viewModel:{templatesInfo:t}}=this;if(t&&e){this._layoutTabSelected=!E(e);let i=!this._layoutTabSelected;i||t.layout.choiceList&&t.layout.choiceList.forEach((t=>{t.toUpperCase()===e.toUpperCase()&&(this.templateOptions.layout=t,i=!0)})),i||(this.templateOptions.layout=t.layout.defaultValue,I.warn(S));const a=this.viewModel.effectiveTemplateCustomTextElements[this.templateOptions.layout];this.templateOptions.customTextElements=a?n(a):null,this.scheduleRender()}})),r(this,"templateOptions.dpi",(e=>{e<=0?this.templateOptions.dpi=1:this.scheduleRender()})),r(this,"viewModel.view.scale",(e=>{const{scale:t,scaleEnabled:i}=this.templateOptions;i&&t||(this.templateOptions.scale=e)}))]);const{height:e,width:t}=this.templateOptions;this.templateOptions.width=t||800,this.templateOptions.height=e||1100;const i=setTimeout((()=>{this._awaitingServerResponse=!0,this.scheduleRender()}),500);this.viewModel.load().then((()=>clearTimeout(i)))}render(){const{attributionEnabled:e,author:t,copyright:i,dpi:a,format:n,height:s,layout:o,legendEnabled:l,scaleEnabled:r,scale:p,width:d}=this.templateOptions,c="ready"!==this.get("viewModel.state"),u=this.renderTitleOrFileNameSection(),{includeDefaultTemplates:h,messages:m,viewModel:_}=this,v=this.get("viewModel.templatesInfo.format.choiceList")||[],y=v.length>0?v.map((e=>T("option",{key:e,selected:e===n,value:e},e.toUpperCase()))):T("option",{key:"format-default-option"},m.formatDefaultOption),g=T("div",{class:C.formSectionContainer},T("label",null,m.fileFormatTitle,T("select",{class:C.select,onchange:this._updateFromOption,"data-target-property":"format",bind:this},y))),f=this.get("viewModel.templatesInfo.layout.choiceList")||[],w=f.length>0?f.map((e=>{const t=e===o,i=m[e]||e;return T("option",{key:e,selected:t,value:e},i)})):T("option",{key:"layout-default-option"},m.layoutDefaultOption),O=T("div",{class:C.formSectionContainer},T("label",null,m.layoutTitle,T("select",{class:C.select,onchange:this._updateFromOption,"data-target-property":"layout",bind:this},w))),L=T("div",{class:C.formSectionContainer},T("label",null,m.dpi,T("input",{type:"number",class:this.classes(C.inputText,C.input),"data-input-name":"dpi",onchange:this._handleDPIChange,value:`${a}`,min:"1",tabIndex:0,bind:this}))),I=T("div",{class:this.classes(C.scaleInfoContainer,C.formSectionContainer)},T("label",null,T("input",{"data-option-name":"scaleEnabled",checked:r,type:"checkbox",tabIndex:0,onchange:this._toggleInputValue,bind:this}),m.scale),T("div",{class:C.scaleInputContainer},T("input",{"aria-label":m.scaleLabel,"aria-valuenow":`${p}`,role:"spinbutton",type:"number",class:this.classes(C.inputText,C.input,C.scaleInput),tabIndex:0,"data-input-name":"scale",onchange:this._updateInputValue,disabled:!r,value:`${p}`,bind:this}),T("button",{type:"button","aria-label":m.reset,class:this.classes(C.widgetButton,C.refreshButton,C.iconRefresh),tabIndex:0,onclick:this._resetToCurrentScale,bind:this}))),S=this._advancedOptionsVisibleForLayout?T("div",{"aria-labelledby":`${this.id}__advancedOptionsForLayout`,class:C.advancedOptionsContainer},I,T("div",{class:this.classes(C.authorInfoContainer,C.formSectionContainer)},T("label",null,m.author,T("input",{type:"text",value:t,class:this.classes(C.inputText,C.input),tabIndex:0,"data-input-name":"author",onchange:this._updateInputValue,bind:this}))),T("div",{class:this.classes(C.copyrightInfoContainer,C.formSectionContainer)},T("label",null,m.copyright,T("input",{type:"text",class:this.classes(C.inputText,C.input),tabIndex:0,value:i,"data-input-name":"copyright",onchange:this._updateInputValue,bind:this}))),L,T("div",{class:this.classes(C.legendInfoContainer,C.formSectionContainer)},T("label",null,T("input",{type:"checkbox","data-option-name":"legendEnabled",tabIndex:0,checked:l,onchange:this._toggleInputValue,bind:this}),m.legend)),this.renderCustomTextElementSection()):null,k=this._advancedOptionsVisibleForMapOnly?T("div",{"aria-labelledby":`${this.id}__advancedOptionsForMapOnly`,class:C.advancedOptionsContainer},I,L,T("div",{class:C.formSectionContainer},T("label",null,T("input",{"data-option-name":"attributionEnabled",type:"checkbox",onchange:this._toggleInputValue,tabIndex:0,checked:e,bind:this}),m.attribution)),this.renderCustomTextElementSection()):null,F=this._layoutTabSelected?T("section",{key:"esri-print__layoutContent",id:`${this.id}__layoutContent`,"aria-labelledby":`${this.id}__layoutTab`,class:C.layoutSection,role:"tabpanel","aria-selected":this._layoutTabSelected.toString()},T("div",{class:C.panelContainer},u,O,this._layoutTabSelected?g:null),T("div",{class:this.classes(C.panelContainer,C.advancedOptionsSection)},T("button",{"aria-label":m.advancedOptions,"aria-expanded":this._advancedOptionsVisibleForLayout?"true":"false",class:C.advancedOptionsButton,onclick:this._showAdvancedOptions,bind:this,type:"button"},T("div",{class:C.advancedOptionsButtonContainer},T("span",{"aria-hidden":"true",class:this.classes(C.iconRightTriangleArrow,C.advancedOptionsButtonIconClosed)}),T("span",{"aria-hidden":"true",class:this.classes(C.iconLeftTriangleArrow,C.advancedOptionsButtonIconClosed_RTL)}),T("span",{"aria-hidden":"true",class:this.classes(C.iconDownArrow,C.advancedOptionsButtonIconOpened)}),T("span",{class:C.advancedOptionsButtonTitle},m.advancedOptions))),S)):T("section",{key:"esri-print__mapOnlyContent",id:`${this.id}__mapOnlyContent`,"aria-selected":(!this._layoutTabSelected).toString(),"aria-labelledby":`${this.id}__mapOnlyTab`,class:C.mapOnlySection,role:"tabpanel"},T("div",{class:C.panelContainer},u,this._layoutTabSelected?null:g,T("div",{class:this.classes(C.sizeContainer,C.formSectionContainer)},T("div",{class:C.widthContainer},T("label",null,m.width,T("input",{type:"number",class:this.classes(C.inputText,C.input),"data-input-name":"width",onchange:this._updateInputValue,value:`${d}`,tabIndex:0,bind:this}))),T("div",{class:C.heightContainer},T("label",null,m.height,T("input",{type:"number",class:this.classes(C.inputText,C.input),"data-input-name":"height",onchange:this._updateInputValue,value:`${s}`,tabIndex:0,bind:this}))),T("button",{type:"button","aria-label":m.swap,class:this.classes(C.widgetButton,C.swapButton,C.iconSwap),onclick:this._switchInput,tabIndex:0,bind:this})),T("div",{class:this.classes(C.panelContainer,C.advancedOptionsSection)},T("button",{"aria-label":m.advancedOptions,"aria-expanded":this._advancedOptionsVisibleForMapOnly?"true":"false",type:"button",class:C.advancedOptionsButton,onclick:this._showAdvancedOptions,bind:this},T("div",{class:C.advancedOptionsButtonContainer},T("span",{"aria-hidden":"true",class:this.classes(C.iconRightTriangleArrow,C.advancedOptionsButtonIconClosed)}),T("span",{"aria-hidden":"true",class:this.classes(C.iconLeftTriangleArrow,C.advancedOptionsButtonIconClosed_RTL)}),T("span",{"aria-hidden":"true",class:this.classes(C.iconDownArrow,C.advancedOptionsButtonIconOpened)}),T("span",{class:C.advancedOptionsButtonTitle},m.advancedOptions))),k))),M=this.exportedLinks.toArray(),E=this._renderExportedLink(M),V={[C.buttonDisabled]:c||!o&&!n},B=null!=this.get("view")&&"2d"!==this.get("view.type"),A=T("div",{class:C.panelError},B?m.sceneViewError:m.serviceError),P=T("div",null,T("ul",{class:C.layoutTabList,role:"tablist",onclick:this._toggleLayoutPanel,onkeydown:this._handleLayoutPanelKeyDown,bind:this},T("li",{afterCreate:this._focusOnTabChange,afterUpdate:this._focusOnTabChange,id:`${this.id}__layoutTab`,"data-tab-id":x.layout,class:C.layoutTab,role:"tab",tabIndex:0,"aria-selected":`${this._layoutTabSelected}`},m.layoutTab),T("li",{afterCreate:this._focusOnTabChange,afterUpdate:this._focusOnTabChange,id:`${this.id}__mapOnlyTab`,"data-tab-id":x.mapOnly,class:C.layoutTab,role:"tab",tabIndex:0,"aria-selected":`${!this._layoutTabSelected}`},m.mapOnlyTab)),F,T("button",{"aria-label":m.exportDescription,type:"button",class:this.classes(C.printButton,C.button,V),disabled:c,tabIndex:0,onclick:this._handlePrintMap,bind:this},m.export),h&&_.defaultTemplates.length>0?this.renderTemplateSectionTrigger():null,T("div",{class:C.exportedFilesContainer,afterUpdate:this._scrollExportIntoView,bind:this},T(b,{class:C.exportedFilesTitle,level:this.headingLevel},m.exportText),M.length>0?null:T("div",null,T("div",null,m.exportHint)),E)),D=T("div",{class:C.printWidgetContainer},T("header",{class:C.headerTitle},m.export),this.error||B||!this.view?A:P),N="initializing"===this.get("viewModel.state")?this._renderLoader():D;return T("div",{afterCreate:this._handleRootAfterCreate,bind:this,class:this.classes(C.base,C.widget,C.panel)},N)}renderTemplateSectionTrigger(){const{messages:e,_templateListPopover:t}=this,i=t.open;return T("button",{afterCreate:e=>this._selectTemplateNode=e,"aria-controls":i?`${this.id}__template-selection`:"","aria-label":e.selectTemplateDescription,"aria-pressed":i.toString(),class:this.classes(C.button,C.buttonTertiary,C.templateButton),onclick:this.handleSelectTemplateClick,title:e.selectTemplateDescription,type:"button"},e.selectTemplate)}renderCustomTextElementSection(){const{templateOptions:{customTextElements:e}}=this;return e?T("div",{class:C.formSectionContainer,key:"custom-text-elements"},e.map((e=>{const[t,i]=Object.entries(e)[0];return"date"===t?null:T("label",{key:t},t,T("input",{bind:this,class:this.classes(C.inputText,C.input),"data-input-custom":!0,"data-input-name":t,onchange:this._updateInputValue,type:"text",value:i}))}))):null}renderTemplateList(){const{messages:e,messagesCommon:t,viewModel:i}=this,{defaultTemplates:a}=i,n=e.selectTemplateDescription,s=`${this.id}__template-selection`;return T("div",{class:this.classes(C.templateList,C.widget,C.panel),id:s},T(b,{class:C.menuHeader,level:this.headingLevel},e.selectTemplate),T("div",{class:C.templateListScroller},T("ul",{afterCreate:this.handleTemplateListCreation,"aria-activedescendant":`${this.id}__template-item--${this._focusedTemplateIndex}`,"aria-label":n,class:C.menuList,key:"templates",onblur:this.handleTemplateChildBlur,onclick:this.handleTemplateListClick,onkeydown:this.handleTemplateListKeyDown,role:"listbox",tabIndex:0,title:n},a.toArray().map(((t,i)=>{const{description:a}=t,n=i===this._focusedTemplateIndex,s=t.label;return T("li",{"aria-label":a,class:this.classes(C.menuItem,{[C.menuItemFocus]:n}),"data-template":t,id:`${this.id}__template-item--${i}`,key:s,title:a},E(s)?e.mapOnlyTab:s)})))),T("div",{class:C.templateListFooter},T("button",{type:"button",class:this.classes(C.button,C.buttonSecondary),onblur:this.handleTemplateChildBlur,onclick:this.handleCloseTemplateSelection},t.done)))}applyTemplate(e){var t;const{format:i,layout:a,layoutOptions:n}=e,{templateOptions:s}=this;this._templateListPopover.open=!1,this._toggleTab("map-only"===a?x.mapOnly:x.layout,!1),i&&(s.format=i),a&&(s.layout=a),this._focusedTemplateIndex=null,s.legendEnabled=null!=(t=null==n?void 0:n.legend)?t:s.legendEnabled,this.handleCloseTemplateSelection()}renderTitleOrFileNameSection(){const{templateOptions:e,messages:t}=this;let i,a,n,s;return this._layoutTabSelected?(i=t.title,a=t.titlePlaceHolder,n=e.title,s="title"):(i=t.fileName,a=t.fileNamePlaceHolder,n=e.fileName,s="fileName"),T("div",{class:C.formSectionContainer,key:s},T("label",null,i,T("input",{type:"text",tabIndex:0,placeholder:a,class:this.classes(C.inputText,C.input),value:n,"data-input-name":s,onchange:this._updateInputValue,bind:this})))}_handleRootAfterCreate(e){this._rootNode=e,this.own(i(e,"scroll",(()=>{this._templateListPopover.open&&this.handleCloseTemplateSelection()})))}_focusOnTabChange(e){if(!this._activeTabFocusRequested)return;const t=e.getAttribute("data-tab-id");("layoutTab"===t&&this._layoutTabSelected||"mapOnlyTab"===t&&!this._layoutTabSelected)&&(e.focus(),this._activeTabFocusRequested=!1)}_renderLoader(){const e={[C.loader]:this._awaitingServerResponse};return T("div",{class:this.classes(e),key:"loader"})}_createFileLink(e,t){const i=t||this.messages.untitled,a=e.format.toLowerCase(),n=a.includes("png")?"png":a,s=i+n;return void 0!==this._exportedFileNameMap[s]?this._exportedFileNameMap[s]++:this._exportedFileNameMap[s]=0,new h({name:i,extension:n,count:this._exportedFileNameMap[s]})}_resetToCurrentScale(){this.templateOptions.scale=this.viewModel.view.scale}_updateCustomTextElementValue(e,t,i){e.find((e=>{const[i]=Object.entries(e)[0];return i===t}))[t]=i}_updateInputValue(e){const t=e.target,i=t.getAttribute("data-input-name"),a=!!t["data-input-custom"],{templateOptions:n}=this;if(a)return void this._updateCustomTextElementValue(n.customTextElements,i,t.value);let s;if("number"===t.type){if(!M(t.valueAsNumber)){const e=n[i];return void(t.value=`${e}`)}s=t.valueAsNumber}else s=t.value;n[i]=s}_handleDPIChange(e){this._updateInputValue(e);const t=e.currentTarget.valueAsNumber,{height:i,width:a}=F(t),{templateOptions:n}=this;n.height=i,n.width=a}_handlePrintMap(){this._pendingExportScroll=!0;const{templateOptions:e}=this,t=this.viewModel.toPrintTemplate(e),i=this._layoutTabSelected?t.layoutOptions.titleText:e.fileName,a=this._createFileLink(t,i);this.exportedLinks.add(a),this.emit("submit",{link:a}),this.viewModel.print(t).then((e=>{a.set({url:e&&e.url,state:"ready"})})).catch((e=>{a.set({error:e,state:"error"})})).then((()=>{this.emit("complete",{link:a}),this.scheduleRender()}))}_updateFromOption(e){const t=e.target,i=t.selectedOptions?t.selectedOptions.item(0).value:t.options[t.selectedIndex].value,a=t.getAttribute("data-target-property");this.templateOptions[a]=i}_switchInput(){[this.templateOptions.width,this.templateOptions.height]=[this.templateOptions.height,this.templateOptions.width]}_showAdvancedOptions(){this._layoutTabSelected?this._advancedOptionsVisibleForLayout=!this._advancedOptionsVisibleForLayout:this._advancedOptionsVisibleForMapOnly=!this._advancedOptionsVisibleForMapOnly}_scrollExportIntoView(){if(this._pendingExportScroll){this._pendingExportScroll=!1;const{_rootNode:e,_rootNode:{clientHeight:t,scrollHeight:i}}=this,a=i-t;a>0&&(e.scrollTop=a)}}_toggleInputValue(e){const t=e.target,i=t.getAttribute("data-option-name");this.templateOptions[i]=t.checked,"scaleEnabled"===i&&(this.templateOptions[i]||this._resetToCurrentScale())}_renderExportedLink(e){const t=this.messages;return e.map((e=>{const{error:i,url:a,formattedName:n,state:s}=e,r="error"===s,p="pending"===s,d="ready"===s,c={[C.anchorDisabled]:p||r};let u=a||null;u&&(u=o(u));const h=l(a,location.href),m={[C.iconSpinner]:p,[C.rotate]:p,[C.iconDownload]:h&&d,[C.iconLaunchLink]:!h&&d,[C.iconError]:r,[C.exportedFileError]:r},_={[C.exportedFileError]:r};let b;b=p?t.pending:d?t.ready:t.errorMessage;const v=r?"print-task:cim-symbol-unsupported"===i.name?t.exportWebMapCIMError:t.exportWebMapError:"";return T("div",{"aria-label":b,class:C.exportedFile,"data-item":e,key:n,onclick:this._removeLink,title:v},T("a",{"aria-label":`${n}. ${t.linkReady}`,download:n,href:u,rel:"noreferrer",tabIndex:0,target:"_blank",class:this.classes(C.exportedFileLink,c)},T("span",{class:this.classes(m)}),T("span",{class:this.classes(C.exportedFileLinkTitle,_)},n)))}))}_toggleLayoutPanel(e){const t=e.target;this._toggleTab(t.getAttribute("data-tab-id"))}_toggleTab(e,t=!0){if(this._layoutTabSelected=e===x.layout,this._layoutTabSelected){const e=this.get("viewModel.templatesInfo.layout.choiceList");this.templateOptions.layout=e&&e[0]}else this.templateOptions.layout=O;t&&(this._activeTabFocusRequested=!0)}_handleLayoutPanelKeyDown(e){const t=a(e),i=e.target.getAttribute("data-tab-id");if(y(t))return this._toggleTab(i),e.preventDefault(),void e.stopPropagation();"ArrowLeft"!==t&&"ArrowRight"!==t||(this._toggleTab(i===x.layout?x.mapOnly:x.layout),e.preventDefault(),e.stopPropagation())}};e([p("viewModel.allowedFormats")],V.prototype,"allowedFormats",void 0),e([p("viewModel.allowedLayouts")],V.prototype,"allowedLayouts",void 0),e([p("viewModel.error")],V.prototype,"error",void 0),e([d({type:w})],V.prototype,"exportedLinks",void 0),e([p("viewModel.extraParameters")],V.prototype,"extraParameters",void 0),e([d()],V.prototype,"headingLevel",void 0),e([d()],V.prototype,"iconClass",void 0),e([p("viewModel.includeDefaultTemplates")],V.prototype,"includeDefaultTemplates",void 0),e([d({aliasOf:{source:"messages.widgetLabel",overridable:!0}})],V.prototype,"label",void 0),e([d(),f("esri/widgets/Print/t9n/Print")],V.prototype,"messages",void 0),e([d(),f("esri/t9n/common")],V.prototype,"messagesCommon",void 0),e([p("viewModel.portal")],V.prototype,"portal",void 0),e([p("viewModel.printServiceUrl")],V.prototype,"printServiceUrl",void 0),e([p("viewModel.templateCustomTextElements")],V.prototype,"templateCustomTextElements",void 0),e([d({type:_})],V.prototype,"templateOptions",void 0),e([p("viewModel.view")],V.prototype,"view",void 0),e([d({type:m})],V.prototype,"viewModel",void 0),V=e([c("esri.widgets.Print")],V);const B=V;export{B as default};
|
|
5
|
+
import{_ as e}from"../chunks/tslib.es6.js";import t from"../core/Collection.js";import{on as i,eventKey as a}from"../core/events.js";import{clone as n}from"../core/lang.js";import s from"../core/Logger.js";import{addProxy as o,hasSameOrigin as l}from"../core/urlUtils.js";import{init as r}from"../core/watchUtils.js";import{aliasOf as p}from"../core/accessorSupport/decorators/aliasOf.js";import"../core/accessorSupport/ensureType.js";import{property as d}from"../core/accessorSupport/decorators/property.js";import{subclass as c}from"../core/accessorSupport/decorators/subclass.js";import u from"./Widget.js";import h from"./Print/FileLink.js";import m from"./Print/PrintViewModel.js";import _ from"./Print/TemplateOptions.js";import{Heading as b}from"./support/Heading.js";import v from"./support/Popover.js";import{isActivationKey as y,keepMenuItemWithinView as g}from"./support/widgetUtils.js";import{messageBundle as f}from"./support/decorators/messageBundle.js";import{tsx as T}from"./support/jsxFactory.js";const w=t.ofType(h),O="MAP_ONLY";var x;!function(e){e.layout="layoutTab",e.mapOnly="mapOnlyTab"}(x||(x={}));const C={base:"esri-print",headerTitle:"esri-print__header-title",inputText:"esri-print__input-text",layoutTabList:"esri-print__layout-tab-list",layoutTab:"esri-print__layout-tab",layoutSection:"esri-print__layout-section",mapOnlySection:"esri-print__map-only-section",scaleInput:"esri-print__scale-input",templateList:"esri-print__template-list",templateListScroller:"esri-print__template-list-scroller",templateListFooter:"esri-print__template-list-footer",loader:"esri-print__loader",advancedOptionsButton:"esri-print__advanced-options-button",advancedOptionsButtonContainer:"esri-print__advanced-options-button-container",advancedOptionsButtonTitle:"esri-print__advanced-options-button-title",advancedOptionsButtonIconOpened:"esri-print__advanced-options-button-icon--opened",advancedOptionsButtonIconClosed:"esri-print__advanced-options-button-icon--closed",advancedOptionsButtonIconClosed_RTL:"esri-print__advanced-options-button-icon--closed-rtl",refreshButton:"esri-print__refresh-button",swapButton:"esri-print__swap-button",linkButton:"esri-print__link-button",printButton:"esri-print__export-button",templateButton:"esri-print__template-button",formSectionContainer:"esri-print__form-section-container",advancedOptionsSection:"esri-print__advanced-options-section",advancedOptionsContainer:"esri-print__advanced-options-container",authorInfoContainer:"esri-print__author-info-container",copyrightInfoContainer:"esri-print__copyright-info-container",exportedFilesContainer:"esri-print__export-panel-container",exportedFilesTitle:"esri-print__export-title",exportedFile:"esri-print__exported-file",exportedFileLink:"esri-widget__anchor esri-print__exported-file-link",exportedFileLinkTitle:"esri-print__exported-file-link-title",heightContainer:"esri-print__height-container",legendInfoContainer:"esri-print__legend-info-container",printWidgetContainer:"esri-print__container",panelContainer:"esri-print__panel-container",scaleInfoContainer:"esri-print__scale-info-container",scaleInputContainer:"esri-print__scale-input-container",sizeContainer:"esri-print__size-container",widthContainer:"esri-print__width-container",widget:"esri-widget",panel:"esri-widget--panel",widgetButton:"esri-widget--button",button:"esri-button",buttonSecondary:"esri-button--secondary",buttonTertiary:"esri-button--tertiary",select:"esri-select",input:"esri-input",disabled:"esri-disabled",anchorDisabled:"esri-widget__anchor--disabled",buttonDisabled:"esri-button--disabled",panelError:"esri-print__panel--error",exportedFileError:"esri-print__exported-file--error",hide:"esri-hidden",rotate:"esri-rotating",anchor:"esri-widget__anchor",menu:"esri-menu",menuList:"esri-menu__list",menuItem:"esri-menu__list-item",menuItemFocus:"esri-menu__list-item--focus",menuHeader:"esri-menu__header",iconCheckMark:"esri-icon-check-mark",iconDownload:"esri-icon-download",iconLaunchLink:"esri-icon-launch-link-external",iconError:"esri-icon-error",iconPrinter:"esri-icon-printer",iconRightTriangleArrow:"esri-icon-right-triangle-arrow",iconLeftTriangleArrow:"esri-icon-left-triangle-arrow",iconDownArrow:"esri-icon-down-arrow",iconRefresh:"esri-icon-refresh",iconSpinner:"esri-icon-loading-indicator",iconSwap:"esri-icon-swap",iconLinked:"esri-icon-link-horizontal",iconUnlinked:"esri-icon-unlocked-link-horizontal",widgetIcon:"esri-icon-printer"},L="esri.widgets.Print",I=s.getLogger(L),S="User sets an invalid layout, resetting it to the default valid one...",k="User sets an invalid format, resetting it to the default valid one...";function F(e){const t=8.3333,i=11.4583;return{width:Math.round(e*t),height:Math.round(e*i)}}function M(e){return!isNaN(e)&&e>0}function E(e){return e?.toUpperCase()===O}let V=class extends u{constructor(e,t){super(e,t),this._activeTabFocusRequested=!1,this._advancedOptionsVisibleForLayout=!1,this._advancedOptionsVisibleForMapOnly=!1,this._awaitingServerResponse=!1,this._exportedFileNameMap={},this._focusedTemplateIndex=0,this._layoutTabSelected=!0,this._pendingExportScroll=!1,this._rootNode=null,this._selectTemplateNode=null,this._templateListPopover=new v({owner:this,placement:"top",offset:[0,-100],anchorElement:()=>this._selectTemplateNode,renderContentFunction:this.renderTemplateList}),this.allowedFormats=null,this.allowedLayouts=null,this.exportedLinks=new w,this.extraParameters=null,this.headingLevel=3,this.iconClass=C.widgetIcon,this.includeDefaultTemplates=null,this.label=void 0,this.portal=null,this.printServiceUrl=null,this.templateCustomTextElements=null,this.templateOptions=new _,this.view=null,this.viewModel=new m,this.handleTemplateListCreation=e=>e.focus(),this.handleTemplateChildBlur=e=>{const t=e.relatedTarget?.closest(`.${C.templateList}`);t||this.handleCloseTemplateSelection()},this.handleCloseTemplateSelection=()=>{this._focusedTemplateIndex=0,this._templateListPopover.open=!1,this._selectTemplateNode.focus()},this.handleSelectTemplateClick=()=>{this._focusedTemplateIndex=0,this._templateListPopover.open=!0},this.handleTemplateListClick=e=>{const t=e.target;this.applyTemplate(t["data-template"])},this.handleTemplateListKeyDown=e=>{if(y(e.key))return this.applyTemplate(this.viewModel.defaultTemplates.getItemAt(this._focusedTemplateIndex)),void e.preventDefault();if("ArrowDown"===e.key||"ArrowUp"===e.key){const{defaultTemplates:t}=this.viewModel,i="ArrowDown"===e.key?1:-1,a=(this._focusedTemplateIndex+i)%t.length;this._focusedTemplateIndex=a<0?t.length-1:a;const n=e.currentTarget;g(n.querySelectorAll(`.${C.menuItem}`)[this._focusedTemplateIndex],n.parentElement),e.preventDefault()}"Escape"===e.key&&this.handleCloseTemplateSelection()},this._removeLink=e=>{const t=e.currentTarget["data-item"];t&&"error"===t.state&&this.exportedLinks.remove(t)},this._focusOnTabChange=this._focusOnTabChange.bind(this)}initialize(){this.own([r(this,"viewModel.templatesInfo",(e=>{const{format:t,layout:i}=this.templateOptions;if(e){const a=i===e.layout.defaultValue||E(i)||e.layout.choiceList&&e.layout.choiceList.includes(i),n=t===e.format.defaultValue||e.format.choiceList&&e.format.choiceList.includes(t);a||(i&&I.warn(S),this.templateOptions.layout=e.layout.defaultValue),n||(t&&I.warn(k),this.templateOptions.format=e.format.defaultValue),E(i)&&(this._layoutTabSelected=!1)}})),r(this,"templateOptions.format",(e=>{const{viewModel:{templatesInfo:t}}=this;if(t&&e){let i=!1;t.format.choiceList&&t.format.choiceList.forEach((t=>{t.toUpperCase()===e.toUpperCase()&&(this.templateOptions.format=t,i=!0)})),i||(this.templateOptions.format=t.format.defaultValue,I.warn(k)),this.scheduleRender()}})),r(this,"templateOptions.layout",(e=>{const{viewModel:{templatesInfo:t}}=this;if(t&&e){this._layoutTabSelected=!E(e);let i=!this._layoutTabSelected;i||t.layout.choiceList&&t.layout.choiceList.forEach((t=>{t.toUpperCase()===e.toUpperCase()&&(this.templateOptions.layout=t,i=!0)})),i||(this.templateOptions.layout=t.layout.defaultValue,I.warn(S));const a=this.viewModel.effectiveTemplateCustomTextElements[this.templateOptions.layout];this.templateOptions.customTextElements=a?n(a):null,this.scheduleRender()}})),r(this,"templateOptions.dpi",(e=>{e<=0?this.templateOptions.dpi=1:this.scheduleRender()})),r(this,"viewModel.view.scale",(e=>{const{scale:t,scaleEnabled:i}=this.templateOptions;i&&t||(this.templateOptions.scale=e)}))]);const{height:e,width:t}=this.templateOptions;this.templateOptions.width=t||800,this.templateOptions.height=e||1100;const i=setTimeout((()=>{this._awaitingServerResponse=!0,this.scheduleRender()}),500);this.viewModel.load().then((()=>clearTimeout(i)))}render(){const{attributionEnabled:e,author:t,copyright:i,dpi:a,format:n,height:s,layout:o,legendEnabled:l,scaleEnabled:r,scale:p,width:d}=this.templateOptions,c="ready"!==this.get("viewModel.state"),u=this.renderTitleOrFileNameSection(),{includeDefaultTemplates:h,messages:m,viewModel:_}=this,v=this.get("viewModel.templatesInfo.format.choiceList")||[],y=v.length>0?v.map((e=>T("option",{key:e,selected:e===n,value:e},e.toUpperCase()))):T("option",{key:"format-default-option"},m.formatDefaultOption),g=T("div",{class:C.formSectionContainer},T("label",null,m.fileFormatTitle,T("select",{class:C.select,onchange:this._updateFromOption,"data-target-property":"format",bind:this},y))),f=this.get("viewModel.templatesInfo.layout.choiceList")||[],w=f.length>0?f.map((e=>{const t=e===o,i=m[e]||e;return T("option",{key:e,selected:t,value:e},i)})):T("option",{key:"layout-default-option"},m.layoutDefaultOption),O=T("div",{class:C.formSectionContainer},T("label",null,m.layoutTitle,T("select",{class:C.select,onchange:this._updateFromOption,"data-target-property":"layout",bind:this},w))),L=T("div",{class:C.formSectionContainer},T("label",null,m.dpi,T("input",{type:"number",class:this.classes(C.inputText,C.input),"data-input-name":"dpi",onchange:this._handleDPIChange,value:`${a}`,min:"1",tabIndex:0,bind:this}))),I=T("div",{class:this.classes(C.scaleInfoContainer,C.formSectionContainer)},T("label",null,T("input",{"data-option-name":"scaleEnabled",checked:r,type:"checkbox",tabIndex:0,onchange:this._toggleInputValue,bind:this}),m.scale),T("div",{class:C.scaleInputContainer},T("input",{"aria-label":m.scaleLabel,"aria-valuenow":`${p}`,role:"spinbutton",type:"number",class:this.classes(C.inputText,C.input,C.scaleInput),tabIndex:0,"data-input-name":"scale",onchange:this._updateInputValue,disabled:!r,value:`${p}`,bind:this}),T("button",{type:"button","aria-label":m.reset,class:this.classes(C.widgetButton,C.refreshButton,C.iconRefresh),tabIndex:0,onclick:this._resetToCurrentScale,bind:this}))),S=this._advancedOptionsVisibleForLayout?T("div",{"aria-labelledby":`${this.id}__advancedOptionsForLayout`,class:C.advancedOptionsContainer},I,T("div",{class:this.classes(C.authorInfoContainer,C.formSectionContainer)},T("label",null,m.author,T("input",{type:"text",value:t,class:this.classes(C.inputText,C.input),tabIndex:0,"data-input-name":"author",onchange:this._updateInputValue,bind:this}))),T("div",{class:this.classes(C.copyrightInfoContainer,C.formSectionContainer)},T("label",null,m.copyright,T("input",{type:"text",class:this.classes(C.inputText,C.input),tabIndex:0,value:i,"data-input-name":"copyright",onchange:this._updateInputValue,bind:this}))),L,T("div",{class:this.classes(C.legendInfoContainer,C.formSectionContainer)},T("label",null,T("input",{type:"checkbox","data-option-name":"legendEnabled",tabIndex:0,checked:l,onchange:this._toggleInputValue,bind:this}),m.legend)),this.renderCustomTextElementSection()):null,k=this._advancedOptionsVisibleForMapOnly?T("div",{"aria-labelledby":`${this.id}__advancedOptionsForMapOnly`,class:C.advancedOptionsContainer},I,L,T("div",{class:C.formSectionContainer},T("label",null,T("input",{"data-option-name":"attributionEnabled",type:"checkbox",onchange:this._toggleInputValue,tabIndex:0,checked:e,bind:this}),m.attribution)),this.renderCustomTextElementSection()):null,F=this._layoutTabSelected?T("section",{key:"esri-print__layoutContent",id:`${this.id}__layoutContent`,"aria-labelledby":`${this.id}__layoutTab`,class:C.layoutSection,role:"tabpanel","aria-selected":this._layoutTabSelected.toString()},T("div",{class:C.panelContainer},u,O,this._layoutTabSelected?g:null),T("div",{class:this.classes(C.panelContainer,C.advancedOptionsSection)},T("button",{"aria-label":m.advancedOptions,"aria-expanded":this._advancedOptionsVisibleForLayout?"true":"false",class:C.advancedOptionsButton,onclick:this._showAdvancedOptions,bind:this,type:"button"},T("div",{class:C.advancedOptionsButtonContainer},T("span",{"aria-hidden":"true",class:this.classes(C.iconRightTriangleArrow,C.advancedOptionsButtonIconClosed)}),T("span",{"aria-hidden":"true",class:this.classes(C.iconLeftTriangleArrow,C.advancedOptionsButtonIconClosed_RTL)}),T("span",{"aria-hidden":"true",class:this.classes(C.iconDownArrow,C.advancedOptionsButtonIconOpened)}),T("span",{class:C.advancedOptionsButtonTitle},m.advancedOptions))),S)):T("section",{key:"esri-print__mapOnlyContent",id:`${this.id}__mapOnlyContent`,"aria-selected":(!this._layoutTabSelected).toString(),"aria-labelledby":`${this.id}__mapOnlyTab`,class:C.mapOnlySection,role:"tabpanel"},T("div",{class:C.panelContainer},u,this._layoutTabSelected?null:g,T("div",{class:this.classes(C.sizeContainer,C.formSectionContainer)},T("div",{class:C.widthContainer},T("label",null,m.width,T("input",{type:"number",class:this.classes(C.inputText,C.input),"data-input-name":"width",onchange:this._updateInputValue,value:`${d}`,tabIndex:0,bind:this}))),T("div",{class:C.heightContainer},T("label",null,m.height,T("input",{type:"number",class:this.classes(C.inputText,C.input),"data-input-name":"height",onchange:this._updateInputValue,value:`${s}`,tabIndex:0,bind:this}))),T("button",{type:"button","aria-label":m.swap,class:this.classes(C.widgetButton,C.swapButton,C.iconSwap),onclick:this._switchInput,tabIndex:0,bind:this})),T("div",{class:this.classes(C.panelContainer,C.advancedOptionsSection)},T("button",{"aria-label":m.advancedOptions,"aria-expanded":this._advancedOptionsVisibleForMapOnly?"true":"false",type:"button",class:C.advancedOptionsButton,onclick:this._showAdvancedOptions,bind:this},T("div",{class:C.advancedOptionsButtonContainer},T("span",{"aria-hidden":"true",class:this.classes(C.iconRightTriangleArrow,C.advancedOptionsButtonIconClosed)}),T("span",{"aria-hidden":"true",class:this.classes(C.iconLeftTriangleArrow,C.advancedOptionsButtonIconClosed_RTL)}),T("span",{"aria-hidden":"true",class:this.classes(C.iconDownArrow,C.advancedOptionsButtonIconOpened)}),T("span",{class:C.advancedOptionsButtonTitle},m.advancedOptions))),k))),M=this.exportedLinks.toArray(),E=this._renderExportedLink(M),V={[C.buttonDisabled]:c||!o&&!n},B=null!=this.get("view")&&"2d"!==this.get("view.type"),A=T("div",{class:C.panelError},B?m.sceneViewError:m.serviceError),P=T("div",null,T("ul",{class:C.layoutTabList,role:"tablist",onclick:this._toggleLayoutPanel,onkeydown:this._handleLayoutPanelKeyDown,bind:this},T("li",{afterCreate:this._focusOnTabChange,afterUpdate:this._focusOnTabChange,id:`${this.id}__layoutTab`,"data-tab-id":x.layout,class:C.layoutTab,role:"tab",tabIndex:0,"aria-selected":`${this._layoutTabSelected}`},m.layoutTab),T("li",{afterCreate:this._focusOnTabChange,afterUpdate:this._focusOnTabChange,id:`${this.id}__mapOnlyTab`,"data-tab-id":x.mapOnly,class:C.layoutTab,role:"tab",tabIndex:0,"aria-selected":`${!this._layoutTabSelected}`},m.mapOnlyTab)),F,T("button",{"aria-label":m.exportDescription,type:"button",class:this.classes(C.printButton,C.button,V),disabled:c,tabIndex:0,onclick:this._handlePrintMap,bind:this},m.export),h&&_.defaultTemplates.length>0?this.renderTemplateSectionTrigger():null,T("div",{class:C.exportedFilesContainer,afterUpdate:this._scrollExportIntoView,bind:this},T(b,{class:C.exportedFilesTitle,level:this.headingLevel},m.exportText),M.length>0?null:T("div",null,T("div",null,m.exportHint)),E)),D=T("div",{class:C.printWidgetContainer},T("header",{class:C.headerTitle},m.export),this.error||B||!this.view?A:P),N="initializing"===this.get("viewModel.state")?this._renderLoader():D;return T("div",{afterCreate:this._handleRootAfterCreate,bind:this,class:this.classes(C.base,C.widget,C.panel)},N)}renderTemplateSectionTrigger(){const{messages:e,_templateListPopover:t}=this,i=t.open;return T("button",{afterCreate:e=>this._selectTemplateNode=e,"aria-controls":i?`${this.id}__template-selection`:"","aria-label":e.selectTemplateDescription,"aria-pressed":i.toString(),class:this.classes(C.button,C.buttonTertiary,C.templateButton),onclick:this.handleSelectTemplateClick,title:e.selectTemplateDescription,type:"button"},e.selectTemplate)}renderCustomTextElementSection(){const{templateOptions:{customTextElements:e}}=this;return e?T("div",{class:C.formSectionContainer,key:"custom-text-elements"},e.map((e=>{const[t,i]=Object.entries(e)[0];return"date"===t?null:T("label",{key:t},t,T("input",{bind:this,class:this.classes(C.inputText,C.input),"data-input-custom":!0,"data-input-name":t,onchange:this._updateInputValue,type:"text",value:i}))}))):null}renderTemplateList(){const{messages:e,messagesCommon:t,viewModel:i}=this,{defaultTemplates:a}=i,n=e.selectTemplateDescription,s=`${this.id}__template-selection`;return T("div",{class:this.classes(C.templateList,C.widget,C.panel),id:s},T(b,{class:C.menuHeader,level:this.headingLevel},e.selectTemplate),T("div",{class:C.templateListScroller},T("ul",{afterCreate:this.handleTemplateListCreation,"aria-activedescendant":`${this.id}__template-item--${this._focusedTemplateIndex}`,"aria-label":n,class:C.menuList,key:"templates",onblur:this.handleTemplateChildBlur,onclick:this.handleTemplateListClick,onkeydown:this.handleTemplateListKeyDown,role:"listbox",tabIndex:0,title:n},a.toArray().map(((t,i)=>{const{description:a}=t,n=i===this._focusedTemplateIndex,s=t.label;return T("li",{"aria-label":a,class:this.classes(C.menuItem,{[C.menuItemFocus]:n}),"data-template":t,id:`${this.id}__template-item--${i}`,key:s,title:a},E(s)?e.mapOnlyTab:s)})))),T("div",{class:C.templateListFooter},T("button",{type:"button",class:this.classes(C.button,C.buttonSecondary),onblur:this.handleTemplateChildBlur,onclick:this.handleCloseTemplateSelection},t.done)))}applyTemplate(e){const{format:t,layout:i,layoutOptions:a}=e,{templateOptions:n}=this;this._templateListPopover.open=!1,this._toggleTab("map-only"===i?x.mapOnly:x.layout,!1),t&&(n.format=t),i&&(n.layout=i),this._focusedTemplateIndex=null,n.legendEnabled=a?.legend??n.legendEnabled,this.handleCloseTemplateSelection()}renderTitleOrFileNameSection(){const{templateOptions:e,messages:t}=this;let i,a,n,s;return this._layoutTabSelected?(i=t.title,a=t.titlePlaceHolder,n=e.title,s="title"):(i=t.fileName,a=t.fileNamePlaceHolder,n=e.fileName,s="fileName"),T("div",{class:C.formSectionContainer,key:s},T("label",null,i,T("input",{type:"text",tabIndex:0,placeholder:a,class:this.classes(C.inputText,C.input),value:n,"data-input-name":s,onchange:this._updateInputValue,bind:this})))}_handleRootAfterCreate(e){this._rootNode=e,this.own(i(e,"scroll",(()=>{this._templateListPopover.open&&this.handleCloseTemplateSelection()})))}_focusOnTabChange(e){if(!this._activeTabFocusRequested)return;const t=e.getAttribute("data-tab-id");("layoutTab"===t&&this._layoutTabSelected||"mapOnlyTab"===t&&!this._layoutTabSelected)&&(e.focus(),this._activeTabFocusRequested=!1)}_renderLoader(){const e={[C.loader]:this._awaitingServerResponse};return T("div",{class:this.classes(e),key:"loader"})}_createFileLink(e,t){const i=t||this.messages.untitled,a=e.format.toLowerCase(),n=a.includes("png")?"png":a,s=i+n;return void 0!==this._exportedFileNameMap[s]?this._exportedFileNameMap[s]++:this._exportedFileNameMap[s]=0,new h({name:i,extension:n,count:this._exportedFileNameMap[s]})}_resetToCurrentScale(){this.templateOptions.scale=this.viewModel.view.scale}_updateCustomTextElementValue(e,t,i){e.find((e=>{const[i]=Object.entries(e)[0];return i===t}))[t]=i}_updateInputValue(e){const t=e.target,i=t.getAttribute("data-input-name"),a=!!t["data-input-custom"],{templateOptions:n}=this;if(a)return void this._updateCustomTextElementValue(n.customTextElements,i,t.value);let s;if("number"===t.type){if(!M(t.valueAsNumber)){const e=n[i];return void(t.value=`${e}`)}s=t.valueAsNumber}else s=t.value;n[i]=s}_handleDPIChange(e){this._updateInputValue(e);const t=e.currentTarget.valueAsNumber,{height:i,width:a}=F(t),{templateOptions:n}=this;n.height=i,n.width=a}_handlePrintMap(){this._pendingExportScroll=!0;const{templateOptions:e}=this,t=this.viewModel.toPrintTemplate(e),i=this._layoutTabSelected?t.layoutOptions.titleText:e.fileName,a=this._createFileLink(t,i);this.exportedLinks.add(a),this.emit("submit",{link:a}),this.viewModel.print(t).then((e=>{a.set({url:e&&e.url,state:"ready"})})).catch((e=>{a.set({error:e,state:"error"})})).then((()=>{this.emit("complete",{link:a}),this.scheduleRender()}))}_updateFromOption(e){const t=e.target,i=t.selectedOptions?t.selectedOptions.item(0).value:t.options[t.selectedIndex].value,a=t.getAttribute("data-target-property");this.templateOptions[a]=i}_switchInput(){[this.templateOptions.width,this.templateOptions.height]=[this.templateOptions.height,this.templateOptions.width]}_showAdvancedOptions(){this._layoutTabSelected?this._advancedOptionsVisibleForLayout=!this._advancedOptionsVisibleForLayout:this._advancedOptionsVisibleForMapOnly=!this._advancedOptionsVisibleForMapOnly}_scrollExportIntoView(){if(this._pendingExportScroll){this._pendingExportScroll=!1;const{_rootNode:e,_rootNode:{clientHeight:t,scrollHeight:i}}=this,a=i-t;a>0&&(e.scrollTop=a)}}_toggleInputValue(e){const t=e.target,i=t.getAttribute("data-option-name");this.templateOptions[i]=t.checked,"scaleEnabled"===i&&(this.templateOptions[i]||this._resetToCurrentScale())}_renderExportedLink(e){const t=this.messages;return e.map((e=>{const{error:i,url:a,formattedName:n,state:s}=e,r="error"===s,p="pending"===s,d="ready"===s,c={[C.anchorDisabled]:p||r};let u=a||null;u&&(u=o(u));const h=l(a,location.href),m={[C.iconSpinner]:p,[C.rotate]:p,[C.iconDownload]:h&&d,[C.iconLaunchLink]:!h&&d,[C.iconError]:r,[C.exportedFileError]:r},_={[C.exportedFileError]:r};let b;b=p?t.pending:d?t.ready:t.errorMessage;const v=r?"print-task:cim-symbol-unsupported"===i.name?t.exportWebMapCIMError:t.exportWebMapError:"";return T("div",{"aria-label":b,class:C.exportedFile,"data-item":e,key:n,onclick:this._removeLink,title:v},T("a",{"aria-label":`${n}. ${t.linkReady}`,download:n,href:u,rel:"noreferrer",tabIndex:0,target:"_blank",class:this.classes(C.exportedFileLink,c)},T("span",{class:this.classes(m)}),T("span",{class:this.classes(C.exportedFileLinkTitle,_)},n)))}))}_toggleLayoutPanel(e){const t=e.target;this._toggleTab(t.getAttribute("data-tab-id"))}_toggleTab(e,t=!0){if(this._layoutTabSelected=e===x.layout,this._layoutTabSelected){const e=this.get("viewModel.templatesInfo.layout.choiceList");this.templateOptions.layout=e&&e[0]}else this.templateOptions.layout=O;t&&(this._activeTabFocusRequested=!0)}_handleLayoutPanelKeyDown(e){const t=a(e),i=e.target.getAttribute("data-tab-id");if(y(t))return this._toggleTab(i),e.preventDefault(),void e.stopPropagation();"ArrowLeft"!==t&&"ArrowRight"!==t||(this._toggleTab(i===x.layout?x.mapOnly:x.layout),e.preventDefault(),e.stopPropagation())}};e([p("viewModel.allowedFormats")],V.prototype,"allowedFormats",void 0),e([p("viewModel.allowedLayouts")],V.prototype,"allowedLayouts",void 0),e([p("viewModel.error")],V.prototype,"error",void 0),e([d({type:w})],V.prototype,"exportedLinks",void 0),e([p("viewModel.extraParameters")],V.prototype,"extraParameters",void 0),e([d()],V.prototype,"headingLevel",void 0),e([d()],V.prototype,"iconClass",void 0),e([p("viewModel.includeDefaultTemplates")],V.prototype,"includeDefaultTemplates",void 0),e([d({aliasOf:{source:"messages.widgetLabel",overridable:!0}})],V.prototype,"label",void 0),e([d(),f("esri/widgets/Print/t9n/Print")],V.prototype,"messages",void 0),e([d(),f("esri/t9n/common")],V.prototype,"messagesCommon",void 0),e([p("viewModel.portal")],V.prototype,"portal",void 0),e([p("viewModel.printServiceUrl")],V.prototype,"printServiceUrl",void 0),e([p("viewModel.templateCustomTextElements")],V.prototype,"templateCustomTextElements",void 0),e([d({type:_})],V.prototype,"templateOptions",void 0),e([p("viewModel.view")],V.prototype,"view",void 0),e([d({type:m})],V.prototype,"viewModel",void 0),V=e([c("esri.widgets.Print")],V);const B=V;export{B as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../chunks/tslib.es6.js";import a from"../../core/Accessor.js";import{HandleOwnerMixin as i}from"../../core/HandleOwner.js";import{init as t}from"../../core/watchUtils.js";import{property as l}from"../../core/accessorSupport/decorators/property.js";import"../../core/arrayUtils.js";import"../../core/has.js";import"../../core/accessorSupport/ensureType.js";import{subclass as s}from"../../core/accessorSupport/decorators/subclass.js";import r from"./ScaleRanges.js";import n from"../Slider/SliderViewModel.js";let c=class extends(i(a)){constructor(e){super(e),this.layer=null,this.scaleRanges=r.fromScaleRange({minScale:0,maxScale:0}),this.sliderViewModel=(()=>{const{max:e}=this._getSliderIndexRange(this.scaleRanges.length-1);return new n({precision:10,min:0,max:e,values:[0,e]})})()}initialize(){this.handles.add([t(this,"sliderViewModel.values",(()=>{if(!this._hasTiledLayer())return;const[e,a]=this.sliderViewModel.values,i=this.mapScaleToSlider(this._getTiledLayerMaxScale()),t=this.mapScaleToSlider(this._getTiledLayerMinScale());(a>i||e<t)&&(this.sliderViewModel.values=[Math.max(e,t),Math.min(a,i)])})),t(this,"layer.loaded",(async()=>{const{layer:e,view:a}=this;if(e)if(a&&await a.when(),await e.when(),"minScale"in e&&"maxScale"in e){const{minScale:a,maxScale:i}=e;this.set({minScale:a,maxScale:i})}else this.set({minScale:void 0,maxScale:void 0})}))])}get maxScale(){const e=this.mapSliderToScale(this.sliderViewModel.values[1]);return this._normalizeScale("max",e)}set maxScale(e){this._setMaxScaleOnSlider(e)}get maxScaleLimit(){return this.mapSliderToScale(this.sliderViewModel.max)}set maxScaleLimit(e){this._setSliderRange({maxScale:e,minScale:this.minScaleLimit})}get minScale(){const e=this.mapSliderToScale(this.sliderViewModel.values[0]);return this._normalizeScale("min",e)}set minScale(e){this._setMinScaleOnSlider(e)}get minScaleLimit(){return this.mapSliderToScale(this.sliderViewModel.min)}set minScaleLimit(e){this._setSliderRange({maxScale:this.maxScaleLimit,minScale:e})}get state(){const{view:e,layer:a}=this;return!e&&!a||!e&&a&&a.loaded||!a&&e&&e.ready||e&&e.ready&&a&&a.loaded?"ready":"disabled"}set view(e){this._set("view",e)}mapScaleToSlider(e){const a=this.scaleRanges.scaleToRangeIndex(e),i=this.scaleRanges.findScaleRangeByIndex(a),{maxScale:t,minScale:l}=i,{max:s,min:r}=this._getSliderIndexRange(a);return this._mapToRange(e,l,t,r,s)}mapSliderToScale(e){const a=this.scaleRanges.findScaleRangeByIndex(e),{maxScale:i,minScale:t}=a,{max:l,min:s}=this._getSliderIndexRange(e);return this._mapToRange(e,s,l,t,i)}_setSliderRange(e){this.scaleRanges=r.fromScaleRange(e);const{max:a}=this._getSliderIndexRange(this.scaleRanges.length-1);this.sliderViewModel.max=a,this.sliderViewModel.min=0,this.notifyChange("maxScaleLimit"),this.notifyChange("minScaleLimit")}_getSliderIndexRange(e){const a=Math.floor(e);return{min:a,max:a+.99999}}_mapToRange(e,a,i,t,l){return t+(e-a)*(l-t)/(i-a)}_setMaxScaleOnSlider(e){const{scaleRanges:a,sliderViewModel:i}=this;if(void 0!==e){const t=this.mapScaleToSlider(this._constrainMaxScaleToLayer(a.clampMaxScale(e)));i.values=[i.values[0],t]}}_setMinScaleOnSlider(e){const{scaleRanges:a,sliderViewModel:i}=this;if(void 0!==e){const t=this.mapScaleToSlider(this._constrainMinScaleToLayer(a.clampMinScale(e)));i.values=[t,i.values[1]]}}_constrainMinScaleToLayer(e){const{scaleRanges:a}=this;if(this._hasTiledLayer()){const{firstRange:i}=a,t=this._getTiledLayerMinScale(),l=.85;e=this._mapToRange(e,i.maxScale,i.minScale,0,1)>l||e>t?t:e}return e}_constrainMaxScaleToLayer(e){if(this._hasTiledLayer()){const a=this._getTiledLayerMaxScale();e=e<a?a:e}return e}_normalizeScale(e,a){const i="max"===e?"maxScale":"minScale",t=this._hasTiledLayer()?"min"===e?this._getTiledLayerMinScale():this._getTiledLayerMaxScale():this.scaleRanges[i],l=1e-6,s=0===a||t===a||Math.abs(t-a)<=l;return Number((s?0:a).toFixed(6))}_getLayerLODS(){
|
|
5
|
+
import{_ as e}from"../../chunks/tslib.es6.js";import a from"../../core/Accessor.js";import{HandleOwnerMixin as i}from"../../core/HandleOwner.js";import{init as t}from"../../core/watchUtils.js";import{property as l}from"../../core/accessorSupport/decorators/property.js";import"../../core/arrayUtils.js";import"../../core/has.js";import"../../core/accessorSupport/ensureType.js";import{subclass as s}from"../../core/accessorSupport/decorators/subclass.js";import r from"./ScaleRanges.js";import n from"../Slider/SliderViewModel.js";let c=class extends(i(a)){constructor(e){super(e),this.layer=null,this.scaleRanges=r.fromScaleRange({minScale:0,maxScale:0}),this.sliderViewModel=(()=>{const{max:e}=this._getSliderIndexRange(this.scaleRanges.length-1);return new n({precision:10,min:0,max:e,values:[0,e]})})()}initialize(){this.handles.add([t(this,"sliderViewModel.values",(()=>{if(!this._hasTiledLayer())return;const[e,a]=this.sliderViewModel.values,i=this.mapScaleToSlider(this._getTiledLayerMaxScale()),t=this.mapScaleToSlider(this._getTiledLayerMinScale());(a>i||e<t)&&(this.sliderViewModel.values=[Math.max(e,t),Math.min(a,i)])})),t(this,"layer.loaded",(async()=>{const{layer:e,view:a}=this;if(e)if(a&&await a.when(),await e.when(),"minScale"in e&&"maxScale"in e){const{minScale:a,maxScale:i}=e;this.set({minScale:a,maxScale:i})}else this.set({minScale:void 0,maxScale:void 0})}))])}get maxScale(){const e=this.mapSliderToScale(this.sliderViewModel.values[1]);return this._normalizeScale("max",e)}set maxScale(e){this._setMaxScaleOnSlider(e)}get maxScaleLimit(){return this.mapSliderToScale(this.sliderViewModel.max)}set maxScaleLimit(e){this._setSliderRange({maxScale:e,minScale:this.minScaleLimit})}get minScale(){const e=this.mapSliderToScale(this.sliderViewModel.values[0]);return this._normalizeScale("min",e)}set minScale(e){this._setMinScaleOnSlider(e)}get minScaleLimit(){return this.mapSliderToScale(this.sliderViewModel.min)}set minScaleLimit(e){this._setSliderRange({maxScale:this.maxScaleLimit,minScale:e})}get state(){const{view:e,layer:a}=this;return!e&&!a||!e&&a&&a.loaded||!a&&e&&e.ready||e&&e.ready&&a&&a.loaded?"ready":"disabled"}set view(e){this._set("view",e)}mapScaleToSlider(e){const a=this.scaleRanges.scaleToRangeIndex(e),i=this.scaleRanges.findScaleRangeByIndex(a),{maxScale:t,minScale:l}=i,{max:s,min:r}=this._getSliderIndexRange(a);return this._mapToRange(e,l,t,r,s)}mapSliderToScale(e){const a=this.scaleRanges.findScaleRangeByIndex(e),{maxScale:i,minScale:t}=a,{max:l,min:s}=this._getSliderIndexRange(e);return this._mapToRange(e,s,l,t,i)}_setSliderRange(e){this.scaleRanges=r.fromScaleRange(e);const{max:a}=this._getSliderIndexRange(this.scaleRanges.length-1);this.sliderViewModel.max=a,this.sliderViewModel.min=0,this.notifyChange("maxScaleLimit"),this.notifyChange("minScaleLimit")}_getSliderIndexRange(e){const a=Math.floor(e);return{min:a,max:a+.99999}}_mapToRange(e,a,i,t,l){return t+(e-a)*(l-t)/(i-a)}_setMaxScaleOnSlider(e){const{scaleRanges:a,sliderViewModel:i}=this;if(void 0!==e){const t=this.mapScaleToSlider(this._constrainMaxScaleToLayer(a.clampMaxScale(e)));i.values=[i.values[0],t]}}_setMinScaleOnSlider(e){const{scaleRanges:a,sliderViewModel:i}=this;if(void 0!==e){const t=this.mapScaleToSlider(this._constrainMinScaleToLayer(a.clampMinScale(e)));i.values=[t,i.values[1]]}}_constrainMinScaleToLayer(e){const{scaleRanges:a}=this;if(this._hasTiledLayer()){const{firstRange:i}=a,t=this._getTiledLayerMinScale(),l=.85;e=this._mapToRange(e,i.maxScale,i.minScale,0,1)>l||e>t?t:e}return e}_constrainMaxScaleToLayer(e){if(this._hasTiledLayer()){const a=this._getTiledLayerMaxScale();e=e<a?a:e}return e}_normalizeScale(e,a){const i="max"===e?"maxScale":"minScale",t=this._hasTiledLayer()?"min"===e?this._getTiledLayerMinScale():this._getTiledLayerMaxScale():this.scaleRanges[i],l=1e-6,s=0===a||t===a||Math.abs(t-a)<=l;return Number((s?0:a).toFixed(6))}_getLayerLODS(){return"imagery-tile"===this.layer?.type&&"Raster"===this.layer.raster?.tileType?null:this.get("layer.tileInfo.lods")}_getTiledLayerMinScale(){const e=this._getLayerLODS();return this.scaleRanges.clampMinScale(e[0].scale)}_getTiledLayerMaxScale(){const e=this._getLayerLODS();return e[e.length-1].scale}_hasTiledLayer(){return!!this._getLayerLODS()}};e([l()],c.prototype,"layer",void 0),e([l()],c.prototype,"maxScale",null),e([l()],c.prototype,"maxScaleLimit",null),e([l()],c.prototype,"minScale",null),e([l()],c.prototype,"minScaleLimit",null),e([l()],c.prototype,"scaleRanges",void 0),e([l()],c.prototype,"sliderViewModel",void 0),e([l({readOnly:!0})],c.prototype,"state",null),e([l()],c.prototype,"view",null),c=e([s("esri.widgets.ScaleRangeSlider.ScaleRangeSliderViewModel")],c);const o=c;export{o as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../chunks/tslib.es6.js";import{clone as t}from"../../core/lang.js";import{property as s}from"../../core/accessorSupport/decorators/property.js";import"../../core/accessorSupport/ensureType.js";import{subclass as i}from"../../core/accessorSupport/decorators/subclass.js";import r from"./SearchSource.js";import{getResults as l,getSuggestions as a}from"./support/layerSearchUtils.js";var o;let
|
|
5
|
+
import{_ as e}from"../../chunks/tslib.es6.js";import{clone as t}from"../../core/lang.js";import{property as s}from"../../core/accessorSupport/decorators/property.js";import"../../core/accessorSupport/ensureType.js";import{subclass as i}from"../../core/accessorSupport/decorators/subclass.js";import r from"./SearchSource.js";import{getResults as l,getSuggestions as a}from"./support/layerSearchUtils.js";var o;let h=o=class extends r{constructor(e){super(e),this.displayField=null,this.exactMatch=null,this.orderByFields=null,this.searchFields=null,this.searchTemplate=null,this.suggestionTemplate=null,this.getResults=(e,t)=>l({source:this,...e},t),this.getSuggestions=(e,t)=>a({source:this,...e},t)}set layer(e){this._set("layer",e),e&&e.load().catch((()=>{}))}get name(){return this._getLayerTitle()||""}set name(e){void 0!==e?this._override("name",e):this._clearOverride("name")}clone(){return new o({autoNavigate:this.autoNavigate,filter:this.filter,maxResults:this.maxResults,maxSuggestions:this.maxSuggestions,minSuggestCharacters:this.minSuggestCharacters,outFields:this.outFields?t(this.outFields):null,placeholder:this.placeholder,popupEnabled:this.popupEnabled,prefix:this.prefix,resultGraphicEnabled:this.resultGraphicEnabled,resultSymbol:this.resultSymbol?this.resultSymbol.clone():null,suggestionsEnabled:this.suggestionsEnabled,suffix:this.suffix,withinViewEnabled:this.withinViewEnabled,displayField:this.displayField,exactMatch:this.exactMatch,layer:this.layer,searchFields:this.searchFields?t(this.searchFields):null,suggestionTemplate:this.suggestionTemplate,zoomScale:this.zoomScale})}_getFirstStringField(){return this.layer.fieldsIndex.fields.find((e=>"string"===e.type))?.name??""}_getDisplayField(){return this.displayField||this.layer.displayField||this._getFirstStringField()}_getSearchFieldsString(){const{layer:e,searchFields:t}=this;if(!e.loaded)return"";return`: ${(t||[this._getDisplayField()]).map((t=>{const s=e.getField(t);return s&&s.alias||t})).join(", ")}`}_getLayerTitle(){const{layer:e}=this;if(!e)return;const{title:t}=e;return t?`${t}${this._getSearchFieldsString()}`:void 0}};e([s({json:{read:{source:"field.name"},write:{target:"field.name"}}})],h.prototype,"displayField",void 0),e([s({json:{read:{source:"field.exactMatch"},write:{target:"field.exactMatch"}}})],h.prototype,"exactMatch",void 0),e([s({value:null})],h.prototype,"layer",null),e([s()],h.prototype,"name",null),e([s({type:[String],json:{write:!0}})],h.prototype,"orderByFields",void 0),e([s()],h.prototype,"searchFields",void 0),e([s()],h.prototype,"searchTemplate",void 0),e([s()],h.prototype,"suggestionTemplate",void 0),h=o=e([i("esri.widgets.Search.LayerSearchSource")],h);const n=h;export{n as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../chunks/tslib.es6.js";import{property as s}from"../../core/accessorSupport/decorators/property.js";import"../../core/arrayUtils.js";import"../../core/has.js";import"../../core/accessorSupport/ensureType.js";import{subclass as r}from"../../core/accessorSupport/decorators/subclass.js";import t from"../Widget.js";import o from"./SearchViewModel.js";import{accessibleHandler as l}from"../support/decorators/accessibleHandler.js";import{messageBundle as i}from"../support/decorators/messageBundle.js";import{tsx as u}from"../support/jsxFactory.js";import"../support/widgetUtils.js";const n={base:"esri-search-result-renderer esri-widget",anchor:"esri-widget__anchor",showMoreResults:"esri-search-result-renderer__more-results--show-more-results",moreResults:"esri-search-result-renderer__more-results",moreResultsList:"esri-search-result-renderer__more-results-list",moreResultsHeader:"esri-search-result-renderer__more-results-header",moreResultsItem:"esri-search-result-renderer__more-results-item",moreResultsListHeader:"esri-search-result-renderer__more-results-list-header"};let c=class extends t{constructor(e,s){super(e,s),this.messages=null,this.showMoreResultsOpen=!1,this.viewModel=null}render(){const e={[n.showMoreResults]:this.showMoreResultsOpen};return u("div",{class:n.base},u("div",{key:"esri-search-renderer__container",class:this.classes(n.moreResults,e)},this.renderSearchResultName(),this.renderMoreResults()))}renderMoreResults(){return u("div",{key:"esri-search-renderer__more-results"},this.renderMoreResultsButton(),this.renderMoreResultsLists())}renderSearchResultName(){
|
|
5
|
+
import{_ as e}from"../../chunks/tslib.es6.js";import{property as s}from"../../core/accessorSupport/decorators/property.js";import"../../core/arrayUtils.js";import"../../core/has.js";import"../../core/accessorSupport/ensureType.js";import{subclass as r}from"../../core/accessorSupport/decorators/subclass.js";import t from"../Widget.js";import o from"./SearchViewModel.js";import{accessibleHandler as l}from"../support/decorators/accessibleHandler.js";import{messageBundle as i}from"../support/decorators/messageBundle.js";import{tsx as u}from"../support/jsxFactory.js";import"../support/widgetUtils.js";const n={base:"esri-search-result-renderer esri-widget",anchor:"esri-widget__anchor",showMoreResults:"esri-search-result-renderer__more-results--show-more-results",moreResults:"esri-search-result-renderer__more-results",moreResultsList:"esri-search-result-renderer__more-results-list",moreResultsHeader:"esri-search-result-renderer__more-results-header",moreResultsItem:"esri-search-result-renderer__more-results-item",moreResultsListHeader:"esri-search-result-renderer__more-results-list-header"};let c=class extends t{constructor(e,s){super(e,s),this.messages=null,this.showMoreResultsOpen=!1,this.viewModel=null}render(){const e={[n.showMoreResults]:this.showMoreResultsOpen};return u("div",{class:n.base},u("div",{key:"esri-search-renderer__container",class:this.classes(n.moreResults,e)},this.renderSearchResultName(),this.renderMoreResults()))}renderMoreResults(){return u("div",{key:"esri-search-renderer__more-results"},this.renderMoreResultsButton(),this.renderMoreResultsLists())}renderSearchResultName(){const e=this.viewModel?.selectedResult,s=e&&e.name||"";return u("div",{key:"esri-search-renderer__result-name",class:n.moreResultsItem},s)}renderMoreResultsLists(){const e=this.viewModel?.results,{resultCount:s}=this.viewModel;if(s<2)return null;const r=e.map((e=>this.renderMoreResultsList(e)));return u("div",{key:"esri-search-renderer__more-results-container",class:n.moreResultsList},r)}renderMoreResultsButton(){const{messages:e}=this,{resultCount:s}=this.viewModel;return s<2?null:u("div",{key:"esri-search-renderer__more-results-button",class:n.moreResultsItem},u("a",{class:n.anchor,href:"#",bind:this,onclick:this._showMoreResultsClick,onkeydown:this._showMoreResultsClick},this.showMoreResultsOpen?e.hideMoreResults:e.showMoreResults))}renderMoreResultsHeader(e,s){return u("div",{key:`esri-search-result-renderer__header-${s}`,class:n.moreResultsListHeader},e)}renderMoreResultsList(e){const{results:s}=e,r=s.length,t=!!r,o=this.viewModel?.selectedResult,l=1===r&&s[0]===o,i=this._getSourceName(e.source,e.sourceIndex),n=this.viewModel?.results.length>1&&!l?this.renderMoreResultsHeader(i,e.sourceIndex):null,c=t&&s.map(((e,s)=>this.renderMoreResultsListItem(e,s))),d=t&&!l?u("ul",{key:`esri-search-result-renderer__list-${e.sourceIndex}`},c):null;return t?u("div",{key:`esri-search-result-renderer__results-${e.sourceIndex}`},n,d):null}renderMoreResultsListItem(e,s){return e!==this.get("viewModel.selectedResult")?u("li",{key:`esri-search-result-renderer__list-item-${s}`},u("a",{class:n.anchor,href:"#",tabindex:"0",bind:this,"data-result":e,onclick:this._selectResultClick,onkeydown:this._selectResultClick},e.name)):null}_showMoreResultsClick(e){e.preventDefault(),this.showMoreResultsOpen=!this.showMoreResultsOpen;const s=this.get("viewModel.view.popup");s&&s.reposition()}_selectResultClick(e){e.preventDefault();const s=e.currentTarget["data-result"];this.viewModel&&this.viewModel.select(s)}_getSourceName(e,s){return s===o.ALL_INDEX?this.messages.all:e.name}};e([s(),i("esri/widgets/Search/t9n/Search")],c.prototype,"messages",void 0),e([s()],c.prototype,"showMoreResultsOpen",void 0),e([s()],c.prototype,"viewModel",void 0),e([l()],c.prototype,"_showMoreResultsClick",null),e([l()],c.prototype,"_selectResultClick",null),c=e([r("esri.widgets.Search.SearchResultRenderer")],c);const d=c;export{d as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../chunks/tslib.es6.js";import{getAssetUrl as t}from"../../assets.js";import r from"../../config.js";import s from"../../Graphic.js";import o from"../../PopupTemplate.js";import"../../symbols.js";import l from"../../core/Accessor.js";import i from"../../core/Collection.js";import{deprecatedProperty as a}from"../../core/deprecate.js";import n from"../../core/Error.js";import u from"../../core/Evented.js";import c from"../../core/Handles.js";import h from"../../core/has.js";import p from"../../core/Logger.js";import{unwrap as d,isSome as g,isNone as m}from"../../core/maybe.js";import{eachAlways as y,after as f}from"../../core/promiseUtils.js";import{whenOnce as S}from"../../core/reactiveUtils.js";import{init as v}from"../../core/watchUtils.js";import{property as _}from"../../core/accessorSupport/decorators/property.js";import"../../core/arrayUtils.js";import"../../core/accessorSupport/ensureType.js";import{subclass as b}from"../../core/accessorSupport/decorators/subclass.js";import w from"../../geometry/Point.js";import x from"../../geometry/SpatialReference.js";import{onLocaleChange as I}from"../../intl/locale.js";import{fetchMessageBundle as L}from"../../intl/messages.js";import j from"../../portal/Portal.js";import{highlightsSupported as T}from"../../views/support/layerViewUtils.js";import R from"./LayerSearchSource.js";import P from"./LocatorSearchSource.js";import E from"./SearchSource.js";import{getPointFromGeometry as F,getPointWithElevation as A}from"./support/geometryUtils.js";import{isArcGISWorldGeocoder as C,meteredArcGISLocatorUrl as G,isProxiedArcGISWorldGeocoder as O,isMeteredArcGISWorldGeocoder as N}from"./support/locatorUtils.js";import{supported as D,getCurrentPosition as M,positionToPoint as V}from"../support/geolocationUtils.js";import{GoToMixin as k}from"../support/GoTo.js";import B from"../../symbols/PictureMarkerSymbol.js";import J from"../../symbols/SimpleLineSymbol.js";import U from"../../symbols/SimpleFillSymbol.js";import H from"../../symbols/TextSymbol.js";function Q(e,t){return e.hasOwnProperty(t)&&null!=e[t]&&""!==e[t]}const Z=()=>L("esri/widgets/Search/t9n/Search"),q="esri.widgets.Search.SearchViewModel",z=p.getLogger(q),K="highlight",W=i.ofType({key:e=>e.layer?"layer":"locator",base:E,typeMap:{layer:R,locator:P}}),X=x.WGS84,Y="esri/images/search/search-symbol-32.svg",$="esri/images/search/search-symbol-32.png",ee=/<(?:.|\s)*?>/g,te=-1;let re=class extends(k(u.EventedMixin(l))){constructor(e){super(e),this._handles=new c,this._gotoController=null,this._searching=null,this._createdFeatureLayers=[],this.autoNavigate=!0,this.autoSelect=!0,this.defaultPopupTemplate=null,this.defaultSources=new W,this.defaultSymbols={point:new B({url:t(h("trident")?$:Y),size:24,width:24,height:24}),polyline:new J({color:[130,130,130,1],width:2}),polygon:new U({color:[235,235,235,.4],outline:{color:[130,130,130,1],width:2}})},this.includeDefaultSources=!0,this.maxInputLength=128,this.maxResults=6,this.maxSuggestions=6,this.messages=null,this.minSuggestCharacters=3,this.popupEnabled=!0,this.popupTemplate=null,this.portal=j.getDefault(),this.resultCount=null,this.resultGraphicEnabled=!0,this.resultGraphic=null,this.results=null,this.selectedSuggestion=null,this.searchAllEnabled=!0,this.selectedResult=null,this.sources=new W,this.suggestionDelay=350,this.suggestionCount=null,this.suggestions=null,this.suggestionsEnabled=!0,this.view=null}initialize(){const e=async()=>{const e=await Z();this.messages=e,this.defaultPopupTemplate=new o({title:e.searchResult,content:"{Match_addr}"})};e(),this._handles.add([v(this,["includeDefaultSources","view","portal"],(()=>this._update())),I(e)])}destroy(){this._destroyFeatureLayers(),this._abortGoTo(),this.clearGraphics(),this._handles.destroy(),this._handles=null}get activeSource(){return this.allSources.getItemAt(this.activeSourceIndex)||null}get activeSourceIndex(){return 1===this.allSources.length||!this.searchAllEnabled?0:te}set activeSourceIndex(e){void 0!==e?this._override("activeSourceIndex",e):this._clearOverride("activeSourceIndex")}get allPlaceholder(){var e;return null==(e=this.messages)?void 0:e.allPlaceholder}set allPlaceholder(e){e?this._override("allPlaceholder",e):this._clearOverride("allPlaceholder")}get allSources(){const{sources:e,defaultSources:t,includeDefaultSources:r}=this,s="function"==typeof r?r.call(null,{sources:e,defaultSources:t}):r?t.concat(e):e,o=this._get("allSources")||new W;return o.removeAll(),o.addMany(s.filter(Boolean)),o}get defaultSymbol(){return a(z,"defaultSymbol",{replacement:"defaultSymbols",version:"4.22"}),this._get("defaultSymbol")}set defaultSymbol(e){a(z,"defaultSymbol",{replacement:"defaultSymbols",version:"4.22"}),this._set("defaultSymbol",e)}get locationEnabled(){return this._get("locationEnabled")||D()}set locationEnabled(e){if(void 0===e)return void this._clearOverride("locationEnabled");const t=D();if(e&&!t){const e=new n("locationEnabled:geolocation-unsupported","Geolocation API is unsupported.",{geolocation:navigator.geolocation});z.error(e)}this._override("locationEnabled",e&&t)}get placeholder(){const{allSources:e,activeSourceIndex:t,allPlaceholder:r}=this;if(t===te)return r;const s=e.getItemAt(t);return s?s.placeholder:""}set searchTerm(e){this._set("searchTerm",e||""),this.clearGraphics(),this.selectedSuggestion&&this.selectedSuggestion.text!==e&&this._set("selectedSuggestion",null),""===e&&this._clear()}get searchTerm(){return this._get("searchTerm")||""}get state(){return this._searching?"searching":this.updating?"loading":0===this.allSources.length?"disabled":"ready"}get updating(){return null!=this._updatingPromise}clear(){this.searchTerm=""}clearGraphics(){this._removeHighlight(),this._closePopup(),this.view&&this.view.graphics.remove(this.resultGraphic),this._set("resultGraphic",null)}search(e,t){this.emit("search-start"),this.clearGraphics();const r=this._createSuggestionForSearch(e),s=this.when().then((()=>this._getResultsFromSources(r,t).then((e=>{var s;if(null!=(s=d(null==t?void 0:t.signal))&&s.aborted)return null;const o={activeSourceIndex:this.activeSourceIndex,searchTerm:r.text,numResults:0,numErrors:0,errors:[],results:[]};this._formatResponse(o,e,r);const l=this._getFirstResult(o.results),i=(r.location&&l?l.name:r.text).replace(ee,"");return this._set("searchTerm",i),(r.key&&"number"==typeof r.sourceIndex||r.location)&&this._set("selectedSuggestion",r),this._set("results",o.results),this._set("resultCount",o.results.reduce(((e,t)=>e+t.results.length),0)),this.emit("search-complete",o),this._selectFirstResult(l).then((()=>o))})))).then((e=>(this._clearSearching(),e)),(e=>{throw this._clearSearching(),e}));return this._searching=s,s}searchNearby(e){if(!this.locationEnabled){const e=new n("searchNearby:geolocation-unsupported","Geolocation API is unsupported.",{geolocation:navigator.geolocation});return z.error(e),Promise.reject(e)}const t=M().then((t=>V({position:t,view:this.view},e))).then((t=>this.search(t,e)));return this._searching=t,t.catch((()=>{})).then((()=>this._clearSearching())),t}select(e){if(this.clearGraphics(),!e){const t=new n("select:missing-parameter","Cannot select without a searchResult.",{searchResult:e});return z.error(t),Promise.reject(t)}const{view:t}=this,r=Q(e,"sourceIndex")?e.sourceIndex:this._getSourceIndexOfResult(e),o=this.allSources.getItemAt(r);if(!o){const e=new n("select:missing-source","Cannot select without a source.",{source:o});return z.error(e),Promise.reject(e)}const l=o instanceof R?this._getLayerSourcePopupTemplate(o):o.popupTemplate,i=o.resultSymbol||this._getDefaultSymbol(e),a=Q(o,"resultGraphicEnabled")?o.resultGraphicEnabled:this.resultGraphicEnabled,u=Q(o,"autoNavigate")?o.autoNavigate:this.autoNavigate,c=Q(o,"popupEnabled")?o.popupEnabled:this.popupEnabled,h=c?l||this.popupTemplate||this.defaultPopupTemplate:null,{feature:p}=e;if(!p){const e=new n("select:missing-feature","Cannot select without a feature.",{feature:p});return z.error(e),Promise.reject(e)}const{attributes:d,geometry:m,layer:f,sourceLayer:S}=p,v=F(m),_={layerViewQuery:this._getLayerView(p),elevationQuery:t&&g(v)?A(v,t).catch((()=>v)):Promise.resolve(v)};return y(_).then((l=>{const n=l.layerViewQuery.value,y=l.elevationQuery.value;i instanceof H&&(i.text=e.name);const v=t&&u?e.target||e.extent:null;return(g(v)?this._goToSearchResult(v):Promise.resolve()).then((()=>{var l;const u=n?p:new s({geometry:m,symbol:i,attributes:d,layer:f,sourceLayer:S,popupTemplate:h}),g=c&&(null==(l=this.view)?void 0:l.popup),v=g&&u.getEffectivePopupTemplate(g.defaultPopupTemplateEnabled);return v&&t.popup.open({features:[u],location:y}),n&&T(n)&&!v&&this._highlightFeature({graphic:u,layerView:n}),!n&&a&&t&&t.graphics.push(u),this._setResultFloor(e),this._set("selectedResult",e),this._set("resultGraphic",u),this.emit("select-result",{result:e,source:o,sourceIndex:r}),e}))}))}suggest(e,t,r){const s=e||this.searchTerm;return this.emit("suggest-start",{searchTerm:s}),this._suggestTimer(t,r).then((()=>this._suggestImmediate(s,r).then((e=>(this._set("suggestions",e.results),this._set("suggestionCount",e.results.reduce(((e,t)=>e+t.results.length),0)),this.emit("suggest-complete",e),e)))))}async when(){await S((()=>!this.updating))}async _update(){const{portal:e,view:t}=this;if(this.includeDefaultSources){const r=this._updatingPromise=y([null==e?void 0:e.load(),null==t?void 0:t.when()]);if(this.destroyed)return;if(await r,r!==this._updatingPromise)return}await S((()=>this.messages)),this.destroyed||this._updateDefaultSources(),this._updatingPromise=null}_clearSearching(){this._searching=null}_convertHelperServices(){var e,t;const s=null==(e=this.portal)||null==(t=e.helperServices)?void 0:t.geocode;if(!s)return[];return s.map((e=>{if(!1===e.placefinding)return;const t=r.apiKey&&C(e.url)?{url:G}:null,s=P.fromJSON({...e,...t}),o=s.url;if(C(o)||O(o)||N(o)){const e=s.outFields||["Addr_type","Match_addr","StAddr","City"],t=s.placeholder||this.messages.placeholder,r="number"==typeof s.defaultZoomScale?s.defaultZoomScale:2500;s.set({singleLineFieldName:"SingleLine",outFields:e,placeholder:t,defaultZoomScale:r})}return s.singleLineFieldName?s:void 0})).filter(Boolean)}_destroyFeatureLayers(){this._createdFeatureLayers.forEach((e=>null==e?void 0:e.destroy())),this._createdFeatureLayers=[]}_getLayerSources(e,t){var r;const s=null==(r=this.view)?void 0:r.map;return e.map((e=>{const r=s.findLayerById(e.id);if(!r)return;const o=this._getLayerJSON(e),l=R.fromJSON(o);return l.placeholder=t,this._getLayer(r,o).then((e=>{l.layer=e})),l})).filter(Boolean).toArray()}_getTableSources(e,t){var r;const s=null==(r=this.view)?void 0:r.map;return e.map((e=>{const r=s.findTableById(e.id);if(!r)return;const o=this._getLayerJSON(e),l=R.fromJSON(o);return l.placeholder=t,this._getLayer(r,o).then((e=>{l.layer=e})),l})).filter(Boolean).toArray()}_convertApplicationProperties(){var e,t,r;const s=null==(e=this.view)?void 0:e.map,o=null==s||null==(t=s.applicationProperties)||null==(r=t.viewing)?void 0:r.search;if(!o)return[];const{enabled:l,hintText:i,layers:a,tables:n}=o;if(!l)return[];return[...this._getLayerSources(a,i),...this._getTableSources(n,i)]}async _getSubLayer(e,t){if(await e.load(),!e.allSublayers)throw new Error;const r=e.allSublayers.find((e=>e.id===t.subLayer));if(!r)throw new Error;const s=await r.createFeatureLayer();return this._createdFeatureLayers.push(s),s}async _getBuildingSubLayer(e,t){await e.load();const r=e.allSublayers.find((e=>e.id===t.subLayer));if("building-component"!==(null==r?void 0:r.type))throw new Error;if(await r.load(),null==r.associatedLayer)throw new Error;return await r.associatedLayer.load(),r}_getLayer(e,t){return"feature"===e.type||"scene"===e.type||"csv"===e.type||"geojson"===e.type||"ogc-feature"===e.type?Promise.resolve(e):"map-image"===e.type?this._getSubLayer(e,t).catch((()=>{const t=new n("search:create-featurelayer","Could not create a FeatureLayer from the MapImageLayer",{layer:e});return z.error(t),null})):"building-scene"===e.type?this._getBuildingSubLayer(e,t):Promise.resolve(null)}_getLayerJSON(e){return"function"==typeof e.toJSON?e.toJSON():e}_updateDefaultSources(){const{defaultSources:e,includeDefaultSources:t}=this;this._destroyFeatureLayers(),e.removeAll(),t&&e.addMany([...this._convertApplicationProperties(),...this._convertHelperServices()])}_abortGoTo(){this._gotoController&&this._gotoController.abort(),this._gotoController=null}_clear(){this._abortGoTo(),this._set("resultCount",null),this._set("results",null),this._set("suggestions",null),this._set("suggestionCount",null),this._set("selectedResult",null),this._set("selectedSuggestion",null),this.emit("search-clear")}_closePopup(){var e;const t=null==(e=this.view)?void 0:e.popup,{resultGraphic:r}=this;if(!t||!r)return;const{selectedFeature:s}=t;s&&s===r&&t.close()}_suggestTimer(e,t){const r=null!=e?e:this.suggestionDelay;return f(r,null,t&&t.signal)}_createLocationForSearch(e){return e instanceof s?F(e.geometry):e instanceof w?e:Array.isArray(e)&&2===e.length?new w({longitude:e[0],latitude:e[1]}):null}_createSuggestionForSearch(e){if(e&&Q(e,"key")&&Q(e,"text")&&Q(e,"sourceIndex"))return e;const t=this._createLocationForSearch(e),r="string"==typeof e?e:this.searchTerm,{selectedSuggestion:s,selectedResult:o}=this,l=!e&&s&&o,i=l&&s.key===o.key&&s.sourceIndex===o.sourceIndex,a=l&&s.location;return i||a?s:{location:d(t),text:t?"":r,sourceIndex:null,key:null}}_getFirstResult(e){let t=null;return e&&e.some((e=>{const{results:r}=e,s=r[0],o=!!s;return o&&(t=s),o})),t}_selectFirstResult(e){return this.autoSelect&&e?this.select(e):Promise.resolve(null)}_suggestImmediate(e,t){return this.when().then((()=>this._getSuggestionsFromSources(e,t))).then((r=>{var s;if(null!=(s=d(null==t?void 0:t.signal))&&s.aborted)return null;const o={activeSourceIndex:this.activeSourceIndex,searchTerm:e,numResults:0,numErrors:0,errors:[],results:[]};return this._formatResponse(o,r),o}))}_formatSourceResponse(e,t,r){const s=t&&t.value||[],o=t&&t.error,l=this.allSources.getItemAt(r);if(o){const t={sourceIndex:r,source:l,error:o};e.errors.push(t),z.error(o),e.numErrors++}else{const t={sourceIndex:r,source:l,results:s};e.results.push(t),e.numResults+=s.length}}_formatResponse(e,t,r){if(t)if(e.activeSourceIndex===te){const s=r&&Q(r,"sourceIndex")&&-1!==r.sourceIndex?r.sourceIndex:void 0;t.forEach(((t,r)=>{const o=void 0!==s?s:r;this._formatSourceResponse(e,t,o)}))}else this._formatSourceResponse(e,t[0],e.activeSourceIndex)}_getResultsFromSources(e,t){const{allSources:r}=this,s=!e.location&&Q(e,"sourceIndex")?e.sourceIndex:this.activeSourceIndex,o=[];if(!r.length){const e=new n("search:no-sources-defined","At least one source is required.",{allSources:r});return z.error(e),Promise.reject(e)}return s===te?r.forEach(((r,s)=>{o.push(this._getResultsFromSource(e,s,t))})):o.push(this._getResultsFromSource(e,s,t)),y(o)}_getSuggestionsFromSources(e,t){const{allSources:r,activeSourceIndex:s}=this,o=[];if(!r.length){const e=new n("suggest:no-sources-defined","At least one source is required.",{allSources:r});return z.error(e),Promise.reject(e)}return s===te?r.forEach(((r,s)=>{o.push(this._getSuggestionsFromSource(e,s,t))})):o.push(this._getSuggestionsFromSource(e,s,t)),y(o)}_getResultsFromSource(e,t,r){var s;const o=this.allSources.getItemAt(t),{location:l=null}=e,i=(null==(s=this.view)?void 0:s.spatialReference)||X,a=Q(o,"maxResults")?o.maxResults:this.maxResults,n=!!(o instanceof R&&Q(o,"exactMatch"))&&o.exactMatch,{view:u}=this;return o.getResults({view:u,sourceIndex:t,location:l,suggestResult:e,spatialReference:i,exactMatch:n,maxResults:a},r)}_getSuggestionsFromSource(e,t,r){const s=this.allSources.getItemAt(t),o=Q(s,"suggestionsEnabled")?s.suggestionsEnabled:this.suggestionsEnabled,l=e.length,i=Q(s,"minSuggestCharacters")?s.minSuggestCharacters:this.minSuggestCharacters;if(o&&e.trim()&&l>=i){var a;const o=(null==(a=this.view)?void 0:a.spatialReference)||X,l=Q(s,"maxSuggestions")?s.maxSuggestions:this.maxSuggestions,{view:i}=this,n=!!(s instanceof R&&Q(s,"exactMatch"))&&s.exactMatch;return s.getSuggestions({view:i,sourceIndex:t,suggestTerm:e,spatialReference:o,maxSuggestions:l,exactMatch:n},r)}return Promise.resolve(null)}_getLayerSourcePopupTemplate(e){const{layer:t}=e;if(t)return Q(e,"popupTemplate")?e.popupTemplate:t.popupTemplate}_getSourceIndexOfResult(e){const t=this.results;let r=null;return t.some((t=>t.results.some((s=>s===e&&(r=t.sourceIndex,!0))))),r}async _goToSearchResult(e){const t=!!e;this._abortGoTo();const r=new AbortController;this._gotoController=r;const s={target:{target:e},options:{animate:t,signal:r.signal}};await this.callGoTo(s),this._gotoController=null}_getDefaultSymbol(e){var t;const{defaultSymbols:r}=this,s=null==(t=e.feature)?void 0:t.geometry;if(m(s))return null;const o=this._get("defaultSymbol");if(o&&("point"===s.type||"multipoint"===s.type))return o;switch(s.type){case"point":case"multipoint":return r.point;case"polyline":return r.polyline;case"extent":case"polygon":return r.polygon;default:return null}}_removeHighlight(){this._handles.remove(K)}async _getLayerView(e){const{view:t}=this;if(!e||!t||"building-component"===e.layer.type||"subtype-sublayer"===e.layer.type)return null;const{layer:r}=e;return await t.when(),t.whenLayerView(r)}_highlightFeature(e){const{graphic:t,layerView:r}=e,{attributes:s,layer:o}=t,{objectIdField:l}=o,i=s&&s[l],a=r.highlight(i||t);this._handles.add(a,K)}_setResultFloor(e){var t,r,s;const{view:o}=this,l=null==(t=e.feature)?void 0:t.attributes,i=null==(r=e.feature)?void 0:r.sourceLayer;if(i&&"floorInfo"in i&&null!=i&&null!=(s=i.floorInfo)&&s.floorField&&l){const e=l[i.floorInfo.floorField];o.emit("select-result-floor",e)}}};re.ALL_INDEX=te,e([_()],re.prototype,"_searching",void 0),e([_()],re.prototype,"_updatingPromise",void 0),e([_({readOnly:!0,value:null})],re.prototype,"activeSource",null),e([_()],re.prototype,"activeSourceIndex",null),e([_()],re.prototype,"allPlaceholder",null),e([_({readOnly:!0})],re.prototype,"allSources",null),e([_()],re.prototype,"autoNavigate",void 0),e([_()],re.prototype,"autoSelect",void 0),e([_()],re.prototype,"defaultPopupTemplate",void 0),e([_({readOnly:!0})],re.prototype,"defaultSources",void 0),e([_()],re.prototype,"defaultSymbol",null),e([_()],re.prototype,"defaultSymbols",void 0),e([_()],re.prototype,"includeDefaultSources",void 0),e([_()],re.prototype,"locationEnabled",null),e([_()],re.prototype,"maxInputLength",void 0),e([_()],re.prototype,"maxResults",void 0),e([_()],re.prototype,"maxSuggestions",void 0),e([_()],re.prototype,"messages",void 0),e([_()],re.prototype,"minSuggestCharacters",void 0),e([_({readOnly:!0})],re.prototype,"placeholder",null),e([_()],re.prototype,"popupEnabled",void 0),e([_({type:o})],re.prototype,"popupTemplate",void 0),e([_({type:j})],re.prototype,"portal",void 0),e([_()],re.prototype,"resultCount",void 0),e([_()],re.prototype,"resultGraphicEnabled",void 0),e([_({readOnly:!0})],re.prototype,"resultGraphic",void 0),e([_({readOnly:!0})],re.prototype,"results",void 0),e([_({readOnly:!0})],re.prototype,"selectedSuggestion",void 0),e([_()],re.prototype,"searchAllEnabled",void 0),e([_({readOnly:!0})],re.prototype,"selectedResult",void 0),e([_()],re.prototype,"searchTerm",null),e([_({type:W})],re.prototype,"sources",void 0),e([_({readOnly:!0})],re.prototype,"state",null),e([_()],re.prototype,"suggestionDelay",void 0),e([_()],re.prototype,"suggestionCount",void 0),e([_({readOnly:!0})],re.prototype,"suggestions",void 0),e([_()],re.prototype,"suggestionsEnabled",void 0),e([_({readOnly:!0})],re.prototype,"updating",null),e([_()],re.prototype,"view",void 0),e([_()],re.prototype,"clear",null),re=e([b(q)],re);const se=re;export{se as default};
|
|
5
|
+
import{_ as e}from"../../chunks/tslib.es6.js";import{getAssetUrl as t}from"../../assets.js";import r from"../../config.js";import s from"../../Graphic.js";import o from"../../PopupTemplate.js";import"../../symbols.js";import i from"../../core/Accessor.js";import l from"../../core/Collection.js";import{deprecatedProperty as a}from"../../core/deprecate.js";import n from"../../core/Error.js";import u from"../../core/Evented.js";import c from"../../core/Handles.js";import h from"../../core/has.js";import p from"../../core/Logger.js";import{unwrap as d,isSome as g,isNone as m}from"../../core/maybe.js";import{eachAlways as y,after as f}from"../../core/promiseUtils.js";import{whenOnce as S}from"../../core/reactiveUtils.js";import{init as _}from"../../core/watchUtils.js";import{property as v}from"../../core/accessorSupport/decorators/property.js";import"../../core/arrayUtils.js";import"../../core/accessorSupport/ensureType.js";import{subclass as b}from"../../core/accessorSupport/decorators/subclass.js";import w from"../../geometry/Point.js";import x from"../../geometry/SpatialReference.js";import{onLocaleChange as I}from"../../intl/locale.js";import{fetchMessageBundle as L}from"../../intl/messages.js";import j from"../../portal/Portal.js";import{highlightsSupported as T}from"../../views/support/layerViewUtils.js";import R from"./LayerSearchSource.js";import P from"./LocatorSearchSource.js";import E from"./SearchSource.js";import{getPointFromGeometry as F,getPointWithElevation as A}from"./support/geometryUtils.js";import{isArcGISWorldGeocoder as C,meteredArcGISLocatorUrl as G,isProxiedArcGISWorldGeocoder as O,isMeteredArcGISWorldGeocoder as N}from"./support/locatorUtils.js";import{supported as D,getCurrentPosition as M,positionToPoint as V}from"../support/geolocationUtils.js";import{GoToMixin as k}from"../support/GoTo.js";import B from"../../symbols/PictureMarkerSymbol.js";import J from"../../symbols/SimpleLineSymbol.js";import U from"../../symbols/SimpleFillSymbol.js";import H from"../../symbols/TextSymbol.js";function Q(e,t){return e.hasOwnProperty(t)&&null!=e[t]&&""!==e[t]}const Z=()=>L("esri/widgets/Search/t9n/Search"),q="esri.widgets.Search.SearchViewModel",z=p.getLogger(q),K="highlight",W=l.ofType({key:e=>e.layer?"layer":"locator",base:E,typeMap:{layer:R,locator:P}}),X=x.WGS84,Y="esri/images/search/search-symbol-32.svg",$="esri/images/search/search-symbol-32.png",ee=/<(?:.|\s)*?>/g,te=-1;let re=class extends(k(u.EventedMixin(i))){constructor(e){super(e),this._handles=new c,this._gotoController=null,this._searching=null,this._createdFeatureLayers=[],this.autoNavigate=!0,this.autoSelect=!0,this.defaultPopupTemplate=null,this.defaultSources=new W,this.defaultSymbols={point:new B({url:t(h("trident")?$:Y),size:24,width:24,height:24}),polyline:new J({color:[130,130,130,1],width:2}),polygon:new U({color:[235,235,235,.4],outline:{color:[130,130,130,1],width:2}})},this.includeDefaultSources=!0,this.maxInputLength=128,this.maxResults=6,this.maxSuggestions=6,this.messages=null,this.minSuggestCharacters=3,this.popupEnabled=!0,this.popupTemplate=null,this.portal=j.getDefault(),this.resultCount=null,this.resultGraphicEnabled=!0,this.resultGraphic=null,this.results=null,this.selectedSuggestion=null,this.searchAllEnabled=!0,this.selectedResult=null,this.sources=new W,this.suggestionDelay=350,this.suggestionCount=null,this.suggestions=null,this.suggestionsEnabled=!0,this.view=null}initialize(){const e=async()=>{const e=await Z();this.messages=e,this.defaultPopupTemplate=new o({title:e.searchResult,content:"{Match_addr}"})};e(),this._handles.add([_(this,["includeDefaultSources","view","portal"],(()=>this._update())),I(e)])}destroy(){this._destroyFeatureLayers(),this._abortGoTo(),this.clearGraphics(),this._handles.destroy(),this._handles=null}get activeSource(){return this.allSources.getItemAt(this.activeSourceIndex)||null}get activeSourceIndex(){return 1===this.allSources.length||!this.searchAllEnabled?0:te}set activeSourceIndex(e){void 0!==e?this._override("activeSourceIndex",e):this._clearOverride("activeSourceIndex")}get allPlaceholder(){return this.messages?.allPlaceholder}set allPlaceholder(e){e?this._override("allPlaceholder",e):this._clearOverride("allPlaceholder")}get allSources(){const{sources:e,defaultSources:t,includeDefaultSources:r}=this,s="function"==typeof r?r.call(null,{sources:e,defaultSources:t}):r?t.concat(e):e,o=this._get("allSources")||new W;return o.removeAll(),o.addMany(s.filter(Boolean)),o}get defaultSymbol(){return a(z,"defaultSymbol",{replacement:"defaultSymbols",version:"4.22"}),this._get("defaultSymbol")}set defaultSymbol(e){a(z,"defaultSymbol",{replacement:"defaultSymbols",version:"4.22"}),this._set("defaultSymbol",e)}get locationEnabled(){return this._get("locationEnabled")||D()}set locationEnabled(e){if(void 0===e)return void this._clearOverride("locationEnabled");const t=D();if(e&&!t){const e=new n("locationEnabled:geolocation-unsupported","Geolocation API is unsupported.",{geolocation:navigator.geolocation});z.error(e)}this._override("locationEnabled",e&&t)}get placeholder(){const{allSources:e,activeSourceIndex:t,allPlaceholder:r}=this;if(t===te)return r;const s=e.getItemAt(t);return s?s.placeholder:""}set searchTerm(e){this._set("searchTerm",e||""),this.clearGraphics(),this.selectedSuggestion&&this.selectedSuggestion.text!==e&&this._set("selectedSuggestion",null),""===e&&this._clear()}get searchTerm(){return this._get("searchTerm")||""}get state(){return this._searching?"searching":this.updating?"loading":0===this.allSources.length?"disabled":"ready"}get updating(){return null!=this._updatingPromise}clear(){this.searchTerm=""}clearGraphics(){this._removeHighlight(),this._closePopup(),this.view&&this.view.graphics.remove(this.resultGraphic),this._set("resultGraphic",null)}search(e,t){this.emit("search-start"),this.clearGraphics();const r=this._createSuggestionForSearch(e),s=this.when().then((()=>this._getResultsFromSources(r,t).then((e=>{if(d(t?.signal)?.aborted)return null;const s={activeSourceIndex:this.activeSourceIndex,searchTerm:r.text,numResults:0,numErrors:0,errors:[],results:[]};this._formatResponse(s,e,r);const o=this._getFirstResult(s.results),i=(r.location&&o?o.name:r.text).replace(ee,"");return this._set("searchTerm",i),(r.key&&"number"==typeof r.sourceIndex||r.location)&&this._set("selectedSuggestion",r),this._set("results",s.results),this._set("resultCount",s.results.reduce(((e,t)=>e+t.results.length),0)),this.emit("search-complete",s),this._selectFirstResult(o).then((()=>s))})))).then((e=>(this._clearSearching(),e)),(e=>{throw this._clearSearching(),e}));return this._searching=s,s}searchNearby(e){if(!this.locationEnabled){const e=new n("searchNearby:geolocation-unsupported","Geolocation API is unsupported.",{geolocation:navigator.geolocation});return z.error(e),Promise.reject(e)}const t=M().then((t=>V({position:t,view:this.view},e))).then((t=>this.search(t,e)));return this._searching=t,t.catch((()=>{})).then((()=>this._clearSearching())),t}select(e){if(this.clearGraphics(),!e){const t=new n("select:missing-parameter","Cannot select without a searchResult.",{searchResult:e});return z.error(t),Promise.reject(t)}const{view:t}=this,r=Q(e,"sourceIndex")?e.sourceIndex:this._getSourceIndexOfResult(e),o=this.allSources.getItemAt(r);if(!o){const e=new n("select:missing-source","Cannot select without a source.",{source:o});return z.error(e),Promise.reject(e)}const i=o instanceof R?this._getLayerSourcePopupTemplate(o):o.popupTemplate,l=o.resultSymbol||this._getDefaultSymbol(e),a=Q(o,"resultGraphicEnabled")?o.resultGraphicEnabled:this.resultGraphicEnabled,u=Q(o,"autoNavigate")?o.autoNavigate:this.autoNavigate,c=Q(o,"popupEnabled")?o.popupEnabled:this.popupEnabled,h=c?i||this.popupTemplate||this.defaultPopupTemplate:null,{feature:p}=e;if(!p){const e=new n("select:missing-feature","Cannot select without a feature.",{feature:p});return z.error(e),Promise.reject(e)}const{attributes:d,geometry:m,layer:f,sourceLayer:S}=p,_=F(m),v={layerViewQuery:this._getLayerView(p),elevationQuery:t&&g(_)?A(_,t).catch((()=>_)):Promise.resolve(_)};return y(v).then((i=>{const n=i.layerViewQuery.value,y=i.elevationQuery.value;l instanceof H&&(l.text=e.name);const _=t&&u?e.target||e.extent:null;return(g(_)?this._goToSearchResult(_):Promise.resolve()).then((()=>{const i=n?p:new s({geometry:m,symbol:l,attributes:d,layer:f,sourceLayer:S,popupTemplate:h}),u=c&&this.view?.popup,g=u&&i.getEffectivePopupTemplate(u.defaultPopupTemplateEnabled);return g&&t.popup.open({features:[i],location:y}),n&&T(n)&&!g&&this._highlightFeature({graphic:i,layerView:n}),!n&&a&&t&&t.graphics.push(i),this._setResultFloor(e),this._set("selectedResult",e),this._set("resultGraphic",i),this.emit("select-result",{result:e,source:o,sourceIndex:r}),e}))}))}suggest(e,t,r){const s=e||this.searchTerm;return this.emit("suggest-start",{searchTerm:s}),this._suggestTimer(t,r).then((()=>this._suggestImmediate(s,r).then((e=>(this._set("suggestions",e.results),this._set("suggestionCount",e.results.reduce(((e,t)=>e+t.results.length),0)),this.emit("suggest-complete",e),e)))))}async when(){await S((()=>!this.updating))}async _update(){const{portal:e,view:t}=this;if(this.includeDefaultSources){const r=this._updatingPromise=y([e?.load(),t?.when()]);if(this.destroyed)return;if(await r,r!==this._updatingPromise)return}await S((()=>this.messages)),this.destroyed||this._updateDefaultSources(),this._updatingPromise=null}_clearSearching(){this._searching=null}_convertHelperServices(){const e=this.portal?.helperServices?.geocode;if(!e)return[];return e.map((e=>{if(!1===e.placefinding)return;const t=r.apiKey&&C(e.url)?{url:G}:null,s=P.fromJSON({...e,...t}),o=s.url;if(C(o)||O(o)||N(o)){const e=s.outFields||["Addr_type","Match_addr","StAddr","City"],t=s.placeholder||this.messages.placeholder,r="number"==typeof s.defaultZoomScale?s.defaultZoomScale:2500;s.set({singleLineFieldName:"SingleLine",outFields:e,placeholder:t,defaultZoomScale:r})}return s.singleLineFieldName?s:void 0})).filter(Boolean)}_destroyFeatureLayers(){this._createdFeatureLayers.forEach((e=>e?.destroy())),this._createdFeatureLayers=[]}_getLayerSources(e,t){const r=this.view?.map;return e.map((e=>{const s=r.findLayerById(e.id);if(!s)return;const o=this._getLayerJSON(e),i=R.fromJSON(o);return i.placeholder=t,this._getLayer(s,o).then((e=>{i.layer=e})),i})).filter(Boolean).toArray()}_getTableSources(e,t){const r=this.view?.map;return e.map((e=>{const s=r.findTableById(e.id);if(!s)return;const o=this._getLayerJSON(e),i=R.fromJSON(o);return i.placeholder=t,this._getLayer(s,o).then((e=>{i.layer=e})),i})).filter(Boolean).toArray()}_convertApplicationProperties(){const e=this.view?.map,t=e?.applicationProperties?.viewing?.search;if(!t)return[];const{enabled:r,hintText:s,layers:o,tables:i}=t;if(!r)return[];return[...this._getLayerSources(o,s),...this._getTableSources(i,s)]}async _getSubLayer(e,t){if(await e.load(),!e.allSublayers)throw new Error;const r=e.allSublayers.find((e=>e.id===t.subLayer));if(!r)throw new Error;const s=await r.createFeatureLayer();return this._createdFeatureLayers.push(s),s}async _getBuildingSubLayer(e,t){await e.load();const r=e.allSublayers.find((e=>e.id===t.subLayer));if("building-component"!==r?.type)throw new Error;if(await r.load(),null==r.associatedLayer)throw new Error;return await r.associatedLayer.load(),r}_getLayer(e,t){return"feature"===e.type||"scene"===e.type||"csv"===e.type||"geojson"===e.type||"ogc-feature"===e.type?Promise.resolve(e):"map-image"===e.type?this._getSubLayer(e,t).catch((()=>{const t=new n("search:create-featurelayer","Could not create a FeatureLayer from the MapImageLayer",{layer:e});return z.error(t),null})):"building-scene"===e.type?this._getBuildingSubLayer(e,t):Promise.resolve(null)}_getLayerJSON(e){return"function"==typeof e.toJSON?e.toJSON():e}_updateDefaultSources(){const{defaultSources:e,includeDefaultSources:t}=this;this._destroyFeatureLayers(),e.removeAll(),t&&e.addMany([...this._convertApplicationProperties(),...this._convertHelperServices()])}_abortGoTo(){this._gotoController&&this._gotoController.abort(),this._gotoController=null}_clear(){this._abortGoTo(),this._set("resultCount",null),this._set("results",null),this._set("suggestions",null),this._set("suggestionCount",null),this._set("selectedResult",null),this._set("selectedSuggestion",null),this.emit("search-clear")}_closePopup(){const e=this.view?.popup,{resultGraphic:t}=this;if(!e||!t)return;const{selectedFeature:r}=e;r&&r===t&&e.close()}_suggestTimer(e,t){const r=null!=e?e:this.suggestionDelay;return f(r,null,t&&t.signal)}_createLocationForSearch(e){return e instanceof s?F(e.geometry):e instanceof w?e:Array.isArray(e)&&2===e.length?new w({longitude:e[0],latitude:e[1]}):null}_createSuggestionForSearch(e){if(e&&Q(e,"key")&&Q(e,"text")&&Q(e,"sourceIndex"))return e;const t=this._createLocationForSearch(e),r="string"==typeof e?e:this.searchTerm,{selectedSuggestion:s,selectedResult:o}=this,i=!e&&s&&o,l=i&&s.key===o.key&&s.sourceIndex===o.sourceIndex,a=i&&s.location;return l||a?s:{location:d(t),text:t?"":r,sourceIndex:null,key:null}}_getFirstResult(e){let t=null;return e&&e.some((e=>{const{results:r}=e,s=r[0],o=!!s;return o&&(t=s),o})),t}_selectFirstResult(e){return this.autoSelect&&e?this.select(e):Promise.resolve(null)}_suggestImmediate(e,t){return this.when().then((()=>this._getSuggestionsFromSources(e,t))).then((r=>{if(d(t?.signal)?.aborted)return null;const s={activeSourceIndex:this.activeSourceIndex,searchTerm:e,numResults:0,numErrors:0,errors:[],results:[]};return this._formatResponse(s,r),s}))}_formatSourceResponse(e,t,r){const s=t&&t.value||[],o=t&&t.error,i=this.allSources.getItemAt(r);if(o){const t={sourceIndex:r,source:i,error:o};e.errors.push(t),z.error(o),e.numErrors++}else{const t={sourceIndex:r,source:i,results:s};e.results.push(t),e.numResults+=s.length}}_formatResponse(e,t,r){if(t)if(e.activeSourceIndex===te){const s=r&&Q(r,"sourceIndex")&&-1!==r.sourceIndex?r.sourceIndex:void 0;t.forEach(((t,r)=>{const o=void 0!==s?s:r;this._formatSourceResponse(e,t,o)}))}else this._formatSourceResponse(e,t[0],e.activeSourceIndex)}_getResultsFromSources(e,t){const{allSources:r}=this,s=!e.location&&Q(e,"sourceIndex")?e.sourceIndex:this.activeSourceIndex,o=[];if(!r.length){const e=new n("search:no-sources-defined","At least one source is required.",{allSources:r});return z.error(e),Promise.reject(e)}return s===te?r.forEach(((r,s)=>{o.push(this._getResultsFromSource(e,s,t))})):o.push(this._getResultsFromSource(e,s,t)),y(o)}_getSuggestionsFromSources(e,t){const{allSources:r,activeSourceIndex:s}=this,o=[];if(!r.length){const e=new n("suggest:no-sources-defined","At least one source is required.",{allSources:r});return z.error(e),Promise.reject(e)}return s===te?r.forEach(((r,s)=>{o.push(this._getSuggestionsFromSource(e,s,t))})):o.push(this._getSuggestionsFromSource(e,s,t)),y(o)}_getResultsFromSource(e,t,r){const s=this.allSources.getItemAt(t),{location:o=null}=e,i=this.view?.spatialReference||X,l=Q(s,"maxResults")?s.maxResults:this.maxResults,a=!!(s instanceof R&&Q(s,"exactMatch"))&&s.exactMatch,{view:n}=this;return s.getResults({view:n,sourceIndex:t,location:o,suggestResult:e,spatialReference:i,exactMatch:a,maxResults:l},r)}_getSuggestionsFromSource(e,t,r){const s=this.allSources.getItemAt(t),o=Q(s,"suggestionsEnabled")?s.suggestionsEnabled:this.suggestionsEnabled,i=e.length,l=Q(s,"minSuggestCharacters")?s.minSuggestCharacters:this.minSuggestCharacters;if(o&&e.trim()&&i>=l){const o=this.view?.spatialReference||X,i=Q(s,"maxSuggestions")?s.maxSuggestions:this.maxSuggestions,{view:l}=this,a=!!(s instanceof R&&Q(s,"exactMatch"))&&s.exactMatch;return s.getSuggestions({view:l,sourceIndex:t,suggestTerm:e,spatialReference:o,maxSuggestions:i,exactMatch:a},r)}return Promise.resolve(null)}_getLayerSourcePopupTemplate(e){const{layer:t}=e;if(t)return Q(e,"popupTemplate")?e.popupTemplate:t.popupTemplate}_getSourceIndexOfResult(e){const t=this.results;let r=null;return t.some((t=>t.results.some((s=>s===e&&(r=t.sourceIndex,!0))))),r}async _goToSearchResult(e){const t=!!e;this._abortGoTo();const r=new AbortController;this._gotoController=r;const s={target:{target:e},options:{animate:t,signal:r.signal}};await this.callGoTo(s),this._gotoController=null}_getDefaultSymbol(e){const{defaultSymbols:t}=this,r=e.feature?.geometry;if(m(r))return null;const s=this._get("defaultSymbol");if(s&&("point"===r.type||"multipoint"===r.type))return s;switch(r.type){case"point":case"multipoint":return t.point;case"polyline":return t.polyline;case"extent":case"polygon":return t.polygon;default:return null}}_removeHighlight(){this._handles.remove(K)}async _getLayerView(e){const{view:t}=this;if(!e||!t||"building-component"===e.layer.type||"subtype-sublayer"===e.layer.type)return null;const{layer:r}=e;return await t.when(),t.whenLayerView(r)}_highlightFeature(e){const{graphic:t,layerView:r}=e,{attributes:s,layer:o}=t,{objectIdField:i}=o,l=s&&s[i],a=r.highlight(l||t);this._handles.add(a,K)}_setResultFloor(e){const{view:t}=this,r=e.feature?.attributes,s=e.feature?.sourceLayer;if(s&&"floorInfo"in s&&s?.floorInfo?.floorField&&r){const e=r[s.floorInfo.floorField];t.emit("select-result-floor",e)}}};re.ALL_INDEX=te,e([v()],re.prototype,"_searching",void 0),e([v()],re.prototype,"_updatingPromise",void 0),e([v({readOnly:!0,value:null})],re.prototype,"activeSource",null),e([v()],re.prototype,"activeSourceIndex",null),e([v()],re.prototype,"allPlaceholder",null),e([v({readOnly:!0})],re.prototype,"allSources",null),e([v()],re.prototype,"autoNavigate",void 0),e([v()],re.prototype,"autoSelect",void 0),e([v()],re.prototype,"defaultPopupTemplate",void 0),e([v({readOnly:!0})],re.prototype,"defaultSources",void 0),e([v()],re.prototype,"defaultSymbol",null),e([v()],re.prototype,"defaultSymbols",void 0),e([v()],re.prototype,"includeDefaultSources",void 0),e([v()],re.prototype,"locationEnabled",null),e([v()],re.prototype,"maxInputLength",void 0),e([v()],re.prototype,"maxResults",void 0),e([v()],re.prototype,"maxSuggestions",void 0),e([v()],re.prototype,"messages",void 0),e([v()],re.prototype,"minSuggestCharacters",void 0),e([v({readOnly:!0})],re.prototype,"placeholder",null),e([v()],re.prototype,"popupEnabled",void 0),e([v({type:o})],re.prototype,"popupTemplate",void 0),e([v({type:j})],re.prototype,"portal",void 0),e([v()],re.prototype,"resultCount",void 0),e([v()],re.prototype,"resultGraphicEnabled",void 0),e([v({readOnly:!0})],re.prototype,"resultGraphic",void 0),e([v({readOnly:!0})],re.prototype,"results",void 0),e([v({readOnly:!0})],re.prototype,"selectedSuggestion",void 0),e([v()],re.prototype,"searchAllEnabled",void 0),e([v({readOnly:!0})],re.prototype,"selectedResult",void 0),e([v()],re.prototype,"searchTerm",null),e([v({type:W})],re.prototype,"sources",void 0),e([v({readOnly:!0})],re.prototype,"state",null),e([v()],re.prototype,"suggestionDelay",void 0),e([v()],re.prototype,"suggestionCount",void 0),e([v({readOnly:!0})],re.prototype,"suggestions",void 0),e([v()],re.prototype,"suggestionsEnabled",void 0),e([v({readOnly:!0})],re.prototype,"updating",null),e([v()],re.prototype,"view",void 0),e([v()],re.prototype,"clear",null),re=e([b(q)],re);const se=re;export{se as default};
|